/* WarEra Buddy - single stylesheet, no build step. "Gold command" design system (2026-10-23): tokens first, then the
   shared components every page uses (app, landing, login, about, admin):
     .brand            logo lockup (emblem + WARERA / BUDDY)
     .card             panel with the gold corner brackets;   .panel + .panel-h  card with an icon/title/link header
     .kpi              KPI tile: icon, label, big value, real delta, sparkline
     .act              alert / action row with a severity chip (.sev high|med|low|ok) and an action link
     .tbl              data table;   .chip / .chips  tab chips;   .btn  buttons;   .pill  small status labels
     h2 / .sec-title   section header with the gold rule
   Colours only through the tokens below so light and dark both work. */
:root {
  --bg: #09090a;
  --bg-2: #0d0d0f;
  --panel: #121214;
  --panel-2: #19191c;
  --panel-3: #212125;
  --line: #27251f;
  --line-2: #39352b;
  --text: #ede8dd;
  --muted: #a7a092;
  --faint: #847d6f;
  --accent: #d9a441;
  --accent-2: #f1c66c;
  --accent-ink: #160f02;
  --gold-line: color-mix(in srgb, var(--accent) 34%, var(--line));
  --gold-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --crimson: #d2412f;
  --good: #5fbf6a;
  --bad: #e5533d;
  --warn: #e6a23c;
  --info: #6fa9d6;
  --good-bg: rgba(95, 191, 106, .11);
  --bad-bg: rgba(229, 83, 61, .12);
  --warn-bg: rgba(230, 162, 60, .11);
  --info-bg: rgba(111, 169, 214, .11);
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .4);
  --glow: 0 0 0 1px rgba(217, 164, 65, .38), 0 0 18px rgba(217, 164, 65, .18);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Oswald", "Barlow Condensed", Impact, sans-serif;
  --grid-line: rgba(217, 164, 65, .028);
  --noise-opacity: .045;
  --hero-fade: #09090a;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2efe7; --bg-2: #e9e5d9; --panel: #fbfaf6; --panel-2: #f1eee5; --panel-3: #e8e3d6; --line: #ddd6c3; --line-2: #c9c0a7;
    --text: #1c1a15; --muted: #5a5447; --faint: #736c5e; --accent: #94650f; --accent-2: #b07a17; --accent-ink: #fffaf0;
    --crimson: #b3321f; --good: #2a7f37; --bad: #b93a26; --warn: #a96c12; --info: #2c6a98;
    --shadow: 0 1px 2px rgba(40, 36, 20, .07), 0 10px 26px rgba(40, 36, 20, .08);
    --glow: 0 0 0 1px rgba(148, 101, 15, .4), 0 0 14px rgba(148, 101, 15, .14);
    --grid-line: rgba(90, 80, 40, .045); --noise-opacity: .03; --hero-fade: #f2efe7;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2efe7; --bg-2: #e9e5d9; --panel: #fbfaf6; --panel-2: #f1eee5; --panel-3: #e8e3d6; --line: #ddd6c3; --line-2: #c9c0a7;
  --text: #1c1a15; --muted: #5a5447; --faint: #736c5e; --accent: #94650f; --accent-2: #b07a17; --accent-ink: #fffaf0;
  --crimson: #b3321f; --good: #2a7f37; --bad: #b93a26; --warn: #a96c12; --info: #2c6a98;
  --shadow: 0 1px 2px rgba(40, 36, 20, .07), 0 10px 26px rgba(40, 36, 20, .08);
  --glow: 0 0 0 1px rgba(148, 101, 15, .4), 0 0 14px rgba(148, 101, 15, .14);
  --grid-line: rgba(90, 80, 40, .045); --noise-opacity: .03; --hero-fade: #f2efe7;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body::after {  /* film grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { flex: none; display: inline-block; vertical-align: middle; }

/* ---------- Brand lockup (emblem + WARERA / BUDDY), used by every page ---------- */
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--text); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #000; box-shadow: 0 0 0 1.5px var(--accent), 0 0 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word b { font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.brand-word small { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-family: var(--display); font-size: 10.5px; font-weight: 500; letter-spacing: .5em; text-transform: uppercase; color: var(--accent); }
.brand-word small::before, .brand-word small::after { content: ""; width: 10px; height: 1px; background: currentColor; opacity: .7; }
.brand-word small::after { margin-left: -4px; }
.brand-tag { color: var(--accent); font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding: 1px 7px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: 0; border: 1px solid var(--line-2); text-decoration: none; color: var(--text);
  background: var(--panel-2); cursor: pointer; font-family: var(--display); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: border-color .15s, background .15s, filter .15s, color .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--gold-line); color: var(--accent); }
.btn-ghost:hover { background: var(--gold-soft); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%); }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; min-width: 38px; height: 38px; background: none; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 0 9px; cursor: pointer; color: var(--muted); position: relative; }
.icon-btn:hover { border-color: var(--accent); color: var(--text); }
.link-more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 13px; text-decoration: none; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; }
.link-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Page headings + section header with the gold rule ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 1.05;
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.page-head .kicker { display: block; margin-bottom: 6px; font-family: var(--display); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
h2, .sec-title { font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin: 32px 0 12px; display: flex; align-items: center; gap: 10px; color: var(--text); }
h2::before, .sec-title::before { content: ""; flex: none; width: 18px; height: 2px; background: var(--accent); }
h2::after, .sec-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-line), transparent); }
h2 .count { color: var(--accent); font-weight: 500; }

/* ---------- Cards & grids (gold corner brackets) ---------- */
.grid { display: grid; gap: 12px; }
.grid-metrics { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.card, .panel {
  position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, var(--accent) 3%), var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card::before, .card::after, .panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; border-color: color-mix(in srgb, var(--accent) 80%, transparent); border-style: solid;
}
.card::before, .panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: var(--radius); }
.card::after, .panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: var(--radius); }
.card-pad { padding: 16px 18px; }
.panel { display: flex; flex-direction: column; min-width: 0; }
.panel-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.panel-h > .ico { color: var(--accent); }
.panel-h h3 { margin: 0; font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.panel-h h3 small { display: block; margin-top: 2px; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--faint); }
.panel-h .right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.panel-b { padding: 14px 18px 16px; flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .panel-h { flex-wrap: wrap; padding: 12px 14px 10px; row-gap: 6px; }
  .panel-h .right { margin-left: 34px; flex-basis: 100%; }
  .panel-b { padding: 12px 14px 14px; }
}
.panel-b.flush { padding: 0; }

/* ---------- KPI tiles (icon, label, value, real delta, sparkline) ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpi { position: relative; overflow: hidden; padding: 16px 18px 14px; min-height: 128px; display: flex; flex-direction: column; }
.kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-family: var(--display); font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.kpi-top .ico { color: var(--accent); }
.kpi-val { position: relative; z-index: 1; margin-top: 10px; font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.kpi.hero .kpi-val { color: var(--accent-2); text-shadow: 0 0 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.kpi.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--panel)), var(--panel) 70%); border-color: var(--gold-line); }
.kpi-sub { position: relative; z-index: 1; margin-top: auto; padding-top: 10px; font-size: 12.5px; color: var(--faint); }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; }
.kpi-spark { position: absolute; right: 12px; top: 50px; width: 42%; height: 40px; opacity: .95; }
.kpi-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .kpi.hero { grid-column: 1 / -1; }
  .kpi { min-height: 0; padding: 13px 14px 12px; }
  .kpi-top { font-size: 12.5px; gap: 8px; }
  .kpi-val { font-size: 27px; }
  .kpi-spark { position: relative; right: auto; top: auto; width: 100%; height: 30px; margin-top: 8px; }
  .kpi.hero .kpi-spark { position: absolute; right: 12px; top: 46px; width: 42%; height: 40px; margin: 0; }
}

/* legacy metric tiles (Treasury, Cockpit...) share the KPI look */
.metric { padding: 14px 16px; }
.metric .label { color: var(--muted); font-family: var(--display); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }
.metric .value { font-family: var(--display); font-size: 28px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.metric .sub { color: var(--faint); font-size: 12.5px; }
.metric.hero { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--panel)), var(--panel) 70%); border-color: var(--gold-line); }
.metric.hero .value { font-size: 36px; color: var(--accent-2); }

.pos { color: var(--good); }
.neg { color: var(--bad); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Pills, chips, severity ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-muted { background: var(--panel-2); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 3px; background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 13px; white-space: nowrap; text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.on, .chip[aria-selected="true"], .chip[aria-pressed="true"] { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.sev { display: inline-grid; place-items: center; min-width: 64px; padding: 3px 10px; border-radius: 999px; font-family: var(--display); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; }
.sev.high { color: #fff; background: var(--bad); border-color: var(--bad); }
.sev.med { color: var(--accent-ink); background: var(--warn); border-color: var(--warn); }
.sev.low { color: var(--good); background: var(--good-bg); }
.sev.info { color: var(--info); background: var(--info-bg); }
.dot-s { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.dot-s::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

/* ---------- Action rows ("Do this today"): severity chip, icon, text, action link ---------- */
.acts { display: grid; gap: 8px; }
.act { --sc: var(--accent); display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--sc) 38%, var(--line)); border-radius: var(--radius);
  background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 11%, var(--panel)), var(--panel) 70%); }
.act.high { --sc: var(--bad); } .act.med { --sc: var(--warn); } .act.low { --sc: var(--good); } .act.info { --sc: var(--info); }
.act > .ico { color: var(--sc); }
.act-t { font-weight: 600; color: var(--text); }
.act-t .faint { font-weight: 500; }
.act-d { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.act-go { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.act-go:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .act { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .act > .ico { display: none; }
  .act .sev { justify-self: start; min-width: 0; }
}

/* ---------- Alerts (older pages) ---------- */
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); }
.alert + .alert { margin-top: 8px; }
.alert .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.alert.danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); border-left-color: var(--bad); background: var(--bad-bg); }
.alert.danger .dot { background: var(--bad) !important; }
.alert.warning { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); border-left-color: var(--warn); background: var(--warn-bg); }
.alert.warning .dot { background: var(--warn) !important; }
.alert.info .dot { background: var(--info); }
.alert .title { font-weight: 600; }
.alert .detail { color: var(--muted); }
.all-clear { padding: 12px 14px; border-radius: var(--radius); background: var(--good-bg); color: var(--good); font-weight: 600; }

