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

.tab-list {
  max-width: 100%;
  display: flex;
  gap: 4px;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
  scrollbar-width: thin;
}

.tab-list [role="tab"] {
  min-height: 44px;
  flex: 1 0 auto;
  padding: 9px 18px;
  border: 1px solid var(--color-transparent);
  border-radius: var(--radius-xs);
  background: var(--color-transparent);
  color: var(--color-text-muted);
  font-weight: 750;
  white-space: nowrap;
}

.tab-list [role="tab"]:hover {
  background: var(--color-accent-05);
  color: var(--color-text);
}

.tab-list [role="tab"][aria-selected="true"] {
  border-color: var(--color-accent-36);
  background: var(--color-accent-14);
  color: var(--color-accent);
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.tab-panel {
  min-width: 0;
  margin-top: 18px;
}

.tab-panel[hidden] {
  display: none;
}

.toc {
  position: relative;
  max-width: 100%;
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--color-accent-18);
  border-bottom: 1px solid var(--color-accent-10);
  background: var(--color-bg-panel);
  scrollbar-width: thin;
}

.toc a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 8px 13px;
  border-left: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.toc a:hover,
.toc a[aria-current="location"] {
  background: var(--color-accent-08);
  color: var(--color-accent);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border);
  background:
    linear-gradient(90deg, var(--color-accent-05), var(--color-transparent) 44%),
    var(--color-bg-panel);
}

.faq-item summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
  cursor: pointer;
  color: var(--color-text);
  font-weight: 760;
  list-style: none;
}

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

.faq-item summary::before {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  content: "";
  border: 1px solid var(--color-accent);
  background: var(--color-accent-10);
  transform: rotate(45deg);
  transition: background-color 180ms ease;
}

.faq-item[open] summary::before {
  background: var(--color-warn);
  border-color: var(--color-warn);
}

.faq-answer {
  padding: 0 18px 18px 40px;
  color: var(--color-text-muted);
}

.term-card {
  position: relative;
  min-width: 0;
  padding: 24px 24px 25px;
  overflow-x: clip;
  border: 1px solid var(--color-border);
  border-top-color: var(--color-accent-48);
  background: var(--color-bg-panel);
  box-shadow: inset 0 1px 0 var(--color-accent-10);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
}

.term-card::after {
  position: absolute;
  right: -24px;
  bottom: -40px;
  width: 110px;
  height: 110px;
  content: "";
  border: 1px solid var(--color-accent-14);
  border-radius: var(--radius-pill);
}

.term-name {
  margin-bottom: 9px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 15px;
}

.term-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.download-card {
  position: relative;
  min-width: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--color-border);
  background:
    linear-gradient(125deg, var(--color-accent-08), var(--color-transparent) 45%),
    var(--color-bg-panel);
  box-shadow: var(--shadow-panel);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

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

.download-card-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.download-card-title {
  min-width: 0;
  flex: 1;
}

.download-card-title h3 {
  margin-bottom: 5px;
}

.download-card-meta {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

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

.badge {
  min-height: 25px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid var(--color-accent-24);
  border-radius: var(--radius-pill);
  background: var(--color-accent-08);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.badge::before {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  content: "";
  border-radius: var(--radius-pill);
  background: currentColor;
}

.badge-primary {
  border-color: var(--color-warn-35);
  background: var(--color-warn-10);
  color: var(--color-warn);
}

.badge-recommended {
  border-color: var(--color-accent-36);
  background: var(--color-success-12);
  color: var(--color-success);
}

.badge-retired {
  border-color: var(--color-error);
  background: var(--color-error-12);
  color: var(--color-error);
}

.article-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(110px, 0.28fr) minmax(0, 1fr);
  border-top: 1px solid var(--color-border);
  background: linear-gradient(90deg, var(--color-accent-03), var(--color-transparent));
  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.article-card:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-05);
}

.article-card-meta {
  padding: 24px;
  border-right: 1px solid var(--color-accent-10);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.article-card-body {
  min-width: 0;
  padding: 24px 28px;
}

.article-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.article-card p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.callout {
  position: relative;
  margin: 26px 0;
  padding: 20px 22px 20px 25px;
  overflow-x: clip;
  border-left: 3px solid var(--color-accent);
  background:
    linear-gradient(90deg, var(--color-accent-10), var(--color-transparent)),
    var(--color-bg-panel);
  color: var(--color-text-muted);
}

.callout::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 1px;
  content: "";
  background: var(--color-accent);
  box-shadow: 0 0 16px var(--color-accent-48);
}

.callout-warn {
  border-left-color: var(--color-warn);
  background:
    linear-gradient(90deg, var(--color-warn-10), var(--color-transparent)),
    var(--color-bg-panel);
}

