/* LastYard console.
 *
 * ---------------------------------------------------------------------------
 * The provenance grammar, applied everywhere and taught once in the legend:
 *
 *   solid line / solid fill   = MEASURED    (came from a FortyGuard call)
 *   dashed line / hatched     = MODELLED    (our ASHRAE sol-air model)
 *   dotted line               = SYNTHETIC   (a scenario input we invented)
 *
 * The grammar is structural, not decorative: it is the only way a reader can tell
 * which numbers on this screen are observations and which are inferences, and the
 * whole product depends on never blurring that line. Nothing in the visual design
 * may weaken it - if a treatment makes measured and modelled harder to tell apart,
 * the treatment is wrong.
 *
 * ---------------------------------------------------------------------------
 * The type system. Three families, three jobs, never mixed:
 *
 *   Instrument Serif  DISPLAY    the wordmark, view titles, the day's verdict.
 *                                Editorial, because the argument is an argument.
 *   Inter             INTERFACE  labels, controls, tables, prose.
 *   JetBrains Mono    DATA       every figure, every unit, every axis tick.
 *
 * The third rule is the load-bearing one: if it is a number the engine computed,
 * it is set in mono with tabular figures. A reader can therefore tell data from
 * chrome before reading a word of either.
 *
 * ---------------------------------------------------------------------------
 * Colour. The heat ramp belongs to the data and is used for nothing else, so a
 * warm colour on this page always means exposure. The interface is therefore cool
 * and quiet: ink chrome, warm paper, one petrol accent. Warm paper rather than
 * blue-grey so the ramp sits on it rather than fighting it.
 */

@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/instrument-serif-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter var";
  src: url("/static/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono var";
  src: url("/static/fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- surfaces. Warm neutrals: the ramp is the only warm thing that means
     something, so the paper underneath it must not be cold. */
  --paper:      #F4F3EF;
  --panel:      #FFFFFF;
  --panel-sunk: #EFEEE8;
  --ink:        #16232B;
  --ink-2:      #4C5F6B;
  --ink-3:      #83939C;
  --rule:       #DEDBD3;
  --rule-soft:  #EAE8E1;

  /* ---- the chrome. A dark masthead over a light workspace: the frame reads as
     product, the canvas reads as instrument. */
  --chrome:      #0D1A21;
  --chrome-2:    #16262F;
  --chrome-ink:  #E6EDF0;
  --chrome-ink-2:#94A8B2;
  --chrome-rule: rgba(230,237,240,0.14);

  --accent:      #0D5A5F;
  --accent-ink:  #06393C;
  --accent-soft: #DEECEB;
  --accent-lit:  #5FCFC6;   /* the accent, legible on the dark chrome */

  /* Exposure ramp: cool slate -> sand -> amber -> oxide -> ember. Never reused for
   * UI chrome, so a colour on this page always means either "data" or "control",
   * never both. The sand stop exists to keep the slate-to-amber blend from passing
   * through olive. */
  --heat-0: #89A3B9;
  --heat-1: #B9C4C0;
  --heat-2: #DFCD87;
  --heat-3: #CE8B2C;
  --heat-4: #AC4A1E;
  --heat-5: #6B2210;

  --flag:    #A8451F;
  --ceiling: #A8451F;

  --mono:    "JetBrains Mono var", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans:    "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;

  --gap:  22px;
  --rad:  6px;
  --rad-sm: 4px;

  --shadow-1: 0 1px 2px rgba(22,35,43,0.05);
  --shadow-2: 0 4px 16px rgba(22,35,43,0.07), 0 1px 3px rgba(22,35,43,0.05);
  --shadow-3: 0 14px 40px rgba(22,35,43,0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  /* min-height, never height. Everything here is border-box, so a fixed `height:100%`
   * absorbs `padding-bottom` inside the viewport instead of extending the page - which
   * silently cancelled the space the guided tour reserves for its rail, and left the
   * last panel of two views stuck under it however far the page was scrolled. */
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Every number on this page is tabular, so columns of figures line up and a
 * changing value never reflows the text around it. */
.num, td.num, .metric-value, .trace-readout {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

a { color: var(--accent); }

/* One label register, used for every small uppercase caption in the app. Inter
 * rather than mono: mono is reserved for figures, and a label is not a figure. */
.eyebrow,
.stat-label,
.metric-unit,
.imagery-cap,
.data-table th,
.ask-empty h3,
.ask-evidence-head,
.tour-step {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ masthead
 *
 * Two bands. The dark one carries identity and the tools that work from every
 * view; the light one carries the views themselves. Splitting them stops the row
 * from wrapping into a cramped block and gives the wordmark somewhere to breathe.
 */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--chrome);
  color: var(--chrome-ink);
}

.masthead-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  height: 60px;
}

.wordmark {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  color: #fff;
  white-space: nowrap;
}
.wordmark .yard { color: var(--accent-lit); }

.masthead-divider {
  width: 1px;
  height: 22px;
  background: var(--chrome-rule);
  flex: none;
}

/* The run this screen is showing. Mono, because it is almost all figures. */
.run-context {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--chrome-ink-2);
  letter-spacing: -0.005em;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The same caption register down in the workspace, where a panel head needs a
 * line of context beside its title. */
.masthead-context {
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
  min-width: 0;
}

/* The day picker is a view control, so it lives on the view bar rather than in the
 * identity band - which also gives the run context the width it needs to say what
 * it has to say without truncating. */
.day-picker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  flex: none;
  padding-left: 16px;
}
.day-picker > span {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.day-picker select {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: var(--rad-sm);
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}
.day-picker select:hover { border-color: var(--ink-3); }
.day-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- the view bar: light, so the workspace begins here */

.masthead-nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--rule);
  box-shadow: var(--shadow-1);
}

