:root {
  --cy: oklch(0.35 0.105 252);
  --cy-deep: oklch(0.28 0.09 254);
  --cy-lift: oklch(0.41 0.10 250);
  --chalk: oklch(0.965 0.012 240);
  --line2: oklch(0.82 0.045 245);
  --red: oklch(0.80 0.13 32);
  --stamp: oklch(0.87 0.12 95);
  --grid-min: oklch(0.965 0.012 240 / 0.07);
  --grid-maj: oklch(0.965 0.012 240 / 0.16);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: 'Michroma', 'Azeret Mono', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --mono: 'Azeret Mono', ui-monospace, monospace;
  --ta: right;
  --pad: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
html.flipped { --ta: left; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--chalk);
  background-color: var(--cy);
  background-image:
    radial-gradient(ellipse 80% 60% at 18% 0%, oklch(0.44 0.10 247 / 0.55), transparent 70%),
    radial-gradient(ellipse 70% 60% at 100% 100%, oklch(0.25 0.085 256 / 0.8), transparent 70%),
    linear-gradient(var(--grid-maj) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-maj) 1px, transparent 1px),
    linear-gradient(var(--grid-min) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-min) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  overflow-x: clip;
  font-variant-numeric: tabular-nums;
}
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }
.sheet p, .sheet li p, .sheet summary, .sheet td, .sheet small, .sheet caption { unicode-bidi: plaintext; text-align: var(--ta); }

/* mirror mechanics */
.bar, .sheet { direction: rtl; }
html.flipped .bar, html.flipped .sheet { direction: ltr; }
.mir {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  transform: scaleX(-1);
  max-width: 100%;
}
.mir-svg, .views svg { transform: scaleX(-1); }
#markDraw .dim-t text { transform-box: fill-box; transform-origin: center; transform: scaleX(-1); }
html.flipped .mir, html.flipped .mir-svg, html.flipped .views svg, html.flipped #markDraw .dim-t text { transform: none; }

.stage { perspective: 2400px; }
.sheet { transform-style: flat; backface-visibility: hidden; }
.sheet.turn-out { animation: turnOut 0.42s cubic-bezier(0.55, 0, 0.8, 0.2) forwards; }
.sheet.turn-in { animation: turnIn 0.6s var(--ease) both; }
@keyframes turnOut { to { transform: rotateY(88deg); opacity: 0.35; } }
@keyframes turnIn { from { transform: rotateY(-88deg); opacity: 0.35; } to { transform: none; opacity: 1; } }

.skip { position: absolute; top: -60px; left: 12px; z-index: 100; background: var(--chalk); color: var(--cy-deep); padding: 8px 12px; }
.skip:focus { top: 12px; }

:focus-visible { outline: 2px dashed var(--red); outline-offset: 3px; }

/* ---------- controls ---------- */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  font: 600 15px/1 var(--text); letter-spacing: 0.01em;
  border-radius: 2px; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--chalk);
  transition: transform 160ms var(--ease), background-color 160ms, box-shadow 160ms, color 160ms;
  white-space: nowrap;
  direction: ltr;
}
.btn-ink { background: var(--chalk); color: var(--cy-deep); box-shadow: 0 2px 0 oklch(0.2 0.07 255 / 0.6); }
.btn-ink:hover { transform: translateY(-1px); box-shadow: 0 4px 0 oklch(0.2 0.07 255 / 0.6); }
.btn-line { background: oklch(0.3 0.09 254 / 0.4); color: var(--chalk); }
.btn-line:hover { background: oklch(0.965 0.012 240 / 0.12); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; transform: none; }
.btn.is-done { background: var(--stamp); border-color: var(--stamp); color: var(--cy-deep); }
.btn-text {
  background: none; border: 0; padding: 4px 0; color: var(--chalk); font: 600 15px var(--text);
  text-decoration: underline; text-decoration-style: dashed; text-underline-offset: 5px; cursor: pointer;
}
.btn-text:hover { color: var(--stamp); }
.muted { color: var(--line2); }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  height: 64px; padding: 0 var(--pad);
  background: oklch(0.28 0.09 254 / 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid oklch(0.965 0.012 240 / 0.3);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-family: var(--display); font-size: 16px; }
