/* Page reset (the artifact host adds the same rules, so they are harmless there) */
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: sticky search bar over a map-led home; every entity has its own cross-linked page */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #141a2c;
  --muted: #576079;
  --line: #dde2ed;
  --azul: #1c4a9c;
  --azul-soft: #e5ecf9;
  --vinho: #8c1d40;
  --vinho-soft: #f8e7ed;
  --palha: #8a6a0c;
  --palha-soft: #f6efd6;
  --land: #e9edf5;
  --sea: #f5f7fb;
  /* compare series: validated categorical slots (light) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d111b; --surface: #151b29; --ink: #e7eaf3; --muted: #9ba4ba; --line: #283048;
    --azul: #93b3ff; --azul-soft: #1b2745; --vinho: #f08fae; --vinho-soft: #3b1828;
    --palha: #e5c763; --palha-soft: #302b17; --land: #1d2436; --sea: #0d111b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d111b; --surface: #151b29; --ink: #e7eaf3; --muted: #9ba4ba; --line: #283048;
  --azul: #93b3ff; --azul-soft: #1b2745; --vinho: #f08fae; --vinho-soft: #3b1828;
  --palha: #e5c763; --palha-soft: #302b17; --land: #1d2436; --sea: #0d111b;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--vinho); }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* header */
header.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.tile { width: 30px; height: 30px; border-radius: 4px; background:
  radial-gradient(circle at 50% 50%, var(--azul) 0 18%, transparent 19%),
  radial-gradient(circle at 0 0, var(--azul) 0 30%, transparent 31%),
  radial-gradient(circle at 100% 0, var(--azul) 0 30%, transparent 31%),
  radial-gradient(circle at 0 100%, var(--azul) 0 30%, transparent 31%),
  radial-gradient(circle at 100% 100%, var(--azul) 0 30%, transparent 31%),
  var(--azul-soft); border: 1px solid var(--azul); }
.brand b { font-family: var(--display); font-weight: 400; font-size: 1.2rem; letter-spacing: .01em; }
.search { flex: 1 1 320px; position: relative; min-width: 0; }
.search input { width: 100%; font: inherit; font-size: 15px; padding: 10px 40px 10px 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-soft); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; background: var(--surface); }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14.5px; padding: 6px 11px; border-radius: 999px; }
nav.tabs a:hover { color: var(--ink); background: var(--bg); }
nav.tabs a[aria-current="page"] { color: var(--azul); background: var(--azul-soft); }

