/* Cloud Cost Data — one stylesheet for the landing page, dashboard and
   account pages. The look is a price sheet: cool grey neutrals biased
   towards the logo's blue (the one accent), a grotesk display face,
   tabular mono for figures, and hairline rules rather than boxes.

   Theme: light tokens on :root; dark tokens repeated under
   `prefers-color-scheme: dark` (unless the html element says light)
   and under html[data-theme=dark]. app.js sets data-theme from the
   toggle and keeps the choice in localStorage; a tiny inline script in
   each page's <head> applies it before first paint. */

:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #e8ecf1;
  --text: #141922;
  --text-2: #3b4452;
  --muted: #66707f;
  --border: #dbe0e7;
  --rule: #c3ccd7;
  --accent: #1f6feb;
  --accent-ink: #1759c7;
  --accent-text: #ffffff;
  --code-bg: #161b24;
  --code-text: #e3e7ee;
  --code-muted: #8691a1;
  --code-border: #161b24;
  --ok: #1a7a37;
  --ok-bg: #e6f4ea;
  --err: #b42323;
  --err-bg: #fbe9e7;
  --warn: #7a5200;
  --warn-bg: #fbf1d6;
  --aws: #b3520a;
  --azure: #0a63b8;
  --gcp: #1b7a3c;
  --shadow: 0 1px 2px rgba(20, 25, 34, .06), 0 18px 40px -22px rgba(20, 25, 34, .35);
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1319;
    --surface: #151b23;
    --surface-2: #1c242e;
    --text: #e6eaf0;
    --text-2: #bcc5d1;
    --muted: #8a95a5;
    --border: #252d38;
    --rule: #343e4b;
    --accent: #5b9bff;
    --accent-ink: #82b4ff;
    --accent-text: #0b0f15;
    --code-bg: #0a0d12;
    --code-text: #d8dee7;
    --code-muted: #747f8f;
    --code-border: #252d38;
    --ok: #5fc97a;
    --ok-bg: #132a1a;
    --err: #ff8080;
    --err-bg: #2e1515;
    --warn: #f0c060;
    --warn-bg: #2b2412;
    --aws: #ffa44d;
    --azure: #62a9ff;
    --gcp: #6fd08a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
  :root:not([data-theme="light"]) .theme-dark-only { display: block; }
}
:root[data-theme="dark"] {
  --bg: #0f1319;
  --surface: #151b23;
  --surface-2: #1c242e;
  --text: #e6eaf0;
  --text-2: #bcc5d1;
  --muted: #8a95a5;
  --border: #252d38;
  --rule: #343e4b;
  --accent: #5b9bff;
  --accent-ink: #82b4ff;
  --accent-text: #0b0f15;
  --code-bg: #0a0d12;
  --code-text: #d8dee7;
  --code-muted: #747f8f;
  --code-border: #252d38;
  --ok: #5fc97a;
  --ok-bg: #132a1a;
  --err: #ff8080;
  --err-bg: #2e1515;
  --warn: #f0c060;
  --warn-bg: #2b2412;
  --aws: #ffa44d;
  --azure: #62a9ff;
  --gcp: #6fd08a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
:root[data-theme="dark"] .theme-light-only { display: none; }
:root[data-theme="dark"] .theme-dark-only { display: block; }
/* Specific enough to beat `.by-badge img`; the dark blocks above still win. */
.theme-dark-only, .by-badge img.theme-dark-only { display: none; }

/* base ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 720px; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.02; margin: 0 0 20px; }
h1 em { font-style: normal; color: var(--accent-ink); }
h2 { font-size: clamp(28px, 3.4vw, 36px); line-height: 1.08; margin: 0 0 18px; }
h3 { font-size: 17px; font-weight: 600; margin: 32px 0 8px; }
p { margin: 0 0 14px; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }
strong { font-weight: 600; }
.lede { font-size: 19px; line-height: 1.5; color: var(--text-2); max-width: 560px; margin: 0 0 28px; }
.note { color: var(--muted); font-size: 14px; }
.overline {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 12px;
}
section.block { padding-top: 72px; }

/* header ---------------------------------------------------------------- */
header { border-bottom: 1px solid var(--border); }
header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 600; letter-spacing: -0.01em; color: var(--text); text-decoration: none;
         display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { color: var(--text); }
.brand-mark { width: 26px; height: 26px; display: block; flex: none; border-radius: 6px; }
nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
nav a:hover { color: var(--text); }
nav a.btn { color: var(--accent-text); }
.brand-wrap { display: flex; align-items: center; gap: 14px; }
.by-badge { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.brand-wrap .by-badge { padding-left: 14px; border-left: 1px solid var(--border); }
.by-badge span { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.by-badge img { height: 18px; width: auto; display: block; opacity: .75; transition: opacity .15s; }
.by-badge:hover img { opacity: 1; }
@media (max-width: 480px) { .brand-wrap .by-badge { display: none; } }

/* theme toggle: three states, cycled by app.js; the attribute on <html>
   picks which icon shows, so there's no icon logic in script */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px 5px 8px;
  font: inherit; font-size: 12px; color: var(--muted); line-height: 1;
}
.theme-toggle:hover { color: var(--text); border-color: var(--rule); }
.theme-toggle svg { width: 14px; height: 14px; display: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root:not([data-theme]) .theme-toggle .i-auto { display: block; }
:root[data-theme="light"] .theme-toggle .i-light { display: block; }
:root[data-theme="dark"] .theme-toggle .i-dark { display: block; }

/* buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-text);
  border: 1px solid var(--accent); border-radius: 8px; padding: 10px 18px; font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; line-height: 1.3; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-text); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--rule); }
.btn.secondary:hover { background: var(--surface-2); filter: none; color: var(--text); }
.btn.danger { background: transparent; color: var(--err); border-color: var(--rule); }
.btn.danger:hover { background: var(--err-bg); filter: none; color: var(--err); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.cta-row { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.cta-row .note { margin: 0; }

/* hero ------------------------------------------------------------------ */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px 56px; align-items: center; padding: 72px 0 0; }
.hero-copy .overline { margin-bottom: 18px; }
.sources { margin: 26px 0 0; padding: 0; list-style: none; display: flex; gap: 6px 18px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.sources li::before { content: "•"; margin-right: 8px; }
.sources li.aws::before { color: var(--aws); } .sources li.azure::before { color: var(--azure); } .sources li.gcp::before { color: var(--gcp); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 48px; } }

/* the try-it widget: a live /compare in the hero, no key needed */
.ticket {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow);
  font-family: var(--font-mono); font-size: 13px; line-height: 1.5; overflow: hidden; font-variant-numeric: tabular-nums;
}
.ticket-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.ticket-head b { color: var(--text); font-weight: 500; }
.ticket-foot { padding: 9px 16px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface-2); display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.try-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: end; }
.try-form label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 500; }
.try-form input, .try-form select {
  display: block; width: 100%; margin: 4px 0 0; padding: 6px 8px; font: inherit; font-size: 13px; border-radius: 6px;
  border: 1px solid var(--rule); background: var(--bg); color: var(--text);
}
.try-form .btn { padding: 7px 12px; font-size: 13px; justify-content: center; }
.try-msg { padding: 10px 16px; font-size: 12px; color: var(--warn); background: var(--warn-bg); border-bottom: 1px solid var(--border); }
.try-msg:empty { display: none; }
.try-msg a { color: inherit; }
.try-hint { padding: 8px 16px; font-size: 12px; color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-bottom: 1px solid var(--border); }
.try-hint b { font-weight: 600; }
.try-hint[hidden] { display: none; }
.try-results { transition: opacity .15s; }
.try-results.busy { opacity: .45; }
.try-empty { padding: 14px 16px; color: var(--muted); font-size: 12px; }
/* one row per cloud, cheapest first: who · what · how much */
.try-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--border); min-width: 0; }
.try-row:last-child { border-bottom: 0; }
.try-row.best { background: color-mix(in srgb, var(--ok-bg) 60%, var(--surface)); }
.try-row .who, .try-row .what, .try-row .cost { min-width: 0; }
.try-row .prov { display: block; }
.try-row .region { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.try-row .name { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.try-row .spec, .try-row .rate, .try-row .err { color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.try-row .err { color: var(--warn); grid-column: 2 / -1; }
.try-row .cost { text-align: right; }
.try-row .price { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--text); white-space: nowrap; }
.try-row .price small { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.try-row .tag { font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.try-code { border-top: 1px solid var(--border); }
.try-code summary { padding: 9px 16px; font-size: 11.5px; color: var(--accent-ink); cursor: pointer; list-style: none; }
.try-code summary::-webkit-details-marker { display: none; }
.try-code summary::before { content: "▸ "; } .try-code[open] summary::before { content: "▾ "; }
.try-code pre { margin: 0; border: 0; border-radius: 0; font-size: 12px; }
@media (max-width: 560px) {
  .try-form { grid-template-columns: 1fr 1fr; }
  .try-form .btn { grid-column: 1 / -1; justify-content: center; }
  .try-row { grid-template-columns: minmax(0, 1fr) auto; }
  .try-row .who { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .try-row .err { grid-column: 1 / -1; }
}

/* four facts, one rule each: a datasheet, not a card grid */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; margin: 64px 0 0; padding: 0; list-style: none; }
.facts li { border-top: 1px solid var(--rule); padding: 16px 0 0; }
.facts strong { display: block; margin-bottom: 4px; }
.facts span { color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; gap: 24px 28px; } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 20px; } }

/* definitions: "List price only." + explanation, as rows */
.defs { margin: 0; padding: 0; }
.defs div { display: grid; grid-template-columns: 200px 1fr; gap: 6px 28px; padding: 14px 0; border-top: 1px solid var(--border); }
.defs div:last-child { border-bottom: 1px solid var(--border); }
.defs dt { font-weight: 600; margin: 0; }
.defs dd { margin: 0; color: var(--text-2); }
@media (max-width: 600px) { .defs div { grid-template-columns: 1fr; } }

/* code ------------------------------------------------------------------ */
code, pre, kbd { font-family: var(--font-mono); font-size: 13px; }
:not(pre) > code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
pre {
  background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-border); border-radius: 10px;
  padding: 16px 18px; overflow-x: auto; line-height: 1.55; margin: 0 0 18px; tab-size: 2;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* endpoints -------------------------------------------------------------- */
.endpoint { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 44px 0 10px; padding-top: 22px; border-top: 1px solid var(--rule); }
.endpoint:first-of-type { margin-top: 28px; }
.endpoint h3 { margin: 0; font-family: var(--font-mono); font-size: 16px; font-weight: 500; }
.method { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; padding: 3px 7px; border-radius: 4px; border: 1px solid currentColor; line-height: 1.2; }
.method-post { color: var(--accent-ink); } .method-get { color: var(--gcp); }
.auth { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.auth::before { content: "· "; }

/* tables ------------------------------------------------------------------ */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 16px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--rule); }
td.num, th.num { text-align: right; }
.prov { font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.prov-aws { color: var(--aws); } .prov-azure { color: var(--azure); } .prov-gcp { color: var(--gcp); }
.req { color: var(--err); font-weight: 700; }
#types-table td:first-child { white-space: nowrap; }
#types-table td:nth-child(3), #types-table td:nth-child(4) { font-size: 13.5px; line-height: 1.55; }

/* types filter */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 20px 0 8px; }
.chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--rule); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filters input { flex: 1; min-width: 160px; max-width: 300px; margin: 0; padding: 6px 11px; font-size: 14px; border-radius: 999px; }
.filters .count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-left: auto; }

