/* HPU Remap — an atlas folio. Warm paper, ink, sepia for the campus as it is, cobalt for the proposal.
   System fonts only (no network): an old-style serif for display, a humanist sans for UI. */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: "Avenir Next", Avenir, Seravek, "Gill Sans Nova", "Gill Sans", "Segoe UI", "Noto Sans", "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --paper: #f2ede2;
  --paper-raised: #faf7f0;
  --paper-sunk: #e9e2d3;
  --ink: #1c2420;
  --ink-2: #47514b;
  --ink-3: #5c645d;
  --rule: #d8cebb;
  --rule-strong: #b3a68c;
  --current: #7a4a26;
  --current-tint: #efe1d2;
  --proposed: #2448b0;
  --proposed-tint: #dfe5f6;
  --alt: #6a3d8f;
  --alt-tint: #ebe1f2;
  --problem: #b8321f;
  --asset: #1d7049;
  --verified: #1d6a46;
  --likely: #7a5a10;
  --estimate: #5b5f72;
  --focus: #2448b0;
  --shadow: 0 1px 0 rgba(28, 36, 32, .06), 0 6px 22px -8px rgba(28, 36, 32, .35);
  --shadow-sm: 0 1px 2px rgba(28, 36, 32, .18);
  --radius: 10px;
  --panel-w: 404px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sheet-visible: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161a18; --paper-raised: #1d2220; --paper-sunk: #111412;
    --ink: #ece6d8; --ink-2: #c6bfb1; --ink-3: #a7a092; --rule: #303733; --rule-strong: #4a524d;
    --current: #e0a878; --current-tint: #3a2a1f; --proposed: #97adff; --proposed-tint: #1f2846;
    --alt: #cda3ee; --alt-tint: #2f2340; --problem: #ff8f78; --asset: #74d6a2;
    --verified: #7bd8a6; --likely: #e8c46a; --estimate: #b9bdd3; --focus: #97adff;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 26px -8px rgba(0, 0, 0, .7); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161a18; --paper-raised: #1d2220; --paper-sunk: #111412;
  --ink: #ece6d8; --ink-2: #c6bfb1; --ink-3: #a7a092; --rule: #303733; --rule-strong: #4a524d;
  --current: #e0a878; --current-tint: #3a2a1f; --proposed: #97adff; --proposed-tint: #1f2846;
  --alt: #cda3ee; --alt-tint: #2f2340; --problem: #ff8f78; --asset: #74d6a2;
  --verified: #7bd8a6; --likely: #e8c46a; --estimate: #b9bdd3; --focus: #97adff;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 26px -8px rgba(0, 0, 0, .7); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--sans); font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow: hidden; overscroll-behavior: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--proposed); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }
.ink-current { color: var(--current); font-weight: 600; }
.ink-proposed { color: var(--proposed); font-weight: 600; }
[hidden] { display: none !important; }

/* ---------------- layout ---------------- */
.app { display: grid; grid-template-columns: var(--panel-w) 1fr; height: 100dvh; }
.panel {
  position: relative; z-index: 5; display: flex; flex-direction: column; min-height: 0;
  background: var(--paper);
  border-right: 1px solid var(--rule-strong);
  box-shadow: 1px 0 0 var(--paper), 2px 0 0 var(--rule);
}
.stage { position: relative; overflow: hidden; background: #e8e2d5; min-width: 0; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#map.is-dragging { cursor: grabbing; }
#map:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
.crosshair { position: absolute; left: var(--focus-x, 50%); top: var(--focus-y, 50%); width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--ink); box-shadow: 0 0 0 1.5px rgba(251, 248, 241, .9); }
.crosshair::before { left: 12px; top: 0; width: 2px; height: 26px; }
.crosshair::after { top: 12px; left: 0; height: 2px; width: 26px; }
#map:focus-visible + .crosshair { opacity: .85; }

