/* Atlas: a static editorial illustration, not an application interface. */
.atlas {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--bg-panel-2);
  color: var(--on-dark);
  border-radius: var(--r-panel) 0 0 var(--r-panel);
}
.atlas-canvas { position: absolute; left: 50%; top: 50%; width: 640px; height: 860px; margin: -430px 0 0 -320px; }
.net { position: absolute; inset: 0; width: 640px; height: 860px; max-width: none; overflow: visible; z-index: 1; }
.net line, .net polyline { stroke: var(--net-line); stroke-width: 1; fill: none; opacity: 0.5; vector-effect: non-scaling-stroke; }
.net .see { stroke-dasharray: 3 5; }
.q { position: absolute; z-index: 3; margin: 0; font-family: var(--font-serif); font-weight: var(--weight-normal); font-size: 26px; line-height: 1.3; letter-spacing: 0.005em; color: var(--on-dark); text-align: center; }
.q span { display: block; white-space: nowrap; }
.q-1 { left: 150px; top: 196px; width: 170px; }
.q-2 { left: 380px; top: 380px; width: 200px; }
.q-3 { left: 110px; top: 560px; width: 150px; }
.q-4 { left: 410px; top: 676px; width: 150px; }
.tile { position: absolute; z-index: 2; overflow: hidden; border-radius: var(--r-tile); background: var(--tile); color: var(--text); }
.c-sage { --tile: var(--ill-sage); --pat: var(--pat-ink); }
.c-clay { --tile: var(--ill-clay); --pat: var(--pat-ink); }
.c-slate { --tile: var(--ill-slate); --pat: var(--pat-ink); }
.c-plum { --tile: var(--ill-plum); --pat: var(--pat-light); }
.c-sand { --tile: var(--ill-sand); --pat: var(--pat-ink); }
.c-bone { --tile: var(--ill-bone); --pat: var(--pat-ink); }
.b-clay { --tile-b: var(--ill-clay); }
.b-sand { --tile-b: var(--ill-sand); }
.b-slate { --tile-b: var(--ill-slate); }
.tile::before, .tile::after { content: ""; position: absolute; pointer-events: none; }
.tex-hatch::before { inset: -50%; transform: rotate(45deg); background: var(--clear); color: var(--text); border-left: 1px solid var(--pat); box-shadow: none; }
.tex-hatch { border: 1px solid var(--pat); }
.tex-hatch::after { inset: 8px; border: 1px solid var(--pat); transform: skewY(-25deg); }
.tex-grid::before { inset: 12px; border: 1px solid var(--pat); }
.tex-grid::after { inset: 24px; border: 1px solid var(--pat); }
.tex-dots::before { width: 3px; height: 3px; left: 12px; top: 12px; border-radius: var(--r-circle); background: var(--pat); color: var(--text); }
.tex-dots svg { width: 100%; height: 100%; fill: var(--pat); }
.tex-split::before { inset: 0 0 0 50%; background: var(--tile-b); color: var(--text); }
.tile-pattern { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--pat); stroke-width: 1; }
.tile-tag { position: absolute; z-index: 2; left: 6px; right: 6px; bottom: 6px; font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5; letter-spacing: 0.01em; color: var(--on-dark); }
.tile-tag span { background: var(--bg-panel-2); color: var(--on-dark); padding: 1px 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.k-a { left: 40px; top: 96px; width: 84px; height: 84px; }
.k-b { left: 360px; top: 140px; width: 64px; height: 64px; }
.k-o { left: 470px; top: 130px; width: 56px; height: 56px; }
.k-c { left: 40px; top: 300px; width: 72px; height: 72px; }
.k-d { left: 290px; top: 290px; width: 56px; height: 56px; }
.k-e { left: 520px; top: 250px; width: 76px; height: 76px; }
.k-p { left: 188px; top: 406px; width: 56px; height: 56px; }
.k-f { left: 596px; top: 470px; width: 72px; height: 72px; }
.k-g { left: 330px; top: 500px; width: 60px; height: 60px; }
.k-k { left: 560px; top: 600px; width: 60px; height: 60px; }
.k-h { left: 36px; top: 690px; width: 80px; height: 80px; }
.k-i { left: 230px; top: 700px; width: 68px; height: 68px; }
.k-l { left: 420px; top: 816px; width: 64px; height: 64px; }
.k-m { left: 566px; top: 812px; width: 72px; height: 72px; }
.k-n { left: 180px; top: 830px; width: 64px; height: 64px; }

/* Inline expanding entry index. */
.entry-index { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.index-intro { position: sticky; top: 40px; min-width: 0; }
.index-intro p { max-width: 26em; font-family: var(--font-serif); font-size: var(--text-lead); color: var(--on-dark-soft); }
.entry-tabs { min-width: 0; }
.entry-tabs [role="tab"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 76px;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: var(--clear);
  color: var(--on-dark);
  text-align: left;
  font-size: var(--text-lead);
  font-weight: var(--weight-bold);
}
.entry-tabs [role="tab"] .tab-category { flex-shrink: 0; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-normal); letter-spacing: 0.08em; color: var(--on-dark-soft); }
.entry-tabs [role="tab"][aria-selected="true"] { text-decoration: underline; text-underline-offset: 7px; }
.entry-tabs [role="tabpanel"] { padding: var(--card-pad); margin-bottom: 20px; border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.entry-tabs [role="tabpanel"] :focus-visible { outline-color: var(--text); }
.entry-tabs [role="tabpanel"] p { line-height: 1.85; }
.entry-tabs [role="tabpanel"] pre { margin-block: 24px; }
.entry-tabs [role="tabpanel"] .meta { display: block; margin-block: 8px; color: var(--text-muted); }
.tab-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab-strip [role="tab"] { min-height: 48px; padding: 10px 18px; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg-panel); color: var(--text); }
.tab-strip [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.toc {
  position: sticky;
  top: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px;
  margin-bottom: 40px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  overscroll-behavior-inline: contain;
}
.toc a { flex-shrink: 0; min-height: 44px; padding: 10px 16px; font-size: 14px; text-decoration: none; border-radius: var(--r-btn); }
.toc a:hover, .toc a[aria-current] { background: var(--accent); color: var(--on-accent); }
.toc.is-static { position: static; }
.faq-item { padding-block: 4px; border-bottom: 1px solid var(--border); }
.faq-item summary { position: relative; min-height: 64px; padding: 20px 40px 20px 0; list-style: none; font-weight: var(--weight-semibold); cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 10px; top: 18px; font-family: var(--font-mono); font-size: var(--text-lead); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { max-width: 76ch; padding-bottom: 20px; line-height: 1.85; }
.term-card { padding: var(--card-pad); background: var(--bg-panel); color: var(--text); border-radius: var(--r-card); }
.term-card .meta { display: block; margin-bottom: 20px; }
.term-card h3 { font-weight: var(--weight-bold); }
.term-card p { font-family: var(--font-serif); font-size: var(--text-definition); }
.appstore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  max-width: 100%;
  padding: 10px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: background-color var(--ease);
}
.appstore-button:hover { background: var(--accent-dark); color: var(--on-accent); }
.appstore-button svg, .btn .apple { width: 22px; height: 22px; fill: currentColor; flex-shrink: 0; }
.btn .apple { width: 17px; height: 17px; margin-top: -2px; }
.appstore-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.appstore-label small { font-size: var(--text-xs); font-weight: var(--weight-normal); }
.appstore-label strong { font-size: var(--text-definition); font-weight: var(--weight-semibold); }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 24px; }
.fact, .badge { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.fact { font-family: var(--font-mono); }
.badge-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--success); color: var(--on-accent); }
.badge-warning .badge-dot { background: var(--warn); color: var(--text); }
.badge-error .badge-dot { background: var(--error); color: var(--on-accent); }
.official-shot { width: 100%; max-width: 280px; min-width: 0; margin-inline: auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-shot); }
.official-shot figcaption { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.7; color: var(--text-muted); }
.shot-row { display: flex; justify-content: center; align-items: flex-start; gap: 32px; min-width: 0; }
.shot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 750 / 1334;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-shot);
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: center;
}
.device-card { display: flex; flex-direction: column; align-items: flex-start; padding: var(--card-pad); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.device-card .dev-ic { width: 42px; height: 42px; margin-bottom: 28px; }
.device-card p { max-width: 32em; margin-bottom: 28px; font-family: var(--font-serif); font-size: var(--text-definition); }
.device-card .btn { margin-top: auto; }
.blog-card { display: flex; flex-direction: column; min-width: 0; padding: var(--card-pad); border-radius: var(--r-card); background: var(--bg-panel); color: var(--text); }
.blog-card h3 { margin-block: 20px; font-weight: var(--weight-bold); }
.blog-card h3 a { text-decoration: none; }
.blog-card h3 a:hover { text-decoration: underline; }
.blog-card p { font-family: var(--font-serif); font-size: var(--text-definition); }
.blog-card .card-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: auto; padding-block: 16px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: var(--text-xs); }
.blog-card .btn { align-self: flex-start; margin-top: 24px; }
.callout { margin: 28px 0; padding: 24px 28px; border-left: 3px solid var(--text); border-radius: 0 var(--r-btn) var(--r-btn) 0; background: var(--bg-panel); color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { display: block; margin-bottom: 12px; font-weight: var(--weight-bold); }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}
.data-table th, .prose table th { background: var(--bg-panel); color: var(--text); font-weight: var(--weight-semibold); }
.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
}
.dl-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  min-height: 56px;
  padding: 12px 20px;
  border: 1px solid var(--on-dark-soft);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  text-decoration: none;
}
.dl-fab svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; }
.article-store-note { margin-top: 64px; padding: var(--card-pad); background: var(--bg-panel); color: var(--text); border-radius: var(--r-card); }
.article-store-note h2 { margin-top: 0; font-size: var(--text-h3); }
.article-store-note .btn { margin-top: 12px; }
.has-article-fab .site-footer { padding-bottom: 112px; }

