.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow-x: clip;
  min-height: calc(100vh - var(--nav-h) - var(--peek));
  min-height: calc(100svh - var(--nav-h) - var(--peek));
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px var(--gutter) 36px;
  background: var(--bg);
  color: var(--text);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: radial-gradient(circle, var(--dot) 1px, var(--clear) 1.5px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  pointer-events: none;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 880px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 3px 14px 3px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: var(--radius-circle); background: var(--success); color: var(--text); box-shadow: var(--dot-ring-success); }
.eyebrow-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.hero h1 { margin: 20px 0 0; font-size: clamp(28px, 3.4vw, 48px); font-weight: var(--weight-normal); line-height: 1.14; letter-spacing: -.02em; }
.hero h1 span { display: block; }
.hero-lede { margin: 16px 0 0; font-size: 17px; line-height: 1.6; color: var(--text-muted); }
.hero-lede strong { color: var(--text); font-weight: var(--weight-medium); }
.hero-lede code { font-size: 15px; color: var(--text); }
.platforms { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.platforms li { margin: 0; }
.platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 14px 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color var(--time-fast), border-color var(--time-fast);
}
.platform svg { width: 15px; height: 15px; color: var(--text); }
.platform:hover { color: var(--text); border-color: var(--border-strong); }
.stage { position: relative; width: min(1080px, 100%); margin-top: 40px; }
.stage::before, .stage::after { content: ""; position: absolute; z-index: -1; bottom: -34%; width: 62%; aspect-ratio: 1.2; pointer-events: none; }
.stage::before { left: -22%; background: radial-gradient(closest-side, var(--halo-a) 0%, var(--clear) 100%); }
.stage::after { right: -20%; background: radial-gradient(closest-side, var(--halo-b) 0%, var(--clear) 100%); }
.stage-tag {
  position: absolute;
  left: 0;
  top: -38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 3px 12px 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-card);
  font-size: 13px;
}
.stage-tag svg { width: 15px; height: 15px; color: var(--accent); }
.stage-tag code { font-size: 12.5px; }
.stage-tag-sep { color: var(--text-muted); }
.window { position: relative; z-index: 1; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-float); }
.window-bar { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 16px 0 18px; border-bottom: 1px solid var(--border); }
.chrome-dots { display: flex; gap: 7px; flex-shrink: 0; }
.chrome-dots i { width: 10px; height: 10px; border-radius: var(--radius-circle); background: var(--chrome-dot); color: var(--text); }
.crumb { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.crumb b { font-weight: var(--weight-medium); color: var(--text); }
.crumb-sep { margin: 0 6px; color: var(--border-strong); }
.mode { margin-left: auto; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.mode-key { color: var(--text-muted); }
.mode-seg { display: flex; padding: 3px; gap: 2px; border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text); }
.mode-seg span { padding: 2px 10px; border-radius: var(--radius-pill); color: var(--text-muted); }
.mode-seg .is-on { background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-sm); }
.board-scroll { overflow: hidden; }
.board { display: block; width: 100%; height: auto; max-width: none; }
.lane-col { fill: var(--lane); }
.lane-rule { stroke: var(--border); stroke-width: 1; }
.lane-key { font-family: var(--font-mono); font-size: 12px; fill: var(--text); }
.lane-zh { font-family: var(--font-body); font-size: 12.5px; fill: var(--text-muted); }
.wire { fill: none; stroke: var(--wire); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.wire-dash { stroke-dasharray: 4 4; }
.arrow-head, .junction { fill: var(--wire); }
.wire-tag { fill: var(--bg-panel-2); }
.wire-tag-text { font-family: var(--font-body); font-size: 12px; fill: var(--text-muted); }
.note { filter: var(--note-shadow); }
.note-y { fill: var(--sticky-note); stroke: var(--sticky-edge); stroke-width: 1; }
.note-y-back { fill: var(--sticky-back); stroke: var(--sticky-edge); stroke-width: 1; stroke-opacity: .55; }
.note-b { fill: var(--note-blue); stroke: var(--note-blue-edge); stroke-width: 1; }
.note-g { fill: var(--note-green); stroke: var(--note-green-edge); stroke-width: 1; }
.note-p { fill: var(--note-pink); stroke: var(--note-pink-edge); stroke-width: 1; }
.note-code { font-family: var(--font-mono); font-size: 12.5px; fill: var(--text); }
.note-code .t-type { font-weight: var(--weight-bold); }
.note-code .t-dim { fill: var(--text-muted); }
.note-zh { font-family: var(--font-body); font-size: 13px; fill: var(--text); }
.gate { fill: var(--bg-panel-2); stroke: var(--border-strong); stroke-width: 1.25; }
.gate-text { font-family: var(--font-body); font-size: 12.5px; fill: var(--text); }
.cursor { filter: var(--cursor-shadow); }
.cursor-arrow { stroke: var(--bg-panel-2); stroke-width: 1.5; stroke-linejoin: round; }
.cursor-text { font-family: var(--font-mono); font-size: 11.5px; }
.cv .cursor-arrow { fill: var(--cur-violet); }
.cv .cursor-tag { fill: var(--cur-violet-soft); stroke: var(--cur-violet); stroke-width: 1; }
.cv .cursor-text { fill: var(--cur-violet-ink); }
.co .cursor-arrow { fill: var(--cur-orange); }
.co .cursor-tag { fill: var(--cur-orange-soft); stroke: var(--cur-orange); stroke-width: 1; }
.co .cursor-text { fill: var(--cur-orange-ink); }
.cg .cursor-arrow { fill: var(--cur-green); }
.cg .cursor-tag { fill: var(--cur-green-soft); stroke: var(--cur-green); stroke-width: 1; }
.cg .cursor-text { fill: var(--cur-green-ink); }

.features { padding: 64px var(--gutter) 112px; }
.seg, [role="tablist"].tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: 6px;
  gap: 4px;
  overflow-x: auto;
  border-radius: var(--radius-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.seg-tab, .tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--clear);
  color: var(--text);
  font-size: 15.5px;
  white-space: nowrap;
}
.seg-tab[aria-selected="true"], .tabs [aria-selected="true"] { background: var(--sticky); color: var(--text); }
[role="tabpanel"]:not([hidden]) { animation: panel-in var(--time-fast) var(--ease); }
@keyframes panel-in { from { opacity: 0; } to { opacity: 1; } }
.feature-panel { max-width: 1120px; margin: 72px auto 0; display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); gap: 64px; align-items: center; }
.feature-panel h2 { margin: 0; font-size: 34px; }
.feature-panel p { margin: 20px 0 28px; color: var(--text-muted); font-size: 16px; line-height: 1.75; }
.feature-panel p code { font-size: 14px; color: var(--text); }
.mini-canvas { position: relative; overflow-x: clip; padding: 36px; border-radius: var(--radius-lg); background-image: radial-gradient(circle, var(--dot) 1px, var(--clear) 1.5px); background-size: 22px 22px; }
.yaml-card { position: relative; max-width: 420px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); overflow: hidden; }
.yaml-card-head { padding: 10px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); }
.yaml-card pre { margin: 0; padding: 16px 18px 18px; border: 0; border-radius: 0; font-size: 13.5px; }
.yaml-card pre .k { color: var(--accent-dark); }
.yaml-card pre .m { color: var(--text-muted); }
.mini-link { display: block; height: 32px; width: 70%; margin-inline: auto; border-right: 1px dashed var(--wire); border-bottom: 1px dashed var(--wire); border-bottom-right-radius: var(--radius-lg); }
.field-label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--cur-violet); border-radius: var(--radius-pill); background: var(--cur-violet-soft); color: var(--cur-violet-ink); font-family: var(--font-mono); font-size: 12px; }
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel-2);
  color: var(--text);
}
.toc a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-pill); color: var(--text-muted); text-decoration: none; }
.toc a:hover, .toc a[aria-current="location"] { background: var(--bg-panel); color: var(--accent-dark); }
.toc-sticky { position: sticky; top: 12px; z-index: 10; }
.faq-item { margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-sm); }
.faq-item summary { position: relative; padding: 20px 56px 20px 24px; cursor: pointer; list-style: none; font-weight: var(--weight-medium); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 24px; top: 17px; color: var(--accent); font-size: 24px; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px; color: var(--text-muted); }
.faq-answer > :last-child { margin-bottom: 0; }
.term-card { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.term-card h3 { margin: 12px 0; }
.term-card p { margin-bottom: 0; color: var(--text-muted); }
.term-key { font-family: var(--font-mono); font-size: 13px; color: var(--accent-dark); }
.client-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.client-card.is-featured { border-color: var(--accent); }
.client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.client-head h3 { margin: 0 0 6px; }
.client-card p { color: var(--text-muted); }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.client-rev { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
[data-rev]:empty { display: none; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge, .tag { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 10px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--bg-panel); color: var(--text-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; white-space: normal; text-decoration: none; }
.badge-first { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.badge-recommended { border-color: var(--note-blue-edge); background: var(--note-blue); color: var(--accent-dark); }
.badge-archived { border-color: var(--border-strong); background: var(--bg-panel); color: var(--text-muted); }
.post-card { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; color: var(--text-muted); font-size: 13px; }
.post-card h3 { margin: 0 0 14px; font-size: 22px; line-height: 1.45; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-dark); }
.post-card p { color: var(--text-muted); }
.post-card .post-link { margin-top: auto; padding-top: 16px; }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-md); background: var(--bg-panel-2); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 8px; font-weight: var(--weight-medium); }
.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-panel-2); color: var(--text); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--bg-panel-2); color: var(--text); }
.data-table th, .data-table td, .prose table th, .prose table td, .article-body table th, .article-body table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th, .article-body 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, .article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.prose table code, .article-body table code { overflow-wrap: anywhere; }
.download-guide { margin-top: 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.download-guide h2 { margin-top: 0; font-size: 26px; }
.download-guide p { color: var(--text-muted); }
.dl-fab {
  position: fixed;
  z-index: 30;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: calc(100vw - var(--gutter) * 2);
  min-height: 60px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel-2);
  color: var(--text);
  box-shadow: var(--shadow-float);
  text-decoration: none;
}
.dl-fab:hover { color: var(--accent-dark); border-color: var(--accent); }
.dl-fab svg { width: 22px; height: 22px; color: var(--accent); }
.dl-fab strong { display: block; font-size: 14px; font-weight: var(--weight-medium); }
.dl-fab small { display: block; color: var(--text-muted); font-size: 12px; }
.has-dl-fab { padding-bottom: 100px; }

