/* =========================================================
   Map Style guide — googlemap_api
   Same chrome as the Theme Palette guide: cool, neutral, so
   the only saturated thing on the page is the map itself.
   ========================================================= */

:root {
  --ink:        #14161a;
  --ink-2:      #3d4450;
  --ink-3:      #6b7280;
  --paper:      #f7f8fa;
  --paper-2:    #ffffff;
  --paper-3:    #eef0f4;
  --rule:       #dcdfe5;
  --rule-2:     #c6cad3;
  --accent:     #2347ce;
  --accent-ink: #ffffff;
  --accent-wash:#e8ecfb;

  --pass:       #0e7a5f;
  --pass-wash:  #e2f1ec;
  --fail:       #c0362c;
  --fail-wash:  #fbe9e7;
  --warn:       #b26b00;
  --warn-wash:  #fbf0dc;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --opts-w: 27rem;
  --shadow: 0 1px 2px rgba(20,22,26,.06), 0 8px 24px -12px rgba(20,22,26,.18);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:#e8eaee; --ink-2:#b3b9c4; --ink-3:#858c99;
    --paper:#101216; --paper-2:#171a20; --paper-3:#1e222a;
    --rule:#282c34; --rule-2:#3a4049;
    --accent:#8ba4ff; --accent-ink:#0d1017; --accent-wash:#1a2138;
    --pass:#4fc9a4; --pass-wash:#12281f;
    --fail:#ff8a7d; --fail-wash:#2c1512;
    --warn:#e0a54a; --warn-wash:#2a1f0d;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px -14px rgba(0,0,0,.8);
  }
}

:root[data-theme="dark"] {
  --ink:#e8eaee; --ink-2:#b3b9c4; --ink-3:#858c99;
  --paper:#101216; --paper-2:#171a20; --paper-3:#1e222a;
  --rule:#282c34; --rule-2:#3a4049;
  --accent:#8ba4ff; --accent-ink:#0d1017; --accent-wash:#1a2138;
  --pass:#4fc9a4; --pass-wash:#12281f;
  --fail:#ff8a7d; --fail-wash:#2c1512;
  --warn:#e0a54a; --warn-wash:#2a1f0d;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px -14px rgba(0,0,0,.8);
}
:root[data-theme="light"] {
  --ink:#14161a; --ink-2:#3d4450; --ink-3:#6b7280;
  --paper:#f7f8fa; --paper-2:#ffffff; --paper-3:#eef0f4;
  --rule:#dcdfe5; --rule-2:#c6cad3;
  --accent:#2347ce; --accent-ink:#ffffff; --accent-wash:#e8ecfb;
  --pass:#0e7a5f; --pass-wash:#e2f1ec;
  --fail:#c0362c; --fail-wash:#fbe9e7;
  --warn:#b26b00; --warn-wash:#fbf0dc;
  --shadow: 0 1px 2px rgba(20,22,26,.06), 0 8px 24px -12px rgba(20,22,26,.18);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }

:where(a, button, select, input, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; font: 600 .85rem/1 var(--sans);
}
.skip:focus { left: .5rem; top: .5rem; }

code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: .08em .34em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .5rem;
}

/* ============ TOP BAR ============ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-in {
  max-width: 100rem; margin: 0 auto;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  display: flex; align-items: center; gap: .6rem;
  font: 650 .95rem/1 var(--sans); letter-spacing: -.01em;
}
.wordmark .mark {
  width: 1.1rem; height: 1.1rem; border-radius: 2px; flex: none;
  background:
    linear-gradient(135deg, var(--accent) 0 50%, transparent 50% 100%),
    repeating-linear-gradient(45deg, var(--rule-2) 0 3px, var(--paper-2) 3px 6px);
  border: 1px solid var(--rule-2);
}
.wordmark-sub {
  font: 400 .75rem/1 var(--mono); color: var(--ink-3);
  padding-left: .6rem; border-left: 1px solid var(--rule);
}
@media (max-width: 700px) { .wordmark-sub { display: none; } }

.topbar-tools { display: flex; align-items: center; gap: .6rem; }

.live-dot {
  display: inline-flex; align-items: center; gap: .4rem;
  font: 500 .7rem/1 var(--mono); color: var(--ink-3);
  white-space: nowrap;
}
.live-dot::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--ink-3); flex: none;
}
.live-dot[data-state="live"] { color: var(--pass); }
.live-dot[data-state="live"]::before { background: var(--pass); }
.live-dot[data-state="error"] { color: var(--fail); }
.live-dot[data-state="error"]::before { background: var(--fail); }
@media (max-width: 560px) { .live-dot { display: none; } }

.ghost-btn {
  font: 500 .78rem/1 var(--mono);
  letter-spacing: .04em;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  padding: .45rem .7rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.ghost-btn.is-done { color: var(--pass); border-color: var(--pass); }
.ghost-btn.wide { width: 100%; text-align: center; padding: .6rem .7rem; }

/* the second Reset, at the end of the option groups */
.opts-foot { margin-top: .75rem; }