.callout-error {
  border-left-color: var(--color-error);
  background:
    linear-gradient(90deg, var(--color-error-12), var(--color-transparent)),
    var(--color-bg-panel);
}

.callout-title {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
  font-weight: 800;
}

.dl-fab {
  position: fixed;
  z-index: 70;
  right: max(18px, var(--gutter));
  bottom: 18px;
  max-width: min(310px, calc(100vw - (var(--gutter) * 2)));
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 11px;
  border: 1px solid var(--color-warn);
  border-radius: var(--radius-pill);
  background: var(--color-bg-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-panel), var(--shadow-warn);
}

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

.dl-fab-icon {
  width: 38px;
  height: 38px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-warn);
  color: var(--color-bg);
}

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

.dl-fab-copy {
  min-width: 0;
  display: grid;
  line-height: 1.35;
}

.dl-fab-copy strong {
  font-size: 13px;
}

.dl-fab-copy span {
  color: var(--color-text-muted);
  font-size: 10px;
}

.article-download-guide {
  margin-top: 58px;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--color-warn-35);
  background:
    linear-gradient(120deg, var(--color-warn-10), var(--color-transparent) 48%),
    var(--color-bg-panel);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}

.data-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  min-width: 620px;
}

.hero-preview {
  position: relative;
  height: 900px;
  min-height: 900px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 60% 68%, var(--color-accent-14), var(--color-transparent) 18%),
    radial-gradient(circle at 92% 15%, var(--color-accent-08), var(--color-transparent) 32%),
    linear-gradient(150deg, var(--color-bg) 0%, var(--color-bg-panel) 58%, var(--color-bg) 100%);
}

.hero-preview::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    var(--color-transparent) 0,
    var(--color-transparent) 4px,
    var(--color-accent-03) 5px
  );
}

.hero-preview::after {
  position: absolute;
  z-index: 12;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--color-bg-heavy), var(--color-transparent) 26%, var(--color-transparent) 82%, var(--color-bg-soft)),
    linear-gradient(180deg, var(--color-transparent) 70%, var(--color-bg-heavy));
}

.hero-tunnel {
  position: absolute;
  z-index: 1;
  inset: 72px 0 0;
  width: 100%;
  height: calc(100% - 72px);
  color: var(--color-accent);
}

.tunnel-line-soft {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.12;
  stroke-width: 1;
}

.tunnel-line-mid {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.28;
  stroke-width: 1.2;
}

.tunnel-line-bright {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.74;
  stroke-width: 1.5;
}

.tunnel-v-shadow {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.1;
  stroke-width: 48;
}

.tunnel-v-body {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.28;
  stroke-width: 13;
}

.tunnel-v-edge {
  fill: none;
  stroke: currentColor;
  stroke-opacity: 0.92;
  stroke-width: 2.4;
}

.tunnel-core-halo {
  fill: currentColor;
  opacity: 0.12;
  transform-origin: 820px 594px;
  animation: tunnel-breathe 3.8s var(--ease-smooth) infinite;
}

.tunnel-core-ring {
  fill: var(--color-bg-panel);
  stroke: currentColor;
  stroke-opacity: 0.68;
  stroke-width: 2;
}

.tunnel-core {
  fill: currentColor;
}

.hero-preview-content {
  position: relative;
  z-index: 15;
  height: 100%;
  padding-top: 132px;
  pointer-events: none;
}

.hero-preview-copy {
  width: min(630px, 58%);
  pointer-events: auto;
}

.hero-preview h1 {
  max-width: 700px;
  margin-bottom: 20px;
  text-shadow: 0 9px 38px var(--color-blackout);
}

.hero-preview-summary {
  max-width: 590px;
  color: var(--color-text-muted);
  font-size: 16px;
}

.hero-node-layer {
  position: absolute;
  z-index: 18;
  inset: 0;
  pointer-events: none;
}

.hero-download-node {
  position: absolute;
  right: max(22px, 4vw);
  width: 250px;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--color-accent-24);
  background:
    linear-gradient(120deg, var(--color-panel-glass), var(--color-panel-deep)),
    var(--color-bg-panel);
  box-shadow: var(--shadow-panel), inset 0 1px 0 var(--color-accent-10);
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
  pointer-events: auto;
}

.hero-download-node:nth-child(1) {
  top: 156px;
}

.hero-download-node:nth-child(2) {
  top: 264px;
  right: max(8px, 2vw);
}

.hero-download-node:nth-child(3) {
  top: 372px;
}

.hero-download-node:nth-child(4) {
  top: 480px;
  right: max(8px, 2vw);
}

.hero-download-node:hover {
  border-color: var(--color-warn);
}

