.hero { padding-top: 36px; overflow: hidden; }
.atmo { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.atmo::before {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -8%;
  height: 72%;
  background-image: linear-gradient(var(--grid-line) 1px, var(--clear) 1px), linear-gradient(90deg, var(--grid-line) 1px, var(--clear) 1px);
  background-size: 64px 64px;
  transform: perspective(760px) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, var(--mask-solid) 0%, var(--clear) 82%);
  mask-image: linear-gradient(to top, var(--mask-solid) 0%, var(--clear) 82%);
}
.atmo::after {
  content: "";
  position: absolute;
  right: 2%;
  top: 2%;
  width: 900px;
  height: 760px;
  background: radial-gradient(closest-side, var(--panel) 0%, var(--clear) 100%);
  opacity: 0.9;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
  grid-template-areas: "lead device" "more device";
  grid-template-rows: auto 1fr;
  column-gap: 56px;
  align-items: start;
}
.hero-lead { grid-area: lead; padding-top: 28px; }
.hero-more { grid-area: more; }
.hero h1 { margin: 0; color: var(--text); }
.h1-brand { display: block; font-size: clamp(30px, 3.4vw, 48px); font-weight: var(--weight-display); line-height: 1.12; letter-spacing: -0.012em; }
.h1-kw { display: block; margin-top: 10px; font-size: clamp(18px, 1.95vw, 28px); font-weight: var(--weight-heavy); line-height: 1.3; letter-spacing: -0.006em; }
.platforms { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.platforms-label, .chips-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-right: 4px; }
.platforms ul, .chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms a { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--panel); color: var(--text); font-size: 14px; font-weight: var(--weight-semibold); text-decoration: none; }
.platforms a:hover { border-color: var(--accent); color: var(--accent-dark); }
.platforms svg { width: 16px; height: 16px; flex-shrink: 0; }
.hero-desc { margin: 32px 0 0; font-size: 16.5px; line-height: 1.8; color: var(--muted); max-width: 34em; }
.hero-desc strong { color: var(--text); font-weight: var(--weight-bold); }
.chips { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips ul { gap: 6px; }
.chips li { font-family: var(--font-mono); font-size: 12.5px; line-height: 1; padding: 7px 10px; border-radius: var(--r-ctl); background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.kw-index { list-style: none; margin: 28px 0 0; padding: 0; border-bottom: 1px dashed var(--border-strong); }
.kw-index li { padding: 9px 0; border-top: 1px dashed var(--border-strong); font-size: 15px; line-height: 1.6; color: var(--muted); }
.kw-index a { font-size: 16px; font-weight: var(--weight-heavy); color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.kw-index a:hover { color: var(--accent-dark); }
.kw-dash { margin: 0 6px; color: var(--muted); }
.device { grid-area: device; position: relative; margin: 8px 18px 18px 0; min-width: 0; }
.device::before { content: ""; position: absolute; inset: 0; transform: translate(18px, 18px); background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: 0 30px 70px -30px var(--shadow-deep); }
.win { position: relative; z-index: 1; background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-panel); overflow: hidden; box-shadow: 0 1px 2px var(--shadow-soft), 0 14px 34px -10px var(--shadow-soft), 0 44px 96px -28px var(--shadow-deep); }
.win-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, var(--panel) 0%, var(--bg) 100%); color: var(--text); }
.dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.dots i { display: block; width: 10px; height: 10px; border-radius: var(--r-round); background: var(--chrome-dot); }
.win-title { font-weight: var(--weight-heavy); font-size: 14px; color: var(--text); }
.win-menu { display: flex; gap: 16px; padding-left: 14px; border-left: 1px solid var(--border); font-size: 13px; color: var(--muted); white-space: nowrap; }
.win-menu .is-cur { color: var(--accent-dark); font-weight: var(--weight-bold); }
.win-body { padding: 18px 20px 20px; }
.win-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.win-h { font-family: var(--font-display); font-size: 20px; font-weight: var(--weight-display); color: var(--text); letter-spacing: -0.005em; }
.win-path { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 14px; }
.mod { display: flex; flex-direction: column; min-width: 0; }
.mod-t { margin: 0 0 7px; font-size: 13px; font-weight: var(--weight-heavy); color: var(--accent-dark); line-height: 1.3; }
.mod-c { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); box-shadow: 0 1px 2px var(--shadow-soft); font-size: 12.5px; line-height: 1.4; color: var(--text); min-width: 0; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld-l { font-size: 11.5px; color: var(--muted); }
.fld-v { display: block; min-height: 26px; line-height: 24px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--panel); font-family: var(--font-mono); font-size: 11.5px; color: var(--text); overflow-wrap: anywhere; }
.fld-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.fld-row .fld-l { font-size: 12.5px; color: var(--text); }
.fld-row .fld-v { flex-shrink: 0; min-width: 62px; text-align: center; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sw { position: relative; flex-shrink: 0; width: 30px; height: 16px; border-radius: var(--r-ctl); background: var(--toggle-off); }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: var(--r-knob); background: var(--panel); box-shadow: 0 1px 1px var(--shadow-deep); }
.sw.is-on { background: var(--accent); }
.sw.is-on::after { left: 16px; }
.rd-list { display: flex; flex-direction: column; gap: 4px; }
.rd { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-ctl); color: var(--text); }
.rd-dot { position: relative; flex-shrink: 0; width: 13px; height: 13px; border-radius: var(--r-round); border: 1.5px solid var(--border-strong); background: var(--panel); }
.rd.is-on { background: var(--accent-soft); color: var(--accent-dark); font-weight: var(--weight-bold); }
.rd.is-on .rd-dot { border-color: var(--accent); }
.rd.is-on .rd-dot::after { content: ""; position: absolute; inset: 2px; border-radius: var(--r-round); background: var(--accent); }
.cut { border: 0; border-top: 1px dashed var(--border); margin: 2px 0; }
.cores { display: flex; flex-wrap: wrap; gap: 6px; }
.core { font-family: var(--font-mono); font-size: 11.5px; line-height: 1; padding: 6px 9px; border: 1px solid var(--border); border-radius: var(--r-ctl); color: var(--muted); background: var(--panel); }
.core.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: var(--weight-bold); }
.mod-c.is-log { background: var(--log-bg); border-color: var(--log-bg); color: var(--log-text); font-family: var(--font-mono); font-size: 11px; line-height: 1.6; gap: 6px; }
.lg { overflow-wrap: anywhere; }
.lg-k { color: var(--log-text); }
.lg-ok { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: var(--r-round); background: var(--success); vertical-align: 1px; }
.factbar { position: relative; z-index: 1; margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 16px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); box-shadow: 0 1px 2px var(--shadow-soft); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.factbar b { color: var(--text); font-weight: var(--weight-bold); }
.fb-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: var(--r-round); background: var(--success); vertical-align: 1px; }
.fb-sep { color: var(--border-strong); }
.dl-peek { padding-top: 40px; padding-bottom: 96px; }

