:root {
  --bg: #0b0f0e;
  --surface: #121917;
  --border: #22302c;
  --text: #e6efec;
  --muted: #8ea39c;
  --accent: #10b981;
  --accent-ink: #052e1f;
  --pos: #34d399;
  --neg: #f87171;
  --warn: #fbbf24;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f7faf9; --surface: #ffffff; --border: #d7e3df; --text: #0d1714; --muted: #52645e; --pos: #047857; --neg: #b91c1c; --warn: #92400e; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.92em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top, main, .foot { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.top { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-top: 20px; }
.brand { font-family: var(--mono); font-weight: 700; }
.top nav { display: flex; flex-wrap: wrap; gap: 16px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
section { margin: 48px 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 32px 0 16px; letter-spacing: -0.02em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 68ch; }
.disclaimer { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--surface); border-radius: 0 8px 8px 0; max-width: 68ch; }
.status { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--muted); }
.status[data-kind="ok"]::before { background: var(--pos); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pos) 25%, transparent); }
.status[data-kind="err"] { color: var(--neg); }
.status[data-kind="err"]::before { background: var(--neg); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; transition: border-color .2s; }
.stat:hover { border-color: var(--accent); }
.stat .label { color: var(--muted); font-size: 0.85rem; }
.stat .value { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.estimator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 720px) { .estimator { grid-template-columns: 1fr; } }
.controls, .result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.controls { display: grid; gap: 14px; }
.controls label { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.controls select, .controls input[type="number"] { grid-column: 1 / -1; }
.controls input[type="range"] { grid-column: 1 / -1; accent-color: var(--accent); width: 100%; }
.controls output { font-family: var(--mono); color: var(--text); }
select, input[type="number"] { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: inherit; transition: border-color .15s; }
select:hover, input[type="number"]:hover { border-color: var(--muted); }
.result dl { margin: 0; display: grid; gap: 10px; }
.result dl > div { display: flex; justify-content: space-between; gap: 12px; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-family: var(--mono); }
.result .total { border-top: 1px solid var(--border); padding-top: 10px; font-weight: 700; }
.result .pos dd { color: var(--pos); }
.result .neg dd { color: var(--neg); }
.note { color: var(--muted); font-size: 0.9rem; margin: 12px 0 0; }
.warn { color: var(--warn); margin: 0; }
.code { position: relative; margin: 12px 0; }
pre { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-x: auto; }
.btn { font: inherit; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; transition: transform .1s, filter .15s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn.small { position: absolute; top: 10px; right: 10px; padding: 4px 10px; font-size: 0.8rem; }
.checks { padding-left: 20px; display: grid; gap: 8px; max-width: 72ch; }
.skeleton { display: inline-block; width: 6ch; height: 1em; border-radius: 4px; background: linear-gradient(90deg, var(--border), var(--surface), var(--border)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; vertical-align: middle; }
.skeleton.wide { width: 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } html { scroll-behavior: auto; } }
.foot { color: var(--muted); font-size: 0.85rem; padding-bottom: 40px; border-top: 1px solid var(--border); }

/* theme override, embed mode and new sections */
:root[data-theme="light"] { --bg: #f7faf9; --surface: #ffffff; --border: #d7e3df; --text: #0d1714; --muted: #52645e; --accent: #047857; --accent-ink: #ffffff; --pos: #047857; --neg: #b91c1c; --warn: #92400e; color-scheme: light; }
:root[data-theme="dark"] { --bg: #0b0f0e; --surface: #121917; --border: #22302c; --text: #e6efec; --muted: #8ea39c; --accent: #10b981; --accent-ink: #052e1f; --pos: #34d399; --neg: #f87171; --warn: #fbbf24; color-scheme: dark; }
html[data-embed="1"] .chrome { display: none !important; }
html[data-embed="1"] main { padding-top: 16px; }
html[data-embed="1"] section { margin: 28px 0; }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; margin: 32px 0 0; text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { margin-top: 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0; }
.pill { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; }
a.btn { text-decoration: none; display: inline-block; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.top nav { align-items: center; }
.top nav .os-link { color: var(--accent); font-weight: 600; }
.strip { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; color: var(--muted); font-size: 0.9rem; padding: 14px 0; border-block: 1px solid var(--border); }
.strip ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; color: var(--text); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.tabs button { font: inherit; font-size: 0.9rem; background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: 8px; padding: 6px 14px; cursor: pointer; transition: border-color .15s, color .15s; }
.tabs button:hover { color: var(--text); border-color: var(--muted); }
.tabs button:active { transform: translateY(1px); }
.tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; color: var(--text); text-decoration: none; transition: border-color .2s, transform .1s; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
a.card:hover { border-color: var(--accent); }
a.card:active { transform: translateY(1px); }
textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: 0.85rem/1.5 var(--mono); width: 100%; grid-column: 1 / -1; resize: vertical; }
textarea:hover { border-color: var(--muted); }
.mcp-out pre { max-height: 420px; overflow: auto; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; }
.foot { max-width: 1040px; margin: 0 auto; padding: 0 16px 40px; }
.top nav { gap: 12px 16px; }
@media (max-width: 480px) { .top nav a:not(.os-link) { display: none; } .top nav a[href="/docs/"] { display: inline; } }
