/* base.css — shared by every theme.
   Themes only set the tokens in :root[data-theme=...] and add layout rules for their own regions.
   Anything that is a component (buttons, panels, forms, tables, tags, dialogs, toasts) lives here once. */

:root {
  --bg: #F5F5F3; --surface: #FFFFFF; --ink: #1A1A1A; --muted: #666666; --line: #D9D6CF; --line-soft: #ECEAE3;
  --accent: #1F2937; --accent-ink: #FFFFFF; --up: #1F6B3A; --down: #8B1A1A; --ad: #6B4E9E; --warn: #8A6700;
  --font-body: system-ui, sans-serif; --font-display: system-ui, sans-serif; --font-ui: system-ui, sans-serif;
  --radius: 4px; --shadow: none; --gutter: 24px; --maxw: 1240px;
  --heat-1: #0B4D3A; --heat-2: #2E8B6A; --heat-3: #9BD1B5; --heat-4: #E5D08A; --heat-5: #E39A6B; --heat-x: #E6E4DE; --heat-0: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--font-body); }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.app { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 64px; }

/* ---- masthead & tabs (position is up to the theme) ---- */
.masthead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 24px 0 16px; }
.masthead .brand { font: 700 1.6rem/1 var(--font-display); display: flex; align-items: center; gap: 8px; }
.masthead .brand small { font: 500 .8rem var(--font-ui); color: var(--muted); }
.masthead .dateline { display: none; }
.masthead .status { color: var(--muted); flex: 1; min-width: 220px; font-family: var(--font-ui); font-size: .92rem; }
.masthead .status strong { color: var(--ink); font-weight: 600; }
.masthead .who { color: var(--muted); font: .88rem var(--font-ui); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; font-family: var(--font-ui); }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font: 600 .95rem var(--font-ui); color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.content > section { padding-top: 22px; }
.pagefoot { display: none; }

/* ---- buttons ---- */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 16px; border-radius: var(--radius); font: 600 .92rem var(--font-ui); cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.quiet { background: transparent; font-weight: 500; }
.btn.quiet:hover { border-color: var(--ink); }
.btn.danger { background: var(--down); border-color: var(--down); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- panels, forms ---- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h2 { font: 600 1.2rem/1.2 var(--font-display); margin: 0 0 4px; }
.panel p.help, .help { color: var(--muted); margin: 0 0 14px; font-size: .92rem; max-width: 64ch; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: block; font: 500 .92rem var(--font-ui); margin: 12px 0 4px; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=date], select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-family: var(--font-ui); }
textarea { min-height: 84px; resize: vertical; }
.inline { display: flex; gap: 12px; } .inline > div { flex: 1; }
ul.items { list-style: none; margin: 12px 0 0; padding: 0; }
ul.items li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
ul.items li .grow { flex: 1; min-width: 0; }
ul.items li code { color: var(--muted); font: 400 .85rem var(--font-ui); overflow-wrap: anywhere; }
.tag { display: inline-block; font: .74rem var(--font-ui); padding: 1px 7px; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); margin-left: 6px; }
.tag.badge-on { color: var(--up); border-color: var(--up); } .tag.badge-off { color: var(--down); border-color: var(--down); }
.facts { margin: 0; padding: 0; list-style: none; } .facts li { padding: 6px 0; border-top: 1px solid var(--line-soft); } .facts li:first-child { border-top: 0; } .facts b { font-weight: 600; }
.notice { border-left: 4px solid var(--down); background: color-mix(in srgb, var(--down) 8%, transparent); padding: 10px 14px; margin: 16px 0 0; border-radius: 0 var(--radius) var(--radius) 0; }
.empty { background: var(--surface); border: 1px dashed var(--muted); border-radius: var(--radius); padding: 28px; max-width: 60ch; }
.empty h2 { font: 600 1.4rem var(--font-display); margin: 0 0 6px; }
/* The one tick box a confirmation dialog may carry ("do not ask me again"). Set apart from the
   sentence above it so it is not read as part of what is being agreed to. */
label.optline { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; padding-top: 12px;
  border-top: 1px solid var(--line-soft); font-size: .86em; color: var(--muted); cursor: pointer; }
label.optline input { margin: 2px 0 0; flex: 0 0 auto; }

