:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #74726c;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #8a5a00;
  --accent-wash: rgba(138, 90, 0, 0.08);
  --pos: #006300;
  --neg: #b42318;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s7: #4a3aa7;
  --q0: #74726c; --q1: #0b0b0b; --q2: #16803c; --q3: #0b62c4; --q4: #8a2be2; --q5: #c25e00;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #232321;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #9a988f;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #e3b341;
    --accent-wash: rgba(227, 179, 65, 0.10);
    --pos: #0ca30c;
    --neg: #ff7b72;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s7: #9085e9;
    --q0: #9a988f; --q1: #ffffff; --q2: #3ddc68; --q3: #4aa3ff; --q4: #c77dff; --q5: #ff9a3c;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --ink: #ffffff; --ink-2: #c3c2b7;
  --muted: #9a988f; --grid: #2c2c2a; --axis: #383835; --border: rgba(255,255,255,0.10);
  --accent: #e3b341; --accent-wash: rgba(227,179,65,0.10); --pos: #0ca30c; --neg: #ff7b72;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s7: #9085e9;
  --q0: #9a988f; --q1: #ffffff; --q2: #3ddc68; --q3: #4aa3ff; --q4: #c77dff; --q5: #ff9a3c;
}

* { box-sizing: border-box; }
/* Components set display; the hidden attribute must still win. */
[hidden] { display: none !important; }
/* Guides say some things only in the app, others only on the public site (xshader.css). */
.site-only { display: none; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 24px; letter-spacing: -0.01em; }
h2 { font-size: 18px; margin: 32px 0 8px; }
h3 { font-size: 15px; margin: 20px 0 6px; }
p { margin: 8px 0; }
code { font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }

/* -- header ---------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 26; background: color-mix(in srgb, var(--page) 92%, transparent);
       backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top-row { max-width: 1480px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); text-decoration: none; font-size: 15px; }
.brand svg { width: 24px; height: 24px; }
.brand path { stroke: var(--muted); stroke-width: 2; fill: none; }
.brand .n1 { fill: var(--s1); } .brand .n2 { fill: var(--s2); } .brand .n3 { fill: var(--s3); }
/* -- sidebar ---------------------------------------------------------------- */
.layout { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 8px; }
.side { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 18px 8px 24px 16px; }
.nav-group { margin-bottom: 16px; }
.nav-title { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 0 10px 4px; }
.side a { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.side a:hover { background: var(--surface-2); color: var(--ink); }
.side a[aria-current="page"] { color: var(--ink); background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }
.count-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--page); font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
#menu-btn { display: none; }
.global-search { position: relative; width: 240px; }
.global-search input { width: 100%; min-width: 0; }
.global-search .results { top: 100%; margin-top: 4px; min-width: 300px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 7px; padding: 2px; border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 5px; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); font-weight: 600; }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.freshness { color: var(--muted); font-size: 12.5px; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px;
       padding: 4px 12px; border-radius: 6px; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.6; cursor: progress; }
a.btn { display: inline-block; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--page); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.btn.small { font-size: 12px; padding: 2px 8px; }
.btn.icon { position: relative; padding: 4px 6px; line-height: 0; }
.btn.icon svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.icon .count-badge { position: absolute; top: -6px; right: -6px; line-height: 16px; min-width: 16px; font-size: 10px; }
.credit { margin-left: auto; font-size: 12.5px; }

