.feature-browser {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.feature-browser > * {
  min-width: 0;
}

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

.tab-list[aria-orientation="horizontal"],
.tab-list--horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}

.tab-button {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  color: var(--color-text-muted);
  cursor: pointer;
  font-weight: 750;
  text-align: left;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.tab-button:hover {
  border-color: var(--color-accent);
  background: var(--color-panel-raised);
  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);
  transform: translateX(3px);
}

.tab-button[aria-selected="true"]::before,
.tab-button.is-active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -2px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-pink);
  box-shadow: 0 0 15px var(--color-pink-glow);
  content: "";
}

.tab-list--horizontal .tab-button {
  width: auto;
  min-height: 44px;
}

.tab-list--horizontal .tab-button[aria-selected="true"],
.tab-list--horizontal .tab-button.is-active {
  transform: none;
}

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

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

.feature-panel {
  min-height: 100%;
}

.feature-panel__inside {
  min-height: 100%;
  padding: clamp(22px, 4vw, 40px);
}

.feature-panel__copy {
  max-width: 760px;
  color: var(--color-text-muted);
}

.feature-panel pre {
  margin-top: 24px;
  margin-bottom: 0;
}

.toc-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 40px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
}

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

.toc-nav a:hover,
.toc-nav a:focus-visible {
  background: var(--color-accent-glass);
  color: var(--color-text);
}

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

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

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

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

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

.faq-item summary::after {
  width: 24px;
  height: 24px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-success);
  content: "+";
  font-family: var(--font-mono);
  font-weight: 800;
}

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

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

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

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

.term-card {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  color: var(--color-text);
}

.term-card__code {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.term-card h3 {
  font-size: 19px;
}

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

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

.download-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

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

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

.download-card__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.download-card__icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.download-card__title {
  min-width: 0;
}

.download-card__title h3 {
  margin-bottom: 3px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.download-card__meta {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

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

.download-card__description {
  flex-grow: 1;
  margin: 0;
  color: var(--color-text-muted);
}

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

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

.badge {
  max-width: 100%;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  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: 10px;
  font-weight: 700;
  line-height: 1.35;
}

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

.badge--featured {
  border-color: var(--color-accent);
  background: var(--color-accent-glass);
  color: var(--color-text);
}

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

.badge--pink {
  border-color: var(--color-pink);
  background: var(--color-panel-raised);
  color: var(--color-text);
}

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

.post-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

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

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

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

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

.post-card p {
  flex-grow: 1;
  color: var(--color-text-muted);
}

.post-card__more {
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

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

.callout::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--color-accent);
  content: "";
}

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

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

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

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

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

.dl-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px 9px 10px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-panel-raised);
  color: var(--color-text);
  box-shadow: var(--shadow-deep), 0 0 24px var(--color-accent-glow);
  font-weight: 800;
  text-decoration: none;
}

.dl-fab:hover {
  border-color: var(--color-pink);
  color: var(--color-text);
}

.dl-fab__icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--color-accent);
  color: var(--color-ink);
}

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

.article-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 48px;
  padding: 24px;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-panel);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.article-download__copy {
  min-width: 0;
}

.article-download__copy h2,
.article-download__copy h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.article-download__copy p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

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

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

.preview-hero {
  position: relative;
  overflow-x: clip;
  padding-bottom: 34px;
}

.preview-hero__chips {
  margin-top: 8px;
}

.preview-hero h1 {
  margin-top: 16px;
  margin-bottom: 10px;
}

.preview-hero__actions {
  margin-top: 28px;
}

.preview-hero__platforms {
  margin-top: 20px;
}

.device-window {
  position: relative;
  width: 720px;
  max-width: 100%;
  margin-top: 30px;
  padding: 2px;
  border-radius: var(--radius-device);
  background: var(--edge-spectrum);
  box-shadow: var(--shadow-deep), var(--shadow-device);
  transform: perspective(1500px) rotateX(3deg);
  transform-origin: 50% 0;
}

.device-window__frame {
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--device-gradient);
  color: var(--color-text);
}

.device-window__grid {
  height: 332px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.device-pane {
  position: relative;
  min-width: 0;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--color-pane-edge);
  border-radius: var(--radius-sm);
  background: var(--color-pane-glass);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 var(--color-white-faint);
  text-align: left;
}