.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-panel-2); color: var(--text); font-size: 12px; }
.swatch::before { content: ""; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--sample); }
.sw-bg { --sample: var(--bg); }
.sw-panel { --sample: var(--bg-panel); }
.sw-white { --sample: var(--bg-panel-2); }
.sw-border { --sample: var(--border); }
.sw-border-strong { --sample: var(--border-strong); }
.sw-accent { --sample: var(--accent); }
.sw-accent-dark { --sample: var(--accent-dark); }
.sw-text { --sample: var(--text); }
.sw-muted { --sample: var(--text-muted); }
.sw-success { --sample: var(--success); }
.sw-warn { --sample: var(--warn); }
.sw-error { --sample: var(--error); }
.sw-on { --sample: var(--on-accent); }
.sw-sticky { --sample: var(--sticky); }
.sw-note { --sample: var(--sticky-note); }
.sw-back { --sample: var(--sticky-back); }
.sw-edge { --sample: var(--sticky-edge); }
.sw-halo-a { --sample: var(--halo-a); }
.sw-halo-b { --sample: var(--halo-b); }
.sw-dot { --sample: var(--dot); }
.sw-lane { --sample: var(--lane); }
.sw-wire { --sample: var(--wire); }
.sw-chrome { --sample: var(--chrome-dot); }
.sw-blue { --sample: var(--note-blue); }
.sw-blue-edge { --sample: var(--note-blue-edge); }
.sw-green { --sample: var(--note-green); }
.sw-green-edge { --sample: var(--note-green-edge); }
.sw-pink { --sample: var(--note-pink); }
.sw-pink-edge { --sample: var(--note-pink-edge); }
.sw-violet { --sample: var(--cur-violet); }
.sw-violet-soft { --sample: var(--cur-violet-soft); }
.sw-violet-ink { --sample: var(--cur-violet-ink); }
.sw-orange { --sample: var(--cur-orange); }
.sw-orange-soft { --sample: var(--cur-orange-soft); }
.sw-orange-ink { --sample: var(--cur-orange-ink); }
.sw-cgreen { --sample: var(--cur-green); }
.sw-cgreen-soft { --sample: var(--cur-green-soft); }
.sw-cgreen-ink { --sample: var(--cur-green-ink); }
.sw-clear { --sample: var(--clear); }
.sw-veil { --sample: var(--veil); }
.preview-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.preview-stack { display: grid; gap: 24px; }
.preview-mobile { display: none; }
.preview-mobile summary { min-height: 44px; padding: 10px; cursor: pointer; }
.preview-mobile nav { position: absolute; inset-inline: var(--gutter); top: 100%; z-index: 4; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.preview-mobile nav a { display: flex; align-items: center; min-height: 44px; padding: 10px; color: var(--text); text-decoration: none; }
.preview-language { position: relative; }
.preview-language summary { list-style: none; cursor: pointer; }
.preview-language summary::-webkit-details-marker { display: none; }
.preview-language nav { position: absolute; z-index: 6; top: calc(100% + 10px); right: 0; width: 180px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-panel-2); color: var(--text); box-shadow: var(--shadow-card); }
.preview-language nav a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--text); text-decoration: none; }