/* -- layout ---------------------------------------------------------------- */
main { min-width: 0; padding: 20px 16px 48px 8px; outline: none; }
.loading, .empty { color: var(--muted); padding: 24px 0; }
.error { color: var(--neg); background: color-mix(in srgb, var(--neg) 8%, transparent); padding: 10px 14px; border-radius: var(--radius); }
.lede { color: var(--ink-2); max-width: 78ch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.tile .label { color: var(--ink-2); font-size: 12.5px; }
.tile .value { font-size: 22px; font-weight: 650; margin-top: 2px; }
.tile .sub { color: var(--muted); font-size: 12px; }
.tile.alert .value { color: var(--neg); }
.tile.pos .value { color: var(--pos); }
/* A tile that opens its page (Home's Instant gold). */
a.tile-link { display: block; color: inherit; text-decoration: none; }
a.tile-link .tile { height: 100%; box-sizing: border-box; border-color: var(--accent); background: var(--accent-wash); }
a.tile-link:hover .tile, a.tile-link:focus-visible .tile { border-width: 2px; padding: 11px 13px; }
/* Check-in trades. */
.badge.flip-vendor { color: var(--pos); border-color: color-mix(in srgb, var(--pos) 40%, transparent); }
.badge.flip-relist { color: var(--s1); border-color: color-mix(in srgb, var(--s1) 40%, transparent); }
.badge.flip-disenchant { color: var(--s7); border-color: color-mix(in srgb, var(--s7) 40%, transparent); }
.badge.flip-craft { color: var(--s4); border-color: color-mix(in srgb, var(--s4) 40%, transparent); }
/* Home's to-do list and the Guides index. */
ul.todo { list-style: none; padding: 0; margin: 8px 0 16px; max-width: 92ch; }
ul.todo li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); }
ul.todo .badge { flex: 0 0 auto; min-width: 64px; text-align: center; }
ul.plain { padding-left: 18px; }
.guide-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 12px; }
.guide-cards a.card { display: block; text-decoration: none; color: var(--ink); }
.guide-cards a.card:hover { border-color: var(--accent); }
.guide-cards .chart-sub { margin-bottom: 0; }
.nav-group.untitled { padding-top: 4px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 28px 0 8px; }
.section-head h2 { margin: 0; }
.section-head .note { color: var(--muted); font-size: 13px; }

/* -- filters --------------------------------------------------------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.filters label { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-2); font-size: 13px; }
select, input[type="search"], input[type="text"] {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; min-height: 32px;
}
input[type="search"] { min-width: 220px; }
.count { color: var(--muted); font-size: 13px; }

/* -- tables ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--grid); }
tbody tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink-2); font-size: 12.5px; background: var(--surface); position: sticky; top: 0; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th[aria-sort="descending"]::after { content: " \2193"; }
th[aria-sort="ascending"]::after { content: " \2191"; }
td.num, th.num { text-align: right; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.muted { color: var(--muted); }
pre.stack { font: 12px ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: 6px 8px; border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; margin: 6px 0 0; }
.caveats { color: var(--ink-2); max-width: 78ch; padding-left: 20px; }
.caveats li { margin: 4px 0; }
.ladder { display: grid; gap: 3px; margin: 6px 0 4px; }
.ladder-row { display: grid; grid-template-columns: 84px 1fr minmax(90px, auto); gap: 10px; align-items: center; font-size: 13px; }
.ladder-price { text-align: right; font-variant-numeric: tabular-nums; }
.ladder-bar { height: 12px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.ladder-bar span { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.ladder-units { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.copy-row code { background: var(--surface-2); padding: 4px 8px; border-radius: 4px; overflow-wrap: anywhere; }
ol.steps { padding-left: 20px; color: var(--ink-2); max-width: 78ch; }
ol.steps li { margin: 6px 0; }
.callout-card { border-left: 3px solid var(--s1); }
.zone-map { width: 100%; max-width: 460px; height: auto; display: block; }
.zone-map .zm-bg { fill: var(--surface-2); stroke: var(--axis); }
.zone-map .zm-grid { stroke: var(--grid); stroke-width: 0.5; }
.zone-map .zm-pin { cursor: pointer; }
.zone-map .zm-pin circle { fill: var(--s1); stroke: var(--surface); stroke-width: 1.5; }
.zone-map .zm-pin.on circle { fill: var(--s2); }
.zone-map .zm-pin text { font-size: 10px; fill: var(--ink-2); }
.zone-map .zm-pin.on text { fill: var(--ink); font-weight: 600; }
.zone-map .zm-pin:focus { outline: none; }
.zone-map .zm-pin:focus circle { stroke: var(--ink); }
.zone-map .zm-pin.k-ore circle { fill: var(--s4); }
.zone-map .zm-pin.k-herb circle { fill: var(--s3); }
.zone-map .zm-pin.k-other circle { fill: var(--s7); }
.zone-map.wide { max-width: 720px; }
.zone-map .zm-art { opacity: 0.9; }
/* Map page categories: pins and their legend dots. A pin from the seed is hollow
   until you've seen that NPC in game. */
