/* DumpSpot · app.css. Consumes tokens.css only. Structure follows DESIGN.md:
   1 base · 2 type roles · 3 primitives · 4 shell · 5 pages · 6 responsive */

/* 1 ─ Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 var(--body)/var(--body-lh) var(--font); font-family: var(--font);
  background: var(--ground); color: var(--text); min-height: 100dvh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; font-family: inherit; }
button { background: none; border: 0; cursor: pointer; border-radius: 0; text-align: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ol, ul { list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--mark); color: var(--text); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ph-duotone { font-size: 1.15em; line-height: 1; flex: none; }

/* 2 ─ Type roles (DESIGN.md §5). Every text element maps to exactly one. ── */
.t-display, .story-h, .page-h, .city-h {
  font-family: var(--font-display); font-size: var(--display); line-height: var(--display-lh); font-weight: 400;
  letter-spacing: -0.015em; text-wrap: balance;
}
.t-title, .story-sec h2, .story-cta h2, .dr-title, .step-h h2, .st-h, .lg-h, .me-name, .gd-label b, .cr-h, .rp-done h1, .step-card h2 {
  font-family: var(--font-display); font-size: var(--title); line-height: var(--title-lh); font-weight: 400;
  letter-spacing: -0.01em; text-wrap: balance;
}
.t-figure, .stat-v, .gd-line b, .dr-tree-n, .pv-big, .me-ring-in b, .tour-n, .st-opts-2 .st-opt {
  font-size: var(--title); line-height: var(--title-lh); font-weight: 400; font-family: var(--font-mono); letter-spacing: -0.02em;
}
.t-small, .small, .muted, .story-meta, .sec-dek, .fig-cap, .story-src, .tip-m, .ly-note, .ly-t small, .lrow-a, .lrow-by, .lrow-time,
.city-res-sub, .loc-item small, .dr-meta, .dr-notes, .menu a small, .status, .toast, .gd-empty p, .city-sub, .w-last, .gr-t, .opt,
.pin-codes, .pin-hint, .pv-parts, .pv-lvl, .me-lvl, .rules td, .lvl, .badge, .cat-dot, .drop small, .st-rq, .expl-row, .lk-ends, .city-foot, .city-meta {
  font-size: var(--small); line-height: var(--small-lh);
}
.t-label, .label, .kicker, .tab, .seg button, .sign, .plate-btn, .stat-l, .field label, .field > span, .lbl, th, .tag, .shield, .stage,
.badge-pill, kbd, .gd-toggles button, .city-locate, .tl-axis, .fig-key, .dr-id, .gr-l, .gr-i, .w-n, .bar-n, .step-n,
.menu-keys, .tl-range, .city-res-n, .lrow-i, .hud span, .anno span, .req {
  font-size: var(--label); line-height: var(--label-lh); font-weight: 400; font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: var(--label-track);
}
.mono, .dr-codes .mono, .dossier-coord { font-family: var(--font-mono); }
.muted { color: var(--text-3); }
.lede, .story-dek, .city-sub { color: var(--text-2); }
.lede, .story-dek { font-size: var(--body); line-height: var(--body-lh); max-width: var(--measure); }
.kicker { color: var(--rust); }
.label { color: var(--text-2); }
.label small { font-family: var(--font); text-transform: none; letter-spacing: 0; color: var(--text-3); margin-left: var(--sp-2); font-weight: 400; }
.leaf { color: var(--moss); }
.center { text-align: center; }
.pad { padding: var(--sp-4); }
mark, .mark, .page-h em, .story-h em { background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); font-style: normal; color: inherit; }

/* 3 ─ Primitives (DESIGN.md §8) ─────────────────────────────────────── */
.sign, .plate-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: var(--control); padding: 0 var(--sp-4); text-decoration: none; white-space: nowrap;
  transition: background var(--fast), color var(--fast);
}
.sign { background: var(--action); color: var(--sheet); }
.sign:hover { background: var(--action-hover); }
/* Report a spot: the only glossy object on the site, like a sticker on a blueprint (img5). */
.sign-report {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; border: 1px solid var(--pink-deep);
  background: linear-gradient(180deg, var(--pink-light) 0%, var(--pink) 46%, var(--pink-deep) 54%, var(--pink) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -2px 0 rgba(120, 0, 50, 0.25), 0 1px 0 rgba(19, 32, 42, 0.35);
  text-shadow: 0 1px 0 rgba(120, 0, 50, 0.45); font-weight: 700;
}
.sign-report::after {
  content: ""; position: absolute; inset: 0 auto 0 -60%; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-20deg);
  transition: left 600ms var(--ease);
}
.sign-report:hover { background: linear-gradient(180deg, #ff9ccb 0%, #ff4396 46%, #e01574 54%, #ff4396 100%); color: #fff; }
.sign-report:hover::after { left: 120%; }
.sign-report:active { box-shadow: inset 0 2px 4px rgba(120, 0, 50, 0.45); transform: translateY(1px); }
.sign:disabled { opacity: 0.45; pointer-events: none; }
.sign-xl { width: 100%; }
.plate-btn { border: var(--structure); color: var(--text); }
.plate-btn:hover { background: var(--mark); }
.icon-plate {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-width: var(--control-sm); height: var(--control-sm); padding: 0 var(--sp-2);
  background: var(--surface); border: var(--structure); color: var(--text); text-decoration: none;
  font-size: var(--label); font-family: var(--font-mono); text-transform: uppercase; transition: background var(--fast);
}
.icon-plate .ph-duotone { font-size: 15px; }
.icon-plate:hover { background: var(--mark); }
.icon-plate.on { background: var(--soot); color: var(--lichen); }
.link-btn, .plate-link { color: var(--action); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-size: var(--small); }
.link-btn:hover, .plate-link:hover { color: var(--soot); }
.plate { background: var(--surface); border: var(--structure); }
.seg { position: relative; display: inline-flex; border: var(--structure); background: var(--surface); }
.seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--sp-2); height: var(--control-sm); padding: 0 var(--sp-3); color: var(--text-2); white-space: nowrap; transition: color var(--fast); }
.seg button + button { border-left: var(--hairline); }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--lichen); }
.seg-thumb { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--soot); transition: transform var(--med) var(--ease), width var(--med) var(--ease); }
.tag { display: inline-flex; align-items: center; padding: 2px var(--sp-1); background: var(--mark); color: var(--text); white-space: nowrap; }
.shield { display: inline-flex; color: var(--text-3); white-space: nowrap; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-2); padding-bottom: var(--sp-2); border-bottom: var(--hairline); }
.stat { display: flex; flex-direction: column; gap: var(--sp-1); }
.stat-l { color: var(--text-3); order: -1; }
.stat-leaf .stat-v { color: var(--moss); }
.stat-u { font-size: var(--small); color: var(--text-3); }
.dot { display: inline-block; width: 10px; height: 10px; flex: none; }
.status, .gd-empty, .toast { background: var(--surface); border: var(--structure); }
.status { position: fixed; left: var(--gutter); bottom: var(--gutter); z-index: 45; display: flex; gap: var(--sp-3); align-items: flex-start; max-width: 420px; padding: var(--sp-3) var(--sp-4); }
.status::before, .gd-empty::before { content: ""; width: 10px; height: 10px; background: var(--rust); flex: none; margin-top: 5px; }
.status .ph-duotone { display: none; }
body[data-view="map"] .status, body[data-view="garden"] .status, body[data-view="study"] .status { display: none; }
input[type="text"], input:not([type]), textarea, select {
  width: 100%; height: 40px; padding: 0 var(--sp-3); background: var(--surface); border: 1px solid var(--stone); border-radius: 0; outline: 0; font-size: var(--body);
  transition: border-color var(--fast);
}
textarea { height: auto; padding: var(--sp-2) var(--sp-3); resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--soot); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label, .field > span, .lbl { color: var(--text-2); }
.lbl { display: block; margin: var(--sp-5) 0 var(--sp-3); }
.req { color: var(--action); margin-left: var(--sp-2); }
.opt { color: var(--text-3); margin-left: var(--sp-2); }
.r2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }
kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 var(--sp-1); border: var(--hairline); color: var(--text); margin-left: var(--sp-2); }

/* 4 ─ Shell ────────────────────────────────────────────────────────── */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--bar); display: flex; align-items: center; gap: var(--sp-4); padding: 0 var(--gutter); background: var(--surface); border-bottom: var(--structure); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: var(--text); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-word { font-family: var(--font-display); font-size: 22px; line-height: 1; font-weight: 400; letter-spacing: -0.01em; }
.city-btn { display: inline-flex; align-items: center; gap: var(--sp-2); height: var(--control-sm); padding: 0 var(--sp-3); border: var(--hairline); font-size: var(--small); max-width: 220px; transition: border-color var(--fast); }
.city-btn::before { content: ""; width: 8px; height: 8px; background: var(--action); flex: none; }
.city-btn #city-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-btn .ph-duotone { font-size: 11px; color: var(--text-3); }
.city-btn:hover { border-color: var(--soot); }
.tabs { position: relative; display: flex; gap: var(--sp-5); margin: 0 auto; height: 100%; }
.tab { display: inline-flex; align-items: center; height: 100%; color: var(--text-3); transition: color var(--fast); }
.tab:hover, .tab.on { color: var(--text); }
.tab-ink { position: absolute; bottom: -1px; left: 0; height: 2px; background: var(--soot); transition: transform var(--med) var(--ease), width var(--med) var(--ease); }
.bar-right { display: flex; align-items: center; gap: var(--sp-2); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + var(--sp-2)); width: 300px; background: var(--surface); border: var(--structure); opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity var(--med), transform var(--med) var(--ease); }
.menu.open { opacity: 1; pointer-events: auto; transform: none; }
.menu a { display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); text-decoration: none; border-bottom: var(--hairline); }
.menu a .ph-duotone { font-size: 18px; margin-top: 2px; }
.menu a b { display: block; font-weight: 700; }
.menu a small { color: var(--text-3); }
.menu a:hover { background: var(--ground); }
.menu-keys { padding: var(--sp-3) var(--sp-4); color: var(--text-3); line-height: 2; }
.toasts { position: fixed; left: 50%; bottom: var(--sp-5); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; pointer-events: none; width: min(520px, calc(100% - 32px)); }
.toast { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); opacity: 0; transform: translateY(6px); transition: all var(--med) var(--ease); pointer-events: auto; }
.toast.in { opacity: 1; transform: none; }
.toast-dot { width: 10px; height: 10px; background: var(--moss); flex: none; }
.toast-err .toast-dot { background: var(--rust); }
main { padding-top: var(--bar); }
.view { display: none; }
.view.on { display: block; animation: fade var(--med) var(--ease); }
@keyframes fade { from { opacity: 0; } }
.page { max-width: var(--page); margin: 0 auto; padding: var(--sp-8) var(--gutter); }
.page-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding-bottom: var(--sp-5); margin-bottom: var(--sp-6); border-bottom: var(--structure); }

/* 5 ─ Pages ────────────────────────────────────────────────────────── */

