.hero { padding-top: 44px; padding-bottom: 0; overflow: hidden; }
.hero__copy {
  width: 100%;
  max-width: calc(1120px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  max-width: 100%;
  padding: 4px 14px 4px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}
.eyebrow svg { width: 13px; height: 13px; color: var(--text); }
.eyebrow b { color: var(--text); font-weight: var(--weight-bold); }
.hero__title {
  margin: 18px 0 0;
  font-weight: var(--weight-display);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.16;
  letter-spacing: var(--tracking-cjk);
}
.hero__actions { margin-top: 24px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__lede { margin: 18px 0 0; max-width: 700px; font-size: 17px; line-height: 1.62; color: var(--text-muted); }
.hero__lede strong { color: var(--text); }
.devices {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 22px;
}
.device { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: var(--weight-medium); color: var(--text-muted); }
.device svg { width: 20px; height: 20px; color: var(--text); }
.device:hover { color: var(--text); }
.devices__sep { width: 1px; height: 16px; background: var(--border); color: var(--text); flex-shrink: 0; }
.chip, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
  text-align: center;
}
.chip svg, .badge svg { width: 12px; height: 12px; }
.badge--soft { background: var(--bg-panel-2); color: var(--text); border-color: var(--bg-panel-2); }
.badge__dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); color: var(--text); }
.fact-pills { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fact-pills .chip { font-weight: var(--weight-medium); }
.facts {
  width: var(--wrap);
  margin: 22px auto 0;
  padding: 0 8px;
  list-style: none;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background: var(--bg-panel);
  color: var(--text);
  border-radius: var(--r-pill);
}
.fact { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; min-width: 0; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact__k { font-size: 12.5px; font-weight: var(--weight-semibold); color: var(--text-muted); flex-shrink: 0; }
.fact__v { font-family: var(--font-mono); font-size: 13px; color: var(--text); letter-spacing: -.01em; overflow-wrap: anywhere; }

.conf {
  width: var(--wrap);
  margin: 36px auto 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  position: relative;
}
.conf__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; padding: 0 28px 0 32px; border-bottom: 1px solid var(--border); }
.conf__file { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; color: var(--text-muted); }
.conf__file svg { width: 16px; height: 16px; color: var(--text-muted); }
.conf__tabs { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.conf__tab { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); }
.conf__tab--on { border: 1.5px solid var(--accent); color: var(--accent); font-weight: var(--weight-semibold); }
.conf__body { position: relative; padding: 24px 28px 128px; }
.rules { margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 22px; line-height: 1; letter-spacing: -.01em; }
.rule { position: relative; display: flex; align-items: center; gap: 30px; height: 46px; padding: 0 20px; border-radius: var(--r-row); white-space: nowrap; }
.rule--hit { background: var(--bg-panel-2); color: var(--text); }
.rule__no { width: 2ch; flex-shrink: 0; text-align: right; color: var(--text-faint); font-size: .82em; }
.t-k { color: var(--text); font-weight: var(--weight-semibold); }
.t-c { color: var(--text-muted); }
.t-v { color: var(--text); }
.t-o { color: var(--text-muted); }
.t-s { color: var(--accent); font-weight: var(--weight-bold); }
.hit { position: absolute; z-index: 2; right: 44px; top: 50%; width: 112px; height: 112px; transform: translateY(-50%); }
.hit__dot { width: 100%; height: 100%; display: grid; place-items: center; border-radius: var(--r-circle); background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 12px var(--bg-panel-2), var(--shadow-mark); }
.hit__dot svg { width: 40px; height: 40px; margin-left: 4px; }
.hit__tag {
  position: absolute;
  top: calc(100% + 26px);
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: var(--weight-medium);
  white-space: nowrap;
  box-shadow: var(--shadow-tag);
}

.tabs__list, [role="tablist"].segments {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-panel-2);
  color: var(--text);
  font-weight: var(--weight-semibold);
  font-size: 14px;
}
.tabs__tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tabs__tab:hover:not([aria-selected="true"]) { background: var(--border); color: var(--text); }
.tabs__panel {
  padding: 56px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.tabs__panel h3 { margin: 0 0 24px; font-size: 40px; }
.tabs__panel p { color: var(--text-muted); }
.tabs__material { font-family: var(--font-mono); min-width: 0; }
.tabs__material pre { margin: 0; }
.toc {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  overflow-x: visible;
  padding: 10px;
  margin-block: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
}
.toc a { display: block; flex-shrink: 0; min-height: 44px; padding: 10px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: var(--weight-medium); white-space: nowrap; }
.toc a:hover, .toc a[aria-current] { background: var(--bg-panel-2); color: var(--text); }
.toc--static { position: static; }

.faq { border-top: 1px solid var(--border); }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 4px; list-style: none; cursor: pointer; font-weight: var(--weight-semibold); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; flex-shrink: 0; font-family: var(--font-mono); font-size: 22px; color: var(--text-muted); }
.faq__item[open] summary::after { content: "−"; }
.faq__answer { padding: 0 4px 24px; color: var(--text-muted); }
.faq__answer > :last-child { margin-bottom: 0; }
.term-card { padding: 32px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.term-card dt { font-family: var(--font-mono); font-size: 22px; font-weight: var(--weight-bold); overflow-wrap: anywhere; }
.term-card dd { margin: 16px 0 0; color: var(--text-muted); }

.app-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 26px;
  border: 1px solid var(--transparent);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
  text-align: left;
  line-height: 1.25;
}
.app-store:hover { background: var(--accent-dark); color: var(--on-accent); }
.app-store svg { width: 24px; height: 24px; flex-shrink: 0; }
.app-store__words { display: block; min-width: 0; }
.app-store__words small { display: block; font-size: 11px; font-weight: var(--weight-medium); }
.app-store__words strong { display: block; font-size: 16px; font-weight: var(--weight-bold); }
.app-store--dominant { min-height: 64px; padding: 14px 32px; }
.app-store--dominant .app-store__words strong { font-size: 18px; }
.app-store:focus-visible { outline-offset: 5px; }
.store-panel {
  padding: 72px;
  border-radius: var(--r-panel);
  background: var(--accent);
  color: var(--on-accent);
  text-align: center;
}
.store-panel h2 { margin: 0 0 20px; }
.store-panel p { max-width: 640px; margin: 0 auto 28px; }
.store-panel .app-store { background: var(--bg); color: var(--accent-dark); box-shadow: none; }
.store-panel .app-store:hover { background: var(--bg-panel-2); color: var(--accent-dark); }
.article-store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 64px;
  padding: 32px;
  border-radius: var(--r-card);
  background: var(--bg-panel);
  color: var(--text);
}
.article-store__copy { flex: 1 1 260px; min-width: 0; }
.article-store h2 { margin: 0 0 10px; font-size: 24px; }
.article-store p { margin: 0; color: var(--text-muted); font-size: 14px; }

