.hero { position: relative; overflow: hidden; padding-top: 48px; padding-bottom: 32px; }
.hero__grid {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 430px;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, var(--c-clear) 0%, var(--c-mask) 42%, var(--c-mask) 78%, var(--c-clear) 100%);
  mask-image: linear-gradient(to bottom, var(--c-clear) 0%, var(--c-mask) 42%, var(--c-mask) 78%, var(--c-clear) 100%);
}
.hero__grid svg { width: 100%; height: 100%; }
.hero__grid line { stroke: var(--c-grid); stroke-width: var(--hair); }
.hero__inner { position: relative; z-index: 1; text-align: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  max-width: 100%;
  padding: 4px 14px 4px 12px;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-muted);
  font-size: var(--size-caption);
  line-height: 20px;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
.badge__dot { position: relative; width: 8px; height: 8px; border-radius: var(--r-circle); background: var(--c-accent); flex-shrink: 0; }
.badge__dot::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-circle); background: var(--c-accent); animation: badge-breathe 2.4s ease-in-out infinite; }
@keyframes badge-breathe {
  0% { transform: scale(1); opacity: .45; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.title {
  margin: 22px auto 24px;
  font-family: var(--f-display);
  font-weight: var(--weight-regular);
  font-size: var(--size-h1);
  line-height: 1.12;
  letter-spacing: var(--tracking-display);
  color: var(--c-text);
}
.title__w { display: inline-block; white-space: nowrap; animation: title-rise .6s var(--ease-enter) both; }
.title__w--1 { animation-delay: 0s; }
.title__w--2 { animation-delay: .1s; }
.title__w--3 { animation-delay: .2s; }
.title__w--4 { animation-delay: .3s; }
.title__hl { position: relative; color: var(--c-accent); }
.title__hl::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -.08em;
  height: 3px;
  border-radius: var(--r-small);
  background: var(--c-accent);
  transform-origin: left center;
  animation: title-draw .5s cubic-bezier(.3, .7, .2, 1) .62s both;
}
@keyframes title-rise { from { opacity: 0; transform: translateY(.45em); } to { opacity: 1; transform: translateY(0); } }
@keyframes title-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cta { display: flex; align-items: center; justify-content: center; gap: 28px; }
.lede { max-width: 46em; margin: 22px auto 20px; font-size: 17px; line-height: 1.6; color: var(--c-muted); }
.lede strong { font-weight: var(--weight-medium); color: var(--c-text); }
.devices {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--size-small);
  color: var(--c-muted);
}
.devices__item { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; }
.devices__item a { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; }
.devices__item a:hover { color: var(--c-accent); }
.devices__item svg { width: 19px; height: 19px; color: var(--c-text); }
.devices__item .o { fill: none; stroke: currentColor; stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.devices__item .s { fill: currentColor; }
.devices__sep { width: 1px; height: 16px; background: var(--c-border); flex-shrink: 0; }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 3px 12px;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: var(--size-caption);
  line-height: 20px;
  overflow-wrap: anywhere;
}
.pill svg { width: 12px; height: 12px; margin-top: -1px; }
.facts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0; padding: 0; list-style: none; }
.facts--center { justify-content: center; }
.facts li { min-width: 0; max-width: 100%; }
.facts .pill { text-align: center; }
.tag { background: var(--c-panel); color: var(--c-accent-dark); border-color: var(--c-clear); }