.hero-node-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hero-node-icon {
  width: 32px;
  height: 32px;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--color-accent-24);
  color: var(--color-accent);
}

.hero-node-icon svg {
  width: 19px;
  height: 19px;
}

.hero-node-name {
  min-width: 0;
  flex: 1;
}

.hero-node-name strong {
  display: block;
  font-size: 13px;
}

.hero-node-name span {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.hero-node-action {
  padding: 6px 8px;
  border: 1px solid var(--color-warn-35);
  background: var(--color-warn-10);
  color: var(--color-warn);
  font-family: var(--font-mono);
  font-size: 9px;
}

.hero-node-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.platform-strip {
  position: absolute;
  z-index: 22;
  right: var(--gutter);
  bottom: 48px;
  left: var(--gutter);
  min-height: 82px;
  display: grid;
  grid-template-columns: 190px repeat(4, 1fr);
  border-top: 1px solid var(--color-accent-18);
  border-bottom: 1px solid var(--color-accent-10);
  background: linear-gradient(90deg, var(--color-bg-heavy), var(--color-panel-glass), var(--color-bg-heavy));
  box-shadow: 0 -16px 50px var(--color-shadow);
}

.platform-strip-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border-right: 1px solid var(--color-accent-14);
}

.platform-strip-intro span {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.platform-strip-intro strong {
  font-size: 14px;
}

.platform-link {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-right: 1px solid var(--color-accent-10);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 750;
}

.platform-link:last-child {
  border-right: 0;
}

.platform-link::after {
  position: absolute;
  right: 22%;
  bottom: -1px;
  left: 22%;
  height: 1px;
  content: "";
  background: var(--color-accent);
  box-shadow: 0 0 9px var(--color-accent-72);
}

.platform-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

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

.swatch {
  min-width: 0;
  border: 1px solid var(--color-border);
  background: var(--color-bg-panel);
}

.swatch-color {
  height: 74px;
  border-bottom: 1px solid var(--color-border);
}

.swatch-info {
  padding: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.swatch-bg .swatch-color {
  background: var(--color-bg);
}

.swatch-panel .swatch-color {
  background: var(--color-bg-panel);
}

.swatch-panel-2 .swatch-color {
  background: var(--color-bg-panel-2);
}

.swatch-border .swatch-color {
  background: var(--color-border);
}

.swatch-accent .swatch-color {
  background: var(--color-accent);
}

.swatch-accent-dark .swatch-color {
  background: var(--color-accent-dark);
}

.swatch-text .swatch-color {
  background: var(--color-text);
}

.swatch-muted .swatch-color {
  background: var(--color-text-muted);
}

.swatch-success .swatch-color {
  background: var(--color-success);
}

.swatch-warn .swatch-color {
  background: var(--color-warn);
}

.swatch-error .swatch-color {
  background: var(--color-error);
}

@keyframes tunnel-breathe {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(0.84);
  }

  50% {
    opacity: 0.22;
    transform: scale(1.16);
  }
}

@media (max-width: 900px) {
  .article-card {
    grid-template-columns: 1fr;
  }

  .article-card-meta {
    padding-bottom: 0;
    border-right: 0;
  }

  .hero-preview {
    height: auto;
    min-height: 940px;
  }

  .hero-preview-content {
    padding-top: 112px;
  }

  .hero-preview-copy {
    width: 100%;
    max-width: 640px;
  }

  .hero-node-layer {
    top: 430px;
    right: var(--gutter);
    left: var(--gutter);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
  }

  .hero-download-node,
  .hero-download-node:nth-child(1),
  .hero-download-node:nth-child(2),
  .hero-download-node:nth-child(3),
  .hero-download-node:nth-child(4) {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
  }

  .platform-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .platform-strip-intro {
    display: none;
  }

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

@media (max-width: 640px) {
  .faq-answer {
    padding-left: 18px;
  }

  .download-card-head {
    flex-wrap: wrap;
  }

  .download-actions .btn {
    width: 100%;
  }

  .dl-fab {
    right: var(--gutter);
    bottom: 12px;
    left: var(--gutter);
    max-width: none;
  }

  .hero-preview {
    min-height: 1060px;
  }

  .hero-preview-content {
    padding-top: 96px;
  }

  .hero-preview-summary {
    font-size: 14px;
  }

  .hero-node-layer {
    top: 500px;
    grid-template-columns: 1fr;
  }

  .hero-download-node {
    min-height: 72px;
  }

  .platform-strip {
    right: var(--gutter);
    bottom: 32px;
    left: var(--gutter);
    min-height: 66px;
  }

  .platform-link {
    min-height: 66px;
    flex-direction: column;
    gap: 3px;
    font-size: 10px;
  }

  .platform-link svg {
    width: 17px;
    height: 17px;
  }

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