.tabs { min-width: 0; }
.tab-list, [role="tablist"] { display: flex; gap: 20px; min-width: 0; max-width: 100%; overflow-x: auto; padding: 4px; scrollbar-width: thin; }
.tab-list [role="tab"], [role="tablist"] > [role="tab"] {
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--clear);
  color: var(--muted);
  font-weight: var(--weight-heavy);
  font-size: 17px;
  text-align: left;
}
[role="tab"][aria-selected="true"] { color: var(--text); }
[role="tab"][aria-selected="true"] .tab-text { background-image: linear-gradient(to top, var(--marker) 40%, var(--clear) 40%); }
.tab-panel, [role="tabpanel"] { min-width: 0; }
.tab-panel { margin-top: 20px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); }
.feature-tabs { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.feature-tabs > [role="tablist"] { position: sticky; top: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; overflow: visible; padding: 0; }
.feature-tabs > [role="tablist"] > [role="tab"] { font-size: 20px; }
.feature-tabs .tab-panel { margin-top: 0; }
.feature-tabs p { line-height: 1.9; }
.setting-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding: 16px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-ctl); font-family: var(--font-mono); font-size: 13px; }
.toc { position: sticky; top: 12px; z-index: 10; display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 32px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); }
.toc a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; font-weight: var(--weight-bold); text-decoration: none; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding: 20px 36px 20px 0; cursor: pointer; list-style: none; font-weight: var(--weight-heavy); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 20px; color: var(--accent); font-family: var(--font-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 20px; color: var(--muted); line-height: 1.9; }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { padding: 24px; border-top: 3px solid var(--accent); }
.term-card h3 { margin-bottom: 8px; color: var(--accent-dark); }
.term-card .term-alias { display: block; margin-bottom: 14px; color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.term-card p { margin-bottom: 0; }
.client-card { padding: 28px; }
.client-head { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.client-head > div { min-width: 0; }
.client-head h3 { margin: 0 0 4px; }
.client-icon { width: 56px; height: 56px; flex-shrink: 0; }
.client-meta { font-size: 14px; color: var(--muted); }
.client-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.badge, .tag {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-ctl);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  font-weight: var(--weight-bold);
  vertical-align: middle;
}
.badge-first { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.badge-recommended { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--border); }
.badge-retired { background: var(--panel-2); color: var(--muted); border-style: dashed; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; }
.article-card h3 { margin-top: 16px; margin-bottom: 12px; font-size: 22px; line-height: 1.45; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; }
.article-card p { color: var(--muted); flex: 1; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.callout { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--text); line-height: 1.85; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-dark); }
.article-download { margin-top: 40px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-panel); background: var(--panel); color: var(--text); box-shadow: var(--shadow-card); }
.article-download h2 { margin: 0 0 12px; font-size: 24px; }
.article-download .btn { margin-top: 8px; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-card); }
.data-table { width: 100%; border-collapse: collapse; background: var(--panel); color: var(--text); font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--panel-2); color: var(--text); font-weight: var(--weight-heavy); }
.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(--panel);
  color: var(--text);
}
.dl-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: var(--weight-bold);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--accent-dark), 0 14px 30px -12px var(--accent-glow), 0 4px 10px -4px var(--shadow-deep);
  transition: transform var(--ease-short);
}
.dl-fab:hover { transform: translateY(-1px); background: var(--accent-dark); color: var(--on-accent); }
.dl-fab svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.preview-section { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--border); }
.preview-section > h2 { margin-top: 0; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--panel); color: var(--text); overflow: hidden; }
.swatch-sample { display: block; height: 64px; }
.swatch code { display: block; padding: 10px 12px; font-size: 12px; }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--panel); }
.sw-panel-2 { background: var(--panel-2); }
.sw-border { background: var(--border); }
.sw-border-strong { background: var(--border-strong); }
.sw-accent { background: var(--accent); }
.sw-accent-dark { background: var(--accent-dark); }
.sw-accent-soft { background: var(--accent-soft); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--muted); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-marker { background: var(--marker); }
.sw-on-accent { background: var(--on-accent); }
.sw-chrome-dot { background: var(--chrome-dot); }
.sw-toggle-off { background: var(--toggle-off); }
.sw-log-bg { background: var(--log-bg); }
.sw-log-text { background: var(--log-text); }
.sw-log-dim { background: var(--log-dim); }
.sw-shadow-soft { background: var(--shadow-soft); }
.sw-shadow-deep { background: var(--shadow-deep); }
.sw-accent-glow { background: var(--accent-glow); }
.sw-grid-line { background: var(--grid-line); }
.sw-mask-solid { background: var(--mask-solid); }
.sw-clear { background: var(--clear); }
.type-display { font-family: var(--font-display); font-size: var(--size-h1); font-weight: var(--weight-display); line-height: 1.2; }
.button-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
@media (max-width: 1180px) { .hero-grid { column-gap: 36px; } .win-menu { gap: 12px; } }
@media (max-width: 960px) {
  .hero { padding-top: 16px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lead" "device" "more"; grid-template-rows: auto; row-gap: 32px; }
  .hero-lead { padding-top: 8px; }
  .h1-brand { font-size: 30px; }
  .h1-kw { font-size: 18px; }
  .device { margin: 0 14px 14px 0; }
  .device::before { transform: translate(14px, 14px); }
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-desc { margin-top: 0; }
  .feature-tabs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature-tabs > [role="tablist"] { position: static; flex-direction: row; align-items: center; overflow-x: auto; gap: 24px; padding: 4px; }
}
@media (max-width: 640px) {
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tab-panel { padding: 20px; }
  .feature-tabs > [role="tablist"] > [role="tab"] { font-size: 17px; }
}
@media (max-width: 560px) {
  .win-menu span:nth-child(n+3) { display: none; }
  .win-path { display: none; }
  .win-bar { gap: 10px; padding-inline: 12px; }
  .win-menu { gap: 8px; padding-left: 10px; font-size: 12px; }
  .win-body { padding: 14px; }
  .mods { gap: 12px 10px; }
  .mod-c { padding: 10px; font-size: 12px; }
  .fld-row { flex-wrap: wrap; }
  .rd { padding-inline: 0; gap: 5px; }
  .btn { min-height: 46px; padding-inline: 18px; font-size: 15px; }
  .dl-fab { right: 14px; bottom: 14px; }
  .client-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .dl-fab:hover { transform: none; } }