/* Shared foundations and controls. Page styles must not redefine these components. */
:root {
  color-scheme: dark;
  --bg: #212121;
  --surface: #292929;
  --surface-2: #353535;
  --tertiary: #2b2b2b;
  --divider: #464646;
  --hover: #3a3a3a;
  --text: #fff;
  --muted: #c1c1c1;
  --faint: #8c8c8c;
  --outline: #938f99;
  --action: rgba(255, 255, 255, .12);
  --action-hover: rgba(255, 255, 255, .16);
  --header-bg: rgba(33, 33, 33, .94);
  --on-primary: #fff;
  --accent-text: #f1601d;
  --lime-text: #7cdd00;
  --mono-icon-filter: none;
  --phone-shadow: rgba(0, 0, 0, .55);
  --primary: #f1601d;
  --primary-hover: #f26626;
  --primary-pressed: #f37338;
  --yellow: #f5a718;
  --green: #269b55;
  --red: #f61830;
  --lime: #7cdd00;
  --blue: #1d79f1;
  --purple: #7018f5;
  --pink: #ff4cc8;
  --gray: #b6b5b8;
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
  --r-xl: 32px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --content-width: 1160px;
  --article-width: 900px;
}

/* Explicit preference; the same light palette below also works without JavaScript. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fff;
  --surface: #f4f5f6;
  --surface-2: #f3f3f3;
  --tertiary: #f8f8f8;
  --divider: #d2d8df;
  --hover: #e0e1e2;
  --text: #333;
  --muted: #626262;
  --faint: #6b6b6b;
  --outline: #79747e;
  --action: rgba(51, 51, 51, .08);
  --action-hover: rgba(51, 51, 51, .12);
  --header-bg: rgba(255, 255, 255, .94);
  --accent-text: #b84310;
  --lime-text: #3b7800;
  --mono-icon-filter: brightness(.2);
  --phone-shadow: rgba(0, 0, 0, .18);
  --primary-hover: #de581b;
  --primary-pressed: #d4541a;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #fff;
    --surface: #f4f5f6;
    --surface-2: #f3f3f3;
    --tertiary: #f8f8f8;
    --divider: #d2d8df;
    --hover: #e0e1e2;
    --text: #333;
    --muted: #626262;
    --faint: #6b6b6b;
    --outline: #79747e;
    --action: rgba(51, 51, 51, .08);
    --action-hover: rgba(51, 51, 51, .12);
    --header-bg: rgba(255, 255, 255, .94);
    --accent-text: #b84310;
    --lime-text: #3b7800;
    --mono-icon-filter: brightness(.2);
    --phone-shadow: rgba(0, 0, 0, .18);
    --primary-hover: #de581b;
    --primary-pressed: #d4541a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 Rubik, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
a, button, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; }
strong { font-weight: 500; color: var(--text); }
button, input, select { font: inherit; }
[id] { scroll-margin-top: 88px; }
.wrap {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.accent { color: var(--accent-text); }
.lime { color: var(--lime-text); }
.note { color: var(--muted); font-size: 14px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0; }

/* Button API: .btn + primary/tonal; .btn-sm is the compact size. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--r-s);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.btn > svg { flex-shrink: 0; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-pressed); }
.btn-tonal { background: var(--action); color: var(--text); }
.btn-tonal:hover { background: var(--action-hover); }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.badges a { display: block; height: 44px; border-radius: 8px; transition: opacity .15s; }
.badges a:hover { opacity: .85; }
.badges img { height: 44px; width: auto; }

/* Shared site chrome, rendered from templates/components/. */
header.top {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--divider);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.top .wrap { display: flex; align-items: center; height: 64px; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.top nav { display: flex; gap: 4px; margin-left: auto; }
.top nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-s);
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.top nav a:hover, .top nav a[aria-current] { background: var(--action); color: var(--text); }
.top .header-cta { display: none; white-space: nowrap; }
.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--divider); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 24px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px;
  width: 100%; padding-top: 8px;
}
/* Geist Theme Switcher: one native radio group, adapted to the static site. */
.theme-switcher {
  display: inline-flex; isolation: isolate; flex-shrink: 0;
  width: fit-content; padding: 0; margin: 0; border: 0; border-radius: 999px;
  box-shadow: 0 0 0 1px var(--divider);
}
.theme-switcher:disabled { opacity: .6; }
.theme-switcher:disabled label { cursor: default; }
.theme-option { position: relative; }
.theme-option label {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  color: var(--muted); cursor: pointer;
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.theme-option svg { width: 16px; height: 16px; }
.theme-switcher-compact .theme-option label { width: 26px; height: 26px; }
.theme-option label:hover { color: var(--text); }
.theme-option input:checked + label {
  position: relative; z-index: 1; color: var(--text); background: var(--bg);
  box-shadow: 0 0 0 1px var(--outline), 0 1px 2px rgba(0, 0, 0, .12);
}
.theme-option input:focus-visible { outline: none; }
.theme-option input:focus-visible + label {
  position: relative; z-index: 2; outline: 3px solid var(--primary); outline-offset: 3px;
}
.breadcrumbs { color: var(--muted); font-size: 14px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: 8px; color: var(--faint); }
.breadcrumbs a { color: var(--muted); }

/* Reusable card, section label and feature icon. */
.card { padding: 24px; border-radius: var(--r-l); background: var(--surface); }
.card h3 { margin: 0 0 8px; font-size: 22px; }
.card p { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.eyebrow > i { display: none; }
.feature-label {
  display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px;
}
.feature-label img {
  width: 24px; height: 24px; object-fit: contain; filter: var(--mono-icon-filter);
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  background: var(--surface); border-radius: var(--r-xl); font-size: 13px; color: var(--muted);
}
.chip b { width: 14px; height: 14px; border-radius: 50%; display: block; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; }
.field-row label { color: var(--muted); font-size: 14px; }
.field-input {
  min-width: 0; max-width: 100%; min-height: 48px; padding: 10px 14px;
  color: var(--text); background: var(--tertiary);
  border: 1px solid var(--divider); border-radius: var(--r-s);
}
.seg {
  display: grid; grid-template-columns: repeat(var(--segments, 3), minmax(0, 1fr));
  border: 1px solid var(--outline); border-radius: var(--r-xl); overflow: hidden;
  margin-bottom: 16px;
}
.seg button, .tabs button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 8px; border: 0;
  color: var(--text); font-size: 14px; line-height: 1.35; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.seg button { background: var(--tertiary); }
.seg button + button { border-left: 1px solid var(--outline); }
.seg button[aria-pressed="true"] { background: var(--action-hover); }
.seg button svg { width: 14px; height: 14px; display: none; }
.seg button[aria-pressed="true"] svg { display: block; }
.tabs {
  display: grid; grid-template-columns: repeat(var(--tabs, 2), minmax(0, 1fr));
  border-bottom: 1px solid var(--divider); margin-bottom: 16px;
}
.tabs button { background: transparent; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button svg { width: 18px; height: 18px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (pointer: coarse) { .theme-option label { width: 44px; height: 44px; } }
@media (min-width: 600px) { .top .header-cta { display: inline-flex; } }
@media (min-width: 720px) {
  .wrap { padding-inline: 32px; }
  .card { padding: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
