.tabs {
  min-width: 0;
}

.tab-list {
  display: flex;
  max-width: 100%;
  gap: 7px;
  margin: 0 0 28px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab-list [role="tab"] {
  min-height: 42px;
  flex: 1 0 auto;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink-muted);
  cursor: pointer;
  font-weight: 750;
}

.tab-list [role="tab"]:hover {
  color: var(--color-ink);
}

.tab-list [role="tab"][aria-selected="true"],
.tab-list [role="tab"].is-active {
  background: var(--color-brand);
  color: var(--color-white-text);
  box-shadow: var(--shadow-soft);
}

[role="tabpanel"][hidden] {
  display: none;
}

.tab-panel {
  min-width: 0;
}

.toc {
  position: relative;
  max-width: 100%;
  padding: 9px;
  overflow-x: auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: var(--color-panel);
  -webkit-overflow-scrolling: touch;
}

.toc-list {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--color-ink-muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.toc a:hover,
.toc a[aria-current="true"] {
  background: var(--color-canvas);
  color: var(--color-brand-deep);
}

.faq-list {
  border-top: 1px solid var(--color-line);
}

.faq-item {
  border-bottom: 1px solid var(--color-line);
}

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px;
  color: var(--color-ink);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-brand-soft);
  color: var(--color-brand-deep);
  font-size: 20px;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  max-width: 850px;
  padding: 0 48px 22px 4px;
  color: var(--color-ink-muted);
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.term-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: var(--color-canvas);
  color: var(--color-ink);
}

.term-card h3 {
  margin-bottom: 9px;
  font-size: 20px;
}

.term-card p {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: 14px;
}

.term-code {
  display: inline-flex;
  margin-bottom: 13px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-soft);
  color: var(--color-brand-deep);
  font: 700 11px/1.4 var(--font-mono);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.download-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xlarge);
  background: var(--color-canvas);
  color: var(--color-ink);
  box-shadow: var(--shadow-soft);
}

.download-card.is-featured {
  border-color: var(--color-brand-line);
  box-shadow: var(--shadow-lift);
}

.download-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.download-card-head > * {
  min-width: 0;
}

.client-logo {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.download-card h3 {
  font-size: 24px;
}

.download-card p {
  color: var(--color-ink-muted);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.client-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 5px 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
}

.client-badge-primary,
.client-badge-recommended {
  background: var(--color-brand);
  color: var(--color-white-text);
}

.client-badge-retired {
  border: 1px solid var(--color-line);
  background: var(--color-panel-strong);
  color: var(--color-ink);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: var(--color-canvas);
  color: var(--color-ink);
  text-decoration: none;
  transition: border-color var(--transition-main), transform var(--transition-main), box-shadow var(--transition-main);
}

.article-card:hover {
  border-color: var(--color-brand-line);
  color: var(--color-ink);
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 14px;
  color: var(--color-ink-muted);
  font-size: 12px;
}

.article-card h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.35;
}

.article-card p {
  margin: 0 0 18px;
  color: var(--color-ink-muted);
  font-size: 14px;
}

.article-card-more {
  margin-top: auto;
  color: var(--color-brand-deep);
  font-size: 13px;
  font-weight: 800;
}

.callout {
  position: relative;
  padding: 20px 22px 20px 54px;
  border: 1px solid var(--color-brand-line);
  border-radius: var(--radius-medium);
  background: var(--color-brand-soft);
  color: var(--color-ink);
}

.callout::before {
  content: "i";
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white-text);
  font: 800 13px/1 var(--font-display);
}

.callout-warning {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
  color: var(--color-ink);
}

.callout-warning::before {
  content: "!";
  background: var(--color-warning);
  color: var(--color-ink);
}

.callout-success {
  border-color: var(--color-positive);
  background: var(--color-positive-soft);
  color: var(--color-ink);
}

.callout-success::before {
  content: "✓";
  background: var(--color-positive);
  color: var(--color-white-text);
}

.callout > :last-child {
  margin-bottom: 0;
}

