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

.tab-list {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.tab-list::-webkit-scrollbar {
  display: none;
}

.tab-list [role="tab"] {
  flex-shrink: 0;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

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

.tab-list [role="tab"][aria-selected="true"] {
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

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

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

.jump-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 36px;
  padding: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-card);
  scrollbar-width: none;
}

.jump-nav::-webkit-scrollbar {
  display: none;
}

.jump-nav a {
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.jump-nav a:hover,
.jump-nav a:focus-visible {
  background: var(--color-panel);
  color: var(--color-text);
}

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

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

.faq-item summary {
  position: relative;
  min-height: 64px;
  padding: 19px 58px 19px 22px;
  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: 22px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--color-panel);
  color: var(--color-text);
  content: "+";
  font-size: 18px;
  line-height: 24px;
  text-align: center;
  transform: translateY(-50%);
}

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

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

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

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

.term-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

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

.term-meta {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 14px;
  color: var(--color-accent-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card-large);
  background: var(--color-bg);
  color: var(--color-text);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-card);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.download-card-header img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.download-card h3 {
  margin-bottom: 4px;
}

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

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

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

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

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

.badge-retired {
  background: var(--color-panel-strong);
  color: var(--color-text-muted);
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: var(--radius-card);
  background: var(--color-bg);
  color: var(--color-text);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.article-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.article-card time {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.article-card h3 {
  margin: 14px 0 12px;
  font-size: clamp(20px, 2vw, 25px);
}

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

.article-card .text-link {
  margin-top: auto;
  padding-top: 18px;
}

.callout {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px 22px 52px;
  border-radius: var(--radius-card);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.callout::before {
  position: absolute;
  top: 23px;
  left: 22px;
  width: 18px;
  height: 18px;
  border: 5px solid var(--color-accent);
  border-radius: var(--radius-pill);
  content: "";
}

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

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

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

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

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

.dl-fab {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 18px 12px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-stage-text);
  box-shadow: var(--shadow-button-hover);
  font-weight: 750;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.dl-fab:hover {
  background: var(--color-accent-dark);
  color: var(--color-stage-text);
  transform: translateY(-3px);
}

.dl-fab-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--color-accent-dark);
}

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

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

.end-download-card p {
  color: var(--color-text-muted);
}

.preview-hero {
  padding-top: 48px;
  padding-bottom: 72px;
  overflow-x: clip;
}

.preview-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  align-items: center;
  gap: clamp(52px, 7vw, 96px);
}

.preview-hero-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.preview-hero-copy h1 {
  max-width: 14em;
  margin: 26px 0 0;
}

.preview-hero-copy .lede {
  max-width: 34em;
  margin: 22px 0 0;
  color: var(--color-text-muted);
  font-size: 17px;
}

.preview-hero-copy .lede strong {
  color: var(--color-text);
}

.preview-hero-copy .button-row {
  margin-top: 32px;
}

.platform-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.platform-label {
  margin-right: 4px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 650;
}

.android-stage {
  position: relative;
  width: 560px;
  height: 620px;
  max-width: 100%;
  border-radius: var(--radius-stage);
  background: linear-gradient(135deg, var(--color-stage) 0%, var(--color-stage) 40%, var(--color-stage-end) 100%);
  color: var(--color-stage-text);
  box-shadow: var(--shadow-stage);
}

.stage-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--radius-small);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 650;
}

.device-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  padding: 9px;
  border-radius: var(--radius-phone);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-phone);
  transform: translate(-50%, -50%);
}

.device-screen {
  overflow: hidden;
  border-radius: var(--radius-screen);
  background: var(--color-bg);
  color: var(--color-text);
}

.device-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding-inline: 20px;
  background: var(--color-stage);
  color: var(--color-stage-text);
}

.device-camera {
  width: 10px;
  height: 10px;
  border: 1px solid var(--color-status-border);
  border-radius: var(--radius-pill);
  background: var(--color-stage-end);
}

.device-system {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.device-appbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding-inline: 16px;
  background: var(--color-bg);
  color: var(--color-text);
}

.device-appbar svg {
  width: 20px;
  height: 20px;
}

.device-appbar h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.device-section-label {
  padding: 14px 16px 2px;
  color: var(--color-accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.device-settings {
  margin: 0;
  padding: 0 16px 12px;
  list-style: none;
}

.device-settings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-border);
}

.device-settings li:last-child {
  border-bottom: 0;
}

.setting-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.setting-name {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

.setting-value {
  color: var(--color-text-muted);
  font-size: 11.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.setting-value.mono {
  font-size: 10.5px;
}

.setting-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.switch {
  position: relative;
  width: 40px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-panel-strong);
}

.switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: var(--color-switch-knob);
  box-shadow: 0 1px 3px var(--color-shadow-knob);
  content: "";
}

.switch.is-on {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.switch.is-on::after {
  left: 18px;
}

.route-float {
  position: absolute;
  bottom: 48px;
  left: 58px;
  width: 220px;
  padding: 16px 16px 12px;
  border-radius: var(--radius-float);
  background: var(--color-bg);
  color: var(--color-text);
  box-shadow: var(--shadow-float);
  transform: rotate(-6deg);
}

.route-float h3 {
  margin-bottom: 10px;
  font-size: 14px;
}

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

.route-float li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 13px;
}

.route-float li:first-child {
  border-top: 0;
}

.route-float li.is-selected {
  color: var(--color-text);
  font-weight: 650;
}

.radio-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
}

.is-selected .radio-mark {
  border-color: var(--color-accent);
}

.is-selected .radio-mark::after {
  position: absolute;
  inset: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  content: "";
}

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

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

.swatch-color {
  height: 96px;
}

.swatch-info {
  padding: 15px;
}

.swatch-info strong,
.swatch-info code {
  display: block;
}

.swatch-info code {
  margin-top: 6px;
  padding: 0;
  background: transparent;
  color: var(--color-text-muted);
}

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

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

.swatch-panel-strong {
  background: var(--color-panel-strong);
}

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

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

.swatch-accent-dark {
  background: var(--color-accent-dark);
}

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

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

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

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

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

.swatch-stage {
  background: var(--color-stage);
}

.type-sample {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.type-sample:last-child {
  border-bottom: 0;
}

.type-label {
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.preview-footer {
  margin-top: var(--section-space);
}

@media (max-width: 1080px) {
  .preview-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .android-stage {
    justify-self: center;
  }

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

@media (max-width: 720px) {
  .tab-list {
    display: flex;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    border-radius: var(--radius-card);
  }

  .tab-list [role="tab"] {
    width: 100%;
    white-space: normal;
  }

  .jump-nav {
    top: 8px;
  }

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

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

  .android-stage {
    height: auto;
    padding: 64px 18px 24px;
  }

  .device-card {
    position: relative;
    top: auto;
    left: auto;
    width: min(300px, 100%);
    margin-inline: auto;
    transform: none;
  }

  .route-float {
    position: relative;
    bottom: auto;
    left: auto;
    width: min(220px, 100%);
    margin: 24px auto 0;
    transform: none;
  }
}

@media (max-width: 480px) {
  .preview-hero {
    padding-top: 28px;
  }

  .android-stage {
    height: auto;
  }

  .stage-badge {
    top: 14px;
    right: 14px;
  }

  .device-card {
    top: 47%;
    width: 270px;
  }

  .device-settings li {
    padding: 10px 0;
  }

  .route-float {
    bottom: 18px;
    width: min(210px, calc(100% - 36px));
  }

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

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