.tabs {
  min-width: 0;
}

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

.tab-list [role="tab"] {
  display: inline-flex;
  min-width: max-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

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

.tab-list [role="tab"].active,
.tab-list [role="tab"][aria-selected="true"] {
  color: var(--color-accent-dark);
  background: var(--color-panel);
  box-shadow: var(--shadow-mini);
}

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

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

.toc {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  max-width: 100%;
  gap: 7px;
  margin-bottom: 40px;
  padding: 7px;
  overflow-x: auto;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-mini);
  overscroll-behavior-inline: contain;
}

.toc a {
  display: inline-flex;
  min-width: max-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  color: var(--color-muted);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 650;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--color-accent-dark);
  background: var(--color-panel-soft);
}

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

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

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  padding: 16px 54px 16px 20px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

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

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 10px;
  height: 10px;
  content: "";
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

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

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

.term-card {
  position: relative;
  padding: 26px;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.term-card::before {
  position: absolute;
  top: 26px;
  left: 0;
  width: 4px;
  height: 32px;
  content: "";
  background: var(--color-accent);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.term-card h3 {
  padding-left: 10px;
  font-size: 21px;
}

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

.client-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: clamp(22px, 3vw, 30px);
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.client-card__main {
  min-width: 0;
}

.client-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.client-card__head h3 {
  margin: 0;
  font-size: 22px;
}

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

.client-card__meta {
  color: var(--color-muted);
  font-size: 14px;
}

.client-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

[data-version] {
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

[data-version]:empty {
  display: none;
}

.badge,
.tag {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  overflow: hidden;
  color: var(--color-muted);
  background: var(--color-panel-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
}

.badge--primary,
.badge--recommended {
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border-color: var(--color-accent-ring);
}

.badge--warning {
  color: var(--color-text);
  background: var(--color-panel-soft);
  border-color: var(--color-warning);
}

.badge--stopped {
  color: var(--color-text);
  background: var(--color-panel-soft);
  border-color: var(--color-error);
}

.article-card {
  display: flex;
  min-height: 100%;
  padding: 26px;
  flex-direction: column;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

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

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--color-muted);
  font-size: 13px;
}

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

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

.article-card__link {
  margin-top: auto;
  color: var(--color-accent-dark);
  font-weight: 750;
}

.callout {
  position: relative;
  margin-block: 28px;
  padding: 20px 22px 20px 26px;
  color: var(--color-text);
  background: var(--color-panel-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.callout::before {
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 0;
  width: 4px;
  content: "";
  background: var(--color-accent);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.callout strong {
  display: block;
  margin-bottom: 5px;
}

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

.callout--warning::before {
  background: var(--color-warning);
}

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

.dl-fab {
  position: fixed;
  right: max(16px, calc((100vw - var(--header-width)) / 2));
  bottom: 18px;
  z-index: 80;
  display: inline-flex;
  max-width: min(320px, calc(100vw - 32px));
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px 10px 12px;
  color: var(--color-panel);
  background: var(--color-accent-dark);
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  font-weight: 750;
}

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

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

.end-download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  margin-top: 56px;
  padding: clamp(24px, 4vw, 38px);
  align-items: center;
  color: var(--color-text);
  background: var(--color-panel-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

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

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

.prose > .data-table {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.preview-hero {
  position: relative;
  min-height: calc(100svh - 48px);
  padding-top: var(--header-height);
  display: grid;
  align-content: center;
  overflow-x: clip;
  isolation: isolate;
}

.preview-hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    radial-gradient(60% 55% at 78% 18%, var(--color-field-mint), transparent 70%),
    radial-gradient(55% 60% at 22% 88%, var(--color-field-sky), transparent 72%),
    linear-gradient(135deg, var(--color-panel) 0%, var(--color-bg) 45%, var(--color-panel-soft) 100%);
}

.preview-hero__inner {
  display: grid;
  grid-template-columns: 46fr 54fr;
  column-gap: 48px;
  align-items: center;
  padding-top: 36px;
  padding-bottom: 48px;
}

.hero-copy {
  max-width: 560px;
}

.hero-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 12px;
  color: var(--color-muted);
  background: var(--color-panel-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.hero-pill__dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--color-accent);
  border-radius: 50%;
}

.hero-pill__dot::after {
  position: absolute;
  inset: -4px;
  content: "";
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  animation: hero-breathe 2.4s ease-out infinite;
}

@keyframes hero-breathe {
  0% {
    opacity: 0.7;
    transform: scale(0.55);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

.hero-copy h1 {
  margin-top: 22px;
  margin-bottom: 0;
}

.hero-copy h1 em {
  color: var(--color-accent-dark);
  font-style: normal;
}

.hero-lead {
  max-width: 520px;
  margin-top: 20px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-lead strong {
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-actions .button {
  min-height: 52px;
  padding-inline: 26px;
}

.platform-links {
  display: flex;
  margin-top: 34px;
  padding-top: 22px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--color-border);
}

.platform-links__label {
  margin-right: 8px;
  color: var(--color-muted);
  font-size: 13px;
}

.platform-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  color: var(--color-muted);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
}

.platform-links a:hover {
  color: var(--color-text);
  background: var(--color-panel-soft);
}

.platform-links svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero-stage {
  position: relative;
  width: 352px;
  padding-block: 18px;
  justify-self: center;
}

.phone-ui {
  position: relative;
  display: flex;
  width: 352px;
  aspect-ratio: 9 / 16;
  padding: 18px 20px 20px;
  flex-direction: column;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  transform: rotate(2deg);
}

.phone-ui::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 var(--color-white-line);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-muted);
  font: 12px var(--font-mono);
}

.phone-status__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-status svg {
  width: 25px;
  height: 12px;
}

.phone-head {
  margin-top: 22px;
}

.phone-head strong {
  display: block;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.phone-config {
  display: inline-flex;
  margin-top: 6px;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
  font-size: 12px;
}

.phone-config svg {
  width: 12px;
  height: 12px;
}

.phone-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.phone-tile {
  display: flex;
  height: 80px;
  padding: 13px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--color-text);
  background: var(--color-tile);
  border-radius: var(--radius-md);
}

.phone-tile--wide {
  grid-column: 1 / -1;
  height: 64px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.phone-tile svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-tile span {
  font-size: 13px;
  font-weight: 700;
}

.phone-start {
  display: flex;
  min-height: 52px;
  margin-top: auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-panel);
  background: var(--color-accent-dark);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.phone-start svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.tun-card {
  position: absolute;
  top: -4px;
  left: -78px;
  z-index: 2;
  width: 226px;
  padding: 14px 16px 8px;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-mini);
}

.tun-card__title {
  display: flex;
  gap: 8px;
  padding-bottom: 8px;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 750;
}

.tun-card__title svg,
.update-chip svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--color-accent-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.setting-row {
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.switch-on {
  position: relative;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}

.switch-on::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  content: "";
  background: var(--color-panel);
  border-radius: 50%;
}

.update-chip {
  position: absolute;
  right: -46px;
  bottom: 44px;
  z-index: 2;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  color: var(--color-text);
  background: var(--color-panel-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-mini);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.update-chip code {
  color: var(--color-accent-dark);
  font-size: 12px;
}

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

.swatch {
  padding: 12px;
  color: var(--color-text);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.swatch__color {
  height: 74px;
  margin-bottom: 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.swatch__color--bg { background: var(--color-bg); }
.swatch__color--panel { background: var(--color-panel); }
.swatch__color--soft { background: var(--color-panel-soft); }
.swatch__color--border { background: var(--color-border); }
.swatch__color--accent { background: var(--color-accent); }
.swatch__color--accent-dark { background: var(--color-accent-dark); }
.swatch__color--text { background: var(--color-text); }
.swatch__color--muted { background: var(--color-muted); }
.swatch__color--success { background: var(--color-success); }
.swatch__color--warning { background: var(--color-warning); }
.swatch__color--error { background: var(--color-error); }

.swatch code {
  display: block;
  color: var(--color-text);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .preview-hero__inner {
    grid-template-columns: 1fr;
    row-gap: 56px;
  }

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

  .hero-stage {
    margin-left: 80px;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .client-card,
  .end-download-card {
    grid-template-columns: 1fr;
  }

  .client-card__actions {
    justify-content: flex-start;
  }

  .toc {
    top: 8px;
  }

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

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

  .preview-hero__inner {
    padding-top: 26px;
    padding-bottom: 58px;
  }

  .hero-stage {
    width: 100%;
    max-width: 352px;
    margin-left: 0;
  }

  .phone-ui {
    width: 100%;
    transform: none;
  }

  .tun-card {
    left: -8px;
  }

  .update-chip {
    right: -8px;
  }
}

@media (max-width: 420px) {
  .swatches {
    grid-template-columns: 1fr;
  }

  .tun-card {
    display: none;
  }

  .update-chip {
    max-width: calc(100% + 8px);
    white-space: normal;
  }

  .platform-links__label {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pill__dot::after {
    animation: none;
    opacity: 0;
  }
}