.seg { display: flex; border: 1px solid var(--rule-2); border-radius: 4px; overflow: hidden; flex: none; }
.seg-btn {
  font: 500 .6875rem/1 var(--mono); color: var(--ink-3);
  background: var(--paper-2); border: 0; padding: .4rem .6rem; cursor: pointer;
  white-space: nowrap;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--rule-2); }
.seg-btn.is-on { background: var(--accent); color: var(--accent-ink); }

/* ============ HERO ============ */
.hero { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.hero-in {
  max-width: 100rem; margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
}
.hero-in > .eyebrow { margin-bottom: .3rem; }
.hero h1 {
  font: 700 clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem)/1.12 var(--sans);
  letter-spacing: -.03em; text-wrap: balance;
  margin: 0 0 .6rem; max-width: 30ch;
}
.hero h1 code { font-size: .78em; background: none; border: 0; padding: 0; color: var(--accent); }
.lede {
  font-size: .95rem;
  color: var(--ink-2); max-width: 76ch; margin: 0;
}
.hero-points {
  list-style: none; margin: .9rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: .5rem 1.5rem; max-width: 82rem;
}
.hero-points li {
  font-size: .78rem; color: var(--ink-3); line-height: 1.45;
  padding-left: .8rem; border-left: 2px solid var(--rule-2);
}
.hero-points strong { color: var(--ink); display: block; font-weight: 600; }

/* Wide screens: the headline sits beside the copy instead of above it,
   which is most of the height saving. */
@media (min-width: 1181px) {
  .hero-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }
  .hero-in > .eyebrow { grid-column: 1; grid-row: 1; }
  .hero h1 { grid-column: 1; grid-row: 2; margin-bottom: 0; }
  .lede { grid-column: 2; grid-row: 1 / span 2; }
  .hero-points { grid-column: 2; grid-row: 3; margin-top: .8rem; }
}

/* ============ SHELL ============ */
.shell {
  max-width: 100rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: var(--opts-w) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}
.opts { grid-column: 1; grid-row: 1; min-width: 0; padding: 1.75rem 0 4rem; }
.stage { grid-column: 2; grid-row: 1; min-width: 0; }

@media (max-width: 1180px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .opts, .stage { grid-column: 1; }
  .stage { grid-row: 1; }
  .opts { grid-row: 2; }
}

/* ============ STAGE ============ */
.stage {
  position: sticky;
  top: 3.4rem;
  max-height: calc(100dvh - 4rem);
  display: flex; flex-direction: column;
  gap: .6rem;
  padding: 1.75rem 0 1rem;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* Opening the config panel on a narrow screen releases the sticky map,
   otherwise the two together fill the viewport. */
@media (max-width: 1180px) {
  .stage {
    padding: 1rem 0 .5rem;
    background: var(--paper);
    top: 3.1rem;
    max-height: none;
    overflow: visible;
  }
  .stage:has(.stage-code[open]) { position: static; }
}

.stage-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; flex-wrap: wrap;
}
.stage-head-right { display: flex; align-items: center; gap: .5rem; }
.preset {
  font: 400 .78rem/1 var(--sans);
  color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  padding: .45rem .5rem; max-width: 14rem;
}

