/* Tokens from design/tokens.md. Dark mode follows the system setting. */
:root {
  --bg: #FFFFFF;
  --ink: #0E1012;
  --body: #3B4148;
  --muted: #5E656D;
  --faint: #8A9099;
  --line: #E7E9EC;
  --line2: #EEF0F2;
  --field: #DDE0E4;
  --surface: #F6F7F8;
  --chip: #F3F4F6;
  --pill: #FFFFFF;
  --up: #0A7D4F;
  --up-line: #12A06A;
  --up-tint: #E9F6EF;
  --down: #C73A2C;
  --down-line: #E5483A;
  --accent: #3451C6;
  --accent-text: #3451C6;
  --accent-tint: #F3F5FF;
  --btn: #0E1012;
  --btn-text: #FFFFFF;
  --focus: rgba(52, 81, 198, 0.28);
  --frame: #1B1D21;
  --frame-edge: #3A3E45;
  --glass: rgba(255, 255, 255, 0.82);
  --shadow: 0 30px 60px -20px rgba(14, 16, 18, 0.28), 0 12px 24px -12px rgba(14, 16, 18, 0.18);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0B0D;
    --ink: #F2F3F5;
    --body: #C9CED6;
    --muted: #9BA3AE;
    --faint: #8A929D;
    --line: #23262C;
    --line2: #2A2E35;
    --field: #33373E;
    --surface: #14161A;
    --chip: #1C1F24;
    --pill: #2A2E35;
    --up: #3DD68C;
    --up-line: #2BB673;
    --up-tint: #0F2A1E;
    --down: #FF7A6B;
    --down-line: #F0604F;
    --accent-text: #8FA3FF;
    --accent-tint: #161D3D;
    --btn: #F2F3F5;
    --btn-text: #0E1012;
    --focus: rgba(143, 163, 255, 0.35);
    --frame: #2A2D33;
    --frame-edge: #4A4F57;
    --glass: rgba(28, 31, 36, 0.82);
    --shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button { font: inherit; color: inherit; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

/* ---------------------------------------------------------------- Header + coming-soon island */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.brand { font-size: 21px; font-weight: 800; letter-spacing: -0.045em; color: var(--ink); text-decoration: none; }
.brand:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }

/* Shaped like the iPhone's Dynamic Island: a black capsule that opens once to show the news. */
.island {
  margin: 0;
  display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 14px 0 5px;
  border-radius: 999px;
  background: #000;
  color: #FFFFFF;
  font-size: 13px; font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  animation: island-open 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.15) 0.35s both;
}
.island-icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #FFFFFF;
}
.island-icon svg { width: 13px; height: 13px; }
.island-text { color: #A9AFB8; animation: fade-in 0.35s ease-out 0.95s both; }
.island-text b { color: #FFFFFF; font-weight: 600; }
@keyframes island-open { from { max-width: 36px; } to { max-width: 260px; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- Hero */
.hero { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
h1 {
  margin: 0;
  font-size: 42px; line-height: 1.02; font-weight: 800; letter-spacing: -0.05em;
  text-wrap: balance;
}
.lede { margin: 18px 0 0; font-size: 18px; color: var(--body); max-width: 34em; text-wrap: pretty; }
.lede b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- Form */
.form { margin-top: 28px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--body); margin: 0 0 8px; }
.field {
  display: flex; align-items: center;
  height: 54px; padding: 0 16px;
  border: 1px solid var(--field); border-radius: 14px;
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field[hidden] { display: none; }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.field.bad { border-color: var(--down); }
.pre { font-size: 17px; font-weight: 600; color: var(--muted); margin-right: 6px; }
#handle-field .pre { margin-right: 2px; }
.field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; /* 17px keeps iOS from zooming */
}
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.status { min-height: 20px; margin: 6px 2px 12px; font-size: 13px; color: var(--muted); }
.status.ok { color: var(--up); }
.status.bad { color: var(--down); }

.contact-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.contact-head .label { margin: 0; }

/* Segmented control, as in the app: grey track, sliding white pill. */
.seg, .dsc-seg {
  position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 999px; background: var(--chip);
}
.seg button, .dsc-seg button {
  position: relative; z-index: 1;
  border: 0; background: none; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.seg button[aria-checked="true"], .dsc-seg button[aria-checked="true"] { color: var(--ink); }
.seg button:focus-visible, .dsc-seg button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  border-radius: 999px; background: var(--pill);
  box-shadow: 0 1px 3px rgba(14, 16, 18, 0.12), 0 1px 1px rgba(14, 16, 18, 0.06);
  transition: transform 0.32s cubic-bezier(0.3, 0.8, 0.3, 1);
}
.seg[data-mode="email"] .seg-pill, .dsc-seg[data-sort="record"] .seg-pill { transform: translateX(100%); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.primary, .secondary {
  display: block; width: 100%; height: 56px;
  border-radius: 999px; border: 0;
  font: inherit; font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, opacity 0.15s;
}
.primary { background: var(--btn); color: var(--btn-text); margin-top: 2px; }
.secondary { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--field); }
.primary:active, .secondary:active { transform: scale(0.98); }
.primary:disabled { opacity: 0.5; cursor: default; }
.primary:focus-visible, .secondary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.fine { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.fine:empty { display: none; }
#form-error { color: var(--down); }
.small { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; text-wrap: pretty; }

.done { margin-top: 32px; }
.done h2 { margin: 0; font-size: 34px; line-height: 1.08; font-weight: 800; letter-spacing: -0.045em; outline: 0; word-break: break-word; }
.done .lede { margin-bottom: 24px; }
.done:not([hidden]) { animation: rise 0.35s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Phone */
.device { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.phone {
  --w: min(300px, 80vw);
  width: var(--w); aspect-ratio: 390 / 844;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.17);
  background: var(--frame);
  box-shadow: inset 0 0 0 1.5px var(--frame-edge), var(--shadow);
}
.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--w) * 0.14);
  overflow: hidden; background: var(--bg);
  isolation: isolate;
}
/* The app is laid out at 390×844 points and scaled to the frame (--s is set by scenes.js). */
.ui {
  --s: 0.72;
  position: absolute; left: 0; top: 0; width: 390px; height: 844px;
  transform: scale(var(--s)); transform-origin: 0 0;
  color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.35;
}
.ui svg { display: block; }
.statusbar { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; justify-content: space-between; align-items: center; padding: 6px 34px 0 46px; font-size: 17px; font-weight: 600; z-index: 3; }
.statusbar .sys { display: flex; gap: 6px; align-items: center; }
.statusbar .sys svg:first-child { width: 18px; height: 12px; fill: currentColor; }
.statusbar .sys svg:last-child { width: 27px; height: 12px; fill: currentColor; }
.dyn { position: absolute; top: 11px; left: 50%; width: 124px; height: 36px; margin-left: -62px; border-radius: 20px; background: #000; z-index: 4; }

.app-head { position: absolute; top: 58px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; }
.app-title { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; }
.mkt { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.mkt i { width: 7px; height: 7px; border-radius: 50%; background: var(--up-line); }

.feed { position: absolute; top: 108px; left: 0; right: 0; bottom: 0; }
.post { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line2); }
.av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #22262B; }
.av-you { background: var(--accent); color: #FFFFFF; }
.av-mk { background: #DCEBFF; }
.av-dt { background: #FFD9C7; }
.av-rt { background: #E8E1FF; }
.av-hb { background: #FFE9A8; }
.av-qc { background: #CFF1E1; }
.pbody { flex: 1; min-width: 0; }
.phead { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.phead b { font-weight: 700; }
.phead .rec { font-size: 12px; color: var(--muted); }
.phead .ago { margin-left: auto; font-size: 12px; color: var(--faint); }
.ptext { margin: 3px 0 0; font-size: 15px; line-height: 1.4; }
.lockcard { margin-top: 10px; padding: 12px 14px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.lc-top { display: flex; align-items: baseline; gap: 8px; }
.lc-tk { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.lc-call { font-size: 13px; font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
.lc-badge { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px; border-radius: 999px; background: var(--chip); font-size: 11px; font-weight: 600; color: var(--body); }
.lc-badge svg { width: 11px; height: 11px; }
.lc-stamp { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.lc-chart { width: 100%; height: 44px; margin-top: 8px; overflow: visible; }
.lc-chart .entry { stroke: var(--field); stroke-dasharray: 3 4; stroke-width: 1; }
.lc-chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.lc-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lc-foot b { color: var(--ink); font-weight: 600; }
.lc-foot em { font-style: normal; margin-left: 5px; font-weight: 600; }
.bar { height: 4px; margin-top: 8px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent); }
.bar i.upfill { background: var(--up-line); }
.acts { display: flex; justify-content: space-between; margin-top: 10px; padding-right: 30px; font-size: 12px; color: var(--muted); }
.acts span { display: inline-flex; align-items: center; gap: 5px; }
.acts span::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.a-like { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z'/%3E%3C/svg%3E"); }
.a-reply { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.a-repost { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h11l-3-3M17 17H6l3 3'/%3E%3C/svg%3E"); }
.a-share { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V4M8 8l4-4 4 4M5 13v6h14v-6'/%3E%3C/svg%3E"); }

/* The new post: collapsed until it lands, then opens in place and pushes the feed down. */
.post-new { display: grid; grid-template-columns: 38px 1fr; max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; opacity: 0; overflow: hidden; background: var(--accent-tint);
  transition: max-height 0.6s cubic-bezier(0.3, 0.8, 0.3, 1), padding 0.6s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.4s ease 0.15s, background-color 1.6s ease 1.4s; }
.ui.landed .post-new { max-height: 260px; padding-top: 14px; padding-bottom: 14px; border-bottom-width: 1px; opacity: 1; background: var(--bg); }
.post-new .bar i { transition: width 1s cubic-bezier(0.3, 0.8, 0.3, 1) 0.6s; }

.fab { position: absolute; right: 21px; bottom: 101px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #FFFFFF; box-shadow: 0 10px 24px -8px rgba(52, 81, 198, 0.7); transition: transform 0.18s; z-index: 2; }
.fab svg { width: 26px; height: 26px; }
.ui.press .fab { transform: scale(0.88); }
.tabs { position: absolute; left: 21px; right: 21px; bottom: 21px; height: 64px; border-radius: 32px; padding: 0 4px; display: flex; justify-content: space-around; align-items: center; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 1px var(--line), 0 8px 24px -10px rgba(0, 0, 0, 0.25); z-index: 2; }
.tabs span { position: relative; flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--faint); }
.tabs span.on::before { content: ""; position: absolute; inset: 0 2px; border-radius: 28px; background: var(--chip); z-index: -1; }
.tabs span.on { color: var(--ink); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity 0.35s; z-index: 5; }
.sheet { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 10px 22px 26px; border-radius: 40px; background: var(--bg); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18); transform: translateY(110%); transition: transform 0.5s cubic-bezier(0.25, 0.9, 0.3, 1); z-index: 6; }
.ui.sheet-up .scrim { opacity: 1; }
.ui.sheet-up .sheet { transform: none; }
.grab { display: block; width: 38px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--field); }
.sh-title { margin: 0; text-align: center; font-size: 17px; font-weight: 700; }
.sh-ticker { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.sh-tk { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; }
.sh-name { font-size: 14px; color: var(--muted); }
.sh-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 700; }
.sh-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--up-line); }
.sh-seg { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; padding: 3px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 600; text-align: center; color: var(--muted); }
.sh-seg span { padding: 8px; border-radius: 999px; }
.sh-seg span.on { background: var(--pill); box-shadow: 0 1px 3px rgba(14, 16, 18, 0.12); }
.sh-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px; border-bottom: 1px solid var(--line2); font-size: 15px; color: var(--muted); }
.sh-row b { color: var(--ink); font-size: 17px; }
.lockbtn { position: relative; height: 56px; margin-top: 20px; border-radius: 999px; background: var(--btn); color: var(--btn-text); font-size: 17px; font-weight: 700; overflow: hidden; transition: transform 0.15s, background-color 0.3s; }
.ui.lock-press .lockbtn { transform: scale(0.97); }
.lb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.2s, transform 0.3s; }
.lb-count, .lb-done { opacity: 0; transform: translateY(8px); }
.lb-done svg { width: 18px; height: 18px; }
.ui.counting .lb-idle { opacity: 0; transform: translateY(-8px); }
.ui.counting .lb-count { opacity: 1; transform: none; }
.ui.locked .lb-count { opacity: 0; transform: translateY(-8px); }
.ui.locked .lb-done { opacity: 1; transform: none; }
.ui.locked .lb-done svg { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.4, 1); }
.ui.locked .lockbtn { background: var(--accent); color: #FFFFFF; }
.ui.locked .lockbtn::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); animation: ring 0.7s ease-out forwards; }
.ring { position: absolute; left: 16px; top: 8px; width: 40px; height: 40px; transform: rotate(-90deg); opacity: 0; }
.ring circle { fill: none; stroke: currentColor; stroke-width: 3; stroke-dasharray: 107; stroke-dashoffset: 107; stroke-linecap: round; }
.ui.counting .ring { opacity: 0.9; }
.ui.counting .ring circle { stroke-dashoffset: 0; transition: stroke-dashoffset 3s linear; }
.ui.locked .ring { opacity: 0; }
.sh-stamp { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity 0.3s 0.2s; }
.ui.locked .sh-stamp { opacity: 1; }
@keyframes pop { 0% { transform: scale(0.4); } 100% { transform: scale(1); } }
@keyframes ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }

/* ---------------------------------------------------------------- Inside the app */
.inside { margin-top: 88px; }
.inside h2 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.045em; }
.scenes { display: grid; gap: 40px; margin-top: 28px; }
.scene > h3 { margin: 18px 0 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.025em; }
.scene > p { margin: 6px 0 0; font-size: 15px; color: var(--body); text-wrap: pretty; }
.scene-ui { padding: 18px; border-radius: 24px; background: var(--surface); min-height: 360px; display: flex; flex-direction: column; }

.rec-top { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rec-top b { display: block; font-weight: 700; }
.rec-top small { display: block; font-size: 12px; color: var(--muted); }
.rec-num { margin: 18px 0 0; font-size: 54px; line-height: 1; font-weight: 800; letter-spacing: -0.05em; }
.rec-label { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.rec-chart { width: 100%; height: 72px; margin-top: auto; overflow: visible; }
.rec-chart polyline { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rec-chart .you { stroke: var(--up-line); }
.rec-chart .spx { stroke: var(--faint); stroke-width: 1.6; }
.rec-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.rec-legend span::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.k-you::before { background: var(--up-line); }
.k-spx::before { background: var(--faint); }

.dsc-seg { display: grid; width: 100%; }
.dsc-seg button { padding: 7px 10px; }
.dsc-list { list-style: none; margin: 12px 0 0; padding: 0; position: relative; }
.dsc-list li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; }
.dsc-list li + li { border-top: 1px solid var(--line); }
.dsc-list .av { width: 34px; height: 34px; font-size: 12px; }
.dsc-who { flex: 1; min-width: 0; font-size: 14px; }
.dsc-who b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsc-who small { display: block; font-size: 12px; color: var(--muted); }
.dsc-ret { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }

#scene-hit .lc-top { align-items: center; }
.hit { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--up-tint); color: var(--up); font-size: 12px; font-weight: 700; opacity: 0; transform: scale(0.6); }
.hit-chart { width: 100%; height: 120px; margin-top: 14px; overflow: visible; }
.hit-chart .tgt { stroke: var(--ink); stroke-dasharray: 4 5; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.hit-chart .ent { stroke: var(--faint); stroke-dasharray: 4 5; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.hit-chart .path { fill: none; stroke: var(--up-line); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hit-chart .end { fill: var(--up-line); opacity: 0; transform-box: fill-box; transform-origin: center; }
.hit-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: var(--muted); }
.hit-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.hit-foot b { color: var(--ink); font-size: 15px; margin-left: 4px; }
.hit-foot b.up { color: var(--up); }

/* Played once when the scene scrolls into view (scenes.js adds .play). */
.reveal { transform: scaleX(0); transform-box: fill-box; transform-origin: 0 0; }
.play .reveal { transform: none; transition: transform 1.4s cubic-bezier(0.6, 0, 0.2, 1); }
.play .hit { opacity: 1; transform: none; transition: opacity 0.2s 1.4s, transform 0.45s cubic-bezier(0.3, 1.6, 0.4, 1) 1.4s; }
.play .hit-chart .end { opacity: 1; animation: dot-pop 0.5s cubic-bezier(0.3, 1.6, 0.4, 1) 1.35s both; }
@keyframes dot-pop { from { transform: scale(0); } to { transform: scale(1); } }

.foot { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot p { margin: 0; }

/* ---------------------------------------------------------------- Larger screens */
@media (min-width: 720px) {
  .wrap { padding-left: 40px; padding-right: 40px; }
  .hero { margin-top: 48px; }
  h1 { font-size: 58px; }
  .scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .phone { --w: 320px; }
}
@media (min-width: 960px) {
  .top { padding-top: 12px; }
  .hero { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 64px; margin-top: 40px; }
  .pitch { max-width: 480px; }
  h1 { font-size: 66px; }
  .small, .fine { text-align: left; }
  .phone { --w: 340px; }
  .inside { margin-top: 120px; }
}
@media (min-width: 720px) and (max-width: 959px) {
  .pitch { max-width: 520px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { transform: none; }
  .hit, .hit-chart .end { opacity: 1; transform: none; }
}

/* Turnstile shows nothing unless Cloudflare needs a click; then it sits above the button. */
.human:not(:empty) { margin: 0 0 12px; }
.human iframe { max-width: 100%; }

/* ---------------------------------------------------------------- The payoff: the lock hits */
.lc-badge.is-hit { display: none; background: var(--up-tint); color: var(--up); }
.ui.won .lc-badge.is-locked { display: none; }
.ui.won .lc-badge.is-hit { display: inline-flex; animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.4, 1); }
.lc-hitline { display: none; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.lc-hitline b { color: var(--up); font-weight: 700; }
.ui.won .lc-stamp { display: none; }
.ui.won .lc-hitline { display: block; animation: fade-in 0.4s ease-out; }
.ui.won .post-new .bar i { background: var(--up-line); }

.push {
  position: absolute; top: 56px; left: 10px; right: 10px; z-index: 7;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  box-shadow: 0 0 0 1px var(--line), 0 16px 40px -12px rgba(0, 0, 0, 0.35);
  transform: translateY(-160%);
  transition: transform 0.6s cubic-bezier(0.25, 0.9, 0.3, 1.08);
}
.ui.pushed .push { transform: none; }
.push-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #FFFFFF; }
.push-icon svg { width: 18px; height: 18px; }
.push-body { flex: 1; min-width: 0; }
.push-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.push-top b { font-weight: 600; color: var(--body); }
.push-title { display: block; margin-top: 2px; font-size: 16px; font-weight: 700; color: var(--ink); }
.push-body p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; color: var(--body); }

/* ---------------------------------------------------------------- Phone chrome, as in the app */
/* Content runs under the floating tab bar; a soft scroll edge keeps the bar readable. */
.edge { position: absolute; left: 0; right: 0; bottom: 0; height: 130px; background: linear-gradient(to bottom, transparent, var(--bg) 78%); pointer-events: none; z-index: 1; }
.home { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: var(--ink); z-index: 9; }

/* The app's result screen for a hit (ResultView). */
.result {
  position: absolute; inset: 0; z-index: 8; padding: 120px 24px 34px;
  display: flex; flex-direction: column;
  background: radial-gradient(360px 360px at 20% 12%, color-mix(in srgb, var(--up-line) 18%, transparent), transparent 70%), var(--bg);
  transform: translateY(100%); transition: transform 0.55s cubic-bezier(0.25, 0.9, 0.3, 1);
}
.ui.result-up .result { transform: none; }
.rs-badge { position: relative; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--up-line); color: #FFFFFF; transform: scale(0.3); opacity: 0; }
.rs-badge svg { width: 40px; height: 40px; }
.rs-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--up-line); opacity: 0; }
.ui.result-up .rs-badge { transform: none; opacity: 1; transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.4, 1) 0.35s, opacity 0.2s 0.35s; }
.ui.result-up .rs-ring { animation: rs-ring 1.8s ease-out 0.7s infinite; }
@keyframes rs-ring { from { transform: scale(0.8); opacity: 0.55; } to { transform: scale(2.3); opacity: 0; } }
.rs-kicker { margin: 28px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--muted); }
.rs-num { margin: 6px 0 0; font-size: 88px; line-height: 1; font-weight: 800; letter-spacing: -0.06em; color: var(--up); }
.rs-card { margin-top: 22px; padding: 16px; border-radius: 20px; background: var(--surface); }
.rs-head { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.rs-pts { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.rs-pts span { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rs-pts .rs-r { align-items: flex-end; }
.rs-pts small { font-size: 12px; color: var(--muted); }
.rs-pts b { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.rs-pts i { font-style: normal; font-weight: 700; color: var(--faint); }
.rs-why { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.rs-sub { margin: 22px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.rs-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line2); font-size: 15px; }
.rs-row span:last-child { font-weight: 700; }
.rs-row em { font-style: normal; font-weight: 500; color: var(--muted); }
.rs-btns { display: flex; gap: 10px; margin-top: auto; }
.rs-btns span { flex: 1; height: 54px; border-radius: 999px; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.rs-share { background: var(--accent); color: #FFFFFF; }
.rs-done { box-shadow: inset 0 0 0 1px var(--field); }
.ui.press-push .push { transform: scale(0.97); }

/* ---------------------------------------------------------------- What's happening on the phone */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; width: var(--steps-w, 320px); max-width: 100%; display: grid; gap: 4px; }
.steps li { counter-increment: step; position: relative; padding: 10px 12px 10px 44px; border-radius: 14px; font-size: 14px; line-height: 1.4; color: var(--muted); transition: background-color 0.3s, color 0.3s; }
.steps li::before { content: counter(step); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--chip); color: var(--muted); transition: background-color 0.3s, color 0.3s; }
.steps li b { color: var(--body); font-weight: 600; }
.steps li.on { background: var(--surface); color: var(--body); }
.steps li.on b { color: var(--ink); }
.steps li.on::before { background: var(--accent); color: #FFFFFF; }
@media (min-width: 720px) { .steps { --steps-w: 340px; } }

/* ---------------------------------------------------------------- Groups scene */
.grp-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.grp-head b { display: block; font-weight: 700; }
.grp-head small { display: block; font-size: 12px; color: var(--muted); }
.grp-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--accent); color: #FFFFFF; }
.msg { display: flex; gap: 8px; margin-top: 12px; font-size: 13px; }
.msg .av { width: 26px; height: 26px; font-size: 10px; }
.msg b { font-size: 12px; font-weight: 700; }
.msg p { margin: 2px 0 0; padding: 8px 11px; border-radius: 4px 14px 14px 14px; background: var(--bg); color: var(--ink); line-height: 1.35; }
.msg.me { justify-content: flex-end; }
.msg.me p { border-radius: 14px 4px 14px 14px; background: var(--accent); color: #FFFFFF; max-width: 85%; margin-left: auto; }
.mini-lock { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; padding: 8px 11px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: var(--bg); font-size: 12px; }
.mini-lock b { font-size: 14px; font-weight: 800; }
.mini-lock em { margin-left: auto; font-style: normal; font-weight: 700; }
.typing { margin: 12px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 3px; }
.typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
#scene-group .msg, #scene-group .typing { opacity: 0; transform: translateY(8px); }
#scene-group.play .msg, #scene-group.play .typing { opacity: 1; transform: none; transition: opacity 0.35s, transform 0.45s cubic-bezier(0.3, 0.8, 0.3, 1); }
#scene-group.play .msg:nth-of-type(2) { transition-delay: 0.1s; }
#scene-group.play .msg:nth-of-type(3) { transition-delay: 0.9s; }
#scene-group.play .msg:nth-of-type(4) { transition-delay: 1.7s; }
#scene-group.play .typing { transition-delay: 2.4s; }
#scene-group.play .typing i { animation: blink 1.2s ease-in-out 2.6s infinite; }
#scene-group.play .typing i:nth-child(2) { animation-delay: 2.8s; }
#scene-group.play .typing i:nth-child(3) { animation-delay: 3s; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  #scene-group .msg, #scene-group .typing { opacity: 1; transform: none; }
  .rs-badge { transform: none; opacity: 1; }
}

/* ---------------------------------------------------------------- Hero proof strip: a lock that hits, once */
.lede-pay { display: block; margin-top: 4px; color: var(--ink); font-weight: 600; }
.proof { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pf-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 11px;
  border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; color: var(--body); white-space: nowrap;
}
.pf-chip svg { width: 14px; height: 14px; flex: none; color: var(--ink); }
.pf-chip b { color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.pf-at { color: var(--muted); }
.pf-arrow { width: 22px; height: 2px; border-radius: 1px; background: var(--field); position: relative; }
.pf-arrow::after { content: ""; position: absolute; right: -1px; top: -3px; width: 6px; height: 6px; border-top: 2px solid var(--field); border-right: 2px solid var(--field); transform: rotate(45deg); }
.pf-out { position: relative; min-width: 128px; justify-content: center; overflow: hidden; }
.pf-open, .pf-hit { display: inline-flex; align-items: center; gap: 6px; }
.pf-open { color: var(--muted); font-weight: 600; }
.pf-hit { position: absolute; inset: 0; justify-content: center; background: var(--up-tint); color: var(--up); font-weight: 600; opacity: 0; transform: translateY(100%); }
.pf-hit svg { color: var(--up); }
.pf-hit b { color: var(--up); }
.pf-out { animation: pf-out 0.01s linear 1.6s forwards; }
.pf-out .pf-hit { animation: pf-hit 0.5s cubic-bezier(0.3, 1.3, 0.4, 1) 1.6s forwards; }
.pf-out .pf-open { animation: pf-open 0.3s ease-in 1.6s forwards; }
@keyframes pf-hit { to { opacity: 1; transform: none; } }
@keyframes pf-open { to { opacity: 0; transform: translateY(-100%); } }
@keyframes pf-out { to { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--up-line) 40%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .pf-hit { opacity: 1; transform: none; }
  .pf-open { opacity: 0; }
}
@media (max-width: 479px) {
  .pf-at { display: none; }
  .proof { flex-wrap: nowrap; gap: 6px; }
  .pf-chip { height: 34px; padding: 0 12px 0 10px; font-size: 13px; }
  .pf-out { min-width: 116px; }
  .pf-arrow { width: 16px; flex: none; }
}
@media (max-width: 359px) {
  .proof { flex-wrap: wrap; }
  .pf-arrow { display: none; }
  .pf-out { min-width: 108px; }
}

/* ---------------------------------------------------------------- Hit scene: the result first, then the chart */
.hit-ui { padding: 18px 18px 16px; }
.hit-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hit-top > span:first-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#scene-hit .hit { margin-left: 0; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 9px; background: var(--up-line); color: #FFFFFF; white-space: nowrap; }
#scene-hit .hit svg { width: 12px; height: 12px; }
.hit-res { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 18px; }
.hit-num { font-size: 50px; line-height: 0.95; font-weight: 800; letter-spacing: -0.05em; color: var(--up); }
.hit-vs { text-align: right; font-size: 12px; line-height: 1.35; color: var(--muted); }
.hit-vs b { font-size: 15px; color: var(--ink); }
.hit-plot { position: relative; flex: 1; min-height: 130px; margin-top: 18px; }
#scene-hit .hit-chart { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.zone-a { stop-color: var(--up-line); stop-opacity: 0.22; }
.zone-b { stop-color: var(--up-line); stop-opacity: 0; }
.hp-lbl { position: absolute; transform: translateY(-50%); padding: 1px 6px; border-radius: 6px; background: var(--surface); font-size: 11px; font-weight: 600; white-space: nowrap; }
.hp-tgt { left: 0; top: calc(26 / 120 * 100%); color: var(--ink); }
.hp-ent { right: 0; top: calc(104 / 120 * 100%); color: var(--muted); }
.hp-dot { position: absolute; left: 100%; top: calc(26 / 120 * 100%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--up-line); box-shadow: 0 0 0 4px color-mix(in srgb, var(--up-line) 25%, transparent); opacity: 0; transform: scale(0); }
.play .hp-dot { opacity: 1; transform: none; transition: opacity 0.2s 1.35s, transform 0.5s cubic-bezier(0.3, 1.6, 0.4, 1) 1.35s; }
.hit-when { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hp-dot { opacity: 1; transform: none; } }

/* Footer links and the privacy / terms pages */
.small a, .foot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot a { margin-left: 10px; }
.legal { max-width: 680px; margin: 40px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink); }
.legal h1 { font-size: 36px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 8px; }
.legal h2 { font-size: 20px; letter-spacing: -0.01em; margin: 36px 0 8px; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent-text); }
.legal code { font-size: 0.9em; }

/* ---------------------------------------------------------------- Phones: the demo on the first screen */
/* Headline, one short lede, then the app playing beside its four steps, then the form.
   A pinned "Claim your @username" button keeps joining one tap away while the form is off screen. */
@media (max-width: 719px) {
  .hero { display: flex; flex-direction: column; gap: 0; margin-top: 18px; }
  .pitch { display: contents; }
  h1 { order: 1; font-size: 36px; }
  .lede { order: 2; margin-top: 12px; font-size: 16px; }
  .lede-pay { margin-top: 2px; }
  .proof { display: none; }
  .device { order: 3; margin-top: 22px; flex-direction: row; align-items: center; gap: 12px; }
  .phone { --w: min(178px, 46vw, max(140px, calc((100svh - 300px) * 0.46))); flex: none; }
  .form { scroll-margin-top: 16px; }
  .steps { --steps-w: auto; flex: 1; min-width: 0; gap: 6px; }
  .steps li { padding: 9px 8px 9px 36px; font-size: 0; line-height: 1.25; }
  .steps li b { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
  .steps li::before { left: 8px; top: 9px; }
  .join { order: 4; }
  .form { margin-top: 26px; }
  .done { margin-top: 26px; }
  .wrap { padding-bottom: max(110px, calc(env(safe-area-inset-bottom) + 96px)); }

  .sticky-cta {
    position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
    padding: 10px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--bg);
    animation: cta-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1.1);
  }
  .sticky-cta::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 22px; pointer-events: none;
    background: linear-gradient(to top, var(--bg), color-mix(in srgb, var(--bg) 0%, transparent));
  }
  .sticky-cta[hidden] { display: none; }
  .sticky-btn {
    height: 56px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--btn); color: var(--btn-text); text-decoration: none;
    font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
    box-shadow: 0 6px 18px rgba(14, 16, 18, 0.16);
    -webkit-tap-highlight-color: transparent;
  }
  .sticky-btn svg { width: 18px; height: 18px; }
  .sticky-btn:active { transform: scale(0.98); }
  .sticky-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
  @keyframes cta-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
@media (min-width: 720px) { .sticky-cta { display: none; } }
@media (max-width: 719px) and (prefers-reduced-motion: reduce) { .sticky-cta { animation: none; } }