/* City picker */
.city { position: fixed; inset: 0; z-index: 100; display: none; background: var(--ground); }
.city.on { display: block; animation: fade var(--med) var(--ease); }
.city.leaving { animation: fadeout 0.5s var(--ease) forwards; }
@keyframes fadeout { to { opacity: 0; } }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.city-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: var(--sp-5) var(--sp-7); pointer-events: none; }
.city-inner > * { pointer-events: auto; }
.city-top, .city-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); }
.city-meta b { font-weight: 700; color: var(--text); font-family: var(--font-mono); }
.city-meta.off::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--rust); margin-right: var(--sp-2); }
.city-main { max-width: 480px; transition: opacity var(--med); }
.city.diving .city-main { opacity: 0; }
.city-sub { margin: var(--sp-3) 0 var(--sp-5); }
.city-search { position: relative; display: flex; align-items: center; gap: var(--sp-3); height: 48px; padding-left: var(--sp-4); background: var(--surface); border: var(--structure); }
.city-search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; font-size: var(--body); }
.city-locate { height: 100%; padding: 0 var(--sp-4); border-left: var(--hairline); color: var(--action); }
.city-locate:hover { background: var(--mark); color: var(--text); }
.city-results { position: absolute; top: calc(100% + 1px); left: -1px; right: -1px; z-index: 2; display: none; background: var(--surface); border: var(--structure); }
.city-results.open { display: block; }
.city-res { display: grid; grid-template-columns: 1fr auto; padding: var(--sp-3) var(--sp-4); cursor: pointer; }
.city-res + .city-res { border-top: var(--hairline); }
.city-res.on { background: var(--mark); }
.city-res-sub { color: var(--text-3); }
.city-res-n { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.city-res-msg { padding: var(--sp-4); color: var(--text-3); font-size: var(--small); }
.city-sugg { margin-top: var(--sp-6); }
.city-chips { display: flex; flex-direction: column; margin-top: var(--sp-2); border-top: var(--structure); max-width: 360px; }
.city-chip { display: flex; justify-content: space-between; align-items: baseline; padding: var(--sp-2) 0; border-bottom: var(--hairline); transition: background var(--fast); }
.city-chip:hover { background: var(--mark); }

/* Explore: the story */
#v-map.on { position: static; }
.story { padding-bottom: var(--sp-8); }
.story-head { max-width: var(--measure); margin: 0 auto; padding: var(--sp-7) var(--gutter) var(--sp-5); }
.story-top { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.story-dek { margin-top: var(--sp-3); }
.story-meta { color: var(--text-3); margin-top: var(--sp-4); padding-top: var(--sp-2); border-top: var(--hairline); }
.story-meta:empty { display: none; }
.story-fig { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.fig-map { position: relative; height: min(68vh, 640px); border: var(--structure); background: var(--ground); overflow: hidden; }
.fig-map .map, .map { position: absolute; inset: 0; }
.fig-tools { position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 3; display: flex; gap: var(--sp-2); }
.fig-cap { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-2) 0; color: var(--text-2); border-bottom: var(--hairline); }
.fig-key span { display: inline-flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-3); color: var(--text-2); }
.fig-key i { width: 10px; height: 10px; border-radius: 50%; }
.compare summary { cursor: pointer; list-style: none; padding: var(--sp-3) 0; font-size: var(--small); color: var(--action); }
.compare summary::-webkit-details-marker { display: none; }
.compare summary::before { content: "+ "; }
.compare[open] summary::before { content: "− "; }
.compare #layers { max-width: 520px; background: var(--surface); border: var(--structure); }
.story-body { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.story-sec { margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: var(--structure); }
.sec-dek { color: var(--text-2); margin: var(--sp-1) 0 var(--sp-4); }
.bar-row { display: grid; grid-template-columns: 120px 1fr 32px; gap: var(--sp-3); align-items: center; width: 100%; padding: var(--sp-1) 0; transition: opacity var(--fast); }
.bar-t { height: 12px; background: var(--line); }
.bar-t b { display: block; height: 100%; background: var(--rust); transition: width var(--med) var(--ease); }
.bar-row:hover .bar-l { text-decoration: underline; text-underline-offset: 3px; }
.bar-row.on .bar-t b { background: var(--soot); }
.bar-row.dim { opacity: 0.35; }
.bar-n { text-align: right; color: var(--text-2); }
.tl-wrap { height: 120px; display: flex; flex-direction: column; }
.tl-head { display: flex; gap: var(--sp-3); align-items: baseline; }
.tl-wrap .tl-head .label { display: none; }
.tl-range { color: var(--text-3); }
.tl-plot { position: relative; flex: 1; margin: var(--sp-2) 0 var(--sp-1); cursor: crosshair; touch-action: none; }
.tl-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tl-brush { position: absolute; top: 0; bottom: 0; background: rgba(255, 210, 63, 0.4); border-inline: 1px solid var(--soot); pointer-events: none; }
.tl-tip { position: absolute; top: -24px; transform: translateX(-50%); padding: 2px var(--sp-2); background: var(--soot); color: var(--slab); font-size: var(--label); white-space: nowrap; opacity: 0; pointer-events: none; }
.tl-tip.on { opacity: 1; }
.tl-axis { display: flex; justify-content: space-between; color: var(--text-3); }
.worst { border-top: var(--hairline); }
.worst button { display: grid; grid-template-columns: 1fr 140px 32px 96px; gap: var(--sp-3); align-items: center; width: 100%; padding: var(--sp-3) 0; border-bottom: var(--hairline); }
.worst button:hover .w-name { text-decoration: underline; text-underline-offset: 3px; }
.w-bar { height: 8px; background: var(--line); }
.w-bar b { display: block; height: 100%; }
.w-n { text-align: right; }
.w-last { text-align: right; color: var(--text-3); }
.story-cta { max-width: var(--measure); margin: var(--sp-7) auto 0; padding: var(--sp-5) var(--gutter); border-block: var(--structure); }
.story-cta:empty { display: none; }
.story-cta p { color: var(--text-2); margin: var(--sp-3) 0 var(--sp-4); }
.story-src { max-width: var(--measure); margin: var(--sp-5) auto 0; padding: 0 var(--gutter); color: var(--text-3); }

/* Map furniture */
.maplibregl-ctrl-attrib { font: 400 10px var(--font) !important; background: rgba(255, 255, 255, 0.92) !important; }
.maplibregl-ctrl-group { border-radius: 0 !important; box-shadow: none !important; border: var(--structure) !important; background: var(--surface) !important; }
.maplibregl-ctrl-scale { border: 1px solid var(--soot) !important; border-top: 0 !important; background: rgba(255, 255, 255, 0.92) !important; font: 500 10px var(--font) !important; color: var(--text) !important; }
.maplibregl-cooperative-gesture-screen { font: 400 var(--small) var(--font) !important; background: rgba(16, 35, 26, 0.6) !important; }
.map-tip { position: absolute; left: 0; top: 0; z-index: 6; width: 240px; pointer-events: none; opacity: 0; transition: opacity var(--fast); }
.map-tip.on { opacity: 1; }
.tip-b { padding: var(--sp-2) var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.tip-t { font-weight: 700; }
.tip-m { color: var(--text-2); }
.anno { position: relative; width: 1px; height: 36px; pointer-events: none; }
.anno i { position: absolute; left: 0; bottom: 0; width: 1px; height: 36px; background: var(--soot); }
.anno span { position: absolute; bottom: 36px; left: -1px; white-space: nowrap; background: var(--mark); padding: var(--sp-1) var(--sp-2); color: var(--text); }
.anno-l span { left: auto; right: -1px; }
.anno b { display: block; font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: var(--small); font-weight: 700; }
.pin-marker { position: relative; width: 30px; height: 30px; cursor: grab; display: grid; place-items: center; }
.pin-marker::before { content: ""; position: absolute; width: 26px; height: 26px; background: var(--mark); }
.pin-marker span { position: relative; width: 22px; height: 22px; background: no-repeat center / 22px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><g stroke='%231E1E1B' stroke-width='3.4' stroke-linecap='square'><path d='M16 4v24M5.6 10l20.8 12M5.6 22l20.8-12'/></g></svg>"); }

/* Report drawer */
.scrim { position: fixed; inset: 0; z-index: 59; background: rgba(16, 35, 26, 0.12); opacity: 0; pointer-events: none; transition: opacity var(--med); }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: var(--bar); right: 0; bottom: 0; z-index: 60; width: min(460px, 100%); background: var(--surface); border-left: var(--structure); display: flex; flex-direction: column; transform: translateX(101%); transition: transform var(--med) var(--ease); }
.drawer.on { transform: none; }
.dr-top { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); border-bottom: var(--structure); }
.dr-id { color: var(--text-3); }
.dr-actions { display: flex; gap: var(--sp-1); }
.dr-scroll { overflow: auto; flex: 1; }
.dr-photos { display: grid; gap: 2px; grid-template-columns: repeat(6, 1fr); border-bottom: var(--structure); }
.dr-photos a { grid-column: span 2; aspect-ratio: 1; overflow: hidden; }
.dr-photos a:first-child { grid-column: span 6; aspect-ratio: 16 / 10; }
.dr-photos.n2 a { grid-column: span 3; aspect-ratio: 1; }
.dr-photos.n3 a:not(:first-child) { grid-column: span 3; }
.dr-photos img { width: 100%; height: 100%; object-fit: cover; }
.dr-nophoto { height: 96px; display: grid; place-content: center; justify-items: center; gap: var(--sp-1); color: var(--text-3); border-bottom: var(--hairline); }
.dr-body { padding: var(--sp-5) var(--sp-5) var(--sp-7); }
.dr-title { margin: var(--sp-1) 0; }
.dr-meta { color: var(--text-3); }
.dr-sev { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; font-size: var(--small); }
.dr-sev-bar { display: flex; gap: 2px; }
.dr-sev-bar i { width: 20px; height: 8px; }
.dr-sec { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); }
.dr-sec > .label { padding-bottom: var(--sp-1); border-bottom: var(--hairline); }
.dr-cats, .dr-tags { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.cat-pill { display: inline-flex; align-items: center; gap: var(--sp-2); }
.cat-pill .ph-duotone { color: var(--c); }
.dr-notes { color: var(--text-2); white-space: pre-wrap; }
.dr-codes { flex-direction: row; flex-wrap: wrap; gap: var(--sp-5); }
.dr-tree { display: grid; grid-template-columns: auto 1fr auto; gap: var(--sp-4); align-items: center; margin-top: var(--sp-5); padding: var(--sp-3) var(--sp-4); border: var(--structure); text-decoration: none; transition: background var(--fast); }
.dr-tree:hover { background: var(--mark); }
.dr-tree-n { color: var(--moss); }
.dr-tree-b { display: flex; flex-direction: column; }
.dr-tree-b b { font-weight: 700; }
.dr-tree-b i { font-style: normal; color: var(--text-3); font-size: var(--small); }
.dr-tree-ico { font-size: 24px; }
.dr-pts { display: flex; flex-direction: column; font-size: var(--small); color: var(--text-2); }
.dr-pts b { display: inline-block; width: 32px; color: var(--text); font-weight: 700; }

/* All reports (list) */
.lg-tools { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: var(--sp-2); height: 40px; padding: 0 var(--sp-3); width: min(420px, 100%); background: var(--surface); border: var(--structure); color: var(--text-3); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; }
.lg-group { margin-top: var(--sp-7); }
.lg-h { display: flex; align-items: baseline; gap: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: var(--structure); }
.lg-h small { font-size: var(--small); font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.lrow { display: grid; grid-template-columns: 72px minmax(0, 2.4fr) minmax(0, 1.4fr) 56px minmax(0, 0.8fr); gap: var(--sp-4); align-items: center; padding: var(--sp-3) 0; border-bottom: var(--hairline); text-decoration: none; transition: background var(--fast); }
.lrow:hover { background: var(--surface); }
.lrow-i, .lrow-tree { display: none; }
.lrow-time { color: var(--text-3); }
.lrow-main { display: flex; flex-direction: column; min-width: 0; }
.lrow-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ul { background: linear-gradient(var(--mark), var(--mark)) 0 88% / 0 40% no-repeat; transition: background-size var(--med) var(--ease); }
.lrow:hover .ul { background-size: 100% 40%; }
.lrow-a { color: var(--text-3); }
.lrow-cats { display: flex; flex-wrap: wrap; gap: 2px var(--sp-3); }
.cat-dot { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--text-2); }
.cat-dot::before { content: ""; width: 8px; height: 8px; background: var(--c); }
.lrow-sev { height: 6px; background: var(--line); }
.lrow-sev i { display: block; height: 100%; }
.lrow-by { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: var(--sp-8) 0; display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; }

/* Report a spot */
.rp-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) 280px; gap: var(--sp-7); align-items: start; justify-content: center; }
.step { padding: var(--sp-5) 0 var(--sp-6); border-top: var(--structure); }
.step-h { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.step-n { color: var(--text-3); }
.step.done .step-n { color: var(--action); }
.step-ok { display: none; }
.loc-wrap { position: relative; }
.loc-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 10; display: none; max-height: 280px; overflow: auto; background: var(--surface); border: var(--structure); }
.loc-results.open { display: block; }
.loc-item { padding: var(--sp-2) var(--sp-3); cursor: pointer; display: flex; flex-direction: column; }
.loc-item + .loc-item { border-top: var(--hairline); }
.loc-item:hover { background: var(--mark); }
.loc-item small { color: var(--text-3); }
.loc-msg { padding: var(--sp-3); color: var(--text-3); font-size: var(--small); }
.pin-wrap { position: relative; height: 280px; border: var(--structure); }
.pin-map { position: absolute; inset: 0; }
.pin-hint { position: absolute; left: var(--sp-2); bottom: var(--sp-2); background: var(--surface); padding: 2px var(--sp-2); border: var(--hairline); pointer-events: none; }
.pin-gps { position: absolute; right: var(--sp-2); bottom: var(--sp-2); }
.pin-codes { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-2); color: var(--text-2); font-family: var(--font-mono); }
.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--hairline); border-left: var(--hairline); }
.ccard { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border-right: var(--hairline); border-bottom: var(--hairline); background: var(--surface); transition: background var(--fast); }
.ccard-ico { font-size: 18px; color: var(--c); }
.ccard:hover { background: var(--ground); }
.ccard.on { background: var(--mark); }
.ccard.on .ccard-ico { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.tagb { height: var(--control-sm); padding: 0 var(--sp-3); border: var(--hairline); background: var(--surface); font-size: var(--small); transition: background var(--fast), border-color var(--fast); }
.tagb:hover { border-color: var(--soot); }
.tagb.on { background: var(--mark); border-color: var(--soot); }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-6); border: 1px dashed var(--stone); background: var(--surface); cursor: pointer; text-align: center; transition: background var(--fast); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:hover, .drop.drag { background: var(--ground); border-color: var(--soot); }
.drop.full { opacity: 0.4; pointer-events: none; }
.drop-ico { font-size: 20px; }
.drop u { color: var(--action); text-underline-offset: 3px; }
.drop small { color: var(--text-3); }
.pgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-1); margin: var(--sp-3) 0 var(--sp-4); }
.pgrid:empty { display: none; }
.pitem { position: relative; aspect-ratio: 1; overflow: hidden; border: var(--hairline); }
.pitem img { width: 100%; height: 100%; object-fit: cover; }
.pitem button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; display: grid; place-items: center; background: var(--surface); border: var(--structure); font-size: 11px; }
.pitem span { position: absolute; left: 2px; bottom: 2px; background: var(--surface); padding: 0 var(--sp-1); font-size: var(--label); }
.rp-side { position: sticky; top: calc(var(--bar) + var(--sp-5)); }
.preview { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.pv-tree { height: 96px; color: var(--line); }
.pv-tree svg { height: 100%; margin: 0 auto; }
.pv-tree-l { text-align: center; }
.pv-tree-l b { display: block; font-weight: 700; }
.pv-tree-l span { color: var(--text-3); font-size: var(--small); }
.pv-pts { display: flex; align-items: baseline; gap: var(--sp-2); border-top: var(--hairline); padding-top: var(--sp-3); font-size: var(--small); }
.pv-parts { display: flex; flex-direction: column; color: var(--text-2); }
.pv-parts b { display: inline-block; width: 28px; color: var(--text); font-weight: 700; }
.pv-lvl { display: flex; flex-direction: column; gap: var(--sp-1); }
.pv-lvl:empty { display: none; }
.lvlbar { position: relative; height: 6px; background: var(--line); }
.lvlbar b, .lvlbar i { position: absolute; inset: 0 auto 0 0; transition: width var(--med) var(--ease); }
.lvlbar b { background: var(--mark); }
.lvlbar i { background: var(--moss); z-index: 1; }
.rp-done { display: none; max-width: var(--measure); margin: 0 auto; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3); }
.rp-done.on { display: flex; }
.done-tree { height: 160px; color: var(--line); }
.done-tree svg { height: 100%; }
.done-stats { display: flex; gap: var(--sp-7); margin: var(--sp-4) 0; padding: var(--sp-3) var(--sp-5); border-block: var(--hairline); }
.done-badges { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; justify-content: center; }
.badge-pill { padding: 2px var(--sp-2); background: var(--mark); }
.done-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center; margin-top: var(--sp-4); }
.tree2d .t2-crown { transform-origin: 60px 90px; transform-box: view-box; }
.tree2d .t2-trunk { transform-origin: 60px 112px; transform-box: view-box; }
.tree2d.grow .t2-trunk { animation: grow-y 0.8s var(--ease) both 0.2s; }
.tree2d.grow .t2-crown { animation: grow 0.8s var(--ease) both 0.7s; }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow { from { transform: scale(0); } }

