/* Chrome for the pages the platform serves directly.
 *
 * templates/dashboard.html deliberately keeps its own copy of these tokens
 * inline: it is also published as a standalone Artifact with no server behind
 * it, so it cannot link a stylesheet. The two must agree, and
 * tests/test_web.py::test_design_tokens_match_the_dashboard fails if they drift.
 */
:root{
  color-scheme:light;
  --ground:#F9FAFC; --surface:#FFFFFF; --surface-2:#EFF1F6; --line:#E2E4ED; --line-soft:#EDEFF5;
  --ink:#1A1C2E; --ink-2:#454A66; --ink-3:#626784;
  --deal:#0AA347; --warn:#D07A12; --dealer:#2F7FE4; --private:#E05264;
  --primary:#0AA347; --primary-ink:#FFFFFF;
  --shadow:none; --radius:6px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  color-scheme:dark;
  --ground:#1E2036; --surface:#2B2E4A; --surface-2:#242740; --line:#353957; --line-soft:#2F3350;
  --ink:#F8FAFC; --ink-2:#C9CEE3; --ink-3:#A1A7C1;
  --deal:#0AA347; --warn:#FAB124; --dealer:#71A8F3; --private:#FC6D77;
  --primary:#0AA347; --primary-ink:#FFFFFF;
  --shadow:none; --radius:6px;
}}
:root[data-theme="dark"]{
  color-scheme:dark;
  --ground:#1E2036; --surface:#2B2E4A; --surface-2:#242740; --line:#353957; --line-soft:#2F3350;
  --ink:#F8FAFC; --ink-2:#C9CEE3; --ink-3:#A1A7C1;
  --deal:#0AA347; --warn:#FAB124; --dealer:#71A8F3; --private:#FC6D77;
  --primary:#0AA347; --primary-ink:#FFFFFF;
  --shadow:none; --radius:6px;
}
*{box-sizing:border-box}
body{margin:0;background:var(--ground);color:var(--ink);letter-spacing:-0.015em;
  font-family:"Inter","Inter var",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased}
a{color:var(--dealer)}
.wrap{max-width:1000px;margin:0 auto;padding:24px 20px 72px;display:flex;flex-direction:column;gap:18px}
.num{font-family:"JetBrains Mono",ui-monospace,"SF Mono",monospace;font-variant-numeric:tabular-nums}
.lbl{text-transform:uppercase;letter-spacing:.07em;font-weight:600;
  color:var(--ink-3);font-size:11.5px}
h1{font-weight:700;font-size:31px;letter-spacing:-0.03em;
  margin:0;line-height:1.05;text-wrap:balance}
h2{font-size:18.5px;font-weight:650;letter-spacing:-0.02em;margin:0 0 12px}

.topbar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;
  border-bottom:1px solid var(--line);padding-bottom:14px}
.topbar a{font-size:13.5px;padding:7px 14px;border-radius:var(--radius);text-decoration:none;
  border:1px solid var(--line);background:var(--surface);color:var(--ink-2)}
.topbar a[aria-current="page"]{background:var(--ink);color:var(--surface);border-color:var(--ink)}
.topbar a:hover{border-color:var(--ink-3)}
.topbar .who{margin-left:auto;color:var(--ink-3);font-size:13px}
/* the theme button is injected by app.js, so it styles like a nav link */
.topbar #theme{font:inherit;font-size:13.5px;padding:7px 14px;border-radius:var(--radius);
  border:1px solid var(--line);background:var(--surface);color:var(--ink-2);cursor:pointer}
.topbar #theme:hover{border-color:var(--ink-3)}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);
  padding:20px 22px;min-width:0}
.cap{color:var(--ink-2);font-size:14.5px;margin:0 0 14px;max-width:88ch}

.price{font-size:40px;font-weight:700;letter-spacing:-0.03em;
  line-height:1;font-variant-numeric:tabular-nums;display:flex;align-items:baseline;gap:11px;flex-wrap:wrap}