/* ---- figures (stat strip) ---- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.figures div { background: var(--surface); padding: 12px 14px; }
.figures b { display: block; font: 600 1.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.figures span { color: var(--muted); font: .82rem var(--font-ui); }

/* ---- tables ---- */
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.table td, table.table th { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.table th { color: var(--muted); font: 600 .78rem var(--font-ui); letter-spacing: .05em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
table.table td.num, table.table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.table tr.pick { cursor: pointer; } table.table tr.pick:hover td { background: var(--line-soft); }
table.table tr.sub td { background: var(--bg); font-size: .88rem; padding-left: 22px; }
.st-ok { color: var(--up); } .st-partial, .st-skipped { color: var(--warn); font-weight: 600; } .st-blocked, .st-error { color: var(--down); font-weight: 600; }
pre.log { background: var(--ink); color: #E8E6E0; padding: 16px; border-radius: var(--radius); overflow: auto; max-height: 460px; font: 400 .82rem/1.55 ui-monospace, Consolas, monospace; margin: 0 0 16px; white-space: pre-wrap; }

/* ---- products & terms tab ---- */
.product { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; box-shadow: var(--shadow); }
.product .head { display: flex; gap: 10px; align-items: start; flex-wrap: wrap; }
.product h3 { font: 600 1.15rem/1.2 var(--font-display); margin: 0; }
.product .head .grow { flex: 1; min-width: 200px; }
.product code { color: var(--muted); font: 400 .85rem var(--font-ui); overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 4px 3px 10px; font-size: .92rem; }
.chips button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 2px 6px; border-radius: 3px; }
.chips button:hover { color: var(--down); }
.addterms { display: flex; gap: 8px; margin-top: 12px; align-items: start; }
.addterms textarea { min-height: 42px; height: 42px; }
.none-yet { color: var(--muted); margin: 12px 0 0; }

/* ---- theme picker ---- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.themes button { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 0; cursor: pointer; overflow: hidden; }
.themes button[aria-pressed="true"] { border-color: var(--accent); }
.themes .swatch { height: 64px; display: grid; grid-template-columns: 1fr 2fr; gap: 3px; padding: 6px; }
.themes .swatch i { display: block; border-radius: 2px; }
.themes .name { display: block; padding: 8px 10px 2px; font: 600 .92rem var(--font-ui); }
.themes .blurb { display: block; padding: 0 10px 10px; color: var(--muted); font: .8rem/1.35 var(--font-ui); }

/* ---- shared rank vocabulary used by every dashboard ---- */
.up { color: var(--up); } .down { color: var(--down); } .same, .none { color: var(--muted); }
.delta { font: 600 .85rem var(--font-ui); white-space: nowrap; }
.rank-n { font-variant-numeric: tabular-nums; font-weight: 600; }
.adnote { color: var(--ad); font: .8rem var(--font-ui); }
.spark { display: block; max-width: 100%; }
.heat { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.heat i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--heat-0); border: 1px solid var(--line-soft); }
.heat i.h1 { background: var(--heat-1); border-color: transparent; } .heat i.h2 { background: var(--heat-2); border-color: transparent; }
.heat i.h3 { background: var(--heat-3); border-color: transparent; } .heat i.h4 { background: var(--heat-4); border-color: transparent; }
.heat i.h5 { background: var(--heat-5); border-color: transparent; } .heat i.hx { background: var(--heat-x); border-color: transparent; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: .78rem var(--font-ui); color: var(--muted); }
.legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; margin-left: 8px; }
.detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 6px 0 12px; }
.detail .facts-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 10px; }
.detail .facts-row div { font: .8rem var(--font-ui); color: var(--muted); }
.detail .facts-row b { display: block; font: 600 1.15rem var(--font-display); color: var(--ink); }
.detail .chartbox { height: 240px; }
.detail p { margin: 0 0 8px; color: var(--muted); font-size: .85rem; }
.term-btn { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.term-btn:hover { background: var(--line-soft); }
.dist { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.dist i { display: block; } .dist .d1 { background: var(--heat-1); } .dist .d2 { background: var(--heat-2); } .dist .d3 { background: var(--heat-4); } .dist .d4 { background: var(--heat-x); }
.dist-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font: .78rem var(--font-ui); color: var(--muted); margin: 6px 0 0; }
.dist-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.notes { margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; } .notes li { margin: 4px 0; }

.check { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font: 500 .92rem var(--font-ui); }
.check input { width: 18px; height: 18px; margin: 0; }
.check.ack { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.credits-bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.credits-bar i { display: block; height: 100%; background: var(--up); }
.credits-bar i.warn { background: var(--warn); } .credits-bar i.over { background: var(--down); }

/* ---- credits: the balance chip that rides in the status line on every page, and the block shop ---- */
.bal { display: inline-flex; align-items: baseline; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; margin-left: 4px;
       background: var(--surface); font: 500 .88rem var(--font-ui); color: var(--ink); white-space: nowrap; vertical-align: 1px; }
.bal b { font-weight: 700; font-variant-numeric: tabular-nums; }
.bal small { color: var(--muted); font-size: .8em; }
.bal.low { border-color: var(--warn); color: var(--warn); } .bal.low small { color: inherit; }
.bal.out { border-color: var(--down); color: var(--down); } .bal.out small { color: inherit; }
.bal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.notice.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.notice .btn { margin-left: 10px; vertical-align: 2px; }
.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 14px 0 0; }
.blocks button { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; color: var(--ink); font-family: var(--font-ui); }
.blocks button:hover:not(:disabled) { border-color: var(--accent); }
.blocks button:disabled { opacity: .55; cursor: not-allowed; }
.blocks b { display: block; font: 700 1.35rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.blocks span { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }
.blocks em { display: block; color: var(--muted); font-size: .76rem; font-style: normal; margin-top: 6px; }
.ledger { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ledger td, .ledger th { padding: 5px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.ledger th { color: var(--muted); font: 600 .74rem var(--font-ui); text-transform: uppercase; letter-spacing: .05em; }
.ledger td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger td.add { color: var(--up); } .ledger td.sub { color: var(--muted); }

/* ---- the listing strip: price, rating and Buy Box, shown wherever a product is shown ---- */
.listing { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 6px 0 10px; font: .92rem var(--font-ui); color: var(--ink); }
.listing.sm { font-size: .84rem; margin: 4px 0 8px; }
.listing span { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.listing em { font-style: normal; color: var(--muted); font-size: .85em; }
.listing b { font-weight: 600; } .listing b.ok { color: var(--up); } .listing b.no { color: var(--down); }
.listing .delta { font-size: .78rem; }
/* a price rise is not good news, so it is coloured like a rank drop; beats the muted `.listing em` above */
.listing em.delta.up { color: var(--up); } .listing em.delta.down { color: var(--down); }

/* ---- tags and goals ---- */
/* The tag bar is the first thing in the ranks region, so it has to survive a theme that lays
   that region out as a grid (focus-canvas): it takes the full width and keeps its own height. */
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; grid-column: 1 / -1; align-self: start; }
.tagbar button { background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px; cursor: pointer; font: 500 .86rem var(--font-ui); }
.tagbar button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tagbar button i { font-style: normal; opacity: .65; margin-left: 3px; }
/* How far back the rank chart looks. Same shape as the tag filter above it, because they do the
   same kind of job — narrowing what you are looking at without leaving the page. */
.spanbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.spanbar button { background: var(--surface); border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
                  padding: 3px 12px; cursor: pointer; font: 500 .84rem var(--font-ui); }
.spanbar button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.customrange { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0 2px;
               padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.customrange label { display: block; font: .78rem var(--font-ui); color: var(--muted); margin-bottom: 2px; }
.customrange input { padding: 5px 8px; }
.goal { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 10px 0 0; padding: 8px 12px; background: var(--bg);
        border: 1px solid var(--line); border-radius: var(--radius); font: .9rem var(--font-ui); }
.goal span { flex: 1 1 100%; }
.goal .btn { padding: 3px 10px; font-size: .82rem; }
.chips li .tag { margin-left: 4px; }
table.cmp td.lead { font-weight: 700; background: color-mix(in srgb, var(--up) 10%, transparent); }
table.cmp td.num em { font-style: normal; font-size: .78rem; }
.chips li.paused { border-style: dashed; color: var(--muted); }
.chips li.paused .reset { font: .78rem var(--font-ui); color: var(--warn); padding: 2px 6px; }
dialog.wide { max-width: min(720px, 94vw); max-height: 88vh; overflow: auto; }
dialog.wide .helpbody h3 { font: 600 1.05rem var(--font-display); margin: 18px 0 4px; }
dialog.wide .helpbody p, dialog.wide .helpbody li { color: var(--ink); font-size: .95rem; }
dialog.wide .helpbody ul { padding-left: 20px; }

.comp { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font: .85rem var(--font-ui); }
.comp li b { font-weight: 600; } .comp li .delta { font-size: .78rem; }
.vol { color: var(--muted); font: .78rem var(--font-ui); white-space: nowrap; }
.range { color: var(--muted); font: .78rem var(--font-ui); }
.notes-list { margin: 6px 0 0; padding: 0; list-style: none; font: .85rem var(--font-ui); }
.notes-list li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-top: 1px solid var(--line-soft); }
.notes-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.notes-list li button { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; }
.addnote { display: flex; gap: 8px; margin-top: 8px; align-items: end; } .addnote > div { flex: 1; } .addnote > div:first-child { flex: 0 0 150px; }
.guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.guide div { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.guide b { display: block; font: 600 1.05rem var(--font-display); margin-bottom: 4px; } .guide p { margin: 0; color: var(--muted); font-size: .9rem; }
.guide .done { border-color: var(--up); } .guide .done b::after { content: " ✓"; color: var(--up); }
table.disc { width: 100%; border-collapse: collapse; font-size: .92rem; margin-top: 12px; } table.disc td, table.disc th { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
table.disc th { color: var(--muted); font: 600 .78rem var(--font-ui); text-transform: uppercase; letter-spacing: .05em; } table.disc td.num { text-align: right; font-variant-numeric: tabular-nums; }
.a2hs { position: fixed; left: 12px; right: 12px; bottom: 12px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; font: .9rem var(--font-ui); display: none; gap: 10px; align-items: center; z-index: 25; }
.a2hs button { margin-left: auto; background: none; border: 1px solid currentColor; color: inherit; border-radius: 4px; padding: 4px 10px; }
@media (max-width: 760px) and (display-mode: browser) { .a2hs.show { display: flex; } }
.mkt { display: inline-block; font: .72rem var(--font-ui); color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; margin-left: 6px; vertical-align: middle; }

/* ---- dialog, toast ---- */
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 22px; max-width: min(440px, 92vw); }
dialog::backdrop { background: rgba(10, 10, 10, .5); }
dialog h2 { font: 600 1.3rem var(--font-display); margin: 0 0 8px; } dialog p { margin: 0 0 18px; color: var(--muted); }
dialog .actions { justify-content: flex-end; margin: 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: var(--radius); opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; z-index: 30; font-family: var(--font-ui); }
#toast.show { opacity: 1; } #toast.bad { background: var(--down); color: #fff; }

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .cols { grid-template-columns: 1fr; }
  .inline { flex-direction: column; }
  .masthead .status { order: 5; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* A row that expands says so: the chevron turns when it is open. Added in 2.8 because the
   detail under these rows went unfound for want of any sign it was there. */
table.table tr.pick .twisty { display: inline-block; width: 1em; margin-right: 6px; color: var(--muted);
  transition: transform .12s ease; }
table.table tr.pick .twisty.open { transform: rotate(90deg); }

/* A name Amazon has not sent yet, and the read-only box it will land in. */
.naming { font-style: normal; font-size: .72em; font-weight: 600; color: var(--muted); }
input.fromamazon { background: var(--line-soft); cursor: default; }
input.fromamazon::placeholder { font-style: italic; }

/* The landscape on a search term: who is advertising, and who holds the top ten organically.
   Your own row is marked.

   2.11.3 added a link on each row, which needs saying carefully because the rule it looks like
   it breaks still holds: we never click an ad, and nothing here is an ad click. The link is the
   listing's own address, /dp/<ASIN> on the marketplace being tracked, built from the ASIN by us.
   It is never the sponsored URL out of the vendor's response — those carry the click-tracking
   that bills an advertiser, and we neither store nor render them. Opening a product page costs
   the advertiser nothing and is what any shopper does. Links are nofollow, noreferrer and open
   in a new tab so a person never loses the page they were reading. */
.adland { margin: 14px 0; }
.adland h4 { margin: 0 0 4px; font-size: 1em; }
.adland h4 .muted { font-weight: 400; }
table.adslots { margin-top: 8px; }
table.adslots tr.mine td { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
table.adslots td.prod { max-width: 30em; }
table.adslots td.prod a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
table.adslots td.prod a:hover { color: var(--accent); border-bottom-color: currentColor; }
table.adslots td.prod .noname { color: var(--muted); font-style: italic; }
table.adslots code { font-size: .86em; color: var(--muted); }
/* Which way a rival is moving over the window: up the page is good for them, bad for you. */
.adland .mv { font-size: .78em; font-weight: 700; white-space: nowrap; }
.adland .mv.up { color: var(--down); }
.adland .mv.down { color: var(--up); }
.adland .mv.flat { color: var(--muted); font-weight: 400; }

/* A personal best. Reads as good news without shouting: the accent, small, not a colour we
   use for anything else. */
.pb { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  font-size: .72em; font-weight: 700; white-space: nowrap; vertical-align: middle; }

/* ---------- the question mark on a card ----------
   Quiet until wanted: it sits on the heading's baseline at the size of the text around it, so
   it never widens a column or pushes a heading onto two lines, and it takes colour only on
   hover or focus. Always a real button, so it is reachable by keyboard and announced by a
   screen reader rather than being decoration a mouse happens to find. */
.hq { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  margin-left: 7px; padding: 0; vertical-align: middle; border: 1px solid var(--line);
  border-radius: 50%; background: none; color: var(--faint);
  font: 700 .68rem/1 var(--font-ui); cursor: pointer; flex: 0 0 auto;
  transition: color .12s ease, border-color .12s ease, background .12s ease; }
.hq:hover, .hq:focus-visible { color: var(--accent-deep); border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
/* One mark for the whole table, on the flexible first column. The other five headings sit in
   fixed 52-76px columns that line up with the data beneath them, and a mark in any of those
   would widen it, wrap the label and pull the heading off its column — which is the fault
   2.8.1 set out to fix. */
.rkhead .hq { width: 14px; height: 14px; margin-left: 6px; font-size: .6rem; vertical-align: baseline; }

/* ---- the searches figure, and the little graph behind it ----
   The number in the Searches column opens a graph of searches over time. It is a button, not a
   hover trick: a popover that only appears on mouseover cannot be reached from a keyboard and
   does not exist on a phone, and this is the figure somebody checks when they are wondering what
   the account is spending. Hover opens it as well, which is what the request asked for. */
.scount { background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  padding: 0 2px; border-bottom: 1px dashed var(--line); border-radius: 2px; }
.scount:hover, .scount:focus-visible { color: var(--accent); border-bottom-color: var(--accent); outline: none; }
.spop { position: absolute; z-index: 60; width: min(420px, calc(100vw - 32px)); padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.spop h4 { margin: 0 0 2px; font-size: .9rem; }
.spop .help { margin: 0 0 6px; }
.spop .chartbox { height: 140px; }
.spop .spanbar { margin: 2px 0 8px; }
.spop .spanbar button { padding: 3px 9px; font-size: .72rem; }
.spop .spopfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }

/* ---- the next scheduled check, and how long the credits last ----
   Both sit in the top bar beside the figures they qualify. Small and muted: they are context for
   the number next to them, not announcements. Both disappear on a narrow screen, where the bar
   has only enough room for the things you act on. */
.nextcheck { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.nextcheck b { font-weight: 600; color: var(--ink); }
.pill .runway { display: block; font-size: .64rem; color: var(--muted); line-height: 1.1; margin-top: 1px; }
.pill.out .runway, .pill.low .runway { color: inherit; opacity: .8; }
@media (max-width: 1100px) { .nextcheck { display: none; } .pill .runway { display: none; } }

/* ---- the roadmap, as a customer reads it ----
   Stages as headings with a list under each. No dates anywhere, deliberately: see rw/roadmap.py. */
.rmstage { margin-top: 14px; }
.rmstage h3 { margin: 0 0 6px; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rmstage .items li { align-items: flex-start; }
