/* Phiusion Learn. Sections 1 to 3 are copied from docs/screens/style-guide.html (the approved look);
   section 4 is the app's own layout, built from the same tokens. */

/* 1. TOKENS: unchanged from the events app. Light mode only. */
:root {
  --bg: #ffffff; --surface: #ffffff;
  --text: #1c1917; --text-2: #57534e; --text-3: #78726a; --muted: #a8a39a;
  --border: #e7e5e4; --border-subtle: #ede8df; --card-border: rgba(252, 233, 176, 0.6);
  --stone-50: #fafaf9; --stone-400: #a8a29e; --stone-500: #78716c; --stone-600: #57534e; --stone-700: #44403c; --stone-800: #292524; --stone-900: #1c1917;
  --amber-50: rgba(255, 251, 235, 0.6); --amber-800: #92400e;
  --accent: #ce971a; --accent-hover: #9a7114; --accent-subtle: #fffcf2;
  --ink: #1c1917;
  --ok: #2f7a4f; --ok-bg: #eef6f0; --warn: #9a5b0b; --warn-bg: #fff4e0; --bad: #a3332b; --bad-bg: #fbeceb;
  --radius: 14px; --radius-sm: 8px;
  --shadow: 0 1px 3px -1px rgba(28,25,23,.04), 0 2px 8px -2px rgba(28,25,23,.03);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.4,0,0.2,1);
}

/* 2. BASE: buttons, fields, chips, notices, cards, wordmark. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--stone-800); font: 400 15px/1.6 var(--font); }
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
h1 { font-size: 26px; font-weight: 600; } h2 { font-size: 20px; font-weight: 600; } h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--text-3); } .small { font-size: 13px; }
.card { background: rgba(255,255,255,.8); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.btn { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1 var(--font);
  padding: 11px 16px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); white-space: nowrap; }
.btn:hover { border-color: var(--text-3); }
.btn:focus-visible, input:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #33302d; border-color: #33302d; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--border-subtle); }
.btn-lg { padding: 15px 22px; font-size: 15px; width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type=email], input[type=text], input[type=tel] { width: 100%; font: 400 15px/1.4 var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; min-height: 44px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.chip-bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.chip-gold { background: var(--accent-subtle); border-color: #f1dfb0; color: var(--accent-hover); }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; }
.notice-ok { background: var(--ok-bg); color: var(--ok); } .notice-bad { background: var(--bad-bg); color: var(--bad); }
.wordmark { display: inline-flex; align-items: baseline; font: 500 20px/1 var(--display); letter-spacing: -0.04em; color: var(--stone-900); text-decoration: none; }
.wordmark-dot { display: inline-block; width: .16em; height: .16em; border-radius: 50%; background: var(--amber-800); margin-left: .06em; }

/* 3. LEARN COMPONENTS (only the ones these screens use so far). */
.lp-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border-bottom: 1px solid rgba(252, 211, 77, .3); }
.lp-tag { font-size: 13px; font-weight: 600; color: var(--stone-400); }
.lp-header .spacer { flex: 1; }
.lp-main { padding: 20px 16px 24px; }
.bottom-bar { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.94); border-top: 1px solid var(--border-subtle); backdrop-filter: blur(6px); }
.bottom-bar .btn { flex: 1; padding: 14px 16px; }
.code-input { font: 600 28px/1 var(--display) !important; letter-spacing: .4em; text-align: center; padding: 14px 12px 14px calc(12px + .4em) !important; min-height: 60px !important; }
.hidden { display: none !important; }

/* 4. APP LAYOUT. Phone first; wider screens centre the same layout at 640px. */
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; }
.screen > .lp-main { flex: 1; }
.boot { padding: 40px 16px; color: var(--text-3); }
.lead-title { margin-top: 28px; }
.lead-intro { margin: 10px 0 26px; }
.stack { display: grid; gap: 16px; }
.turnstile-slot { margin: 14px 0 16px; min-height: 65px; }
.turnstile-slot:empty { display: none; }
.row-split { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }
.form-error { margin-top: 14px; }
.field.invalid input { border-color: var(--bad); }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-size: 14px;
  transition: opacity .2s var(--ease), transform .2s var(--ease); z-index: 20; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); }