/* ---------- Moves ---------- */
.move { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.move + .move { border-top: 1px solid var(--line); }
.move .step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.move .what { font-weight: 600; }
.move .why { color: var(--muted); font-size: 13px; }
.move .gain { text-align: right; font-weight: 700; font-size: 16px; }
.move .gain small { display: block; color: var(--faint); font-weight: 500; font-size: 12px; }

/* ---------- Company cards ---------- */
.co-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; }
.co-name { font-weight: 700; font-size: 15px; }
.co-where { color: var(--muted); font-size: 13px; }
.co-profit { text-align: right; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.co-profit small { display: block; color: var(--faint); font-size: 11px; font-weight: 500; }
.co-body { padding: 0 16px 14px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; margin: 6px 0 10px; }
.kv div { font-size: 12px; color: var(--muted); }
.kv b { display: block; color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar.good > span { background: var(--good); }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--bad); }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.workers { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.worker { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 13px; }
.worker .sub { display: block; color: var(--faint); font-size: 12px; white-space: normal; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--line)); border-radius: var(--radius); background: var(--panel); }
.panel .table-wrap { border: 0; border-radius: 0; background: none; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-family: var(--display); font-size: 12px; color: var(--accent); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: color-mix(in srgb, var(--panel-2) 80%, transparent); position: sticky; top: 0; }
td.r, th.r { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
td .sub { display: block; color: var(--faint); font-size: 12px; }
tr.own td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.go { cursor: pointer; }

/* ---------- Optimizer ---------- */
details.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
details.acc + details.acc { margin-top: 8px; }
details.acc > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .chev { transition: transform .15s; color: var(--faint); }
details.acc[open] > summary .chev { transform: rotate(90deg); }
details.acc .acc-body { padding: 0 16px 14px; }
.opt { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.opt .kind { font-weight: 700; text-transform: uppercase; font-size: 12px; color: var(--muted); padding-top: 2px; }
.opt .reasons { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.opt .nums { text-align: right; font-variant-numeric: tabular-nums; }
.rule-box { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Treasury ---------- */
.buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.bucket { padding: 16px; }
.bucket .share { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.bucket .amount { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.bucket p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.action { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.action:first-child { border-top: 0; }

/* ---------- Forms ---------- */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input { padding: 8px 10px; width: 150px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }
.help { color: var(--muted); font-size: 13px; margin: 8px 0 0; }

/* ---------- States ---------- */
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty h1 { color: var(--text); font-size: 26px; margin: 0 0 8px; }
.empty .hint { margin-top: 18px; display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 90px 20px; color: var(--muted); text-align: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); border-right-color: var(--accent); animation: spin .8s linear infinite; box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 25%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { padding: 14px 16px; border-radius: var(--radius); background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); }
.notes { margin-top: 28px; color: var(--faint); font-size: 12.5px; }
.notes li { margin: 3px 0; }
.spark { display: block; }
.stale { color: var(--warn); }
.skel { display: block; border-radius: 4px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
@keyframes skel { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* Treasury: cash to keep for bots */
.warn { color: var(--warn); }
.reserve-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: var(--bad-bg); }
.reserve-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: var(--warn-bg); }

[data-mode].mode-hidden { display: none !important; }

/* (app shell: see 'App shell' at the end of this file) */

/* War: damage calculator */
.statline { display: flex; flex-wrap: wrap; gap: 8px; }
.statline .chip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.statline .chip b { color: var(--text); }
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gear-card { padding: 10px 12px; }
.gear-card .slot { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.dura { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.dura > span { display: block; height: 100%; background: var(--good); }
.dura.low > span { background: var(--bad); }
.dura.mid > span { background: var(--warn); }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 0 0 12px; min-width: 0; }
.calc legend { color: var(--muted); font-weight: 600; padding: 0 4px; }
.calc .row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; align-items: center; margin: 5px 0; }
.calc select, .calc input[type=number] { width: 100%; }
.calc label.check { display: flex; gap: 8px; align-items: center; margin: 5px 0; }
.compare td.now { color: var(--muted); }
.compare .delta { font-size: 12px; font-weight: 600; }
.compare td:first-child { white-space: normal; }
@media (max-width: 1180px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.calc select, .calc input[type=number] { font: inherit; color: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.calc select:focus, .calc input[type=number]:focus { outline: none; border-color: var(--accent); }
td.wrap { white-space: normal; min-width: 200px; }
td.wrap .sub { white-space: normal; }
@media (max-width: 860px) {
  .mode-switch { flex: 0 0 auto; margin: 0 6px 0 0; }
  .mode-btn { flex: 0 0 auto; padding: 7px 14px; }
}
.card-pad > .label { font-size: 12px; letter-spacing: .04em; margin-bottom: 6px; }
#gear-results .alert { display: block; }
.alert .dot { background: var(--accent); }

/* ---------- Build Builder (intel-style) ---------- */
.opt-form .opt-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.opt-form .opt-row > label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; }
.opt-form .opt-row > label.check { flex-direction: row; align-items: center; color: var(--text); padding-bottom: 7px; }
.opt-form input[type=number] { width: 120px; font: inherit; color: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); }
.opt-form input[type=number]:focus { outline: none; border-color: var(--accent); }
.opt-form input:disabled { opacity: .5; }
.opt-form .auto { font-weight: 500; font-size: 12px; margin-left: 6px; }
.mode-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mode-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
.mode-card b { font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.mode-card span { font-size: 12px; color: var(--muted); }
.mode-card:hover { border-color: var(--accent); }
.mode-card.on { background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.mode-card.on span { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.mode-card:disabled { opacity: .6; cursor: wait; }
.opt-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.build-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; padding: 18px; }
.bc-sum .dmg { font-size: 30px; font-weight: 800; color: var(--bad); letter-spacing: .02em; }
.bc-sum .dmg.pos { color: var(--good); }
.bc-sum .net { margin: 6px 0 10px; color: var(--muted); }
.bc-sum .net b { color: var(--accent); font-size: 17px; }
.bc-sum .net b.pos { color: var(--good); }
.bc-sum .lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.bc-sum .ln.cost { color: var(--bad); }
.bc-sum .ln.gain { color: var(--good); }
.sk-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.sk-grid.eco { margin-top: 10px; }
.sk { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); display: flex; flex-direction: column; align-items: center; padding: 6px 2px; }
.sk .ic { font-size: 18px; line-height: 1.2; }
.sk b { font-size: 14px; }
.sk small { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.1; }
.sk.zero { opacity: .45; }
.gt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.gt { border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--panel-2); font-size: 12px; text-align: center; }
.gt .ic { font-size: 22px; }
.gt .st { font-weight: 700; }
.gt .use { color: var(--muted); font-size: 11px; }
.gt .pr { color: var(--accent); font-weight: 700; }
.gt.empty { opacity: .45; }
.gt.t-common { background: rgba(120, 130, 140, .18); }
.gt.t-uncommon { background: rgba(46, 160, 90, .20); border-color: rgba(46, 160, 90, .5); }
.gt.t-rare { background: rgba(50, 110, 220, .20); border-color: rgba(50, 110, 220, .5); }
.gt.t-epic { background: rgba(140, 80, 210, .22); border-color: rgba(140, 80, 210, .55); }
.gt.t-legendary { background: rgba(215, 160, 40, .22); border-color: rgba(215, 160, 40, .55); }
.gt.t-mythic { background: rgba(220, 60, 60, .22); border-color: rgba(220, 60, 60, .55); }
@media (max-width: 1180px) { .build-card { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .mode-cards { grid-template-columns: minmax(0, 1fr); }
  .gt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opt-form input[type=number] { width: 100px; }
}
.sk em { font-style: normal; font-size: 9px; color: var(--accent); text-align: center; line-height: 1.1; }

/* ---------- one battle bonus for every War page ---------- */
.bb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.bb-title { font-weight: 700; }
.bb-opt { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.bb-opt.on { border-color: var(--accent); background: var(--panel-2); }
.bb-opt input[type=number] { width: 70px; font: inherit; color: inherit; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); }
.bb-help { font-size: 12px; flex-basis: 100%; }

/* ---------- live player search ---------- */
.search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); overflow: hidden; }
.sr-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none;
  color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.sr-item:hover, .sr-item:focus { background: var(--panel-2); outline: none; }
.sr-item img, .sr-ph { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 28px; }
.sr-ph { display: inline-flex; align-items: center; justify-content: center; background: var(--panel-2); font-weight: 700; }
.sr-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-lvl { color: var(--muted); font-size: 12px; }
.sr-note { padding: 10px 12px; color: var(--muted); }

/* ---------- WarEra item art ---------- */
img.art { width: 100%; max-width: 92px; aspect-ratio: 282 / 256; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.gt { padding: 8px 6px 6px; border-radius: var(--radius); }
.gt .st { font-family: var(--display); letter-spacing: .04em; }
.gt .pr { font-family: var(--display); font-size: 14px; }
td.with-art { display: flex; align-items: center; gap: 10px; }
img.art-sm { width: 46px; aspect-ratio: 282 / 256; object-fit: contain; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.gear-card img.art { display: block; margin: 4px auto 6px; max-width: 110px; }
.gear-card.t-common { background: linear-gradient(180deg, rgba(120, 130, 140, .16), var(--panel)); }
.gear-card.t-uncommon { background: linear-gradient(180deg, rgba(46, 160, 90, .2), var(--panel)); }
.gear-card.t-rare { background: linear-gradient(180deg, rgba(50, 110, 220, .22), var(--panel)); }
.gear-card.t-epic { background: linear-gradient(180deg, rgba(140, 80, 210, .24), var(--panel)); }
.gear-card.t-legendary { background: linear-gradient(180deg, rgba(215, 160, 40, .22), var(--panel)); }
.gear-card.t-mythic { background: linear-gradient(180deg, rgba(220, 60, 60, .22), var(--panel)); }

/* ---------- War mode: same gold (the logo is one colour), crimson ember for war-only accents ---------- */
body[data-mode="war"] { --grid-line: rgba(210, 65, 47, .03); }

/* ---------- Landing ---------- */
.landing { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 16px 60px; }
.landing-lead { color: var(--muted); max-width: 620px; font-size: 16.5px; margin: 8px 0 24px; }
.lm { padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--radius); text-align: left; background: var(--panel); }
.lm b { display: block; font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: 18px; margin-bottom: 4px; }
.lm span { color: var(--muted); font-size: 13.5px; }
.lm.eco { border-left: 3px solid #d9a441; } .lm.eco b { color: #d9a441; }
.lm.war { border-left: 3px solid #d2412f; } .lm.war b { color: #d2412f; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- 3D hero + gear tilt ---------- */
.landing-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; width: min(1040px, 100%); }
.duo { display: flex; flex-direction: column; gap: 0; }
.hero3d { position: relative; width: 100%; aspect-ratio: 16 / 10; }
.hero3d canvas { width: 100% !important; height: 100% !important; display: block; }
.duo.eco .hero3d { background: radial-gradient(60% 60% at 50% 60%, rgba(217, 164, 65, .14), transparent 70%); }
.duo.war .hero3d { background: radial-gradient(60% 60% at 50% 60%, rgba(210, 65, 47, .14), transparent 70%); }
.duo .lm { margin-top: 4px; }
@media (max-width: 760px) { .landing-duo { grid-template-columns: minmax(0, 1fr); } }
.landing-title { font-family: var(--display); font-size: clamp(38px, 6vw, 60px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0; line-height: 1; }
.landing-title em { font-style: normal; color: var(--accent); }
.landing-tag { font-size: 13px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.gt, .gear-card { transition: transform .12s ease-out; transform-style: preserve-3d; will-change: transform; }
.gt.tilting::after, .gear-card.tilting::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; border: 0; width: auto; height: auto;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, .16), transparent 55%);
}
.gt { position: relative; }
@media (prefers-reduced-motion: reduce) { .gt, .gear-card { transition: none; } .landing-title { animation: none; } }

/* ---------- My Damage ---------- */
.md-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 28px; align-items: center; }
.md-big { grid-row: span 2; display: flex; flex-direction: column; align-items: flex-start; }
.md-big .num { font-family: var(--display); font-size: 58px; font-weight: 700; line-height: 1; color: var(--accent-2); letter-spacing: .02em; }
.md-big small { color: var(--muted); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; margin-top: 4px; }
.md-say { margin: 0; font-size: 15.5px; color: var(--text); }
.md-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13.5px; }
.md-facts b { color: var(--text); }
.md-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.md-rank { width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; background: var(--accent); color: var(--accent-ink); clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); }
.md-main b { display: block; }
.md-main .sub, .md-buy .sub { color: var(--faint); font-size: 12.5px; display: block; }
.md-gain { text-align: right; }
.md-gain b { font-family: var(--display); font-size: 20px; display: block; }
.md-gain small { color: var(--muted); font-size: 12px; }
.md-buy { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; }
.md-buy.t-common { background: linear-gradient(135deg, rgba(120, 130, 140, .16), var(--panel) 60%); }
.md-buy.t-uncommon { background: linear-gradient(135deg, rgba(46, 160, 90, .2), var(--panel) 60%); }
.md-buy.t-rare { background: linear-gradient(135deg, rgba(50, 110, 220, .22), var(--panel) 60%); }
.md-buy.t-epic { background: linear-gradient(135deg, rgba(140, 80, 210, .24), var(--panel) 60%); }
.md-buy.t-legendary { background: linear-gradient(135deg, rgba(215, 160, 40, .22), var(--panel) 60%); }
.md-buy.t-mythic { background: linear-gradient(135deg, rgba(220, 60, 60, .22), var(--panel) 60%); }
.md-buy-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.md-buy-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 13.5px; }
details.acc { margin-top: 28px; }
details.acc > summary b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 700px) { .md-hero { grid-template-columns: minmax(0, 1fr); } .md-big { grid-row: auto; } }

/* ---------- Eco -> War (guided) ---------- */
.step-label { display: flex; align-items: center; gap: 10px; font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 15px; margin-bottom: 8px; }
.step-label span { width: 24px; height: 24px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-btn { padding: 7px 14px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-family: var(--display); letter-spacing: .06em; border-radius: var(--radius); }
.chip-btn.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); }
.chip-btn:disabled { opacity: .5; cursor: wait; }
.alert.advice { border-left-color: var(--accent); font-size: 15.5px; margin-bottom: 14px; }
.tgrid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.tcard.best { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: var(--glow); }
.tcard.now { opacity: .92; }
.tcard-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.tcard-head b { font-family: var(--display); font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.tnums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.tnums > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; }
.tnums small { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; }
.tnums b { font-family: var(--display); font-size: 26px; line-height: 1.15; }
.tnums span { color: var(--faint); font-size: 12px; }
.tlist { list-style: none; padding: 0; margin: 0 0 8px; }
.tlist li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.tlist li span { color: var(--muted); }
.how { margin-top: 16px; }
.how b:first-child { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; }
.how ol { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.how ol li { margin: 4px 0; }
.how ol b { color: var(--text); }

/* ---------- Trading Desk ---------- */
.movers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.mover { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 4px; }
.mover:hover { border-color: var(--line-2); }
.mover.on { border-color: var(--accent); box-shadow: var(--glow); }
.mover.up { border-left: 3px solid var(--good); }
.mover.down { border-left: 3px solid var(--bad); }
.mover-top, .mover-bot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.mover-top span { font-weight: 600; }
.mover-bot b { font-size: 16px; }
.mover-bot span { font-size: 11px; }
.mover .spark { width: 100%; height: 34px; }
.chart-card { padding: 14px 16px 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-item { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 15px; color: var(--muted); }
.chart-price { font-size: 26px; font-weight: 600; margin: 2px 0; }
.chart-price span { font-size: 14px; margin-left: 6px; }
.desk-chart { height: 380px; position: relative; }
.desk-chart .loading { padding-top: 120px; }
.chart-note { font-size: 12px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg-btn { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; font: 600 12px var(--mono); cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); }
.mk-buy { color: var(--info); }
.mk-sell { color: var(--accent); }
tr.clickrow { cursor: pointer; }
tr.clickrow:hover td { background: var(--panel-2); }
tr.clickrow.on td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.verdict { border: 1px solid var(--line-2); border-left: 4px solid var(--muted); border-radius: var(--radius); background: var(--panel); padding: 12px 16px; display: grid; gap: 4px; }
.verdict b { font-family: var(--display); letter-spacing: .06em; text-transform: uppercase; font-size: 16px; font-weight: 500; }
.verdict span { color: var(--muted); font-size: 13.5px; }
.verdict.good { border-left-color: var(--good); }
.verdict.good b { color: var(--good); }
.verdict.bad { border-left-color: var(--bad); }
.verdict.bad b { color: var(--bad); }
@media (max-width: 640px) {
  .movers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk-chart { height: 300px; }
  .chart-price { font-size: 22px; }
}

/* ---------- Company cockpit ---------- */
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.co-card { text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--radius); padding: 11px 13px; color: var(--text); font: inherit; cursor: pointer; display: grid; gap: 5px; }
.co-card:hover { border-color: var(--line-2); }
.co-card.on { border-color: var(--accent); box-shadow: var(--glow); }
.co-card.tone-good { border-left-color: var(--good); }
.co-card.tone-bad { border-left-color: var(--bad); }
.co-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.co-name { font-weight: 700; }
.co-mid { display: flex; align-items: baseline; gap: 6px; }
.co-mid b { font-size: 18px; }
.co-chg { margin-left: auto; font-size: 12.5px; }
.co-card .spark { width: 100%; height: 34px; }
.co-verdict { font-size: 12.5px; color: var(--muted); }
.co-card.tone-bad .co-verdict { color: var(--bad); }
.co-card.tone-good .co-verdict { color: var(--good); }
.verdict b.inline { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: 700; color: var(--text); }
.sell-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px; display: grid; gap: 6px; font-size: 13px; }
.sell-call b { font-size: 15px; }
.hourbars { width: 100%; height: 40px; }
.sell-time { font-size: 12.5px; color: var(--muted); }
/* ---------- Investment Radar ---------- */
.sell-card .spark { width: 100%; height: 34px; }
.sell-card .notes { margin: 2px 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.radar-crispy { border-left: 3px solid var(--good); }
.radar-watch { border-left: 3px solid var(--info); }
.radar-falling { border-left: 3px solid var(--warn); }
.radar-pricey { border-left: 3px solid var(--bad); }
.radar-chart { justify-self: start; padding: 4px 10px; font-size: 12px; }
.rbar { position: relative; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--good-bg), var(--panel-2), var(--bad-bg)); margin-top: 6px; }
.rbar-now { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); }
.rbar-usual { position: absolute; top: -4px; width: 2px; height: 14px; margin-left: -1px; background: var(--muted); }
.rbar-legend { display: flex; justify-content: space-between; font-size: 10.5px; margin-top: 3px; }