.masthead-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.masthead-nav::-webkit-scrollbar { display: none; }

.nav-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  padding: 13px 13px 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav-tab:hover { color: var(--ink); }
.nav-tab[aria-selected="true"] {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  font-weight: 650;
}
.nav-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 2px; }

/* -------------------------------------------------------------- header finder
 *
 * A judge who wants to check a specific street should not have to hunt a hundred
 * dots for it. The box lives in the dark band because it works from every view,
 * and it searches only what this run measured - there is nothing else it could
 * honestly find.
 */

.finder {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 268px;
  flex: none;
  padding: 7px 9px 7px 12px;
  border: 1px solid var(--chrome-rule);
  border-radius: var(--rad-sm);
  background: rgba(255,255,255,0.06);
  transition: background 130ms ease, border-color 130ms ease;
}

.finder:hover { background: rgba(255,255,255,0.09); }
.finder:focus-within {
  border-color: var(--accent-lit);
  background: rgba(255,255,255,0.11);
  box-shadow: 0 0 0 3px rgba(95,207,198,0.16);
}

.finder-icon { font-size: 13px; color: var(--chrome-ink-2); line-height: 1; }

.finder-input {
  font: inherit;
  font-size: 13px;
  border: 0;
  background: none;
  outline: none;
  color: var(--chrome-ink);
  width: 100%;
  min-width: 0;
}
.finder-input::placeholder { color: var(--chrome-ink-2); }

.finder-key {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--chrome-ink-2);
  border: 1px solid var(--chrome-rule);
  border-radius: 3px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.05);
}
.finder:focus-within .finder-key { visibility: hidden; }

/* The dropdown drops out of the dark band onto the light workspace, so it takes
 * the workspace's colours rather than the band's. */
.finder-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 330px;
  margin: 0;
  padding: 5px;
  list-style: none;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  box-shadow: var(--shadow-3);
  max-height: 340px;
  overflow-y: auto;
}

.finder-option {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--rad-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.finder-option:hover,
.finder-option.is-active { background: var(--accent-soft); }
.finder-option .street { flex: 1 1 auto; min-width: 0; }
.finder-option .hours {
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  white-space: nowrap;
}
.finder-option .dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(22,35,43,0.18);
}

