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

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

.tab-list[aria-orientation="vertical"] {
  flex-direction: column;
  overflow: visible;
}

.tab-list [role="tab"] {
  display: inline-flex;
  min-width: max-content;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--color-muted);
  font-weight: 700;
  cursor: pointer;
}

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

.tab-list [role="tab"].is-active,
.tab-list [role="tab"][aria-selected="true"] {
  border-color: var(--color-border);
  background: var(--color-page);
  color: var(--color-text);
}

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

.tab-panel {
  margin-top: 24px;
  padding: 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-page);
  color: var(--color-text);
}

.timeline-feature {
  display: grid;
  grid-template-columns: minmax(190px, .34fr) minmax(0, 1fr);
  gap: 54px;
}

.timeline-feature .tab-list {
  position: relative;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.timeline-feature .tab-list::before {
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 9px;
  width: 1px;
  background: var(--color-ink-28);
  content: "";
}

.timeline-feature .tab-list [role="tab"] {
  position: relative;
  justify-content: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 12px 0 12px 34px;
  border: 0;
  background: transparent;
  color: var(--color-ink-70);
  text-align: left;
}

.timeline-feature .tab-list [role="tab"]::before {
  position: absolute;
  z-index: 1;
  left: 4px;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border: 1.5px solid var(--color-ink-82);
  border-radius: 50%;
  background: var(--color-deep);
  content: "";
}

.timeline-feature .tab-list [role="tab"]::after {
  position: absolute;
  left: 15px;
  width: 11px;
  height: 1px;
  background: var(--color-ink-55);
  content: "";
}

.timeline-feature .tab-list [role="tab"].is-active,
.timeline-feature .tab-list [role="tab"][aria-selected="true"] {
  color: var(--color-ink-96);
}

.timeline-feature .tab-list [role="tab"].is-active::before,
.timeline-feature .tab-list [role="tab"][aria-selected="true"]::before {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.timeline-feature .tab-panel {
  margin-top: 0;
  border: 1.5px solid var(--color-ink-55);
  background: var(--color-deep);
  color: var(--color-ink-82);
}

.window-panel__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: -30px -30px 28px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-ink-28);
}

.window-panel__dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border: 1px solid var(--color-ink-82);
  border-radius: 50%;
}

.window-panel__title {
  margin-left: 8px;
  color: var(--color-ink-70);
  font-family: var(--font-mono);
  font-size: 12px;
}

.toc-tabs {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 42px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-panel);
}

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

.toc-tabs a:hover {
  background: var(--color-page);
  color: var(--color-accent-dark);
}

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

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

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

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

.faq-item summary::after {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-accent-dark);
  content: "+";
  font-family: var(--font-mono);
  line-height: 22px;
  text-align: center;
}

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

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

.term-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-page);
  color: var(--color-text);
}

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

.term-card__code {
  margin-bottom: 8px;
  color: var(--color-link);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
}

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

.download-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-page);
  color: var(--color-text);
}

.download-card--featured {
  border-color: var(--color-accent-dark);
}

.download-card__head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.download-card__icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

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

.download-card__version:empty {
  display: none;
}

.download-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

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

.badge::before {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

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

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

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

.badge--info,
.tag--info {
  border-color: var(--color-link);
  background: var(--color-link-soft);
  color: var(--color-link);
}

.badge--success {
  border-color: var(--color-success);
  background: var(--color-success-soft);
  color: var(--color-accent-dark);
}

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-page);
  color: var(--color-text);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.post-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.post-card h3 a:hover {
  color: var(--color-accent-dark);
}

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

.post-card__link {
  margin-top: auto;
  color: var(--color-link);
  font-weight: 700;
  text-decoration: none;
}

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

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

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

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

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

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

.callout--danger {
  border-color: var(--color-error);
  background: var(--color-error-soft);
  color: var(--color-text);
}

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

.callout__title {
  margin-bottom: 6px;
  font-weight: 800;
}

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

.table-wrap {
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

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

.prose {
  color: var(--color-text);
}

.prose > * {
  max-width: 100%;
}

.prose > h2 {
  margin-top: 2.2em;
  scroll-margin-top: 90px;
}

.prose > h3 {
  margin-top: 1.7em;
  scroll-margin-top: 90px;
}

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

.prose li + li {
  margin-top: .45em;
}

.article-download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 56px;
  padding: 30px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-large);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.article-download-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-fab {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  display: inline-flex;
  max-width: calc(100vw - 32px);
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 11px;
  border: 1px solid var(--color-accent-dark);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-deep);
  font-weight: 800;
  text-decoration: none;
}

.dl-fab:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
}

.dl-fab__icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

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

@media (max-width: 760px) {
  .timeline-feature {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .timeline-feature .tab-list {
    flex-direction: row;
    overflow-x: auto;
  }

  .timeline-feature .tab-list::before,
  .timeline-feature .tab-list [role="tab"]::after {
    display: none;
  }

  .timeline-feature .tab-list [role="tab"] {
    min-width: max-content;
    padding: 10px 14px 10px 30px;
  }

  .timeline-feature .tab-list [role="tab"]::before {
    left: 11px;
  }

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

@media (max-width: 640px) {
  .tab-panel,
  .download-card,
  .post-card,
  .term-card {
    padding: 22px;
  }

  .window-panel__bar {
    margin: -22px -22px 22px;
  }

  .toc-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .badge,
  .tag {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .download-card__head {
    flex-wrap: wrap;
  }

  .article-download-card {
    padding: 22px;
  }

  .dl-fab {
    right: 16px;
    bottom: 16px;
  }
}