.badge{font-size:12px;font-family:"Inter","Inter var",system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:600;padding:4px 10px;
  border-radius:4px;background:var(--deal);color:#fff}
.badge.gone{background:var(--private)}
.badge.warn{background:var(--warn)}

.specs{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px 22px;margin:0}
.specs div{display:flex;justify-content:space-between;gap:14px;padding:7px 0;
  border-bottom:1px solid var(--line-soft);color:var(--ink-3);font-size:14px}
.specs b{color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;text-align:right}
.flags{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.flags span{font-size:11.5px;padding:3px 9px;border-radius:4px;border:1px solid var(--dealer);color:var(--dealer)}
.btn{display:inline-block;margin-top:16px;padding:11px 18px;border-radius:var(--radius);background:var(--primary);
  color:var(--primary-ink);text-decoration:none;font-weight:600;font-size:14.5px}
.btn:hover{filter:brightness(1.08)}
.desc{white-space:pre-wrap;color:var(--ink-2);font-size:14px;max-height:340px;overflow:auto;
  background:var(--surface-2);border:1px solid var(--line-soft);border-radius:var(--radius);padding:14px 16px}
svg{display:block;max-width:100%}

/* health */
table{border-collapse:collapse;width:100%;font-size:13.5px}
th,td{padding:9px 12px;text-align:left;border-bottom:1px solid var(--line-soft);white-space:nowrap}
th{text-transform:uppercase;letter-spacing:.06em;
  font-size:11.5px;color:var(--ink-3);font-weight:600;background:var(--surface-2)}
td[data-n]{text-align:right;font-family:"JetBrains Mono",ui-monospace,"SF Mono",monospace}
.pill{font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:4px;color:#fff}
.pill.ok{background:var(--deal)} .pill.warn{background:var(--warn)}
.pill.fail{background:var(--private)} .pill.running{background:var(--dealer)}
.hero{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.hero .big{font-size:26px;font-weight:700;letter-spacing:-0.02em}
footer{color:var(--ink-3);font-size:13px;border-top:1px solid var(--line);padding-top:16px;max-width:88ch}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

/* ---- Soča ----------------------------------------------------------------
   The second theme, chosen from the dashboard's Themes menu and remembered as
   carliq.skin; app.js stamps data-skin on <html> so the choice follows the
   visitor onto these pages. Pine Emerald is the absence of the attribute.
   Values must match templates/dashboard.html exactly -- the drift test reads
   the LAST definition of each token, so these blocks stay at the end of both
   files. */
:root[data-skin="soca"]{
  --ground:#F7F5F0; --surface:#FFFFFF; --surface-2:#F1EEE7; --line:#E8E4DA; --line-soft:#EFECE4;
  --ink:#243239; --ink-2:#4E5E68; --ink-3:#79878F;
  --deal:#0E8578; --warn:#B97F27; --dealer:#4B80BC; --private:#C56D77;
  --primary:#0E8578; --primary-ink:#FFFFFF;
  --shadow:0 1px 2px rgba(36,50,57,.05),0 10px 28px rgba(36,50,57,.06); --radius:14px;
}
@media (prefers-color-scheme:dark){:root[data-skin="soca"]:not([data-theme="light"]){
  --ground:#131A1E; --surface:#1B2429; --surface-2:#161E23; --line:#2A353C; --line-soft:#222C33;
  --ink:#EAF0F2; --ink-2:#B7C4CB; --ink-3:#84939C;
  --deal:#37B3A5; --warn:#D9A055; --dealer:#7FA9DC; --private:#D98891;
  --primary:#37B3A5; --primary-ink:#0B1215;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 10px 28px rgba(0,0,0,.30); --radius:14px;
}}
:root[data-skin="soca"][data-theme="dark"]{
  --ground:#131A1E; --surface:#1B2429; --surface-2:#161E23; --line:#2A353C; --line-soft:#222C33;
  --ink:#EAF0F2; --ink-2:#B7C4CB; --ink-3:#84939C;
  --deal:#37B3A5; --warn:#D9A055; --dealer:#7FA9DC; --private:#D98891;
  --primary:#37B3A5; --primary-ink:#0B1215;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 10px 28px rgba(0,0,0,.30); --radius:14px;
}
:root[data-skin="soca"] body{font-family:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:0;line-height:1.66}
[data-skin="soca"] .card{border-color:transparent;box-shadow:var(--shadow)}