.device-pane__cap {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.device-rules {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.78;
  mask-image: linear-gradient(var(--color-ink) 58%, transparent);
}

.device-rules p {
  margin: 0;
  white-space: nowrap;
}

.rule-key {
  color: var(--color-text);
}

.rule-proxy {
  color: var(--color-accent);
}

.rule-direct {
  color: var(--color-success);
}

.rule-fallback {
  color: var(--color-warning);
}

.device-legend {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 14px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.device-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reject-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.reject-symbol {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 3px solid var(--color-pink);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--color-pink-glow);
}

.reject-symbol::before {
  position: absolute;
  top: 14.5px;
  left: 3px;
  width: 26px;
  height: 3px;
  background: var(--color-pink);
  content: "";
  transform: rotate(-45deg);
}

.reject-copy em {
  display: block;
  margin-bottom: 3px;
  color: var(--color-pink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.reject-copy p {
  margin: 0;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  text-decoration: line-through;
  text-decoration-color: var(--color-pink-border);
}

.dns-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
}

.dns-kv code {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 11px;
}

.dns-kv b {
  color: var(--color-text);
  font-weight: 400;
}

.dns-kv i {
  color: var(--color-success);
  font-style: normal;
}

.fake-toggle {
  position: relative;
  width: 28px;
  height: 16px;
  flex: 0 0 auto;
  border: 1px solid var(--color-success);
  border-radius: var(--radius-pill);
  background: var(--color-green-glass);
}

.fake-toggle::after {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
  content: "";
}

.device-window__sill {
  height: 26px;
  margin-top: 12px;
  border-top: 1px solid var(--color-white-line);
  border-radius: var(--radius-xs);
  background: var(--panel-gradient);
  box-shadow: 0 8px 18px var(--color-shadow-soft);
}

.device-window__overlay {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  overflow: visible;
  pointer-events: none;
}

.flow-in {
  fill: none;
  stroke: var(--color-text-muted);
  stroke-linecap: round;
}

.flow-direct {
  fill: none;
  stroke: var(--color-accent);
  stroke-linecap: round;
}

.flow-proxy {
  fill: none;
  stroke: var(--color-success);
  stroke-linecap: round;
}

.flow-under {
  opacity: 0.4;
}

.flow-node {
  fill: var(--color-text);
}

.cat-shadow {
  fill: var(--color-ink);
  opacity: 0.32;
}

.cat-body {
  fill: var(--color-text);
}

.cat-patch {
  fill: var(--color-accent);
}

.cat-ear {
  fill: var(--color-pink);
  opacity: 0.75;
}

.cat-tail {
  fill: none;
  stroke: var(--color-accent);
  stroke-linecap: round;
}

.cat-paw {
  fill: none;
  stroke: var(--color-text);
  stroke-linecap: round;
}

.cat-eye {
  fill: none;
  stroke: var(--color-panel);
  stroke-linecap: round;
}

.touch-glow {
  fill: var(--color-success);
  opacity: 0.3;
}

.touch-core {
  fill: var(--color-success);
}

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

.token-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-panel);
  color: var(--color-text);
}

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

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

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

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

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

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

.token-card__swatch--accent-deep {
  background: var(--color-accent-deep);
}

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

.token-card__swatch--muted {
  background: var(--color-text-muted);
}

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

.token-card__swatch--warning {
  background: var(--color-warning);
}

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

.token-card__swatch--pink {
  background: var(--color-pink);
}

.token-card__label {
  padding: 11px;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.type-sample {
  display: grid;
  gap: 24px;
}

.type-sample > * {
  margin: 0;
}

.preview-footer {
  margin-top: 80px;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .tab-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    width: auto;
    min-width: max-content;
  }

  .tab-button[aria-selected="true"],
  .tab-button.is-active {
    transform: none;
  }

  .download-grid,
  .glossary-grid,
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .article-download {
    grid-template-columns: minmax(0, 1fr);
  }

  .device-window {
    transform: none;
  }

  .device-window__grid {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .device-pane {
    min-height: 148px;
  }

  .device-window__overlay {
    display: none;
  }
}

@media (max-width: 640px) {
  .token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toc-nav a {
    flex: 0 0 auto;
  }

  .dl-fab {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }

  .article-download__actions .btn {
    width: 100%;
  }

  .device-rules {
    overflow-x: auto;
    mask-image: none;
  }
}