/* ---------- Trading terminal ---------- */
.tape { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 0 0 12px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tape-inner { display: flex; width: max-content; animation: tape 70s linear infinite; }
.tape:hover .tape-inner { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-inner { animation: none; } }
.tape-item { display: flex; gap: 8px; align-items: baseline; padding: 8px 16px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
.tape-item b { color: var(--text); font-weight: 600; }
.tape-item em { font-style: normal; font-size: 11.5px; }
.tape-item:hover { background: var(--panel-2); }
.term { display: grid; grid-template-columns: 230px minmax(0, 1fr) 280px; gap: 12px; align-items: start; }
.term .card { margin: 0; }
.term-title { font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; font-size: 12.5px; color: var(--muted); padding: 10px 12px 8px; }
.term-watch { padding-bottom: 6px; position: sticky; top: 64px; }
.term-fresh { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 8px; font-size: 12px; white-space: nowrap; }
.term-fresh .btn { white-space: nowrap; }
.page-head .term-fresh { padding: 0; }
.watch-list { max-height: 640px; overflow-y: auto; }
.watch-row { display: grid; grid-template-columns: minmax(0, 1fr) 50px 52px; grid-template-rows: auto auto; column-gap: 8px; align-items: center; width: 100%; padding: 7px 12px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.watch-row:hover { background: var(--panel-2); }
.watch-row.on { background: color-mix(in srgb, var(--accent) 10%, transparent); border-left-color: var(--accent); }
.watch-name { grid-column: 1; grid-row: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-row .spark { grid-column: 2; grid-row: 1 / span 2; width: 50px; height: 20px; }
.watch-px { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--muted); }
.watch-ch { grid-column: 3; grid-row: 1 / span 2; font-size: 11.5px; text-align: right; }
.term-main { padding: 12px 14px 8px; min-width: 0; }
.term-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.term-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.term-stats div { display: grid; gap: 2px; }
.term-stats span { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-family: var(--sans); }
.term-stats b { font-size: 13.5px; font-weight: 600; }
.term-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.term-key { margin-left: auto; font-size: 12px; }
.mk-ma { color: var(--info); }
.mk-bid { color: var(--muted); }
.chart-wrap { position: relative; }
.chart-wrap .desk-chart { height: 520px; }
.chart-legend { position: absolute; top: 4px; left: 6px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); pointer-events: none; background: color-mix(in srgb, var(--panel) 80%, transparent); padding: 3px 6px; border-radius: 4px; }
.chart-legend b { color: var(--text); font-weight: 600; }
.term-side { display: grid; gap: 12px; }
.side-card { padding: 0 12px 12px; font-size: 13px; }
.side-card .term-title { padding-left: 0; padding-right: 0; }
.kv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.kv span { color: var(--muted); }
.side-note { font-size: 12px; margin: 8px 0 0; }
.side-verdict { margin-bottom: 6px; }
.book-head, .book-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; font-size: 12px; }
.book-head { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 4px; }
.book-row { position: relative; padding: 2.5px 4px; }
.book-row > span:not(.book-depth) { position: relative; z-index: 1; }
.book-depth { position: absolute; top: 1px; bottom: 1px; right: 0; border-radius: 2px; }
.book-row.ask > span:nth-child(2) { color: var(--bad); }
.book-row.bid > span:nth-child(2) { color: var(--good); }
.book-row.ask .book-depth { background: var(--bad-bg); }
.book-row.bid .book-depth { background: var(--good-bg); }
.book-mid { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 4px; margin: 3px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.book-mid b { font-size: 15px; }
.book-mid span { font-size: 11px; }
.book-empty { padding: 20px 0; }
.r { text-align: right; }
@media (max-width: 1250px) {
  .term { grid-template-columns: 210px minmax(0, 1fr); }
  .term-side { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 860px) {
  .term { grid-template-columns: minmax(0, 1fr); }
  .term-watch { position: static; }
  .watch-list { max-height: none; display: flex; overflow-x: auto; }
  .watch-row { min-width: 150px; }
  .chart-wrap .desk-chart { height: 360px; }
  .term-key { margin-left: 0; }
}

/* ---------- Overview (player page, spywarera-style) ---------- */
.ov { --ov-red: #f06c86; display: flex; flex-direction: column; gap: 22px; }
.ov-red { color: var(--ov-red); }
.ov-cap { font-family: var(--display); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ov-cap.sm { font-size: 10.5px; letter-spacing: .12em; }
.ov-th { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.ov-th .r { text-align: right; }
.ov-num { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ov-card, .ov-timeline, .ov-left, .ov-tile {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white 2%), var(--panel));
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.ov-card { padding: 16px 18px; }
.ov-empty { color: var(--faint); font-size: 13px; padding: 36px 8px; text-align: center; border: 1px dashed var(--line-2); border-radius: 10px; margin-top: 8px; }

/* timeline */
.ov-timeline { padding: 16px 20px 18px; }
.tl-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tl-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tl-track { position: relative; height: 190px; margin-top: 4px; }
.tl-line { position: absolute; left: 3%; right: 3%; top: 95px; height: 2px; background: linear-gradient(90deg, var(--line-2), color-mix(in srgb, var(--accent) 50%, var(--line-2))); border-radius: 2px; }
.tl-mark { position: absolute; top: 95px; transform: translateX(-50%); outline: none; }
.tl-stem { position: absolute; left: -1px; width: 2px; background: var(--c); opacity: .55; }
.tl-mark.up .tl-stem { bottom: 0; height: calc(18px + var(--off)); }
.tl-mark.down .tl-stem { top: 2px; height: calc(18px + var(--off)); }
.tl-ico { position: absolute; left: 50%; transform: translate(-50%, 0); width: 28px; height: 28px; display: grid; place-items: center; font-size: 15px;
  border-radius: 50%; background: var(--panel-2); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); cursor: pointer; transition: transform .15s; }
.tl-mark.up .tl-ico { bottom: calc(16px + var(--off)); }
.tl-mark.down .tl-ico { top: calc(16px + var(--off)); }
.tl-mark:hover .tl-ico, .tl-mark:focus .tl-ico { transform: translate(-50%, 0) scale(1.15); }
.tl-tip { display: none; position: absolute; z-index: 5; bottom: 58px; left: 50%; transform: translateX(-50%); min-width: 190px; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; box-shadow: var(--shadow); white-space: nowrap; }
.tl-mark.down .tl-tip { bottom: auto; top: 58px; }
.tl-mark:hover .tl-tip, .tl-mark:focus .tl-tip { display: block; }
.tl-tip .faint { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tl-end { position: absolute; top: 172px; font-size: 11.5px; color: var(--faint); }
.tl-end.start { left: 3%; transform: translateX(-30%); }
.tl-end.now { right: 3%; transform: translateX(30%); }

/* main two columns */
.ov-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 22px; align-items: start; }
.ov-left { padding: 18px 20px; }
.ov-id { display: flex; gap: 16px; align-items: center; }
.ov-ava { position: relative; width: 64px; height: 64px; flex: none; }
.ov-ava img, .ov-ava > span:first-child { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-2); display: grid; place-items: center; background: var(--panel-2); font-size: 26px; }
.ov-flag { position: absolute; left: -4px; bottom: -4px; font-size: 20px; line-height: 1; }
.ov-name { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.15; margin: 2px 0 6px; }
.ov-lvl { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); vertical-align: 6px; color: var(--muted); }
/* badges under the player's name (emblems drawn by badges.js) */
.ov-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.bdg { position: relative; padding: 0; border: 0; background: none; cursor: default; line-height: 0; border-radius: 10px; }
.bdg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bdg-emblem { display: block; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); transition: transform .15s ease; }
.bdg:hover .bdg-emblem, .bdg:focus .bdg-emblem { transform: translateY(-2px) scale(1.06); }
.bdg-count { position: absolute; right: -4px; bottom: -2px; font: 600 10.5px/1 var(--mono); padding: 2px 4px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line-2); color: var(--text); }
.bdg-pop { display: none; position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: max-content; max-width: min(270px, 80vw);
  padding: 10px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  font: 13px/1.4 var(--sans); color: var(--text); text-align: left; white-space: normal; }
.bdg-pop b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: .02em; }
.bdg-pop > .faint { display: block; margin-bottom: 4px; }
.bdg-award { display: block; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.bdg:hover .bdg-pop, .bdg:focus .bdg-pop { display: block; }
.btn.sm { padding: 3px 10px; font-size: 12px; text-decoration: none; display: inline-block; }
.ov-info { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap; margin: 6px 0 4px; }
.ov-reset { color: var(--accent); font-family: var(--mono); font-size: 13px; }
.ov-resrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.res-bar { position: relative; height: 26px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 8px;
  background: color-mix(in srgb, var(--c) 16%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); font: 600 12px var(--mono); margin-top: 4px; }
.res-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, transparent), color-mix(in srgb, var(--c) 45%, transparent)); }
.res-txt, .res-regen { position: relative; white-space: nowrap; }
.res-regen { font-size: 11px; opacity: .85; }

/* pills calendar */
.pill-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.pill-nav { display: flex; align-items: center; gap: 10px; }
.icon-btn.sm { padding: 1px 8px; }
.pill-count { text-align: right; font-family: var(--display); font-size: 26px; line-height: 1; }
.pill-streak { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 10px; }
.pill-streak i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); }
.pill-cal { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.pc { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; font: 11px var(--mono); color: var(--faint); background: var(--panel-2); border: 1px solid var(--line); }
.pc.on { background: color-mix(in srgb, var(--good) 30%, var(--panel-2)); color: var(--text); border-color: var(--good); box-shadow: 0 0 10px color-mix(in srgb, var(--good) 35%, transparent); }
.pc.today { outline: 1px solid var(--accent); outline-offset: 1px; }
.pc.future { opacity: .45; background: transparent; }
.pill-key { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pill-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line-2); margin-right: 5px; vertical-align: -1px; }
.pill-key i.on { background: var(--good); border-color: var(--good); }
.pill-key i.future { background: transparent; }

/* record tiles + targets */
.ov-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ov-tile { padding: 12px 13px; min-height: 96px; }
.ov-big { font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: .01em; line-height: 1.25; margin-top: 4px; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px color-mix(in srgb, currentColor 35%, transparent); }
.ov-sub { font-size: 11.5px; margin-top: 2px; }
.tg-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.tg-bar { grid-column: 1 / -1; height: 4px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.tg-bar span { display: block; height: 100%; background: var(--ov-red); }

/* charts */
.ov-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ov-svg { width: 100%; height: auto; display: block; margin-top: 8px; overflow: visible; }
.ov-svg .ax { font: 10.5px var(--mono); fill: var(--faint); }
.ov-svg .gl { stroke: var(--line); stroke-dasharray: 3 4; }
.ov .seg { margin: 2px 0 4px; }
.ov .seg button { background: transparent; border: 0; color: var(--muted); padding: 5px 12px; font: 600 12px var(--mono); cursor: pointer; }
.ov .seg button.on { background: var(--panel-2); color: var(--text); }
.ov .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 4px; }
.ov .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ov .chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ov .chip.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); font-weight: 600; }
.donut-row { display: flex; align-items: center; justify-content: center; gap: 28px; padding: 6px 0; }
.ov-donut { width: 170px; height: 170px; }
.ov-donut .dn-big { font: 600 22px var(--display); fill: var(--text); }
.ov-donut .ax { font: 10px var(--mono); fill: var(--faint); letter-spacing: .1em; text-transform: uppercase; }
.donut-key { display: flex; flex-direction: column; gap: 14px; min-width: 150px; }
.donut-key i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.donut-key b { float: right; }