/* Garden */
.garden { min-height: calc(100dvh - var(--bar)); }
.gd-stage { position: relative; height: calc(100dvh - var(--bar) - 72px); min-height: 420px; border-bottom: var(--structure); background: #f2f6ee; overflow: hidden; }
#gd-gl { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.gd-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); padding: var(--sp-5); text-align: center; }
.gd-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; gap: var(--sp-3); align-items: flex-start; flex-wrap: wrap; max-width: 380px; padding: var(--sp-4); }
.gd-empty p { flex: 1; }
.gd-empty .sign { width: 100%; }
.gd-label { position: absolute; left: 0; top: 0; z-index: 2; display: none; flex-direction: column; gap: 2px; width: 220px; padding: var(--sp-3); background: var(--surface); border: var(--structure); }
.gd-label.on { display: flex; }
.gd-label a { color: var(--action); font-size: var(--small); margin-top: var(--sp-1); }
.gd-label .mono { font-size: var(--small); color: var(--text-2); }
.gd-caption { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-4) var(--gutter); }
.gd-line { color: var(--text-2); }
.gd-line b { color: var(--text); margin-right: var(--sp-2); vertical-align: -2px; }
.gd-toggles { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.gd-toggles button { height: var(--control-sm); padding: 0 var(--sp-3); border: var(--structure); background: var(--surface); transition: background var(--fast); }
.gd-toggles button:hover { background: var(--mark); }
.gd-toggles button[aria-expanded="true"], .gd-toggles button[aria-pressed="true"] { background: var(--soot); color: var(--lichen); }
.gd-panel { max-width: var(--page); padding: var(--sp-2) var(--gutter) var(--sp-8); }
.gd-table { background: var(--surface); border: var(--structure); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: var(--surface); text-align: left; padding: var(--sp-2) var(--sp-3); color: var(--text-3); border-bottom: var(--structure); white-space: nowrap; cursor: pointer; user-select: none; }
th.sorted { color: var(--text); }
th.sorted::after { content: attr(data-dir); margin-left: var(--sp-1); }
td { padding: var(--sp-2) var(--sp-3); border-bottom: var(--hairline); font-size: var(--small); vertical-align: middle; }
td small { display: block; color: var(--text-3); }
td b { font-weight: 700; }
.gd-table tbody tr { cursor: pointer; transition: background var(--fast); }
.gd-table tbody tr:hover, .gd-table tbody tr.hov { background: var(--ground); }
.gd-table tbody tr.on { background: var(--mark); }
.num { text-align: right; }
.stage { color: var(--text-3); }
.s-young, .s-mature { color: var(--moss); }
.gardeners { border-top: var(--structure); margin-bottom: var(--sp-4); max-width: var(--measure); }
.gardeners li { display: grid; grid-template-columns: 40px 1fr auto 120px; gap: var(--sp-4); align-items: baseline; padding: var(--sp-3) 0; border-bottom: var(--hairline); }
.gardeners li:first-child .gr-n { background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); }
.gr-i { color: var(--text-3); }
.gr-n { justify-self: start; }
.gr-t b { color: var(--moss); font-weight: 700; }
.gr-l { color: var(--text-3); text-align: right; }

/* You (points, levels, badges) */
.rk-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 260px; gap: var(--sp-6); align-items: start; }
.rk-me { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.me-top { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--moss); transition: stroke-dashoffset 0.8s var(--ease); }
.me-ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.me-ring-in span { font-size: var(--small); color: var(--text-3); }
.me-name, .me-lvl { text-align: center; }
.me-lvl { color: var(--text-2); }
.me-stats { display: flex; justify-content: space-around; padding: var(--sp-3) 0; border-block: var(--hairline); }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }
.badge { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); text-align: center; color: var(--text-3); }
.badge-svg { width: 40px; height: 40px; color: var(--stone); }
.badge-hex { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.badge-svg.got { color: var(--text); }
.badge-svg.got .badge-hex { fill: var(--mark); stroke: var(--soot); }
.badge.got { color: var(--text); }
.board { border-top: var(--structure); }
.brow { display: grid; grid-template-columns: 32px minmax(0, 1fr) 120px 56px 40px; gap: var(--sp-3); align-items: center; padding: var(--sp-3) 0; border-bottom: var(--hairline); }
.brow.me { background: var(--surface); }
.brow-r { color: var(--text-3); font-family: var(--font-mono); font-size: var(--small); }
.brow-n { display: flex; flex-direction: column; min-width: 0; }
.brow-n b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow-n small { color: var(--text-3); font-size: var(--small); }
.brow-bar { height: 6px; background: var(--line); }
.brow-bar i { display: block; height: 100%; background: var(--moss); }
.brow-p { text-align: right; font-family: var(--font-mono); }
.brow-claim { color: var(--action); font-size: var(--small); text-decoration: underline; text-underline-offset: 2px; }
.rules, .levels { width: 100%; border-top: var(--structure); }
.rules td { padding: var(--sp-2) 0; }
.levels { display: flex; flex-direction: column; }
.lvl { display: grid; grid-template-columns: 28px 1fr auto; padding: var(--sp-2) 0; border-bottom: var(--hairline); align-items: center; }
.lvl b { font-weight: 700; }

/* Credits */
.cr-group { margin-top: var(--sp-6); }
.cr-h { padding-bottom: var(--sp-2); border-bottom: var(--structure); }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: var(--sp-5); }
.cr { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) 0; border: 0; border-bottom: var(--hairline); background: none; text-decoration: none; }
.cr:hover b { text-decoration: underline; text-underline-offset: 3px; }
.cr b { font-weight: 700; }
.cr span:not(.shield) { color: var(--text-2); font-size: var(--small); }

