/* Panels are scoped by data-tabs. Every tab controls one uniquely identified panel. */
.tab-list, [role="tablist"].tab-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--c-border);
  border-radius: var(--r-btn);
  background: var(--c-panel);
  color: var(--c-text);
}
.tab-list [role="tab"] {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-small);
  background: transparent;
  color: var(--c-muted);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
}
.tab-list [role="tab"][aria-selected="true"] {
  border-color: var(--c-border);
  background: var(--c-bg);
  color: var(--c-accent-dark);
  box-shadow: var(--shadow-hairline);
}
.tab-panel { margin-top: 24px; }
.feature-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.feature-item { border-bottom: 1px solid var(--c-border); }
.feature-item:first-child { border-top: 1px solid var(--c-border); }
.feature-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 66px;
  padding: 18px 2px;
  border: 0;
  background: var(--c-bg);
  color: var(--c-muted);
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--size-small);
  font-weight: var(--weight-strong);
  letter-spacing: var(--tracking-mono);
}
.feature-tab::before { content: ""; width: 8px; height: 8px; flex-shrink: 0; border: 1px solid var(--c-muted); border-radius: var(--r-round); }
.feature-tab::after { content: "›"; margin-left: auto; font-size: 20px; }
.feature-tab[aria-selected="true"] { color: var(--c-text); }
.feature-tab[aria-selected="true"]::before { border-color: var(--c-accent); background: var(--c-accent); }
.feature-tab[aria-selected="true"]::after { color: var(--c-accent-dark); transform: rotate(90deg); }
.feature-description { margin: 0; padding: 0 24px 24px; font-size: var(--size-small); line-height: 1.85; color: var(--c-muted); }
.feature-description p { margin-bottom: 18px; }
.keyword-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); color: var(--c-text); }
.keyword-list .is-current { color: var(--c-accent-dark); }
.feature-depth { position: relative; isolation: isolate; padding-top: 28px; padding-bottom: 28px; }
.feature-depth::before, .feature-depth::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 28px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  opacity: 0.3;
}
.feature-depth::before { transform: translate(10px, -14px); }
.feature-depth::after { transform: translate(18px, -28px); }
.feature-depth .tab-panel { margin: 0; box-shadow: var(--shadow-card), var(--shadow-card-glow); }
.feature-depth pre { margin-bottom: 0; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow-hairline);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--r-small); font-size: var(--size-small); }
.toc a:hover, .toc a[aria-current="location"] { background: var(--c-panel-lilac); color: var(--c-accent-dark); }
.toc-sticky { position: sticky; top: 16px; z-index: 10; }
.toc-static { position: static; }

.faq-list { border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-bg); color: var(--c-text); box-shadow: var(--shadow-card); }
.faq-item { padding-inline: 24px; }
.faq-item + .faq-item { border-top: 1px solid var(--c-border); }
.faq-item summary { position: relative; display: block; padding: 21px 30px 21px 0; cursor: pointer; font-weight: var(--weight-strong); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 2px; top: 20px; color: var(--c-accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 22px; color: var(--c-muted); }
.faq-answer > :last-child { margin-bottom: 0; }

.term-card { scroll-margin-top: 28px; }
.term-card dt { margin-bottom: 10px; font-family: var(--font-mono); font-weight: var(--weight-strong); color: var(--c-accent-dark); overflow-wrap: anywhere; }
.term-card dd { margin: 0; color: var(--c-muted); line-height: 1.8; }
.term-card .badge { margin-bottom: 18px; }

.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  background: var(--grad-accent);
  color: var(--c-on-accent);
  box-shadow: var(--shadow-btn-accent);
  font-weight: var(--weight-strong);
  line-height: 1.3;
  transition: transform var(--duration-fast) var(--ease);
}
.app-store-button svg { width: 25px; height: 27px; flex-shrink: 0; }
.app-store-button .store-copy { display: block; text-align: left; }
.app-store-button small { display: block; font-size: 11px; font-weight: var(--weight-medium); }
.app-store-button strong { display: block; font-size: 16px; font-weight: var(--weight-strong); }
.app-store-button:hover { transform: translateY(-1px); }
.app-store-button:active { transform: translateY(0); }
.app-store-button:disabled, .app-store-button[aria-disabled="true"] { background: var(--c-panel); color: var(--c-muted); border-color: var(--c-border); box-shadow: none; transform: none; }
.store-primary { min-height: 64px; padding: 14px 28px; }
.store-primary strong { font-size: 18px; }