@media (max-width: 1100px) { .ov-main, .ov-charts { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-resrow { grid-template-columns: minmax(0, 1fr); }
  .tl-legend { display: none; }
  .tl-tip { white-space: normal; min-width: 150px; }
  .ov-name { font-size: 24px; }
  .pill-cal { gap: 4px; }
}
.coin { display: inline-block; width: .82em; height: .82em; border-radius: 50%; margin-right: .3em; vertical-align: -.06em;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f3c768 35%, #c88a1c 75%, #8a5a0c); box-shadow: 0 0 8px rgba(243, 199, 104, .45), inset 0 0 0 1px rgba(120, 70, 0, .5); }
.tl-ico .coin { width: 14px; height: 14px; margin: 0; }

/* ---------- War Brief battle cards (WarEra battle-screen style) ---------- */
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.bc { --ov-red: #f06c86; --att: #e5563f; --def: #4f8fd6; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white 2%), var(--panel)); display: flex; flex-direction: column; gap: 12px; }
.bc.ended { opacity: .82; }
.bc-top { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bc-tag { font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--panel-2); color: var(--muted); }
.bc-tag.live { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); animation: bc-pulse 1.8s ease-in-out infinite; }
@keyframes bc-pulse { 50% { opacity: .55; } }
.bc-region { font-family: var(--display); font-size: 16px; letter-spacing: .04em; }
.bc-link { margin-left: auto; font-size: 12px; text-decoration: none; }
.bc-mid { display: grid; grid-template-columns: 1fr minmax(120px, 1fr) 1fr; align-items: center; gap: 8px; }
.bc-side { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 10px; border: 1px solid transparent; }
.bc-side.you { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bc-flag { font-size: 34px; line-height: 1; }
.bc-cn { font-family: var(--display); font-size: 15px; letter-spacing: .03em; }
.bc-rounds { display: flex; gap: 4px; }
.bc-rounds i { width: 14px; height: 5px; border-radius: 2px; background: var(--panel-2); border: 1px solid var(--line-2); }
.bc-side.attacker .bc-rounds i.won { background: var(--att); border-color: var(--att); }
.bc-side.defender .bc-rounds i.won { background: var(--def); border-color: var(--def); }
.bc-bonus { font: 700 13px var(--mono); padding: 1px 8px; border-radius: 999px; background: var(--panel-2); cursor: help; }
.bc-bonus.pos { color: var(--good); } .bc-bonus.neg { color: var(--bad); }
.bc-you { font: 700 10px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.bc-center { text-align: center; }
.bc-pts { display: flex; justify-content: center; align-items: baseline; gap: 6px; font-family: var(--display); font-size: 22px; }
.bc-ptbar { position: relative; height: 6px; border-radius: 3px; background: var(--panel-2); margin: 4px 0; overflow: hidden; }
.bc-ptbar .a { position: absolute; left: 0; top: 0; bottom: 0; background: var(--att); }
.bc-ptbar .d { position: absolute; right: 0; top: 0; bottom: 0; background: var(--def); }
.bc-final { font-family: var(--display); font-size: 30px; }
.sm-txt { font-size: 11.5px; }
.bc-dmgnums { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 17px; }
.bc-dmgnums b:first-child { color: var(--att); } .bc-dmgnums b:last-child { color: var(--def); }
.bc-slider { position: relative; height: 10px; border-radius: 5px; background: var(--def); margin-top: 5px; }
.bc-slider span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--att); border-radius: 5px 0 0 5px; }
.bc-slider i { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; background: var(--text); border-radius: 2px; box-shadow: 0 0 8px rgba(0, 0, 0, .5); }
.bc-you-row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.bc-you-row .faint { flex-basis: 100%; font-size: 12px; }
.bc-contracts { display: flex; flex-direction: column; gap: 6px; }
.bc-ct { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12.5px; padding: 7px 10px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 560px) { .bc-flag { font-size: 26px; } .bc-mid { grid-template-columns: 1fr 1fr 1fr; } .bc-pts { font-size: 18px; } }
.tl-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.tl-fix input { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; }

/* ---------- War Brief: briefing + compact battle rows ---------- */
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wb-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.wb-val { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1.2; margin-top: 3px; font-variant-numeric: tabular-nums; }
.wb-val.ov-red { color: #f06c86; text-shadow: 0 0 16px rgba(240, 108, 134, .3); }
.wb-val.gold { color: #f3c768; }
.wb-sub { font-size: 11.5px; }
.wb-fought { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wb-f { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 9px 14px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.wb-f:hover { border-color: var(--accent); }
.wb-loot { grid-column: 1 / -1; font-size: 12.5px; color: var(--accent); display: flex; align-items: center; gap: 6px; }
img.art-xs { width: 26px; aspect-ratio: 282 / 256; object-fit: contain; }
.wb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.wb-fact { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.wb-fact b { font-family: var(--display); font-size: 17px; font-weight: 500; letter-spacing: .02em; }
.bcd-list { display: flex; flex-direction: column; gap: 8px; }
.bcd { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.bcd.ended { opacity: .85; }
.bcd > summary { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 12px 16px; cursor: pointer; }
.bcd > summary::-webkit-details-marker { display: none; }
.bcd > summary:hover { background: var(--panel-2); }
.bcd-title { font-family: var(--display); font-size: 19px; font-weight: 500; letter-spacing: .03em; display: inline-flex; align-items: center; gap: 7px; }
.bcd-f { font-size: 22px; line-height: 1; }
.bcd-region { font-size: 13px; }
.bcd-score { margin-left: auto; font-family: var(--display); font-size: 16px; }
.bcd .chev { transition: transform .15s; color: var(--muted); font-size: 18px; }
.bcd[open] .chev { transform: rotate(90deg); }
.bcd > .bc { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
@media (max-width: 640px) { .bcd-score { margin-left: 0; } .bcd-title { font-size: 16px; } .wb-f { grid-template-columns: 1fr auto; } }

/* Overview gear */
.ov-gear { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.ov-gt { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.ov-gt.empty { justify-content: center; gap: 8px; min-height: 62px; }
.ov-gt-body { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 12.5px; }
.ov-gt-body .dura { margin-top: 4px; }
.ov-gt-d { font-size: 10.5px; font-family: var(--mono); }
@media (max-width: 400px) { .ov-gear { grid-template-columns: minmax(0, 1fr); } }
/* Rarity colours like the game: name + frame + glow */
.ov-gt { --tier: var(--line-2); border-color: color-mix(in srgb, var(--tier) 60%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier) 22%, var(--panel-2)), var(--panel-2) 70%); }
.ov-gt .tier-name { color: var(--tier); }
.ov-gt img { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--tier) 55%, transparent)); }
.ov-gt.t-common { --tier: #9aa3ad; } .ov-gt.t-uncommon { --tier: #3fbf6f; } .ov-gt.t-rare { --tier: #4c8dff; }
.ov-gt.t-epic { --tier: #b26bff; } .ov-gt.t-legendary { --tier: #f0b429; } .ov-gt.t-mythic { --tier: #ff4d4d; }
.bc-bonus small { font-size: .8em; margin-left: 1px; opacity: .8; }
.bc-tank { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, #f06c86 7%, var(--panel-2)); border: 1px solid color-mix(in srgb, #f06c86 30%, transparent); }
.bc-tank-main { display: flex; flex-direction: column; gap: 1px; }
.bc-tank-val { font-family: var(--display); font-size: 24px; color: #f06c86; line-height: 1.2; }
.bc-tank-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; justify-content: center; }
.seg.sm button { padding: 4px 10px; font-size: 11.5px; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-family: var(--mono); }
.seg.sm button.on { background: var(--panel); color: var(--text); }
.bcd-tank { font-size: 13px; }
.bcd-tank b { color: #f06c86; font-family: var(--display); font-size: 15px; }
@media (max-width: 560px) { .bc-tank-side { align-items: flex-start; } }

/* ---------- Overview, Eco side ---------- */
.ov .eco-g, .ov-big.eco-g { color: #72c46e; text-shadow: 0 0 16px rgba(114, 196, 110, .28); }
.ov-resrow.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.worth-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--panel-2); margin: 6px 0 12px; }
.worth-bar span { display: block; height: 100%; }
.worth-key { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 14px; font-size: 13px; }
.worth-key > div { display: flex; align-items: center; gap: 8px; }
.worth-key i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.worth-key b { margin-left: auto; }
.worth-key .faint { width: 34px; text-align: right; font-size: 11.5px; }
.eco-co { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); align-items: center; }
.eco-co-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.eco-bar { grid-column: 1; height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.eco-bar span { display: block; height: 100%; background: #72c46e; }
.eco-bar span.neg { background: var(--bad); }
.eco-st { font-size: 11px; text-align: right; }
.eco-st.warn { color: var(--warn); }
.eco-frozen { font-size: 12.5px; padding-top: 10px; border-top: 1px solid var(--line); }
.made { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.made-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }
.made-i > div { display: flex; flex-direction: column; }
.made-i .r { text-align: right; }
@media (max-width: 640px) { .ov-resrow.two { grid-template-columns: minmax(0, 1fr); } }


/* ---------- Login + account (closed beta, 2026-10-05) ---------- */
.auth-page { display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 24px 20px; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-brand em { font-style: normal; color: var(--accent); }
.auth-sub { color: var(--muted); margin: 10px 0 18px; }
.auth-card form { display: grid; gap: 12px; }
.auth-card label, .admin-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
.auth-card input, .admin-form input, .admin-form select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); outline: none; }
.auth-card input:focus, .admin-form input:focus, .admin-form select:focus { border-color: var(--accent); box-shadow: var(--glow); }
.auth-card .btn-primary { padding: 10px; margin-top: 4px; }
.auth-error { color: var(--bad); background: var(--bad-bg); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; }
.auth-foot { font-size: 12.5px; margin: 16px 0 0; }
.account-pop .term-title { padding: 0; }
.account-pop label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); white-space: normal; }
.account-pop input { padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); }
.account-pop[hidden] { display: none; }
#usage-pop form { display: grid; gap: 8px; }

/* Missions strip: three tiles above the overview columns */
.ms { margin-bottom: 18px; }
.ms-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ms-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ms-tile { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 8px; background: var(--panel); display: grid; gap: 7px; }
.ms-tile.done { border-left-color: var(--good); }
.ms-tile.open { border-left-color: var(--warn); }
.ms-tile.late { border-left-color: var(--bad); background: var(--warn-bg); }
.ms-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ms-name { font-weight: 700; font-size: 15px; }
.ms-state { font-size: 12px; font-weight: 600; }
.ms-tile.done .ms-state { color: var(--good); }
.ms-tile.open .ms-state { color: var(--warn); }
.ms-tile.late .ms-state { color: var(--bad); }
.ms-reward { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.ms-reward b { color: var(--text, inherit); }
.ms-reset { font-size: 12.5px; color: var(--muted); }
@media (max-width: 700px) { .ms-strip { grid-template-columns: minmax(0, 1fr); } }

.market-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.market-toggle .seg-btn { padding: 9px 24px; font-size: 14px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text); }
.mkt-bonus { max-width: 150px; }
.mkt-bonus .pill { white-space: normal; display: inline-block; margin: 2px 0 0 2px; text-align: right; }
.mkt-split { font-size: 11px; white-space: nowrap; }
.mkt-bonus { max-width: none; }

/* Market: best items */
.mk-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 14px 0; }
.mk-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.mk-card.first { border-color: var(--accent); box-shadow: var(--glow); }
.mk-medal { position: absolute; top: 8px; right: 12px; font: 700 12px var(--mono); color: var(--faint); }
.mk-card.first .mk-medal { color: var(--accent); }
img.mk-art-lg { width: 76px; aspect-ratio: 282 / 256; object-fit: contain; flex: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.mk-card-body b { font: 600 20px var(--display); letter-spacing: .03em; text-transform: uppercase; }
.mk-card-profit { font-size: 22px; font-weight: 700; color: var(--accent-2); }
.mk-card-profit small { font: 500 11px var(--sans); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.mk-table td { padding-top: 7px; padding-bottom: 7px; }
.mk-item { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.mk-rank { width: 22px; text-align: right; font: 600 12px var(--mono); color: var(--faint); }
img.mk-art { width: 44px; aspect-ratio: 282 / 256; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.mk-item b { font: 600 15px var(--display); letter-spacing: .04em; text-transform: uppercase; }
.mk-own { font-size: 11px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.mk-profit { font-size: 15px; color: var(--text); }
.mk-bar { height: 3px; margin: 5px 0 0 auto; width: 90px; background: var(--line); border-radius: 2px; overflow: hidden; }
.mk-bar i { display: block; height: 100%; background: var(--accent); }

/* Game News tab */
.news-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.news-tab { position: relative; display: flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 0; gap: 10px; padding: 12px 20px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  color: var(--muted); font-family: var(--display); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.news-tab:hover { color: var(--text); }
.news-tab.on { color: var(--accent); border-bottom-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.news-tab .cnt { font-family: var(--body, inherit); font-size: 12px; letter-spacing: 0; padding: 1px 8px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
.news-tab.on .cnt { color: var(--accent); border-color: var(--accent); }
.newdot { position: absolute; top: 9px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
.news-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.news-toolbar .grow { flex: 1; }
.news-toolbar .chips { display: inline-flex; flex-wrap: nowrap; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.news-toolbar .chip { padding: 6px 14px; background: var(--panel-2); color: var(--muted); border: 0; border-right: 1px solid var(--line-2); border-radius: 0; cursor: pointer; font: inherit; font-size: 13px; }
.news-toolbar .chip:last-child { border-right: 0; }
.news-toolbar .chip:hover { color: var(--text); }
.news-filter { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.news-filter select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; padding: 5px 8px; }
.news-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.news-sub .help { margin: 0; }
.news-content.busy { opacity: .45; pointer-events: none; transition: opacity .15s; }
.news-list { display: grid; gap: 12px; }
.news-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color .15s, transform .15s; }
.news-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.news-card.official { border-left: 3px solid var(--accent); }
.news-card.is-new { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); }
.news-card.featured { flex-direction: column; }
.news-card.featured .news-thumb { width: 100%; height: 220px; }
.news-card.featured .news-title { font-size: 20px; }
.news-thumb { width: 190px; height: 118px; object-fit: cover; border-radius: 8px; flex: none; background: var(--panel-2); }
.news-body { min-width: 0; flex: 1; display: grid; gap: 6px; align-content: start; }
.news-title { font-weight: 600; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: var(--muted); }
.news-meta b { color: var(--text); font-weight: 600; }
.dotsep { opacity: .5; font-style: normal; }
.news-excerpt { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.news-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.news-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.ns { white-space: nowrap; }
.news-read { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.news-read:hover { text-decoration: underline; }
.news-new { font-size: 10px; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); margin-right: 4px; vertical-align: 2px; }
.news-new.sched { background: var(--info); }
.news-tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; border: 1px solid var(--line-2); text-transform: capitalize; }
.news-tag.official { color: var(--accent); border-color: var(--accent); }
.news-tag.community { color: var(--info); border-color: var(--info); }
.news-tag.version { color: var(--muted); }
.news-tag.lang { text-transform: none; letter-spacing: .04em; }
.news-foot-note { margin-top: 18px; }
button.mini { font-size: 12px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; }
button.mini:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 760px) { .news-card { flex-direction: column; } .news-thumb { width: 100%; height: 160px; } .news-tab { padding: 10px 6px; font-size: 13px; gap: 6px; letter-spacing: .03em; flex-direction: column; } .news-tab span { overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .news-tabs { overflow-x: visible; } .newdot { top: 6px; right: 6px; } }

/* ---------- Cooldown bay (Daily Briefing) ---------- */
.cd-bay { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cd-card { position: relative; display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--panel) 60%); }
.cd-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.cd-card.ready { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.cd-card.ready::before { background: var(--good); box-shadow: 0 0 14px var(--good); }
.cd-ring { --p: 0; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), color-mix(in srgb, var(--accent) 14%, transparent) 0); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 35%, transparent)); }
.cd-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel); }
.cd-card.ready .cd-ring { background: conic-gradient(var(--good) 100%, transparent 0); }
.cd-time { position: relative; font: 700 13px var(--mono); letter-spacing: .02em; text-align: center; line-height: 1.15; padding: 0 6px; }
.cd-body { min-width: 0; }
.cd-name { font-family: var(--display); font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.cd-what { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.cd-chip { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.cd-chip.now { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 600; }
.cd-arrow { color: var(--faint); }
.cd-meta { color: var(--faint); font-size: 12px; }
.cd-badge { display: inline-block; margin-top: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--good); background: var(--good-bg); }
@media (prefers-reduced-motion: no-preference) { .cd-card:not(.ready) .cd-ring { animation: cd-pulse 3s ease-in-out infinite; } }
@keyframes cd-pulse { 50% { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--accent) 60%, transparent)); } }

/* Move review dropdown (worker_move_impact): full card width under a move / option */
.move .review { grid-column: 1 / -1; }
.move-review { padding-top: 16px; padding-bottom: 16px; }
.review { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--panel-2); }
.review > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.review > summary::-webkit-details-marker { display: none; }
.review[open] > summary { margin-bottom: 8px; }
.review-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.review-t td { padding: 7px 4px; border-top: 1px solid var(--line); vertical-align: top; white-space: normal; }
.review-t tr:first-child td { border-top: 0; }
.review-t tr.scored td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.review-t .sub { display: block; color: var(--faint); font-size: 12px; }
.review-t td.r { text-align: right; white-space: nowrap; }

/* Move rows (Today's moves / Recommended plan): compact summary, tap to open sections */
details.mv + details.mv { border-top: 1px solid var(--line); }
details.mv > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
details.mv .mv-btn { grid-column: 1 / -1; display: block; text-align: center; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
details.mv > summary:hover .mv-btn { border-color: var(--accent); color: var(--accent); }
details.mv .mv-btn.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
details.mv .mv-btn .opened, details.mv[open] .mv-btn .closed { display: none; }
details.mv[open] .mv-btn .opened { display: inline; }
details.mv > summary::-webkit-details-marker { display: none; }
details.mv .step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
details.mv .mv-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
details.mv .mv-what { font-weight: 600; line-height: 1.35; }
details.mv .mv-what .muted { font-weight: 500; }
details.mv .mv-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; }
details.mv .mv-gain { text-align: right; font-weight: 700; font-size: 16px; white-space: nowrap; }
details.mv .mv-gain small { display: block; color: var(--faint); font-weight: 500; font-size: 12px; }
details.mv-review > summary .step { background: var(--warn, #d9822b); }
details.mv .mv-body { padding: 0 16px 16px 56px; display: flex; flex-direction: column; gap: 12px; }
details.mv .mv-sec { font-size: 13.5px; color: var(--muted); }
details.mv .mv-h { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
details.mv .mv-sec .workers { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 560px) {
  details.mv > summary { grid-template-columns: 28px 1fr; }
  details.mv .mv-gain { grid-column: 2; text-align: left; }
  details.mv .mv-gain small { display: inline; margin-left: 6px; }
  details.mv .mv-body { padding-left: 16px; }
}

/* Workforce (v0.27 bots) */
.co-body .why, .opt .why { color: var(--muted); font-size: 13px; margin-top: 4px; }
.wf-list { margin-top: 8px; font-size: 12.5px; }
.wf-list ul { margin: 4px 0 0 18px; padding: 0; }
.wf-list li { margin: 2px 0; }
.wf-actions { margin-top: 10px; display: flex; gap: 6px; }
.bot-form { margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.form-grid .field input, .form-grid .field select { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }
.form-grid .field.wide { grid-column: span 2; }
@media (max-width: 520px) { .form-grid .field.wide { grid-column: auto; } }
h3 .count { font-size: 12px; color: var(--faint); margin-left: 4px; }


/* =====================================================================================================================
   App shell (2026-10-23): top bar (logo, Eco | War, search, bell, player chip) + sidebar (My Buddy first, World below).
   At <= 960 px the sidebar is a drawer opened by the burger.
   ===================================================================================================================== */
:root { --top-h: 68px; --nav-w: 252px; }
[data-ico] { display: inline-flex; flex: none; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; border-radius: var(--radius); }
.skip-link:focus { top: 10px; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: flex; align-items: center; gap: 18px; padding: 0 22px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}
.topbar .brand { margin-right: 10px; }
.nav-burger { display: none; }

/* Eco | War toggle: the active mode is filled gold; on World pages it is only outlined (you are not in a mode there) */
.mode-toggle { display: flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); flex: none; }
.mode-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font-family: var(--display); font-size: 14px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 7px 18px; border-radius: 999px; cursor: pointer; transition: color .15s, background .15s; }
.mode-btn:hover { color: var(--text); }
.mode-btn.active { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-weight: 600; box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 35%, transparent); }
.mode-toggle.is-world .mode-btn.active { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--gold-line); }

/* global search */
.search { flex: 1; display: flex; justify-content: center; min-width: 0; }
.search-box { position: relative; display: flex; align-items: center; width: min(520px, 100%); }
.search-box input { width: 100%; padding: 10px 14px 10px 40px; border-radius: var(--radius); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--panel) 85%, transparent); outline: none; }
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { border-color: var(--accent); box-shadow: var(--glow); }
.search-ico { position: absolute; left: 12px; color: var(--muted); display: flex; pointer-events: none; }

.top-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bell .bell-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 11px/18px var(--sans); text-align: center; }
.bell .bell-n:empty { display: none; }
#login-btn { text-decoration: none; }

/* player chip + its menu */
.user-chip { position: relative; display: flex; align-items: center; }
.pchip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border: 1px solid transparent; border-left-color: var(--line-2); border-radius: 0; background: none; cursor: pointer; color: var(--text); text-align: left; }
.pchip:hover, .pchip[aria-expanded="true"] { border-color: var(--line-2); border-radius: var(--radius); background: var(--panel); }
.pc-ava { position: relative; width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--panel-3); box-shadow: 0 0 0 1.5px var(--accent); font-family: var(--display); font-size: 18px; color: var(--accent); }
.pc-ava img { width: 100%; height: 100%; object-fit: cover; }
.pc-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.pc-txt b { font-weight: 600; font-size: 14.5px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-txt small { color: var(--accent); font-family: var(--display); font-size: 12.5px; letter-spacing: .08em; }
.pc-txt small i { font-style: normal; color: var(--faint); letter-spacing: .02em; }
.pc-flag { font-size: 18px; line-height: 1; }
.pchip .ico { color: var(--muted); }
.pc-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 300px; padding: 8px; display: grid; gap: 2px; }
.pc-menu[hidden] { display: none; }
.pc-menu-h { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.pc-menu-h b { color: var(--text); }
.pc-menu > button, .pc-menu > a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: none; color: var(--text); text-decoration: none; text-align: left; cursor: pointer; font-size: 14px; }
.pc-menu > button:hover, .pc-menu > a:hover { background: var(--panel-2); }
.pc-menu > button .ico, .pc-menu > a .ico { color: var(--accent); }
.pc-menu > .pc-mobile { display: none; }
@media (max-width: 640px) { .pc-menu > .pc-mobile { display: flex; } }
.account-pop { display: grid; gap: 10px; padding: 10px; margin: 4px 0 0; border-top: 1px solid var(--line); }