.routes { display: flex; gap: 4px; flex: 1; }
.routes a {
  padding: 8px 12px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--line2);
  border-bottom: 1.5px solid transparent;
}
.routes a:hover { color: var(--chalk); }
.routes a[aria-current="page"] { color: var(--chalk); border-bottom-color: var(--chalk); }
.bar-tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.menu-btn { display: none; }
.flip-short { display: none; }
.menu-sheet {
  position: absolute; top: 64px; inset-inline: 0;
  display: grid; gap: 2px; padding: 12px var(--pad) 16px;
  background: var(--cy-deep); border-bottom: 1px solid oklch(0.965 0.012 240 / 0.3);
}
.menu-sheet[hidden] { display: none; }
.menu-sheet a { padding: 12px 4px; text-decoration: none; font-weight: 500; border-bottom: 1px dashed oklch(0.965 0.012 240 / 0.2); }
.menu-sheet .btn { margin-top: 10px; }

.chip-wrap { position: relative; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; direction: ltr;
  height: 40px; padding: 0 12px;
  background: oklch(0.22 0.075 256 / 0.6); color: var(--chalk);
  border: 1px solid oklch(0.965 0.012 240 / 0.45); border-radius: 2px;
  font: 500 14px var(--mono); cursor: pointer;
}
.chip:hover { border-color: var(--chalk); }
.chip-sym { font-weight: 500; }
.chip-price { color: var(--line2); }
.chip-chg.up { color: var(--stamp); }
.chip-chg.down { color: var(--red); }
.chip-sheet {
  position: absolute; top: 50px; inset-inline-end: 0; z-index: 50;
  width: 320px; padding: 16px; direction: ltr;
  background: var(--cy-deep); color: var(--chalk);
  border: 1px solid var(--chalk); border-radius: 2px;
  box-shadow: 0 18px 40px oklch(0.15 0.06 256 / 0.6);
  display: grid; gap: 12px;
}
.chip-sheet[hidden] { display: none; }
.cs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cs-head strong { font-family: var(--display); font-weight: 400; font-size: 17px; }
.cs-head span { font-size: 13px; color: var(--line2); }
.cs-spark { width: 100%; height: 56px; border-bottom: 1px dashed oklch(0.965 0.012 240 / 0.3); }
.cs-spark path { fill: none; stroke: var(--chalk); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.cs-spark .base { stroke: var(--line2); stroke-dasharray: 3 4; stroke-width: 1; }
.cs-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0; }
.cs-stats dt { font-size: 12px; color: var(--line2); }
.cs-stats dd { margin: 0; font: 500 15px var(--mono); }
.cs-ca:empty { display: none; }
.cs-buy { width: 100%; }
.cs-note { font-size: 14px; color: var(--line2); }

.addr {
  display: inline-flex; align-items: center; gap: 8px; direction: ltr;
  font: 500 14px var(--mono);
}
.addr a { text-decoration: none; border-bottom: 1px dashed currentColor; }
.copy {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  background: none; border: 1px solid oklch(0.965 0.012 240 / 0.5); border-radius: 2px;
  color: var(--chalk); cursor: pointer;
}
.copy:hover { border-color: var(--chalk); background: oklch(0.965 0.012 240 / 0.1); }
.copy.ok { color: var(--cy-deep); background: var(--stamp); border-color: var(--stamp); }
.copy .ic { width: 16px; height: 16px; }

