.feature-browser {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
}

.tab-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tab-list[role="tablist"] {
  margin: 0;
}

.tab-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  padding: 12px 16px 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.tab-button::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 8px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: transparent;
}

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

.tab-button[aria-selected="true"],
.tab-button.is-active {
  color: var(--color-text);
  background: var(--color-bg);
  border-color: var(--color-border);
  box-shadow: var(--shadow-frame);
}

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

.tab-button__progress {
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 20px;
  height: 2px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-panel-strong);
}

.tab-button__progress::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  background: var(--color-accent);
}

.tab-button[aria-selected="true"] .tab-button__progress::after {
  width: 100%;
  transition: width 6s linear;
}

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

.browser-window {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
}

.browser-window__bar {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-muted);
  background: var(--color-panel);
  font-family: var(--font-mono);
  font-size: 12px;
}

.window-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
}

.browser-window__title {
  margin-left: 7px;
}

.browser-window__content {
  min-height: 300px;
  padding: clamp(20px, 4vw, 34px);
}

.browser-window__grid {
  height: 22px;
  border-top: 1px solid var(--color-border);
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 12px 12px;
}

.rule-list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  list-style: none;
}

.rule-list li {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) minmax(0, 1.4fr) minmax(90px, .5fr);
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 13px;
}

.rule-list li:last-child {
  border-bottom: 0;
}

.rule-list strong {
  color: var(--color-accent-dark);
}

.toc-tabs {
  position: sticky;
  top: calc(var(--header-height) + 8px);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 34px;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-frame);
}

.toc-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

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

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

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

.faq-item summary {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  padding: 14px 48px 14px 18px;
  color: var(--color-text);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 20px;
}

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

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

.term-card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-frame);
}

.term-card::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: -1px;
  width: 3px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  background: var(--color-accent);
}

.term-card dt {
  margin-bottom: 8px;
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
}

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

.client-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-frame);
}

.client-card--featured {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-float);
}

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

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

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

.client-card__identity h3 {
  margin-bottom: 3px;
  font-size: 20px;
}

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

.client-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[data-version] {
  display: none;
}

[data-version]:not(:empty) {
  display: inline;
}

.badge {
  display: inline-flex;
  min-height: 25px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  background: var(--color-panel);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}

.badge--primary {
  color: var(--color-accent-dark);
  background: var(--color-panel-strong);
  border-color: var(--color-accent);
}

.badge--success {
  color: var(--color-success);
  background: var(--color-bg);
  border-color: var(--color-success);
}

.badge--warning {
  color: var(--color-warning);
  background: var(--color-bg);
  border-color: var(--color-warning);
}

.badge--archived {
  color: var(--color-error);
  background: var(--color-bg);
  border-color: var(--color-error);
}

.post-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-frame);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-float);
}

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

.post-card h3 {
  font-size: 20px;
}

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

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

.post-card__link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--color-accent-dark);
  font-weight: 650;
  text-decoration: none;
}

.callout {
  position: relative;
  margin: 24px 0;
  padding: 18px 20px 18px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-panel);
}

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

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

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

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

.callout__title {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text);
  font-weight: 700;
}

.article-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 48px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  background: var(--color-panel);
}

.article-download-card__copy p {
  margin: 4px 0 0;
  color: var(--color-muted);
}

.dl-fab {
  position: fixed;
  right: max(16px, calc((100vw - var(--content-width)) / 2));
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  min-height: 54px;
  max-width: calc(100vw - 32px);
  align-items: center;
  gap: 11px;
  padding: 9px 16px 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: var(--shadow-float);
  text-decoration: none;
}

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

.dl-fab__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--color-bg);
  background: var(--color-text);
}

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

.dl-fab__copy {
  display: grid;
  line-height: 1.25;
}

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

.dl-fab__copy span {
  color: var(--color-muted);
  font-size: 11px;
}

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

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

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

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

.swatch--bg .swatch__color { background: var(--color-bg); }
.swatch--panel .swatch__color { background: var(--color-panel); }
.swatch--panel-strong .swatch__color { background: var(--color-panel-strong); }
.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-muted); }
.swatch--success .swatch__color { background: var(--color-success); }
.swatch--warning .swatch__color { background: var(--color-warning); }
.swatch--error .swatch__color { background: var(--color-error); }
.swatch--peach .swatch__color { background: var(--color-peach); }
.swatch--lavender .swatch__color { background: var(--color-lavender); }
.swatch--mint .swatch__color { background: var(--color-mint); }

@media (max-width: 800px) {
  .feature-browser {
    grid-template-columns: 1fr;
  }

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

  .tab-button {
    min-height: 48px;
    justify-content: center;
    padding: 9px;
    text-align: center;
  }

  .tab-button::before {
    top: auto;
    right: 12px;
    bottom: 4px;
    left: 12px;
    width: auto;
    height: 3px;
  }

  .tab-button__progress {
    display: none;
  }

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

@media (max-width: 640px) {
  .rule-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .toc-tabs {
    position: static;
  }

  .client-card__head,
  .article-download-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-card__actions,
  .client-card__actions .button,
  .article-download-card .button {
    width: 100%;
  }

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

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

@media (max-width: 390px) {
  .tab-list {
    grid-template-columns: 1fr;
  }

  .tab-button {
    justify-content: flex-start;
    text-align: left;
  }
}