.chips, .fact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip, .fact-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 4px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel);
  color: var(--c-text);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.chip-k, .fact-key { color: var(--c-muted); }
.chip-v, .fact-value { color: var(--c-text); font-weight: var(--weight-strong); }
.chip-v.mono { font-weight: var(--weight-medium); letter-spacing: 0.01em; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-panel-lilac);
  color: var(--c-accent-dark);
  font-size: 12px;
  font-weight: var(--weight-strong);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.badge-neutral { background: var(--c-panel); color: var(--c-muted); }
.badge-success { background: var(--c-bg); color: var(--c-success-ink); }
.badge-warn { background: var(--c-bg); color: var(--c-warn-ink); }
.badge-error { background: var(--c-bg); color: var(--c-error-ink); }

.official-shot { width: min(100%, 280px); max-width: 280px; margin: 0 auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot { filter: none; }
.official-shot img, .shot-placeholder { outline: 1px solid var(--c-border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; font-size: 12.5px; line-height: 1.7; text-align: center; color: var(--c-muted); }
.shot-row { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 28px; }
.shot-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 750 / 1334;
  padding: 20px;
  border-radius: var(--r-shot);
  background: var(--grad-panel);
  color: var(--c-muted);
  text-align: center;
  font-size: var(--size-small);
}
.device-card { position: relative; display: flex; align-items: flex-start; gap: 22px; }
.device-card > svg { width: 40px; height: 48px; flex-shrink: 0; color: var(--c-accent-dark); }
.device-card h3 { margin: 0 0 10px; }
.device-card p { margin-bottom: 18px; color: var(--c-muted); font-size: var(--size-small); }
.device-card .device-link { color: var(--c-accent-dark); font-size: var(--size-small); font-weight: var(--weight-strong); }
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.zone-dark .device-grid { max-width: 820px; margin: 36px auto 0; text-align: left; }

.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .badge { align-self: flex-start; margin-bottom: 20px; }
.article-card h3 { margin: 0 0 14px; font-size: 20px; line-height: 1.45; }
.article-card h3 a:hover { color: var(--c-accent-dark); }
.article-card p { color: var(--c-muted); font-size: var(--size-small); }
.article-card .article-meta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--c-border); font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); }

.callout {
  margin: 24px 0;
  padding: 20px 24px;
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-small);
  background: var(--c-panel-lilac);
  color: var(--c-text);
  line-height: 1.8;
}
.callout > :last-child { margin-bottom: 0; }
.callout strong { color: var(--c-accent-dark); }
.callout-warning { background: var(--c-panel); color: var(--c-text); border-left-color: var(--c-warn); }
.callout-warning strong { color: var(--c-warn-ink); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--r-small); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--size-small); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--c-panel); color: var(--c-text); font-weight: var(--weight-strong); }
.data-table td, .prose table td { background: var(--c-bg); color: var(--c-text); }
.data-table tr:last-child td { border-bottom: 0; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; border-collapse: collapse; text-align: left; }
.prose table code, .data-table code { overflow-wrap: anywhere; word-break: normal; }

.article-store-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
}
.article-store-card h2 { font-size: 24px; margin: 0 0 12px; }
.article-store-card p { color: var(--c-muted); margin: 0; font-size: var(--size-small); }
.dl-fab {
  position: fixed;
  z-index: var(--z-fab);
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  min-height: 56px;
  padding: 12px 18px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  color: var(--c-text);
  box-shadow: var(--shadow-card), var(--shadow-card-glow);
}
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--c-accent-dark); }
.dl-fab strong, .dl-fab small { display: block; }
.dl-fab strong { font-size: var(--size-small); }
.dl-fab small { color: var(--c-muted); font-size: 12px; }
.has-article-fab .site-footer { padding-bottom: 112px; }