.stage-map { flex: none; }
.map-frame {
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-2);
  position: relative;
  margin: 0 auto;
  width: 100%;
  transition: width .25s ease;
}
.map-frame[data-device="tablet"] { width: min(100%, 48rem); }
.map-frame[data-device="mobile"] { width: min(100%, 24.5rem); }

.map-canvas {
  width: 100%;
  height: 400px;
  background: #eaeaea;
}
.map-error {
  position: absolute; inset: 0;
  background: var(--paper-2);
  padding: clamp(1rem, 3vw, 2rem);
  display: flex; flex-direction: column; justify-content: center; gap: .6rem;
  z-index: 5;
}
/* display on a class rule outranks the browser's [hidden] rule, so it has to be
   said here or the card covers a perfectly good map. */
.map-error[hidden] { display: none; }
.map-error-title { margin: 0; font: 650 1rem/1.3 var(--sans); color: var(--fail); }
.map-error-body { margin: 0; font-size: .84rem; color: var(--ink-2); max-width: 62ch; }

.map-note {
  margin: .5rem 0 0; min-height: 1.2rem;
  font: 400 .75rem/1.4 var(--mono); color: var(--ink-3);
}
.map-note b { color: var(--warn); font-weight: 500; }

/* ---- generated config ---- */
.stage-code {
  border: 1px solid var(--rule-2);
  border-radius: var(--radius);
  background: var(--paper-2);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 0;
}
.stage-code > summary {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .5rem .7rem;
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  list-style: none;
}
.stage-code > summary::-webkit-details-marker { display: none; }
.stage-code > summary::after {
  content: "▸"; color: var(--ink-3); font-size: .7rem; order: 3;
}
.stage-code[open] > summary::after { content: "▾"; }
.code-title { font: 400 .6875rem/1 var(--mono); color: var(--ink-3); }
.changed-count {
  font: 500 .625rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); padding: .25rem .4rem; border-radius: 2px; background: var(--paper-2);
  border: 1px solid var(--rule);
}
.changed-count.is-live { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }

.code-tools {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .45rem .7rem; border-bottom: 1px solid var(--rule);
}
pre.code {
  margin: 0; padding: .8rem;
  font: 400 .74rem/1.7 var(--mono);
  color: var(--ink-2);
  overflow: auto;
  tab-size: 2;
  min-height: 0;
}
.stage-code pre.code { flex: 1 1 auto; max-height: 30vh; }
@media (max-width: 1180px) { .stage-code pre.code { max-height: none; } }

.c-key { color: var(--ink); }
.c-lit { color: var(--warn); }
.c-num { color: var(--accent); }
.c-cmt { color: var(--ink-3); font-style: italic; }
.c-line { display: block; }
.c-line.is-changed {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  box-shadow: inset 2px 0 0 var(--accent);
  border-radius: 0 3px 3px 0;
  padding-left: .45rem; margin-left: -.45rem;
}
.code-empty { color: var(--ink-3); font-style: italic; }

/* ============ OPTION GROUPS ============ */
.opts-intro { margin-bottom: 1.25rem; }
.opts-intro h2 {
  font: 650 1.35rem/1.2 var(--sans); letter-spacing: -.02em; margin: 0 0 .5rem;
}
.opts-lede { margin: 0; font-size: .875rem; color: var(--ink-2); }

.grp {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
  margin-bottom: .5rem;
  overflow: hidden;
}
.grp > summary {
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem .8rem;
  cursor: pointer;
  list-style: none;
}
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary::before {
  content: "▸"; color: var(--ink-3); font-size: .7rem; width: .7rem; flex: none;
}
.grp[open] > summary::before { content: "▾"; }
.grp[open] > summary { border-bottom: 1px solid var(--rule); background: var(--paper-3); }
.grp-title { font: 600 .875rem/1.2 var(--sans); }
.grp-count {
  margin-left: auto;
  font: 500 .625rem/1 var(--mono); letter-spacing: .08em;
  color: var(--ink-3);
}
.grp-count.is-live { color: var(--accent); }
.grp-body { padding: .3rem .8rem .8rem; }
.grp-note {
  margin: .6rem 0 .2rem; font-size: .78rem; color: var(--ink-3);
  padding: .5rem .6rem; background: var(--paper-3); border-radius: 4px;
  border-left: 2px solid var(--rule-2);
}

