/* stories.kiagraphy.com: black and white, Space Grotesk headings, IBM Plex Sans body (both SIL OFL, self-hosted) */
@font-face { font-family: "Space Grotesk"; font-weight: 300; font-display: swap; src: url(/_stories/fonts/space-grotesk-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/_stories/fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/_stories/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/_stories/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }

:root { --ink: #f2f2f2; --bg: #0a0a0a; --mute: #a8a8a8; --dim: #8f8f8f; --line: #3a3a3a; --hair: #262626; --head: "Space Grotesk", system-ui, sans-serif; --body: "IBM Plex Sans", system-ui, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
::placeholder { color: #7a7a7a; }
[hidden] { display: none !important; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 max(20px, env(safe-area-inset-left)); background: var(--bg); max-width: 640px; margin: 0 auto; }
.logo { height: 15px; width: auto; display: block; }
.lang { height: 44px; padding: 0 12px; background: none; border: 0; font-family: var(--head); font-size: 13px; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.lang .cur { opacity: .55; } .lang .rule { width: 18px; height: 1px; background: #5a5a5a; }
.progress { position: fixed; top: 64px; left: 0; right: 0; z-index: 10; max-width: 640px; margin: 0 auto; padding: 0 20px 12px; background: var(--bg); display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.progress i { height: 2px; background: #2e2e2e; } .progress i.on { background: var(--ink); }

.scroll { max-width: 640px; margin: 0 auto; padding: 92px 20px calc(130px + env(safe-area-inset-bottom)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.kicker, .label { font-family: var(--head); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #9a9a9a; }
h1 { margin: 0; font-family: var(--head); font-weight: 500; font-size: clamp(48px, 14vw, 72px); line-height: .98; letter-spacing: -.035em; }
h2 { margin: 10px 0 0; font-family: var(--head); font-weight: 500; font-size: 31px; line-height: 1.12; letter-spacing: -.02em; }
h2.big { font-size: 40px; line-height: 1.02; letter-spacing: -.03em; margin: 0; }
h2.huge { font-size: 64px; line-height: .95; letter-spacing: -.04em; margin: 0; }
p { margin: 0; }
.lede { font-size: 17px; line-height: 1.55; color: #d6d6d6; }
.hint { font-size: 15px; line-height: 1.55; color: var(--mute); }
.note { font-size: 13px; line-height: 1.5; color: var(--mute); }
.welcome { gap: 28px; padding-top: 12px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.facts div { padding: 12px 8px 0 0; font-family: var(--head); font-size: 14px; line-height: 1.3; }
.promise { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.promise b { font-family: var(--head); font-weight: 500; font-size: 13px; color: var(--dim); min-width: 20px; }
.promise span { font-size: 15px; line-height: 1.5; color: #e6e6e6; }
.gate { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); cursor: pointer; }
.gate input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.gate span { font-size: 15px; line-height: 1.5; }

.numrow { display: flex; align-items: flex-end; justify-content: space-between; }
.num { font-family: var(--head); font-weight: 300; font-size: 96px; line-height: .85; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--ink); }
.group { display: flex; flex-direction: column; gap: 10px; }
.fields { display: flex; flex-direction: column; gap: 26px; padding-top: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opts { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.opt { min-height: 50px; display: flex; align-items: center; gap: 14px; padding: 10px 14px; text-align: left; border: 1px solid var(--line); background: transparent; font-size: 15px; line-height: 1.3; }
.opts .opt { min-height: 54px; font-size: 16px; padding: 12px 16px; }
.opt.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt .k { font-family: var(--head); font-size: 12px; width: 16px; opacity: .6; flex-shrink: 0; }
.input, .area { width: 100%; background: transparent; border: 1px solid var(--line); color: var(--ink); font-size: 16px; }
.input { height: 50px; padding: 0 14px; }
.area { min-height: 240px; padding: 16px; line-height: 1.6; resize: vertical; }
.area.short { min-height: 110px; }
.input:focus, .area:focus { outline: none; border-color: var(--ink); }

.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.seg button { height: 48px; border: 0; background: transparent; font-family: var(--head); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.seg button.on { background: var(--ink); color: var(--bg); }
.rec { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 0 8px; border: 1px solid var(--hair); }
.time { font-family: var(--head); font-weight: 300; font-size: 44px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; }
.wave i { width: 3px; height: 4px; background: var(--line); transition: height .12s; }
.wave.live i, .wave.done i { background: var(--ink); }
.recbtn { width: 96px; height: 96px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; display: flex; align-items: center; justify-content: center; }
.recbtn span { display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); transition: all .2s; }
.recbtn.on span { width: 28px; height: 28px; border-radius: 3px; }
.recbtn.on { animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(242,242,242,.45); } 100% { box-shadow: 0 0 0 22px rgba(242,242,242,0); } }
@media (prefers-reduced-motion: reduce) { .recbtn.on { animation: none; } .wave i { transition: none; } }
.row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.btn { height: 48px; padding: 0 18px; background: transparent; border: 1px solid var(--line); font-family: var(--head); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.wide { width: 100%; height: 52px; font-size: 15px; }
.btn.outline { border-color: var(--ink); }
.recfoot { width: 100%; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 4px; font-size: 13px; color: var(--mute); }
.link { background: none; border: 0; padding: 0; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.err { font-size: 14px; line-height: 1.5; color: var(--ink); border-left: 2px solid var(--ink); padding: 4px 0 4px 12px; }

.rows { border-top: 1px solid var(--ink); }
.rows button { width: 100%; display: flex; gap: 12px; align-items: baseline; padding: 13px 0; background: none; border: 0; border-bottom: 1px solid var(--hair); text-align: left; }
.rows .n { font-family: var(--head); font-size: 12px; color: var(--dim); min-width: 20px; }
.rows .l { font-family: var(--head); font-size: 14px; min-width: 104px; }
.rows .v { font-size: 14px; line-height: 1.45; color: #e6e6e6; flex: 1; overflow-wrap: anywhere; }
.rows .v.skip { color: #7a7a7a; }
.contact .label { font-family: var(--head); font-size: 17px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.thanks { min-height: 60dvh; justify-content: center; gap: 22px; }
.hr { height: 1px; background: var(--hair); }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 6px; padding: 14px 16px calc(26px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid #1f1f1f; }
.bar .back, .bar .skip { height: 52px; padding: 0 12px; background: none; border: 0; font-family: var(--head); font-size: 15px; }
.bar .skip { color: var(--mute); text-decoration: underline; text-underline-offset: 4px; }
.bar .spacer { flex: 1; }
.bar .next { height: 52px; min-width: 128px; padding: 0 22px; border: 0; background: var(--ink); color: var(--bg); font-family: var(--head); font-size: 15px; font-weight: 500; }
.bar .next:disabled { background: #2e2e2e; color: #8a8a8a; cursor: default; }
.toast { position: fixed; left: 20px; right: 20px; bottom: calc(112px + env(safe-area-inset-bottom)); z-index: 11; max-width: 600px; margin: 0 auto; padding: 14px 16px; background: var(--ink); color: var(--bg); font-size: 14px; }
.ts { min-height: 0; }
.nojs { padding: 20px 0; }
.icon { width: 14px; height: 14px; flex-shrink: 0; }
