.hero { min-height: calc(100svh - var(--nav-h)); display: grid; align-content: center; padding-top: 28px; padding-bottom: 28px; }
.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: 44fr 56fr;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 52% 62% at 74% -6%,var(--halo-blue),var(--clear) 70%),
    radial-gradient(ellipse 40% 55% at 104% 26%,var(--halo-wine),var(--clear) 72%),
    linear-gradient(180deg,var(--hero-gloss),var(--clear) 38%),var(--bg-hero);
  color: var(--text);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 52px 28px 44px 64px; }
.tagline { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: 30px; padding: 4px 14px 4px 11px; margin: 0; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text-muted); box-shadow: var(--shadow-xs); font-size: 13px; }
.dot-live { flex-shrink: 0; width: 8px; height: 8px; border-radius: var(--r-round); background: var(--success); color: var(--text); box-shadow: 0 0 0 4px var(--success-ring); }
.tagline b { color: var(--text); }
.hero h1 { margin: 26px 0 0; font-size: var(--h1-size); line-height: 1.12; }
.hero h1 > span { display: block; }
.hero h1 .h1-sub { color: var(--text-muted); }
.lead { margin: 20px 0 0; max-width: 31em; font-size: 16.5px; line-height: 1.7; color: var(--text-muted); }
.lead strong { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chips li, .badge, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.badge-first { background: var(--accent); color: var(--bg-panel); border-color: var(--accent); }
.badge-recommended { background: var(--accent-ring); color: var(--accent-dark); border-color: var(--clear); }
.badge-archived { background: var(--bg-panel-2); color: var(--text-muted); }
.badge-warning { background: var(--bg-panel); color: var(--warn-text); border-color: var(--warn); }
.platforms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 32px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid var(--border); }
.platforms a { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: inherit; transition: color var(--duration); }
.platforms a:hover { color: var(--accent); }
.platforms svg { width: 16px; height: 16px; flex-shrink: 0; display: block; }
.hero-stage { position: relative; display: grid; align-items: center; padding: 24px 28px 24px 0; }
.device { position: relative; width: 100%; aspect-ratio: 760/620; }
.device::before { content: ""; position: absolute; inset: -6% -8% -6% -4%; background-image: linear-gradient(var(--grid-line) 1px,var(--clear) 1px),linear-gradient(90deg,var(--grid-line) 1px,var(--clear) 1px); background-size: 38px 38px; mask-image: radial-gradient(closest-side,var(--text) 52%,var(--clear)); }
.core { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.face-top { fill: var(--accent); fill-opacity: .045; }
.face-left { fill: var(--accent); fill-opacity: .022; }
.face-right { fill: var(--accent); fill-opacity: .07; }
.grid-ln { fill: none; stroke: var(--accent); stroke-opacity: .2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.edge { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.edge-hidden { fill: none; stroke: var(--accent); stroke-opacity: .5; stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.halo-1 { fill: var(--accent); fill-opacity: .07; }
.halo-2 { fill: var(--accent); fill-opacity: .04; }
.halo-ring { fill: none; stroke: var(--accent); stroke-opacity: .22; stroke-width: 1; vector-effect: non-scaling-stroke; }
.node { fill: var(--bg-panel); stroke: var(--border); stroke-width: 1; filter: var(--node-shadow); }
.track { fill: none; stroke: var(--accent); stroke-opacity: .2; stroke-width: 1; vector-effect: non-scaling-stroke; }
.flow { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 6 6; stroke-linecap: round; animation: flow-opacity 6s ease-in-out infinite; }
.conn { fill: none; stroke: var(--text-muted); stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.lbl { font-family: var(--font-mono); font-size: 12px; fill: var(--text-muted); }
.cube-body { animation: cube-breathe 8s ease-in-out infinite; }
.fc { position: absolute; z-index: 2; background: var(--bg-panel); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 14px 12px; white-space: nowrap; animation: card-breathe 8s ease-in-out infinite; }
.fc-far { box-shadow: var(--shadow-far); }
.fc-near { box-shadow: var(--shadow-near); }
.fc-1 { left: 2%; top: 9%; animation-delay: -2s; }
.fc-2 { left: 4%; top: 76%; animation-delay: -4s; }
.fc-3 { right: 3%; top: 4%; animation-delay: -1s; }
.fc-4 { left: 58%; top: 78%; animation-delay: -6s; }
.fc-head { display: flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.fc-code { margin: 6px 0 0; font-family: var(--font-mono); font-size: 12px; line-height: 1.55; color: var(--text); }
.k { color: var(--text-muted); }
.v-proxy { color: var(--accent); }
.v-direct { color: var(--success-text); }
.v-on { color: var(--accent-dark); }
.fc-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.seg { display: inline-flex; margin-top: 9px; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--bg-panel-2); color: var(--text-muted); }
.seg span { padding: 3px 12px; border-radius: var(--r-xs); font-size: 12px; }
.seg .on { background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-xs); }
.switch { position: relative; display: inline-block; flex-shrink: 0; width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--accent); color: var(--bg-panel); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: var(--r-round); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-xs); transform: translateX(14px); }
.exit { position: absolute; z-index: 2; left: 83.7%; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px 0 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-far); font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em; transform: translateY(-50%); white-space: nowrap; }
.exit i { width: 7px; height: 7px; border-radius: var(--r-round); flex-shrink: 0; }
.exit-direct { top: 35.8%; }
.exit-direct i { background: var(--success); color: var(--text); box-shadow: 0 0 0 3px var(--success-ring); }
.exit-proxy { top: 50%; }
.exit-proxy i { background: var(--accent); color: var(--bg-panel); box-shadow: 0 0 0 3px var(--accent-ring); }
.exit-reject { top: 64.2%; }
.exit-reject i { background: var(--wine); color: var(--bg-panel); box-shadow: 0 0 0 3px var(--halo-wine); }
.facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 16px 0 0; padding: 0; list-style: none; border-block: 1px solid var(--border); font-family: var(--font-mono); font-size: 12.5px; }
.facts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 20px; color: var(--text-muted); min-width: 0; }
.facts li + li { border-left: 1px solid var(--border); }
.facts b { color: var(--text); }
@keyframes cube-breathe { 0%,100% { transform: translateY(-6px); } 50% { transform: translateY(6px); } }
@keyframes card-breathe { 0%,100% { transform: translateY(-4px); } 50% { transform: translateY(4px); } }
@keyframes flow-opacity { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

.tab-set { min-width: 0; }
.tab-rail, [role="tablist"].tab-rail { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.tab-rail [role="tab"] { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 0; background: var(--clear); color: var(--text-muted); font-size: 14px; }
.tab-rail [role="tab"]::after { content: ""; position: absolute; inset: auto 20px -1px; height: 2px; background: var(--accent); color: var(--bg-panel); transform: scaleX(0); transition: transform var(--duration); }
.tab-rail [aria-selected="true"] { color: var(--accent-dark); }
.tab-rail [aria-selected="true"]::after { transform: scaleX(1); }
[role="tabpanel"]:not([hidden]) { animation: panel-in .3s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toc { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 10; display: flex; gap: 8px; overflow-x: auto; max-width: 100%; padding: 10px; margin-block: 24px 36px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-far); }
.toc a { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm); font-size: 14px; }
.toc a:hover { background: var(--bg); color: var(--accent-dark); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; padding: 22px 34px 22px 0; cursor: pointer; list-style: none; font-size: 17px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 22px; color: var(--accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 24px 24px 0; color: var(--text-muted); }
.faq-answer p:last-child { margin-bottom: 0; }
.term-card { position: relative; padding-top: 30px; }
.term-card::before { content: ""; position: absolute; top: 0; left: 28px; width: 36px; height: 2px; background: var(--accent); color: var(--bg-panel); }
.term-card .term-en { display: block; color: var(--text-muted); font: 12px/1.6 var(--font-mono); margin-bottom: 16px; }
.client-card { display: flex; flex-direction: column; gap: 20px; }
.client-head { display: flex; align-items: center; gap: 16px; }
.client-head img { width: 56px; height: 56px; flex-shrink: 0; }
.client-head h3 { margin-bottom: 6px; }
.client-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
[data-rev]:empty { display: none; }
.client-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.post-card { display: flex; flex-direction: column; gap: 18px; }
.post-card h3 { margin: 0; font-size: 21px; }
.post-card p { color: var(--text-muted); font-size: 14px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.post-card .post-link { margin-top: auto; color: var(--accent-dark); font-size: 14px; }
.callout { margin: 28px 0; padding: 22px 26px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-warning { border-left-color: var(--warn); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-panel); color: var(--text); text-align: left; font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td { min-width: 7em; padding: 16px 20px; border-bottom: 1px solid var(--border); overflow-wrap: normal; word-break: normal; }
.data-table th, .prose table th { background: var(--bg-hero); 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;
}
.article-body table th, .article-body table td { min-width: 7em; padding: 16px 20px; overflow-wrap: normal; word-break: normal; border-bottom: 1px solid var(--border); }
.dl-fab { position: fixed; right: max(var(--gutter),env(safe-area-inset-right)); bottom: max(24px,env(safe-area-inset-bottom)); z-index: 25; display: inline-flex; align-items: center; justify-content: center; gap: 12px; max-width: calc(100% - var(--gutter) * 2); min-height: 56px; padding: 12px 22px; border: 1px solid var(--accent); border-radius: var(--r-pill); background: var(--accent); color: var(--bg-panel); box-shadow: var(--shadow-btn); font-size: 14px; }
.dl-fab:hover { background: var(--accent-dark); color: var(--bg-panel); }
.dl-fab svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; }
.article-download { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 28px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-far); }
.article-download h2 { font-size: 23px; margin: 0 0 8px; }
.article-download p { margin: 0; color: var(--text-muted); }
.feature-layout { display: grid; grid-template-columns: 46fr 54fr; gap: 64px; align-items: center; }
.feature-list { display: flex; flex-direction: column; }
.feature-entry { border-bottom: 1px solid var(--border); }
.feature-entry > [role="tab"] { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 78px; padding: 22px 24px; border: 0; background: var(--clear); color: var(--text); text-align: left; font-family: var(--font-display); font-size: 21px; font-weight: var(--weight-regular); }
.feature-entry > [role="tab"] svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.3; flex-shrink: 0; }
.chevron { margin-left: auto; font-size: 18px; flex-shrink: 0; }
.feature-entry:has([aria-selected="true"]) { border-radius: var(--r-md); background: var(--wine); color: var(--bg-panel); border-bottom-color: var(--clear); }
.feature-entry > [aria-selected="true"] { color: var(--bg-panel); }
.feature-description { padding: 0 24px 28px 64px; color: var(--bg-panel); font-size: 14px; line-height: 1.85; }
.feature-description p { margin-bottom: 22px; }
.circle-link { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--r-round); background: var(--bg-panel); color: var(--wine); }
.grid-canvas { position: relative; min-height: 490px; border-radius: var(--r-md); background: linear-gradient(var(--grid-line) 1px,var(--clear) 1px),linear-gradient(90deg,var(--grid-line) 1px,var(--clear) 1px); background-size: 38px 38px; color: var(--text); padding: 48px 32px; }
.diagram-code { position: relative; width: 86%; margin: 0; z-index: 1; background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow-far); }
.diagram-settings { position: relative; z-index: 2; width: 78%; margin: -10px 0 0 auto; padding: 24px; box-shadow: var(--shadow-near); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.swatches { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.swatch { padding: 0; overflow: hidden; }
.swatch-sample { display: block; height: 80px; border-bottom: 1px solid var(--border); }
.swatch code { display: block; padding: 14px; font-size: 12px; }
.sw-bg { background: var(--bg); color: var(--text); }
.sw-panel { background: var(--bg-panel); color: var(--text); }
.sw-panel2 { background: var(--bg-panel-2); color: var(--text); }
.sw-hero { background: var(--bg-hero); color: var(--text); }
.sw-border { background: var(--border); color: var(--text); }
.sw-accent { background: var(--accent); color: var(--bg-panel); }
.sw-dark { background: var(--accent-dark); color: var(--bg-panel); }
.sw-wine { background: var(--wine); color: var(--bg-panel); }
.sw-text { background: var(--text); color: var(--bg-panel); }
.sw-muted { background: var(--text-muted); color: var(--bg-panel); }
.sw-success { background: var(--success); color: var(--text); }
.sw-warn { background: var(--warn); color: var(--text); }
.sw-error { background: var(--error); color: var(--bg-panel); }
.sw-blue-halo { background: var(--halo-blue); color: var(--text); }
.sw-wine-halo { background: var(--halo-wine); color: var(--text); }
.sw-grid { background: var(--grid-line); color: var(--text); }
.token-list { columns: 2; padding-left: 20px; font-size: 13px; color: var(--text-muted); }
.token-list li { break-inside: avoid; margin-bottom: 10px; }
.preview-button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
@media (max-width: 1180px) {
  .hero-copy { padding-left: 44px; }
  .feature-layout { gap: 32px; }
}
@media (max-width: 1024px) {
  .hero-panel { grid-template-columns: minmax(0,1fr); }
  .hero-copy { padding: 44px 36px 8px; }
  .hero-stage { padding: 8px 24px 32px; }
  .device { max-width: 720px; margin-inline: auto; }
  .facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--border); }
  .feature-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  .hero-copy { padding: 32px 22px 4px; }
  .lead { font-size: 15.5px; }
  .fc { padding: 8px 10px; }
  .fc-code { font-size: 10px; }
  .fc-head { font-size: 9.5px; }
  .seg span { padding: 2px 7px; font-size: 10px; }
  .exit { font-size: 10px; height: 22px; padding-inline: 8px; }
  .platforms { gap: 10px 18px; }
  .swatches { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .hero-stage { padding: 16px 12px 24px; }
  .fc { padding: 6px; }
  .fc-code { font-size: 6.8px; }
  .fc-head { font-size: 7px; }
  .fc-3 { right: 2%; }
  .fc-4 { left: 59%; }
  .seg span { font-size: 7px; padding: 2px 5px; }
  .fc .switch { width: 26px; height: 16px; }
  .fc .switch::after { width: 10px; height: 10px; transform: translateX(10px); }
  .exit { font-size: 7px; gap: 4px; padding-inline: 5px; height: 20px; }
  .exit i { width: 4px; height: 4px; }
  .facts li { padding-inline: 10px; font-size: 10px; }
  .grid-canvas { min-height: 420px; padding: 32px 16px; }
  .diagram-code { width: 96%; padding: 16px; font-size: 11px; }
  .diagram-settings { width: 90%; padding: 16px; }
  .feature-entry > [role="tab"] { padding-inline: 16px; font-size: 18px; }
  .feature-description { padding-left: 24px; }
  .token-list { columns: 1; }
}