@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
:root { color-scheme: light dark; --paper:#F6F3EC; --card:#FFFDF8; --ink:#15181A; --soft:#43484C; --muted:#5F6366; --line:#E4DFD3; --track:#CFC9BB; --clay:#A8441F; --clay-soft:#F4E2D8;
  --green:#1B5E45; --green-soft:#DDEDE4; --gold:#7A5500; --gold-soft:#F4EAD0; --red:#9C3423; --shadow:0 1px 2px rgba(21,24,26,.04), 0 8px 24px rgba(21,24,26,.05);
  --serif:"Fraunces", "Iowan Old Style", Georgia, serif; --sans:"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; --tab:64px; }
@media (prefers-color-scheme: dark) { :root { --paper:#101314; --card:#191D1F; --ink:#F2EFE8; --soft:#C9C6BE; --muted:#8E9192; --line:#2A2F32; --track:#3D4347; --clay:#E0764F; --clay-soft:#3A241B;
  --green:#5DBB93; --green-soft:#17302A; --gold:#D9A93A; --gold-soft:#33290F; --red:#E0705F; --shadow:none; }
  .card.hero { background: var(--card); color: var(--ink); border-color: var(--line); } .card.hero .kicker { color: var(--clay); } .card.hero .lede { color: var(--soft); } .card.hero .more { color: var(--clay); }
  .primary.clay, .big button.a { color: #101314; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
.app { max-width: 620px; margin: 0 auto; padding: 18px 20px calc(var(--tab) + 40px + env(safe-area-inset-bottom)); min-height: 100dvh; }
.top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 26px; }
.wordmark { font: 600 22px/1 var(--serif); letter-spacing: -.01em; }
.top .who { font-size: 13px; color: var(--muted); }
.kicker { font: 600 12px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--clay); margin: 0 0 10px; }
h1 { font: 500 34px/1.08 var(--serif); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
h2 { font: 500 24px/1.15 var(--serif); letter-spacing: -.015em; margin: 0 0 8px; text-wrap: balance; }
h3 { font: 600 15px/1.3 var(--sans); margin: 0 0 4px; }
p { margin: 0 0 12px; } .lede { font-size: 18px; line-height: 1.45; color: var(--soft); text-wrap: pretty; }
.muted { color: var(--muted); } .small { font-size: 13.5px; line-height: 1.45; } .center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.card { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); display: block; width: 100%; text-align: left; }
button.card { transition: transform .12s ease; } button.card:active { transform: scale(.985); }
.card .more { display: flex; align-items: center; gap: 6px; margin-top: 14px; font: 600 14px var(--sans); color: var(--clay); }
.card.hero { background: var(--ink); color: var(--paper); border-color: transparent; padding: 26px 22px; }
.card.hero .kicker { color: color-mix(in srgb, var(--clay) 80%, white); } .card.hero .lede { color: color-mix(in srgb, var(--paper) 78%, transparent); } .card.hero .more { color: var(--paper); }
.row { display: flex; gap: 12px; align-items: center; } .row.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--sans); padding: 6px 10px; border-radius: 99px; background: var(--line); color: var(--soft); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.solid { background: var(--green-soft); color: var(--green); } .chip.lead { background: var(--gold-soft); color: var(--gold); } .chip.open { background: var(--line); color: var(--soft); }
.chip.estimate { background: var(--clay-soft); color: var(--clay); } .chip.pass { background: var(--green-soft); color: var(--green); } .chip.fail { background: var(--clay-soft); color: var(--red); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; } .tile.wide { grid-column: 1 / -1; }
.tile .v { font: 500 30px/1 var(--serif); letter-spacing: -.02em; } .tile .l { font-size: 13px; line-height: 1.35; color: var(--soft); margin-top: 8px; } .tile .c { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--ink); color: var(--paper); font: 600 16px var(--sans); padding: 16px 18px; border-radius: 14px; }
.primary:active { opacity: .85; } .primary.clay { background: var(--clay); color: #fff; } .primary[disabled] { opacity: .4; }
.ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font: 600 15px var(--sans); padding: 14px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.link { font: 600 14px var(--sans); color: var(--clay); }
details.why { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; } details.why summary { font: 600 14px var(--sans); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.why summary::after { content: "+"; font-size: 18px; color: var(--muted); } details.why[open] summary::after { content: "–"; } details.why p { margin-top: 10px; color: var(--soft); font-size: 15px; }
ul.plain { list-style: none; padding: 0; margin: 14px 0; } ul.plain li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 15.5px; } ul.plain li:first-child { border-top: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; } .list-item:first-child { border-top: 0; }
.list-item .t { font-weight: 600; } .list-item .s { font-size: 13px; color: var(--muted); } .list-item .chev { color: var(--muted); font-size: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; } .dot.on { background: var(--clay); }
input[type=text], input[type=search], textarea { width: 100%; font: 16px var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; outline: none; }
input:focus, textarea:focus { border-color: var(--ink); }
.back { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--sans); color: var(--muted); margin-bottom: 22px; }
.useful { display: flex; align-items: center; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.useful button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font: 600 13px var(--sans); color: var(--soft); } .useful button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs nav { max-width: 620px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tab); }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font: 600 11px var(--sans); color: var(--muted); letter-spacing: .02em; }
.tabs button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; } .tabs button.on { color: var(--ink); }

