/* tienelicencia.com — shared design system. Pages: home, area summary, check, methodology (+ map.css for the map). */
:root {
  --paper: #f5f3ee; --surface: #ffffff; --surface-2: #faf9f6; --ink: #142036; --ink-2: #2c3a52; --muted: #5d6779;
  --line: #e3dfd5; --line-2: #d3cec2;
  --brand: #0d5a46; --brand-ink: #083a2e; --brand-2: #128062; --brand-soft: #e2efe9; --brand-wash: #f0f7f3;
  --gold: #c99a2e;
  --bad: #b3261e; --bad-2: #e07a3f; --bad-soft: #fbebe8; --warn: #9a5b06; --warn-soft: #fdf3e2;
  --shared: #6a46b3; --shared-soft: #f1ecfa; --ok: #0d6e4f; --ok-soft: #e3f2ea; --other: #2f62b5;
  --focus: #2f62b5;
  --radius: 10px; --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(20, 32, 54, .06), 0 1px 1px rgba(20, 32, 54, .04);
  --shadow-2: 0 10px 30px -12px rgba(20, 32, 54, .25), 0 2px 6px rgba(20, 32, 54, .06);
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f141c; --surface: #161d28; --surface-2: #1b2330; --ink: #e9edf3; --ink-2: #cdd5e1; --muted: #98a3b4;
    --line: #2a3443; --line-2: #364254;
    --brand: #4cc29a; --brand-ink: #8fe0c2; --brand-2: #3fae8a; --brand-soft: #173a30; --brand-wash: #132a24;
    --bad: #f0776c; --bad-2: #f2a06c; --bad-soft: #3a1d1b; --warn: #f0b45a; --warn-soft: #34270f;
    --shared: #b39af0; --shared-soft: #2a2140; --ok: #5fd0a6; --ok-soft: #14352a; --other: #7ea6ec; --focus: #7ea6ec;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans);
  font-feature-settings: "tnum" 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Language: content blocks carry lang="es" / lang="en"; only the active one shows. */
html[data-lang="es"] body [lang="en"], html[data-lang="en"] body [lang="es"] { display: none !important; }

/* ---------------------------------------------------------------- header */
.gov-strip { background: #142036; color: #c9d2df; font-size: 12.5px; }   /* fixed dark: --ink turns light in dark mode */
.gov-strip .wrap { display: flex; gap: 10px; align-items: center; min-height: 32px; }
.gov-strip b { color: #fff; font-weight: 600; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-word { font: 600 19px/1 var(--serif); letter-spacing: -.01em; }
.brand-word .q { color: var(--brand); }
.brand-word .tld { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; flex: none; background: var(--surface); }
.lang button { border: 0; background: transparent; color: var(--muted); font: 600 12.5px/1 var(--sans); letter-spacing: .04em;
  padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px;
  width: 40px; height: 40px; cursor: pointer; }
@media (max-width: 820px) {
  .site-header .wrap { gap: 12px; min-height: 60px; }
  .menu-btn { display: inline-grid; place-items: center; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 8px 16px 16px; box-shadow: var(--shadow-2); margin: 0; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 8px; font-size: 16px; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); padding-left: 12px; }
  .brand-word { font-size: 17px; }
  .gov-strip .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { background: #142036; color: #c9d2df; margin-top: 96px; font-size: 14px; }
.site-footer a { color: #fff; }
.site-footer .wrap { padding-top: 48px; padding-bottom: 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid h2 { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8f9bb0; margin-bottom: 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-word .tld { color: #8f9bb0; }
.site-footer .brand-word .q { color: #7fd3b3; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 20px; display: flex; gap: 16px;
  justify-content: space-between; flex-wrap: wrap; color: #8f9bb0; font-size: 13px; }
.built-by { color: #fff; font-weight: 600; }
.built-by a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.built-by a:hover { border-bottom-color: #fff; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } .site-footer { margin-top: 64px; } }

/* ---------------------------------------------------------------- type & common blocks */
.eyebrow { font: 600 12.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.display { font: 600 clamp(36px, 5.4vw, 60px)/1.04 var(--serif); letter-spacing: -.02em; }
.h2 { font: 600 clamp(26px, 3vw, 34px)/1.12 var(--serif); letter-spacing: -.01em; }
.h3 { font: 600 19px/1.25 var(--sans); }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { opacity: .5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 10px;
  font: 600 15.5px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.btn svg { width: 18px; height: 18px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.note { border-left: 3px solid var(--gold); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; }
.note.info { border-left-color: var(--other); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 5px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.shared { background: var(--shared-soft); color: var(--shared); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%;
  animation: sk 1.4s ease infinite; border-radius: 6px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------------------------------------------------------------- home */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .wrap { padding-top: 72px; padding-bottom: 72px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .display { margin: 16px 0 20px; }
.hero .display em { font-style: normal; color: var(--brand); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }
.hero-stat { position: absolute; left: -12px; bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; box-shadow: var(--shadow-2); max-width: 260px; }
.hero-stat b { font: 700 28px/1 var(--sans); color: var(--bad); display: block; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 44px; gap: 32px; }
  .hero-stat { left: 8px; }
}
.section { padding-top: 72px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 10px 0 0; max-width: 60ch; }
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.area-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); padding: 0; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.area-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-2); color: var(--ink); }
.area-card .art { height: 128px; background: var(--brand-wash); border-bottom: 1px solid var(--line); position: relative; }
.area-card .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.area-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.area-card .kind { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.area-card h3 { font: 600 24px/1.15 var(--serif); }
.area-card .stats { display: flex; gap: 22px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.area-card .stats b { display: block; font: 700 22px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.area-card .stats b.bad { color: var(--bad); }
.area-card .stats span { font-size: 12.5px; color: var(--muted); }
.area-card .go { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--brand); display: flex; align-items: center; gap: 6px; }
.area-card.soon { border-style: dashed; box-shadow: none; background: transparent; justify-content: center; align-items: flex-start; padding: 22px; }
.area-card.soon:hover { transform: none; box-shadow: none; }
@media (max-width: 900px) { .areas { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 28px 28px 0 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step .n { font: 600 14px/1 var(--serif); color: var(--brand); border: 1px solid var(--brand); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: 16px; }
.step h3 { font: 600 19px/1.25 var(--sans); margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } .step, .step + .step { padding: 24px 0 0; border-left: 0; } }
.sources { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; color: var(--muted); font-size: 14px; padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sources b { color: var(--ink-2); font-weight: 600; }

/* ---------------------------------------------------------------- search box (area page, home, map) */
.search { position: relative; }
.search form { display: flex; gap: 8px; }
.search .field { position: relative; flex: 1; min-width: 0; }
.search .field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; min-height: 52px; padding: 0 16px 0 44px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface);
  color: var(--ink); font: 400 16.5px/1 var(--sans); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search .btn { min-height: 52px; }
.search .hint { margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.search .hint button { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; }
.results { margin-top: 18px; display: grid; gap: 12px; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.result-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.result-head h3 { font: 600 18px/1.3 var(--sans); }
.result-head .meta { font-size: 14px; color: var(--muted); margin-top: 3px; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.result-actions .btn { min-height: 38px; padding: 0 14px; font-size: 14px; }
.result .licence-big { font: 700 22px/1.1 var(--sans); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.flats { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14.5px; }
.flats th { text-align: left; font: 600 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.flats td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.flats td.n, .flats th.n { text-align: right; font-variant-numeric: tabular-nums; }
.flats code { font: 600 13.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); white-space: nowrap; }
.flats .group td { background: var(--surface-2); font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding-left: 8px; }
.more { margin-top: 12px; border: 0; background: none; color: var(--brand); font: 600 14.5px/1 var(--sans); cursor: pointer; padding: 6px 0; }
.empty { padding: 22px; text-align: left; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-2); border-radius: 14px; }
@media (max-width: 640px) {
  .search form { flex-direction: column; }
  .flats .hide-sm { display: none; }
}

/* ---------------------------------------------------------------- area summary */
.area-hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.area-hero .wrap { padding-top: 36px; padding-bottom: 40px; }
.area-hero h1 { margin: 14px 0 10px; }
.area-hero .updated { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.area-hero .updated .live { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
.area-top { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; margin-top: 28px; }
.map-teaser { display: block; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); text-decoration: none;
  background: var(--brand-wash); aspect-ratio: 16 / 10; }
.map-teaser canvas, .map-teaser svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-teaser .label { position: absolute; left: 12px; right: 12px; bottom: 12px; background: var(--surface); color: var(--ink); border-radius: 10px;
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; box-shadow: var(--shadow-2); }
.map-teaser:hover .label { color: var(--brand); }
@media (max-width: 900px) { .area-top { grid-template-columns: 1fr; gap: 24px; } }
.toc { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; border-bottom: 1px solid var(--line); scrollbar-width: none; position: sticky; top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); z-index: 10; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.toc a:hover { border-color: var(--ink-2); }

.point { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 24px; padding: 48px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 64px; }
.point:last-of-type { border-bottom: 0; }
.point .idx { font: 600 15px/1 var(--serif); color: var(--muted); padding-top: 12px; border-top: 2px solid var(--ink); align-self: start; }
.point .figure { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.point .big { font: 700 clamp(44px, 6vw, 68px)/1 var(--sans); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--ink); }
.point .big.bad { color: var(--bad); }
.point .big.brand { color: var(--brand); }
.point .big .unit { font-size: .45em; letter-spacing: 0; color: var(--muted); font-weight: 600; margin-left: 4px; }
.point h2 { font: 600 clamp(20px, 2.2vw, 24px)/1.3 var(--serif); margin: 14px 0 8px; max-width: 46ch; }
.point p { color: var(--ink-2); max-width: 70ch; }
.point .viz { margin-top: 22px; }
.point .src { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
@media (max-width: 640px) {
  .point { grid-template-columns: 1fr; padding: 36px 0; }
  .point .idx { width: 40px; margin-bottom: 18px; }
}

/* charts — hand-built, single-baseline bars; values in text tokens */
.stack { display: flex; height: 22px; gap: 2px; border-radius: 4px; overflow: hidden; max-width: 760px; }
.stack span { display: block; height: 100%; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.legend > span { display: inline-flex; gap: 8px; align-items: center; }
.legend b { font-variant-numeric: tabular-nums; }
.legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.hbars { display: grid; gap: 10px; max-width: 760px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; gap: 14px; align-items: center; font-size: 14.5px; }
.hbar .lab { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 14px; background: var(--surface-2); border-radius: 0 4px 4px 0; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--brand-2); }
.hbar .fill.bad { background: var(--bad); }
.hbar .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbar[data-tip] { cursor: default; }
@media (max-width: 640px) { .hbar { grid-template-columns: 112px 1fr 52px; gap: 10px; font-size: 13.5px; } }
.cols { display: flex; align-items: flex-end; gap: 2px; height: 180px; max-width: 760px; border-bottom: 1px solid var(--line-2); position: relative; }
.cols .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; }
.cols .bar { width: 100%; max-width: 24px; background: var(--brand-2); border-radius: 4px 4px 0 0; min-height: 2px; }
.cols .col:hover .bar, .cols .col:focus .bar { background: var(--brand-ink); }
.cols .cap { font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.cols-x { display: flex; gap: 2px; max-width: 760px; margin-top: 6px; }
.cols-x span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--ink); color: var(--paper); font-size: 13px; padding: 7px 10px;
  border-radius: 8px; box-shadow: var(--shadow-2); max-width: 260px; opacity: 0; transition: opacity .08s; }
.tip.on { opacity: 1; }
table.data { width: 100%; max-width: 860px; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; font: 600 12px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-2); }
table.data td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); }
table.data .n { text-align: right; font-variant-numeric: tabular-nums; }
table.data .bar-cell { width: 34%; }
table.data .mini { height: 8px; background: var(--surface-2); border-radius: 0 3px 3px 0; position: relative; }
table.data .mini i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bad); border-radius: 0 3px 3px 0; }
table.data .mini i.brand { background: var(--brand-2); }
@media (max-width: 640px) { table.data .hide-sm { display: none; } table.data { font-size: 14px; } }
.cta-band { margin-top: 56px; background: var(--brand); color: #fff; border-radius: var(--radius-lg); padding: 36px 40px; display: flex;
  gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font: 600 26px/1.2 var(--serif); }
.cta-band p { margin: 8px 0 0; color: #cfe7dd; }
.cta-band .btn { background: #fff; color: var(--brand-ink); }
.cta-band .btn:hover { background: #e8f3ee; }
@media (max-width: 640px) { .cta-band { padding: 28px 24px; } }

/* ---------------------------------------------------------------- check page */
.check-card { padding: 28px; }
.check-tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); padding: 3px; border-radius: 10px; margin-bottom: 18px; }
.check-tabs button { border: 0; background: transparent; padding: 9px 14px; border-radius: 8px; font: 600 14px/1 var(--sans); color: var(--muted); cursor: pointer; }
.check-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.verdict { border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; margin-top: 22px; }
.verdict-head { padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; }
.verdict-head .icon { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.verdict-head .icon svg { width: 22px; height: 22px; }
.verdict.ok .verdict-head { background: var(--ok-soft); } .verdict.ok .icon { background: var(--ok); color: #fff; }
.verdict.bad .verdict-head { background: var(--bad-soft); } .verdict.bad .icon { background: var(--bad); color: #fff; }
.verdict.warn .verdict-head { background: var(--warn-soft); } .verdict.warn .icon { background: var(--warn); color: #fff; }
.verdict.shared .verdict-head { background: var(--shared-soft); } .verdict.shared .icon { background: var(--shared); color: #fff; }
.verdict.neutral .verdict-head { background: var(--surface-2); } .verdict.neutral .icon { background: var(--muted); color: #fff; }
.verdict-head h3 { font: 600 20px/1.3 var(--sans); }
.verdict-head p { margin: 6px 0 0; color: var(--ink-2); }
.verdict-body { padding: 18px 22px 22px; }
.verdict-body ul { margin: 0 0 12px; padding-left: 20px; }
.verdict-body li { margin: 4px 0; }

/* ---------------------------------------------------------------- methodology (long-form) */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; margin-top: 40px; }
.doc nav { position: sticky; top: 24px; align-self: start; font-size: 14.5px; }
.doc nav ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc nav a { display: block; padding: 6px 14px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.doc nav a:hover { color: var(--ink); border-left-color: var(--line-2); }
.doc nav a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.prose { max-width: 72ch; font-size: 17px; line-height: 1.7; }
.prose h2 { font: 600 30px/1.15 var(--serif); margin: 64px 0 16px; padding-top: 8px; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 600 19px/1.3 var(--sans); margin: 34px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin: .35em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 22px; line-height: 1.5; }
.prose th { text-align: left; background: var(--surface-2); font-weight: 600; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.prose .law { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 0 0 18px; }
.prose .law h3 { margin-top: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prose .law ul { margin-bottom: 0; }
.prose .src-list { font-size: 14px; color: var(--muted); }
.prose code { font: 600 .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.status { font: 600 11.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; }
.status.inforce { background: var(--ok-soft); color: var(--ok); }
.status.pending { background: var(--warn-soft); color: var(--warn); }
.status.unclear { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; gap: 20px; } .doc nav { position: static; } .doc nav ol { display: none; } }
@media (max-width: 640px) { .check-card { padding: 20px; } .check-card .row { flex-direction: column; } }

/* street autocomplete */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; list-style: none; margin: 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-2); max-height: 320px; overflow-y: auto; }
.suggest li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--brand-wash); }
.suggest .s-name { font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-num { color: var(--brand); }
.suggest .s-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; flex: none; }
.search .field { display: block; }

.hbar .track { overflow: visible; }
.hbar .mark, .mark-key { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.mark-key { position: relative; display: inline-block; height: 12px; top: 2px; margin-right: 4px; }
.figure .pill { align-self: center; }

.duo { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-end; }
.duo > div { display: flex; flex-direction: column; gap: 6px; }
.duo .lbl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); max-width: 30ch; }
.duo .lbl i, .legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.hbar.pair { align-items: center; }
.hbar .tracks { display: grid; gap: 3px; }
.hbar .track.thin { height: 8px; }
.hbar .fill.adv { background: var(--other); }
.hbar .val small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* ranking page */
.rank-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 28px 0 14px; }
.rank-tools input { width: 100%; min-height: 46px; padding: 0 14px 0 42px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: 400 15.5px var(--sans); }
.rank-tools .field svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; }
table.rank { max-width: none; }
table.rank th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-align: inherit; }
table.rank th button[aria-sort="descending"], table.rank th button[aria-sort="ascending"] { color: var(--ink); }
table.rank th.n button { text-align: right; }
table.rank .rank-i { color: var(--muted); width: 36px; font-size: 13px; }
.pct-cell { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.pct-cell > span:last-child { min-width: 48px; text-align: right; }
.pct-cell .over { font-weight: 700; }
.pct-bar { position: relative; width: 90px; height: 8px; background: var(--surface-2); border-radius: 0 3px 3px 0; }
.pct-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 3px 3px 0; background: var(--brand-2); }
.pct-bar.adv i { background: var(--other); }
.pct-bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
@media (max-width: 640px) { .pct-bar { display: none; } .table-scroll { padding: 4px 10px; } }

/* scatter */
.scatter { margin: 0; max-width: 760px; }
.scatter svg { width: 100%; height: auto; overflow: visible; }
.scatter .grid { stroke: var(--line); stroke-width: 1; }
.scatter .axis { stroke: var(--line-2); stroke-width: 1; }
.scatter .tick { font: 500 11.5px var(--sans); fill: var(--muted); }
.scatter .axlab { font: 500 12px var(--sans); fill: var(--ink-2); }
.scatter .dot { fill: var(--bad); stroke: var(--surface); stroke-width: 2; }
.scatter .hit { fill: transparent; }
.scatter .pt:hover .dot, .scatter .pt:focus .dot { fill: var(--ink); }
.scatter .plab { font: 600 12px var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; }

.small-multiples { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 780px; }
.small-multiples .legend-title { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
@media (max-width: 640px) { .small-multiples { grid-template-columns: 1fr; } }

/* cookie consent */
.consent { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-2);
  padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }
.consent p { margin: 0; flex: 1 1 320px; }
.consent-actions { display: flex; gap: 8px; }
.consent .btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.foot-legal a { color: #c9d2df; }

/* share */
.share-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  font: 600 13.5px/1 var(--sans); padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.share-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.share-menu { position: absolute; z-index: 95; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-2);
  padding: 6px; display: grid; min-width: 180px; }
.share-menu a, .share-menu button { display: block; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none;
  border: 0; background: none; font: 500 14.5px var(--sans); cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--brand-wash); }
.point-share { margin-top: 14px; }

/* loading */
.loading { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 18px 20px 16px; overflow: hidden; position: relative;
  animation: pulse 1.6s ease-in-out infinite; }
.loading p { margin: 10px 0 0; display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-weight: 500; }
.loading-bar { height: 4px; background: var(--brand-soft); border-radius: 2px; overflow: hidden; position: relative; }
.loading-bar span { position: absolute; top: 0; bottom: 0; width: 35%; background: var(--brand-2); border-radius: 2px; animation: slide 1.1s ease-in-out infinite; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes slide { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18, 128, 98, .0); } 50% { box-shadow: 0 0 0 4px rgba(18, 128, 98, .12); } }
@media (prefers-reduced-motion: reduce) { .loading, .loading-bar span, .spinner, .btn.busy::after { animation-duration: 3s; } }

/* home: hero actions, big stats, how-to */
.hero-actions.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; }
.action { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.action:first-child { background: var(--brand); border-color: var(--brand); color: #fff; }
.action:hover { border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px); color: inherit; }
.action:first-child:hover { color: #fff; background: var(--brand-ink); }
.action svg { width: 22px; height: 22px; flex: none; }
.action b { font-weight: 600; font-size: 15px; line-height: 1.25; }
@media (max-width: 520px) { .hero-actions.grid4 { grid-template-columns: 1fr; } }
.bigstats { background: #142036; color: #e9edf3; padding: 56px 0 48px; }
.bigstats .eyebrow { color: #7fd3b3; }
.bigstats .h2 { color: #fff; }
.bigstats .muted, .bigstats .tiny { color: #98a3b4; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; }
.stat { background: #142036; padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.stat > b { font: 700 clamp(34px, 4vw, 46px)/1 var(--sans); letter-spacing: -.02em; color: #fff; font-variant-numeric: tabular-nums; }
.stat > b.bad { color: #ff9b8f; }
.stat > b.gold { color: #f0c86a; }
.stat span { color: #cdd5e1; font-size: 15px; line-height: 1.45; }
.stat small { color: #98a3b4; font-size: 12.5px; }
.stat .share-btn { position: absolute; top: 14px; right: 14px; background: transparent; border-color: rgba(255,255,255,.2); color: #cdd5e1; padding: 6px 8px; }
.stat .share-btn span { display: none; }
.stat .share-btn:hover { border-color: #fff; color: #fff; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }
.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.howto-item { display: flex; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.howto-item:hover { border-color: var(--brand); color: var(--ink); }
.howto-item .n { font: 600 15px/1 var(--serif); color: var(--brand); border: 1px solid var(--brand); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex: none; }
.howto-item h3 { font: 600 17px/1.3 var(--sans); margin-bottom: 6px; }
.howto-item p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; } }

.compare { margin: 18px 0 6px; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.cmp-row { display: grid; grid-template-columns: minmax(150px, 260px) 1fr 64px; gap: 14px; align-items: center; margin: 6px 0; font-size: 14.5px; }
.cmp-row .track { height: 16px; background: var(--surface-2); border-radius: 0 4px 4px 0; position: relative; }
.cmp-row .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-2); border-radius: 0 4px 4px 0; }
.cmp-row .fill.adv { background: var(--other); }
.cmp-row b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .cmp-row { grid-template-columns: 1fr 56px; } .cmp-row .track { grid-column: 1 / -1; grid-row: 2; } }

.todo { background: #fff2b3; color: #6b4e00; padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:first-child { border-top: 1px solid var(--line); margin-top: 36px; }
.faq summary { cursor: pointer; list-style: none; font: 600 18px/1.35 var(--sans); padding: 16px 32px 16px 0; position: relative; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 26px/1 var(--sans); color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p, .faq details ul, .faq details ol { color: var(--ink-2); font-size: 16px; line-height: 1.65; margin: 0 0 14px; }
.faq details li { margin: 6px 0; }

.stat span b { color: #fff; font-weight: 600; }