/* Preview utilities use the same tokens as production components. */
.preview-section-title { margin-bottom: 48px; }
.palette-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.swatch { min-width: 0; font-family: var(--font-mono); font-size: var(--text-xs); }
.swatch-color { display: block; height: 72px; margin-bottom: 10px; border: 1px solid var(--line-strong); border-radius: var(--r-btn); background: var(--swatch); color: var(--text); }
.swatch code { display: block; }
.sw-bg { --swatch: var(--bg); }
.sw-panel { --swatch: var(--bg-panel); }
.sw-panel2 { --swatch: var(--bg-panel-2); }
.sw-border { --swatch: var(--border); }
.sw-line { --swatch: var(--line-strong); }
.sw-accent { --swatch: var(--accent); }
.sw-accent-dark { --swatch: var(--accent-dark); }
.sw-text { --swatch: var(--text); }
.sw-muted { --swatch: var(--text-muted); }
.sw-success { --swatch: var(--success); }
.sw-warn { --swatch: var(--warn); }
.sw-error { --swatch: var(--error); }
.sw-white { --swatch: var(--on-accent); }
.sw-on-dark { --swatch: var(--on-dark); }
.sw-soft { --swatch: var(--on-dark-soft); }
.sw-net { --swatch: var(--net-line); }
.sw-sage { --swatch: var(--ill-sage); }
.sw-clay { --swatch: var(--ill-clay); }
.sw-slate { --swatch: var(--ill-slate); }
.sw-plum { --swatch: var(--ill-plum); }
.sw-sand { --swatch: var(--ill-sand); }
.sw-bone { --swatch: var(--ill-bone); }
.sw-ink { --swatch: var(--pat-ink); }
.sw-light { --swatch: var(--pat-light); }
.sw-clear { --swatch: var(--clear); }
.type-sample { font-family: var(--font-display); font-size: var(--text-h1); font-weight: var(--weight-display); line-height: var(--leading-heading); }
.button-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.preview-note { margin-top: 24px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); }

@media (max-width: 900px) {
  .atlas { height: 320px; margin: 0 16px 32px; border-radius: var(--r-card); }
  .atlas-canvas { top: 0; margin: -60px 0 0 -320px; transform: scale(0.6); transform-origin: 50% 0; }
  .far { display: none; }
  .entry-index { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .index-intro { position: static; }
  .palette-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .entry-tabs [role="tab"] { gap: 12px; font-size: var(--text-definition); }
  .entry-tabs [role="tab"] .tab-category { font-size: 10px; }
  .facts { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 6px; }
  .fact { padding: 5px 9px; font-size: var(--text-xs); }
  .shot-row { flex-direction: column; align-items: center; }
  .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .callout { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .appstore-button { transition: none; }
}