/* Shared styles for the free playbooks (guided workflows). Dark brand, thumb-first. */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg-page); color: var(--text-primary); font-family: var(--font-body); font-size: 16px; line-height: 1.62; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold-400); text-decoration: none; }
a:hover { color: var(--gold-300); }
h1, h2, h3 { font-family: var(--font-display); color: #fff; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--focus-ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.kw { color: var(--gold-400); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold-400); }
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Top bar with progress ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--surface-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border-hairline); }
.top__in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.logo img { width: 32px; height: 32px; border-radius: 6px; }
.logo span { display: none; font-family: var(--font-wordmark); font-size: 8px; letter-spacing: .3em; color: var(--gold-600); }
.progress { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(168, 178, 193, .16); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--grad-gold); transition: width .3s var(--ease-out); }
.progress__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
.top .btn { flex: 0 0 auto; }
@media (min-width: 700px) { .top__in { padding: 12px 24px; } .logo span { display: inline; } }

/* ---------- Buttons / badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 600; letter-spacing: .01em; line-height: 1.1; border: 1px solid transparent; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap; min-height: 48px; padding: 12px 24px; font-size: 15px; transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-base), background var(--dur-base), color var(--dur-base); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--grad-gold); color: var(--text-on-gold); box-shadow: var(--shadow-gold); }
.btn--primary:hover { filter: brightness(1.08); color: var(--text-on-gold); }
.btn--secondary { background: transparent; color: var(--gold-400); border-color: var(--border-gold); }
.btn--secondary:hover { background: rgba(174, 131, 49, .14); color: var(--gold-300); }
.btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-hairline); }
.btn--ghost:hover { color: #fff; border-color: var(--border-strong); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 13px; }
.btn--lg { min-height: 52px; padding: 16px 34px; font-size: 17px; }
.btn--full { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; padding: 5px 10px; border-radius: 4px; }
.badge--gold { background: rgba(174, 131, 49, .18); color: var(--gold-300); border: 1px solid var(--border-gold); }
.badge--neutral { background: rgba(168, 178, 193, .12); color: var(--slate-300); border: 1px solid var(--border-hairline); }
.badge--signal { background: rgba(20, 226, 214, .14); color: var(--teal-400); border: 1px solid rgba(20, 226, 214, .4); }

/* ---------- Layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 48px 0 32px; }
.hero h1 { font-weight: 800; font-size: 40px; line-height: .98; letter-spacing: -.03em; text-wrap: balance; margin: 14px 0 16px; }
.hero .lead { font-size: 17px; color: var(--text-secondary); max-width: 640px; text-wrap: pretty; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 24px; max-width: 560px; }
.facts div { background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: 12px; padding: 12px; }
.facts b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--gold-400); letter-spacing: -.02em; line-height: 1; }
.facts span { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.rule { margin-top: 24px; padding: 16px 18px; border: 1px solid var(--border-gold); background: rgba(174, 131, 49, .08); border-radius: 12px; font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.rule b { color: var(--gold-300); }
@media (min-width: 900px) { .hero { padding: 72px 0 40px; } .hero h1 { font-size: 64px; } .hero .lead { font-size: 19px; } }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 96px; }
.side { display: none; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
  .side { display: block; position: sticky; top: 84px; align-self: start; }
}
.side__nav { display: flex; flex-direction: column; gap: 4px; }
.side__nav a { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; padding: 10px 10px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; }
.side__nav a small { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--text-muted); }
.side__nav a:hover { background: var(--surface-inset); color: #fff; }
.side__nav a.is-active { color: #fff; background: rgba(174, 131, 49, .12); }
.side__nav i { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border-strong); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); font-style: normal; }
.side__nav a.is-done i { background: var(--gold-400); border-color: var(--gold-400); color: var(--text-on-gold); }
.side__nav a.is-done i::before { content: "✓"; }
.side__nav a.is-done i span { display: none; }

/* ---------- Step / day cards ---------- */
.step { background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: var(--r-lg); padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-md); scroll-margin-top: 84px; transition: border-color var(--dur-base); }
.step.is-done { border-color: rgba(174, 131, 49, .35); }
.step__head { display: flex; align-items: flex-start; gap: 12px; }
.step__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.step__meta .time { font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border-hairline); padding: 5px 8px; border-radius: 999px; }
.step h2 { font-size: 22px; font-weight: 700; line-height: 1.15; }
.step__sub { margin-top: 8px; color: var(--text-secondary); font-size: 15px; }
.step__why { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }
.step__why b, .step__move b { color: var(--gold-300); font-weight: 600; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; display: block; margin-bottom: 4px; }
.step__move { margin-top: 12px; font-size: 15px; color: var(--text-primary); }
.check { appearance: none; width: 26px; height: 26px; flex: 0 0 auto; margin: 2px 0 0; border: 1.5px solid var(--border-strong); border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; transition: background var(--dur-fast), border-color var(--dur-fast); }
.check:checked { background: var(--gold-400); border-color: var(--gold-400); }
.check:checked::after { content: "✓"; font-size: 14px; font-weight: 800; color: var(--text-on-gold); }
.done-toggle { display: flex; align-items: center; gap: 10px; margin-top: 16px; cursor: pointer; font-size: 14px; color: var(--text-secondary); user-select: none; }
.done-toggle .check { margin: 0; }
.step.is-done .done-toggle { color: var(--gold-300); }

