:root {
  --component-track: #DEDAD0;
  --component-active: #171614;
  --component-info: #8FA6B8;
  --component-success: #77906B;
  --component-warning: #C6913F;
  --component-danger: #B0563F;
  --component-dark-text: #EDEAE1;
  --component-code-key: #C6913F;
  --component-code-string: #9FB491;
}

.tabs {
  min-width: 0;
}

.tab-list {
  display: flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
  padding: 0 0 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab-list [role='tab'] {
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 9px 17px;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 12px;
}

.tab-list [role='tab']:hover {
  background: var(--color-surface);
}

.tab-list [role='tab'][aria-selected='true'] {
  border-color: var(--component-active);
  background: var(--component-active);
  color: var(--color-canvas);
}

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

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

.toc {
  position: sticky;
  top: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: 20px;
  background: var(--color-surface);
  color: var(--color-ink);
}

.toc__title {
  margin-bottom: 12px;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc li + li {
  border-top: 1px solid var(--color-border);
}

.toc a {
  display: block;
  padding: 10px 2px;
  font-size: 14px;
}

.toc-horizontal {
  position: static;
  display: flex;
  max-width: 100%;
  gap: 8px;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  padding: 0 0 12px;
  background: var(--color-transparent);
  -webkit-overflow-scrolling: touch;
}

.toc-horizontal a {
  flex: 0 0 auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: var(--color-canvas);
  font-family: var(--font-mono);
  font-size: 12px;
}

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

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

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 44px 17px 0;
  color: var(--color-ink);
  font-weight: 700;
  list-style: none;
}

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

.faq-item summary::after {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-ink-soft);
  content: '+';
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 400;
  line-height: 21px;
  text-align: center;
}

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

.faq-answer {
  max-width: 820px;
  padding: 0 44px 22px 0;
  color: var(--color-ink-soft);
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.term-card {
  min-height: 190px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: 24px;
  background: var(--color-surface);
  color: var(--color-ink);
}

.term-card__name {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.term-card__name h3 {
  margin: 0;
  font-size: 19px;
}

.term-card__code {
  border-radius: var(--radius-small);
  padding: 5px 8px;
  background: var(--color-mist);
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 20px;
}

.download-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: clamp(22px, 3vw, 32px);
  background: var(--color-surface);
  color: var(--color-ink);
}

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

.download-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-card__identity img {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.download-card__title {
  margin: 0;
  font-size: 22px;
}

.download-card__version {
  margin-top: 3px;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.download-card__description {
  margin-top: 22px;
  color: var(--color-ink-soft);
  font-size: 14px;
}

.download-card__actions {
  display: grid;
  margin-top: auto;
  padding-top: 24px;
  gap: 10px;
}

.download-card__actions .button {
  width: 100%;
}

.release-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.release-badge--primary {
  background: var(--component-success);
  color: var(--color-ink);
}

.release-badge--recommended {
  background: var(--component-info);
  color: var(--color-ink);
}

.release-badge--retired {
  background: var(--color-border);
  color: var(--color-ink);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  padding: clamp(24px, 3vw, 34px);
  background: var(--color-surface);
  color: var(--color-ink);
  transition: background-color var(--transition-fast);
}

.article-card:hover {
  background: var(--component-track);
  text-decoration: none;
}

.article-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.article-card h3 {
  margin-top: 30px;
  font-size: clamp(21px, 2.4vw, 27px);
  line-height: 1.35;
}

.article-card p {
  color: var(--color-ink-soft);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
}

.article-card__link {
  margin-top: auto;
  padding-top: 32px;
  font-size: 14px;
  font-weight: 700;
}

.callout {
  position: relative;
  margin-block: 28px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-large);
  padding: 23px 24px 23px 58px;
  background: var(--color-surface);
  color: var(--color-ink);
}

.callout::before {
  position: absolute;
  top: 25px;
  left: 24px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--component-info);
  content: '';
}

.callout--success::before {
  background: var(--component-success);
}

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

.callout--danger::before {
  background: var(--component-danger);
}

.callout__title {
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

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

.dl-fab {
  position: fixed;
  z-index: var(--layer-floating);
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  width: min(300px, calc(100vw - 32px));
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--color-night-line);
  border-radius: var(--radius-large);
  padding: 13px 15px;
  background: var(--color-night);
  color: var(--color-night-ink);
}

.dl-fab:hover {
  background: var(--color-chip-dark);
  color: var(--color-night-ink);
  text-decoration: none;
}

.dl-fab__icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-medium);
  background: var(--color-mist);
  color: var(--color-ink);
}

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

.dl-fab__copy {
  line-height: 1.35;
}

.dl-fab__copy strong {
  display: block;
  font-size: 13px;
}

.dl-fab__copy span {
  display: block;
  margin-top: 3px;
  color: var(--color-night-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.dl-fab__arrow {
  color: var(--color-night-soft);
  font-size: 18px;
}

.end-download-card {
  display: grid;
  margin-top: 56px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--color-night-line);
  border-radius: var(--radius-large);
  padding: clamp(24px, 4vw, 42px);
  background: var(--color-night);
  color: var(--color-night-ink);
}

.end-download-card h2,
.end-download-card h3 {
  color: var(--color-night-ink);
}

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

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

.feature-ledger {
  border-bottom: 1px solid var(--color-border);
}

.feature-entry {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 170px;
  gap: 40px;
  align-items: start;
  border-top: 1px solid var(--color-border);
  padding: 26px 12px;
  transition: background-color var(--transition-fast);
}

.feature-entry:hover {
  background: var(--color-surface);
}

.feature-entry__key {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.feature-entry__number {
  flex-shrink: 0;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
}

.feature-entry__title {
  font-weight: 750;
}

.feature-entry__body {
  color: var(--color-ink-soft);
  font-size: 14px;
  line-height: 1.78;
}

.feature-entry__chip {
  justify-self: end;
  border-radius: var(--radius-small);
  padding: 6px 13px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.code-key {
  color: var(--component-code-key);
}

.code-string {
  color: var(--component-code-string);
}

@media (max-width: 960px) {
  .toc {
    position: static;
  }

  .feature-entry {
    grid-template-columns: 170px minmax(0, 1fr) 120px;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .feature-entry {
    grid-template-columns: 1fr;
    gap: 13px;
    padding-inline: 4px;
  }

  .feature-entry__chip {
    justify-self: start;
  }

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

  .end-download-card .button {
    width: 100%;
  }

  .article-card {
    min-height: 330px;
  }

  .callout {
    padding: 52px 20px 20px;
  }

  .callout::before {
    top: 22px;
    left: 20px;
  }

  .dl-fab {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
  }
}