/* layout */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
main { padding: 26px 32px 72px; max-width: 1480px; width: 100%; min-width: 0; }
main:focus { outline: none; }

/* sidebar */
.nav { position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h)); overflow-y: auto; display: flex; flex-direction: column; padding: 14px 12px 18px;
  border-right: 1px solid var(--line); background:
    linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--bg) 70%, transparent)),
    url("/static/brand/banner-war.jpg") center bottom / 260% auto no-repeat,
    var(--bg-2); }
.nav::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, var(--bg-2) 40%, color-mix(in srgb, var(--bg-2) 82%, transparent) 75%, color-mix(in srgb, var(--bg-2) 70%, transparent)); }
.nav > * { position: relative; }
.nav-group { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px; color: var(--muted); font-family: var(--display); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.nav-group .ico { color: var(--accent); width: 16px; height: 16px; }
.nav-group small { margin-left: auto; font-family: var(--sans); font-size: 10px; letter-spacing: .06em; text-transform: none; color: var(--faint); }
.nav-group.world { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
/* signed out: the free World tools come first, the locked My Buddy items after them (owner 2026-11-02) */
body:not(.signed-in) .nav-group.world, body:not(.signed-in) .nav-world { order: -1; z-index: 1; }  /* z-index: painting follows `order`, so .nav::before would cover them */
body:not(.signed-in) .nav-group.world { margin-top: 0; padding-top: 10px; border-top: 0; }
body:not(.signed-in) .nav-world { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.nav-sub { margin: 14px 10px 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; margin-bottom: 2px;
  background: none; border: 1px solid transparent; border-radius: 4px; text-align: left; cursor: pointer; color: var(--muted);
  font-family: var(--display); font-weight: 400; font-size: 15.5px; letter-spacing: .04em; transition: color .15s, background .15s, border-color .15s;
}
.nav-item .ico { color: var(--muted); transition: color .15s; }
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item:hover .ico, .nav-item.active .ico { color: var(--accent); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, var(--gold-soft), transparent); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.main { padding: 12px 14px; font-size: 17px; font-weight: 500; color: var(--text); border-color: var(--line-2); background: var(--panel); }
.nav-item.main .ico { color: var(--accent); }
.nav-item.main.active { border-color: var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), var(--panel)); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 16%, transparent), inset 3px 0 0 var(--accent); }
.nav-world .nav-item.sm { padding: 6px 12px; font-size: 14px; }
.nav-world .nav-item.sm .ico { width: 17px; height: 17px; }
.nav-item.locked { opacity: .55; }
.nav-item.locked::after { content: ""; margin-left: auto; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.nav-meta { margin-top: 16px; padding: 10px; color: var(--faint); font-size: 11.5px; line-height: 1.55; border-top: 1px solid var(--line); }
.nav-meta:empty { display: none; }
.nav-foot { margin-top: auto; padding: 22px 10px 4px; font-family: var(--display); font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); line-height: 1.8; }
.nav-foot::after { content: ""; display: block; width: 30px; height: 2px; margin-top: 10px; background: var(--accent); }
.nav-scrim { display: none; }
.site-foot { border-top: 1px solid var(--line); padding: 18px 24px 22px; text-align: center; color: var(--faint); font-size: 12.5px; letter-spacing: .04em; }
.site-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1240px) {
  .pc-txt { display: none; }
  .topbar { gap: 12px; }
  .mode-btn { padding: 7px 14px; }
}
@media (max-width: 960px) {
  :root { --top-h: 60px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .nav-burger { display: inline-grid; }
  .topbar .brand { margin-right: 0; }
  .brand-word { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; z-index: 70; left: 0; top: 0; height: 100vh; height: 100dvh; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease, visibility .22s; visibility: hidden; }
  body.nav-open .nav { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .55); }
  .search { order: 5; flex: 1 1 auto; }
  .search-box input { padding-left: 36px; }
  main { padding: 18px 16px 60px; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; row-gap: 8px; position: relative; }
  .nav { top: 0; }
  body.signed-in #refresh-btn { display: none; }  /* "Refresh data" is in the player menu */
  .top-tools { gap: 6px; }
  .search { order: 10; flex-basis: 100%; }
  .search-box { width: 100%; }
  .mode-btn { padding: 6px 11px; letter-spacing: .1em; font-size: 13px; }
  .mode-btn .ico { display: none; }
  body.signed-in #theme-btn { display: none; }  /* it lives in the player menu */
  .pchip { padding: 2px; border-left-color: transparent; }
  .pc-flag, .pchip > .ico { display: none; }
  .pc-ava { width: 36px; height: 36px; }
  .pc-menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .nav { top: 0; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* =====================================================================================================================
   Main briefs (Daily Briefing / War Brief): key-art hero banner, KPI row, the 12-column brief grid
   ===================================================================================================================== */
.hero-banner { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 196px; margin: -6px 0 18px; padding: 26px 30px 22px;
  border: 1px solid var(--gold-line); border-radius: var(--radius-lg); background: #0b0b0d; isolation: isolate; }
.hero-banner::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/static/brand/banner-eco.jpg") 70% 42% / cover no-repeat; }
.hero-banner.war::before { background-image: url("/static/brand/banner-war.jpg"); background-position: 60% 50%; }
.hero-banner::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8, 8, 9, .94) 0%, rgba(8, 8, 9, .78) 34%, rgba(8, 8, 9, .25) 70%, rgba(8, 8, 9, .5)), linear-gradient(0deg, rgba(8, 8, 9, .7), transparent 55%); }
.hb-in { position: relative; min-width: 0; color: #f1ece2; }
.hb-kicker { font-family: var(--display); font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: #e7b453; }
.hero-banner h1 { margin: 6px 0 2px; font-family: var(--display); font-size: clamp(34px, 4.4vw, 54px); font-weight: 600; line-height: 1; letter-spacing: .03em; text-transform: uppercase;
  background: linear-gradient(180deg, #f6d27e, #d9a441 70%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .6)); }
.hb-sub { font-family: var(--display); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: #d8d1c2; }
.hb-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 14px; font-size: 13.5px; color: #cfc8b9; }
.hb-when > span { display: inline-flex; align-items: center; gap: 6px; }
.hb-when .ico { color: #e7b453; }
.hb-when i { font-style: normal; color: #8d8676; }
.hb-quote { position: relative; align-self: center; font-family: var(--display); font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: #e7b453; text-align: right; line-height: 1.9; }
.hb-quote::after { content: ""; display: block; width: 44px; height: 2px; margin: 10px 0 0 auto; background: #e7b453; }
.hb-alert { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border: 1px solid var(--crimson); border-radius: 999px; color: #ff8a78; background: rgba(210, 65, 47, .18); font-family: var(--display); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
@media (max-width: 760px) { .hb-quote { display: none; } .hero-banner { min-height: 170px; padding: 20px 18px 18px; } }

.bf-kpis { margin-bottom: 16px; }
.bf-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.bf-a { grid-column: span 7; } .bf-b { grid-column: span 5; } .bf-c { grid-column: span 8; }
.bf-c .mv:first-child { border-top: 0; } .bf-c, .bf-d { display: grid; gap: 16px; align-content: start; }
.bf-d { grid-column: span 4; }
.bf-grid > div { min-width: 0; align-self: stretch; }
@media (max-width: 1260px) { .bf-a, .bf-b, .bf-c { grid-column: 1 / -1; } .bf-d { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.bf-more { margin-top: 12px; }

/* key prices */
.kp-chips { margin-bottom: 12px; }
.kp { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 14px; align-items: stretch; }
.kp-chart { position: relative; height: 262px; min-width: 0; }
.kp-chart .skel { position: absolute; inset: 0; }
.kp-stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); display: flex; flex-direction: column; gap: 2px; }
.kp-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.kp-name img { border-radius: 4px; }
.kp-price { margin-top: 8px; font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; }
.kp-lbl { color: var(--faint); font-size: 11.5px; }
.kp-chg { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-weight: 600; }
.kp-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.kp-row + .kp-row { margin-top: 0; border-top: 0; padding-top: 2px; }
@media (max-width: 560px) { .kp { grid-template-columns: minmax(0, 1fr); } .kp-chart { height: 200px; } }

/* company table */
.co-cell { display: inline-flex; align-items: center; gap: 10px; }
.co-cell img { border-radius: 4px; background: var(--panel-2); }
.tbl tfoot td { border-top: 1px solid var(--gold-line); border-bottom: 0; background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
tr.go:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* net worth */
.nw-total { font-family: var(--display); font-size: 32px; font-weight: 600; line-height: 1; color: var(--accent-2); }
.nw-chg { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 600; font-size: 13.5px; }
.nw-bar { display: flex; height: 8px; margin: 14px 0 10px; border-radius: 99px; overflow: hidden; background: var(--panel-3); gap: 2px; }
.nw-bar span { display: block; height: 100%; }
.nw-0 { background: var(--accent); } .nw-1 { background: #8f7bd8; } .nw-2 { background: var(--good); } .nw-3 { background: var(--info); } .nw-4 { background: #d9775b; }
.nw-legend { display: grid; gap: 4px; }
.nw-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.nw-row i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; }
.nw-row b { color: var(--text); font-weight: 600; }

/* quick actions */
.qa-list { display: grid; gap: 8px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.qa:hover { border-color: var(--gold-line); background: color-mix(in srgb, var(--accent) 6%, var(--panel-2)); }
.qa > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.qa b { font-weight: 600; font-size: 14px; }
.qa small { color: var(--faint); font-size: 12px; }
.qa > .ico { color: var(--faint); }
.qa-i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold-soft); color: var(--accent); flex: none; }

/* ---------- War Brief: fight cards, gear wear, shopping list, battle feed ---------- */
.fc-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.fc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); }
.fc.plus { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--good) 9%, transparent), transparent 60%), var(--panel-2); }
.fc.minus { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--bad) 9%, transparent), transparent 60%), var(--panel-2); }
.fc.ended { opacity: .78; }
.fc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.fc-why { padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--accent); font-family: var(--display); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.fc-round { margin-left: auto; }
.fc-region { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 19px; letter-spacing: .06em; text-transform: uppercase; }
.fc-region .ico { color: var(--crimson); }
.fc-vs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.fc-vs i { font-style: normal; color: var(--faint); font-size: 12px; }
.fc-vs .you { color: var(--text); font-weight: 600; }
.fc-bonus { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.fc-bonus > b { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-chip { padding: 2px 8px; border-radius: 3px; background: var(--panel-3); color: var(--muted); font-size: 12px; }
.fc-chip b { color: var(--text); }
.fc-chip.pos b { color: var(--good); } .fc-chip.neg b { color: var(--bad); }
.fc-nums { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.fc-nums b { color: var(--text); }
.fc-go { align-self: flex-start; margin-top: 2px; }

.gw-list { display: grid; gap: 10px; }
.gw { display: flex; align-items: center; gap: 12px; }
.gw-art { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel-2); color: var(--faint); overflow: hidden; }
.gw-art img { width: 34px; height: 34px; object-fit: contain; }
.gw-x { flex: 1; min-width: 0; }
.gw-t { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.gw-t b { font-weight: 600; }
.gw-t .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw.empty .gw-t { margin: 0; }
.gw.empty { opacity: .7; }

.sl-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.sl-art { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); }
.sl-art img { width: 44px; height: 44px; object-fit: contain; }
.sl-cost { font-family: var(--display); font-size: 20px; color: var(--accent-2); }
.sl-total { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sl-total .btn { margin-left: auto; }

.feed { display: grid; gap: 0; }
.feed-row { display: grid; grid-template-columns: 48px 12px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.feed-row:last-child { border-bottom: 0; }
.feed-t { color: var(--faint); font-size: 12px; text-align: right; }
.feed-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); }
.feed-dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.feed-dot.info { background: var(--info); }
.act.compact { grid-template-columns: auto minmax(0, 1fr); padding: 10px 12px; }
@media (max-width: 640px) { .act.compact { grid-template-columns: minmax(0, 1fr); } }
.bf-d .wb-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .locked-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hb-kicker .ico { vertical-align: -2px; }

:root[data-theme="light"] .nav { background: var(--bg-2); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .nav { background: var(--bg-2); } }

/* Gear & Crafting tabs + the Companies page's lower half (owner, 2026-10-23: pages merged) */
.gear-tabs { margin: 0 0 16px; }
.gear-tabs .seg-btn { display: inline-flex; align-items: center; gap: 6px; }
.co-moves { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-2); scroll-margin-top: 80px; }
.co-moves-head h2 { margin-top: 0; }

/* Investment Radar: smart money + volume (2026-10-23) */
.verdict.warn { border-left-color: var(--warn); }
.sm-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 12px; }
.sm-sum > div { border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--panel); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sm-sum .kicker { width: 100%; }
.sm-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px 3px 4px; background: transparent; color: inherit; cursor: pointer; font: inherit; font-size: 13px; }
.sm-chip:hover { border-color: var(--gold, var(--accent)); }
.sm-chip .art-sm { width: 22px; height: 22px; }
.notes .flow-li { list-style: none; margin-left: -1em; margin-top: 4px; }

/* v0.27 headline: bring your companies home (home_move.py) */
.hm { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 18px; padding: 18px 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--gold-line); background: linear-gradient(120deg, var(--gold-soft), var(--panel) 70%); }
.hm.hm-warn { border-color: var(--warn); background: var(--warn-bg); }
.hm-ico { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--accent);
  border: 1px solid var(--gold-line); background: var(--panel); }