.shot-layout { display: flex; align-items: flex-start; justify-content: center; gap: 48px; }
.shot-layout > :not(.official-shot) { flex: 1; min-width: 0; }
.official-shot { width: 100%; max-width: 280px; flex-shrink: 0; margin: 0 auto; }
.official-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-mark);
}
.official-shot figcaption { margin-top: 14px; color: var(--text-muted); font-size: 13px; line-height: 1.6; text-align: center; }
.shot-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 750 / 1334;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-mark);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: center;
}
.device-card { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 40px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.device-card > svg { width: 52px; height: 52px; }
.device-card h3 { margin: 0; }
.device-card p { color: var(--text-muted); margin: 0; }
.device-card .btn { margin-top: auto; }
.article-card { padding: 32px; border-top: 1px solid var(--border); background: var(--bg); color: var(--text); }
.article-card h3 { margin: 20px 0 14px; font-size: 24px; line-height: 1.4; }
.article-card h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.article-card p { color: var(--text-muted); font-size: 15px; }
.article-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-muted); font-size: 13px; }
.callout { margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--accent); border-radius: var(--r-item); background: var(--bg-panel-2); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout__title { display: block; margin-bottom: 8px; font-weight: var(--weight-bold); }
.grouped-list { list-style: none; margin: 0; padding: 0 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg); color: var(--text); }
.grouped-list li + li { border-top: 1px solid var(--border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding-block: 18px; }
.grouped-list a::after { content: "›"; flex-shrink: 0; font-size: 24px; color: var(--text-muted); }

.table-scroll { overflow-x: auto; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--r-item); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: top;
}
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.data-table td, .prose table td { background: var(--bg); color: var(--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; }
.data-table code, .prose table code { overflow-wrap: anywhere; word-break: normal; }
.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(100vw - 40px);
  min-height: 56px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-btn);
  font-size: 14px;
  font-weight: var(--weight-semibold);
}
.dl-fab svg { width: 20px; height: 20px; }
.dl-fab:hover { background: var(--accent-dark); color: var(--on-accent); }
.has-article-fab { padding-bottom: 88px; }

