.hero { position: relative; padding: 44px 32px 64px; overflow-x: clip; }
.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 560px;
  background: radial-gradient(520px 320px at 14% 72%, var(--glow), var(--clear) 70%), radial-gradient(460px 300px at 88% 60%, var(--glow-2), var(--clear) 70%);
  color: var(--text);
  pointer-events: none;
}
.hero-field {
  position: absolute;
  top: 120px;
  bottom: 0;
  left: 50%;
  width: min(1240px, 100%);
  transform: translateX(-50%);
  background-image: linear-gradient(var(--border-soft), var(--border-soft)), linear-gradient(var(--border-soft), var(--border-soft)), linear-gradient(var(--border-soft), var(--border-soft)), linear-gradient(var(--border-soft), var(--border-soft));
  background-size: 1px 100%;
  background-repeat: no-repeat;
  background-position: 11% 0, 37% 0, 63% 0, 89% 0;
  mask-image: linear-gradient(to bottom, var(--clear), var(--text) 26%, var(--text));
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-chips { list-style: none; display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: stretch; margin: 0 0 22px; padding: 0; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.hero-chips li { display: flex; align-items: center; gap: 8px; padding: 6px 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; }
.hero-chips li + li { border-left: 1px solid var(--border); }
.chip-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--grad); box-shadow: 0 0 0 3px var(--accent-tint); }
.chip-key { color: var(--text); }
.hero-title { margin: 0 0 14px; font-size: var(--size-h1); font-weight: var(--weight-regular); line-height: 1.16; letter-spacing: var(--tracking-display); }
.grad-text { padding: 0 0.04em; background: var(--grad); background-clip: text; -webkit-background-clip: text; color: var(--clear); -webkit-text-fill-color: var(--clear); }
.hero-lead { max-width: 860px; margin: 0 0 26px; font-size: 17px; line-height: 1.65; color: var(--text-muted); }
.hero-lead strong { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 20px 0 0; padding: 0; }
.platforms-label { padding-right: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.platforms li + li:not(:nth-child(2)) { border-left: 1px solid var(--border); }
.platforms a { display: flex; align-items: center; gap: 7px; padding: 3px 15px; font-size: 13.5px; line-height: 22px; color: var(--text-muted); text-decoration: none; }
.platforms a svg { width: 15px; height: 15px; }
.platforms a:hover { color: var(--accent-dark); }
.win-stage { position: relative; z-index: 1; width: min(1100px, 100%); margin: 34px auto 0; }
.win-stage::before { content: ""; position: absolute; top: 80px; bottom: 0; left: -240px; right: -240px; background-image: repeating-linear-gradient(to bottom, var(--line-faint) 0, var(--line-faint) 1px, var(--clear) 1px, var(--clear) 48px); mask-image: linear-gradient(90deg, var(--clear), var(--text) 20%, var(--text) 80%, var(--clear)); z-index: -1; pointer-events: none; }
.win { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-window); overflow: hidden; }
.win-bar { height: 40px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--border); }
.win-dots { display: flex; gap: 6px; flex-shrink: 0; }
.win-dots i { width: 10px; height: 10px; flex-shrink: 0; border-radius: var(--radius-round); background: var(--dot); }
.win-nav { display: flex; gap: 5px; }
.win-arrow { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); background: var(--bg-panel); }
.win-arrow svg { width: 12px; height: 12px; }
.win-title { font-size: 13px; font-weight: var(--weight-medium); }
.win-title span { color: var(--text-muted); font-weight: var(--weight-regular); margin: 0 4px; }
.win-mode { margin-left: auto; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--accent-tint); color: var(--accent-dark); font-family: var(--font-mono); font-size: 11.5px; }
.win-body { display: grid; grid-template-columns: 7fr 3fr; }
.board, .win-body > * { min-width: 0; }
.board-head, .board-row { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); }
.board-head { height: 40px; border-bottom: 1px solid var(--border); }
.axis-head { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.col-head { display: flex; align-items: center; justify-content: center; gap: 8px; border-left: 1px solid var(--border-soft); }
.col-head b { font-family: var(--font-mono); font-size: 12.5px; font-weight: var(--weight-medium); }
.col-head small { font-size: 12px; color: var(--text-muted); }
.board-row { min-height: 48px; border-bottom: 1px solid var(--line-faint); }
.board-row:last-child { border-bottom: 0; }
.axis { display: flex; justify-content: center; padding-top: 7px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); }
.cell { min-width: 0; padding: 5px 8px; border-left: 1px solid var(--line-faint); }
.rule { display: flex; flex-direction: column; justify-content: center; min-height: 38px; height: 100%; padding: 3px 10px; border-radius: var(--radius-sm); background: var(--bg-panel-2); color: var(--text); }
.rule code { font-size: 11.5px; line-height: 1.35; }
.rule span { font-size: 11px; line-height: 1.35; color: var(--text-muted); }
.rule.hit { background: var(--accent-tint); color: var(--accent-dark); border: 1.5px dashed var(--accent); }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 60px; background: var(--bg-panel); color: var(--text); border-left: 1px solid var(--border); }
.side-main { min-width: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.side-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: var(--weight-medium); }
.side-cat { width: 18px; height: 18px; }
.side-close { margin-left: auto; color: var(--text-muted); }
.bubble { margin: 0; padding: 9px 12px; background: var(--accent-tint); color: var(--text); border: 1px solid var(--accent-tint-line); border-radius: var(--radius-bubble); font-size: 13px; line-height: 1.55; }
.code { min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); }
.code-head { display: flex; justify-content: space-between; gap: 10px; padding: 5px 10px; border-bottom: 1px solid var(--border-soft); font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.code pre { margin: 0; padding: 8px 10px; font-size: 11px; line-height: 1.6; }
.y-k { color: var(--accent-dark); }
.y-p, .y-t { color: var(--text-muted); }
.y-n, .y-v { color: var(--text); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; border-left: 1px solid var(--border); }
.rail-item { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border: 1px solid var(--clear); border-radius: var(--radius-sm); font-size: 10.5px; line-height: 1.2; color: var(--text-muted); }
.rail-item svg { width: 18px; height: 18px; }
.rail-item.is-on { color: var(--accent-dark); background: var(--bg); border-color: var(--border); box-shadow: var(--shadow-xs); }
.statusbar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg); color: var(--text); }
.statusbar-inner { max-width: 1100px; margin: 0 auto; padding: 14px 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 0; font-family: var(--font-mono); font-size: 12.5px; }
.statusbar-inner em { font-style: normal; color: var(--text-muted); margin-right: 6px; }
.statusbar-inner .sep { color: var(--border); margin: 0 18px; }
.dl { background: var(--bg-panel); color: var(--text); padding: 88px 32px 96px; }
.dl-inner { max-width: 1100px; margin: 0 auto; }
.dl-head { text-align: center; margin-bottom: 40px; }
.dl-head p { margin: 0; color: var(--text-muted); }
.dl-head .dl-eyebrow { margin-bottom: 10px; color: var(--accent-dark); font-family: var(--font-mono); font-size: 12px; }
.dl-head h2 { margin: 0 0 10px; font-size: 30px; }
.dl-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--border); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); overflow: hidden; }
.dl-cell { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px; background: var(--bg); color: var(--text); text-decoration: none; }
.dl-cell:hover { background: var(--bg-panel); color: var(--text); }
.dl-icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border-radius: var(--radius); background: var(--bg-panel); color: var(--text); border: 1px solid var(--border-soft); }
.dl-icon svg { width: 20px; height: 20px; }
.dl-name { font-size: 16px; font-weight: var(--weight-medium); }
.dl-meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.dl-go { margin-top: auto; font-size: 13px; color: var(--accent-dark); }
.tabs { min-width: 0; }
[role="tablist"] { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
[role="tab"] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text-muted); text-align: center; }
[role="tab"][aria-selected="true"] { background: var(--bg-panel-2); color: var(--text); border-color: var(--border); }
[role="tabpanel"] { min-width: 0; }
.feature-browser { display: grid; grid-template-columns: 34fr 66fr; gap: 24px; align-items: start; }
.feature-browser > * { min-width: 0; }
.feature-browser [role="tablist"] { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.feature-browser [role="tab"] { position: relative; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 18px 22px; text-align: left; border-color: var(--clear); background: var(--clear); color: var(--text-muted); }
.feature-browser [role="tab"] small { font-family: var(--font-mono); font-size: 12px; }
.feature-browser [role="tab"] b { font-size: 18px; font-weight: var(--weight-regular); }
.feature-browser [role="tab"][aria-selected="true"] { background: var(--bg); color: var(--text); border-color: var(--border); }
.feature-browser [role="tab"][aria-selected="true"]::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: -1px; width: 2px; background: var(--grad); }
.tab-progress { position: absolute; left: 22px; right: 22px; bottom: 5px; height: 2px; background: var(--bg-panel-2); color: var(--text); }
.tabs[data-playing="true"] [aria-selected="true"] .tab-progress::after { content: ""; display: block; height: 100%; background: var(--grad); transform-origin: left; animation: route-progress var(--feature-duration) linear forwards; }
@keyframes route-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.feature-detail { padding: 28px; }
.feature-detail p { line-height: 1.85; }
.feature-detail pre { margin: 20px 0 0; padding: 18px; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.fact-grid { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr; gap: 20px; margin-top: 32px; }
.fact-card { position: relative; overflow: hidden; min-width: 0; min-height: 210px; padding: 30px; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; justify-content: flex-end; }
.fact-card strong { font-size: clamp(28px, 3vw, 42px); font-weight: var(--weight-regular); line-height: 1.2; }
.fact-card span { margin-top: 12px; font-size: 14px; }
.fact-dots { background-image: radial-gradient(var(--texture) 1px, var(--clear) 1px); background-size: 16px 16px; }
.fact-lines { background-color: var(--accent-2); background-image: repeating-linear-gradient(145deg, var(--clear) 0, var(--clear) 38px, var(--texture) 38px, var(--texture) 39px); color: var(--on-accent); }
.fact-squares { background-color: var(--accent-dark); background-image: linear-gradient(var(--texture) 1px, var(--clear) 1px), linear-gradient(90deg, var(--texture) 1px, var(--clear) 1px); background-size: 36px 36px; color: var(--on-accent); }
.toc { position: sticky; top: var(--header-height); z-index: 10; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; margin-bottom: 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); }
.toc a { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--radius-xs); color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); margin-bottom: 12px; }
.faq-item summary { position: relative; padding: 18px 48px 18px 20px; list-style: none; font-weight: var(--weight-medium); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; top: 16px; right: 20px; color: var(--text-muted); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 20px 20px; color: var(--text-muted); }
.faq-answer p:last-child { margin: 0; }
.term-card { box-shadow: var(--shadow-xs); }
.term-card dt { font-size: 19px; margin-bottom: 10px; font-weight: var(--weight-medium); }
.term-card dd { margin: 0; color: var(--text-muted); }
.term-key { display: block; font-size: 12px; font-family: var(--font-mono); color: var(--text-muted); margin-top: 4px; }
.client-card { display: flex; flex-direction: column; gap: 20px; }
.client-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.client-head > div { min-width: 0; }
.client-head h3 { margin-bottom: 4px; }
.app-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.client-rev:empty { display: none; }
.client-rev { font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; }
.badge, .tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--bg-panel); color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; }
.badge-first { background: var(--bg-panel-2); color: var(--text); border-color: var(--dot); font-weight: var(--weight-medium); }
.badge-recommended { background: var(--bg); color: var(--text); border-color: var(--text-muted); }
.badge-archived { background: var(--bg-panel); color: var(--text-muted); border-style: dashed; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; }
.post-card { display: flex; flex-direction: column; gap: 14px; }
.post-card h3 { margin: 0; font-size: 20px; line-height: 1.5; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); }
.post-card p { margin: 0; color: var(--text-muted); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; }
.post-more { margin-top: auto; color: var(--accent-dark); font-size: 14px; }
.callout { margin: 24px 0; padding: 20px 22px; border: 1px solid var(--border); border-left: 3px solid var(--text-muted); border-radius: var(--radius-sm); background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-medium); }
.callout-warn { border-left-color: var(--warn); }
.callout-error { border-left-color: var(--error); }
.callout-success { border-left-color: var(--success); }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.data-table { width: 100%; border-collapse: collapse; text-align: left; background: var(--bg); color: var(--text); font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 14px 18px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; vertical-align: top; }
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-medium); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; background: var(--bg); color: var(--text); }
.prose table code { overflow-wrap: anywhere; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-panel); color: var(--text); }
.article-download > div { flex: 1 1 240px; min-width: 0; }
.article-download h2 { font-size: 22px; margin: 0 0 8px; }
.article-download p { margin: 0; color: var(--text-muted); }
.dl-fab { position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); text-decoration: none; }
.dl-fab svg { width: 22px; height: 22px; }
.dl-fab strong { display: block; font-size: 14px; font-weight: var(--weight-medium); }
.dl-fab small { display: block; font-size: 11px; color: var(--text-muted); }
.dl-fab:hover { border-color: var(--text-muted); }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.swatch { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); min-width: 0; }
.swatch-sample { height: 60px; border-bottom: 1px solid var(--border); }
.swatch code { display: block; padding: 10px 12px; font-size: 12px; }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--bg-panel); }
.sw-panel2 { background: var(--bg-panel-2); }
.sw-border { background: var(--border); }
.sw-soft { background: var(--border-soft); }
.sw-line { background: var(--line-faint); }
.sw-dot { background: var(--dot); }
.sw-accent { background: var(--accent); }
.sw-accent2 { background: var(--accent-2); }
.sw-dark { background: var(--accent-dark); }
.sw-tint { background: var(--accent-tint); }
.sw-tint-line { background: var(--accent-tint-line); }
.sw-on { background: var(--on-accent); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--text-muted); }
.sw-faint { background: var(--text-faint); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-glow { background: var(--glow); }
.sw-glow2 { background: var(--glow-2); }
.sw-veil { background: var(--veil); }
.sw-texture { background: var(--accent-dark); background-image: radial-gradient(var(--texture) 2px, var(--clear) 2px); background-size: 12px 12px; }
.sw-clear { background: var(--clear); }
.sw-grad { background: var(--grad); }
.type-display { font-size: var(--size-h1); font-family: var(--font-display); line-height: 1.16; letter-spacing: var(--tracking-display); }
.preview-stack { display: grid; gap: 28px; }
.preview-states { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
@media (max-width: 1080px) {
  .win-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero { padding: 32px 20px 48px; }
  .hero-lead { font-size: 15px; }
  .platforms { row-gap: 6px; }
  .platforms-label { width: 100%; padding: 0 0 4px; text-align: center; }
  .platforms li + li:not(:nth-child(2)) { border-left: 0; }
  .win-body { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .col-head small, .win-mode { display: none; }
  .dl { padding: 64px 20px 72px; }
  .dl-head h2 { font-size: 24px; }
  .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statusbar-inner .sep { margin: 0 10px; }
  .feature-browser { grid-template-columns: minmax(0, 1fr); }
  .feature-browser [role="tablist"] { flex-direction: row; flex-wrap: wrap; }
  .feature-browser [role="tab"] { flex: 1 1 135px; padding: 14px; }
  .fact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .fact-card { padding: 22px; min-height: 170px; }
}
@media (max-width: 640px) {
  .hero { padding-inline: var(--gutter); }
  .hero-chips li { padding: 6px 9px; font-size: 11px; }
  .platforms a { padding-inline: 10px; }
  .win-bar { gap: 8px; padding-inline: 10px; }
  .win-title { font-size: 11px; }
  .win-nav { display: none; }
  .feature-detail { padding: 20px; }
  .fact-grid { grid-template-columns: minmax(0, 1fr); }
  .fact-card { min-height: 150px; }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc { position: static; }
  .dl-fab { right: 16px; bottom: 16px; padding: 10px 14px; }
}
@media (max-width: 520px) {
  .board-head, .board-row { grid-template-columns: 32px repeat(3, minmax(0, 1fr)); }
  .cell { padding: 5px 4px; }
  .rule { padding-inline: 6px; }
  .rule span { display: none; }
  .rule code { font-size: 9px; }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
}