:root {
  color-scheme: light;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-subtle: #f0f5f3;
  --surface-strong: #e4eeeb;
  --ink: #172321;
  --muted: #5f6f6b;
  --line: #d7e1de;
  --brand: #0b6f73;
  --brand-strong: #07575a;
  --brand-soft: #dcefed;
  --gold: #b88118;
  --good: #198754;
  --warn: #b26a00;
  --bad: #c93c37;
  --info: #3971b8;
  --shadow: 0 8px 24px rgba(20, 43, 38, .08);
  --header-height: 64px;
  --radius: 7px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101716;
  --surface: #17201e;
  --surface-subtle: #1d2926;
  --surface-strong: #263632;
  --ink: #eef5f3;
  --muted: #a7b8b3;
  --line: #33433f;
  --brand: #64c5c2;
  --brand-strong: #87d7d4;
  --brand-soft: #173d3d;
  --gold: #e8b84b;
  --good: #58c58b;
  --warn: #efb65e;
  --bad: #f17a74;
  --info: #83b5ef;
  --shadow: 0 10px 28px rgba(0, 0, 0, .22);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101716; --surface: #17201e; --surface-subtle: #1d2926; --surface-strong: #263632;
    --ink: #eef5f3; --muted: #a7b8b3; --line: #33433f; --brand: #64c5c2;
    --brand-strong: #87d7d4; --brand-soft: #173d3d; --gold: #e8b84b; --good: #58c58b;
    --warn: #efb65e; --bad: #f17a74; --info: #83b5ef; --shadow: 0 10px 28px rgba(0,0,0,.22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 42%, transparent); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-150%); background: var(--surface); padding: 8px 12px; border: 1px solid var(--line); }
.skip-link:focus { transform: none; }

.topbar { position: sticky; z-index: 50; top: 0; height: var(--header-height); display: flex; align-items: center; gap: 20px; padding: 0 24px; background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 15px; }
.brand-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.topbar-spacer { flex: 1; }
.top-links { display: flex; align-items: center; gap: 4px; }
.top-links a { padding: 8px 10px; color: var(--muted); font-size: 14px; text-decoration: none; }
.top-links a:hover { color: var(--ink); }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: var(--surface-subtle); border-color: var(--line); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-moon { display: none; } :root:not([data-theme="light"]) .theme-sun { display: block; } }

.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font-weight: 650; font-size: 14px; text-decoration: none; cursor: pointer; }
.button:hover { color: var(--ink); background: var(--surface-subtle); }
.button.primary { color: #fff; background: #0b6f73; border-color: #0b6f73; }
.button.primary:hover { background: #07575a; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 700; }
.badge.good { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: color-mix(in srgb, var(--good) 9%, var(--surface)); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.mobile-only { display: none; }
.nav-scrim { display: none; }
.page-footer { padding: 28px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.footer-inner { max-width: 1240px; margin: auto; display: flex; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; gap: 16px; }

@media (max-width: 760px) {
  :root { --header-height: 58px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .brand img { width: 32px; height: 32px; }
  .brand-copy span, .top-links { display: none; }
  .mobile-only { display: inline-grid; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