.specimens { padding-top: var(--section-space); padding-bottom: 0; }
.specimens h2 { margin-top: 0; margin-bottom: 36px; }
.specimen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.swatch { min-width: 0; font-size: 13px; }
.swatch code { display: block; margin-top: 10px; }
.swatch__paint { height: 76px; border: 1px solid var(--border); border-radius: var(--r-item); color: var(--text); }
.paint-bg { background: var(--bg); color: var(--text); }
.paint-panel { background: var(--bg-panel); color: var(--text); }
.paint-panel-2 { background: var(--bg-panel-2); color: var(--text); }
.paint-border { background: var(--border); color: var(--text); }
.paint-accent { background: var(--accent); color: var(--on-accent); }
.paint-accent-dark { background: var(--accent-dark); color: var(--on-accent); }
.paint-text { background: var(--text); color: var(--on-accent); }
.paint-muted { background: var(--text-muted); color: var(--on-accent); }
.paint-faint { background: var(--text-faint); color: var(--text); }
.paint-white { background: var(--on-accent); color: var(--text); }
.paint-success { background: var(--success); color: var(--on-accent); }
.paint-warn { background: var(--warn); color: var(--text); }
.paint-error { background: var(--error); color: var(--on-accent); }

@media (max-width: 1100px) {
  .fact { padding-inline: 12px; gap: 8px; }
  .fact__v { font-size: 11px; }
  .rules { font-size: 19px; }
}
@media (max-width: 860px) {
  .facts { flex-wrap: wrap; border-radius: var(--r-card-mobile); padding: 6px; }
  .fact { flex: 1 1 100%; justify-content: center; padding: 8px 12px; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--border); }
  .fact__v { font-size: 13px; }
  .tabs__panel { padding: 32px; }
  .tabs__panel h3 { font-size: 30px; }
}
@media (max-width: 768px) {
  .hero__title { font-size: clamp(24px, 5vw, 30px); }
  .shot-layout { flex-direction: column; }
  .store-panel { padding: 48px 24px; border-radius: var(--r-card-mobile); }
}
@media (max-width: 640px) {
  .hero { padding-top: 28px; }
  .hero__title { font-size: clamp(24px, 7.4vw, 30px); }
  .hero__lede { font-size: 15.5px; }
  .devices { gap: 8px 14px; }
  .devices__sep { display: none; }
  .fact { text-align: center; }
  .fact__v { font-size: 11px; }
  .conf { border-radius: var(--r-card-mobile); margin-top: 28px; }
  .conf__bar { height: 52px; padding: 0 16px 0 20px; gap: 8px; }
  .conf__file { font-size: 12.5px; gap: 6px; }
  .conf__file svg { display: none; }
  .conf__tab { height: 26px; padding: 0 9px; font-size: 11.5px; }
  .conf__tabs { gap: 5px; }
  .conf__body { padding: 16px 12px 120px; overflow: hidden; }
  .conf__body::after { content: ""; position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 56px; background: linear-gradient(90deg, var(--white-clear), var(--bg)); color: var(--text); pointer-events: none; }
  .rules { font-size: 14px; }
  .rule { height: 36px; gap: 16px; padding: 0 12px; border-radius: var(--r-mark); }
  .rule--hit { position: static; }
  .hit { top: auto; bottom: 24px; right: 24px; width: 72px; height: 72px; transform: none; }
  .hit__dot { box-shadow: 0 0 0 8px var(--bg-panel-2), var(--shadow-mark); }
  .hit__dot svg { width: 28px; height: 28px; margin-left: 3px; }
  .hit__tag { top: auto; left: auto; bottom: 50%; transform: translate(calc(-100% - 22px), 50%); font-size: 11.5px; height: 28px; padding: 0 11px; }
  .tabs__list { gap: 6px; margin-bottom: 24px; }
  .tabs__tab { padding: 10px 14px; font-size: 12px; }
  .tabs__panel { padding: 24px; border-radius: var(--r-card-mobile); }
  .tabs__panel h3 { font-size: 28px; }
  .device-card { padding: 28px; border-radius: var(--r-card-mobile); }
  .article-card { padding: 24px 4px; }
  .term-card { padding: 24px; border-radius: var(--r-card-mobile); }
  .term-card dt { font-size: 19px; }
  .callout { padding: 20px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-store { padding: 24px; }
}
@media (max-width: 420px) {
  .hit__tag { display: none; }
  .conf__bar { padding-inline: 12px; }
  .conf__tab { padding-inline: 6px; font-size: 10px; }
  .conf__file { font-size: 11px; }
}