/* Decorably AI-managed PPC dashboard. Same look as the approval pages (assets/preview_template.html). */
:root {
  --bg: #f5f8f8; --surface: #ffffff; --ink: #231f20; --muted: #4c5759; --line: #d9e2e2;
  --accent: #127f7c; --accent-fill: #31beba; --gold: #f7c311;
  --up: #1d7a3e; --down: #a3461d; --pause: #646a72; --neg: #6a4aa0; --wait: #8a6100; --wait-bg: #fff4cc;
  --ok-bg: #e3f4ea; --chip: #eef3f3; --gold-edge: #a87e00;
  --display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --r: 10px; --r-ctl: 8px;
  --body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111515; --surface: #182020; --ink: #e6eded; --muted: #aab5b6; --line: #2a3535;
    --accent: #52cfca; --accent-fill: #2aa7a3; --gold: #f7c311;
    --up: #63c58e; --down: #ef8b5e; --pause: #a6abb2; --neg: #b89be8; --wait: #f7d36b; --wait-bg: #3a3112;
    --ok-bg: #173325; --chip: #203030; --gold-edge: #f7c311; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111515; --surface: #182020; --ink: #e6eded; --muted: #aab5b6; --line: #2a3535;
  --accent: #52cfca; --accent-fill: #2aa7a3; --gold: #f7c311;
  --up: #63c58e; --down: #ef8b5e; --pause: #a6abb2; --neg: #b89be8; --wait: #f7d36b; --wait-bg: #3a3112;
  --ok-bg: #173325; --chip: #203030; --gold-edge: #f7c311; color-scheme: dark;
}
* { box-sizing: border-box; }
.human-filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin: 24px 0; }
.human-filters label { display: grid; gap: 6px; font-weight: 600; }
.human-filters input, .human-filters select { min-height: 44px; max-width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); color: var(--ink); font: inherit; }
.human-item { padding: 24px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.human-heading { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.human-heading h3 { flex: 1 1 260px; margin: 0; }
.human-item p { max-width: 75ch; }
.human-price { background: var(--chip); padding: 18px; margin: 18px 0; }
.human-evidence summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.human-filters :focus-visible, .human-evidence summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) { .human-filters label { width: 100%; } .human-filters input, .human-filters select { width: 100%; } }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
/* Browser surfaces in the palette: selection, caret, scrollbars, numerals. */
html { scrollbar-color: color-mix(in srgb, var(--muted) 40%, transparent) transparent; }
::selection { background: color-mix(in srgb, var(--accent-fill) 32%, transparent); }
input, textarea { caret-color: var(--accent); }
.num, .stat .v, .tile .v, .money, .gnums, td { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }
.top { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 28px; }
.top .brand { align-self: center; padding: 12px 0; }
.brand { font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--accent); }
#nav { display: flex; gap: 4px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
#nav a { display: inline-flex; align-items: center; gap: 7px; min-height: 52px; padding: 0 12px; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; border-bottom: 3px solid transparent; }
#nav a:hover { color: var(--ink); }
#nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent-fill); }
#nav a[aria-current="page"] { color: var(--accent); }
#nav .count { font-size: 12px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--chip); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.subnav { background: var(--bg); border-top: 1px solid var(--line); }
.subnav .in { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: thin; }
.subnav .lbl { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; margin-right: 4px; }
.subnav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.subnav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 48px; }
main:focus { outline: none; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h1 { font-size: 32px; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 16px; margin: 0; font-weight: 700; }
p.meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
p { margin: 0; }
.lede { max-width: 68ch; color: var(--muted); font-size: 18px; }
.note { color: var(--muted); max-width: 70ch; }
.small { font-size: 14px; color: var(--muted); }
header.page { display: flex; flex-direction: column; gap: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; width: fit-content; background: var(--chip); color: var(--ink); }
.pill.ai { background: var(--accent); color: var(--surface); }
.pill.ok { background: var(--ok-bg); color: var(--up); }
.pill.wait { background: var(--wait-bg); color: var(--wait); }
.pill.off { color: var(--pause); }
.banner { background: var(--wait-bg); color: var(--wait); border-radius: 10px; padding: 10px 14px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.banner a { color: inherit; }
.back { width: fit-content; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
/* Drawn chevrons and markers instead of arrow characters. */
.back::before, .go::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 0 2px 2px; flex: none; }
.back::before { transform: rotate(45deg); }
.go { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; text-decoration: none; }
.go::after { transform: rotate(-135deg); margin-left: -1px; }
.tri { display: inline-block; width: 0; height: 0; border-left: 4.5px solid transparent; border-right: 4.5px solid transparent; margin: 0 5px 1px 0; vertical-align: middle; }
.tri.up { border-bottom: 7px solid currentColor; }
.tri.down { border-top: 7px solid currentColor; }
.nil { display: inline-block; width: 12px; height: 1.5px; border-radius: 1px; background: color-mix(in srgb, var(--muted) 55%, transparent); vertical-align: middle; }
header.page .btn { width: fit-content; padding: 4px 0; border: 0; background: none; }
section { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: 130px; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.brief p.happening { font-size: 17px; max-width: 64ch; }
.brief ol.steps { max-width: 80ch; }
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
ol.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
ol.steps li::before { content: counter(step); font-family: var(--display); font-weight: 800; font-size: 18px; color: var(--accent); line-height: 1.3; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.tile .v { font-family: var(--display); font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; }
.tile .s { color: var(--muted); font-size: 14px; }
.tile.invest .v { color: var(--accent); }
.tile.alert { border-color: var(--down); }
.tile.alert .v { color: var(--down); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
a.product { text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cfoot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: auto; padding-top: 4px; }
a.product:focus-visible { outline: 3px solid var(--gold-edge); outline-offset: 2px; }
a.product .name { font-family: var(--display); font-weight: 800; font-size: 19px; }
a.product .ids { color: var(--muted); font-size: 14px; }
a.product .headline { color: var(--muted); }
a.product dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
a.product dt { color: var(--muted); }
a.product dd { margin: 0; font-weight: 600; }
a.product .open { color: var(--accent); margin-left: auto; }
ul.dated, ul.feed, ul.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
ul.dated > li, ul.feed > li, ul.goals > li { border-top: 1px solid var(--line); }
ul.dated > li:first-child, ul.feed > li:first-child, ul.goals > li:first-child { border-top: 0; }
details ul.dated, details ul.feed { background: transparent; border: 0; border-radius: 0; }
details ul.dated > li, details ul.feed > li { padding-left: 0; padding-right: 0; }
ul.dated li { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding: 12px 16px; }
ul.dated .d { font-weight: 700; font-variant-numeric: tabular-nums; }
ul.dated .d .small { display: block; font-weight: 400; }
ul.dated .t { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
ul.dated li.done { color: var(--muted); }
ul.dated li.done .tag { background: transparent; color: var(--muted); border: 1px solid var(--line); }
ul.dated li.due .d { color: var(--down); }
ul.dated .t a.pname { font-weight: 700; text-decoration: none; }
ul.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.switch, .tabs, .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.switch button, .tabs button, .chips button, .btn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; }
.switch button[aria-pressed="true"], .tabs button[aria-pressed="true"], .chips button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.btn.link { color: var(--accent); font-weight: 700; }
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold-edge); outline-offset: 2px; }
.tabs button .n, .chips button .n { font-variant-numeric: tabular-nums; opacity: 0.8; margin-left: 4px; }
.chips { gap: 6px; }
.chips button { border-radius: 999px; border-color: transparent; background: var(--chip); font-size: 14px; padding: 4px 12px; }
.chips button[aria-pressed="true"] { background: var(--surface); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.toolbar .right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-width: 0; width: min(280px, 100%); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; background: var(--chip); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.alt td { background: color-mix(in srgb, var(--chip) 55%, transparent); }
tbody tr:hover td { background: var(--chip); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.kw { font-weight: 700; min-width: 150px; }
td.why { color: var(--muted); min-width: 240px; }
td.camp { color: var(--muted); min-width: 190px; }
tr.skipped td { opacity: 0.6; }
/* Column notes under a table (the header's hover title, readable on touch). */
th[title] { text-decoration: underline dotted; text-underline-offset: 4px; cursor: help; }
.colnotes { max-width: 75ch; }
.colnotes b { color: var(--ink); font-weight: 600; }
/* Compact tables: on phones the extra columns fold into a row's details; the row button opens them. */
.ph, .tbl .xp, .tbl tr.detail { display: none; }
.tbl th.xp, .tbl td.xp { width: 44px; padding: 0; vertical-align: middle; text-align: center; }
.xpb { font: inherit; width: 44px; height: 44px; border: 0; background: none; color: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctl); }
.xpb::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.xpb[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
tr.detail td { border-top: 0; padding-top: 0; }
dl.rowmore { font-size: 14px; }
dl.rowmore > div { display: contents; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* A command for the run owner, under plain-language copy. */
.cmd { display: block; margin-top: 4px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--chip); color: var(--ink); white-space: nowrap; }
.tag.invest { background: var(--accent); color: var(--surface); }
.tag.prove { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.tag.neg { color: var(--neg); }
.tag.trim { color: var(--down); }
.tag.skip { background: var(--wait-bg); color: var(--wait); border: 1px solid currentColor; }
.empty { padding: 18px; color: var(--muted); }
.more { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--accent); border-radius: 8px; padding: 7px 12px; width: fit-content; font-weight: 700; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
details summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
details summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); flex: none; opacity: 0.7; margin: 0 2px 0 1px; }
details[open] > summary::before { transform: rotate(45deg); }
details[open] summary { margin-bottom: 10px; }
dl.kv { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; max-width: 75ch; }
.rules { display: grid; gap: 8px; }
.rules li { color: var(--ink); }
.foot { padding-top: 0; color: var(--muted); font-size: 14px; }
.error { background: var(--surface); border: 1px solid var(--down); color: var(--down); border-radius: 10px; padding: 14px 16px; }
/* The optimisation map: one card per status, each lever a row. */
.scope { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.scope .grp { --key: var(--line); }
.scope .grp > h3 { display: flex; align-items: center; gap: 8px; }
.scope .grp > h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--key); flex: none; }
.scope .grp.ai { --key: var(--accent); }
.scope .grp.guardrail { --key: var(--gold); }
.scope .grp.fixed { --key: var(--pause); }
.scope .grp.not_yet { --key: var(--down); }
.scope .grp.si { --key: var(--wait); }
.scope .grp .sub { margin: -6px 0 0; }
.lever { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.lever:first-of-type { border-top: 0; padding-top: 0; }
.lever .l { font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.lever .w { color: var(--muted); font-size: 14px; }
.tag.changed { background: var(--ok-bg); color: var(--up); }
.counts { display: flex; flex-wrap: wrap; gap: 6px; }
/* Team: who is working on what, and the activity feed. */
ul.feed li { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: start; padding: 10px 16px; }
ul.feed .d { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
ul.feed .t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
ul.feed .who { font-weight: 700; }
.pill.work { background: var(--wait-bg); color: var(--wait); }
/* Product identity: Amazon thumbnail, name, Amazon title. */
.thumb { width: 56px; height: 56px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: #fff; object-fit: contain; display: inline-flex; align-items: center; justify-content: center; }
.thumb.big { width: 96px; height: 96px; border-radius: 10px; }
.thumb.ph { background: var(--chip); color: var(--muted); font-family: var(--display); font-weight: 800; font-size: 20px; }
.ptop, .idrow { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.idrow { gap: 16px; }
.pid { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.amz { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
a.product .amz { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
header.page .amz { font-size: 14px; max-width: 80ch; }
.grouphead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; }
h3.grouphead { font-family: var(--display); font-size: 16px; font-weight: 800; color: var(--ink); margin-top: 10px; }
.grouphead h3 { font-family: var(--display); font-size: 17px; font-weight: 800; }
/* The 50/50 goal: teal = organic, gold = ads, a line at the goal, a dot for the 30 days before. */
.goalbar { position: relative; height: 14px; border-radius: 999px; background: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-edge, var(--gold)); overflow: visible; min-width: 120px; }
.goalbar .org { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px 0 0 999px; }
.goalbar .mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.goalbar .prior { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); }
.goalbar.mini { height: 8px; min-width: 0; margin: 4px 0 2px; }
.goalbar.mini .mark { top: -3px; bottom: -3px; }
.goalbar.mini .prior { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-width: 1.5px; }
.tag.goal.on { background: var(--ok-bg); color: var(--up); }
.tag.goal.below { background: var(--wait-bg); color: var(--wait); }
.tag.goal.above { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.tag.goal.warn { border: 1px solid var(--down); color: var(--down); background: transparent; }
.goalhead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.goalcard .goalbar { margin: 6px 0 2px; }
ul.goals li { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr) 200px; gap: 8px 18px; align-items: center; padding: 12px 16px; }
ul.goals .gname { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
ul.goals .gname .thumb { width: 40px; height: 40px; border-radius: 6px; }
ul.goals .gname .nm { font-weight: 700; color: var(--accent); }
ul.goals .gmid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
ul.goals .gside { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.neg-money { color: var(--down); }
/* Changes by day: one fold per day. */
.days { display: flex; flex-direction: column; gap: 8px; }
details.day { padding: 10px 14px; }
details.day summary .small { font-weight: 400; }
details.day[open] summary { margin-bottom: 10px; }
details.day > :not(summary) + :not(summary) { margin-top: 12px; }
.daybody { display: flex; flex-direction: column; gap: 8px; }
.daybody h3.sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* Goal board: a stat strip, then one row per product. */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.stat .k { font-size: 14px; color: var(--muted); line-height: 1.35; }
.stat.on .v { color: var(--up); }
.stat.below .v { color: var(--wait); }
.stat.above .v { color: var(--accent); }
.stat.warn .v { color: var(--down); }
ul.goals .gname .nm { font-size: 16px; }
.gnums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; font-variant-numeric: tabular-nums; }
.gnums .o { color: var(--accent); font-weight: 700; }
.gnums .a { color: var(--wait); font-weight: 700; }
.gnums .trend { color: var(--muted); }
.money { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--up); }
.money.neg { color: var(--down); }
svg.spark { display: block; overflow: visible; }
svg.spark .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.spark .dot { fill: var(--accent); }
svg.spark .ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
svg.spark .mark { stroke: var(--gold-edge); stroke-width: 1.5; }
svg.spark .out { stroke: var(--down); stroke-width: 2; }
.mv { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mv.up { color: var(--up); }
.mv.down { color: var(--down); }
.mv.flat { color: var(--muted); font-weight: 600; }
.kwcell { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
p.period { font-size: 15px; color: var(--ink); background: var(--chip); border-radius: var(--r-ctl); padding: 8px 14px; max-width: none; }
details.howto { padding: 10px 14px; }
details.howto summary { font-weight: 600; color: var(--accent); }
.empty-note { color: var(--muted); max-width: 70ch; }
/* Product page: the goal in the header, and the section jump list. */
.herogoal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; max-width: 880px; }
.herogoal .gtitle { font-weight: 700; }
nav.jump { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: -20px; min-width: 0;
  position: sticky; top: var(--top-h, 0px); z-index: 4; background: var(--bg); }
nav.jump .lbl { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; flex: none; }
nav.jump .jrow { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
#nav.over, .subnav .in.over, nav.jump .jrow.over, .tabs.over, .chips.over { mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
nav.jump .jl { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border: 0; background: none; color: var(--ink); border-radius: var(--r-ctl); padding: 6px 8px; min-height: 36px; white-space: nowrap; }
nav.jump .jl[aria-current="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent-fill); border-radius: var(--r-ctl) var(--r-ctl) 0 0; }
details.scopefold > summary { font-weight: 600; }
details.scopefold[open] > summary { margin-bottom: 14px; }
@media (max-width: 760px) {
  ul.goals li { grid-template-columns: 1fr; gap: 6px; }
  ul.goals .gside { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
  nav.jump { margin-top: -28px; }
}
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .idrow { flex-direction: column; gap: 12px; }
  ul.feed li { grid-template-columns: 1fr; gap: 2px; }
  .thumb.big { width: 64px; height: 64px; }
  .brand { white-space: normal; }
  .top { position: static; }
  .top .in { gap: 0; }
  section { scroll-margin-top: 12px; }
  nav.jump { position: static; }
  .tabs, .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button, .chips button { flex: none; white-space: nowrap; }
  #nav { width: 100%; margin: 0 -12px; }
  #nav a { min-height: 48px; padding: 0 10px; flex: none; }
  .subnav a, nav.jump .jl, .tabs button, .chips button, .btn, .more, details > summary { min-height: 44px; }
  ul.dated li { grid-template-columns: 1fr; gap: 2px; }
  .tile .v { font-size: 21px; }
  dl.kv { grid-template-columns: 1fr; gap: 0 0; }
  dl.kv dd { margin-bottom: 8px; }
  .cards { grid-template-columns: 1fr; }
  .tbl.compact .opt { display: none; }
  .tbl.compact .ph { display: inline; }
  .tbl.compact .xp { display: table-cell; }
  .tbl.compact tr.detail { display: table-row; }
  .tbl.compact td.kw { min-width: 0; overflow-wrap: anywhere; }
  .tbl.compact td.num { white-space: normal; }
}
/* Touch screens wider than a phone show every column; the row button opens only the row's IDs. */
@media (hover: none) and (min-width: 561px) {
  .tbl.compact.has-ids .xp { display: table-cell; }
  .tbl.compact.has-ids tr.detail { display: table-row; }
  .tbl.compact .optv { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  a.product:hover { border-color: var(--accent); }
  nav.jump .jl:hover { background: var(--chip); color: var(--accent); }
  .subnav a:hover { border-color: var(--accent); }
}
@media (prefers-reduced-motion: no-preference) {
  button, .btn, .more, a.product, .subnav a, nav.jump .jl, .xpb { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 160ms var(--ease-out); }
  details > summary::before, .xpb::before { transition: transform 160ms var(--ease-out); }
  button:active, .btn:active, .more:active, .subnav a:active { transform: scale(0.97); }
  a.product:active { transform: scale(0.99); }
}
@media print { .top, .toolbar, .more, .tabs, .chips { display: none; } }