.end-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 48px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--color-brand-line);
  border-radius: var(--radius-xlarge);
  background: var(--color-panel);
  color: var(--color-ink);
}

.end-download-card h2,
.end-download-card h3 {
  margin-bottom: 8px;
}

.end-download-card p {
  margin: 0;
  color: var(--color-ink-muted);
}

.dl-fab {
  position: fixed;
  z-index: 80;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  max-width: min(330px, calc(100vw - 32px));
  align-items: center;
  gap: 12px;
  padding: 11px 17px 11px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-dark-surface);
  color: var(--color-white-text);
  box-shadow: var(--shadow-pill);
  text-decoration: none;
}

.dl-fab:hover {
  color: var(--color-white-text);
  transform: translateY(-2px);
}

.dl-fab-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white-text);
}

.dl-fab-icon svg {
  width: 18px;
  height: 18px;
}

.dl-fab-copy {
  min-width: 0;
  line-height: 1.3;
}

.dl-fab-copy strong {
  display: block;
  color: var(--color-white-text);
  font-size: 13px;
}

.dl-fab-copy span {
  display: block;
  color: var(--color-dark-muted);
  font-size: 11px;
}

.preview-hero {
  position: relative;
  padding: 40px var(--gutter) 26px;
  background: var(--color-canvas);
  color: var(--color-ink);
}

.preview-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 360px at 29% 4%, var(--color-amber-glow), transparent 64%),
    radial-gradient(600px 350px at 71% 2%, var(--color-magenta-glow), transparent 64%),
    radial-gradient(1020px 560px at 50% 74%, var(--color-blue-glow), transparent 68%),
    radial-gradient(460px 320px at 4% 58%, var(--color-blue-glow-soft), transparent 70%),
    radial-gradient(420px 300px at 97% 46%, var(--color-magenta-glow), transparent 72%);
}

.preview-hero-inner {
  position: relative;
  max-width: 1200px;
  margin-inline: auto;
  text-align: center;
}

.preview-hero h1 {
  font-size: clamp(34px, 3.3vw, 46px);
  letter-spacing: -.018em;
}

.h1-line {
  display: block;
}

.h1-line + .h1-line {
  margin-top: 4px;
}

.gradient-word {
  background: var(--gradient-highlight);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.preview-hero-sub {
  max-width: 730px;
  margin: 22px auto 0;
  color: var(--color-ink-muted);
  font-size: 16px;
  line-height: 1.75;
}

.preview-hero-actions {
  justify-content: center;
  margin-top: 28px;
}

.client-stage {
  position: relative;
  width: min(1060px, 100%);
  height: 442px;
  margin: 34px auto 0;
}

.stage-outline {
  position: absolute;
  z-index: 0;
  border: 1.5px solid var(--color-brand-line);
  border-radius: 32px;
  pointer-events: none;
}

.stage-outline-a {
  top: 44px;
  left: -34px;
  width: 310px;
  height: 214px;
  transform: rotate(-5deg);
}

.stage-outline-b {
  top: -18px;
  right: -54px;
  width: 344px;
  height: 240px;
  transform: rotate(4deg);
}

.stage-outline-c {
  right: 104px;
  bottom: -2px;
  width: 224px;
  height: 150px;
  transform: rotate(-2deg);
}

.desktop-shadow {
  position: absolute;
  z-index: 1;
  bottom: 8px;
  left: 50%;
  width: 640px;
  height: 56px;
  margin-left: -290px;
  background: radial-gradient(50% 50% at 50% 50%, var(--color-shadow-contact), transparent 72%);
  filter: blur(16px);
}

.phone-shadow {
  position: absolute;
  z-index: 4;
  bottom: 2px;
  left: 104px;
  width: 210px;
  height: 34px;
  background: radial-gradient(50% 50% at 50% 50%, var(--color-shadow-contact-deep), transparent 70%);
  filter: blur(10px);
}

.desktop-client {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 50%;
  width: 780px;
  margin-left: -360px;
  overflow: hidden;
  border: 1px solid var(--color-brand-line);
  border-radius: var(--radius-xlarge);
  background: var(--color-canvas);
  color: var(--color-ink);
  box-shadow: var(--shadow-lift);
  transform: rotate(1.2deg);
}

.window-bar {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-panel);
  color: var(--color-ink);
}