/* story pager */
.pager { display: flex; gap: 5px; margin-bottom: 26px; } .pager i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); } .pager i.on { background: var(--ink); }
.nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

/* reel */
.reel { position: fixed; inset: 0; z-index: 50; background: #0B0D0E; color: #F2EFE8; display: flex; flex-direction: column; }
.reel header { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) 18px 10px; gap: 12px; } .reel header .t { font: 600 14px var(--sans); opacity: .9; }
.reel .x { font-size: 15px; font-weight: 600; opacity: .8; padding: 8px 4px; }
.reel .bars { display: flex; gap: 4px; padding: 0 18px 10px; } .reel .bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.22); overflow: hidden; } .reel .bars i b { display: block; height: 100%; width: 0; background: #fff; }
.reel .stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; } .reel video { width: 100%; max-height: 100%; background: #000; }
.reel .tap { position: absolute; top: 0; bottom: 0; width: 34%; } .reel .tap.l { left: 0; } .reel .tap.r { right: 0; }
.reel .playbtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(255,255,255,.92); color: #111; font: 600 16px var(--sans); padding: 14px 22px; border-radius: 99px; } .reel .playbtn[hidden] { display: none; }
.reel footer { padding: 14px 20px calc(22px + env(safe-area-inset-bottom)); } .reel .cap { font: 500 20px/1.25 var(--serif); } .reel .sub { font-size: 13.5px; opacity: .65; margin-top: 4px; }
.reel .ctl { display: flex; gap: 10px; margin-top: 14px; } .reel .ctl button { flex: 1; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 12px; font: 600 14px var(--sans); }

/* practice logger */
.logger { position: fixed; inset: 0; z-index: 40; background: var(--paper); display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); }
.arms { display: grid; gap: 8px; margin: 14px 0 6px; } .arms button { padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line); font: 600 14px var(--sans); color: var(--soft); } .arms button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.count { font: 500 64px/1 var(--serif); letter-spacing: -.03em; text-align: center; margin: 18px 0 2px; } .count small { font: 500 16px var(--sans); color: var(--muted); letter-spacing: 0; }
.big { display: grid; gap: 12px; margin-top: auto; } .big.two { grid-template-columns: 1fr 1fr; }
.big button { min-height: 96px; border-radius: 22px; font: 600 22px var(--sans); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); } .big button:active { transform: scale(.97); }
.big button.good { background: var(--green); color: #fff; border-color: transparent; } .big button.bad { background: var(--clay); color: #fff; border-color: transparent; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; } .pad button { min-height: 62px; border-radius: 16px; font: 500 24px var(--sans); background: var(--card); border: 1px solid var(--line); } .pad button:active { background: var(--line); }
.readout { text-align: center; font: 500 44px/1 var(--serif); min-height: 50px; margin: 10px 0; }
.tally { display: grid; gap: 8px; margin: 12px 0; font-size: 13.5px; color: var(--soft); } .tally div { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; }

/* ask */
.bubble { background: var(--ink); color: var(--paper); border-radius: 18px 18px 4px 18px; padding: 12px 16px; margin-left: 40px; font-weight: 500; }
.answer { font-size: 16.5px; line-height: 1.5; } .answer p { margin: 0 0 10px; } .answer table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 8px 0; } .answer th, .answer td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.answer ul { padding-left: 18px; margin: 6px 0 10px; } .steps { font-size: 13px; color: var(--muted); } .steps div::before { content: "· "; }
.askbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); z-index: 15; padding: 10px 16px; background: linear-gradient(to top, var(--paper) 70%, transparent); }
.askbar form { max-width: 588px; margin: 0 auto; display: flex; gap: 8px; } .askbar input { border-radius: 99px; padding-right: 16px; box-shadow: var(--shadow); }
.askbar button { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 20px; } .askbar button.mic { background: var(--card); color: var(--ink); border: 1px solid var(--line); } .askbar button.live { background: var(--clay); color: #fff; }
.suggest { display: flex; flex-direction: column; gap: 8px; } .suggest button { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-size: 15px; }

/* sign-in */
body.enter main { max-width: 440px; margin: 0 auto; padding: 18vh 26px 40px; } body.enter .wordmark { margin-bottom: 44px; } body.enter form { display: grid; gap: 10px; margin-top: 26px; }
@media (min-width: 700px) { .app { padding-top: 34px; } h1 { font-size: 40px; } }

/* ---- revision after the design review ---- */
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
button, .tap { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.num, .tile .v, .count, .readout, .stat .v { font-variant-numeric: lining-nums tabular-nums; }
.app { padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }
.back { min-height: 44px; padding-right: 16px; margin-bottom: 10px; }
details.why summary { padding: 11px 0; min-height: 44px; align-items: center; }
.useful button { min-height: 44px; padding: 0 18px; }
.small { font-size: 14px; } .evidence { font-size: 15px; line-height: 1.45; color: var(--soft); }
.dot { background: var(--track); } .pager { align-items: center; gap: 4px; margin-bottom: 22px; } .pager i { height: 4px; background: var(--track); } .pager span { font: 600 12px var(--sans); color: var(--muted); margin-left: 8px; white-space: nowrap; }
.skeleton { height: 220px; border-radius: 20px; background: linear-gradient(100deg, var(--card) 30%, color-mix(in srgb, var(--line) 60%, var(--card)) 50%, var(--card) 70%); background-size: 300% 100%; animation: sk 1.4s ease infinite; margin-bottom: 14px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
/* stats without boxes: number, unit, label, comparison */
.stats { margin: 18px 0; border-top: 1px solid var(--line); } .stat { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 4px 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stat .v { font: 500 30px/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; } .stat .v small { font: 600 13px var(--sans); letter-spacing: 0; color: var(--soft); margin-left: 3px; }
.stat .l { font-size: 15px; line-height: 1.35; } .stat .c { grid-column: 2; font-size: 14px; color: var(--muted); }
/* versus bar and court */
.versus { margin: 18px 0; } .versus .rowbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; margin-bottom: 12px; } .versus .who { font-size: 14px; color: var(--soft); } .versus .val { font: 600 15px var(--sans); }
.versus .bar { grid-column: 1 / -1; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; } .versus .bar i { display: block; height: 100%; border-radius: 6px; background: var(--track); } .versus .me .bar i { background: var(--clay); }
.court { display: block; width: 100%; max-width: 300px; margin: 16px auto 6px; } .court .ln { stroke: var(--muted); stroke-width: 1.2; fill: none; } .court .net { stroke: var(--ink); stroke-width: 2; } .court .hit { fill: var(--clay); opacity: .9; } .court .path { stroke: var(--clay); stroke-width: 2; fill: none; stroke-dasharray: 4 4; } .court text { font: 600 10px var(--sans); fill: var(--muted); }
.court-cap { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
/* home rows */
.rows { margin-top: 22px; } .rows .list-item { padding: 18px 0; align-items: flex-start; } .rows .k { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; } .rows .t { font: 500 20px/1.2 var(--serif); letter-spacing: -.01em; }
/* pinned story controls */
.storybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); }
.storybar > div { max-width: 580px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; } body.story .tabs { display: none; }
/* logger v2 */
.logger, .reel { max-width: 620px; margin: 0 auto; } .logger { height: 100dvh; inset: 0 0 auto 0; overflow-y: auto; } .scrim { position: fixed; inset: 0; z-index: 39; background: var(--paper); } .scrim.dark { background: #0B0D0E; z-index: 49; }
.logger .bar2 { display: flex; justify-content: space-between; align-items: center; } .logger .bar2 button { min-height: 48px; padding: 0 14px; display: inline-flex; align-items: center; font: 600 15px var(--sans); border-radius: 12px; } .logger .bar2 .fin { border: 1px solid var(--line); }
.arms button { min-height: 52px; } .count { font-size: clamp(44px, 9dvh, 64px); margin: 12px 0 2px; transition: transform .16s ease, color .16s ease; } .count.tick { transform: scale(1.08); color: var(--clay); }
.undo { display: flex; justify-content: center; margin: 6px 0; } .undo button { min-height: 48px; padding: 0 20px; border: 1px solid var(--line); border-radius: 99px; font: 600 14px var(--sans); color: var(--soft); }
.prompt { text-align: center; font: 600 20px var(--sans); margin: 8px 0 10px; } .last { text-align: center; font-size: 14px; color: var(--muted); min-height: 20px; }
.big button { min-height: clamp(96px, 22dvh, 200px); font-size: 24px; } .big button.a { background: var(--ink); color: var(--paper); border-color: transparent; } .big button.b { background: transparent; border: 2px solid var(--ink); box-shadow: none; }
.pad button { min-height: clamp(48px, 8.5dvh, 72px); } .pad .wide { grid-column: 1 / -1; min-height: 48px; font: 600 15px var(--sans); background: transparent; } .readout.bad { color: var(--red); animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.reel .x { padding: 12px 8px; min-height: 44px; } .reel .ctl button { padding: 15px 12px; } .reel header .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .reel header .n { font: 600 13px var(--sans); opacity: .7; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.tally b { text-align: right; font-weight: 600; } .logger .tally { font-size: 14px; }
.pad .wide + .wide, .pad button.wide:last-child { border: 1px solid var(--line); border-radius: 14px; }
h1:focus, h1:focus-visible { outline: none; }