.finder-empty {
  padding: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ------------------------------------------------------------- ask lastyard
 *
 * A conversational surface with no model behind it. The visual language is
 * deliberately plain: this is a lookup that speaks in sentences, and dressing it
 * up as a chatbot would be claiming something it does not do.
 */

.ask {
  max-width: 880px;
  margin: 0 auto;
  padding: 34px 24px 84px;
}

.ask-intro { margin-bottom: 26px; }
.ask-intro .view-lede strong { color: var(--ink); font-weight: 650; }

.ask-thread { display: flex; flex-direction: column; gap: 14px; }

.ask-turn { display: flex; flex-direction: column; gap: 8px; }

.ask-q {
  align-self: flex-end;
  max-width: 78%;
  padding: 8px 14px;
  border-radius: 14px 14px 3px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
}

.ask-a {
  align-self: flex-start;
  max-width: 92%;
  padding: 12px 16px;
  border-radius: 14px 14px 14px 3px;
  background: var(--panel);
  border: 1px solid var(--rule);
  font-size: 13.5px;
  line-height: 1.6;
}
.ask-a .ask-kind {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ask-a.is-risky      .ask-kind { color: var(--flag); }
.ask-a.is-borderline .ask-kind { color: #A07514; }
.ask-a.is-safe       .ask-kind { color: var(--accent); }
.ask-a.is-shade_assumed .ask-kind,
.ask-a.is-not_covered   .ask-kind,
.ask-a.is-unclear       .ask-kind { color: var(--ink-3); }

.ask-alts { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); }
.ask-alt {
  font: inherit;
  border: 1px solid var(--rule);
  background: var(--panel-sunk);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 4px 4px 0 0;
  cursor: pointer;
  color: var(--ink);
}
.ask-alt:hover { border-color: var(--accent); background: var(--accent-soft); }

/* The evidence card. Every reply carries one, because a sentence about a doorstep
 * is worth exactly as much as the provenance of the numbers inside it. */
.ask-evidence {
  margin-top: 10px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--rad);
  overflow: hidden;
}
.ask-evidence-head {
  padding: 7px 12px;
  background: var(--panel-sunk);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
/* Fixed columns. Left to itself the browser hands the width to whichever cell has
 * the longest unbreakable token, which here is the value, and squeezes the source
 * note into a four-line ribbon. The provenance note is the part worth reading. */
.ask-evidence table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ask-evidence col.c-label  { width: 26%; }
.ask-evidence col.c-value  { width: 24%; }
.ask-evidence col.c-source { width: 50%; }
.ask-evidence td { padding: 6px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.ask-evidence tr:last-child td { border-bottom: 0; }
.ask-evidence .ev-label { color: var(--ink-2); }
.ask-evidence .ev-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  overflow-wrap: anywhere;
}
/* Chip beside the note, not inside the paragraph: inline, a wrapped second line
 * runs back under the chip and the whole cell reads as broken. */
.ask-evidence .ev-source { color: var(--ink-3); font-size: 11.5px; line-height: 1.5; }
.ask-evidence .ev-source-inner { display: flex; align-items: flex-start; gap: 9px; }
.ask-evidence .ev-source .chip { flex: none; margin-top: 1px; }

.ask-disclaimer {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
  border-left: 2px solid var(--rule);
  padding-left: 10px;
}

.ask-form { display: flex; gap: 8px; margin-top: 20px; }

.ask-input {
  font: inherit;
  font-size: 14px;
  flex: 1 1 auto;
  padding: 11px 15px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
}
.ask-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11,95,99,0.1);
}

.ask-send {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.ask-send:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.ask-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.ask-chip {
  font: inherit;
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
}
.ask-chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

/* The state before the first question. An empty box under a claim about how the
 * answers work is a wasted chance to show what those answers are - so the six
 * patterns are the empty state, and the reader can audit the whole answer space
 * before asking anything. */
.ask-empty {
  margin-top: 34px;
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  background: var(--panel);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.ask-empty-scope {
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--panel-sunk);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.ask-empty-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-soft);
}
.ask-empty-cols > div { background: var(--panel); padding: 18px 20px 20px; }

.ask-empty h3 {
  margin: 0 0 12px;
  color: var(--ink-3);
}

.ask-empty ul { margin: 0; padding-left: 18px; }
.ask-empty li {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.ask-empty li b { color: var(--ink); font-weight: 600; }

.ask-empty-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
  border-left: 2px solid var(--rule);
  padding-left: 10px;
}

@media (max-width: 900px) {
  .finder { min-width: 0; flex: 1 1 180px; }
  .finder-results { min-width: 0; }
  .ask-empty-cols { grid-template-columns: 1fr; gap: 22px; }
}

/* ------------------------------------------------------------- provenance chip */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
  border: 1px solid;
  line-height: 1.6;
}
.chip::before {
  content: "";
  width: 16px;
  height: 0;
  border-top-width: 2px;
  flex: none;
}
.chip-measured {
  color: var(--accent-ink);
  border-color: #A9CBC9;
  background: var(--accent-soft);
}
.chip-measured::before { border-top-style: solid; border-color: var(--accent); }