@media (max-width: 1000px) {
  .preview-mobile { display: block; }
}
@media (max-width: 900px) {
  .feature-panel { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: clamp(24px, 4vw, 30px); }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding-top: 24px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(24px, 7.4vw, 30px); }
  .hero-lede { font-size: 15.5px; }
  .eyebrow { gap: 6px; font-size: 12px; padding-inline: 10px; }
  .eyebrow-mono { font-size: 11px; }
  .hero .cta-row { flex-direction: column; width: 100%; max-width: 320px; }
  .platforms { gap: 8px; }
  .platform { padding-inline: 10px; font-size: 12px; }
  .board-scroll { overflow-x: auto; overscroll-behavior-inline: contain; }
  .board { min-width: 820px; }
  .mode { display: none; }
  .seg-tab, .tabs [role="tab"] { padding-inline: 16px; }
  .features { padding-top: 48px; padding-bottom: 64px; }
  .feature-panel { margin-top: 40px; }
  .feature-panel h2 { font-size: 26px; }
  .mini-canvas { padding: 20px; }
  .client-card, .post-card, .term-card { padding: 22px; }
  .dl-fab { right: var(--gutter); bottom: max(16px, env(safe-area-inset-bottom)); min-height: 52px; padding: 10px 14px; }
  .dl-fab small { display: none; }
  .swatch { padding: 8px; gap: 7px; }
  .swatch::before { width: 24px; height: 32px; }
}