/* Design review furniture; these classes do not depend on scripts. */
.preview-section { padding-top: 72px; padding-bottom: 72px; }
.preview-section + .preview-section { border-top: 1px solid var(--c-border); }
.preview-title { margin: 0 0 28px; }
.sample-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.sample-stack { display: grid; gap: 20px; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.swatch { margin: 0; border: 1px solid var(--c-border); border-radius: var(--r-small); overflow: clip; }
.swatch-color { display: block; height: 64px; background: var(--c-bg); color: var(--c-text); }
.swatch figcaption { padding: 10px 12px; font-family: var(--font-mono); font-size: 11px; overflow-wrap: anywhere; }
.sw-bg { background: var(--c-bg); color: var(--c-text); }
.sw-panel { background: var(--c-panel); color: var(--c-text); }
.sw-lilac { background: var(--c-panel-lilac); color: var(--c-text); }
.sw-ink { background: var(--c-ink-zone); color: var(--c-on-dark); }
.sw-border { background: var(--c-border); color: var(--c-text); }
.sw-border-strong { background: var(--c-border-strong); color: var(--c-text); }
.sw-accent { background: var(--c-accent); color: var(--c-on-accent); }
.sw-accent-dark { background: var(--c-accent-dark); color: var(--c-on-accent); }
.sw-accent-light { background: var(--c-accent-on-dark); color: var(--c-text); }
.sw-text { background: var(--c-text); color: var(--c-on-dark); }
.sw-muted { background: var(--c-muted); color: var(--c-on-accent); }
.sw-faint { background: var(--c-faint); color: var(--c-text); }
.sw-on-accent { background: var(--c-on-accent); color: var(--c-text); }
.sw-on-dark { background: var(--c-on-dark); color: var(--c-text); }
.sw-on-dark-muted { background: var(--c-on-dark-muted); color: var(--c-text); }
.sw-success { background: var(--c-success); color: var(--c-text); }
.sw-warn { background: var(--c-warn); color: var(--c-text); }
.sw-error { background: var(--c-error); color: var(--c-text); }
.sw-success-ink { background: var(--c-success-ink); color: var(--c-on-accent); }
.sw-warn-ink { background: var(--c-warn-ink); color: var(--c-on-accent); }
.sw-error-ink { background: var(--c-error-ink); color: var(--c-on-accent); }
.sw-circuit { background: var(--c-circuit); color: var(--c-text); }
.sw-circuit-panel { background: var(--c-circuit-panel); color: var(--c-text); }
.sw-circuit-dark { background: var(--c-circuit-dark); color: var(--c-on-dark); }
.sw-mask { background: var(--c-mask); color: var(--c-on-accent); }
.sw-glow { background: var(--c-glow); color: var(--c-text); }
.sw-glow-faint { background: var(--c-glow-faint); color: var(--c-text); }
.sw-shadow-one { background: var(--c-ink-shadow-1); color: var(--c-text); }
.sw-shadow-two { background: var(--c-ink-shadow-2); color: var(--c-text); }
.sw-accent-shadow { background: var(--c-accent-shadow); color: var(--c-text); }
.sw-inner { background: var(--c-inner-hi); color: var(--c-text); }
.sw-veil { background: var(--c-veil); color: var(--c-text); }
.preview-brand-mark { width: 28px; height: 28px; border: 1px solid var(--c-border-strong); border-radius: var(--r-btn); background: var(--grad-panel); color: var(--c-text); flex-shrink: 0; }
.preview-eb-icon { width: 24px; height: 24px; border: 1px solid var(--c-border-strong); border-radius: var(--r-round); background: var(--grad-panel); color: var(--c-text); flex-shrink: 0; }
.preview-focus { outline: 2px solid var(--c-accent); outline-offset: 4px; }
.preview-hover { transform: translateY(-1px); }
.preview-active { transform: translateY(0); border-color: var(--c-accent-dark); }
.preview-display { margin: 0; font-size: var(--size-h1); font-weight: var(--weight-display); font-family: var(--font-display); letter-spacing: var(--tracking-display); line-height: var(--leading-display); }
.preview-footer-mark { width: 32px; height: 32px; }
.preview-note { margin-top: 20px; font-size: var(--size-small); color: var(--c-muted); }

@media (max-width: 960px) {
  .feature-layout { grid-template-columns: minmax(0, 1fr); }
  .feature-depth { margin-right: 18px; }
  .swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .device-grid, .article-store-card { grid-template-columns: minmax(0, 1fr); }
  .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips, .fact-row { flex-direction: row; flex-wrap: wrap; }
  .faq-item { padding-inline: 18px; }
  .callout { padding: 18px; }
  .official-shot { width: min(100%, 280px); }
  .shot-row { flex-direction: column; align-items: center; }
  .device-card { gap: 16px; }
  .dl-fab { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: calc(100% - 32px); }
  .preview-display { font-size: 28px; }
  .feature-tab { font-size: 12px; }
}