.chip-modelled {
  color: #7A4A12;
  border-color: #DFC489;
  background: #FBF3E2;
}
.chip-modelled::before { border-top-style: dashed; border-color: #B8832A; }

.chip-synthetic {
  color: #5C4A6E;
  border-color: #CBBEDB;
  background: #F2EEF7;
}
.chip-synthetic::before { border-top-style: dotted; border-color: #7A5FA0; }

/* Three more chips, for the rows the evidence card carries that the trace does not.
 *
 * `assumed` keeps the dotted rule, because an assumed sky view is exactly what
 * dotted has always meant here: an input we supplied rather than measured. The
 * last two carry no rule at all - a threshold and a recommendation are not
 * observations of anything, and giving them a line style would quietly enrol them
 * in a grammar that is only about provenance of data. */
.chip-assumed {
  color: #4A5A66;
  border-color: #C4CFD8;
  background: var(--panel-sunk);
}
.chip-assumed::before { border-top-style: dotted; border-color: #7D8C97; }

.chip-operator,
.chip-engine {
  color: var(--ink-2);
  border-color: var(--rule);
  background: var(--panel);
}
.chip-operator::before,
.chip-engine::before { display: none; }

/* The excursion shading is the one piece of the trace that is an area rather than a
 * line, so its key is a block rather than a rule. Two tones, because only the part
 * inside the dwell window is counted by the headline number. */
.chip-counted {
  color: #7A2E14;
  border-color: #E3B7A5;
  background: #FBF0EB;
}
.chip-counted::before {
  height: 10px;
  border: none;
  width: 16px;
  background: linear-gradient(to right,
    rgba(168,69,31,0.10) 0 4px, rgba(168,69,31,0.42) 4px 12px, rgba(168,69,31,0.10) 12px);
}

.chip-unavailable {
  color: var(--ink-2);
  border-color: var(--rule);
  background: var(--panel-sunk);
}
.chip-unavailable::before { border-top-style: solid; border-color: var(--ink-3); }

/* ----------------------------------------------------------------- structure */

.view { display: none; }
.view.is-active { display: block; }

.console {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: var(--gap);
  padding: 0 var(--gap) var(--gap);
  align-items: start;
}

.stack > * + * { margin-top: var(--gap); }

.panel {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--panel);
  flex-wrap: wrap;
}

/* Doubly-classed so it still wins inside .prose-view, where a bare `h2` rule for
 * the page title would otherwise blow every panel heading up to 26px. */
.panel-title,
.panel-head .panel-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 0;
  padding: 0;
}

.panel-body { padding: 16px; }
.panel-body.is-flush { padding: 0; }

/* Progressive disclosure. The default view of a screen carries the few things that
 * decide something; the rest is one click away and says so. */
.drawer {
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  background: var(--panel);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.drawer > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  user-select: none;
}
.drawer > summary::-webkit-details-marker { display: none; }
.drawer > summary:hover { background: var(--panel-sunk); color: var(--ink); }
.drawer > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.drawer > summary::before {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg) translate(-1px, -1px);
  flex: none;
  transition: transform 140ms ease;
}
.drawer[open] > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.drawer[open] > summary { border-bottom: 1px solid var(--rule-soft); }

.drawer-gloss {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-3);
  margin-left: auto;
  text-align: right;
}

/* ------------------------------------------------------------------ view head
 *
 * The non-console views open with a title and one paragraph that states what the
 * screen is for. A screen that begins with a table makes the reader work out its
 * own argument.
 */

.view-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px var(--gap) 72px;
}
.view-body > * + * { margin-top: var(--gap); }

.view-head { max-width: 720px; margin-bottom: 28px !important; }

.view-title {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 10px;
}

.view-lede {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ---------------------------------------------------------------------- map
 *
 * The centrepiece. It is the only view in the app where a hundred decisions are
 * legible at once, so it gets the height, the contrast and the quiet basemap.
 */

.map-wrap { position: relative; background: #E7E9E4; }
#map { display: block; width: 100%; height: 600px; cursor: crosshair; }

/* Two floating captions over the canvas. Both are frosted rather than opaque so
 * the map keeps reading as one surface. */
.map-hint,
.map-scale {
  position: absolute;
  bottom: 14px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--ink-2);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--rule);
  border-radius: var(--rad-sm);
  box-shadow: var(--shadow-1);
}

.map-hint {
  left: 14px;
  margin: 0;
  padding: 7px 10px;
  max-width: 54%;
}

.map-scale {
  right: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
}
.map-scale .bar {
  display: block;
  height: 2px;
  background: var(--ink);
  width: 56px;
}

/* The exposure legend. A continuous bar rather than a row of chips, because the
 * quantity it encodes is continuous. */
.ramp {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--ink-3);
}
.ramp-swatches {
  display: flex;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(22,35,43,0.1);
}
.ramp-swatches i { width: 17px; height: 9px; display: block; }

/* ------------------------------------------------------------ excursion trace
 *
 * One address, one day, one number. The chart is the evidence and the figure
 * beneath it is the claim, so they share a panel and the figure is given the
 * weight - a judge reading only the big number has still read the product.
 */

.trace-hero { padding: 0; }

.trace-figure { position: relative; padding: 18px 18px 4px; }
#trace { display: block; width: 100%; height: 268px; }

.trace-readout {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--rule-soft);
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFBF8 100%);
}

.metric-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
  color: var(--flag);
}
.metric-value.is-clear { color: var(--accent); }

.metric-unit {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1.5;
  max-width: 30ch;
}
.metric-unit b {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 3px;
}

