/* ColPal triage dashboard — one stylesheet, two views.
 *
 * Ticket 016 built the locations overview as the feed with the card atom
 * swapped, adding no new CSS classes. Both pages load this file, which is the
 * mechanical guarantee that the two views cannot drift apart.
 *
 * The visual language is v8 (priority-feed-disease-view-mockup-v8-MVP.html,
 * 20 Aug 2026): coloured dots rather than tinted pills, full-contrast values,
 * a tooltip layer, cards default collapsed, and "Spread to you" rather than
 * "Spread". Palette and type are the BlueDot design system's.
 */

:root {
  --ink: #002933;
  --page: #FCFEFF;
  --card: #ffffff;
  --line: #E0FAFF;
  --accent: #00BBE0;
  --link: #E00065;
  --rule: #DCE9EC;
  --up: #E00004;
  --down: #007A94;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

a { color: var(--ink); }
a:hover { color: #00107A; }

.mono { font-family: "Source Code Pro", ui-monospace, Menlo, monospace; }

/* ------------------------------------------------------------------ masthead */
.masthead { background: #002933; color: #fff; padding: 30px 48px 26px; }
.masthead .eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.masthead h1 { font-size: 26px; font-weight: 700; margin: 0 0 6px; }
.masthead .sub { font-size: 13px; color: rgba(255, 255, 255, .55); }
.masthead .stamp {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 12px; color: rgba(255, 255, 255, .5); margin-top: 14px;
  padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.masthead nav { margin-top: 14px; display: flex; gap: 18px; }
.masthead nav a {
  font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .6);
  text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.masthead nav a:hover { color: #fff; }
.masthead nav a[aria-current] { color: #fff; border-bottom-color: var(--accent); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 32px 24px 80px; }

/* The page diagnoses its own staleness from meta.generatedAt, because the
 * failure that matters most is the one where nothing redeploys at all — and
 * every disclosure that depends on shipping something new has already failed
 * by definition in that case. Four days, so a healthy service never shows it. */
.stale {
  background: #FFE0E0; border: 1.5px solid var(--up); border-radius: 8px;
  padding: 13px 16px; margin-bottom: 20px; font-size: 14px; color: #7A0000;
}
.stale b { font-weight: 700; }

/* --------------------------------------------------------------------- guide */
.panel {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 16px; margin-bottom: 20px;
}
.panel > button {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 0;
  background: none; border: none; cursor: pointer; text-align: left; font: inherit;
}
.panel .chev { font-size: 13px; line-height: 1; color: var(--accent); }
.panel .plabel {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent);
}
.guidegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.guidegrid > div { border-left: 3px solid var(--accent); padding-left: 12px; }
.guidegrid .axis { font-size: 13px; font-weight: 700; }
.guidegrid .ask { font-size: 12px; font-style: italic; color: rgba(0, 41, 51, .55); }
.guidegrid .note { font-size: 11px; color: rgba(0, 41, 51, .4); margin-top: 2px; }
.dotkey {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px;
}
.dotkey .intro { font-size: 12px; color: rgba(0, 41, 51, .78); }
.dotkey span.k { display: flex; align-items: center; gap: 7px; }

/* -------------------------------------------------------------- filter strip */
.filter {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 13px 15px; margin-bottom: 20px; position: relative;
}
.frow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flab {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(0, 41, 51, .5);
}
#search {
  flex: 1; min-width: 190px; border: 1.5px solid var(--line); border-radius: 6px;
  padding: 7px 10px; font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
}
#search:focus { outline: none; border-color: var(--accent); }
.reset {
  border: 1.5px solid #CFE3E9; background: #fff; color: rgba(0, 41, 51, .75);
  border-radius: 6px; padding: 7px 12px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.reset:hover { border-color: var(--accent); color: var(--ink); }
.reset[disabled] { opacity: .4; cursor: default; }
#menu {
  position: absolute; z-index: 40; top: 100%; left: 15px; right: 15px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 41, 51, .14); max-height: 290px; overflow: auto;
  margin-top: 4px;
}
#menu div { padding: 7px 12px; font-size: 13.5px; cursor: pointer; display: flex; gap: 9px; align-items: center; }
#menu div:hover { background: #F0FBFD; }
#menu .grp {
  font-size: 10px; font-weight: 700; letter-spacing: .12em; color: rgba(0, 41, 51, .42);
  cursor: default; padding-top: 9px;
}
#menu .grp:hover { background: none; }
#menu .on { color: var(--accent); font-weight: 700; }
.selrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.selpill {
  background: var(--line); border: 1.5px solid var(--down); color: var(--ink);
  border-radius: 13px; font-size: 12px; padding: 3px 6px 3px 10px;
  display: inline-flex; align-items: center; gap: 7px;
}
.selpill b { cursor: pointer; font-size: 14px; line-height: 1; color: var(--down); }
.scope { font-size: 12.5px; color: rgba(0, 41, 51, .6); margin-top: 10px; }

/* ---------------------------------------------------------------- tier bands */
.tierband {
  display: flex; align-items: center; gap: 16px; border-radius: 8px;
  padding: 12px 20px; color: #fff; margin: 32px 0 0;
}
.tierband:first-child { margin-top: 0; }
.tierband .num { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, .45); }
.tierband .name {
  font-size: 22px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  line-height: 1;
}
.tierband .guide { font-size: 13px; color: rgba(255, 255, 255, .7); margin-top: 4px; }
.tierband .count {
  margin-left: auto; text-align: right;
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
}
.tierband .count b { font-size: 22px; font-weight: 700; line-height: 1; display: block; }
.tierband .count span {
  font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(255, 255, 255, .5); font-family: "Source Sans 3", sans-serif;
}
.band1 { background: #7A0000; }
.band2 { background: #41007A; }
.band3 { background: #00107A; }
.band4 { background: #002933; }

/* Ticket 010: an empty tier gets one line carrying the window; an empty
 * sub-tier renders nothing at all. Every site has 4-7 empty sub-tiers, so
 * stating them all would bury the cards — but every site also has an empty
 * tier, and that is the most useful thing the view can say. */
.emptyband {
  font-size: 14px; color: rgba(0, 41, 51, .6); font-style: italic;
  padding: 16px 20px 4px;
}

.subband { display: flex; align-items: stretch; gap: 12px; margin: 18px 0 10px; }
.subband .inner {
  display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0;
  border-left: 5px solid; border-radius: 0 6px 6px 0; padding: 7px 14px;
}
.subband .code {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 14px; font-weight: 700;
}
.subband .label {
  font-size: 14px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
}
.subband .rule { flex: 1 1 0; min-width: 12px; align-self: center; height: 2px; }

.sub1 .inner { border-color: #E00004; background: #FFE0E0; }
.sub1 .code { color: #E00004; } .sub1 .label { color: #7A0000; } .sub1 .rule { background: #FFE0E0; }
.sub2 .inner { border-color: #7800E0; background: #F1E0FF; }
.sub2 .code { color: #7800E0; } .sub2 .label { color: #41007A; } .sub2 .rule { background: #F1E0FF; }
.sub3 .inner { border-color: #001EE0; background: #E0E4FF; }
.sub3 .code { color: #001EE0; } .sub3 .label { color: #00107A; } .sub3 .rule { background: #E0E4FF; }
.sub4 .inner { border-color: #007A94; background: #E0FAFF; }
.sub4 .code { color: #007A94; } .sub4 .label { color: #002933; } .sub4 .rule { background: #E0FAFF; }

/* --------------------------------------------------------------------- cards */
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; overflow: hidden;
}
.chead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 16px 20px 14px;
}
.chead .lead { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.titlerow h3 { font-size: 19px; font-weight: 700; margin: 0; }
.chip {
  font-size: 12px; padding: 3px 10px; border-radius: 14px;
  background: #F2F7F9; border: 1px solid var(--rule); color: rgba(0, 41, 51, .7);
}

/* The temporal line. Ticket 018 found the marker was already here and merely
 * suppressed at 11.5px: the movement clause now matches the text beneath it,
 * and both directions carry full contrast. `held steady` stays quiet. */
.temporal {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 11px; color: rgba(0, 41, 51, .5);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.tmove { font-size: 12.5px; font-weight: 700; }
.t-up { color: var(--up); }
.t-down { color: var(--down); }
.t-flat { color: rgba(0, 41, 51, .45); font-weight: 400; }

/* Location pills, filtered to the card's own sub-tier (ticket 009 variant D),
 * and suppressed entirely in tier 4, where naming sites carries no information
 * because that is where everything sits by default. */
.strip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pin {
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px; border: 1px solid;
  font-weight: 600;
}
.pin.sub1 { background: #FFE0E0; border-color: #E00004; color: #7A0000; }
.pin.sub2 { background: #F1E0FF; border-color: #7800E0; color: #41007A; }
.pin.sub3 { background: #E0E4FF; border-color: #001EE0; color: #00107A; }
.pin.sub4 { background: #E0FAFF; border-color: #007A94; color: #002933; }
.pin.lower {
  background: #F2F7F9; border-color: var(--rule); color: rgba(0, 41, 51, .62);
  font-weight: 400;
}

/* Ticket 012: the tooltip does not survive a screenshot, so this pill is the
 * whole disclosure downstream. It appears only where placement rests entirely
 * on country-grain reporting. */
.natpill {
  align-self: flex-start;
  display: inline-block; font-size: 11px; padding: 2.5px 9px; border-radius: 12px;
  background: #F1E0FF; border: 1px solid #7800E0; color: #41007A; margin-top: 6px;
}

.axes { display: flex; gap: 22px; flex-shrink: 0; }
.axis { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.axis .name {
  font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(0, 41, 51, .4);
}
.axis .val { display: flex; align-items: center; gap: 7px; }
.axis .val > span {
  font-size: 11px; font-weight: 700; color: rgba(0, 41, 51, .7);
}
.tip { border-bottom: 1px dotted rgba(0, 41, 51, .45); cursor: help; }

.bars { display: inline-flex; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.bars i { display: inline-block; width: 5px; height: 13px; border-radius: 1px; box-sizing: border-box; }
.bars.big i { height: 16px; width: 6px; }
.b-on { background: #002933; }
.b-off { background: var(--rule); }
.b-cond { background: #fff; border: 1.5px solid #7FA3AC; }

.toggle {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 8px 20px;
  background: none; border: none; border-top: 1px solid var(--line); cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 600; color: rgba(0, 41, 51, .5);
  text-align: left;
}
.toggle:hover { color: var(--ink); background: #F7FDFF; }

/* --------------------------------------------------------------- card body */
.cbody { border-top: 1px solid var(--line); }
.detail {
  display: grid; grid-template-columns: 236px 1fr 1px 1fr; gap: 0 24px;
  padding: 16px 20px 18px; align-items: stretch;
}
.detail .divider { background: var(--line); }
.axhead {
  display: flex; flex-direction: column; padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
}
.axhead .row { display: flex; align-items: center; gap: 12px; }
.axhead .kicker {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
}
.axhead .big { font-size: 18px; font-weight: 700; margin-left: auto; }
.axhead .aside {
  font-size: 12px; font-style: italic; color: rgba(0, 41, 51, .45); margin-top: 11px;
}
.constlabel {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase;
  color: rgba(0, 41, 51, .45); margin: 11px 0 7px;
}
.flags { display: flex; flex-direction: column; gap: 8px; }
.flag { display: flex; align-items: baseline; gap: 9px; }
.flag .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; position: relative; top: 4px; }
.flag .txt { font-size: 13px; color: rgba(0, 41, 51, .7); }
.flag .txt strong { font-weight: 700; color: var(--ink); }
.tone-red { background: #E00004; }
.tone-purple { background: #7800E0; }
.tone-blue { background: #001EE0; }
.tone-neutral { background: #002933; }

.colhead {
  padding: 16px 0 6px; font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; color: rgba(0, 41, 51, .5);
}
.evrow { display: contents; }
.evrow .where { padding: 10px 0 0; }
.evrow .where .n { font-size: 14px; font-weight: 700; }
.evrow .where .d {
  margin-top: 4px; font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 12px; color: rgba(0, 41, 51, .55);
}
.evrow .cell { padding: 10px 0 0; display: flex; flex-direction: column; align-items: flex-start; }
.evrule { grid-column: 1 / -1; height: 1px; background: var(--line); margin-top: 16px; }

.also { background: var(--page); border-top: 1px solid var(--line); padding: 14px 20px 18px; }
.also .kicker {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; margin-bottom: 10px;
  display: block;
}
.also .rows { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.also .row {
  font-size: 13.5px; font-weight: 600; padding: 4px 10px; border-radius: 14px;
  border: 1px solid var(--down); color: var(--ink); background: #fff;
}
.also .row span { font-family: "Source Code Pro", ui-monospace, Menlo, monospace; font-weight: 400; }

.cfoot { display: flex; justify-content: flex-end; padding: 0 20px 14px; }
.alink {
  font-size: 12.5px; font-weight: 700; color: var(--down); text-decoration: none;
  cursor: pointer; white-space: nowrap;
}
.alink:hover { text-decoration: underline; }

/* --------------------------------------------------------------------- modal */
#scrim {
  position: fixed; inset: 0; background: rgba(0, 41, 51, .55); z-index: 200;
  display: none; padding: 34px 20px; overflow: auto;
}
#modal {
  background: #fff; max-width: 760px; margin: 0 auto; border-radius: 11px;
  box-shadow: 0 18px 50px rgba(0, 41, 51, .4); overflow: hidden;
}
.mtop { background: #002933; color: #fff; padding: 17px 24px; }
.mtop h2 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.mtop .meta { font-size: 12px; opacity: .75; margin-top: 4px; }
.mclose {
  float: right; background: rgba(255, 255, 255, .15); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 16px;
  margin-left: 12px;
}
.mbody { padding: 20px 24px 26px; }
.mbody h3 {
  font-family: "Source Code Pro", ui-monospace, Menlo, monospace; font-size: 10.5px;
  font-weight: 700; letter-spacing: .13em; color: var(--down); margin: 20px 0 7px;
  text-transform: uppercase;
}
.mbody h3:first-child { margin-top: 0; }
.mbody p { font-size: 14px; margin: 0 0 9px; white-space: pre-wrap; }
.mbody li { font-size: 14px; margin: 0 0 6px 18px; }
.mbody a { color: var(--link); word-break: break-all; font-size: 12.5px; }
.mquote {
  border-left: 3px solid var(--accent); background: #F4FCFE; padding: 11px 14px;
  border-radius: 0 6px 6px 0; margin-bottom: 12px;
}

.pagefoot {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: rgba(0, 41, 51, .45);
}

@media (max-width: 820px) {
  .chead { flex-direction: column; }
  .axes { margin-top: 8px; }
  .detail { grid-template-columns: 1fr; }
  .detail .divider { display: none; }
  .guidegrid { grid-template-columns: 1fr; }
  .masthead { padding: 24px 20px; }
}