/* ---------- hero: the Mirror ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr);
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(20px, 3.4vw, 44px) var(--pad) clamp(40px, 5vw, 72px);
  align-items: start;
  position: relative;
}
.shared-note {
  grid-column: 1 / -1;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 10px 14px; border: 1.5px dashed var(--red); color: var(--chalk);
}
.shared-note[hidden] { display: none; }
.hero-title { display: grid; gap: 22px; }
.mark-draw { margin: 0; width: min(100%, 470px); aspect-ratio: 1; margin-top: -8px; }
.mark-draw svg { width: 100%; height: 100%; overflow: visible; }
.hero-name { display: grid; gap: 14px; }
.wordmark { font-size: clamp(34px, 4.3vw, 66px); letter-spacing: -0.03em; line-height: 1; direction: ltr; unicode-bidi: isolate; width: fit-content; }
.rule-line { font-size: 19px; max-width: 34ch; color: var(--chalk); }
.proof { font-size: 15px; color: var(--line2); }
.proof-n { font: 500 22px var(--mono); color: var(--stamp); display: inline-block; min-width: 2ch; }

.hero-work { display: grid; gap: 14px; min-width: 0; }
.prompt { font-family: var(--display); font-size: clamp(22px, 2.3vw, 34px); line-height: 1.15; display: block; }
.field { position: relative; }
.field textarea {
  display: block; width: 100%; resize: none;
  min-height: 84px; padding: 14px 16px 26px;
  font: 500 20px/1.4 var(--text); color: var(--chalk);
  direction: ltr; text-align: left;
  background:
    repeating-linear-gradient(transparent 0 27px, oklch(0.965 0.012 240 / 0.12) 27px 28px) 0 13px / 100% 100% no-repeat,
    var(--cy-lift);
  border: 1.5px solid var(--chalk); border-radius: 2px;
}
.field textarea::placeholder { color: oklch(0.82 0.045 245 / 0.9); }
.field textarea:focus { outline: 2px dashed var(--red); outline-offset: 3px; }
.field textarea[aria-invalid="true"] { border-color: var(--red); }
.count { position: absolute; bottom: 6px; right: 12px; font: 400 12px var(--mono); color: var(--line2); direction: ltr; }
.field-err { min-height: 0; font-size: 15px; color: var(--red); }
.field-err:empty { display: none; }

.card-frame {
  position: relative; width: 100%; aspect-ratio: 1200 / 630;
  border: 1px solid oklch(0.965 0.012 240 / 0.6);
  box-shadow: 0 0 0 6px oklch(0.28 0.09 254 / 0.6), 0 24px 50px oklch(0.15 0.06 256 / 0.5);
  touch-action: pan-y;
  overflow: hidden;
  background: var(--cy-deep);
}
.card-frame canvas { display: block; width: 100%; height: 100%; }
.xh { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 150ms; }
.xh.on { opacity: 1; }
.xh-v, .xh-h { position: absolute; background: oklch(0.80 0.13 32 / 0.8); }
.xh-v { top: 0; bottom: 0; width: 1px; left: 0; }
.xh-h { left: 0; right: 0; height: 1px; top: 0; }
.xh-t {
  position: absolute; left: 0; top: 0; font: 500 11px var(--mono); color: var(--cy-deep);
  background: var(--red); padding: 2px 5px; white-space: nowrap; direction: ltr;
}
.stamp {
  position: absolute; top: 14%; left: 8%;
  padding: 8px 18px; font: 400 26px var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stamp); border: 4px double var(--stamp); border-radius: 3px;
  transform: rotate(-9deg) scale(1.6); opacity: 0; pointer-events: none;
}
.stamp.show { animation: stamp 1.6s var(--ease) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-9deg) scale(1.6); }
  14% { opacity: 1; transform: rotate(-9deg) scale(1); }
  80% { opacity: 1; transform: rotate(-9deg) scale(1); }
  100% { opacity: 0; transform: rotate(-9deg) scale(1); }
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; direction: rtl; }
html.flipped .actions { direction: ltr; }
.sign-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sign-hint { font-size: 14px; color: var(--line2); direction: ltr; unicode-bidi: plaintext; }
.toggle {
  display: inline-flex; align-items: center; gap: 10px; direction: ltr;
  background: none; border: 0; color: var(--chalk); cursor: pointer; padding: 6px 0;
  font: 500 15px var(--text);
}
.tg-track {
  width: 44px; height: 24px; border: 1.5px solid var(--chalk); border-radius: 2px; position: relative;
  background: oklch(0.25 0.08 255 / 0.6);
}
.tg-knob {
  position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: var(--line2);
  transition: transform 180ms var(--ease), background-color 180ms;
}
.toggle[aria-checked="true"] .tg-knob { transform: translateX(20px); background: var(--stamp); }

/* ---------- drawn svg ---------- */
.drawn { color: var(--line2); }
.drawn .ink path, .drawn .ink rect { fill: none; stroke: var(--chalk); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.drawn .ink .thin { stroke-width: 1.2; }
.drawn .ink .ghost { stroke: var(--line2); stroke-dasharray: 5 4; stroke-width: 1.6; }
.drawn .ink .fire { stroke: var(--red); stroke-width: 1.8; }
.drawn .cons circle, .drawn .cons path { fill: none; stroke: var(--line2); stroke-width: 1; stroke-dasharray: 5 5; opacity: 0.8; }
.drawn .cons .centre { stroke-dasharray: 22 5 3 5; }
.drawn .cons .fine { opacity: 0.45; }
.drawn .dim path { fill: none; stroke: var(--line2); stroke-width: 1; }
.drawn .dim-t text { fill: var(--line2); font: 500 13px var(--mono); }
.drawn .xhair circle, .drawn .xhair path { fill: none; stroke: var(--chalk); stroke-width: 1; opacity: 0.8; }
.drawn .redline path { fill: none; stroke: var(--red); stroke-width: 1.6; }
.drawn .grid-lite path { stroke: var(--chalk); stroke-width: 1; opacity: 0.12; }
.drawn .flow path { fill: none; stroke: var(--stamp); stroke-width: 2; stroke-dasharray: 3 9; stroke-linecap: round; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
svg marker path { fill: var(--line2); }

.drawn.draw-on .ink path, .drawn.draw-on .ink rect { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.9s var(--ease) forwards; }
.drawn.draw-on .ink path:nth-child(2) { animation-delay: 0.12s; }
.drawn.draw-on .ink path:nth-child(3) { animation-delay: 0.22s; }
.drawn.draw-on .ink .ghost { stroke-dasharray: 5 4; stroke-dashoffset: 0; animation: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- bands ---------- */
.band { background: oklch(0.28 0.09 254 / 0.88); border-block: 1px solid oklch(0.965 0.012 240 / 0.3); }
.recent { padding: clamp(32px, 4vw, 56px) 0; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 0 var(--pad) 22px; flex-wrap: wrap; }
.band-head h2, .split-head h2, .how h2, .notes h2 { font-size: clamp(24px, 3vw, 44px); }
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px);
  gap: 18px; overflow-x: auto; padding: 4px var(--pad) 14px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line2) transparent;
  scroll-padding-inline: var(--pad);
  -webkit-mask-image: linear-gradient(to left, var(--cy) 80%, transparent);
  mask-image: linear-gradient(to left, var(--cy) 80%, transparent);
}
html.flipped .strip { -webkit-mask-image: linear-gradient(to right, var(--cy) 80%, transparent); mask-image: linear-gradient(to right, var(--cy) 80%, transparent); }
.scard.ghost, .scard.skel { aspect-ratio: 1200 / 700; }
.strip > * { scroll-snap-align: start; }