/* ---------------- brand ---------------- */
.sheet-grip { display: none; }
.brand { padding: 26px 28px 16px; border-bottom: 1px solid var(--rule); position: relative; }
.brand::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: 3px; border-bottom: 1px solid var(--rule); }
.brand-kicker { margin: 0 0 6px; font: 600 11px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.brand-title { margin: 0; font: 400 40px/1 var(--serif); letter-spacing: -.01em; }
.brand-title em { font-style: italic; color: var(--proposed); }
.brand-dek { margin: 10px 0 4px; font: 400 15px/1.45 var(--serif); color: var(--ink-2); max-width: 32ch; }

/* ---------------- tabs ---------------- */
.tabs { display: flex; gap: 2px; padding: 0 18px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role="tab"] {
  position: relative; flex: none; border: 0; background: none; padding: 14px 9px 12px;
  font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.tabs [role="tab"]::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs .count { display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 8px; background: var(--paper-sunk); font-size: 10px; letter-spacing: 0; color: var(--ink-2); }

.panes { position: relative; flex: 1; min-height: 0; }
.pane, .card { position: absolute; inset: 0; overflow-y: auto; padding: 18px 28px 40px; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
.pane:focus { outline: none; }
.pane-intro { margin: 2px 0 16px; font: 400 15px/1.5 var(--serif); color: var(--ink-2); }
.section-h { margin: 22px 0 8px; font: 600 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 10px; }
.section-h::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.empty { padding: 18px; border: 1px dashed var(--rule-strong); border-radius: var(--radius); color: var(--ink-2); font: italic 400 15px/1.5 var(--serif); text-align: center; }

/* ---------------- search ---------------- */
.search-field { position: relative; }
.search-icon { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
#search-input, .field-input {
  width: 100%; padding: 11px 40px 11px 38px; border: 1px solid var(--rule-strong); border-radius: 999px;
  background: var(--paper-raised); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
#search-input::placeholder, .field-input::placeholder { color: var(--ink-3); opacity: 1; }
#search-input:focus, .field-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
#search-input::-webkit-search-cancel-button { display: none; }
.search-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 3px 6px; }
#search-input:focus ~ .search-kbd { opacity: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.chip {
  border: 1px solid var(--rule-strong); background: transparent; border-radius: 999px; padding: 4px 11px;
  font: 500 13px/1.3 var(--sans); color: var(--ink-2); transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { opacity: .7; font-variant-numeric: tabular-nums; margin-left: 3px; }
.list-meta { margin: 10px 0 4px; font: 500 12px/1.3 var(--sans); color: var(--ink-3); letter-spacing: .02em; }

.place-list { list-style: none; margin: 0; padding: 0; }
.place-list li {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: baseline; gap: 12px;
  padding: 9px 10px; margin: 0 -10px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.place-list li:hover { background: var(--paper-sunk); }
.place-list li[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.place-list li[aria-selected="true"] .pl-cat { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.place-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--ink-3)); transform: translateY(-1px); }
.pl-name { font: 400 16px/1.3 var(--serif); }
.pl-name mark { background: none; color: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--proposed); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pl-alias { display: block; font: 400 12px/1.3 var(--sans); color: var(--ink-3); }
.pl-cat { font: 500 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.more-btn { margin: 12px auto 0; display: block; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule-strong); background: var(--paper-raised);
  border-radius: 999px; padding: 7px 14px; font: 600 13px/1.2 var(--sans); color: var(--ink); transition: border-color .15s, background .15s, transform .1s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.linkish { border: 0; background: none; padding: 0; color: var(--proposed); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }

/* ---------------- place card ---------------- */
.card { background: var(--paper); z-index: 2; animation: card-in .32s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.back { border: 0; background: none; padding: 4px 0; font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.back:hover { color: var(--ink); }
.close-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule-strong); background: transparent; display: grid; place-items: center; }
.close-x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.card-kicker { margin: 0; font: 600 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.card-kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cat, var(--ink-3)); }
.card h2 { margin: 6px 0 8px; font: 400 31px/1.1 var(--serif); letter-spacing: -.005em; }
.card .summary { font: 400 17px/1.5 var(--serif); color: var(--ink); margin: 0 0 12px; }
.card .desc { font: 400 15px/1.6 var(--serif); color: var(--ink-2); margin: 0 0 8px; }
.facts { list-style: none; padding: 0; margin: 0; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline; }
.facts .claim { font: 400 15px/1.45 var(--serif); }
.facts .src { grid-column: 2; font: 400 12px/1.3 var(--sans); color: var(--ink-3); overflow-wrap: anywhere; }
.badge {
  display: inline-block; padding: 2px 6px 1px; border-radius: 3px; border: 1px solid currentColor;
  font: 700 9.5px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.badge.VERIFIED { color: var(--verified); }
.badge.LIKELY { color: var(--likely); }
.badge.ESTIMATE { color: var(--estimate); border-style: dashed; }
.badge.solid { background: currentColor; }
.coords { font: 500 13px/1.5 var(--mono); color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sources { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.sources li { margin: 3px 0; overflow-wrap: anywhere; }
.change-links { list-style: none; padding: 0; margin: 0; }
.change-links li { margin: 6px 0; }
.change-link { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--rule); background: var(--proposed-tint); border-radius: 8px; padding: 9px 12px; font: 400 15px/1.3 var(--serif); }
.change-link:hover { border-color: var(--proposed); }

.num {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--proposed); color: #fff; font: 700 13px/1 var(--serif); font-variant-numeric: lining-nums;
}

/* ---------------- changes ---------------- */
.theme-h { margin: 24px 0 6px; font: italic 400 19px/1.2 var(--serif); color: var(--ink); text-transform: capitalize; }
.changes-list, .crit-list { list-style: none; margin: 0; padding: 0; }
.change {
  border: 1px solid var(--rule); border-radius: var(--radius); margin: 10px 0; background: var(--paper-raised); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.change.active { border-color: var(--proposed); box-shadow: 0 0 0 1px var(--proposed), var(--shadow); }
.change-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; width: 100%; text-align: left; border: 0; background: none; padding: 14px 14px 12px; }
.change-head h3 { margin: 2px 0 4px; font: 400 18px/1.25 var(--serif); }
.change-head p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.chev { width: 18px; height: 18px; margin-top: 4px; fill: none; stroke: var(--ink-3); stroke-width: 2; transition: transform .2s; }
.change[aria-expanded="true"] .chev, .change.open .chev { transform: rotate(180deg); }
.change-body { padding: 0 14px 14px 52px; font-size: 14px; color: var(--ink-2); }
.change-body h4 { margin: 14px 0 4px; font: 600 11px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.change-body p { margin: 0; line-height: 1.55; font-family: var(--serif); font-size: 15px; }
.metrics { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.metrics td, .metrics th { padding: 5px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 500; }
.metrics td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.arrow { color: var(--ink-3); padding: 0 4px; }

/* ---------------- critique ---------------- */
.filters { display: grid; gap: 10px; margin-bottom: 10px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-row .lab { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; min-width: 64px; }
.crit { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.crit:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.crit.active { background: linear-gradient(90deg, var(--paper-sunk), transparent); }
.crit-icon { width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; margin-top: 4px; }
.crit-icon span { transform: rotate(45deg); color: #fff; font: 700 13px/1 var(--sans); }
.crit-icon.problem { background: var(--problem); }
.crit-icon.asset { background: var(--asset); }
.crit h3 { margin: 0 0 3px; font: 400 17px/1.3 var(--serif); }
.crit-meta { display: flex; gap: 10px; align-items: center; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.sev { display: inline-flex; gap: 3px; }
.sev i { width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); }
.sev i.on { background: var(--problem); }
.crit p { margin: 0; font: 400 15px/1.5 var(--serif); color: var(--ink-2); }
.fixed-by { margin-top: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink-3); }

/* ---------------- scorecard ---------------- */
.score { width: 100%; border-collapse: collapse; }
.score caption { text-align: left; font: 400 15px/1.5 var(--serif); color: var(--ink-2); padding-bottom: 10px; }
.score-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 6px; font: 600 12px/1 var(--sans); color: var(--ink-2); }
.score-legend span { display: inline-flex; align-items: center; gap: 6px; }
.score-legend i { width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
.ind { border-top: 1px solid var(--rule-strong); }
.ind > td { padding: 14px 0 12px; }
.ind-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.ind-name { font: 400 17px/1.3 var(--serif); margin: 0; }
.ind-sub { font: 500 12px/1.3 var(--sans); color: var(--ink-3); margin-top: 3px; }
.info-btn { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1px solid var(--rule-strong); background: none; font: italic 700 12px/1 var(--serif); color: var(--ink-2); }
.bars { display: grid; grid-template-columns: 76px 1fr 64px; gap: 5px 10px; align-items: center; font: 500 12px/1 var(--sans); }
.bars .lbl { color: var(--ink-2); }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.bar { position: relative; height: 10px; background: var(--paper-sunk); border-radius: 2px; }
.bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; transform-origin: left; animation: grow .7s var(--ease) both; }
.bar .tgt { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dotted var(--ink); }
@keyframes grow { from { transform: scaleX(0); } }
.b-current { background: var(--current); }
.b-proposed { background: var(--proposed); }
.b-alt { background: var(--alt); }
.delta { margin-top: 8px; font: 600 12.5px/1.3 var(--sans); }
.delta.better { color: var(--verified); }
.delta.worse { color: var(--problem); }
.delta.same { color: var(--ink-3); }

/* ---------------- routes ---------------- */
.route-form { display: grid; gap: 10px; }
.route-field { position: relative; }
.route-field label { display: block; font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 6px 2px; }
.route-field .row { display: flex; gap: 6px; align-items: center; }
.route-field .field-input { padding-left: 38px; padding-right: 14px; }
.route-field .pin-ab { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 11px/20px var(--sans); text-align: center; }
.route-field .input-wrap { position: relative; flex: 1; }
.pick-btn { flex: none; }
.pick-btn[aria-pressed="true"] { background: var(--proposed); border-color: var(--proposed); color: #fff; }
.suggest { position: absolute; z-index: 4; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 4px; background: var(--paper-raised); border: 1px solid var(--rule-strong); border-radius: 10px; box-shadow: var(--shadow); max-height: 240px; overflow: auto; }
.suggest li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font: 400 15px/1.3 var(--serif); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--paper-sunk); }
.route-results { display: grid; gap: 10px; margin-top: 18px; }
.rcard { border: 1px solid var(--rule); border-left: 4px solid var(--c); border-radius: 8px; padding: 12px 14px; background: var(--paper-raised); }
.rcard h3 { margin: 0 0 8px; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.rstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rstats div { display: grid; gap: 2px; }
.rstats dt { font: 500 11px/1.2 var(--sans); color: var(--ink-3); }
.rstats dd { margin: 0; font: 400 20px/1.1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.rdiff { padding: 10px 14px; border-radius: 8px; background: var(--paper-sunk); font: 500 14px/1.45 var(--sans); }

/* ---------------- about ---------------- */
.about h3 { margin: 22px 0 6px; font: italic 400 19px/1.25 var(--serif); }
.about p, .about li { font: 400 15px/1.6 var(--serif); color: var(--ink-2); }
.about ul { padding-left: 18px; }
.disclaimer { border: 1px solid var(--rule-strong); border-left: 4px solid var(--ink); padding: 12px 14px; border-radius: 6px; background: var(--paper-raised); }
.disclaimer p { margin: 0; color: var(--ink); }

/* ---------------- stage chrome ---------------- */
.modebar {
  position: absolute; z-index: 4; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 120px);
}
.segmented, .mini-seg, .peek, .compare-opts, .tools, .layers-pop, .legend, .status, .credit {
  background: color-mix(in srgb, var(--paper-raised) 94%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.segmented { display: flex; padding: 4px; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.segmented [role="radio"] {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; border-radius: 999px; padding: 8px 14px;
  font: 600 13.5px/1 var(--sans); color: var(--ink-2); transition: background .2s, color .2s;
}
.segmented [role="radio"]:hover { color: var(--ink); background: var(--paper-sunk); }
.segmented [role="radio"][aria-checked="true"] { background: var(--ink); color: var(--paper); }
.swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px var(--paper-raised); }
.sw-current { background: #7a4a26; }
.sw-proposed { background: #2448b0; }
.sw-compare { background: linear-gradient(90deg, #7a4a26 50%, #2448b0 50%); }
.sw-alt { background: repeating-linear-gradient(45deg, #6a3d8f 0 2px, #cdb5e0 2px 4px); }
.compare-opts { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.mini-seg { display: flex; border-radius: 999px; background: none; backdrop-filter: none; }
.mini-seg [role="radio"] { border: 0; background: none; padding: 6px 11px; border-radius: 999px; font: 600 12.5px/1 var(--sans); color: var(--ink-2); }
.mini-seg [role="radio"][aria-checked="true"] { background: var(--paper-sunk); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.fade-ctl { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--sans); padding-right: 8px; }
.fade-ctl input { width: 120px; accent-color: var(--proposed); }
.peek {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule); border-radius: 999px; padding: 9px 14px;
  font: 600 13px/1 var(--sans); color: var(--ink); box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; touch-action: none;
}
.peek svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.peek[aria-pressed="true"], .peek:active { background: var(--ink); color: var(--paper); }

.alt-ribbon {
  position: absolute; z-index: 3; top: 70px; left: 50%; transform: translateX(-50%);
  padding: 8px 18px; border-radius: 4px; color: #fff; font: 500 13.5px/1.3 var(--sans); white-space: nowrap; box-shadow: var(--shadow);
  background: repeating-linear-gradient(-45deg, #6a3d8f 0 10px, #5e3580 10px 20px);
  animation: drop .4s var(--ease);
}
.alt-ribbon strong { letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }
.app[data-mode="alt"] .stage { box-shadow: inset 0 0 0 4px #6a3d8f; }
.app[data-mode="alt"] .stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 4px #6a3d8f; z-index: 3; }

.swipe { position: absolute; inset: 0; z-index: 2; pointer-events: none; --split: 50%; }
.swipe-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 3px; margin-left: -1.5px; background: var(--paper-raised); box-shadow: 0 0 0 1px rgba(28, 36, 32, .35), 0 0 14px rgba(0, 0, 0, .25); pointer-events: auto; cursor: ew-resize; }
.swipe-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: -12px; right: -12px; }
.swipe-handle {
  position: absolute; top: 50%; left: var(--split); width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: var(--paper-raised); border: 1px solid var(--rule-strong); box-shadow: var(--shadow); display: grid; place-items: center;
  pointer-events: auto; cursor: ew-resize; touch-action: none; transition: transform .15s var(--ease);
}
.swipe-handle:hover, .swipe-handle.dragging { transform: scale(1.08); }
.swipe-handle svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.swipe-tag {
  position: absolute; top: 70px; padding: 5px 10px; border-radius: 3px; color: #fff; font: 700 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  box-shadow: var(--shadow-sm); white-space: nowrap; transition: opacity .2s;
}
.tag-left { right: calc(100% - var(--split) + 14px); background: #7a4a26; }
.tag-right { left: calc(var(--split) + 14px); background: #2448b0; }
.tag-right.alt { background: #6a3d8f; }

.peek-flag {
  position: absolute; z-index: 3; left: 50%; bottom: calc(var(--sheet-visible) + 74px); transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  padding: 8px 16px; border-radius: 999px; color: #fff; font: 700 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; box-shadow: var(--shadow);
  transition: opacity .15s, transform .2s var(--ease);
}
.peek-flag.on { opacity: 1; transform: translate(-50%, 0); }

.tools { position: absolute; z-index: 4; right: 14px; top: 14px; display: grid; gap: 2px; padding: 4px; border-radius: 14px; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.tool { width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; display: grid; place-items: center; color: var(--ink); }
.tool:hover, .tool[aria-expanded="true"] { background: var(--paper-sunk); }
.tool svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool svg .fill { fill: currentColor; stroke: none; }
.tool-sep { height: 1px; background: var(--rule); margin: 3px 6px; }

.layers-pop { position: absolute; z-index: 6; right: 64px; top: 14px; width: 250px; max-height: calc(100% - 170px); overflow: auto; padding: 14px 16px 10px; border-radius: 14px; border: 1px solid var(--rule); box-shadow: var(--shadow); animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateX(6px) scale(.98); } }
.layers-pop h2 { margin: 0 0 8px; font: 600 11px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); font: 500 14px/1.2 var(--sans); cursor: pointer; }
.switch:first-child { border-top: 0; }
.switch small { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 500; margin-top: 2px; }
.switch input { appearance: none; -webkit-appearance: none; flex: none; width: 36px; height: 21px; border-radius: 999px; background: var(--rule-strong); position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { transform: translateX(15px); }
.switch input:disabled { opacity: .4; }
.switch input:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.shuttle-key { margin: 0 0 8px; color: var(--ink-3); font: 500 12px/1.35 var(--sans); }
.shuttle-key summary { cursor: pointer; }
.shuttle-key ul { list-style: none; margin: 7px 0; padding: 0; }
.shuttle-key li { display: flex; align-items: center; gap: 8px; margin-block: 4px; }
.shuttle-key p { margin: 4px 0; }
.shuttle-key-swatch { display: inline-block; min-width: 18px; }
.shuttle-key-swatch.line, .shuttle-key-swatch.combo { border-top: 3px dashed var(--shuttle-color); }
.shuttle-key-swatch.combo { border-top-style: dotted; }
.shuttle-key-swatch.stop::before, .shuttle-key-swatch.event::before { content: ''; display: block; width: 9px; height: 9px; margin: 0 auto; background: var(--shuttle-color); }
.shuttle-key-swatch.stop::before { border-radius: 50%; }
.shuttle-key-swatch.event::before { transform: rotate(45deg); }

.legend { position: absolute; z-index: 3; left: 14px; bottom: calc(var(--sheet-visible) + 14px); display: flex; align-items: flex-end; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 10px; border: 1px solid var(--rule); box-shadow: var(--shadow-sm); pointer-events: none; }
.north { width: 24px; height: 31px; }
.north .n-dark { fill: var(--ink); }
.north .n-light { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.north text { font: 700 12px var(--serif); fill: var(--ink); text-anchor: middle; }
.scalebar { width: 120px; }
.sb-bar { display: flex; height: 6px; border: 1.2px solid var(--ink); width: var(--sb-w, 100px); }
.sb-bar span { flex: 1; }
.sb-bar span:first-child { background: var(--ink); }
.sb-labels { position: relative; display: flex; justify-content: space-between; width: var(--sb-w, 100px); margin-top: 3px; font: 600 10.5px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.sb-labels span:nth-child(2) { position: absolute; left: 50%; transform: translateX(-50%); }
.sb-labels span:last-child { transform: translateX(40%); white-space: nowrap; }

.status { position: absolute; z-index: 3; right: 14px; bottom: calc(var(--sheet-visible) + 40px); display: flex; gap: 8px; align-items: center; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--rule); font: 600 11.5px/1 var(--sans); color: var(--ink-2); opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; pointer-events: none; }
.status.on { opacity: 1; transform: none; transition-delay: .25s; }
.spinner { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.credit { position: absolute; z-index: 3; right: 14px; bottom: calc(var(--sheet-visible) + 12px); margin: 0; padding: 4px 9px; border-radius: 6px; font: 500 11px/1.2 var(--sans); color: var(--ink-2); }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 13.5px/1.2 var(--sans); box-shadow: var(--shadow); transition: opacity .2s, transform .25s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.tooltip { position: fixed; z-index: 60; max-width: 300px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 400 13px/1.45 var(--sans); box-shadow: var(--shadow); pointer-events: none; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; font: 400 20px var(--serif); background: var(--paper); }

/* boot */
.app[data-booting] { visibility: hidden; }
#boot-message { position: fixed; inset: 44% 12px auto; margin: 0; text-align: center; color: var(--ink); font: 500 16px var(--sans); }
.app[data-booting] .panel > *:not(.sheet-grip) { opacity: 0; }
.panel > * { transition: opacity .5s var(--ease); }
.app:not([data-booting]) .brand { animation: rise .7s var(--ease) both; }
.app:not([data-booting]) .tabs { animation: rise .7s .08s var(--ease) both; }
.app:not([data-booting]) .panes { animation: rise .7s .16s var(--ease) both; }
.app:not([data-booting]) .modebar { animation: rise .6s .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.app:not([data-booting]) .modebar { animation-name: rise-c; }
@keyframes rise-c { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ---------------- mid widths ---------------- */
@media (max-width: 1100px) {
  :root { --panel-w: 360px; }
  .segmented [role="radio"] { padding: 8px 11px; }
  .peek span { display: none; }
  .peek { padding: 9px 11px; }
}

/* ---------------- phones: bottom sheet ---------------- */
@media (max-width: 760px) {
  .app { display: block; }
  .stage { position: fixed; inset: 0; }
  .panel {
    position: fixed; left: 0; right: 0; bottom: 0; height: 92dvh; z-index: 8;
    border: 0; border-top: 1px solid var(--rule-strong); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .35);
    transform: translateY(calc(92dvh - var(--sheet-h, 150px))); transition: transform .35s var(--ease); will-change: transform;
  }
  .panel.dragging { transition: none; }
  .sheet-grip { display: flex; justify-content: center; align-items: center; width: 100%; height: 26px; border: 0; background: none; flex: none; cursor: grab; touch-action: none; }
  .sheet-grip span { width: 42px; height: 5px; border-radius: 3px; background: var(--rule-strong); }
  .brand { padding: 0 18px 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .brand::after { display: none; }
  .brand-kicker { order: 2; margin: 0; font-size: 10px; }
  .brand-title { font-size: 26px; }
  .brand-dek { display: none; }
  .tabs { padding: 0 8px; }
  .tabs [role="tab"] { padding: 12px 8px 11px; font-size: 11.5px; }
  .pane, .card { padding: 14px 18px calc(40px + env(safe-area-inset-bottom)); }
  .modebar { top: 10px; left: 10px; right: 10px; transform: none; max-width: none; justify-content: flex-start; flex-wrap: nowrap; gap: 6px; }
  .app:not([data-booting]) .modebar { animation-name: rise; }
  .segmented { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented [role="radio"] { padding: 8px 9px; font-size: 12.5px; gap: 5px; flex: 1; justify-content: center; }
  .segmented .swatch { display: none; }
  .peek { padding: 8px 10px; }
  .compare-opts { position: absolute; top: 48px; left: 0; }
  .fade-ctl input { width: 90px; }
  .tools { top: 104px; right: 10px; }
  .layers-pop { right: 60px; top: 104px; width: min(250px, calc(100vw - 80px)); }
  .alt-ribbon { top: 56px; font-size: 12px; white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 80px); left: 10px; transform: none; }
  .swipe-tag { top: 104px; }
  .legend { left: 10px; bottom: calc(var(--sheet-visible) + 10px); padding: 6px 10px 6px 6px; }
  .credit { display: none; }
  .status { right: 10px; bottom: calc(var(--sheet-visible) + 12px); }
  .toast { bottom: calc(var(--sheet-visible) + 16px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .segmented [role="radio"][aria-checked="true"] { outline: 2px solid CanvasText; }
}
@media (min-width:761px) {
  .modebar { width:max-content; }
  .brand { padding-top:32px; padding-bottom:22px; }
  .brand-title { font-size:clamp(43px,3.8vw,61px); letter-spacing:-.045em; }
  .brand-dek { max-width:33ch; font-size:16px; }
  .tabs { flex-wrap:wrap; padding:3px 17px; gap:0; }
  .tabs [role="tab"] { padding:10px 7px; font-size:12px; }
}
.swipe-handle,.swipe-line { touch-action:none; }
.proposal-link { display:flex; width:100%; align-items:center; justify-content:space-between; text-align:left; padding:14px 18px; margin:0 0 19px; background:#233e35; color:#fff8df; border:1px solid #233e35; border-radius:7px; box-shadow:inset 0 0 0 3px #233e35,inset 0 0 0 4px #64776a; }
.proposal-link small { display:block; font:600 10px/1.5 var(--sans); text-transform:uppercase; letter-spacing:.15em; color:#ded9b6; }
.proposal-link strong { display:block; font:400 27px/1.13 var(--serif); }
.proposal-arrow { display:grid; place-items:center; width:31px; height:31px; border-radius:50%; border:1px solid #829483; font:500 21px/1 var(--sans); }
.proposal-link:hover { background:#345241; }
.peek-flag { background:var(--ink); color:var(--paper); }
@media (min-width:761px) { .tabs { display:grid; grid-template-columns:repeat(3,1fr); padding:2px 19px; } .tabs [role="tab"] { padding:9px 4px; } }
@media (max-width:760px) { .proposal-link { margin:12px 0; } #pane-explore { display:flex; flex-direction:column; } #pane-explore .search { order:-1; } }
.ribbon-button { padding:2px 4px; margin-left:8px; background:transparent; color:white; border:0; border-bottom:1px solid #baabc9; font:inherit; }
.category-filter { margin:10px 0; border-bottom:1px solid var(--rule); padding-bottom:10px; }
.category-filter summary { cursor:pointer; width:max-content; color:var(--ink-2); font:600 13px/1.5 var(--sans); }
.category-filter summary span { font-weight:400; }
.swipe-handle { top:calc((100% - var(--sheet-visible)) * .72); }
@media (max-width:760px) {
  .tabs { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:0; padding:0 5px; }
  .tabs [role="tab"] { font-size:clamp(11px,3vw,13px); font-weight:600; padding:10px 1px; letter-spacing:0; text-transform:none; }
}
@media (max-width:390px) {
  .segmented [role="radio"] { padding:9px 4px; font-size:12px; }
  .modebar { gap:4px; left:6px; right:6px; }
  .peek { padding:8px; }
}
@media (min-width:761px) and (max-width:1050px) {
  .modebar { top:12px; width:calc(100% - 16px); max-width:none; gap:5px; }
  .modebar .segmented [role="radio"] { padding:8px 7px; font-size:12px; }
  .modebar .swatch { display:none; }
  .tools,.layers-pop { top:145px; }
  .alt-ribbon { top:95px; }
}
@media (max-width:390px) {
  .compare-opts { max-width:100%; gap:4px; padding:3px; }
  .mini-seg [role="radio"] { padding:6px 7px; }
  .fade-ctl { gap:4px; padding-right:3px; font-size:11px; }
  .fade-ctl input { width:clamp(45px,16vw,62px); min-width:0; }
}
@media (min-width:761px) and (max-width:1050px) {
  .swipe-tag { top:108px; }
  .credit { max-width:calc(100% - 220px); text-align:right; }
}

/* Plan selection and corresponding locations */
#plan-description { display:block; max-width:38ch; margin-top:7px; color:#f4efde; font:400 13px/1.4 var(--sans); }
[data-mode="alt"] .proposal-link { background:#493856; border-color:#493856; box-shadow:inset 0 0 0 3px #493856,inset 0 0 0 4px #82748b; }
.location-compare { border-block:1px solid var(--rule); padding:12px 0; margin-block:12px; }
.location-compare strong { font:600 15px/1.3 var(--sans); }
.location-compare p { margin:3px 0 9px; font:500 13px/1.5 var(--sans); }
.location-compare .btn-row { margin:6px 0 0; flex-wrap:wrap; }
#compare-plan { max-width:165px; border:0; border-right:1px solid var(--rule); background:transparent; font:600 12px var(--sans); }
.modebar { width:max-content; }
.segmented [role=radio] { white-space:nowrap; }
@media (min-width:761px) { .compare-opts { order:3; } }
@media (min-width:761px) and (max-width:1199px) { .modebar { max-width:calc(100% - 18px); } .peek span { display:none; } }
@media (max-width:760px) {
  .modebar { width:auto; }
  .segmented [role=radio] { white-space:normal; line-height:1.1; padding:7px 5px; }
  .peek span,.fade-ctl span { display:none; }
  .compare-opts { max-width:100%; }
  #compare-plan { max-width:130px; }
  .brand-kicker { letter-spacing:.08em; }
}
.routine { padding:10px 0; border-bottom:1px solid var(--rule); }
.routine summary { font:600 14px/1.4 var(--sans); cursor:pointer; }
.routine p { font:400 13px/1.5 var(--sans); margin:8px 0; color:var(--ink-2); }
.routine table { font-size:12px; }
.routine thead th { font-size:10px; text-align:right; }
.routine th:first-child { text-align:left; width:38%; }
@media (max-width:760px) {
  .panel { height:var(--sheet-h,146px); transform:none; transition:height .28s var(--ease); will-change:auto; }
  #pane-explore > * { flex-shrink:0; }
  #pane-explore:has(#search-input:not(:placeholder-shown)) .proposal-link { display:none; }
}
.swipe-tag { top:var(--compare-tags-y,114px); font-size:10px; letter-spacing:.07em; padding:6px 8px; }
.tag-left { left:8px; right:auto; }
.tag-right { left:auto; right:8px; }
[data-mode="compare"] .tools,[data-mode="compare"] .layers-pop { top:calc(var(--compare-tags-y,114px) + 37px); }
@media (max-width:760px) {
  .compare-opts { top:calc(100% + 6px); }
  .swipe-tag { font-size:10px; letter-spacing:.035em; }
}
@media (max-width:760px) {
  #compare-plan { width:145px; max-width:145px; font-size:11px; }
  .fade-ctl { padding-right:2px; }
}
@media (max-width:350px) { .fade-ctl input { width:42px; } }