/* Research study */
.st-grid { display: grid; grid-template-columns: 1fr 1fr 280px; gap: var(--sp-4); }
.st-card { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.st-rq { padding-left: 1.2em; list-style: decimal; display: flex; flex-direction: column; gap: var(--sp-2); color: var(--text-2); }
.st-rq b { color: var(--text); font-weight: 700; }
.st-results { margin-top: var(--sp-7); }
.rtable { width: 100%; border-top: var(--structure); }
.rtable td .mono { margin-left: var(--sp-2); }
.sw { display: inline-block; width: 10px; height: 10px; margin-right: var(--sp-2); }
.rbar { display: inline-block; vertical-align: middle; width: 100px; height: 6px; background: var(--line); }
.rbar i { display: block; height: 100%; }
.expl-row { display: grid; grid-template-columns: 100px 1fr auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-3) 0; border-bottom: var(--hairline); align-items: start; }
.expl-row .muted { grid-column: 2; }
.rub { grid-row: 1 / span 2; grid-column: 3; display: flex; }
.rub button, .lk-scale button, .zp button { min-width: 34px; height: 34px; border: var(--hairline); margin: 0 -1px -1px 0; background: var(--surface); font-family: var(--font-mono); transition: background var(--fast); }
.rub button:hover, .lk-scale button:hover, .zp button:hover { background: var(--ground); }
.rub button.on, .lk-scale button.on, .zp button.on { background: var(--mark); border-color: var(--soot); position: relative; }
.st-progress { display: flex; align-items: center; gap: var(--sp-4); color: var(--text-2); margin-bottom: var(--sp-3); font-size: var(--small); }
.st-bar { flex: 1; height: 4px; background: var(--line); }
.st-bar i { display: block; height: 100%; background: var(--soot); transition: width var(--med) var(--ease); }
.st-center { max-width: var(--measure); margin: var(--sp-6) auto; padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.lk { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) 0; border-bottom: var(--hairline); }
.lk-scale { display: flex; }
.lk-scale button { flex: 1; }
.lk-ends { display: flex; justify-content: space-between; color: var(--text-3); }
.st-rank { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.study-run { height: calc(100dvh - var(--bar)); display: flex; flex-direction: column; padding: var(--sp-4) var(--gutter); }
.st-run { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-4); min-height: 0; }
.st-stim { position: relative; border: var(--structure); overflow: hidden; background: var(--surface); }
.st-map { position: absolute; inset: 0; }
.st-legend { position: absolute; left: var(--sp-2); right: var(--sp-2); bottom: var(--sp-2); z-index: 2; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); padding: var(--sp-2) var(--sp-3); background: var(--surface); border: var(--structure); font-size: var(--small); pointer-events: none; }
.st-legend span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.st-legend i { width: 10px; height: 10px; }
.st-legend .sep { color: var(--text-3); }
.st-task { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); overflow: auto; }
.st-q { font-size: var(--body); line-height: var(--body-lh); }
.st-q b { font-weight: 700; background: var(--mark); padding: 0 2px; }
.st-ans { padding: var(--sp-3); border: 1px dashed var(--stone); font-size: var(--small); }
.st-opts { display: flex; flex-direction: column; }
.st-opts-2 { flex-direction: row; }
.st-opts-2 .st-opt { flex: 1; justify-content: center; }
.st-opt { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border: var(--hairline); margin-bottom: -1px; background: var(--surface); transition: background var(--fast); }
.st-opt i { width: 10px; height: 10px; }
.st-opt:hover { background: var(--ground); }
.st-opt.on { background: var(--mark); border-color: var(--soot); position: relative; }
.zp { display: grid; grid-template-columns: repeat(4, 1fr); }
.dash { position: absolute; inset: 0; overflow: auto; padding: var(--sp-5); }
.dash-kpis { display: flex; gap: var(--sp-7); padding-bottom: var(--sp-3); border-bottom: var(--structure); margin-bottom: var(--sp-4); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.dash-wide { grid-column: 1 / -1; }
.dash section { display: flex; flex-direction: column; gap: var(--sp-1); }
.dbar { display: grid; grid-template-columns: 110px 1fr 32px; gap: var(--sp-2); align-items: center; font-size: var(--small); }
.dbar i { height: 10px; }
.dbar b { text-align: right; font-weight: 400; }
.dtable td { padding: var(--sp-1); }
.dt-bar { display: block; height: 6px; background: var(--soot); min-width: 2px; }
.matrix { display: grid; gap: 1px; font-size: var(--label); }
.mx-h { text-align: center; color: var(--text-3); }
.mx-l { font-size: var(--small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-c { height: 22px; display: grid; place-items: center; color: #fff; outline: 1px solid var(--line); min-width: 18px; }

/* Open-data layers (inside Explore's "Compare") */
.ly-head { padding: var(--sp-3) var(--sp-4); border-bottom: var(--hairline); color: var(--text-2); font-size: var(--small); }
.ly-head .ph-duotone, .ly-head b, .ly-ico { display: none; }
.ly { border-bottom: var(--hairline); }
.ly-row { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3); align-items: center; width: 100%; padding: var(--sp-3) var(--sp-4); transition: background var(--fast); }
.ly-row:hover { background: var(--ground); }
.ly-t b { display: block; font-weight: 700; }
.ly-t small { color: var(--text-3); }
.switch { position: relative; width: 28px; height: 16px; border: var(--structure); background: var(--surface); }
.switch i { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--soot); transition: transform var(--med) var(--ease); }
.ly.on .switch { background: var(--mark); }
.ly.on .switch i { transform: translateX(12px); }
.ly-note { padding: 0 var(--sp-4); color: var(--text-2); display: flex; flex-direction: column; gap: var(--sp-1); }
.ly-note:not(:empty) { padding-bottom: var(--sp-3); }
.ly-note b { color: var(--text); font-weight: 700; }
.ly-stats, .ly-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.ly-stats span, .ly-legend span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.ly-legend i { width: 10px; height: 10px; outline: 1px solid var(--line); }
.ly-stats .dot { border-radius: 50%; }

/* Style guide page (#/system) */
.sys-sec { margin-top: var(--sp-7); }
.sys-sec > .label { display: block; padding-bottom: var(--sp-2); margin-bottom: var(--sp-4); border-bottom: var(--structure); }
.sys-row { display: grid; grid-template-columns: 180px 1fr; gap: var(--sp-5); align-items: baseline; padding: var(--sp-3) 0; border-bottom: var(--hairline); }
.sys-row > .label { color: var(--text-3); }
.sys-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-4); }
.sys-sw { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--small); }
.sys-sw i { height: 72px; border: var(--hairline); }
.sys-sw b { font-weight: 700; }
.sys-space { display: flex; align-items: center; gap: var(--sp-3); }
.sys-space i { height: 12px; background: var(--moss); }
.sys-demo { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.sys-logo { display: flex; gap: var(--sp-6); align-items: flex-end; }
.sys-logo .brand-mark svg { width: 96px; height: 96px; }

/* 6 ─ Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .rk-grid, .st-grid, .rp-grid { grid-template-columns: 1fr; }
  .rp-side { position: static; }
}
@media (max-width: 720px) {
  .bar { gap: var(--sp-2); }
  .brand-word { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; height: 48px; margin: 0; justify-content: center; gap: var(--sp-7); background: var(--surface); border-top: var(--structure); z-index: 60; padding-bottom: env(safe-area-inset-bottom); }
  .tab-ink { bottom: auto; top: -1px; }
  .bar-right { margin-left: auto; }
  .bar .sign { padding: 0 var(--sp-3); }
  .city-btn { max-width: 130px; }
  .menu-keys { display: none; }
  main { padding-bottom: 48px; }
  .story-fig { padding: 0; }
  .fig-map { height: 60vh; border-inline: 0; }
  .fig-cap, .compare { padding-inline: var(--gutter); }
  .worst button { grid-template-columns: 1fr 64px 28px; }
  .w-last { display: none; }
  .lrow { grid-template-columns: 56px minmax(0, 1fr); }
  .lrow-cats, .lrow-sev, .lrow-by { display: none; }
  .cgrid { grid-template-columns: 1fr 1fr; }
  .r2 { grid-template-columns: 1fr; }
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .gd-stage { height: 62vh; }
  .gardeners li { grid-template-columns: 28px 1fr auto; }
  .gr-l { display: none; }
  .brow { grid-template-columns: 28px minmax(0, 1fr) 48px 36px; }
  .brow-bar { display: none; }
  .st-run { grid-template-columns: 1fr; grid-template-rows: 55vh auto; }
  .dash-grid { grid-template-columns: 1fr; }
  .city-inner { padding: var(--sp-4) var(--gutter); }
  .sys-row { grid-template-columns: 1fr; gap: var(--sp-1); }
}
.sys-logo .brand .brand-mark svg { width: 32px; height: 32px; }

/* Explore · scrolly story (DESIGN.md §9). The map is pinned; steps drive it. */
.scrolly { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--sp-6); max-width: var(--page); margin: var(--sp-5) auto 0; padding: 0 var(--gutter); }
.scrolly-steps { order: 1; padding-bottom: 24vh; }
.scrolly-map { order: 2; position: sticky; top: calc(var(--bar) + var(--sp-4)); height: calc(100dvh - var(--bar) - var(--sp-6)); align-self: start; }
.scrolly-map .fig-map { height: 100%; }
.step-card { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-2); padding: var(--sp-6) 0; border-top: var(--structure); opacity: 0.35; transition: opacity var(--med) var(--ease); }
.step-card:first-child { border-top: 0; }
.step-card.active { opacity: 1; }