.trace-readout-chip { margin-left: auto; }

.trace-legend {
  display: flex;
  gap: 7px 10px;
  flex-wrap: wrap;
  padding: 11px 18px;
  border-top: 1px solid var(--rule-soft);
  background: var(--panel-sunk);
}

/* Four keys, one row: at the panel widths this legend lives at, the default chip
 * metrics wrap the last one onto a line of its own and the legend stops reading as
 * one object. */
.trace-legend .chip {
  font-size: 9.5px;
  letter-spacing: 0.07em;
  padding: 3px 7px;
  gap: 6px;
}
.trace-legend .chip::before { width: 13px; }

/* ------------------------------------------------------------------- imagery
 *
 * FortyGuard's own segmentation, shown rather than described. This is the panel
 * that answers "why is this doorstep different from the one next door", so the
 * pictures are large and the numbers sit under them, not over them.
 */

.imagery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.imagery-cell { min-width: 0; }
.imagery-cell img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--rad-sm);
  background: var(--panel-sunk);
}

.imagery-cap {
  color: var(--ink-3);
  margin: 0 0 8px;
}

.seg-bar {
  display: flex;
  height: 18px;
  margin-top: 10px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(22,35,43,0.12);
}
.seg-bar span { display: block; }

.seg-key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  margin-top: 8px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--ink-2);
}
.seg-key i {
  width: 9px; height: 9px; display: inline-block;
  margin-right: 5px; border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(22,35,43,0.14);
}

/* Empty states name the action that fills them. A dashed box saying nothing is a
 * gap in the design, not a state. */
.empty-state {
  margin: 0;
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
  background: var(--panel-sunk);
  border: 1px dashed var(--rule);
  border-radius: var(--rad-sm);
}
.empty-state b { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 3px; }

/* ------------------------------------------------------------- credits figure
 *
 * Two bars on one scale, so the cache row visibly dwarfs the paid row. That ratio
 * is the reason a hundred street-view panoramas fit inside the grant, and it is a
 * fact about the client rather than a claim about it.
 */

.spend-rows { display: grid; gap: 20px; }

.spend-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  grid-template-areas: "label track figure" ". note note";
  align-items: center;
  gap: 6px 16px;
}

.spend-label {
  grid-area: label;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.spend-track {
  grid-area: track;
  display: flex;
  height: 18px;
  border-radius: 3px;
  background: rgba(22,35,43,0.06);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(22,35,43,0.08);
}
.spend-track i { display: block; height: 100%; }

.spend-figure {
  grid-area: figure;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}
.spend-row.is-saved .spend-figure { color: var(--accent); }

.spend-note {
  grid-area: note;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.spend-note code {
  font-family: var(--mono);
  font-size: 0.94em;
  background: var(--panel-sunk);
  border-radius: 3px;
  padding: 0 4px;
}

.spend-key {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}
.spend-key-item { display: inline-flex; align-items: center; gap: 7px; }
.spend-key i { width: 10px; height: 10px; border-radius: 2px; flex: none; }

@media (max-width: 720px) {
  .spend-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "label figure" "track track" "note note";
  }
}

/* -------------------------------------------------------------------- tables */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  color: var(--ink-3);
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
  white-space: nowrap;
}
.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
  color: var(--ink-2);
}
.data-table td:first-child { color: var(--ink); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { cursor: pointer; transition: background 90ms ease; }
.data-table tbody tr:hover { background: var(--panel-sunk); }
.data-table tbody tr.is-selected {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.manifest-scroll { max-height: 330px; overflow-y: auto; }

/* The manifest sparkline repeats the hero's grammar at small scale, so the whole
 * book reads as a rack of chart recordings rather than a column of numbers. */
.spark { display: block; width: 74px; height: 20px; }

.action-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  white-space: nowrap;
}
.action-ship_ground { background: var(--accent-soft); border-color: #A9CBC9; color: var(--accent-ink); }
.action-divert_to_locker { background: #FBF3E2; border-color: #DFC489; color: #7A4A12; }
.action-upgrade_to_next_day { background: #F8E3DC; border-color: #E0AC98; color: #7C2E14; }
.action-require_signature { background: #F2EEF7; border-color: #CBBEDB; color: #5C4A6E; }

/* -------------------------------------------------------------------- prose
 *
 * The argument pages. A serif display face and a real measure, because these are
 * pages to be read rather than scanned - and because the register the honesty
 * page needs is a journal article's, not a dashboard's.
 */

.prose-view {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px var(--gap) 84px;
}

.prose-view > h2 {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 12px;
  max-width: 18ch;
}

.prose-view h3 {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.prose-view p { color: var(--ink-2); margin: 0 0 14px; }
.prose-view strong { color: var(--ink); font-weight: 600; }
.prose-view ul { color: var(--ink-2); padding-left: 20px; margin: 0 0 14px; }
.prose-view li { margin-bottom: 9px; }
.prose-view code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel-sunk);
  border: 1px solid var(--rule-soft);
  border-radius: 3px;
  padding: 1px 5px;
}

.lede {
  font-size: 18.5px;
  line-height: 1.62;
  color: var(--ink) !important;
  margin-bottom: 26px !important;
}

.callout {
  border: 1px solid #E7CDC1;
  border-left: 3px solid var(--flag);
  background: #FCF4F0;
  padding: 15px 18px;
  border-radius: 0 var(--rad) var(--rad) 0;
  margin: 0 0 18px;
}
.callout p { color: var(--ink-2); }
.callout p:last-child { margin-bottom: 0; }

.cite {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--panel-sunk);
  border: 1px solid var(--rule-soft);
  border-radius: var(--rad-sm);
  padding: 11px 13px;
  margin: 0 0 14px;
}

/* -------------------------------------------------------------------- stats
 *
 * The figures a view leads with. One row, hairline-separated, no boxes-in-boxes.
 */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  margin-bottom: var(--gap);
}
.stat {
  background: var(--panel);
  padding: 15px 16px 16px;
}
.stat-label {
  color: var(--ink-3);
  margin: 0 0 7px;
}
.stat-figure {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}
.stat-note {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: 6px 0 0;
}

.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 1080px) {
  .console { grid-template-columns: 1fr; }
  #map { height: 420px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------- verdict
 *
 * The day's answer, stated before the reader has to interpret anything. Judging is
 * asynchronous, so this band is the first ten seconds: a judge who reads one
 * sentence on this page should still leave with the argument. Set in the display
 * serif because it is a claim, with its figures in mono because they are evidence.
 */

/* The band shares the console's grid: the sentence sits over the map, the figures
 * sit over the trace panel. Left to itself the figure rail floated somewhere between
 * the two columns and the whole header read as two unrelated objects. */
.verdict {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--gap);
  margin: 0 0 var(--gap);
  padding: 26px var(--gap) 26px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FCFBF8 100%);
  border-bottom: 1px solid var(--rule);
}