.scard {
  position: relative; display: grid; grid-template-rows: auto auto; gap: 8px; align-content: start;
  padding: 6px 6px 8px;
  background: var(--cy-deep);
  border: 1px solid oklch(0.965 0.012 240 / 0.5);
  text-decoration: none; color: var(--chalk);
  transition: transform 200ms var(--ease), border-color 200ms, box-shadow 200ms;
}
.scard:hover { transform: translateY(-3px) rotate(-0.4deg); border-color: var(--chalk); box-shadow: 0 14px 30px oklch(0.15 0.06 256 / 0.5); }
.scard-sheet { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; background: var(--cy); }
.scard-foot {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 2px 4px 0;
  font: 400 12px var(--mono); color: var(--line2); direction: ltr;
}
.scard-foot b { color: var(--chalk); font-weight: 500; }
.scard .tag { color: var(--red); }
.scard.new { animation: arrive 900ms var(--ease); }
@keyframes arrive { from { transform: translateY(-14px); opacity: 0; border-color: var(--stamp); } }
.scard.ghost { border-style: dashed; background-image: none; background-color: transparent; display: grid; place-items: center; text-align: center; color: var(--line2); }
.scard.ghost p { text-align: center; font-size: 15px; max-width: 26ch; }
.scard.skel { border-style: dashed; background: oklch(0.965 0.012 240 / 0.05); }
.scard.skel::after { content: ''; position: absolute; inset: 40% 16%; background: linear-gradient(90deg, transparent, oklch(0.965 0.012 240 / 0.14), transparent); animation: shimmer 1.3s linear infinite; background-size: 200% 100%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* split */
.split { padding: clamp(48px, 7vw, 110px) var(--pad); display: grid; gap: 28px; }
.split-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.split-head p { max-width: 52ch; }
.split-draw { margin: 0; }
.split-draw svg { width: 100%; height: auto; display: block; overflow: visible; }
.parts {
  width: min(100%, 860px);
  border-collapse: collapse; border: 1.5px solid var(--chalk);
  background: oklch(0.28 0.09 254 / 0.75);
}
.parts caption { caption-side: top; text-align: var(--ta); font: 400 14px var(--display); padding-bottom: 10px; color: var(--line2); }
.parts th { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--line2); text-align: var(--ta); padding: 8px 14px; border-bottom: 1px solid oklch(0.965 0.012 240 / 0.6); }
.parts td { padding: 14px; border-top: 1px solid oklch(0.965 0.012 240 / 0.3); text-align: var(--ta); vertical-align: middle; font-weight: 600; font-size: 17px; }
.parts th + th, .parts td + td { border-inline-start: 1px solid oklch(0.965 0.012 240 / 0.3); }
.parts small { display: block; font-weight: 400; font-size: 14px; color: var(--line2); margin-top: 2px; }
.p-n { width: 56px; }
.p-n span { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1.2px solid var(--chalk); border-radius: 50%; font: 500 13px var(--mono); }
.p-s { font: 500 22px var(--mono) !important; white-space: nowrap; }
.burn .p-s { color: var(--red); }
.burn .p-n span { border-color: var(--red); color: var(--red); }
.p-v { font: 500 18px var(--mono) !important; white-space: nowrap; direction: ltr; }
.pending { display: inline-block; padding: 3px 10px; border: 1px dashed var(--line2); color: var(--line2); font: 500 13px var(--mono); }
.split-state { color: var(--line2); font-size: 15px; max-width: 65ch; }
.drawn .balloon path, .drawn .balloon circle { fill: none; stroke: var(--chalk); stroke-width: 1.2; }
.drawn .balloon text { fill: var(--chalk); font: 500 15px var(--mono); }