.step-card > p:not(.label):not(.sec-dek) { color: var(--text-2); }
.step-card .label { color: var(--rust); }
.step-card #layers { margin-top: var(--sp-2); }
.fig-coord { position: absolute; top: var(--sp-3); right: var(--sp-3); z-index: 3; padding: 2px var(--sp-2); background: var(--surface); border: var(--hairline); font-size: var(--label); line-height: var(--label-lh); font-family: var(--font-mono); letter-spacing: var(--label-track); pointer-events: none; }
.fig-coord:empty { display: none; }
.fig-legend { position: absolute; left: var(--sp-3); bottom: var(--sp-3); z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3); background: var(--surface); border: var(--structure); font-size: var(--small); line-height: var(--small-lh); }
.fig-legend .label { margin-bottom: var(--sp-1); color: var(--text-2); }
.fig-legend span:not(.label) { display: flex; align-items: center; gap: var(--sp-2); }
.fig-legend i { width: 10px; height: 10px; border-radius: 50%; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-scale { margin-bottom: var(--sp-3); }
button.anno { background: none; border: 0; padding: 0; cursor: pointer; }
.anno span { pointer-events: auto; transition: background var(--fast), color var(--fast); }
.anno:hover span, .anno:focus-visible span { background: var(--soot); color: var(--lichen); }
.anno:hover b, .anno:focus-visible b { color: var(--lichen); }
.story-h { animation: rise 600ms var(--ease) both; }
.story-dek { animation: rise 600ms var(--ease) 120ms both; }
.story-meta { animation: rise 600ms var(--ease) 240ms both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 900px) {
  .scrolly { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .scrolly-map { order: 0; top: var(--bar); height: 44vh; z-index: 2; border-bottom: var(--structure); }
  .scrolly-map .fig-map { border: 0; }
  .scrolly-steps { padding: 0 var(--gutter) 20vh; }
  .step-card { min-height: 60vh; }
  .fig-coord { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story-h, .story-dek, .story-meta { animation: none; } }
.step-card .worst button { grid-template-columns: minmax(0, 1fr) 72px 28px; }
.step-card .w-last { display: none; }
.step-card .w-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-card .bar-row { grid-template-columns: 104px 1fr 28px; }

/* Mark: Spot pops up on first load, tilts its head on hover, and its eyes follow the cursor (brand.js) */
.spot { transform-origin: 36px 60px; transform-box: view-box; animation: spot-up 700ms var(--ease) 250ms both; transition: transform var(--med) var(--ease); }
.brand:hover .spot, .stamp:hover .spot { transform: rotate(-9deg); }
@keyframes spot-up { from { transform: translateY(14px) scale(0.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .spot { animation: none; transition: none; } }

/* Page changes cross-fade (View Transitions API) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--med); animation-timing-function: var(--ease); }

/* How DumpSpot works (#/about) */
.about .page-head { max-width: var(--measure); }
.chapters { border-top: var(--structure); max-width: 900px; }
.chapter { display: grid; grid-template-columns: 96px 1fr; gap: var(--sp-5); padding: var(--sp-6) 0; border-bottom: var(--hairline); }
.chapter-n { font-family: var(--font-display); font-size: var(--display); line-height: 1; color: var(--cyan); }
.chapter h2 { font-family: var(--font-display); font-size: var(--title); line-height: var(--title-lh); font-weight: 400; margin-bottom: var(--sp-2); }
.chapter p { color: var(--text-2); max-width: var(--measure); }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-7); }
.role { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-3); border-top: var(--structure); }
.role p { color: var(--text-2); flex: 1; }
.about-end { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: var(--structure); }
.about-mark svg { width: 56px; height: 56px; }
.gd-panel-dek { margin-bottom: var(--sp-3); max-width: var(--measure); }
@media (max-width: 720px) {
  .chapter { grid-template-columns: 1fr; gap: var(--sp-2); }
  .roles { grid-template-columns: 1fr; }
}

/* ═══ Identity: the stamp (DESIGN.md §3) ═══ */
.stamp { display: block; width: 100%; height: auto; }
.stamp-spin .stamp-ring { transform-origin: 100px 100px; transform-box: view-box; animation: stamp-turn 60s linear infinite; }
@keyframes stamp-turn { to { transform: rotate(360deg); } }
.stamp-press { animation: stamp-press 700ms cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes stamp-press { 0% { transform: scale(1.6) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .stamp-spin .stamp-ring, .stamp-press { animation: none; } }

/* Landing: one stage, almost no chrome (after designengineer.world) */
.city-top { align-items: flex-start; }
.city-ident { display: flex; align-items: center; gap: var(--sp-4); }
.city-stamp { width: 112px; flex: none; }
.city-tag { font-size: var(--small); line-height: var(--small-lh); color: var(--text); max-width: 260px; }
.city-tag span { color: var(--text-3); }
.city-meta { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: var(--label); text-transform: uppercase; letter-spacing: var(--label-track); }
.city-meta > span { display: inline-flex; gap: var(--sp-2); align-items: baseline; padding: 6px 12px; border-radius: 999px; }
.city-meta > span:first-child { background: var(--paper); color: var(--ink); }
.city-meta b { font-weight: 400; color: inherit; opacity: 0.6; }
.city-meta.off { padding: 6px 12px; }
.city-meta.off::before { background: var(--clay); }
.city-foot { color: var(--text-3); }
.globe-marks { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.globe-mark { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; margin: -14px 0 0 -14px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--ink); font-size: var(--small); color: var(--ink); white-space: nowrap; cursor: pointer; transition: opacity var(--med), background var(--fast); will-change: transform; }
.globe-mark b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--clay); color: #fff; font: 400 var(--label) var(--font-mono); }
.globe-mark:hover { background: var(--pollen); }
.globe-mark:focus-visible { outline: 2px solid var(--cyan); }
.city-main { position: relative; z-index: 2; }
@media (max-width: 720px) {
  .city-stamp { width: 72px; }
  .city-tag { display: none; }
  .globe-mark span { display: none; }
  .globe-mark { padding: 3px; }
}
.done-stamp { width: 200px; margin-bottom: var(--sp-3); }
.about-stamp { width: 140px; }
.sys-stamp { width: 160px; }

/* ───────── Brand v7: Spot, specimens, title block, paper, motion ───────── */

/* Paper: a faint fibre grain on the ground, so the page feels like a sheet, not a screen */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .17 0 0 0 0 .13 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Spot, standing. Bobs while sniffing; the scent dots pulse ahead of the nose. */
.spot-walk { width: 72px; height: auto; flex: none; overflow: visible; }
.spot-walk .spot-body { transform-origin: 36px 60px; transform-box: view-box; }
.spot-walk.sniffing .spot-body { animation: sniff 1.6s var(--ease) infinite; }
.spot-walk .scent circle { fill: var(--stone); opacity: 0; animation: scent 1.6s var(--ease) infinite; }
.spot-walk .scent circle:nth-child(2) { animation-delay: 160ms; }
.spot-walk .scent circle:nth-child(3) { animation-delay: 320ms; }
@keyframes sniff { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(-4deg) translateY(1px); } 55% { transform: rotate(-3deg); } }
@keyframes scent { 0% { opacity: 0; transform: translateX(3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateX(-4px); } }
.spot-empty { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
.spot-empty .spot-walk { width: 96px; }

/* Status note with Spot in it */
.status { align-items: center; }
.status::before { display: none; }
.status .spot-walk { width: 48px; }
.gd-empty::before { display: none; }
.gd-empty { align-items: center; }
.gd-empty .spot-walk { width: 64px; }

/* Toasts carry Spot's face */
.toast-dot { width: 20px; height: 20px; background: none; display: grid; place-items: center; }
.toast-dot .spot-mark { width: 20px; height: 20px; }
.toast-err .toast-dot { width: 10px; height: 10px; background: var(--rust); }

/* Specimens */
.spec-card { margin: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.specimen { border: var(--structure); background: #ffffff; position: relative; }
.specimen-sheet { width: 100%; min-height: 120px; }
.specimen-sheet canvas { display: block; width: 100% !important; height: auto !important; }
.specimen::after { content: "SPECIMEN"; position: absolute; right: var(--sp-2); bottom: var(--sp-2); font: 400 var(--label)/var(--label-lh) var(--font-mono); letter-spacing: 0.06em; color: var(--stone); pointer-events: none; }
.specimen-off .specimen-sheet { padding: var(--sp-4); }
.spec-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-3); margin: 0; }
.spec-key div { display: flex; flex-direction: column; }
.spec-key dt { font: 400 var(--label)/var(--label-lh) var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.spec-key dd { margin: 0; font-size: var(--small); line-height: var(--small-lh); }
.spec-sheet { margin-top: var(--sp-7); }
.spec-sheet-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--sp-5); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: var(--structure); align-items: end; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.spec-grid .label { color: var(--text-2, var(--text)); }
.done-spec { width: min(420px, 100%); text-align: left; margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }
@media (max-width: 720px) {
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .spec-sheet-head { grid-template-columns: 1fr; }
  .spec-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Title block: the foot of every sheet */
.title-block { display: grid; grid-template-columns: minmax(240px, 1.2fr) 3fr; border-top: var(--structure); background: var(--surface); }
body.city-open .title-block { display: none; }
.tb-id { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-4) var(--gutter); border-right: var(--structure); }
.tb-mark .spot-mark { width: 44px; height: 44px; display: block; }
.tb-id b { display: block; font-size: 22px; line-height: 26px; font-weight: 400; }
.tb-id small { display: block; font-size: var(--small); line-height: var(--small-lh); color: var(--text-3); }
.tb-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.tb-cells div { padding: var(--sp-3) var(--sp-4); border-right: var(--hairline); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.tb-cells div:last-child { border-right: 0; }
.tb-cells dt { font: 400 var(--label)/var(--label-lh) var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tb-cells dd { margin: 0; font: 400 var(--small)/var(--small-lh) var(--font-mono); }
.tb-cells a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 900px) {
  .title-block { grid-template-columns: 1fr; }
  .tb-id { border-right: 0; border-bottom: var(--hairline); }
  .tb-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-cells div { border-bottom: var(--hairline); }
}

/* ───────── Smoothness ───────── */
:root { --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --sheet-ease: cubic-bezier(0.32, 0.72, 0, 1); --slow: 560ms; }

/* Everything you can touch eases; pressing gives way a little. `scale` is used so it never fights a transform. */
a, button, .icon-plate, .plate-btn, .link-btn, .city-chip, .lrow { transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--med) var(--ease), opacity var(--med) var(--ease), scale var(--fast) var(--ease); }
.sign:active, .icon-plate:active, .plate-btn:active, .city-chip:active, .seg button:active { scale: 0.97; }

/* The drawer slides like a sheet of paper; the page behind softens */
.drawer { transition: transform var(--slow) var(--sheet-ease); will-change: transform; }
.scrim { transition: opacity var(--slow) var(--ease), backdrop-filter var(--slow) var(--ease); }
.scrim.on { backdrop-filter: blur(2px); }

/* Pages: the bar stays put while the sheet underneath changes */
.bar { view-transition-name: bar; }
::view-transition-old(root) { animation: vt-out 220ms var(--ease) both; }
::view-transition-new(root) { animation: vt-in var(--slow) var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
.view.on { animation: none; }

/* Reveal: sections rise into place once as they scroll into view (shell.js adds .rv / .in) */
.rv { opacity: 0; translate: 0 14px; transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; translate: 0 0; }

/* Toasts and menu use the softer ease too */
.toast, .menu { transition-timing-function: var(--ease-out); transition-duration: var(--slow); }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; translate: none; transition: none; }
  .spot-walk .spot-body, .spot-walk .scent circle { animation: none; }
  .spot-walk .scent circle { opacity: 1; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
@media (max-width: 720px) { .title-block { margin-bottom: calc(48px + env(safe-area-inset-bottom)); } }

/* ───────── v7 "Fresh garden": clean pass. These rules win over everything above. ───────── */

/* Ground: plain white. No grain. */
body { background-image: none; background: var(--sheet); }

/* Soft corners on things you touch and things that float */
.sign, .plate-btn, .icon-plate, .city-btn, .seg, .city-chip, .city-search, input[type="text"], input:not([type]), textarea, select,
.menu, .toast, .status, .gd-empty, .specimen, .spec-card .specimen, .fig-map, .dr-tree, .step-card, .lrow-img, .dr-photos a, .dr-nophoto { border-radius: var(--radius-sm); }
.menu, .toast, .status, .gd-empty { border-radius: var(--radius); }
.seg { overflow: hidden; }
.seg-thumb { border-radius: calc(var(--radius-sm) - 2px); }
.sign-report { border-radius: var(--radius-sm); }
.maplibregl-ctrl-group { border-radius: var(--radius-sm) !important; overflow: hidden; }

/* Quiet controls: hairline outlines, a tint on hover, brand tint when on */
.plate-btn, .icon-plate, .seg, .city-btn { border: 1px solid var(--line); }
.plate-btn:hover, .icon-plate:hover, .city-btn:hover { background: var(--paper); border-color: #d3d8cf; }
.icon-plate.on { background: var(--cyan-light); color: var(--cyan-dark); border-color: transparent; }
.seg-thumb { background: var(--cyan-light); }
.seg button.on { color: var(--cyan-dark); }
.seg button + button { border-left: 0; }
.city-btn::before { border-radius: 50%; }
.tab-ink { background: var(--cyan); }

/* Floating things get one soft shadow instead of a black outline */
.menu, .toast, .status, .gd-empty, .drawer { border-color: var(--line); box-shadow: 0 1px 2px rgba(16, 35, 26, 0.06), 0 8px 24px rgba(16, 35, 26, 0.08); }
.menu a:hover { background: var(--paper); }

/* Labels: lighter, so headings and numbers lead */
.label, .kicker { color: var(--stone); }
.kicker { color: var(--clay); }

/* Highlighter: a crisp marker stroke */
mark, .page-h em, .story-h em { background: linear-gradient(transparent 60%, var(--mark) 60%, var(--mark) 94%, transparent 94%); }

/* Offline: one small pill, not a paragraph in the corner */
.status { padding: 6px 12px 6px 6px; gap: var(--sp-2); max-width: none; font-size: var(--small); line-height: var(--small-lh); }
.status .spot-walk { width: 30px; }
.status small { display: none; }

/* Specimens: no watermark; the key folds away */
.specimen::after { content: none; }
.specimen { background: var(--cyan); border: 0; overflow: hidden; }
.spec-more summary { cursor: pointer; list-style: none; color: var(--cyan-dark); font-size: var(--small); display: inline-flex; gap: 6px; align-items: center; }
.spec-more summary::-webkit-details-marker { display: none; }
.spec-more summary::after { content: "+"; font-family: var(--font-mono); }
.spec-more[open] summary::after { content: "−"; }
.spec-more .spec-key { margin-top: var(--sp-2); }

/* Footer: one quiet line */
.title-block { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); padding: var(--sp-4) var(--gutter); background: var(--sheet); border-top: 1px solid var(--line); }
.tb-id { padding: 0; border: 0; gap: var(--sp-2); }
.tb-mark .spot-mark { width: 22px; height: 22px; }
.tb-id b { font-size: 17px; line-height: 20px; }
.tb-id small { display: none; }
.tb-cells { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); }
.tb-cells div { padding: 0; border: 0; flex-direction: row; gap: 6px; align-items: baseline; }
.tb-cells dt { color: var(--stone); }
.tb-cells dd { font-size: var(--label); line-height: var(--label-lh); color: var(--text-2); }
@media (max-width: 900px) {
  .title-block { display: flex; }
  .tb-cells { display: flex; }
  .tb-cells div { border: 0; }
}

/* Explore: the map frame is a soft panel */
.fig-map { border: 1px solid var(--line); overflow: hidden; }
.story-meta { display: none; }
@media (max-width: 720px) {
  .sys-logo { flex-wrap: wrap; gap: var(--sp-5); align-items: center; }
  .sys-stamp { width: 140px; flex: none; }
  .sys-logo .brand-mark svg { width: 80px; height: 80px; }
  .sys-logo > * { flex: none; }
  .sys-logo > p { flex: 1 1 100%; max-width: none !important; }
}

/* Globe to city: the overlay dissolves while the globe keeps pushing in, and the map flies on underneath */
.city.leaving { animation: fadeout 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.city.leaving #globe { transform: scale(1.35); filter: blur(2px); transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), filter 0.9s; }
.city.diving .city-top, .city.diving .city-foot { opacity: 0; transition: opacity 0.4s; }
.city .globe-marks { transition: opacity 0.3s; }
.city.diving .globe-marks { opacity: 0; }

/* ───────── Report: one question at a time ───────── */
.rf { max-width: var(--page); margin: 0 auto; padding: var(--sp-6) var(--gutter) var(--sp-8); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-7); align-items: start; }
.rf[hidden] { display: none; }
.rf-main { min-width: 0; display: flex; flex-direction: column; min-height: calc(100dvh - var(--bar) - 120px); }

/* Progress rail: five dots on a line that fills as you go */
.rf-rail { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: var(--sp-7); }
.rf-rail::before, .rf-rail-fill { content: ""; position: absolute; left: 6px; right: calc(20% - 6px); top: 6px; height: 2px; background: var(--line); }
.rf-rail-fill { background: var(--cyan); transform-origin: left; transform: scaleX(0); transition: transform 600ms var(--ease-out); }
.rf-dot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--stone); font: 400 var(--label)/var(--label-lh) var(--font-mono); letter-spacing: var(--label-track); text-transform: uppercase; }
.rf-dot span { width: 14px; height: 14px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--line); font-size: 0; transition: background var(--med), border-color var(--med), transform var(--med) var(--ease-out); }
.rf-dot b { font-weight: 400; }
.rf-dot.done span { background: var(--cyan); border-color: var(--cyan); }
.rf-dot.on span { border-color: var(--cyan); background: var(--sheet); transform: scale(1.35); box-shadow: 0 0 0 5px var(--cyan-light); }
.rf-dot.on, .rf-dot.done { color: var(--ink); }

/* The question */
.rf-head { margin-bottom: var(--sp-6); }
.rf-head.swap { animation: rf-in 520ms var(--ease-out) both; }
.rf-n { color: var(--cyan); font-size: var(--small); font-weight: 500; }
.rf-q { font: 400 var(--display)/var(--display-lh) var(--font-display); letter-spacing: -0.02em; margin: var(--sp-1) 0 var(--sp-2); }
.rf-hint { color: var(--text-2); max-width: 52ch; }
.rf-stage { flex: 1; }
.rf-step { display: none; }
.rf-step.on { display: block; animation: rf-in 520ms var(--ease-out) both; }
@keyframes rf-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 28px)); } }
.rf-step > * + * { margin-top: var(--sp-4); }