.verdict-main { min-width: 0; }

.verdict-eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 9px;
}

.verdict-line {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.006em;
  color: var(--ink);
}

/* Figures inside a serif sentence: mono, so the grammar holds, but optically
 * sized down and weighted up so they sit on the serif line rather than on top
 * of it. */
.verdict-line .fig {
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
/* The emphasised clause is the buyer's number, so it is emphasised in the accent and
 * not in the flag colour, which on this page means heat. Colour only: a rule under a
 * serif this size is crossed by every descender in it. */
.verdict-line strong { font-weight: 400; color: var(--accent-ink); }
.verdict-line strong .fig { color: var(--accent-ink); }

.verdict-sub {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 78ch;
}
.verdict-sub .fig { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.verdict-sub strong { color: var(--ink-2); font-weight: 600; }

/* The three numbers the sentence is made of, pulled out so a judge who reads
 * nothing still sees the shape of the day. */
.verdict-figures {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  overflow: hidden;
  flex: none;
}

.vfig { background: var(--panel); padding: 14px 18px 15px; min-width: 0; }
.vfig-label {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
  white-space: nowrap;
}
.vfig-value {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}
.vfig-note {
  display: block;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--ink-3);
  margin-top: 7px;
}
.vfig.is-flag .vfig-value { color: var(--flag); }
.vfig.is-good .vfig-value { color: var(--accent); }

@media (max-width: 1080px) {
  .verdict { grid-template-columns: 1fr; gap: 20px; }
}

/* --------------------------------------------------------------- compare mode */

.compare-btn {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.compare-btn:hover { background: var(--accent-soft); border-color: #A9CBC9; color: var(--accent-ink); }
.compare-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }

.split-readout {
  display: flex;
  align-items: stretch;
  gap: 1px;
  margin: 0 14px 12px;
  background: var(--rule-soft);
  border: 1px solid var(--rule);
  border-radius: var(--rad);
  overflow: hidden;
}

.split-cell { flex: 1; padding: 9px 12px; background: var(--panel); min-width: 0; }
.split-cell.is-delta { flex: 0 0 auto; background: var(--panel-sunk); text-align: center; }

.split-cell .who {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-cell .figure {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
}

.split-cell .unit { font-size: 11px; color: var(--ink-3); }
.split-cell.is-hot .figure { color: var(--flag); }
.split-cell.is-cool .figure { color: var(--accent); }

/* ---------------------------------------------------------------- season strip
 *
 * A figure, not a row of blocks: a real percentage axis so the bars can be read
 * against a scale, and two encodings on the same bar. Height is how many doorsteps
 * needed something; colour is how badly. The two move apart on a mild day with a
 * few brutal doorsteps, and a chart that hid that would be flattering the product.
 */

.season-figure {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0 10px;
  padding: 26px 20px 0;
}

.season-ylab {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 210px;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--ink-3);
}
/* Optical: each label names the gridline it sits on, so it is nudged up half a
 * line rather than centred on its own box. */
.season-ylab span { transform: translateY(-5px); }

.season-plot {
  position: relative;
  height: 210px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--rule-soft) 0 1px,
    transparent 1px 52.5px);
}