.prompt { margin-top: 16px; background: #000; border: 1px solid var(--border-hairline); border-radius: 12px; overflow: hidden; }
.prompt__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border-hairline); background: var(--ink-800); }
.prompt__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-400); }
.prompt pre { margin: 0; padding: 16px; white-space: pre-wrap; word-break: break-word; font-family: var(--font-body); font-size: 14.5px; line-height: 1.6; color: var(--text-primary); max-height: 340px; overflow: auto; }
.prompt pre mark { background: rgba(225, 195, 65, .18); color: var(--gold-300); border-radius: 3px; padding: 0 3px; }
.copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; background: var(--grad-gold); color: var(--text-on-gold); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.copy:hover { filter: brightness(1.08); }
.copy.is-copied { background: rgba(20, 226, 214, .16); color: var(--teal-400); border-color: rgba(20, 226, 214, .4); }
.result { margin-top: 14px; padding: 12px 14px; border-left: 2px solid var(--gold-400); background: rgba(174, 131, 49, .08); border-radius: 0 10px 10px 0; font-size: 14px; color: var(--text-secondary); }
.result b { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 4px; }
.takeaway { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-hairline); font-size: 14px; color: var(--text-secondary); }
.takeaway b { color: #fff; font-weight: 600; }
.step__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
@media (min-width: 900px) { .step { padding: 28px; margin-bottom: 18px; } .step h2 { font-size: 26px; } }

/* ---------- Week groups (21 days) ---------- */
.week { margin-top: 40px; scroll-margin-top: 84px; }
.week__head { margin-bottom: 18px; }
.week__head h2 { font-size: 28px; font-weight: 700; margin-top: 8px; }
.week__head p { color: var(--text-secondary); margin-top: 6px; }
.milestone { margin: 6px 0 12px; padding: 16px 18px; border: 1px solid var(--border-gold); background: linear-gradient(160deg, rgba(174, 131, 49, .16), rgba(10, 20, 33, .9) 60%); border-radius: 12px; }
.milestone b { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 4px; }
.milestone.is-locked { opacity: .55; }
.today { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }
.today .badge--signal { animation: none; }

/* ---------- Finish ---------- */
.finish { margin-top: 32px; position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--border-gold); background: radial-gradient(70% 60% at 50% 100%, #102b46 0%, #0b1929 40%, #000 100%); padding: 40px 24px; text-align: center; }
.finish h2 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: .98; text-wrap: balance; }
.finish p { margin-top: 14px; color: var(--text-secondary); max-width: 520px; margin-left: auto; margin-right: auto; }
.finish .wins { display: grid; gap: 8px; margin: 24px auto 0; max-width: 520px; text-align: left; }
.finish .wins li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text-primary); }
.finish .wins li::before { content: "✓"; color: var(--gold-400); font-weight: 800; flex: 0 0 auto; }
.finish ul { padding: 0; margin: 0; }
.checklist { display: grid; gap: 8px; margin-top: 18px; text-align: left; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: 12px; padding: 12px 14px; font-size: 15px; cursor: pointer; }
.checklist label.is-done { border-color: rgba(174, 131, 49, .35); color: var(--text-secondary); }
.next-steps { display: grid; gap: 12px; margin-top: 28px; }
.next-card { text-align: left; background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.next-card h3 { font-size: 18px; font-weight: 600; }
.next-card p { margin: 0; font-size: 14px; }
@media (min-width: 700px) { .finish { padding: 64px 48px; } .finish h2 { font-size: 52px; } .next-steps { grid-template-columns: 1fr 1fr; } }

/* ---------- Email gate ---------- */
.gate { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: end center; padding: 0; }
.gate[hidden] { display: none; }
.gate__card { width: 100%; max-width: 520px; background: var(--surface-card); border: 1px solid var(--border-gold); border-radius: 24px 24px 0 0; padding: 28px 20px 32px; box-shadow: var(--shadow-gold), var(--shadow-lg); }
.gate__card h2 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-top: 12px; text-wrap: balance; }
.gate__card p { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }
.gate__form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.field__box { display: flex; align-items: center; background: var(--surface-inset); border: 1px solid var(--border-hairline); border-radius: 12px; padding: 0 14px; transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.field__box:focus-within { border-color: var(--border-gold); box-shadow: var(--glow-gold); }
.field.is-error .field__box { border-color: var(--state-danger); box-shadow: none; }
.field__input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text-primary); font-family: var(--font-body); font-size: 15px; padding: 13px 0; min-height: 46px; }
.field__input::placeholder { color: var(--text-muted); }
.field__input:focus-visible { box-shadow: none; }
.field__msg { font-size: 12px; color: var(--state-danger); }
.field__msg:empty { display: none; }
.gate__trust { margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.gate__skip { margin-top: 14px; text-align: center; }
.gate__skip button { all: unset; cursor: pointer; font-size: 13px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.gate__skip button:hover { color: var(--text-secondary); }
@media (min-width: 700px) { .gate { place-items: center; padding: 20px; } .gate__card { border-radius: 24px; padding: 40px 36px; } .gate__form { flex-direction: row; } .gate__form .btn { flex: 0 0 auto; } }

/* ---------- Mobile bottom bar ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface-glass); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--border-hairline); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; }
.dock .btn { flex: 1; }
.dock__meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; }
@media (min-width: 900px) { .dock { display: none; } }
body.has-dock { padding-bottom: 84px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border-hairline); padding: 32px 16px; font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.8; }
.foot a { color: var(--text-secondary); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: #0a1421; border: 1px solid var(--border-gold); color: var(--gold-300); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; white-space: nowrap; }
.toast.show { opacity: 1; }
@media (min-width: 900px) { .toast { bottom: 32px; } }

@media print {
  .top, .dock, .gate, .side, .step__actions, .copy, .done-toggle, .toast { display: none !important; }
  body { background: #fff; color: #000; }
  .step, .prompt, .result { border-color: #ccc; box-shadow: none; background: #fff; color: #000; }
  .prompt pre, .step h2, h1, h2, h3, .takeaway b { color: #000; }
}