.hm-b { min-width: 0; flex: 1; }
.hm-k { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hm-t { font-family: var(--display); font-size: 20px; line-height: 1.25; margin: 4px 0 6px; }
.hm-dest { color: var(--accent); }
.hm p { margin: 0 0 8px; color: var(--muted); }
.hm-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.hm-list .pill { margin-left: 6px; }

/* frozen companies */
.frz-head { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.frz-meter { display: flex; gap: 4px; flex-wrap: wrap; flex: none; max-width: 180px; }
.frz-meter i { width: 14px; height: 14px; border-radius: 4px; }
.frz-meter i.on { background: var(--accent); }
.frz-meter i.off { border: 1.5px dashed var(--info); background: var(--info-bg); }
.frz-card { padding: 16px; border-left: 3px solid var(--info); }
.frz-top { display: flex; gap: 10px; align-items: center; }
.frz-top > div { flex: 1; min-width: 0; }
.frz-pill { flex: none; }
.frz-num { margin: 12px 0 6px; font-size: 15px; }
.frz-num b { font-size: 20px; }
.frz-v { font-size: 13px; color: var(--muted); }
.frz-v.good { color: var(--text); }

/* workforce: add buttons + hiring helper */
.wf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.wf-actions .btn { display: inline-flex; gap: 6px; align-items: center; }
.hh-top { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 12px; }
.hh-top label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.hh-table input, .hh-table select { width: 100%; min-width: 64px; }
.hh-table td:first-child input { min-width: 110px; }
.hh-btns { display: flex; gap: 10px; margin: 12px 0; }
tr.hh-best td { background: var(--good-bg); }
/* Hiring helper v2: company chips, paste steps, verdict hero, all-companies summary, one-line manual cards */
.hh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel-2, var(--panel)); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.hh-chip.on { border-color: var(--accent); color: var(--accent); background: var(--gold-soft); }
.hh-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--faint); }
.hh-dot.hire { background: var(--good); } .hh-dot.reroll { background: var(--info); } .hh-dot.skip { background: var(--bad); }
.hh-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.hh-mode button { padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.hh-mode button.on { border-color: var(--gold-line); color: var(--text); background: var(--gold-soft); }
.hh-rr { margin-left: auto; font-size: 13px; color: var(--muted); }
.hh-steps { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 10px; }
.hh-steps li { display: grid; gap: 6px; }
.hh-steps textarea { width: 100%; font-family: var(--mono); font-size: 12px; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); resize: vertical; }
.hh-hero { margin: 14px 0 8px; padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--panel); }
.hh-hero.hire { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: var(--good-bg); }
.hh-hero.reroll { border-color: color-mix(in srgb, var(--info) 45%, var(--line)); background: var(--info-bg); }
.hh-hero.skip { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-bg); }
.hh-hero-t { font-family: var(--display); font-size: 24px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.hh-hero-d { margin-top: 4px; color: var(--muted); font-size: 14px; }
.hh-hero-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hh-more { margin-top: 8px; } .hh-more summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
.hh-sum { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hh-sum-h { padding: 8px 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--line); }
.hh-sum-row { display: grid; grid-template-columns: 24px 1fr auto auto; gap: 10px; align-items: center; width: 100%; padding: 8px 12px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.hh-sum-row:last-child { border-bottom: 0; } .hh-sum-row.on, .hh-sum-row:hover { background: var(--gold-soft); }
.hh-sum-n { color: var(--faint); font-family: var(--mono); }
.hh-line { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hh-line label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.hh-line input, .hh-line select { width: 120px; }
.hh-line-n { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; background: var(--gold-soft); color: var(--accent); font-size: 12px; margin-bottom: 6px; }
.hh-warn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); font-size: 14px; }
.hh-warn b { display: block; } .hh-warn span { display: block; margin-top: 3px; color: var(--muted); }
.hh-warn.no { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); color: var(--bad); }
.hh-warn.careful { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); color: var(--warn); }
.hh-warn.good { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); color: var(--good); }
.hh-warn .linkish, .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.hh-dot.unknown { background: var(--warn); }
.ok-box { margin: 10px 0; padding: 10px 14px; border-radius: var(--radius); background: var(--good-bg); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 40%, var(--line)); font-size: 14px; }
@media (max-width: 640px) { .hh-rr { margin-left: 0; width: 100%; } .hh-line input, .hh-line select { width: 100%; } .hh-line label { flex: 1 1 40%; } }
@media (max-width: 640px) { .hm { flex-direction: column; } .frz-head { flex-direction: column; align-items: flex-start; } }