.pin-trainer { --pin: var(--s1); } .pin-vendor { --pin: var(--s3); } .pin-travel { --pin: var(--s4); }
.pin-service { --pin: var(--s7); } .pin-other { --pin: var(--muted); } .pin-nodes { --pin: var(--axis); }
.zone-map .zm-pin[class*="pin-"] circle { fill: var(--pin); }
.zone-map .zm-pin.seed circle { fill: var(--surface); stroke: var(--pin); stroke-width: 2; }
.zone-map .zm-pin.on circle { fill: var(--s2); stroke: var(--surface); }
.legend-dot[class*="pin-"] { background: var(--pin); }
.zone-map.with-art .zm-grid { stroke-opacity: 0.2; }
.zone-map.with-art .zm-pin text { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chip-btn .legend-dot { margin: 0 6px 0 0; }
td .legend-dot { margin: 0 6px 0 0; }
.browse-bar { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; }
.browse-search { flex: 1; min-width: 0; font-size: 15px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
                 background: var(--surface); color: var(--ink); }
.browse-help { max-width: 640px; }
.browse-help dl.kv { grid-template-columns: max-content 1fr; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chip-btn { font: inherit; font-size: 12px; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--border);
            background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.chip-btn.on { background: var(--accent-wash); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.chip-btn.saved { display: inline-flex; gap: 2px; padding: 0 4px 0 10px; align-items: center; }
.chip-btn .chip-link, .chip-btn .chip-x { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px 2px; }
.chip-btn .chip-x { color: var(--muted); }
.browse-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.facets { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; font-size: 13px; padding-right: 4px; }
.facets .facet-title { font-weight: 650; margin: 10px 0 4px; color: var(--ink-2); }
.facets a { display: flex; justify-content: space-between; gap: 8px; padding: 2px 6px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.facets a.sub { padding-left: 18px; color: var(--ink-2); }
.facets a:hover { background: var(--surface-2); }
.facets a.active { background: var(--accent-wash); color: var(--ink); font-weight: 600; }
.facets .n { color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .browse-grid { grid-template-columns: minmax(0, 1fr); }
  .facets { position: static; max-height: 220px; }
}
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 10px; vertical-align: -1px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 0 6px; border-radius: 4px;
         background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border); margin-left: 6px; vertical-align: 1px; }
.badge.new { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-wash); }
.flags span { display: inline-block; min-width: 18px; text-align: center; font-size: 11.5px; font-weight: 600; margin-right: 2px;
              border-radius: 4px; background: var(--surface-2); color: var(--ink-2); padding: 0 4px; }
.item { text-decoration: none; font-weight: 500; }
.item:hover { text-decoration: underline; }
.q0 { color: var(--q0); } .q1 { color: var(--q1); } .q2 { color: var(--q2); } .q3 { color: var(--q3); } .q4 { color: var(--q4); } .q5 { color: var(--q5); }

/* -- charts ---------------------------------------------------------------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11.5px; font-family: inherit; }
.chart .label-ink { fill: var(--ink-2); font-size: 12.5px; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: default; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 4px 0 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-title { font-weight: 600; font-size: 13.5px; margin: 0 0 2px; }
.chart-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 6px; }
.tooltip { position: fixed; z-index: 20; pointer-events: none; background: var(--surface); color: var(--ink);
           border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow); padding: 6px 9px; font-size: 12.5px; max-width: 320px; }
.tooltip .t-title { font-weight: 600; margin-bottom: 2px; }
.tooltip .t-row { display: flex; gap: 12px; justify-content: space-between; color: var(--ink-2); }
.tooltip .t-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* -- graphs ---------------------------------------------------------------- */
.graph-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.graph svg { display: block; }
.graph .edge { fill: none; stroke: var(--axis); stroke-width: 1.5; }
.graph .node rect.box { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.graph .node.link { cursor: pointer; }
.graph .node.link:hover rect.box { fill: var(--surface-2); }
.graph .node text { font-size: 12px; fill: var(--ink-2); }
.graph .node text.name { font-weight: 600; fill: var(--ink); font-size: 12.5px; }
.graph .node text.cost { fill: var(--ink); font-variant-numeric: tabular-nums; }
.graph .center rect.box { stroke: var(--accent); stroke-width: 1.5; }
.how-craft { fill: var(--s1); } .how-ah { fill: var(--s2); } .how-vendor { fill: var(--s3); } .how-transfer { fill: var(--s4); } .how-none { fill: var(--axis); }
.how-legend i.how-craft { background: var(--s1); } .how-legend i.how-ah { background: var(--s2); }
.how-legend i.how-vendor { background: var(--s3); } .how-legend i.how-transfer { background: var(--s4); }
.how-disenchant { fill: var(--s7); } .how-legend i.how-disenchant { background: var(--s7); }

/* -- explorer -------------------------------------------------------------- */
.search-box { position: relative; max-width: 520px; }
.search-box input { width: 100%; font-size: 15px; padding: 8px 12px; min-height: 40px; }
.results { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--surface); border: 1px solid var(--border);
           border-radius: var(--radius); box-shadow: var(--shadow); position: absolute; left: 0; right: 0; z-index: 6; max-height: 360px; overflow-y: auto; }
.results li a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 5px; text-decoration: none; }
.results li a:hover, .results li a:focus { background: var(--surface-2); }
.results .hint { color: var(--muted); font-size: 12px; }
.item-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 20px 0 4px; }
.range-btns { display: inline-flex; gap: 4px; }
.market-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.market-card h4 { margin: 0 0 6px; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 13px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* -- discussion ------------------------------------------------------------ */
.prose { max-width: 820px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose .byline { color: var(--muted); font-size: 13px; }
.prose .callout { border-left: 3px solid var(--accent); background: var(--accent-wash); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0; }
.prose .judgment { border-left: 3px solid var(--s7); background: color-mix(in srgb, var(--s7) 7%, transparent); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.prose .widget { margin: 14px 0 20px; }
.judgment-inline { font-weight: 650; color: var(--s7); }
.prose table { font-size: 13px; }
.picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin: 14px 0; }
.pick { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.pick h4 { margin: 0 0 4px; font-size: 14.5px; }
.pick .why { color: var(--ink-2); font-size: 13px; margin: 0; }
.pick .tag { font-size: 11.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }

.foot { max-width: 1480px; margin: 0 auto; padding: 16px 16px 32px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--border); }

/* -- shared bits for the planning pages ---------------------------------------- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
input.qty { width: 84px; }
input.money-in { width: 120px; }
input[type="number"] { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; min-height: 32px; }
textarea { font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px; width: 100%; resize: vertical; }
textarea.export { margin: 6px 0 8px; }
.table-block { margin: 0 0 8px; }
.table-tools { display: flex; justify-content: flex-end; margin: 0 0 6px; }
tr.row-warn td { background: color-mix(in srgb, var(--neg) 6%, transparent); }
tr.row-hit td { background: var(--accent-wash); }
.badge.alert { color: var(--neg); border-color: color-mix(in srgb, var(--neg) 40%, transparent); }
.note-warn { border-left: 3px solid var(--s4); background: color-mix(in srgb, var(--s4) 10%, transparent); padding: 8px 12px; border-radius: 0 var(--radius) var(--radius) 0; margin: 12px 0; color: var(--ink); }
.chip { display: inline-block; padding: 1px 8px; margin: 2px 4px 2px 0; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--ink-2); }
.char-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.char-card { color: var(--ink); text-decoration: none; display: block; }
.char-card:hover { border-color: var(--accent); }
.char-name { font-weight: 650; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.char-profs { margin-top: 8px; }
.char-sum { margin-top: 8px; font-size: 12.5px; display: grid; gap: 2px; }
.cd-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cd .cd-state { font-weight: 650; color: var(--muted); font-size: 13px; }
.cd.ready .cd-state { color: var(--pos); }
.form { margin: 12px 0; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.form label.check { flex-direction: row; align-items: center; gap: 8px; }
.form label.block { margin: 12px 0 4px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 12px; align-items: end; }
.prof-rows { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.farm-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; flex-basis: 100%; }
.prof-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.prof-row label { flex-direction: row; align-items: center; gap: 6px; }
.kv.wide { grid-template-columns: max-content 1fr; }
.kv.wide dd { text-align: left; }
.watch-form { margin-top: 16px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
         background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; max-width: min(92vw, 560px); font-size: 13.5px; }

@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  #menu-btn { display: inline-block; }
  .side { display: none; position: fixed; top: 0; left: 0; bottom: 0; z-index: 25; width: 240px; max-height: none; background: var(--surface); box-shadow: var(--shadow); padding-top: 64px; }
  body.nav-open .side { display: block; }
  main { padding: 16px; }
}
@media (max-width: 1180px) {
  .global-search { width: 180px; }
  .freshness { display: none; }
}
@media (max-width: 640px) {
  .global-search { order: 3; width: 100%; }
  h1 { font-size: 20px; }
  .credit { margin-left: 0; }
  input[type="search"] { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 45%; }
  .filters select { width: 100%; }
}