/* Photo */
.rf-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-2); min-height: 280px; border: 2px dashed #c9d3f5; border-radius: var(--radius); background: var(--cyan-light); color: var(--cyan-dark); text-align: center; cursor: pointer; transition: background var(--fast), border-color var(--fast), min-height 500ms var(--ease-out); }
.rf-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rf-drop:hover, .rf-drop.drag { border-color: var(--cyan); background: #dde5ff; }
.rf-drop-ico { font-size: 40px; transition: transform 400ms var(--ease-out); }
.rf-drop:hover .rf-drop-ico { transform: translateY(-4px) rotate(-6deg); }
.rf-drop b { font-weight: 500; font-size: 18px; }
.rf-drop small { color: var(--stone); }
.rf-drop.has { min-height: 72px; flex-direction: row; }
.rf-drop.has .rf-drop-ico { font-size: 22px; }
.rf-drop.has b::after { content: " (add more)"; font-weight: 400; color: var(--stone); }
.rf-drop.has small { display: none; }
.rf-drop.full { opacity: 0.4; pointer-events: none; }
.rf .pgrid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin: var(--sp-3) 0 0; }
.rf .pitem { border: 0; border-radius: var(--radius-sm); animation: pop 420ms var(--ease-out) both; animation-delay: var(--d); }
.rf .pitem span { border-radius: 4px; }
.rf .pitem button { border-radius: 50%; background: rgba(255, 255, 255, 0.9); }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }

/* Place */
.rf .loc-wrap { position: relative; }
.rf-search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--stone); font-size: 18px; z-index: 1; }
.rf #rspec { height: 52px; padding-left: 42px; font-size: 17px; border-radius: var(--radius); border: 1px solid var(--line); }
.rf #rspec:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-light); }
.rf .loc-results { top: calc(100% + 6px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16, 35, 26, 0.1); overflow: hidden; }
.rf .loc-item:hover { background: var(--cyan-light); }
.rf .pin-wrap { height: min(52vh, 420px); border: 0; border-radius: var(--radius); overflow: hidden; }
.rf .pin-gps { right: auto; left: var(--sp-3); bottom: var(--sp-3); height: 34px; padding: 0 var(--sp-3); gap: 6px; text-transform: none; font-family: var(--font); font-size: var(--small); background: #fff; box-shadow: 0 2px 8px rgba(16, 35, 26, 0.12); border: 0; }
.rf .pin-marker::before { background: var(--cyan); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.rf .pin-codes { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); font-size: var(--small); color: var(--text-2); }
.rf .pin-codes span:empty { display: none; }
#pin-dp, #pin-pc { font-family: var(--font-mono); font-size: var(--label); color: var(--stone); }
.rf-more summary { cursor: pointer; color: var(--cyan-dark); font-size: var(--small); list-style: none; }
.rf-more summary::-webkit-details-marker { display: none; }
.rf-more summary::after { content: " +"; font-family: var(--font-mono); }
.rf-more[open] summary::after { content: " −"; }

/* Kind: big tiles, staggered in */
.rf-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.rf .ccard { position: relative; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); min-height: 104px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; animation: pop 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 30ms); transition: border-color var(--fast), background var(--fast), transform var(--fast); }
.rf .ccard-ico { font-size: 26px; color: var(--ink); }
.rf .ccard-l { font-weight: 500; }
.rf .ccard-tick { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: #fff; font-size: 13px; opacity: 0; transform: scale(0.5); transition: opacity var(--fast), transform 300ms var(--ease-out); }
.rf .ccard:hover { border-color: #c9d3f5; transform: translateY(-2px); }
.rf .ccard.on { border-color: var(--cyan); background: var(--cyan-light); }
.rf .ccard.on .ccard-tick { opacity: 1; transform: none; }
.rf-sub { margin-top: var(--sp-6) !important; color: var(--text-2); }
.rf .tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.rf .tagb { height: 36px; padding: 0 var(--sp-4); border: 1px solid var(--line); border-radius: 999px; background: #fff; text-transform: none; font-family: var(--font); font-size: var(--small); letter-spacing: 0; transition: background var(--fast), border-color var(--fast), color var(--fast); }
.rf .tagb:hover { border-color: #c9d3f5; }
.rf .tagb.on { background: var(--cyan); border-color: var(--cyan); color: #fff; }

/* Severity: a scale you press, filling like a thermometer */
.rf-scale { --at: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--sp-2); }
.rf-sev { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 2px; min-height: 140px; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-align: left; transition: border-color var(--fast), transform var(--fast); }
.rf-sev i { position: absolute; inset: auto 0 0 0; height: var(--h); background: var(--c); opacity: 0.18; transition: opacity var(--med), height 500ms var(--ease-out); }
.rf-sev b { position: relative; font-weight: 500; font-size: 17px; }
.rf-sev small { position: relative; color: var(--text-2); }
.rf-sev:hover { transform: translateY(-2px); border-color: var(--c); }
.rf-sev:hover i { opacity: 0.35; }
.rf-sev.on { border-color: var(--c); }
.rf-sev.on i { opacity: 1; height: 100%; }
.rf-sev.on b, .rf-sev.on small { color: #fff; }
.rf-sev:nth-child(1).on b, .rf-sev:nth-child(1).on small { color: var(--ink); }
.rf-flag { margin-top: var(--sp-3) !important; }
.rf-flag.on { background: var(--sev-4) !important; border-color: var(--sev-4) !important; }
.rf textarea { border-radius: var(--radius); border: 1px solid var(--line); padding: var(--sp-3); min-height: 96px; }
.rf textarea:focus, .rf input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-light); }

/* You */
.rf-name input { height: 56px; font-size: 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.rf-review { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.rf-review div { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--sp-3); align-items: baseline; padding: var(--sp-3) var(--sp-4); }
.rf-review div + div { border-top: 1px solid var(--line); }
.rf-review dt { font: 400 var(--label)/var(--label-lh) var(--font-mono); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--stone); }
.rf-review dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf #submit { height: 52px; font-size: 13px; }

/* Bottom nav */
.rf-nav { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.rf-nav .sign { margin-left: auto; height: 44px; padding: 0 var(--sp-5); border-radius: 999px; }
.rf-nav .plate-btn { height: 44px; border-radius: 999px; border-color: transparent; }
.rf-err { color: var(--clay); font-size: var(--small); }
.rf-err.shake { animation: shake 360ms var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* Live panel: the specimen grows as you answer */
.rf-live { position: sticky; top: calc(var(--bar) + var(--sp-5)); display: flex; flex-direction: column; gap: var(--sp-4); }
.rf-live-spec { border-radius: var(--radius); overflow: hidden; background: var(--cyan); }
.rf-live-spec .specimen { border-radius: 0; }
.rf-live-row { display: flex; gap: var(--sp-4); align-items: flex-start; }
.rf-live-row > div:first-child { display: flex; flex-direction: column; }
.rf-pts { font: 400 48px/1 var(--font-display); color: var(--moss); display: inline-block; }
.rf-pts.bump { animation: bump 500ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.18); } }
.rf .pv-parts { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 18px; }
.rf .pv-parts span { padding: 2px 8px; border-radius: 999px; background: var(--paper); font-size: var(--label); font-family: var(--font-mono); animation: pop 300ms var(--ease-out) both; }
.rf .pv-parts b { color: var(--moss); font-weight: 400; }
.rf .lvlbar { border-radius: 999px; overflow: hidden; height: 8px; }
.rf .pv-lvl p { margin-top: var(--sp-2); }
.rf-live-note { font-size: var(--small); color: var(--stone); }

@media (max-width: 900px) {
  .rf { grid-template-columns: 1fr; gap: var(--sp-5); padding-top: var(--sp-4); }
  .rf-live { position: static; order: -1; flex-direction: row; align-items: center; gap: var(--sp-3); }
  .rf-live-spec { width: 84px; flex: none; }
  .rf-live-note, .rf .pv-lvl { display: none; }
  .rf-pts { font-size: 32px; }
  .rf .pv-parts { padding-top: 0; }
  .rf-live-row { flex-direction: column; gap: var(--sp-1); }
  .rf-rail { margin-bottom: var(--sp-5); }
  .rf-dot b { display: none; }
  .rf-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-scale { grid-template-columns: 1fr; }
  .rf-sev { min-height: 72px; }
  .rf-main { min-height: 0; }
  .rf-nav { position: sticky; bottom: calc(48px + env(safe-area-inset-bottom)); background: var(--sheet); padding-bottom: var(--sp-3); z-index: 5; }
}

/* ───────── v8: less textbook, more product ───────── */
/* Ground is tinted; anything white now reads as a surface on it. */
body { background: var(--ground); }
.bar, .menu, .drawer, .toast, .status, .title-block { background: var(--sheet); }
.fig-map, .pin-wrap, .rf-review, .rf .ccard, .rf-sev, .rf .tagb, .rf textarea, .rf input, .rf-drop { box-shadow: 0 1px 2px rgba(20, 30, 60, 0.05); }
.rf .ccard, .rf-sev, .rf .tagb, .rf-review { border-color: #e1e6f0; }

/* Labels and buttons: sentence case in the sans, not uppercase typewriter. Mono stays for numbers and coordinates. */
.t-label, .label, .kicker, .tab, .seg button, .sign, .plate-btn, .stat-l, .field label, .field > span, .lbl, th, .tag, .shield, .stage,
.badge-pill, .gd-toggles button, .city-locate, .fig-key, .gr-l, .step-n, .lrow-i, .hud span, .anno span, .req, .menu-keys,
.rf-dot, .rf-review dt, .tb-cells dt, .spec-key dt, .city-meta {
  font-family: var(--font); text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 18px; font-weight: 500;
}
.label, .kicker, .stat-l, .tb-cells dt, .spec-key dt, .rf-review dt { font-weight: 500; color: var(--stone); }
.kicker { color: var(--cyan); }
.tab { font-size: 14px; }
.sign, .plate-btn { font-size: 14px; border-radius: 999px; padding: 0 var(--sp-5); }
.sign-report { border-radius: 999px; font-weight: 600; letter-spacing: 0.01em; text-shadow: none; }
.icon-plate { border-radius: 999px; }
.city-btn { border-radius: 999px; background: var(--sheet); }
.seg { border-radius: 999px; padding: 3px; gap: 2px; background: var(--sheet); }
.seg button { border-radius: 999px; }
.seg-thumb { border-radius: 999px; top: 3px; bottom: 3px; }
.ph-duotone::before { color: var(--cyan); opacity: 0.28 !important; }

/* Map hover card: a small glass card, not a sticky note */
.map-tip { width: 260px; border: 0 !important; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); box-shadow: 0 1px 2px rgba(20, 30, 60, 0.08), 0 12px 32px rgba(20, 30, 60, 0.16); transform-origin: top left; transition: opacity 180ms var(--ease-out), scale 180ms var(--ease-out); scale: 0.96; }
.map-tip.on { scale: 1; }
.tip-img { display: block; width: 100%; height: 120px; object-fit: cover; }
.tip-b { padding: 12px 14px; gap: 4px; }
.tip-k { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.tip-k .ph-duotone { font-size: 16px; color: var(--ink); }
.tip-sev { margin-left: auto; font-style: normal; padding: 1px 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: 11px; }
.tip-t { font-weight: 600; font-size: 15px; line-height: 20px; }
.tip-big { display: flex; align-items: center; gap: 12px; }
.tip-big b { font: 400 44px/1 var(--font-display); color: var(--clay); }
.tip-big span { font-size: 12px; line-height: 16px; color: var(--text-2); }
.tip-big strong { font-size: 15px; color: var(--ink); font-weight: 600; }
.tip-mix { display: flex; gap: 2px; height: 6px; margin: 8px 0 4px; border-radius: 999px; overflow: hidden; background: var(--line); }
.tip-kinds { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.tip-kinds span { display: flex; align-items: center; gap: 6px; }
.tip-kinds em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--stone); }
.tip-hint { margin-top: 6px; font-size: 11px; color: var(--cyan); }
/* Annotations: pill labels on a hairline stalk */
.anno i { background: var(--ink); opacity: 0.5; }
.anno span { background: #fff; border-radius: 999px; padding: 4px 12px; box-shadow: 0 2px 10px rgba(20, 30, 60, 0.14); font-size: 12px; }
.anno-l span { right: -12px; }
.anno span { left: -12px; }
.anno:hover span, .anno:focus-visible span { background: var(--ink); color: #fff; }
.anno:hover b, .anno:focus-visible b { color: #fff; }

/* ───────── Garden: the living panorama ───────── */
.gd-stage { border-bottom: 0; background: #7fc0f5; }
.gd-canvas { position: absolute; inset: 0; touch-action: pan-y; }
.gd-canvas canvas { display: block; }
.gd-hud { position: absolute; left: var(--gutter); right: var(--gutter); top: var(--sp-4); z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); pointer-events: none; }
.gd-hud > * { pointer-events: auto; }
.gd-sky { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gd-sky button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); transition: background var(--fast); }
.gd-sky button:hover { background: rgba(255, 255, 255, 0.5); }
.gd-sky button.on { background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 60, 0.12); }
.gd-drag { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 12px; color: var(--ink); }
.gd-stage[data-sky="night"] .gd-sky, .gd-stage[data-sky="night"] .gd-drag, .gd-stage[data-sky="dusk"] .gd-drag { background: rgba(10, 20, 50, 0.45); color: #fff; }
.gd-stage[data-sky="night"] .gd-sky button { color: #fff; }
.gd-stage[data-sky="night"] .gd-sky button.on { color: var(--ink); }
.gd-label { width: 240px; padding: 12px 14px; gap: 3px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 12px 32px rgba(20, 30, 60, 0.18); pointer-events: auto; transition: opacity 160ms var(--ease-out); }
.gd-label b { font: 400 22px/26px var(--font-display); }
.gd-label span { font-size: 13px; color: var(--text-2); }
.gd-l-stage { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: #e3f5e6; color: #15803a !important; font-size: 11px !important; font-weight: 600; }
.gd-label a { display: inline-flex; gap: 4px; align-items: center; color: var(--cyan); font-weight: 500; }
.gd-caption { background: var(--sheet); border-bottom: 1px solid var(--line); }
.gd-line b { font: 400 40px/1 var(--font-display); color: var(--moss); }
.gd-toggles button { border: 1px solid var(--line); border-radius: 999px; padding: 0 var(--sp-4); height: 34px; background: var(--sheet); }
.gd-toggles button:hover { background: var(--paper); }
.gd-toggles button[aria-expanded="true"], .gd-toggles button[aria-pressed="true"] { background: var(--cyan); color: #fff; border-color: var(--cyan); }
@media (max-width: 720px) { .gd-drag { display: none; } .gd-sky button { padding: 0 10px; } }

/* ───────── Bar v9: one rhythm. 60px tall, every control 36px, 8px between related things. ───────── */
:root { --bar: 60px; }
.bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; height: var(--bar); padding: 0 20px; border-bottom: 1px solid rgba(20, 30, 60, 0.08); background: rgba(255, 255, 255, 0.82); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); }
.bar-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand { gap: 8px; }
.brand-mark svg, .brand-mark .spot-mark { width: 28px; height: 28px; display: block; }
.brand-word { font-size: 21px; letter-spacing: -0.015em; }
.city-btn { height: 32px; padding: 0 10px 0 12px; gap: 8px; border: 0; background: rgba(20, 30, 60, 0.05); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink); }
.city-btn::before { content: none; }
.city-btn:hover { background: rgba(20, 30, 60, 0.09); border: 0; }
.city-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-light); flex: none; }
.i-chev { width: 12px; height: 12px; color: var(--stone); flex: none; }

@media (min-width: 721px) {
  .tabs { position: relative; height: 36px; margin: 0; padding: 3px; gap: 0; align-self: center; border-radius: 999px; background: rgba(20, 30, 60, 0.05); }
  .tab { position: relative; z-index: 1; height: 30px; padding: 0 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--text-2); }
  .tab:hover { color: var(--ink); }
  .tab.on { color: var(--ink); }
  .tab-ink { top: 3px; bottom: auto; left: 0; height: 30px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 60, 0.1), 0 2px 8px rgba(20, 30, 60, 0.06); transition: transform 420ms var(--ease-out), width 420ms var(--ease-out); }
}
.bar-right { justify-self: end; gap: 8px; }
.more-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--text-2); transition: background var(--fast), color var(--fast); }
.more-btn svg { width: 20px; height: 20px; fill: currentColor; }
.more-btn:hover, .more-btn[aria-expanded="true"] { background: rgba(20, 30, 60, 0.06); color: var(--ink); }
.bar .sign-report { height: 36px; padding: 0 16px 0 12px; gap: 6px; font-size: 14px; font-weight: 600; }
.i-plus { width: 14px; height: 14px; flex: none; }
.bar .sign-report .ph-duotone { display: none; }

/* More menu: compact, tile icons, a tidy keys row */
.menu { width: 296px; top: calc(100% + 10px); padding: 6px; border: 1px solid rgba(20, 30, 60, 0.08); border-radius: 14px; box-shadow: 0 2px 4px rgba(20, 30, 60, 0.04), 0 16px 40px rgba(20, 30, 60, 0.14); transform: translateY(-6px) scale(0.98); transform-origin: top right; }
.menu.open { transform: none; }
.menu a { align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 10px; }
.menu a + a { border: 0; }
.menu a:hover { background: rgba(20, 30, 60, 0.05); }
.mi { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--cyan-light); color: var(--cyan); font-size: 18px; }
.mi .ph-duotone::before { opacity: 0.3 !important; }
.menu a b { font-size: 14px; line-height: 18px; font-weight: 600; }
.menu a small { display: block; font-size: 12px; line-height: 16px; color: var(--stone); }
.menu-keys { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; margin: 6px 4px 2px; padding: 10px 6px 4px; border-top: 1px solid rgba(20, 30, 60, 0.08); font-size: 12px; font-weight: 500; color: var(--stone); line-height: 1; }
.menu-keys span { display: inline-flex; align-items: center; gap: 6px; }
.menu kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin: 0; padding: 0 4px; border: 0; border-radius: 5px; background: rgba(20, 30, 60, 0.06); box-shadow: inset 0 -1px 0 rgba(20, 30, 60, 0.12); font: 500 11px/1 var(--font-mono); color: var(--ink); }

