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

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

.tab-button {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--color-text);
}

.tab-button[aria-selected="true"],
.tab-button.is-active {
  border-color: var(--color-accent);
  background: var(--color-panel-raised);
  color: var(--color-text);
  box-shadow: inset 0 0 12px var(--color-accent-soft);
}

.tab-panel {
  padding-top: 28px;
}

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

.toc {
  display: flex;
  max-width: 100%;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  scrollbar-width: thin;
}

.toc a {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  white-space: nowrap;
}

.toc a:hover {
  background: var(--color-panel-raised);
  color: var(--color-text);
}

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

.faq-item {
  overflow: clip;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  color: var(--color-text);
}

.faq-item[open] {
  border-color: var(--color-accent-dark);
}

.faq-item summary {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 21px;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-muted);
  border-bottom: 1px solid var(--color-muted);
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 180ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.faq-answer {
  padding: 0 21px 20px;
  color: var(--color-muted);
}

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

.term-card {
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  color: var(--color-text);
  transition: border-color 180ms ease, transform 180ms ease;
}

.term-card:hover {
  border-color: var(--color-accent-dark);
  transform: translateY(-2px);
}

.term-card dt {
  margin-bottom: 9px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 16px;
}

.term-card dd {
  margin: 0;
  color: var(--color-muted);
}

.client-grid {
  display: grid;
  gap: 22px;
}

.client-card {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  color: var(--color-text);
}

.client-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.client-card__identity {
  display: flex;
  align-items: center;
  gap: 15px;
}

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

.client-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 29px;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel-raised);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
}

.badge::before {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-muted);
  content: "";
}

.badge-primary {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.badge-primary::before {
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
}

.badge-recommended {
  border-color: var(--color-success);
  color: var(--color-text);
}

.badge-recommended::before {
  background: var(--color-success);
}

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

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

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

.article-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  color: var(--color-text);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.article-card:hover {
  border-color: var(--color-accent-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.article-card h3 {
  margin-bottom: 12px;
}

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

.article-card__more {
  margin-top: auto;
  padding-top: 18px;
  color: var(--color-accent);
}

.callout {
  position: relative;
  margin-block: 24px;
  padding: 20px 22px 20px 52px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-lg);
  background: var(--color-panel-raised);
  color: var(--color-text);
}

.callout::before {
  position: absolute;
  top: 22px;
  left: 21px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent);
  content: "";
}

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

.callout-warning {
  border-color: var(--color-warn);
}

.callout-warning::before {
  background: var(--color-warn);
  box-shadow: none;
}

.callout-error {
  border-color: var(--color-error);
}

.callout-error::before {
  background: var(--color-error);
  box-shadow: none;
}

.dl-fab {
  position: fixed;
  right: max(18px, var(--gutter));
  bottom: 20px;
  z-index: 80;
  display: flex;
  max-width: min(330px, calc(100vw - 32px));
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.dl-fab__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-md);
  background: var(--color-panel-raised);
  color: var(--color-accent);
}

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

.dl-fab__text {
  display: grid;
  line-height: 1.35;
}

.dl-fab__text small {
  color: var(--color-muted);
}

.end-download-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 56px;
  padding: 28px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-xl);
  background: var(--color-panel);
  color: var(--color-text);
}

.preview-hero {
  padding-top: 42px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  padding: 7px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

.hero-kicker::before {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  content: "";
}

.preview-hero .lede {
  margin: 18px auto 0;
}

.preview-hero .button-row {
  justify-content: center;
  margin-top: 30px;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.platform-list a,
.platform-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-muted);
  font-size: 13px;
}

.platform-list svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.orbit-rig {
  position: relative;
  width: min(940px, 100%);
  height: 430px;
  margin: 14px auto 0;
}

.orbit-rig__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, 80%);
  height: 340px;
  background: radial-gradient(closest-side, var(--color-accent-soft), var(--color-accent-clear) 78%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: rig-breathe 8s ease-in-out infinite alternate;
}

.orbit-rig__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.orbit-rig__ring ellipse {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 1;
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  max-width: calc(100% - 40px);
  padding: 26px 30px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--color-panel-raised), var(--color-panel));
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  text-align: left;
  transform: translate(-50%, -50%);
}

.orbit-core__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 20px;
}

.orbit-core__head::before {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px var(--color-accent);
  content: "";
}

.orbit-core__line {
  height: 1px;
  margin: 16px 0 13px;
  background: var(--color-border);
}

.orbit-core__meta {
  margin: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2;
}

.orbit-chip {
  position: absolute;
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.orbit-chip--top {
  top: 40px;
  left: 50%;
}

.orbit-chip--right-one {
  top: 161px;
  left: 92.45%;
}

.orbit-chip--right-two {
  top: 357px;
  left: 76.28%;
}

.orbit-chip--left-two {
  top: 357px;
  left: 23.72%;
}

.orbit-chip--left-one {
  top: 161px;
  left: 7.55%;
}

.orbit-runner {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent), 0 0 30px var(--color-accent-glow-strong);
  offset-path: path("M470,40 A420,175 0 1 1 469.9,40");
  offset-rotate: 0deg;
  animation: orbit-run 26s linear infinite;
}

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

.swatch {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-panel);
  color: var(--color-text);
}

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

.swatch__meta {
  padding: 13px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

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

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

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

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

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

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

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

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

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

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

@keyframes orbit-run {
  from {
    offset-distance: 0%;
  }

  to {
    offset-distance: 100%;
  }
}

@keyframes rig-breathe {
  from {
    opacity: 0.62;
  }

  to {
    opacity: 1;
  }
}

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

  .orbit-rig {
    height: 350px;
  }

  .orbit-rig__ring {
    left: 50%;
    width: 760px;
    max-width: none;
    transform: translateX(-50%);
  }

  .orbit-chip--right-one,
  .orbit-chip--left-one {
    display: none;
  }

  .orbit-chip--right-two {
    top: 310px;
    left: 76%;
  }

  .orbit-chip--left-two {
    top: 310px;
    left: 24%;
  }

  .orbit-chip--top {
    top: 28px;
  }

  .orbit-runner {
    display: none;
  }

  .end-download-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .orbit-chip--left-two,
  .orbit-chip--right-two {
    display: none;
  }

  .client-card__head {
    flex-direction: column;
  }

  .dl-fab {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-runner,
  .orbit-rig__glow {
    animation: none;
  }

  .orbit-runner {
    offset-distance: 0%;
  }
}