/* ---- one option ---- */
.opt { padding: .7rem 0; border-bottom: 1px dashed var(--rule); }
.opt:last-child { border-bottom: 0; }
.opt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; flex-wrap: wrap;
}
.opt-name {
  font: 500 .74rem/1.3 var(--mono); color: var(--ink);
  word-break: break-all;
}
.opt.is-changed .opt-name { color: var(--accent); }
.opt.is-changed .opt-name::after {
  content: "•"; margin-left: .3em; color: var(--accent);
}
.opt-help { margin: .35rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--ink-3); max-width: 46ch; }
.opt-help em { color: var(--ink-2); font-style: normal; }

/* dimmed when another setting overrides it */
.opt.is-inert { opacity: .45; }
.opt.is-inert .opt-ctl { pointer-events: none; }
.inert-tag {
  display: inline-block; margin-left: .4rem;
  font: 600 .5625rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--warn); border: 1px solid currentColor; border-radius: 2px;
  padding: .16em .3em; vertical-align: 1px;
}

.opt-ctl { display: flex; align-items: center; gap: .4rem; flex: none; }

input[type="text"], input[type="number"], select.ctl {
  font: 400 .76rem/1.2 var(--mono);
  color: var(--ink); background: var(--paper-2);
  border: 1px solid var(--rule-2); border-radius: 4px;
  padding: .32rem .4rem;
}
input[type="text"] { width: 9.5rem; }
input[type="text"].is-wide { width: 13rem; }
input[type="number"] { width: 5rem; }
select.ctl { max-width: 11rem; }
input::placeholder { color: var(--ink-3); opacity: .8; }

/* switch */
.sw {
  --w: 2.2rem;
  position: relative; width: var(--w); height: 1.2rem; flex: none;
  border-radius: 999px; border: 1px solid var(--rule-2); background: var(--paper-3);
  cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s;
}
.sw::after {
  content: ""; position: absolute; top: 1px; left: 1px;
  width: .95rem; height: .95rem; border-radius: 50%;
  background: var(--ink-3);
  transition: transform .15s, background .15s;
}
.sw[aria-checked="true"] { background: var(--accent-wash); border-color: var(--accent); }
.sw[aria-checked="true"]::after { transform: translateX(calc(var(--w) - 1.2rem)); background: var(--accent); }

/* slider */
.slider-wrap { display: flex; align-items: center; gap: .45rem; }
input[type="range"] { width: 7rem; accent-color: var(--accent); }
.slider-val {
  font: 500 .72rem/1 var(--mono); color: var(--ink-2);
  font-variant-numeric: tabular-nums; min-width: 2.2rem; text-align: right;
}

/* colour control: swatch + value, empty allowed */
.col {
  display: flex; align-items: center; gap: .35rem;
  border: 1px solid var(--rule-2); border-radius: 4px;
  padding: .15rem .25rem .15rem .15rem;
  background: var(--paper-2);
}
.col-swatch {
  position: relative; width: 1.35rem; height: 1.35rem; flex: none;
  border-radius: 3px; border: 1px solid var(--rule-2); overflow: hidden; padding: 0;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%),
    linear-gradient(45deg, var(--rule) 25%, transparent 25% 75%, var(--rule) 75%);
  background-size: 8px 8px; background-position: 0 0, 4px 4px;
}
.col-swatch i { position: absolute; inset: 0; display: block; }
.col-swatch input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  border: 0; padding: 0; cursor: pointer;
}
.col-val {
  font: 400 .72rem/1.2 var(--mono); color: var(--ink-2);
  background: none; border: 0; padding: 0; width: 6.5rem;
}
.col-val:focus { outline: none; color: var(--ink); }
.col-clear {
  font: 500 .8rem/1 var(--mono); color: var(--ink-3);
  background: none; border: 0; cursor: pointer; padding: 0 .15rem;
}
.col-clear:hover { color: var(--fail); }