@media (max-width: 720px) {
  .bar { grid-template-columns: 1fr auto; padding: 0 12px; }
  .bar .sign-report span { display: none; }
  .bar .sign-report { width: 36px; padding: 0; justify-content: center; }
  .tabs { height: 56px; gap: 0; }
  .tab { flex: 1; justify-content: center; font-size: 13px; font-weight: 500; }
  .tab-ink { height: 2px; top: -1px; }
  .city-btn { max-width: 140px; }
}

/* Footer: one line, no repeats of the bar */
.title-block { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding: 20px var(--gutter); background: transparent; border-top: 1px solid rgba(20, 30, 60, 0.08); font-size: 13px; color: var(--stone); }
.ft-links { display: flex; gap: 20px; }
.ft-links a { color: var(--text-2); text-decoration: none; }
.ft-links a:hover { color: var(--cyan); }

/* No orange: problems use the blue scale, errors use a plain red */
.toast-err .toast-dot, .city-meta.off::before { background: var(--danger); }
.rf-err { color: var(--danger); }
.step-card .label { color: var(--cyan); }
.bar-t b { background: var(--cyan); }
.globe-mark b { background: var(--cyan); }
.tip-big b { color: var(--cyan); }

/* Map full screen */
.fig-full { position: absolute; right: 12px; top: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 3px rgba(20, 30, 60, 0.14); font-size: 13px; font-weight: 500; color: var(--ink); transition: background var(--fast), scale var(--fast); }
.fig-full:hover { background: #fff; }
.fig-full svg { width: 15px; height: 15px; }
.fig-full .i-col, .fig-map.full .fig-full .i-exp { display: none; }
.fig-map.full .fig-full .i-col { display: block; }
.fig-map.full { position: fixed !important; inset: 0; z-index: 140; width: 100vw; height: 100dvh !important; border: 0; border-radius: 0; animation: full-in 420ms var(--ease-out); }
@keyframes full-in { from { opacity: 0; transform: scale(0.97); } }
.fig-map.full .map { position: absolute; inset: 0; }
body.map-full { overflow: hidden; }
body.map-full .bar, body.map-full .tabs { visibility: hidden; }
.fig-map:fullscreen { width: 100vw; height: 100vh; }

/* Who is this? */
.who-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--sheet); border: 1px solid #e1e6f0; animation: pop 320ms var(--ease-out) both; }
.who-card > b { font-weight: 600; }
.who-card > span { font-size: 13px; color: var(--text-2); }
.who-ok { background: #e3f5e6; border-color: transparent; }
.who-ask { background: var(--cyan-light); border-color: transparent; }
.who-opts { display: grid; gap: 8px; margin-top: 8px; }
.who-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid #d6def7; text-align: left; transition: border-color var(--fast), transform var(--fast); }
.who-opt:hover { border-color: var(--cyan); transform: translateY(-1px); }
.who-opt b { font-weight: 600; color: var(--cyan-dark); }
.who-opt span { font-size: 12px; color: var(--text-2); }
.who-new b { color: var(--ink); }

.globe-mark i { width: 10px; height: 10px; margin: 0 2px 0 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-light); }

/* Globe exit: quick and crisp, no blur */
.city.leaving { animation: fadeout 0.5s cubic-bezier(0.4, 0, 1, 1) forwards; }
.city.leaving #globe { transform: scale(1.18); filter: none; transition: transform 0.5s cubic-bezier(0.4, 0, 1, 1); }



/* ───────── Keepers board ───────── */
#gd-keepers { max-width: 920px; margin: 0 auto; padding: var(--sp-6) var(--gutter) var(--sp-7); }
.kp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kp-search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--sheet); border: 1px solid #e1e6f0; }
.kp-search span { color: var(--stone); font-size: 16px; display: grid; }
.kp-search input { border: 0 !important; height: 34px; padding: 0; background: transparent; box-shadow: none !important; font-size: 14px; width: 160px; }
.kp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kp-row { border-radius: 14px; background: var(--sheet); border: 1px solid #e6eaf2; overflow: hidden; animation: pop 380ms var(--ease-out) both; animation-delay: calc(var(--i) * 25ms); transition: border-color var(--fast), box-shadow var(--med); }
.kp-row:hover { border-color: #cfd8f2; }
.kp-row.open { border-color: var(--cyan); box-shadow: 0 8px 28px rgba(36, 72, 216, 0.12); }
.kp-row.me { background: linear-gradient(90deg, var(--cyan-light), #fff 40%); }
.kp-main { width: 100%; display: grid; grid-template-columns: 28px 36px minmax(0, 1.4fr) 60px minmax(60px, 1fr) 54px 44px; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; }
.kp-rank { font: 500 13px/1 var(--font-mono); color: var(--stone); text-align: center; }
.top .kp-rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--cyan); }
.top-2 .kp-rank { background: #6d84ea; }
.top-3 .kp-rank { background: #a8b6f2; }
.kp-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--h) 14%, white); color: var(--h); font: 600 13px/1 var(--font); }
.kp-who { display: flex; flex-direction: column; min-width: 0; }
.kp-who b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-who small { font-size: 12px; color: var(--stone); }
.kp-tag { font-style: normal; font-weight: 400; color: var(--stone); font-size: 12px; }
.kp-you { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--cyan); color: #fff; vertical-align: 2px; }
.kp-spark { width: 60px; height: 16px; fill: #c3cdf5; }
.kp-row:hover .kp-spark, .kp-row.open .kp-spark { fill: var(--cyan); }
.kp-bar { height: 6px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.kp-bar i { display: block; height: 100%; border-radius: 999px; background: var(--cyan); transform-origin: left; animation: grow-x 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 25ms + 120ms); }
@keyframes grow-x { from { transform: scaleX(0); } }
.kp-pts { text-align: right; line-height: 1; }
.kp-pts b { font: 400 22px/1 var(--font-display); }
.kp-pts small { display: block; font-size: 11px; color: var(--stone); margin-top: 2px; }
.kp-trees { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; font: 500 13px/1 var(--font-mono); color: var(--moss); }
.kp-trees .ph-duotone { font-size: 16px; }
.kp-trees .ph-duotone::before { color: var(--moss); }
.kp-more { display: grid; gap: 14px; padding: 4px 16px 16px 90px; animation: rf-in 360ms var(--ease-out) both; }
.kp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kp-stats div { padding: 10px 12px; border-radius: 10px; background: #f4f6fb; }
.kp-stats small { display: block; font-size: 11px; color: var(--stone); }
.kp-stats b { font: 400 20px/1.2 var(--font-display); }
.kp-cats, .kp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.kp-cats span { padding: 4px 10px; border-radius: 999px; background: #f4f6fb; font-size: 12px; }
.kp-cats em { font-style: normal; color: var(--stone); margin-left: 2px; }
.kp-badges span { padding: 4px 10px; border-radius: 999px; background: #e3f5e6; color: #15803a; font-size: 12px; font-weight: 600; }
.kp-latest { display: grid; gap: 4px; }
.kp-latest a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: inherit; transition: background var(--fast); }
.kp-latest a:hover { background: #f4f6fb; }
.kp-latest b { font-weight: 500; font-size: 14px; }
.kp-latest small { color: var(--stone); font-size: 12px; white-space: nowrap; }
.kp-show { justify-self: start; gap: 6px; }
.kp-empty { padding: 24px; text-align: center; color: var(--stone); }
.kp-foot { margin-top: 16px; font-size: 13px; }
@media (max-width: 720px) {
  .kp-main { grid-template-columns: 24px 32px minmax(0, 1fr) 50px; gap: 10px; }
  .kp-spark, .kp-bar, .kp-trees { display: none; }
  .kp-more { padding: 4px 14px 14px; }
  .kp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kp-search input { width: 120px; }
}

.globe-mark.dot-only { padding: 3px; gap: 0; }
.globe-mark.dot-only span { display: none; }
.globe-mark.dot-only i { margin: 0; }
.globe-mark.dot-only:hover span, .globe-mark.dot-only:focus-visible span { display: inline; padding-right: 6px; }

/* Report a spot: the glossy pink pill. A highlight sweeps across it every few seconds, and on hover. */
.sign-report { background: linear-gradient(180deg, #ff8cc2 0%, #ff2e88 48%, #e3127a 52%, #ff3d91 100%); color: #fff; border: 1px solid #d4106a; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(120,0,50,.22), 0 2px 6px rgba(212,16,106,.28), 0 8px 20px rgba(255,46,136,.18); text-shadow: 0 1px 0 rgba(120,0,50,.35); }
.sign-report::after { content: ""; position: absolute; inset: -2px auto -2px -60%; width: 38%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent); transform: skewX(-20deg); animation: shine 5.5s cubic-bezier(.4,0,.2,1) 1.2s infinite; }
.sign-report:hover::after { animation: shine-now 700ms cubic-bezier(.4,0,.2,1); }
@keyframes shine { 0%, 82% { left: -60%; } 100% { left: 130%; } }
@keyframes shine-now { from { left: -60%; } to { left: 130%; } }
.sign-report:hover { background: linear-gradient(180deg, #ff9fcd 0%, #ff4396 48%, #e8187f 52%, #ff4a99 100%); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -2px 0 rgba(120,0,50,.22), 0 4px 10px rgba(212,16,106,.32), 0 14px 28px rgba(255,46,136,.22); }
.sign-report:active { transform: translateY(0); box-shadow: inset 0 2px 5px rgba(120,0,50,.4); }
.sign-report .i-plus { width: 15px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .sign-report::after { animation: none; } }

/* Offline is always said in red */
.off-word { color: #e5484d; font-weight: inherit; }
.city-meta.off .off-word { color: #ff6b6f; }
.city-meta.off::before { display: none; }
.status-off .spot-walk { opacity: .8; }
.ft-made a { color: var(--ink); font-weight: 600; text-decoration: none; background: linear-gradient(transparent 62%, #ffd6e8 62%); }
.ft-made a:hover { color: var(--pink-deep); }

/* Offline badge: same type as the rest, a live red dot, a clear red word */
.city-meta.off { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 12px; font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.city-meta.off::before { content: ""; display: block !important; width: 8px; height: 8px; margin: 0; border-radius: 50%; background: #ff4d4f !important; box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.6); animation: off-pulse 1.8s ease-out infinite; }
.city-meta.off .off-word, .off-word { font-family: var(--font) !important; font-weight: 600 !important; opacity: 1 !important; color: #e5383b; }
.city-meta.off .off-word { color: #ff5a5f !important; }
@keyframes off-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(255, 77, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); } }
@media (prefers-reduced-motion: reduce) { .city-meta.off::before { animation: none; } }

.ft-contrib { margin-left: 4px; color: var(--cyan); font-weight: 600; text-decoration: none; }
.ft-contrib:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Contributions welcome */
.contrib { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: var(--sp-7); padding: 28px; border-radius: 18px; background: linear-gradient(135deg, var(--cyan-light), #fff 70%); border: 1px solid #dbe3fb; }
.contrib > div:first-child { max-width: 56ch; display: flex; flex-direction: column; gap: 6px; }
.contrib .label { color: var(--cyan); }
.contrib p:last-child { color: var(--text-2); }
.contrib-actions { display: flex; gap: 8px; flex-wrap: wrap; }