/* Briefing layout (owner 2026-10-26) */
.bf-row { display: grid; gap: 16px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; margin: 0 0 18px; }
.bf-row > div { min-width: 0; display: grid; gap: 16px; align-content: start; }
.bf-row-top .ov-solo, .bf-row-top .ov-solo .ov-left, .bf-row-top > div > .panel { height: 100%; }
.bf-row-top > div { align-content: stretch; }
.ov-solo { margin: 0; }
.ov-solo .ov-card { margin: 0; }
.bf-bar { margin: 6px 0 16px; }
.bf-full { margin-top: 0; }
.co-ov th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.co-ov th.sortable.on { color: var(--accent); }
.co-ov tr.co-frozen td { opacity: .45; }
.co-ov tr.co-frozen:hover td { opacity: .8; }
.co-ov .sub { display: block; margin-top: 2px; font-size: 12px; }
.co-ov .sub .pill { font-size: 10px; }
.co-st { display: grid; gap: 4px; min-width: 90px; }
.co-ov td, .co-ov th { padding-left: 10px; padding-right: 10px; }
.co-st-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.co-st-bar span { display: block; height: 100%; background: var(--accent); }
.co-st-bar span.warn { background: var(--warn); }
@media (max-width: 1100px) { .bf-row { grid-template-columns: 1fr; } }