/* Capped, so four archive days do not render as four slabs. The foot row carries
 * the identical sizing rule, which is what keeps the labels under their bars. */
.season-col {
  flex: 1 1 0;
  min-width: 34px;
  max-width: 132px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.season-pct {
  display: block;
  text-align: center;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

/* The strip is the panel's whole body, so it owns no padding of its own. */
.season-strip { display: block; }
.season-fill {
  display: block;
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
}
.season-col.is-now .season-fill { box-shadow: 0 0 0 2px var(--accent); }
.season-col.is-now .season-pct { color: var(--accent-ink); font-weight: 700; }

.season-xlab {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  padding-top: 10px;
}

.season-foot {
  flex: 1 1 0;
  min-width: 34px;
  max-width: 132px;
  text-align: center;
}
.season-day { display: block; font-size: 11.5px; color: var(--ink-2); }
.season-air {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.season-foot.is-now .season-day { color: var(--accent-ink); font-weight: 650; }

.season-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 18px 20px 18px;
  margin-top: 18px;
  border-top: 1px solid var(--rule-soft);
  background: var(--panel-sunk);
  font-size: 11.5px;
  color: var(--ink-2);
}
.season-key-item { display: inline-flex; align-items: center; gap: 8px; }
.season-key i { width: 15px; height: 10px; border-radius: 2px; flex: none; }
/* The height key is drawn tall and narrow rather than as a swatch: the thing it
 * names is an extent, not a colour, and a wide block would say the wrong thing. */
.season-key i.is-height { width: 6px; height: 14px; background: var(--ink-2); }
.season-key i.is-colour {
  background: linear-gradient(90deg, var(--heat-2), var(--heat-4));
}
.season-key i.is-now { background: transparent; box-shadow: 0 0 0 2px var(--accent); }

.season-note {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 16px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------ the tour
 *
 * Judging is asynchronous: nobody will be standing here to explain this screen.
 * The tour is the narration, made part of the product rather than the pitch.
 */

.tour-start {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 8px 13px 8px 11px;
  border: 1px solid var(--accent-lit);
  border-radius: var(--rad-sm);
  background: var(--accent-lit);
  color: #06282B;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 130ms ease;
}

.tour-start:hover { filter: brightness(1.08); }
.tour-start:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.tour-start-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #06282B;
  box-shadow: 0 0 0 0 rgba(6,40,43,0.8);
  animation: tour-pulse 2.4s ease-out infinite;
}

@keyframes tour-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(6,40,43,0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(6,40,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(6,40,43,0); }
}

@media (prefers-reduced-motion: reduce) {
  .tour-start-dot { animation: none; }
}

.tour-start-time {
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0.62;
  border-left: 1px solid rgba(6,40,43,0.28);
  padding-left: 7px;
}

/* A floor under the reservation `reserveForRail()` measures, so the last panel is
 * never behind the rail even in the frame before the observer fires. */
body.tour-on { padding-bottom: 168px; }

.tour-rail {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--chrome);
  color: var(--chrome-ink);
  border-top: 3px solid var(--accent-lit);
  box-shadow: 0 -10px 34px rgba(13,26,33,0.28);
}

.tour-rail-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 24px 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "progress progress" "body controls";
  gap: 10px 24px;
  align-items: center;
}

.tour-progress { grid-area: progress; display: flex; gap: 4px; }
.tour-progress i {
  flex: 1 1 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(230,237,240,0.16);
}
.tour-progress i.is-done { background: rgba(230,237,240,0.42); }
.tour-progress i.is-now  { background: var(--accent-lit); }

.tour-body { grid-area: body; min-width: 0; }

.tour-step {
  margin: 0;
  color: var(--accent-lit);
}