/* server-rendered pages (pages.py): VM type, size class, head-to-head, hubs */
.page-top { padding-top: 48px; }
.page-top h1 { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.01em; font-size: clamp(30px, 4.4vw, 46px); overflow-wrap: anywhere; }
.page-top .lede { max-width: 680px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--text); }
.spec-row { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 0 0 8px; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 13px; }
.spec-row li b { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.spec-row li { color: var(--text); }
.price-table td.num, .price-table th.num { text-align: right; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; }
.price-table td.dim { color: var(--muted); }
.price-table tr.primary td { background: var(--surface-2); }
.price-table td:first-child { font-family: var(--font-mono); font-size: 13px; }
.link-list { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; }
.link-list li { break-inside: avoid; padding: 4px 0; }
.link-list .note { margin-left: 6px; }
@media (max-width: 600px) { .link-list { columns: 1; } }
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 28px; }
.families h3 { margin: 0 0 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.families ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.families li { padding: 2px 0; } .families a { text-decoration: none; } .families a:hover { text-decoration: underline; }
.families .note { margin-left: 6px; font-size: 12px; }
.winner { font-weight: 600; }
.cta-box { border-top: 1px solid var(--rule); padding-top: 22px; margin-top: 8px; }

footer { border-top: 1px solid var(--border); margin-top: 88px; padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }

/* forms -------------------------------------------------------------------- */
.auth-page { max-width: 400px; margin: 64px auto 0; }
.auth-page h1 { font-size: 36px; margin-bottom: 8px; }
.auth-page > .note { margin-bottom: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
input, textarea {
  width: 100%; font: inherit; padding: 9px 12px; margin: 0 0 16px; border-radius: 8px;
  border: 1px solid var(--rule); background: var(--bg); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.form-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 180px; margin: 0; }
.msg { border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.msg:empty { display: none; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.warn { background: var(--warn-bg); color: var(--warn); }
.below { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* dashboard ---------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 48px 0 20px; }
.page-head h1 { font-size: 40px; margin: 0; }
.page-head .overline { margin-bottom: 8px; }
.keybox { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.keybox code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 9px 12px; background: var(--bg); border-radius: 8px; border: 1px solid var(--rule); font-size: 13px; }
.new-key { border-color: var(--accent); }
.revoked td { color: var(--muted); }
.actions { white-space: nowrap; text-align: right; }
.actions .btn + .btn { margin-left: 6px; }
.hidden { display: none !important; }

/* admin: accounts table ---------------------------------------------------- */
.admin-help { max-width: 70ch; margin: 0 0 16px; }
.admin-table td { vertical-align: middle; }
.admin-table .when { white-space: nowrap; color: var(--text-2); font-size: 13px; }
.badges { margin-top: 4px; }
.badges:empty { display: none; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.limits { display: flex; gap: 6px; align-items: center; }
.limits input { width: 72px; margin: 0; padding: 5px 8px; font-size: 13px; }
.badge-accent { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }

/* dashboard: left menu + one section at a time ----------------------------- */
.dash { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px 48px; align-items: start; }
.dash-main { min-width: 0; }
.side-nav { position: sticky; top: 24px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 56px; }
.side-nav a { display: block; text-align: left; padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.side-nav a[hidden] { display: none; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a.active { background: var(--surface); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); border: 1px solid var(--border); }
.facts-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 8px; }
.facts-list div { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.facts-list dt { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.facts-list dd { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .dash { grid-template-columns: 1fr; gap: 16px; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; margin: 16px 0 0; padding: 0 0 4px; gap: 4px; }
  .side-nav a { white-space: nowrap; }
  .facts-list { grid-template-columns: 1fr; }
}

/* admin: request cards ----------------------------------------------------- */
.count-pill { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 600; text-align: center; margin-left: 4px; vertical-align: 1px; }
.count-pill[hidden] { display: none; }
/* "rcard", not "req": .req is the types table's "required" marker above */
.rcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin: 0 0 12px; }
.rcard-done { opacity: .75; }
.req-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.req-who { color: var(--text); font-weight: 500; text-decoration: none; }
.req-subject { font-weight: 600; margin: 0 0 4px; }
.req-text { white-space: pre-wrap; color: var(--text-2); font-size: 14px; max-width: 70ch; }
.req-reply { margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; white-space: pre-wrap; font-size: 14px; }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.req-actions label { font-size: 12px; margin: 0; }
.req-actions input, .req-actions textarea { margin: 4px 0 0; padding: 6px 10px; font-size: 13px; width: 120px; }
.req-actions .grow { flex: 1 1 220px; }
.req-actions .grow input, .req-actions .grow textarea { width: 100%; }
.req-actions textarea { min-height: 56px; }
.req-actions .btn { margin-bottom: 1px; }
.reply { white-space: pre-wrap; max-width: 40ch; }