.window-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.window-dot-red {
  background: var(--color-negative);
}

.window-dot-yellow {
  background: var(--color-warning);
}

.window-dot-green {
  background: var(--color-positive);
}

.window-title {
  margin-left: 7px;
  font-size: 13px;
  font-weight: 800;
}

.window-search {
  display: flex;
  width: 216px;
  height: 28px;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
  color: var(--color-ink-muted);
  font-size: 12px;
}

.window-search svg {
  width: 12px;
  height: 12px;
}

.desktop-body {
  display: flex;
  min-height: 344px;
}

.desktop-sidebar {
  display: flex;
  width: 206px;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 14px 12px 12px;
  border-right: 1px solid var(--color-line);
  background: var(--color-panel);
  color: var(--color-ink);
}

.sidebar-label {
  padding: 0 10px 10px;
  color: var(--color-ink-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-medium);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-item svg {
  width: 15px;
  height: 15px;
  color: var(--color-ink-muted);
}

.sidebar-item.is-current {
  background: var(--color-brand);
  color: var(--color-white-text);
  box-shadow: var(--shadow-soft);
}

.sidebar-item.is-current svg {
  color: var(--color-white-text);
}

.sidebar-add {
  margin-top: auto;
  padding: 10px 12px;
  color: var(--color-brand-deep);
  font-size: 13px;
  font-weight: 750;
}

.desktop-main {
  flex: 1;
  padding: 14px 20px 16px;
}

.mock-tabs {
  display: flex;
  gap: 8px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--color-line);
}

.mock-tab {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--color-ink-muted);
  font-size: 12px;
  font-weight: 750;
}

.mock-tab.is-current {
  background: var(--color-brand-soft);
  color: var(--color-brand-deep);
}

.current-node {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
  color: var(--color-ink);
  text-align: left;
}

.current-node .status-dot {
  box-shadow: 0 0 0 4px var(--color-positive-soft);
}

.node-copy {
  display: grid;
}

.node-name {
  font: 750 13px/1.3 var(--font-mono);
}

.node-detail {
  color: var(--color-ink-muted);
  font-size: 11px;
}

.protocol-chip {
  margin-left: auto;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--gradient-highlight);
  color: var(--color-white-text);
  font: 800 10px/1.4 var(--font-mono);
}

.node-state {
  color: var(--color-positive);
  font-size: 12px;
  font-weight: 800;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-name {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.setting-detail {
  display: block;
  margin-top: 2px;
  color: var(--color-ink-muted);
  font-size: 11px;
}

.setting-detail code {
  color: var(--color-brand-deep);
  font-family: var(--font-mono);
  overflow-wrap: anywhere;
}

.setting-control {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  color: var(--color-ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.setting-on {
  color: var(--color-positive);
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-panel-strong);
}

.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-canvas);
  box-shadow: var(--shadow-knob);
}

.toggle.is-on {
  border-color: var(--color-brand);
  background: var(--color-brand);
}

.toggle.is-on::after {
  right: 2px;
  left: auto;
}

.phone-client {
  position: absolute;
  z-index: 5;
  top: 118px;
  left: 96px;
  width: 196px;
  overflow: hidden;
  border: 1px solid var(--color-brand-line);
  border-radius: 22px;
  background: var(--color-canvas);
  color: var(--color-ink);
  box-shadow: var(--shadow-float);
  transform: rotate(-3deg);
}

.phone-head,
.phone-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--color-line);
}

.phone-title {
  font-size: 13px;
  font-weight: 800;
}

.phone-menu {
  color: var(--color-ink-muted);
  letter-spacing: .12em;
}

.phone-list {
  padding: 8px 9px 6px;
}

.phone-row {
  margin-bottom: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-medium);
  text-align: left;
}

.phone-row.is-current {
  border-left: 3px solid var(--color-brand);
  background: var(--color-brand-soft);
  color: var(--color-ink);
}

