:root {
  color-scheme: dark;
  --background: #0d0f12;
  --surface: #171a1f;
  --surface-raised: #20242a;
  --line: #343a43;
  --text: #f4f6f8;
  --muted: #a9b0ba;
  --orange: #ff7a1a;
  --cyan: #55c5d0;
  --green: #68c58c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); line-height: 1.55; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; }
code { color: #ffd0a8; }

.site-header { min-height: 74px; padding: 14px clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); background: #111318; }
.brand img { display: block; width: 164px; height: auto; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 22px; font-size: 0.88rem; font-weight: 650; }
nav a { color: var(--muted); }

main { overflow: hidden; }
.intro { min-height: min(520px, calc(100vh - 250px)); padding: clamp(56px, 9vw, 120px) clamp(20px, 8vw, 120px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); align-items: center; gap: clamp(40px, 8vw, 120px); border-bottom: 1px solid var(--line); background: #111318; }
.eyebrow, .section-number { margin: 0 0 12px; color: var(--orange); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 8rem; line-height: 0.88; letter-spacing: 0; }
.lede { max-width: 780px; margin: 28px 0; color: #d2d7dd; font-size: 1.4rem; }
.status-row { display: flex; flex-wrap: wrap; gap: 10px; }
.status-row span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 0.78rem; }
.identity-panel { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); border-top: 3px solid var(--orange); background: var(--surface); }
.identity-panel span, .identity-panel code { min-width: 0; padding: 16px; border-bottom: 1px solid var(--line); }
.identity-panel span { color: var(--muted); font-size: 0.78rem; font-weight: 750; text-transform: uppercase; }
.identity-panel code { overflow-wrap: anywhere; color: var(--text); }

.section-band { padding: clamp(64px, 8vw, 112px) clamp(20px, 8vw, 120px); border-bottom: 1px solid var(--line); }
.accent-band { background: #12181a; }
.section-heading { max-width: 980px; margin-bottom: 42px; display: grid; grid-template-columns: 60px 1fr; gap: 20px; }
.section-heading h2 { margin: 0 0 10px; font-size: 3.4rem; line-height: 1.05; letter-spacing: 0; }
.section-heading p:not(.section-number) { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.05rem; }
pre { max-width: 1120px; margin: 0; padding: clamp(20px, 4vw, 38px); overflow: auto; border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: 5px; background: #0a0c0f; color: #dce3ea; font-size: 0.9rem; line-height: 1.65; }
pre code { color: inherit; }
.extension-token { color: #ff9b57; font-weight: 650; }
.code-legend { max-width: 1120px; display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 14px 18px; border: 1px solid var(--line); border-top: 0; background: var(--surface); color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.code-legend span { display: inline-flex; align-items: center; gap: 8px; }
.code-legend i { width: 10px; height: 10px; border-radius: 2px; }
.extension-swatch { background: #ff9b57; }
.standard-swatch { background: #dce3ea; }

.compatibility-grid, .rules-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.compatibility-grid article, .rules-grid article { min-width: 0; padding: 24px; background: var(--surface); }
.compatibility-grid strong, .rules-grid h3, .lifecycle h3 { color: var(--text); }
.compatibility-grid p, .rules-grid p { margin-bottom: 0; color: var(--muted); }
.rules-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rules-grid h3 { margin-top: 0; }

.definition-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 28px; }
.attribute-table { border-top: 3px solid var(--cyan); }
.attribute-table > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.attribute-table span { color: var(--muted); }
.lifecycle { padding: 26px; border-top: 3px solid var(--green); background: var(--surface-raised); }
.lifecycle h3 { margin-top: 0; }
.lifecycle ol { margin: 0; padding-left: 22px; color: var(--muted); }
.lifecycle li + li { margin-top: 10px; }
.notice { max-width: 1120px; margin-top: 34px; padding: 20px 22px; border-left: 4px solid var(--orange); background: var(--surface-raised); color: var(--muted); }
.notice strong { color: var(--text); }
.notice a { text-decoration: underline; text-underline-offset: 0.16em; }

footer { padding: 28px clamp(20px, 8vw, 120px); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .intro, .definition-layout { grid-template-columns: 1fr; }
  .intro { min-height: auto; }
  h1 { font-size: 6rem; }
  .section-heading h2 { font-size: 2.8rem; }
  .compatibility-grid, .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header, footer { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; gap: 14px; }
  .section-heading { grid-template-columns: 1fr; }
  .compatibility-grid, .rules-grid { grid-template-columns: 1fr; }
  .attribute-table > div { grid-template-columns: 1fr; gap: 4px; }
  .identity-panel { grid-template-columns: 1fr; }
  .identity-panel span { padding-bottom: 4px; border-bottom: 0; }
  .identity-panel code { padding-top: 4px; }
  h1 { font-size: 4rem; }
  .lede { font-size: 1.1rem; }
  .section-heading h2 { font-size: 2rem; }
  pre { font-size: 0.76rem; }
  .code-legend { align-items: flex-start; flex-direction: column; }
}