main { padding-block: 32px 64px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: start; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-block: 10px 18px; }
.hero h1 em { font-style: normal; color: var(--vinho); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--azul); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats span { font-size: 13px; color: var(--muted); }
.asks { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.asks button { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.asks button:hover { border-color: var(--azul); color: var(--azul); }
.mapbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mapbox svg { display: block; width: 100%; height: auto; }
.mapnote { font-size: 12.5px; color: var(--muted); padding: 4px 6px 2px; }
.map .land { fill: var(--land); stroke: var(--muted); stroke-width: .8; stroke-linejoin: round; }
.map .inset { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.map .isl { fill: var(--land); stroke: var(--muted); stroke-width: .7; }
.map .cap { font-family: var(--mono); font-size: 9px; fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.map .city { fill: var(--muted); }
.map .citylbl { font-family: var(--body); font-size: 9px; fill: var(--muted); font-style: italic; }
.map a { cursor: pointer; }
.map .dot { fill: var(--vinho); stroke: var(--surface); stroke-width: 2; transition: r .15s; }
.map .hit { fill: transparent; }
.map .lbl { font-family: var(--body); font-weight: 600; font-size: 11px; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.map a:hover .dot, .map a:focus .dot, .map a.on .dot { r: 8; fill: var(--azul); }
.map a:hover .lbl, .map a.on .lbl { fill: var(--azul); }
.map a.dim .dot { fill: var(--muted); opacity: .45; }
.map a.dim .lbl { fill: var(--muted); }

section.block { margin-top: 56px; }
.bhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.bhead h2 { font-size: 1.75rem; }
.bhead a { font-size: 14.5px; font-weight: 500; }

/* grids & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; text-decoration: none; color: var(--ink); min-width: 0; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--azul); color: var(--ink); transform: translateY(-1px); }
.card h3 { font-size: 1.22rem; }
.card .sub { font-size: 13.5px; color: var(--muted); }
.card p { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; }
a.chip:hover { border-color: var(--azul); color: var(--azul); }
.sw { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sw.red { background: var(--vinho); }
.sw.white { background: var(--palha); }
.pill { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.pill.red { background: var(--vinho-soft); color: var(--vinho); }
.pill.white { background: var(--palha-soft); color: var(--palha); }
.pill.neutral { background: var(--azul-soft); color: var(--azul); }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); flex-wrap: wrap; }
.seg button { font: inherit; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--azul); color: var(--surface); }
select { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); max-width: 100%; }
.count { font-size: 13.5px; color: var(--muted); font-family: var(--mono); }
.pagehead { margin-bottom: 26px; max-width: 70ch; }
.pagehead h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-block: 6px 10px; }
.pagehead p { color: var(--muted); font-size: 1.05rem; }

/* detail */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.detail h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); margin-block: 8px 6px; }
.alt { color: var(--muted); font-size: 1.05rem; }
.say { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 4px; }
.prose { margin-top: 22px; font-size: 1.08rem; max-width: 65ch; display: grid; gap: 14px; }
.fact { margin-top: 22px; padding: 14px 18px; border-radius: 10px; background: var(--azul-soft); color: var(--ink); max-width: 65ch; font-size: 15px; }
.fact b { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); display: block; margin-bottom: 4px; font-weight: 500; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 18px; }
.facts dl { margin: 0; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 15px; }
.rel { margin-top: 36px; }
.rel h2 { font-size: 1.35rem; margin-bottom: 12px; }
.side { display: grid; gap: 16px; }
.tablewrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 560px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* search results */
.results { display: grid; gap: 30px; }
.rgroup h2 { font-size: 1.3rem; margin-bottom: 10px; }
.why { font-size: 12.5px; color: var(--azul); font-family: var(--mono); }
.empty { padding: 40px 0; color: var(--muted); max-width: 60ch; }
.empty b { color: var(--ink); }

/* glossary */
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 28px; }
.gloss div { padding: 14px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.gloss dt { font-family: var(--display); font-size: 1.15rem; }
.gloss dt small { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-left: 8px; letter-spacing: .04em; }
.gloss dd { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.gloss div:target, .gloss div.hl { background: var(--azul-soft); }

footer { border-top: 1px solid var(--line); padding-block: 26px; color: var(--muted); font-size: 13.5px; }

/* compare: entry points */
.cwrap { position: relative; display: flex; min-width: 0; }
.cwrap > .card { flex: 1; padding-bottom: 48px; }
.addc { position: absolute; right: 12px; bottom: 12px; font: inherit; font-size: 12.5px; font-weight: 500; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.addc:hover { border-color: var(--azul); color: var(--azul); }
.addc[aria-pressed="true"] { background: var(--azul-soft); border-color: var(--azul); color: var(--azul); }
.actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.btn { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--azul); background: var(--surface); color: var(--azul); cursor: pointer; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { color: var(--azul); background: var(--azul-soft); }
.btn.primary { background: var(--azul); color: var(--surface); }
.btn[aria-pressed="true"] { background: var(--azul-soft); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(10, 20, 40, .08); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tray .wrap { display: flex; align-items: center; gap: 10px 14px; padding-block: 10px; flex-wrap: wrap; }
.tray .chips { flex: 1 1 260px; min-width: 0; }
.chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.chip .x:hover { color: var(--vinho); }
.ssw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; display: inline-block; }
body.has-tray main { padding-bottom: 130px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); z-index: 7; background: var(--ink); color: var(--bg); font-size: 14px; padding: 9px 16px; border-radius: 8px; max-width: calc(100% - 32px); }
.tip { position: fixed; z-index: 8; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(10, 20, 40, .14); border-radius: 8px; padding: 8px 11px; font-size: 13px; max-width: 240px; }
.tip b { display: block; font-weight: 600; }
.tip span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* compare: page */
.cmp-controls { display: grid; gap: 16px; margin-bottom: 8px; }
.cmp-heads { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.cmp-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.cmp-head .ssw { width: 12px; height: 12px; }
.cmp-head a { font-family: var(--display); font-size: 1.12rem; color: var(--ink); text-decoration: none; }
.cmp-head a:hover { color: var(--azul); }
.cmp-head small { display: block; font-size: 12.5px; color: var(--muted); }
.xbtn { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.xbtn:hover { color: var(--vinho); background: var(--bg); }
.cmp-add { display: flex; align-items: center; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.presets .lab { font-size: 13.5px; color: var(--muted); margin-right: 4px; }
.presets button { font: inherit; font-size: 13.5px; border: 1px dashed var(--line); background: none; color: var(--ink); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.presets button:hover { border-color: var(--azul); color: var(--azul); }
.csec { margin-top: 44px; }
.csec > h2 { font-size: 1.5rem; margin-bottom: 4px; }
.csec > .note { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; max-width: 70ch; }
.reads { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 24px; margin-top: 14px; }
.read { border-top: 1px solid var(--ink); padding-top: 10px; min-width: 0; }
.read .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.read .v { font-family: var(--display); font-size: 1.2rem; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.read .d { font-size: 13.5px; color: var(--muted); }
.attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px 48px; }
.attr { min-width: 0; }
.attr h3 { font-family: var(--body); font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.attr h3 span { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .05em; text-transform: uppercase; }
.mrow { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(80px, 1fr) 6.5rem; gap: 12px; align-items: center; padding: 5px 0; font-size: 14px; }
.mname { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mname span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pips { display: flex; gap: 2px; height: 12px; }
.pips i { flex: 1; background: var(--line); }
.pips i:first-child { border-radius: 4px 0 0 4px; }
.pips i:last-child { border-radius: 0 4px 4px 0; }
.mval { color: var(--muted); font-size: 13px; }
.pchart { display: grid; gap: 2px; }
.prow { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 40px; font-size: 14px; }
.ptrack { position: relative; height: 36px; }
.ptrack .gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.ptrack .rng { position: absolute; top: 16px; height: 4px; border-radius: 2px; opacity: .45; }
.ptrack .avg { position: absolute; top: 12px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); cursor: default; }
.ptrack .avg:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.ptrack .plab { position: absolute; top: -2px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; transform: translateX(-50%); }
.paxis { position: relative; height: 18px; font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.paxis span { position: absolute; transform: translateX(-50%); }
.cmp-table td:first-child { font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.cmp-table th { text-transform: none; font-family: var(--display); font-size: 1.05rem; letter-spacing: 0; color: var(--ink); }
.cmp-table th .ssw { margin-right: 8px; }
.cmp-table td { min-width: 150px; }
.cmp-empty { margin-top: 26px; padding: 28px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); max-width: 640px; }
.cmp-empty b { color: var(--ink); }
@media (max-width: 560px) {
  .mrow { grid-template-columns: minmax(0, 1fr) 5.5rem; }
  .mrow .pips { grid-column: 1 / -1; grid-row: 2; }
  .prow { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .paxis { margin-left: 0 !important; }
  .attrs { grid-template-columns: minmax(0, 1fr); }
}

/* value */
.vfact { display: inline-flex; align-items: center; gap: 8px; }
.vpips { display: inline-flex; gap: 2px; }
.vpips i { width: 14px; height: 8px; background: var(--line); }
.vpips i:first-child { border-radius: 4px 0 0 4px; }
.vpips i:last-child { border-radius: 0 4px 4px 0; }
.vpips i.on { background: var(--azul); }
.facts .mval, td .mval { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.how { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 28px; margin-top: 8px; }
.how div { border-top: 1px solid var(--line); padding-top: 10px; font-size: 14.5px; color: var(--muted); min-width: 0; }
.how b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.chartbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; overflow-x: auto; }
.chartbox svg { display: block; width: 100%; min-width: 520px; height: auto; }
.scatter .gridl { stroke: var(--line); stroke-width: 1; }
.scatter .tick { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.scatter .axt { font-family: var(--body); font-size: 12px; fill: var(--muted); }
.scatter .trend { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.scatter .trendl { font-family: var(--body); font-size: 12px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.scatter .d { fill: var(--azul); fill-opacity: .7; stroke: var(--surface); stroke-width: 1.5; }
.scatter .d.mute { fill: var(--muted); fill-opacity: .25; }
.scatter .d.hl { fill: var(--vinho); fill-opacity: 1; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend i.dash { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--ink); }
.board { display: grid; gap: 2px; }
.brow { display: grid; grid-template-columns: minmax(0, 11rem) minmax(120px, 1fr) 8.5rem minmax(0, 13rem); gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.brow a { color: var(--ink); font-weight: 600; text-decoration: none; }
.brow a:hover { color: var(--azul); }
.dbar { position: relative; height: 12px; }
.dbar::before { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--muted); }
.dbar span { position: absolute; top: 0; height: 12px; }
.dbar .pos { left: 50%; background: var(--azul); border-radius: 0 4px 4px 0; }
.dbar .neg { right: 50%; background: var(--vinho); border-radius: 4px 0 0 4px; }
.brow .meta { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.vtable td:first-child { white-space: normal; font-weight: 400; min-width: 220px; }
.vtable td { font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .brow { grid-template-columns: minmax(0, 1fr) 8rem; }
  .brow .dbar { grid-column: 1 / -1; grid-row: 2; }
  .brow .meta { grid-column: 1 / -1; }
}

/* bottles */
.bprice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: auto; font-variant-numeric: tabular-nums; }
.bprice b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; color: var(--ink); }
.bprice .mval { font-size: 12.5px; color: var(--muted); }
.tier { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--azul); background: var(--azul-soft); padding: 2px 8px; border-radius: 4px; }
.seg.tiers small { font-size: 11.5px; opacity: .75; margin-left: 2px; }
.buy-table td { vertical-align: middle; }
.buy-table td:first-child { font-weight: 600; }
.buy-table .mval { font-size: 12.5px; color: var(--muted); }
.rel .bhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* critics */
.rel .note { font-size: 13.5px; color: var(--muted); max-width: 70ch; margin-bottom: 4px; }
.crit { font-size: 13px; color: var(--muted); }
.crit b { color: var(--ink); font-variant-numeric: tabular-nums; }
.crit-table td:first-child { white-space: normal; font-weight: 400; min-width: 220px; }
.crit-table .bottle a { color: var(--ink); }
.crit-table .bottle a:hover { color: var(--azul); }
.vint { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.crit-table .sub { font-size: 12.5px; color: var(--muted); }
.scorecell { white-space: nowrap; }
.score { font-family: var(--display); font-size: 1.45rem; line-height: 1; color: var(--vinho); font-variant-numeric: tabular-nums; }
.pts { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 4px; }
.acc { font-size: 12.5px; color: var(--azul); white-space: normal; max-width: 220px; margin-top: 2px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 28px; align-items: start; }
.grid.narrow { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.stick { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 90px); }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .mapbox { order: -1; position: static; max-width: 460px; }
  .hero, .detail { grid-template-columns: minmax(0, 1fr); }
  .hero .mapbox { max-width: 460px; }
  .search kbd { display: none; }
}
@media (max-width: 560px) {
  .top .wrap { gap: 10px; }
  .search { flex-basis: 100%; order: 3; }
  nav.tabs { order: 4; overflow-x: auto; flex-wrap: nowrap; width: 100%; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .gloss { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