/* At-a-glance strip + vertical tabs (Workforce, Companies; owner 2026-10-26) */
.glance { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0 0 18px; }
.glance-i { padding: 14px 16px; }
.glance-i .label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.glance-i .value { font-family: var(--display); font-size: 24px; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glance-i .value small { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.glance-i .value.warn { color: var(--warn); }
.glance-i .sub { font-size: 12px; color: var(--faint); }
.vt { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.vt-nav { display: grid; gap: 8px; position: sticky; top: calc(var(--top-h, 64px) + 12px); }
.vt-btn { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.vt-btn:hover { border-color: var(--gold-line); }
.vt-btn.on { border-color: var(--accent); background: linear-gradient(90deg, var(--gold-soft), var(--panel)); box-shadow: inset 3px 0 0 var(--accent); }
.vt-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--accent); }
.vt-txt { display: grid; min-width: 0; flex: 1; }
.vt-txt b { font-size: 14px; }
.vt-txt small { font-size: 12px; color: var(--faint); }
.vt-badge { flex: none; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--info-bg); color: var(--info); }
.vt-body { min-width: 0; }
.vt-body > :first-child { margin-top: 0; }
.vt-h { margin-top: 0; }
.vt-body .vt-h ~ .vt-h { margin-top: 26px; }
.wf-choices { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 16px; }
.wf-choice { display: flex; gap: 14px; padding: 18px; align-items: flex-start; }
.wf-choice.on { border-color: var(--accent); }
.wf-choice p { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.wf-ch-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--accent); }
.wf-empty { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 900px) { .vt { grid-template-columns: 1fr; } .vt-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
/* Signed in: the World "Market" repeats My Buddy → Market (owner 2026-10-26) */
body.signed-in .nav-item[data-section="produce"] { display: none; }

/* Gear & Crafting revamp (owner 2026-10-26) */
.gp-strip { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); margin: 0 0 12px; }
.gp { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.gp:hover { border-color: var(--gold-line); color: var(--text); }
.gp.on { border-color: var(--accent); background: linear-gradient(180deg, var(--gold-soft), var(--panel)); color: var(--text); box-shadow: var(--glow); }
.gp.sm { padding: 8px 6px; font-size: 12px; }
.gp-art { width: 52px; height: 52px; object-fit: contain; }
.gp.sm .gp-art { width: 38px; height: 38px; }
.gp-ico { font-size: 34px; line-height: 52px; }
.gt-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.gt-chip { display: inline-grid; gap: 1px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-align: center; }
.gt-chip small { font-size: 10px; color: var(--faint); }
.gt-chip:disabled { opacity: .35; cursor: not-allowed; }
.gt-chip.sm { padding: 2px 9px; font-size: 11px; cursor: default; margin-left: 6px; }
.gt-chip.t-common.on { border-color: #8b95a1; color: #c3cad3; background: rgba(120, 130, 140, .18); }
.gt-chip.t-uncommon.on { border-color: #2ea05a; color: #5fd08c; background: rgba(46, 160, 90, .18); }
.gt-chip.t-rare.on { border-color: #326edc; color: #78a4ff; background: rgba(50, 110, 220, .18); }
.gt-chip.t-epic.on { border-color: #8c50d2; color: #b98bff; background: rgba(140, 80, 210, .2); }
.gt-chip.t-legendary.on { border-color: #d7a028; color: #f0c25a; background: rgba(215, 160, 40, .2); }
.gt-chip.t-mythic.on { border-color: #dc3c3c; color: #ff7a7a; background: rgba(220, 60, 60, .2); }
.gear-grid { display: grid; gap: 16px; grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .gear-grid { grid-template-columns: 1fr; } }
.gear-form { display: grid; gap: 12px; }
.gf-head { display: flex; gap: 12px; align-items: center; }
.gf-art { width: 56px; height: 56px; object-fit: contain; }
.gr { display: grid; gap: 6px; }
.gr-h { display: flex; justify-content: space-between; font-size: 14px; }
.gr-bar { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.gr-bar i { position: absolute; top: 0; height: 100%; border-radius: 3px; background: var(--accent); }
.gr-in { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.gr input, .gr-in input { width: 100%; }
.gx-pair { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 12px 0; }
.gx { position: relative; padding: 18px; }
.gx.win { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.gx-badge { position: absolute; top: 12px; right: 12px; font-size: 11px; padding: 2px 9px; border-radius: 99px; background: var(--good-bg); color: var(--good); text-transform: uppercase; letter-spacing: .06em; }
.gx-t { display: flex; gap: 6px; align-items: center; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gx-big { font-family: var(--display); font-size: 34px; margin: 6px 0 2px; }
.gx-sub { font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.gx-rows { display: grid; gap: 0; }
.gx-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.gx-rows > div span { color: var(--muted); }
.cr-prices { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 14px 16px; margin-bottom: 16px; }
.cr-prices label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cr-prices input { width: 140px; }
.cr-hint { font-size: 12px; margin-left: auto; }
.cr-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); margin-bottom: 14px; }
.cr-hero.good { border-color: var(--good); background: linear-gradient(120deg, var(--good-bg), var(--panel) 70%); }
.cr-hero.bad { border-color: var(--line-2); background: linear-gradient(120deg, var(--bad-bg), var(--panel) 70%); }
.cr-hero-t { font-family: var(--display); font-size: 30px; margin: 2px 0; }
.cr-hero-n { font-family: var(--display); font-size: 40px; text-align: right; display: grid; }
.cr-hero-n small { font-size: 12px; color: var(--faint); font-family: var(--sans); }
.cr-batch { margin-bottom: 8px; }
.cr-range { position: relative; height: 12px; border-radius: 6px; background: var(--line); margin: 16px 0 6px; }
.cr-range .band { position: absolute; top: 0; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--bad), var(--warn), var(--good)); opacity: .7; }
.cr-range .zero { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--text); }
.cr-range .mid { position: absolute; top: -3px; width: 10px; height: 18px; margin-left: -5px; border-radius: 3px; background: var(--accent); }
.cr-range-l { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.cr-pieces { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cr-piece { padding: 14px; display: grid; gap: 8px; }
.cr-piece .gp-art { width: 44px; height: 44px; }
.cr-p-b { display: grid; }
.cr-hold { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.cr-hold input[type=text] { flex: 1; min-width: 200px; }

/* ---------- What's new pop-up (static/whatsnew.js) ---------- */
.wn-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(5, 5, 6, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s ease; }
.wn-backdrop.wn-in { opacity: 1; }
.wn { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); color: var(--text); border: 1px solid var(--gold-line); border-radius: var(--radius-lg);
  box-shadow: var(--glow), 0 30px 80px rgba(0, 0, 0, .55); transform: translateY(14px) scale(.98); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.wn-in .wn { transform: none; }
.wn-art { position: relative; flex: none; height: 190px; background: url("/static/brand/landing/hero.jpg") 55% 40% / cover no-repeat; }
.wn-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 9, 10, .35), rgba(9, 9, 10, .1) 35%, var(--panel) 100%); }
.wn-pill { position: absolute; z-index: 1; top: 14px; left: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 99px; color: #8fe39a; border: 1px solid rgba(95, 191, 106, .6); background: rgba(9, 9, 10, .6); }
.wn-x { position: absolute; z-index: 1; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(9, 9, 10, .55); color: #ede8dd; cursor: pointer; }
.wn-x:hover { border-color: var(--accent); color: var(--accent); }
.wn-head { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 6px; }
.wn-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.wn-head h2 { margin: 4px 0 0; padding: 0; border: 0; font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; text-transform: uppercase; letter-spacing: .01em; color: var(--text); }
.wn-head h2::after { display: none; }
.wn-body { padding: 10px 20px 4px; overflow-y: auto; }
.wn-lede { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.wn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wn-list li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: var(--radius); }
.wn-list li:hover { background: var(--gold-soft); }
.wn-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--accent);
  border: 1px solid var(--gold-line); background: var(--gold-soft); }
.wn-list b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.wn-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.wn-foot { flex: none; display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.wn-foot .btn { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 640px) {
  .wn-art { height: 150px; }
  .wn-head h2 { font-size: 30px; }
  .wn-foot { flex-direction: column-reverse; }
  .wn-foot .btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .wn-backdrop, .wn { transition: none; } }

/* ---------- Production planner (v0.27 Phase 5) - same look as the Hiring helper ---------- */
.pl-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; padding: 18px 20px; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--panel); }
.pl-hero.go { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); background: linear-gradient(135deg, var(--good-bg), var(--panel) 70%); }
.pl-hero.keep { border-color: var(--gold-line); background: linear-gradient(135deg, var(--gold-soft), var(--panel) 70%); }
.pl-gain { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 8px; }
.pl-gain > b { font-family: var(--display); font-size: 40px; font-weight: 600; line-height: 1; }
.pl-gain > span { color: var(--muted); font-size: 14px; }
.pl-low { padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13px !important; }
.pl-gain b.pos, .pl-big b.pos, .pl-kv b.pos { color: var(--good); } .pl-gain b.neg, .pl-big b.neg, .pl-kv b.neg { color: var(--bad); }
.pl-order { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pl-order span { padding: 3px 10px; border-radius: 99px; border: 1px dashed var(--line-2); color: var(--faint); font-size: 12px; }
.pl-order span.on { border-style: solid; border-color: var(--gold-line); color: var(--accent); background: var(--gold-soft); font-weight: 600; }
.pl-hero-side { display: grid; gap: 12px; align-content: start; }
.pl-needs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.pl-needs > div, .pl-kv > div { display: grid; gap: 1px; min-width: 0; }
.pl-needs > div { padding: 8px 10px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.pl-needs span, .pl-kv span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.pl-needs b { font-family: var(--display); font-size: 20px; font-weight: 500; }
.pl-needs small, .pl-kv small { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.pl-concrete { display: grid; gap: 6px; }
.pl-concrete label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-c-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pl-c-row input { width: 120px; }
.pl-concrete .help { margin: 0; }
.pl-steps { display: grid; gap: 10px; }
.pl-step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); background: var(--panel); }
.pl-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 99px; background: var(--gold-soft); color: var(--accent);
  font-family: var(--display); font-size: 16px; border: 1px solid var(--gold-line); }
.pl-t { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 16px; }
.pl-what { margin: 6px 0 8px; }
.pl-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px 14px; }
.pl-kv b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pl-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-flags .pill { white-space: normal; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pl-big { display: grid; justify-items: end; text-align: right; gap: 2px; }
.pl-big > b { font-family: var(--display); font-size: 26px; font-weight: 600; line-height: 1; }
.pl-big small { color: var(--muted); font-size: 12px; }
.pl-why { color: var(--muted); font-size: 13px; margin-top: 3px; }
.pl-dropped { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.pl-dropped .pl-why { display: block; }
.pl-co-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 2px 0 10px; font-size: 17px; }
.pl-co-h .faint { font-size: 13px; }
.pl-sub { margin: 16px 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.pl-opt { padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.pl-opt + .pl-opt { margin-top: 8px; }
.pl-opt.keep { background: var(--panel-2); }
.pl-opt.rec { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.pl-opt-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.pl-opt-h .pill { margin-left: auto; }
.pl-opt .pl-kv { margin-top: 10px; }
.pl-lg-sum { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 12px; }
.pl-lg-sum > div { display: grid; gap: 2px; }
.pl-lg-sum span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
tr.pl-planned td { background: var(--info-bg); }
.pl-lg td .sub { white-space: normal; }
.pl-lg td:first-child { white-space: normal; }
.pl-rows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.pl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pl-row:last-child { border-bottom: 0; }
.pl-row-r { display: grid; justify-items: end; gap: 3px; }
@media (max-width: 900px) { .pl-hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pl-hero { padding: 14px; } .pl-gain > b { font-size: 32px; }
  .pl-step { grid-template-columns: 30px minmax(0, 1fr); padding: 12px; gap: 10px; }
  .pl-big { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; text-align: left; }
  .pl-step .pl-body { grid-column: 2; grid-row: 1; }
  .pl-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-opt-h .pill { margin-left: 0; }
  .pl-lg th, .pl-lg td { padding-left: 10px; padding-right: 10px; }
  .pl-row { grid-template-columns: minmax(0, 1fr); } .pl-row-r { justify-items: start; }
}

/* Daily Briefing page: one numbered list of what to do today */
.today { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.today-h { margin: 8px 0 2px; font-size: 32px; }
.today-date { margin-bottom: 18px; }
.today-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.today-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px; width: 100%; box-sizing: border-box; }
.today-step.danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); border-left: 4px solid var(--bad); background: var(--bad-bg); }
.today-n { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 18px;
  background: var(--accent); color: var(--accent-ink); }
.today-step.danger .today-n { background: var(--bad); color: #fff; }
.today-b { min-width: 0; flex: 1; }
.today-t { margin: 4px 0 12px; font-size: 19px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
.today-energy { margin: -6px 0 12px; font-size: 14px; }
.today-go { display: inline-block; text-decoration: none; }
.today-why { margin-top: 12px; }
.today-why summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.today-why p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.today-because { margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.today-reasons { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.today-reasons li + li { margin-top: 6px; }
.pl-because { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
.today-empty { font-size: 17px; }
.today-more { margin: 18px 0 28px; font-size: 14px; }
.bf-charts-wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .today-step { padding: 14px; gap: 10px; } .today-n { width: 32px; height: 32px; font-size: 16px; } .today-t { font-size: 17px; } }

/* Guides page */
.guides-list { display: grid; gap: 14px; max-width: 760px; }
.guide-card { display: grid; gap: 4px; text-decoration: none; color: inherit; }
.guide-card:hover { border-color: var(--accent); }
.guide-t { font-size: 18px; }
.guide-view { max-width: 760px; padding: 0 0 28px; }
.guide-back { display: inline-block; margin-bottom: 10px; }
.guide-h { margin: 4px 0 2px; font-size: 26px; }
.guide-view .today-list { margin-top: 16px; }
.guide-text { margin: 4px 0 10px; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.guide-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 600px) { .guide-view, .guides-list { padding: 0; } .guide-h { font-size: 22px; } }

.today-watch { margin: 16px 0 0; font-size: 14px; color: var(--muted, #7a8494); }
.today-watch h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.today-watch ul { margin: 0; padding-left: 18px; }
.today-alliance p { margin: 4px 0 0; line-height: 1.5; }
.today-al { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.today-al { table-layout: fixed; }
.today-al th, .today-al td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line, rgba(127,127,127,.2)); vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.today-al th:first-child { width: 34%; }
.today-al th { white-space: nowrap; overflow-wrap: normal; }
.today-al th:nth-child(2) { width: 6.5em; }
.today-al .r { text-align: right; }

.auth-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.auth-tabs button { flex: 1 1 auto; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.auth-tabs button[aria-selected="true"] { color: var(--text); border-color: var(--accent); box-shadow: var(--glow); }
.auth-card textarea { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; resize: vertical; outline: none; }
.auth-card textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
.auth-card section[hidden] { display: none; }
.auth-card .auth-sub { margin: 0; font-size: 13px; }
.auth-ok { color: var(--ok, #3fb950); background: var(--panel-2, var(--bg-2)); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; }
.auth-error[hidden], .auth-ok[hidden], .auth-error-link[hidden] { display: none; }
.auth-error-link { margin: 0; font-size: 13px; }
.turnstile-box:empty { display: none; }
.danger-btn { color: var(--bad); }

/* Phones: wide tables inside the Workforce accordions scroll inside their own box, never the whole page (2026-11-01). */
.acc-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Watermark (normal accounts only, set by applyWatermark in app.js): neutral grey so it reads on dark and light themes. */
#wm { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; opacity: .055; background-repeat: repeat; }
:root[data-theme="light"] #wm { opacity: .07; }

/* server-written text for search engines and new visitors (app/web/seo.py): under a World tool, and the world pages */
.seo-block { grid-column: -2 / -1; padding: 8px 32px 56px; max-width: 900px; min-width: 0; color: var(--muted); line-height: 1.6; }
.seo-block[hidden] { display: none; }
.lp-page .seo-block, body.landing-mode .seo-block { margin: 0 auto; padding: 32px 24px 48px; }
.seo-block h2, .seo-main h2 { font-family: var(--display); font-weight: 600; letter-spacing: .04em; color: var(--text, inherit); font-size: 22px; margin: 26px 0 8px; }
.seo-block h3 { font-size: 15px; color: var(--text, inherit); margin: 18px 0 4px; }
.seo-block a, .seo-main a { color: var(--accent); }
.seo-links { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.seo-table { border-collapse: collapse; width: 100%; max-width: 620px; margin: 10px 0; font-size: 14px; }
.seo-table th, .seo-table td { text-align: left; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); font-weight: 400; overflow-wrap: anywhere; }
.seo-table thead th, .seo-facts th { color: var(--muted); }
.seo-faint { color: var(--faint); font-size: 12.5px; }
.seo-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.seo-top .brand { text-decoration: none; }
.seo-main { max-width: 900px; margin: 0 auto; padding: 24px 24px 56px; line-height: 1.6; }
.seo-main h1 { font-family: var(--display); font-weight: 600; font-size: 32px; letter-spacing: .04em; margin: 10px 0 6px; overflow-wrap: anywhere; }
.seo-lead { color: var(--muted); margin: 0 0 14px; }
.seo-crumbs { font-size: 13px; color: var(--faint); }
.seo-hub { padding-left: 18px; columns: 2; column-gap: 28px; }
.seo-hub li { break-inside: avoid; margin: 3px 0; }
.seo-hub small { color: var(--faint); }
.seo-main:has(.seo-article) { max-width: 760px; }
.seo-article { font-size: 18px; line-height: 1.75; color: var(--text); }
.seo-article p, .seo-article li { color: var(--text); }
.seo-article p { margin: 0 0 18px; }
.seo-article > ul, .seo-article > ol { padding-left: 22px; margin: 0 0 20px; }
.seo-article li { margin: 7px 0; }
.seo-article h2 { font-size: 28px; line-height: 1.2; margin: 46px 0 14px; scroll-margin-top: 16px; }
.seo-article h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--accent); margin-top: 10px; }
.seo-article h3 { font-family: var(--display); font-weight: 600; letter-spacing: .03em; font-size: 20px; margin: 26px 0 8px; }
.seo-article a { text-underline-offset: 3px; }
.a-head { margin: 18px 0 20px; }
.a-head h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.08; margin: 8px 0 12px; }
.a-kicker { font-family: var(--display); font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.a-by { color: var(--muted); font-size: 14.5px; margin: 0; }
.a-hero { display: block; width: 100%; height: auto; aspect-ratio: 900 / 297; object-fit: cover; border-radius: 8px; margin: 0 0 24px; }
.a-toc { border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; margin: 0 0 28px; font-size: 15px; }
.a-toc b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.a-toc ol { margin: 8px 0 0; padding-left: 20px; }
.a-toc li { margin: 3px 0; }
.a-short { border-left: 4px solid var(--accent); background: var(--bg-2); padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 0 0 26px; }
.a-short b { font-family: var(--display); letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: var(--accent); }
.a-short p { margin: 6px 0 0; }
.a-note { border: 1px solid var(--line); background: var(--bg-2); border-radius: 8px; padding: 16px 20px; margin: 22px 0; }
.a-note b { color: var(--accent-2); }
.a-note p { margin: 6px 0 0; }
.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 8px; }
.a-stats div { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.a-stats b { display: block; font-family: var(--display); font-size: 32px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.a-stats span { font-size: 14px; color: var(--muted); line-height: 1.35; display: block; margin-top: 4px; }
.a-steps { list-style: none; counter-reset: step; padding: 0 !important; }
.a-steps li { counter-increment: step; position: relative; padding: 0 0 0 46px; margin: 16px 0; }
.a-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--display); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.a-formula { font-family: var(--display); letter-spacing: .02em; font-size: 19px; text-align: center; padding: 14px; border: 1px dashed var(--line); border-radius: 8px; }
.a-faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.a-faq summary { cursor: pointer; font-weight: 600; }
.a-faq p { margin: 8px 0 4px; color: var(--muted); }
.a-author { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid var(--line); margin: 40px 0 0; padding: 20px 0 0; font-size: 15.5px; }
.a-author p { margin: 2px 0 0; color: var(--muted); }
.a-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin: 22px 0 0; font-size: 16px; }
.a-cta p { margin: 2px 0 0; color: var(--muted); }
.a-cta .btn { text-decoration: none; color: var(--accent-ink); }
.a-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 12px 0 28px; }
.a-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 0 14px 14px; text-decoration: none; color: var(--text) !important; line-height: 1.3; }
.a-card img { width: calc(100% + 28px); margin: 0 -14px 8px; height: 84px; object-fit: cover; }
.a-card span { font-family: var(--display); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.a-card small { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.a-card:hover { border-color: var(--accent); }
.seo-scroll { overflow-x: auto; }
.seo-wide { max-width: none; min-width: 560px; }
.seo-foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 8px; }
@media (max-width: 640px) { .seo-article { font-size: 17px; } .seo-article h2 { font-size: 24px; } .seo-block { padding: 8px 16px 40px; } .seo-main, .seo-top { padding-left: 16px; padding-right: 16px; } .seo-hub { columns: 1; } }

/* War mode closed for now: the button stays, greyed; a click says "Coming soon" */
.mode-btn.locked-soon { opacity: .45; cursor: not-allowed; }
.mode-btn.locked-soon:hover { color: var(--muted); }
.wb-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 1000; background: var(--bg-2); color: var(--text); border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; font-weight: 600; box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
.wb-toast[hidden] { display: none; }

/* Today: steps that need more energy than the bar holds */
.today-comeback { border-left: 4px solid var(--accent); background: var(--bg-2); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 0 0 14px; font-weight: 600; }
.today-step.waiting { opacity: .72; }
.today-step.waiting .today-n { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.today-energy.wait { color: var(--accent-2); font-weight: 600; }

/* "Sign up" panel under every free tool (signed-out visitors only) */
.join-panel { margin-top: 28px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-color: var(--gold-line); background: linear-gradient(90deg, var(--gold-soft), transparent 70%), var(--panel); }
.join-panel .join-text { flex: 1 1 320px; min-width: 0; }
.join-panel .join-text b { font-family: var(--display); letter-spacing: .04em; font-size: 18px; }
.join-panel .join-text p { margin: 4px 0 0; }
.join-panel .join-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.join-panel .btn { text-decoration: none; }

/* Employee Taxes */
.tax-tools { margin: 14px 0 10px; }
.tax-tools input { width: min(320px, 100%); padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.tax-table a { color: inherit; text-decoration: none; }
.tax-table a:hover b { color: var(--accent); }
.lp-art.lp-art-drawn { background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--accent); }
.lp-art.lp-art-drawn svg { width: 100%; height: 100%; display: block; fill: currentColor; opacity: .55; }

/* Employee Calculator */
.emp-form { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin: 14px 0; }
.emp-form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); flex: 1 1 160px; }
.emp-form input { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.emp-form input:focus { border-color: var(--accent); outline: none; }
.gb-card { margin-top: 22px; }
.gb-card h2 { margin: 0 0 4px; }
.emp-form select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }

/* Price alerts (Trading Desk side card, members) */
.pa-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.pa-form select, .pa-form input { padding: 5px 8px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; }
.pa-form input { width: 96px; }
.pa-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; }
.pa-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); }

/* Craft: a piece you hold - one box per stat (2026-11-03) */
.cr-stats { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 auto; }
.cr-stat { display: flex; flex-direction: column; gap: 4px; font-size: 13px; min-width: 140px; flex: 1 1 140px; }
.cr-stat input { width: 100%; }
.cr-hold { align-items: flex-end; }
