/* Diamond Prices dashboard. Dark sidebar, white cards on cool grey, one sapphire accent.
   Each retailer keeps one color everywhere; every status is an icon + a label. */
:root {
  color-scheme: light;
  --ground: #f5f6f8;
  --surface: #ffffff;
  --ink: #0d1220;
  --ink-2: #475066;
  --muted: #667085;
  --rule: #e5e8ee;
  --rule-2: #eef1f6;
  --field: #d9dee7;
  --soft: #f1f3f7;
  --side: #0d1220;
  --side-ink: #aab2c3;
  --side-dim: #8b93a6;
  --accent: #2453d4;
  --accent-ink: #1a3fa6;
  --accent-soft: #e7edfc;
  --on-accent: #ffffff;
  --good: #12a150;
  --good-soft: #e8f6ee;
  --good-ink: #0b6b35;
  --warning: #f5a524;
  --warning-soft: #fdf4e3;
  --serious: #e8794a;
  --serious-soft: #fdefe8;
  --critical: #d6453d;
  --critical-soft: #fcebea;
  --critical-ink: #a8302a;
  --neutral: #667085;
  --neutral-soft: #eef1f6;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #8b5cf6;
  --series-6: #d9467e;
  --series-7: #0e9fb3;
  --series-8: #8d6e4f;
  --shadow: 0 1px 2px rgba(13, 18, 32, 0.04);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
/* Dark: when the system asks for it (unless the switch says light), or when the switch says dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0b0e14;
    --surface: #141922;
    --ink: #edf0f5;
    --ink-2: #b6bdca;
    --muted: #8a93a5;
    --rule: #252b36;
    --rule-2: #1d222b;
    --field: #343b48;
    --soft: #1b212b;
    --side: #070a0f;
    --accent: #3d6be0;
    --accent-ink: #9bb6ff;
    --accent-soft: #1a2440;
    --good-soft: #12301f;
    --good-ink: #6fdc9a;
    --warning-soft: #3a2d10;
    --serious-soft: #3a2216;
    --critical-soft: #3a1a1a;
    --critical-ink: #ff8b84;
    --neutral-soft: #232935;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #9b72f7;
    --series-6: #e05a8d;
    --series-7: #1fb2c6;
    --series-8: #a8865f;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0e14;
  --surface: #141922;
  --ink: #edf0f5;
  --ink-2: #b6bdca;
  --muted: #8a93a5;
  --rule: #252b36;
  --rule-2: #1d222b;
  --field: #343b48;
  --soft: #1b212b;
  --side: #070a0f;
  --accent: #3d6be0;
  --accent-ink: #9bb6ff;
  --accent-soft: #1a2440;
  --good-soft: #12301f;
  --good-ink: #6fdc9a;
  --warning-soft: #3a2d10;
  --serious-soft: #3a2216;
  --critical-soft: #3a1a1a;
  --critical-ink: #ff8b84;
  --neutral-soft: #232935;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #9b72f7;
  --series-6: #e05a8d;
  --series-7: #1fb2c6;
  --series-8: #a8865f;
  --shadow: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 28px; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--accent-ink); }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
: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; }

/* Shell: sidebar + content; the sidebar stacks above on a phone */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 100%; background: var(--side); color: var(--side-ink); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #ffffff; font-weight: 600; font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; }
.nav a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.05); }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.09); color: #ffffff; font-weight: 500; }
.nav svg, .brand svg { flex: none; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 12.5px; }
.side-foot b { color: #ffffff; font-weight: 500; }
.side-foot .mono { font-size: 11.5px; color: var(--side-dim); }
.main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 56px; }
.wrap { max-width: 1180px; margin: 0 auto; }
section.view { display: flex; flex-direction: column; gap: 20px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head .kicker { font-size: 12.5px; color: var(--muted); }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Buttons and fields */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--soft); }
.btn.primary { border: 0; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 0 18px; }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.small { min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
input, select { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--field); border-radius: 8px; min-height: 40px; padding: 0 10px; min-width: 0; }
.pill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--rule); }
.seg button { min-height: 36px; padding: 0 12px; border-radius: 7px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.seg button span { opacity: 0.7; }

/* Cards, tiles */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.card-head p { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); min-width: 0; }
.tile .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tile .value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile .value small { font-size: 18px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tile .sub { font-size: 12.5px; color: var(--ink-2); }
.tile.dark { background: var(--side); border-color: var(--side); color: #ffffff; }
.tile.dark .label { color: var(--side-ink); }
.tile.dark .title { font-size: 17px; font-weight: 600; line-height: 1.3; }
.tiles.small .tile { padding: 14px 16px; gap: 2px; }
.tiles.small .value { font-size: 22px; }
.meter { height: 6px; border-radius: 3px; background: var(--rule-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--good); border-radius: 3px; }

/* Status chips: icon + label; color is the third cue */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); background: var(--neutral-soft); }
.chip i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 700 11px/1 var(--font); font-style: normal; color: #ffffff; background: var(--neutral); flex: none; }
.chip.good { background: var(--good-soft); } .chip.good i { background: var(--good); }
.chip.running { background: var(--accent-soft); } .chip.running i { background: var(--accent); }
.chip.warning { background: var(--warning-soft); } .chip.warning i { background: var(--warning); color: #0d1220; }
.chip.serious { background: var(--serious-soft); } .chip.serious i { background: var(--serious); color: #0d1220; }
.chip.critical { background: var(--critical-soft); } .chip.critical i { background: var(--critical); }
.chip.none { background: transparent; padding-left: 0; color: var(--muted); font-weight: 500; }

/* Running banner */
.banner { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.banner.error { border-color: var(--critical); }
.banner-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; flex: none; }
.slide { height: 4px; border-radius: 2px; background: var(--rule-2); overflow: hidden; }
.slide i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 2px; animation: slide 1.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .spinner, .slide i { animation: none; } }

/* Retailer cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.rcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); min-width: 0; }
.rcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dot.sm { width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; }
.big { display: flex; align-items: baseline; gap: 8px; }
.big b { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big span { color: var(--muted); }
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid var(--rule-2); }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.rnote { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.rfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.rfoot span { font-size: 12.5px; color: var(--muted); }

/* Tables */
.scroll { overflow-x: auto; min-width: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
td.note { font-family: var(--mono); font-size: 12px; color: var(--ink-2); max-width: 380px; overflow-wrap: anywhere; }
td .sub { display: block; font-size: 12px; color: var(--muted); }
.was { color: var(--muted); text-decoration: line-through; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }

/* Coverage heatmap */
.heat { border-collapse: separate; border-spacing: 4px; min-width: 860px; }
.heat th, .heat td { border: 0; padding: 4px 6px; }
.heat th { text-align: center; font-size: 11.5px; }
.heat th:first-child, .heat th:nth-child(2) { text-align: left; }
.heat td.cell { height: 38px; min-width: 46px; border-radius: 6px; text-align: center; font-size: 11.5px; font-weight: 600; border: 1px solid var(--rule-2); background: var(--ground); color: var(--muted); }
.heat td.cell.good { background: var(--good-soft); border-color: var(--good); color: var(--good-ink); }
.heat td.cell.running { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.heat td.cell.critical { background: var(--critical-soft); border-color: var(--critical); color: var(--critical-ink); }
.heat td.cell.serious { background: var(--serious-soft); border-color: var(--serious); color: var(--ink); }
.heat td.cell.warning { background: var(--warning-soft); border-color: var(--warning); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .box { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; }
.legend .box.good { background: var(--good-soft); border-color: var(--good); }
.legend .box.running { background: var(--accent-soft); border-color: var(--accent); }
.legend .box.critical { background: var(--critical-soft); border-color: var(--critical); }
.legend .box.none { background: var(--ground); border-color: var(--rule); }

/* Not scraped */
.excluded { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 24px; }
.excluded div { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.excluded p { display: flex; flex-direction: column; min-width: 0; }
.excluded p b { font-weight: 600; }
.excluded p span { font-size: 13px; color: var(--ink-2); }

/* Prices */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.carat { display: flex; align-items: center; gap: 6px; }
.carat input { width: 84px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.presets > span { font-size: 12.5px; color: var(--muted); margin-right: 4px; }
.bar-cell { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.bar { flex: 1; height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; }
.bar-cell b { min-width: 70px; text-align: right; font-weight: 600; }

/* Diamonds */
#d-filters { display: flex; flex-direction: column; gap: 14px; }
.field.search input { min-height: 44px; font-size: 15px; }
.pager { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.pager.end { justify-content: flex-end; margin-top: 12px; }
.pager:empty { display: none; }

/* Pages: a preview of one price-comparison page */
.spage { display: flex; flex-direction: column; gap: 18px; }
.spage h2.ptitle { font-size: 24px; letter-spacing: -0.02em; }
.spage .updated { color: var(--muted); font-size: 13px; }
.spage .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.spage .facts div { padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; }
.spage .facts span { display: block; font-size: 12px; color: var(--muted); }
.spage .facts b { font-size: 17px; }
.spage tr.ours td { background: var(--accent-soft); }
.spage .cta { align-self: flex-start; }
.ptable td:first-child { min-width: 300px; }
.ptable td:first-child .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.plist { max-height: 460px; overflow-y: auto; }
.plist thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); box-shadow: inset 0 -1px var(--rule); }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover td { background: var(--soft); }
.ptable tbody tr[aria-selected="true"] td { background: var(--accent-soft); }
.ptable tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.store-frame { width: 100%; min-height: 480px; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.dcard { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--surface); }
.dcard .pic { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #f4f5f7; color: #8a93a5; text-decoration: none; }
.dcard .pic img { width: 100%; height: 100%; object-fit: contain; }
.dcard .ph { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; text-transform: capitalize; }
.dcard .body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; font-size: 13px; }
.dcard .ret { display: flex; align-items: center; color: var(--ink-2); font-size: 12px; }
.dcard .title { font-size: 14px; font-weight: 600; }
.dcard .shape { text-transform: capitalize; }
.dcard .grades { color: var(--ink-2); }
.dcard .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 4px; }
.dcard .price b { font-size: 16px; }

/* Chart */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--rule-2); stroke-width: 1; }
.chart .axis { stroke: var(--field); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .dlabel { fill: var(--ink); font-size: 12.5px; font-weight: 600; }
.chart .xhair { stroke: var(--field); stroke-width: 1; }
.chart .hint { fill: var(--muted); font-size: 13px; }
.tooltip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(13, 18, 32, 0.14); min-width: 170px; }
.tooltip div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
details > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: 13px; }

/* Schedule */
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split > * { flex: 1 1 420px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row > div { display: flex; flex-direction: column; gap: 2px; }
.switch-row span { font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 52px; height: 30px; flex: none; border-radius: 999px; border: 0; background: var(--field); cursor: pointer; padding: 0; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(13, 18, 32, 0.25); transition: left 0.15s; }
.switch[aria-checked="true"] i { left: 25px; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.row .field { flex: 1 1 160px; }
.row input, .row select { min-height: 44px; font-size: 15px; }
.next { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--ground); }
.next .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.next b { font-size: 18px; font-weight: 600; }
.next span:last-child { font-size: 13px; color: var(--ink-2); }
.pick { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--rule); cursor: pointer; }
.pick input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); margin: 0; }
.pick b { flex: 1; min-width: 0; font-weight: 500; }
.pick span:last-child { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.track { display: flex; gap: 2px; height: 36px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.track i { min-width: 4px; }
.ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.rules { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rules li { display: flex; gap: 12px; align-items: flex-start; }
.rules .ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.rules p { display: flex; flex-direction: column; }
.rules p b { font-weight: 600; }
.rules p span { font-size: 13px; color: var(--ink-2); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); max-width: calc(100vw - 32px); z-index: 20; }

@media (max-width: 640px) {
  .main { padding-top: 20px; }
  h1 { font-size: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Signed-in user in the sidebar */
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.user-row .mono { font-size: 11.5px; color: var(--side-ink); overflow-wrap: anywhere; }
.user-row button { flex: none; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 6px; background: transparent; color: #fff; font: inherit; font-size: 12px; padding: 4px 10px; cursor: pointer; }
.user-row button:hover { background: rgba(255, 255, 255, 0.08); }

/* Light / dark switch in the sidebar */
.theme-switch { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); margin-top: 6px; }
.theme-switch button { flex: 1; min-height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--side-ink);
  font: inherit; font-size: 12px; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }

/* Statistics */
.words { font-size: 15px; line-height: 1.75; display: grid; gap: 10px; max-width: 900px; }
.words b { font-weight: 650; }
.bars { display: grid; gap: 8px; }
.bars .brow { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 120px; align-items: center; gap: 12px; font-size: 13px; }
.bars .btrack { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.bars .btrack i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.bars .bnum { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.mixgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.mixgrid .card h3 { margin-bottom: 12px; }
.matrix td.cellv { text-align: right; font-variant-numeric: tabular-nums; }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.where button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--field); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.where button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.where button b { font-variant-numeric: tabular-nums; }
.dcard .also { font-size: 12px; color: var(--ink-2); }
.dcard .also a, td .also a { color: var(--accent-ink); text-decoration: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); min-height: 40px; }
.check input { min-height: 0; width: 16px; height: 16px; }
@media print {
  .side, .page-head .actions, .theme-switch, #toast { display: none !important; }
  .app { display: block; } .main { padding: 0; } body { background: #fff; color: #000; }
  .card { break-inside: avoid; box-shadow: none; }
}