.rig { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 40px; height: 372px; }
.rig > * { min-width: 0; }
.field {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--c-accent);
  color: var(--c-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.field__shapes { position: absolute; inset: 0; width: 100%; height: 100%; }
.field__shapes .deep { fill: var(--c-accent-dark); }
.field__shapes .mist { fill: var(--c-mist); }
.field__shapes .ring { fill: none; stroke: var(--c-mist); stroke-width: var(--line); opacity: .55; }
.field__shapes .mark { fill: var(--c-ochre); }
.snippet {
  position: relative;
  z-index: 1;
  width: min(452px, 84%);
  background: var(--c-ink);
  color: var(--c-code-text);
  border: var(--hair) solid var(--c-hair-light);
  border-radius: var(--r-card);
  font-family: var(--f-mono);
  text-align: left;
  overflow: hidden;
}
.snippet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: var(--hair) solid var(--c-hair-light);
  font-size: 12px;
  color: var(--c-code-muted);
  letter-spacing: .02em;
}
.snippet__tag { padding: 2px 8px; border-radius: var(--r-pill); border: var(--hair) solid var(--c-hair-light); color: var(--c-code-key); }
.snippet__body { margin: 0; padding: 14px 18px 18px 0; overflow-x: auto; list-style: none; font-size: var(--size-small); line-height: 26px; }
.snippet__body li { display: grid; grid-template-columns: 44px max-content; white-space: pre; }
.snippet__n { color: var(--c-code-muted); text-align: right; padding-right: 16px; user-select: none; }
.k { color: var(--c-code-key); }
.p { color: var(--c-code-muted); }
.sec { color: var(--c-on-dark); }
.sketch {
  border-radius: var(--r-panel);
  background: var(--c-panel);
  color: var(--c-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sketch svg { height: 324px; width: auto; max-width: 100%; }
.sketch .o { fill: none; stroke: var(--c-text); stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.sketch .dash { stroke-dasharray: 3 4; }
.sketch .s { fill: var(--c-text); }
.sketch text { font-family: var(--f-mono); font-size: 10px; fill: var(--c-text); letter-spacing: .04em; }
.next { padding-top: 14px; padding-bottom: 64px; }
.next__row { display: flex; align-items: center; gap: 16px; font-size: var(--size-caption); color: var(--c-muted); letter-spacing: .04em; }
.next__row::after { content: ""; flex: 1; height: 1px; background: var(--c-border); }
.next__title { margin: 28px 0 0; font-family: var(--f-display); font-weight: var(--weight-regular); font-size: 28px; letter-spacing: var(--tracking-heading); }

.feature-tabs { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 64px; }
.feature-tabs [role="tablist"] { display: flex; flex-direction: column; align-self: start; }
.feature-tabs [role="tab"] {
  position: relative;
  width: 100%;
  min-height: 66px;
  padding: 18px 20px;
  border: 0;
  border-bottom: var(--hair) solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-muted);
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: var(--weight-regular);
  text-align: left;
}
.feature-tabs [role="tab"]::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; background: var(--c-clear); }
.feature-tabs [role="tab"][aria-selected="true"] { color: var(--c-text); }
.feature-tabs [role="tab"][aria-selected="true"]::before { background: var(--c-accent); }
.feature-detail {
  position: relative;
  padding: 40px;
  border-radius: var(--r-panel);
  background: var(--c-panel);
  color: var(--c-text);
}
.feature-detail h3 { margin: 32px 0 20px; }
.feature-detail p { max-width: 43em; line-height: 1.9; }
.feature-detail__glyph { display: block; width: 72px; height: 72px; margin-left: auto; fill: none; stroke: var(--c-text); stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.feature-detail pre { margin-bottom: 0; }
.tab-strip { display: flex; gap: 20px; overflow-x: auto; border-bottom: var(--hair) solid var(--c-border); }
.tab-strip [role="tab"] { flex-shrink: 0; padding: 12px 4px; border: 0; border-bottom: 2px solid var(--c-clear); background: var(--c-bg); color: var(--c-muted); }
.tab-strip [role="tab"][aria-selected="true"] { border-bottom-color: var(--c-accent); color: var(--c-text); }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 16px 20px;
  margin-bottom: 40px;
  border-radius: var(--r-card);
  background: var(--c-panel);
  color: var(--c-text);
}
.toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--size-small); }
.toc a:hover, .toc a[aria-current="location"] { color: var(--c-accent); text-decoration: underline; text-underline-offset: 5px; }
.toc--sticky { position: sticky; top: calc(var(--nav-h) + 12px); z-index: 10; }
.toc--static { position: static; }

.faq-group { border-top: var(--hair) solid var(--c-border); }
.faq-item { border-bottom: var(--hair) solid var(--c-border); }
.faq-item summary { position: relative; padding: 24px 40px 24px 0; cursor: pointer; list-style: none; font-size: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 24px; color: var(--c-accent); font-family: var(--f-mono); }
.faq-item[open] summary::after { content: "−"; }
.faq-item__answer { max-width: 60em; padding-bottom: 20px; color: var(--c-muted); }
.faq-item__answer p:last-child { margin-bottom: 0; }
.term-card { padding: 28px; border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.term-card h3 { margin: 16px 0; }
.term-card p { margin-bottom: 0; color: var(--c-muted); }
.term-card code { color: var(--c-accent-dark); }
.app-store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  max-width: 100%;
  padding: 10px 24px;
  border: var(--hair) solid var(--c-clear);
  border-radius: var(--r-pill);
  background: var(--c-text);
  color: var(--c-on-dark);
  text-align: left;
  line-height: 1.3;
  transition: background-color var(--time-fast) ease;
}
.app-store-button:hover { background: var(--c-accent-dark); color: var(--c-on-dark); }
.app-store-button:active { background: var(--c-accent); color: var(--c-on-dark); }
.app-store-button svg { width: 25px; height: 25px; fill: currentColor; }
.app-store-button__copy { display: block; }
.app-store-button__copy small { display: block; font-size: 11px; }
.app-store-button__copy strong { display: block; font-size: 17px; font-weight: var(--weight-medium); }
.app-store-button--primary { min-height: 64px; padding-inline: 30px; }
.official-shot { width: 100%; max-width: 280px; margin-inline: auto; padding: 0; flex-shrink: 0; }
.official-shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.official-shot img { outline: var(--hair) solid var(--c-border); outline-offset: -1px; }
.official-shot figcaption { margin-top: 12px; color: var(--c-muted); font-size: var(--size-caption); line-height: 1.6; }
.shot-with-copy { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.device-card { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.device-card__icon { width: 48px; height: 56px; margin-bottom: 24px; fill: none; stroke: currentColor; stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.device-card__icon .solid { fill: currentColor; stroke: none; }
.device-card h3 { margin: 0 0 12px; }
.device-card p { color: var(--c-muted); margin-bottom: 24px; }
.device-card .btn-text { margin-top: auto; }
.article-card { display: flex; flex-direction: column; align-items: flex-start; padding: 28px; border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.article-card h3 { margin: 20px 0 16px; font-size: var(--size-h3); }
.article-card h3 a:hover { color: var(--c-accent); }
.article-card p { color: var(--c-muted); }
.article-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--c-muted); font-size: var(--size-caption); }
.article-card > .btn-text { margin-top: auto; }
.callout { margin: 28px 0; padding: 24px 28px; border-left: 2px solid var(--c-accent); border-radius: 0 var(--r-card) var(--r-card) 0; background: var(--c-panel); color: var(--c-text); }
.callout p:last-child { margin-bottom: 0; }
.callout__label { display: block; margin-bottom: 8px; font-size: var(--size-small); color: var(--c-accent-dark); font-weight: var(--weight-medium); }
.callout--warning { border-left-color: var(--c-warn); }
.callout--error { border-left-color: var(--c-error); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--c-muted); font-size: var(--size-small); }
.status::before { content: ""; width: 7px; height: 7px; flex-shrink: 0; border-radius: var(--r-circle); background: var(--c-success); }
.status--warning::before { background: var(--c-warn); }
.status--error::before { background: var(--c-error); }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--size-small); }
.data-table caption { padding-bottom: 16px; text-align: left; color: var(--c-muted); }
.data-table th, .data-table td, .prose table th, .prose table td {
  min-width: 7em;
  padding: 16px 20px;
  border-bottom: var(--hair) 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-medium); }
.data-table td, .prose table td { background: var(--c-bg); color: var(--c-text); }
.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; }

.dl-fab {
  position: fixed;
  z-index: 25;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  max-width: calc(100% - var(--gutter) * 2);
  padding: 12px 20px;
  border: var(--hair) solid var(--c-hair-light);
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: var(--c-on-dark);
  font-size: var(--size-small);
}
.dl-fab:hover { background: var(--c-accent-dark); color: var(--c-on-dark); }
.dl-fab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.article-store-guide { margin-top: 48px; padding: 28px; border-radius: var(--r-panel); background: var(--c-panel); color: var(--c-text); }
.article-store-guide h2 { margin: 0 0 16px; font-size: 24px; }
.article-store-guide p { color: var(--c-muted); }

.geometry-band { position: relative; min-height: 240px; overflow: hidden; border-radius: var(--r-section); background: var(--c-accent); color: var(--c-on-dark); }
.geometry-band svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.geometry-band .deep { fill: var(--c-accent-dark); }
.geometry-band .mist { fill: var(--c-mist); }
.geometry-band .line { fill: none; stroke: var(--c-mist); stroke-width: var(--line); }
.quickstart { padding: 48px; border-radius: var(--r-section); background: var(--c-panel); color: var(--c-text); }
.grouped-list { margin: 24px 0; padding: 0; list-style: none; border-radius: var(--r-card); background: var(--c-bg); color: var(--c-text); }
.grouped-list li + li { border-top: var(--hair) solid var(--c-border); }
.grouped-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 18px 24px; }
.grouped-list a::after { content: "›"; color: var(--c-muted); flex-shrink: 0; }
.grouped-list a:hover { color: var(--c-accent); }
.rule-layer { padding: 48px; border-radius: var(--r-section); background: var(--c-ink); color: var(--c-code-text); }
.rule-layer h2 { color: var(--c-on-dark); }
.rule-layer p { color: var(--c-code-muted); }
.rule-layer pre { border: var(--hair) solid var(--c-hair-light); }

.swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.swatch { margin: 0; font-family: var(--f-mono); font-size: 12px; overflow-wrap: anywhere; }
.swatch__color { height: 80px; margin-bottom: 10px; border: var(--hair) solid var(--c-border); border-radius: var(--r-card); color: var(--c-text); }
.swatch--bg { background: var(--c-bg); }
.swatch--panel { background: var(--c-panel); }
.swatch--ink { background: var(--c-ink); color: var(--c-on-dark); }
.swatch--border { background: var(--c-border); }
.swatch--grid { background: var(--c-grid); }
.swatch--accent { background: var(--c-accent); color: var(--c-on-dark); }
.swatch--accent-dark { background: var(--c-accent-dark); color: var(--c-on-dark); }
.swatch--mist { background: var(--c-mist); }
.swatch--ochre { background: var(--c-ochre); }
.swatch--text { background: var(--c-text); color: var(--c-on-dark); }
.swatch--muted { background: var(--c-muted); color: var(--c-on-dark); }
.swatch--success { background: var(--c-success); color: var(--c-on-dark); }
.swatch--warn { background: var(--c-warn); }
.swatch--error { background: var(--c-error); color: var(--c-on-dark); }
.swatch--key { background: var(--c-code-key); }
.swatch--code { background: var(--c-code-text); }
.swatch--dim { background: var(--c-code-dim); color: var(--c-on-dark); }
.swatch--code-muted { background: var(--c-code-muted); }
.swatch--hair { background: linear-gradient(var(--c-hair-light), var(--c-hair-light)), var(--c-ink); color: var(--c-on-dark); }
.swatch--on-dark { background: var(--c-on-dark); }
.swatch--mask { background: var(--c-mask); color: var(--c-on-dark); }
.swatch--clear { background: var(--c-clear); }
.swatch--veil { background: var(--c-veil); }
.preview-shot {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 750 / 1334;
  border: var(--hair) solid var(--c-border);
  border-radius: var(--r-shot);
  background: var(--c-panel);
  color: var(--c-muted);
  font-family: var(--f-mono);
  font-size: var(--size-small);
}
.preview-stack { display: grid; gap: 24px; }
.preview-type-title { margin-top: 0; font-size: var(--size-h1); line-height: 1.12; }
.preview-label { margin: 0 0 24px; color: var(--c-muted); font-family: var(--f-mono); font-size: var(--size-caption); }

@media (max-width: 980px) {
  .rig { grid-template-columns: minmax(0, 1fr); height: auto; }
  .field { min-height: 320px; }
  .sketch { min-height: 360px; }
  .feature-tabs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature-tabs [role="tablist"] { flex-direction: row; max-width: 100%; overflow-x: auto; }
  .feature-tabs [role="tab"] { width: auto; flex-shrink: 0; min-height: 54px; padding: 12px 16px; font-size: 18px; white-space: nowrap; }
  .feature-tabs [role="tab"]::before { inset: auto 16px 0; height: 2px; width: auto; }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .shot-with-copy { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .title { letter-spacing: var(--tracking-heading); }
}
@media (max-width: 640px) {
  .hero { padding-top: 36px; }
  .lede { font-size: 15px; }
  .cta { flex-direction: column; gap: 18px; }
  .devices { gap: 8px 16px; }
  .devices__sep { display: none; }
  .snippet { width: 92%; }
  .snippet__body { font-size: 12px; line-height: 22px; }
  .snippet__body li { grid-template-columns: 34px max-content; }
  .snippet__n { padding-right: 10px; }
  .feature-detail, .quickstart, .rule-layer { padding: 24px; }
  .feature-detail h3 { margin-top: 24px; }
  .toc { flex-wrap: nowrap; overflow-x: auto; gap: 20px; padding: 12px 16px; }
  .toc a { flex-shrink: 0; }
  .device-card { padding: 24px; }
  .official-shot { max-width: min(280px, 100%); }
  .facts { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .geometry-band { min-height: 180px; }
  .grouped-list a { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .title__w, .title__hl::after { animation: none; opacity: 1; transform: none; }
  .badge__dot::after { animation: none; opacity: 0; }
  .app-store-button { transition: none; }
}