:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  --bg: #F5F2EB;
  --surface: #FFFDF8;
  --surface-soft: #E0ECEC;
  --surface-accent: #E6F0F1;
  --text: #243F46;
  --muted: #5C686B;
  --border: #C8D3D4;
  --link: #255F6A;
  --primary: #C27742;
  --primary-text: #161D1F;
  --focus: #0B6E7C;
  --code-bg: #ECE9E2;
  --pre-bg: #17292E;
  --pre-text: #F2EEE5;
  --success: #23704A;
  --danger: #A32D2D;
  --neutral: #657174;
  --browser-theme-color: #E0ECEC;
}

:root[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E181B;
    --surface: #17272B;
    --surface-soft: #102B33;
    --surface-accent: #17373D;
    --text: #F2EEE5;
    --muted: #C1CCCD;
    --border: #45636A;
    --link: #87D5DF;
    --primary: #D8905D;
    --primary-text: #101719;
    --focus: #74D2DD;
    --code-bg: #24383D;
    --pre-bg: #091114;
    --pre-text: #F2EEE5;
    --success: #76D49F;
    --danger: #FF9A9A;
    --neutral: #B9C4C5;
    --browser-theme-color: #102B33;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E181B;
  --surface: #17272B;
  --surface-soft: #102B33;
  --surface-accent: #17373D;
  --text: #F2EEE5;
  --muted: #C1CCCD;
  --border: #45636A;
  --link: #87D5DF;
  --primary: #D8905D;
  --primary-text: #101719;
  --focus: #74D2DD;
  --code-bg: #24383D;
  --pre-bg: #091114;
  --pre-text: #F2EEE5;
  --success: #76D49F;
  --danger: #FF9A9A;
  --neutral: #B9C4C5;
  --browser-theme-color: #102B33;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
img { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: .09em; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .13em; }
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.external-link-indicator { display: inline-block; margin-left: .22em; font-size: .84em; font-weight: 800; line-height: 1; }
.shell { width: min(1120px, 100%); margin-inline: auto; padding-inline: 24px; }
.skip-link {
  position: fixed;
  z-index: 1000;
  left: 12px;
  top: 12px;
  transform: translateY(-180%);
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 750;
}
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 780; font-size: 1.1rem; text-decoration: none; min-height: 44px; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; }
.nav-cluster { display: flex; align-items: center; justify-content: flex-end; gap: 14px 20px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 680; padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a[aria-current="page"], .brand[aria-current="page"] { text-decoration: underline; text-decoration-thickness: .14em; text-underline-offset: .28em; }
.theme-control { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: .9rem; font-weight: 650; }
.theme-control select { min-height: 44px; padding: 7px 30px 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.theme-control.theme-segmented { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.theme-options { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.theme-option { position: relative; display: inline-flex; width: 44px; height: 44px; cursor: pointer; }
.theme-option input { position: absolute; inset: 0; width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; }
.theme-option-face { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid transparent; border-radius: 8px; color: var(--text); background: transparent; }
.theme-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-option:hover .theme-option-face { background: var(--surface-accent); }
.theme-option input:checked + .theme-option-face { border-width: 2px; border-color: currentColor; box-shadow: inset 0 -3px 0 currentColor; background: var(--surface-accent); }
.theme-option input:focus-visible + .theme-option-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.theme-tooltip { position: absolute; z-index: 30; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); padding: 5px 8px; border-radius: 6px; background: var(--pre-bg); color: var(--pre-text); font-size: .76rem; font-weight: 700; line-height: 1.2; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; }
.theme-option:hover .theme-tooltip, .theme-option:focus-within .theme-tooltip { opacity: 1; visibility: visible; }
.hero { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: 44px; align-items: center; padding-block: 48px 58px; }
.hero h1 { font-size: clamp(2.8rem,7vw,5.5rem); line-height: .95; margin: 0 0 16px; letter-spacing: -.045em; }
.hero p { font-size: 1.16rem; max-width: 650px; }
.hero-art { display: block; width: 100%; border-radius: 24px; }
.eyebrow { color: #355F66; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: #74C6D0; } }
:root[data-theme="dark"] .eyebrow { color: #74C6D0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--border); border-radius: 9px; padding: 10px 15px; text-decoration: none; font-weight: 740; background: var(--surface); color: var(--text); }
.button.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.main, main.shell { padding-block: 42px 72px; }
main:focus { outline: none; }
h1 { font-size: clamp(2.2rem,6vw,4rem); line-height: 1.03; margin: .2em 0 .45em; letter-spacing: -.025em; }
h2 { margin-top: 2rem; }
.cards, .facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 14px; }
.card, .fact { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.card h2, .card h3 { margin-top: 0; }
.section { margin-top: 42px; }
.machine { background: var(--surface-accent); border-radius: 14px; padding: 20px; }
.link-list { display: flex; gap: 8px 14px; flex-wrap: wrap; }
.quiet { color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--code-bg); padding: .1em .3em; border-radius: 4px; overflow-wrap: anywhere; }
pre { overflow-x: auto; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--pre-bg); color: var(--pre-text); padding: 16px; border-radius: 10px; }
pre code { background: transparent; color: inherit; padding: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
caption { text-align: left; font-weight: 760; padding: 12px 10px; }
th, td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--border); }
th { font-weight: 760; }
.status-dot { display: inline-block; width: .72em; height: .72em; border-radius: 50%; margin-right: .45em; }
.status-pass { background: var(--success); }
.status-fail { background: var(--danger); }
.status-unknown { background: var(--neutral); }
.site-footer { border-top: 1px solid var(--border); padding-block: 24px 40px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.footer-row a { color: var(--link); }
.notice { border-left: 4px solid var(--focus); padding: 12px 16px; background: var(--surface-accent); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 760px) {
  .site-nav { align-items: flex-start; flex-direction: column; }
  .nav-cluster { width: 100%; justify-content: flex-start; }
  .nav-links { width: 100%; }
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero-art { order: -1; }
}

@media (max-width: 420px) {
  .shell { padding-inline: 16px; }
  .nav-links a { padding-inline: 6px; }
  .theme-control { width: 100%; justify-content: space-between; }
  .theme-control select { flex: 1 1 auto; }
  .theme-control.theme-segmented { width: auto; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (forced-colors: active) {
  .button, .theme-control select, .theme-options, .theme-option-face, .table-scroll { border-color: CanvasText; }
  .theme-option input:checked + .theme-option-face { border: 2px solid CanvasText; box-shadow: inset 0 -3px 0 CanvasText; }
  .theme-option input:focus-visible + .theme-option-face { outline-color: Highlight; }
  .status-dot { forced-color-adjust: none; background: CanvasText; }
  .external-link-indicator, .theme-icon { forced-color-adjust: auto; }
}