.tour-title {
  margin: 3px 0 4px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: #fff;
}
.tour-text  { margin: 0; font-size: 13.5px; line-height: 1.6; color: #AEC0CB; }
.tour-text .fig {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: #fff;
  font-weight: 600;
}
.tour-text strong { color: #fff; font-weight: 600; }

.tour-controls { grid-area: controls; display: flex; gap: 8px; align-items: center; }

.tour-btn {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--rad-sm);
  border: 1px solid var(--chrome-rule);
  background: transparent;
  color: var(--chrome-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms ease, filter 120ms ease;
}

.tour-btn:hover:not(:disabled) { background: rgba(230,237,240,0.1); }
.tour-btn:disabled { opacity: 0.32; cursor: default; }
.tour-btn.is-primary {
  background: var(--accent-lit);
  border-color: var(--accent-lit);
  color: #06282B;
  font-weight: 650;
}
.tour-btn.is-primary:hover { background: var(--accent-lit); filter: brightness(1.08); }
.tour-btn.is-quiet { border-color: transparent; color: var(--chrome-ink-2); }

/* The way out. On a first visit nobody asked for the tour, so leaving it has to be
 * as legible as continuing it: quiet enough not to compete with Next, solid enough
 * that a judge in a hurry never has to hunt for it. */
.tour-btn.is-skip { border-color: rgba(230,237,240,0.34); color: var(--chrome-ink); }

/* The spotlight: one ring, no dimming overlay. Dimming the page would hide the
 * data the narration is talking about, which is the opposite of the point. */
.tour-spot {
  position: relative;
  z-index: 41;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 8px rgba(13,90,95,0.14);
  border-radius: var(--rad);
  transition: box-shadow 160ms ease;
}

@media (max-width: 900px) {
  .tour-rail-inner { grid-template-columns: 1fr; grid-template-areas: "progress" "body" "controls"; }
  body.tour-on { padding-bottom: 240px; }
}

/* --------------------------------------------------- with and without LastYard
 *
 * Two failure axes, drawn rather than tabulated. An operator without address-level
 * information can pay for nothing or pay for everything, and those are different
 * failures - so every option is bar-charted against both. The argument is legible
 * from the shape of the two columns before a figure is read.
 */

.cf-grid { display: block; }

.cf-hrow,
.cf-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 26px;
  padding: 0 20px;
  align-items: start;
}

.cf-hrow {
  padding-top: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.cf-hlabel,
.cf-hcol {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cf-row {
  padding-top: 16px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--rule-soft);
}
.cf-row:last-of-type { border-bottom: 0; }
.cf-row.is-us {
  background: linear-gradient(90deg, var(--accent-soft) 0%, rgba(222,236,235,0.35) 100%);
  box-shadow: inset 3px 0 0 var(--accent);
}

.cf-name { min-width: 0; }

.cf-label {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 3px;
}
.cf-label em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  padding: 2px 7px;
  margin-left: 9px;
  vertical-align: 2px;
}
.cf-gloss { display: block; font-size: 12px; line-height: 1.5; color: var(--ink-3); }

.cf-metric { min-width: 0; }

.cf-bar {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: rgba(22,35,43,0.07);
  overflow: hidden;
  margin-bottom: 9px;
}
.cf-bar i { display: block; height: 100%; border-radius: 5px; }
.cf-bar.is-cost i { background: var(--ink-2); }
.cf-bar.is-risk i { background: var(--flag); }
.cf-row.is-us .cf-bar.is-cost i { background: var(--accent); }

.cf-figure {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.cf-figure.is-bad  { color: var(--flag); }
.cf-figure.is-good { color: var(--accent); }

.cf-sub {
  display: block;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-3);
  margin-top: 5px;
}

.cf-verdict {
  margin: 0;
  padding: 15px 20px;
  border-top: 1px solid var(--rule);
  background: var(--panel-sunk);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.cf-verdict b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}

.cf-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
  padding: 13px 20px 16px;
  border-top: 1px solid var(--rule-soft);
}

@media (max-width: 1000px) {
  .cf-hrow { display: none; }
  .cf-row { grid-template-columns: 1fr; gap: 14px; }
}

/* --------------------------------------------------------- the dispatch record */

.record-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.record-btn {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 9px 17px;
  border: 1px solid var(--rule);
  border-radius: var(--rad-sm);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.record-btn:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.record-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.record-btn.is-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.record-hint { font-size: 11.5px; color: var(--ink-3); }

.prov-tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--panel-sunk);
  color: var(--ink-2);
}

.prov-measured  { border-color: #A9CBC9; background: var(--accent-soft); color: var(--accent-ink); }
.prov-modelled  { border-color: #DFC489; background: #FBF3E2; color: #7A4A12; }
.prov-synthetic { border-color: #CBBEDB; background: #F2EEF7; color: #5C4A6E; }

.assumed-cell { color: var(--ink-3); font-style: italic; }