.phone-node {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
}

.phone-protocol {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--color-brand-soft);
  color: var(--color-brand-deep);
  font: 700 9px/1.5 var(--font-mono);
}

.phone-row.is-current .phone-protocol {
  background: var(--color-canvas);
}

.phone-foot {
  padding: 10px 13px;
  border-top: 1px solid var(--color-line);
  background: var(--color-panel);
  color: var(--color-ink);
}

.phone-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-positive);
  font-size: 12px;
  font-weight: 800;
}

.phone-toggle {
  width: 34px;
  height: 19px;
}

.phone-toggle::after {
  width: 13px;
  height: 13px;
}

.update-pill {
  position: absolute;
  z-index: 7;
  top: -10px;
  right: 76px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-dark-surface);
  color: var(--color-white-text);
  box-shadow: var(--shadow-pill);
  font-size: 13px;
  font-weight: 800;
  transform: rotate(1.2deg);
}

.platform-row {
  position: relative;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 26px auto 0;
}

.platform-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.platform-chip:hover {
  border-color: var(--color-brand-line);
  background: var(--color-brand-soft);
  color: var(--color-brand-deep);
}

.platform-chip svg {
  width: 15px;
  height: 15px;
  color: var(--color-brand);
}

.preview-section {
  padding-top: 90px;
  padding-bottom: 90px;
}

.preview-section-header {
  max-width: 750px;
  margin-bottom: 40px;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.token-swatch {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: var(--color-canvas);
  color: var(--color-ink);
}

.token-color {
  height: 82px;
}

.token-color-canvas { background: var(--color-canvas); }
.token-color-panel { background: var(--color-panel); }
.token-color-panel-strong { background: var(--color-panel-strong); }
.token-color-line { background: var(--color-line); }
.token-color-brand { background: var(--color-brand); }
.token-color-brand-deep { background: var(--color-brand-deep); }
.token-color-ink { background: var(--color-ink); }
.token-color-muted { background: var(--color-ink-muted); }
.token-color-positive { background: var(--color-positive); }
.token-color-warning { background: var(--color-warning); }
.token-color-negative { background: var(--color-negative); }
.token-color-magenta { background: var(--color-magenta); }

.token-label {
  display: grid;
  gap: 2px;
  padding: 12px;
  font-size: 12px;
}

.token-label code {
  color: var(--color-brand-deep);
  overflow-wrap: anywhere;
}

.type-sample {
  padding-block: 22px;
  border-bottom: 1px solid var(--color-line);
}

.type-sample:last-child {
  border-bottom: 0;
}

.type-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-ink-muted);
  font: 700 11px/1.4 var(--font-mono);
}

.preview-footer {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .client-stage {
    height: 392px;
    transform: scale(.84);
    transform-origin: top center;
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .token-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .term-grid,
  .download-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .preview-hero {
    padding-top: 36px;
  }

  .preview-hero h1 {
    font-size: clamp(24px, 7.6vw, 30px);
  }

  .client-stage {
    width: 780px;
    max-width: none;
    height: 344px;
    margin-left: 50%;
    transform: translateX(-50%) scale(.68);
    transform-origin: top center;
  }

  .platform-row {
    margin-top: -14px;
  }

  .token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .end-download-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .client-stage {
    height: 305px;
    transform: translateX(-50%) scale(.58);
  }

  .stage-outline-a,
  .stage-outline-b,
  .stage-outline-c,
  .desktop-client,
  .phone-client,
  .update-pill {
    transform: none;
  }

  .preview-hero-sub {
    font-size: 15px;
  }

  .platform-row {
    gap: 7px;
  }

  .platform-chip {
    padding-inline: 11px;
    font-size: 12px;
  }

  .token-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dl-fab-copy span {
    display: none;
  }
}

@media (max-width: 380px) {
  .client-stage {
    height: 278px;
    transform: translateX(-50%) scale(.52);
  }

  .platform-chip {
    flex: 1 1 42%;
    justify-content: center;
  }

  .token-grid {
    grid-template-columns: 1fr;
  }
}