/* how */
.how { padding: clamp(40px, 6vw, 96px) var(--pad); border-top: 1px dashed oklch(0.965 0.012 240 / 0.35); }
.views { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.views li { padding: 0 28px 8px; display: grid; gap: 10px; align-content: start; }
.views li + li { border-inline-start: 1px dashed oklch(0.965 0.012 240 / 0.35); }
.views li:first-child { padding-inline-start: 0; }
.views svg { width: 100%; max-width: 240px; height: auto; }
.views h3 { font-size: 17px; }
.views p { color: var(--line2); max-width: 38ch; }

/* notes */
.notes { padding: clamp(40px, 6vw, 96px) var(--pad); background: oklch(0.28 0.09 254 / 0.7); border-top: 1px solid oklch(0.965 0.012 240 / 0.3); }
.faq { margin-top: 28px; border-top: 1px solid oklch(0.965 0.012 240 / 0.5); max-width: 980px; }
.faq details { border-bottom: 1px solid oklch(0.965 0.012 240 / 0.3); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 18px;
  display: flex; gap: 16px; align-items: baseline; direction: inherit;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-inline-start: auto; font: 400 20px var(--mono); color: var(--line2); }
.faq details[open] summary::after { content: '\2212'; }
.faq .rev { font: 500 12px var(--mono); color: var(--red); border: 1px solid var(--red); padding: 2px 6px; flex: none; }
.faq details p { padding: 0 0 20px; max-width: 64ch; color: var(--line2); }

/* gallery view */
.gallery-view { padding: clamp(24px, 4vw, 56px) var(--pad) 80px; min-height: 70vh; }
.gal-head { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: end; margin-bottom: 28px; }
.gal-head h1 { font-size: clamp(30px, 4.4vw, 64px); }
.gal-head p { color: var(--line2); flex: 1; min-width: 200px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.gal-more { display: flex; justify-content: center; margin-top: 28px; }
.gal-error { grid-column: 1 / -1; padding: 24px; border: 1.5px dashed var(--red); display: grid; gap: 12px; justify-items: start; }

/* footer title block */
.title-block {
  display: grid; grid-template-columns: 2fr 1.5fr 1fr 1fr 1.3fr;
  margin: 0 var(--pad) 32px;
  border: 1.5px solid var(--chalk); background: var(--cy-deep);
}
.tb-cell { padding: 16px 18px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.tb-cell + .tb-cell { border-inline-start: 1px solid oklch(0.965 0.012 240 / 0.5); }
.tb-name { display: flex; gap: 14px; align-items: center; }
.tb-name strong { font: 400 22px var(--display); display: block; }
.tb-name span { font-size: 14px; color: var(--line2); }
.tb-k { font-size: 12px; color: var(--line2); font-weight: 600; letter-spacing: 0.04em; }
.tb-links { display: grid; gap: 4px; justify-items: start; }
html:not(.flipped) .tb-links { justify-items: end; }
.tb-links a { text-decoration: none; border-bottom: 1px dashed oklch(0.965 0.012 240 / 0.5); font-weight: 500; }
.tb-links a:hover { border-bottom-color: var(--chalk); }
.tb-small { grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; align-items: baseline; }
.tb-ca { min-width: 0; font: 500 14px var(--mono); }

/* toasts */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
  background: var(--chalk); color: var(--cy-deep); padding: 12px 16px; border-radius: 2px;
  font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px oklch(0.15 0.06 256 / 0.5);
  animation: toastIn 240ms var(--ease);
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
}
.toast.err { background: var(--red); }
.toast a { color: inherit; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

/* ---------- phone ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-title { grid-template-columns: minmax(0, 150px) minmax(0, 1fr); align-items: center; gap: 16px; }
  .rule-line { font-size: 16px; }
  .split-head { grid-template-columns: 1fr; }
  .title-block { grid-template-columns: 1fr 1fr; }
  .tb-name { grid-column: 1 / -1; }
  .tb-cell + .tb-cell { border-inline-start: 0; }
  .tb-cell { border-top: 1px solid oklch(0.965 0.012 240 / 0.5); }
  .tb-name { border-top: 0; }
  .tb-cell:nth-child(odd):not(.tb-name) { border-inline-start: 1px solid oklch(0.965 0.012 240 / 0.5); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .routes, .connect, .flip-label { display: none; }
  .menu-btn { display: inline-flex; }
  .brand-name { display: none; }
  .bar { gap: 10px; padding: 0 12px; }
  .bar-tools { gap: 8px; }
  .chip-sheet { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; }
  .hero { padding-top: 14px; gap: 16px; }
  .hero-title { grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: start; }
  .mark-draw { width: 96px; grid-column: 2; grid-row: 1; }
  .hero-name { gap: 6px; grid-column: 1; grid-row: 1; }
  .wordmark { font-size: 28px; }
  .rule-line { font-size: 15px; line-height: 1.4; }
  .proof { font-size: 13px; }
  .proof-n { font-size: 16px; }
  .chip { height: 38px; padding: 0 8px; gap: 6px; font-size: 12px; }
  .chip-sym { display: none; }
  .flip-btn { width: auto; padding: 0 10px; gap: 6px; }
  .flip-short { display: inline; }
  .prompt { order: 1; } .field { order: 2; } .field-err { order: 3; } .sign-row { order: 4; } .card-frame { order: 5; } .actions { order: 6; }
  .menu-btn { width: 42px; padding: 0; }
  .parts th:first-child, .parts td.p-n { display: none; }
  .parts td, .parts th { padding: 10px; font-size: 15px; }
  .p-s { font-size: 17px !important; }
  .p-v { font-size: 14px !important; }
  .field textarea { font-size: 18px; min-height: 76px; }
  .actions {
    position: sticky; bottom: 0; z-index: 20;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
    margin: 0 -16px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: oklch(0.26 0.088 255 / 0.97); border-top: 1px solid oklch(0.965 0.012 240 / 0.4);
  }
  .actions .btn { flex-direction: column; gap: 4px; min-height: 56px; padding: 6px 2px; font-size: 12px; white-space: normal; text-align: center; line-height: 1.1; }
  .views { grid-template-columns: 1fr; gap: 28px; }
  .views li { padding: 0; }
  .views li + li { border-inline-start: 0; border-top: 1px dashed oklch(0.965 0.012 240 / 0.35); padding-top: 24px; }
  .strip { grid-auto-columns: 78%; }
  .title-block { grid-template-columns: 1fr; margin-inline: 12px; }
  .tb-cell:nth-child(odd):not(.tb-name) { border-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .drawn .flow path { animation: none; }
}