/* small inline action, e.g. "use sample image" */
.mini-btn {
  font: 500 .625rem/1 var(--mono); letter-spacing: .04em;
  color: var(--ink-3); background: var(--paper-3);
  border: 1px solid var(--rule); border-radius: 3px;
  padding: .3rem .35rem; cursor: pointer;
}
.mini-btn:hover { color: var(--accent); border-color: var(--accent); }

/* pin-type segmented control gets its own row */
.opt.opt-wide .opt-head { flex-direction: column; align-items: stretch; }
.opt.opt-wide .opt-ctl { flex-wrap: wrap; }

/* pin_link: the keywords as a segmented control, plus the field for your own URL */
.linkmode { display: flex; flex-direction: column; gap: .45rem; width: 100%; }
.linkmode .seg { align-self: flex-start; }
.linkmode input[hidden] { display: none; }

/* ============ THE SPOT GROUP ============ */
/* Ordinary .opt rows: SPOT_ID is editable, the two below are readouts the page fills in. */
.spot-ctl { display: flex; align-items: center; gap: .4rem; }
input[type="text"].spot-id { width: 6rem; }

.spot-state {
  font: 500 .5625rem/1 var(--mono); letter-spacing: .06em;
  color: var(--ink-3); border: 1px solid var(--rule-2);
  border-radius: 999px; padding: .28em .5em; white-space: nowrap; flex: none;
}
.spot-state[data-state="loading"] { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.spot-state[data-state="ok"]      { color: var(--pass); border-color: var(--pass); background: var(--pass-wash); }
.spot-state[data-state="error"]   { color: var(--fail); border-color: var(--fail); background: var(--fail-wash); }

input[type="text"].spot-readout { color: var(--ink-3); cursor: default; width: 100%; }
input[type="text"].spot-readout.is-filled {
  color: var(--pass); border-color: var(--pass); background: var(--pass-wash);
}

.spot-link {
  font: 400 .7rem/1.5 var(--mono); color: var(--accent);
  overflow-wrap: anywhere; text-decoration: underline; display: block;
}
.spot-link:not([href]) { color: var(--ink-3); text-decoration: none; font-style: italic; }
.spot-link[data-kind="fallback"] { color: var(--warn); }

/* a row's running answer, under its help text */
.opt-note { margin: .4rem 0 0; font-size: .78rem; line-height: 1.45; color: var(--ink-2); max-width: 46ch; }
.opt-note[data-tone="warn"] { color: var(--warn); }

/* ============ EXPLANATION BLOCKS ============ */
.block { padding: clamp(2rem, 4vw, 3rem) 0 0; margin-top: 1.5rem; border-top: 1px solid var(--rule); }
.block h2 {
  font: 650 clamp(1.25rem, 1.1rem + .7vw, 1.6rem)/1.18 var(--sans);
  letter-spacing: -.025em; text-wrap: balance; margin: 0 0 .6rem;
}
.block-lede { color: var(--ink-2); font-size: .9rem; max-width: 70ch; margin: 0 0 1.25rem; }
.caption { font-size: .8125rem; color: var(--ink-3); max-width: 66ch; margin: 1rem 0 0; }

.vs { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.vs-card {
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  background: var(--paper-2); padding: 1rem; display: flex; flex-direction: column; gap: .7rem;
}
.vs-card header { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.vs-card h3 { font: 650 .98rem/1.2 var(--sans); margin: 0; letter-spacing: -.01em; }
.vs-card p { margin: 0; font-size: .84rem; color: var(--ink-2); }
.vs-card pre.code, .fork-card pre.code {
  background: var(--paper-3); border: 1px solid var(--rule);
  border-radius: 4px; padding: .6rem .7rem; font-size: .72rem; line-height: 1.6;
}
.vs-card.is-bad  { border-left: 3px solid var(--fail); }
.vs-card.is-good { border-left: 3px solid var(--pass); }

.tag {
  font: 600 .5875rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .4rem; border-radius: 2px;
}
.tag-bad  { background: var(--fail-wash); color: var(--fail); }
.tag-good { background: var(--pass-wash); color: var(--pass); }

.rule-callout {
  margin-top: 1rem; padding: .9rem 1rem;
  background: var(--accent-wash); border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.rule-callout p { margin: 0; font-size: .86rem; color: var(--ink); max-width: 76ch; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps > li {
  display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: .9rem;
  padding: 1rem 0; border-top: 1px dashed var(--rule);
}
.steps > li:first-child { border-top: 0; padding-top: 0; }
.step-n { font: 700 1.1rem/1.2 var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.steps h3 { font: 650 .95rem/1.3 var(--sans); letter-spacing: -.01em; margin: 0 0 .3rem; }
.steps h3 code { font-size: .9em; }
.steps p { margin: 0; color: var(--ink-2); font-size: .86rem; max-width: 70ch; }

.fork { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.fork-card {
  border: 1px solid var(--rule-2); border-radius: var(--radius);
  background: var(--paper-2); padding: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.fork-q {
  margin: 0; font: 500 .625rem/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.fork-card h3 { margin: 0; font: 650 .95rem/1.25 var(--sans); letter-spacing: -.015em; }
.fork-p { margin: 0; font-size: .82rem; color: var(--ink-2); }

.plain-list { display: flex; flex-direction: column; gap: .5rem; }
.plain-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-2); padding: .7rem .8rem;
}
.plain-row > code {
  background: none; border: 0; padding: 0; color: var(--ink);
  font-size: .78rem; overflow-wrap: anywhere;
}
.plain-row p { margin: 0; font-size: .84rem; color: var(--ink-2); }
.plain-row p code { overflow-wrap: anywhere; }

/* ============ FOOT ============ */
/* Sits at the bottom of the sticky stage, under the config panel. */
.foot {
  flex: none;
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}
.foot p { margin: 0; font-size: .78rem; color: var(--ink-3); max-width: 74ch; }
.foot-credit {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .7rem !important; padding-top: .6rem;
  border-top: 1px dashed var(--rule);
  font: 500 .78rem/1.4 var(--mono); letter-spacing: .02em;
  color: var(--ink-2) !important;
}
.foot-credit .mark {
  width: .95rem; height: .95rem; flex: none; border-radius: 2px;
  background:
    linear-gradient(135deg, var(--accent) 0 50%, transparent 50% 100%),
    repeating-linear-gradient(45deg, var(--rule-2) 0 3px, var(--paper-2) 3px 6px);
  border: 1px solid var(--rule-2);
}
.foot-credit strong { color: var(--ink); font-weight: 700; letter-spacing: .06em; }

/* ============ INFO WINDOW / CARD MARKER — copied from the section's own CSS ============ */
.gmap-api-info { line-height: 1.5; font-family: var(--sans); color: #1a1a1a;}
.gmap-api-info > * { display: block; }
.gmap-api-info a { color: #1a1a1a; }
.gmap-api-info-name { font-size: 1rem; }
.gmap-api-info-link { margin-top: .35rem; }

.map-canvas .gm-style-iw-d {
  overflow: auto !important;
  padding-right: 15px;
  padding-bottom: 15px;
}

.gmap-api-pin-card {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--gmap-card-bg, #fff);
  color: var(--gmap-card-color, #000);
  border: var(--gmap-card-border-width, 2px) solid var(--gmap-card-border-color, #508b4b);
  border-radius: var(--gmap-card-radius, 999px);
  padding: var(--gmap-card-padding, 5px 15px);
  font-size: var(--gmap-card-font-size, 13px);
  font-family: var(--sans);
  font-weight: 700; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--gmap-card-shadow, 0 3px 8px rgba(0,0,0,.3));
}
.gmap-api-pin-card-logo {
  width: var(--gmap-card-logo-size, 25px);
  height: var(--gmap-card-logo-size, 25px);
  max-width: none; border-radius: 50%; object-fit: cover; display: block; flex: none;
}

/* the custom Reset Zoom control, handed to the map by the script */
.gmap-api-reset-zoom {
  display: none; margin: 10px;
  font: 600 12px/1 var(--sans);
  background: #fff; color: #1a1a1a;
  border: 0; border-radius: 3px; padding: 9px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); cursor: pointer;
}
.gmap-api-reset-zoom.gmap-api-visible { display: block; }
