/* AnchorPoint Training: mobile-first app styles (brand navy #101B2D, orange #E85B27, yellow #F2C94C). */
:root {
  --navy: #101B2D; --navy-2: #1B2A45; --orange: #E85B27; --orange-ink: #B2400F; --yellow: #F2C94C;
  --bg: #F4F6F9; --card: #FFFFFF; --ink: #101B2D; --muted: #5A6479; --line: #E1E6EE; --soft: #EEF1F6;
  --good: #1E7A4F; --good-soft: #DDF1E5; --warn-soft: #FBF0C8; --orange-soft: #FCE6DC;
  --display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
a { color: var(--orange-ink); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }

.shell { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.top { background: var(--navy); color: #fff; padding: calc(18px + env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 20px max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 6px; }
.top .kick { font: 700 .7rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.top h1 { font-size: 1.45rem; font-weight: 800; color: #fff; }
.top p { color: #C4CCDA; font-size: .9rem; }
.top .back { background: none; border: 0; color: var(--yellow); font: 700 .8rem var(--display); padding: 0; cursor: pointer; justify-self: start; }
.body { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 12px; }

.card { background: var(--card); border-radius: 14px; padding: 16px; display: grid; gap: 10px; box-shadow: 0 1px 2px rgba(16,27,45,.08); }
.card h2 { font-size: 1.05rem; font-weight: 800; }
.card h3 { font-size: .98rem; font-weight: 700; }
.sub { color: var(--muted); font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; font: 700 .7rem var(--display); letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: #3E4A61; white-space: nowrap; }
.chip.o { background: var(--orange-soft); color: var(--orange-ink); }
.chip.g { background: var(--good-soft); color: #1B6B45; }
.chip.y { background: var(--warn-soft); color: #6B5200; }
.chip.n { background: var(--navy); color: #fff; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; font: 700 .95rem var(--display); border: 0; border-radius: 12px; padding: 13px 16px; cursor: pointer; background: var(--orange); color: #fff; width: 100%; text-decoration: none; min-height: 48px; }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.dark { background: var(--navy); color: #fff; }
.btn.sm { width: auto; padding: 9px 13px; font-size: .82rem; border-radius: 10px; min-height: 40px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.link { background: none; border: 0; color: var(--orange-ink); font-weight: 600; cursor: pointer; padding: 4px 0; text-decoration: underline; }

form { display: grid; gap: 12px; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
input[type=email], input[type=password], input[type=text], input[type=number], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1.5px solid #CBD2DE; border-radius: 10px; padding: 11px 12px; width: 100%;
}
textarea { min-height: 220px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.msg { font-size: .88rem; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.msg.err { background: #FDE3E0; color: #8A1C10; }
.msg.ok { background: var(--good-soft); color: #1B6B45; }

.opt { display: grid; gap: 2px; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 13px 14px; cursor: pointer; color: var(--ink); width: 100%; }
.opt b { font-family: var(--display); }
.opt span { color: var(--muted); font-size: .84rem; }
.opt[aria-pressed=true] { border-color: var(--orange); background: #FFF6F2; }
.opts { display: grid; gap: 8px; }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Grid children may not grow wider than the screen because of long words or buttons. */
.body > *, form > *, .card > * { min-width: 0; }
.opt b, .opt span { overflow-wrap: anywhere; }

.ring { display: flex; align-items: center; gap: 14px; }
.ring svg { flex: none; }
.day { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 13px 12px; border: 0; width: 100%; text-align: left; color: var(--ink); cursor: pointer; box-shadow: 0 1px 2px rgba(16,27,45,.06); }
.day .d { font: 800 .8rem var(--display); color: var(--muted); text-align: center; }
.day .t { font-weight: 700; }
.day .s { font-size: .8rem; color: var(--muted); }
.day.today { outline: 2px solid var(--orange); }
.day.locked { cursor: pointer; opacity: .85; }
.weeknav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.block { display: grid; gap: 8px; }
.block-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.block-h h3 { font: 800 .9rem var(--display); text-transform: uppercase; letter-spacing: .06em; }
.note { font-size: .84rem; color: var(--muted); }
.ex { background: #fff; border-radius: 12px; padding: 12px; display: grid; gap: 8px; box-shadow: 0 1px 2px rgba(16,27,45,.06); }
.exhead { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; background: none; border: 0; padding: 0; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.exhead b { font-family: var(--display); font-size: .97rem; }
.rx { font-size: .84rem; color: var(--muted); }
.sets { display: flex; gap: 6px; flex-wrap: wrap; }
.set { font: 700 .78rem var(--display); padding: 8px 11px; border-radius: 9px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); min-height: 44px; }
.set[aria-pressed=true] { background: var(--good); border-color: var(--good); color: #fff; }
.logrow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; font-size: .84rem; color: var(--muted); }
.logrow input { padding: 8px 10px; font-size: 16px; }
.logrow small { grid-column: 2; font-size: .76rem; }
.rq { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--soft); }
.rq p { font-size: .9rem; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--soft); font-size: .9rem; }
.kv:first-of-type { border-top: 0; }
.kv span { color: var(--muted); min-width: 0; }
.exdetail { border-top: 1px solid var(--soft); padding-top: 10px; display: grid; gap: 8px; font-size: .9rem; }
.cues { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.subs { display: flex; flex-wrap: wrap; gap: 6px; }
.subs button { min-height: 44px; font: 600 .8rem var(--body); padding: 7px 11px; border-radius: 999px; border: 1.5px solid #C9D0DB; background: #fff; cursor: pointer; color: var(--ink); }
.subs button[aria-pressed=true] { border-color: var(--orange); background: #FFF1EA; color: var(--orange-ink); }
.safety { font-size: .76rem; color: #7A8397; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.bars div { flex: 1; display: grid; gap: 4px; justify-items: center; font-size: .66rem; color: var(--muted); align-content: end; height: 100%; }
.bars span { width: 100%; border-radius: 5px 5px 2px 2px; background: var(--navy); min-height: 3px; }
.bars span.cur { background: var(--orange); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; text-align: center; }
.stat b { display: block; font: 800 1.4rem var(--display); font-variant-numeric: tabular-nums; }
.stat span { font-size: .72rem; color: var(--muted); }

.paywall { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 14px; padding: 18px; display: grid; gap: 10px; }
.paywall h2 { color: #fff; font-size: 1.1rem; }
.paywall p { color: #C4CCDA; font-size: .88rem; }
.paywall .price { font: 800 1.6rem var(--display); color: var(--yellow); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar a { display: grid; justify-items: center; gap: 2px; text-decoration: none; font: 700 .7rem var(--display); color: var(--muted); padding: 6px 0; min-height: 48px; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current=page] { color: var(--orange); }
.devbar { background: var(--navy-2); color: var(--yellow); font: 700 .75rem var(--display); text-align: center; padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px; }
.loading { padding: 40px 16px; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(144px + env(safe-area-inset-bottom, 0px)); background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: .9rem; max-width: calc(100% - 32px); z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: pop .2s ease-out; } }
@keyframes pop { from { opacity: .3; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }

.founder-badge { display: inline-block; margin: 0 0 .5rem; padding: .3rem .7rem; border-radius: 999px; background: #101B2D; color: #F2C94C; font-family: Montserrat, sans-serif; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
/* AnchorPoint logo (approved artwork, resized only) */
.top { position: relative; }
.top-mark { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: 34px; height: auto; pointer-events: none; }
.top .kick, .top h1, .top p { padding-right: 48px; }
.logo-card { display: grid; place-items: center; padding-block: 18px; }
.logo-card img { width: min(180px, 55%); height: auto; }
.exhead > .rx { white-space: nowrap; }
.founder-badge { width: fit-content; }
/* Phone behaviour */
html { -webkit-text-size-adjust: 100%; }
button, a, input, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.has-devbar .top { padding-top: 18px; }
.has-devbar .top-mark { top: 14px; }
.top .back, .link { min-height: 44px; }
.btn.sm, .logrow input, .exhead { min-height: 44px; }
/* Set progress and celebration */
.setbar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 4px 16px rgba(16,27,45,.25); }
.setbar div { flex: 1; height: 8px; border-radius: 9px; background: #33425F; overflow: hidden; }
.setbar span { display: block; height: 100%; border-radius: 9px; background: var(--yellow); }
.setbar.full span { background: #4CC38A; }
.setbar b { font: 700 .8rem var(--display); white-space: nowrap; }
.cheer { position: fixed; inset: 0; z-index: 20; background: var(--navy); color: #fff; display: grid; overflow: auto; padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(20px + env(safe-area-inset-bottom, 0px)); }
.cheer-in { position: relative; margin: auto; width: 100%; max-width: 380px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.cheer-in img { width: 84px; height: auto; }
.cheer .kick { font: 700 .78rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.cheer h2 { font-size: 1.8rem; font-weight: 800; color: #fff; overflow-wrap: anywhere; }
.cheer p { color: #D5DBE6; }
.pips { display: flex; gap: 8px; }
.pips span { width: 34px; height: 8px; border-radius: 9px; background: #33425F; }
.pips .on { background: var(--orange); }
.five { width: 104px; height: 104px; border-radius: 50%; border: 3px solid var(--yellow); background: var(--navy-2); font-size: 3.2rem; line-height: 1; cursor: pointer; margin-top: 6px; }
.five.hit { background: var(--orange); }
.cheer .five-t { font-weight: 600; min-height: 1.5em; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .set.pop { animation: setpop .3s ease-out; }
  .cheer-in { animation: cheerin .35s ease-out; }
  .five.hit { animation: five .45s ease-out; }
  .confetti i { display: block; position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.6s ease-in forwards; }
}
@keyframes setpop { 40% { transform: scale(1.18); } }
@keyframes cheerin { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes five { 30% { transform: scale(1.35) rotate(-14deg); } 60% { transform: scale(.94) rotate(6deg); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }
