/* SecPlus Tracker — design system
   Premium dark study tracker. Inter Variable drives the whole UI; Fraunces is
   reserved for the signature numerals (exam countdown / readiness) so the hero
   stays distinctive rather than templated. One champagne accent as punctuation.
   Everything below is token-driven: type scale, 4px spacing, layered elevation,
   soft shadows, motion easing. Mobile/iPad-first. */

:root {
  color-scheme: dark;

  /* ---- Type scale (px, real contrast) ---- */
  --text-xs: 13px;
  --text-sm: 15px;   /* body */
  --text-md: 21px;
  --text-lg: 34px;
  --text-xl: 56px;
  --text-xxl: clamp(72px, 23vw, 120px); /* the countdown numeral */
  --label: 12px;     /* small uppercase labels */

  /* ---- Spacing (4px grid) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;

  /* ---- Color & depth ---- */
  --bg: #0b0e13;
  --surface: #11151d;        /* a few % lighter */
  --surface-2: #171c26;      /* elevated */
  --border: rgba(255, 255, 255, 0.06);   /* hairline */
  --border-2: rgba(255, 255, 255, 0.11); /* stronger hairline */

  --text-1: #ece8de;  /* primary, warm white */
  --text-2: #a4a8b3;  /* secondary */
  --text-3: #717682;  /* tertiary / faint */

  --accent: #cdb081;
  --accent-deep: #a8895a;
  --accent-soft: rgba(205, 176, 129, 0.12);
  --accent-glow: rgba(205, 176, 129, 0.30);
  --on-accent: #0b0e13;

  --sage: #93b89e;  --sage-soft: rgba(147, 184, 158, 0.14);
  --clay: #cf8068;  --clay-soft: rgba(207, 128, 104, 0.14);

  /* ---- Radius ---- */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* ---- Shadows: large, soft, low-opacity ---- */
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 8px 24px -14px rgba(0, 0, 0, 0.5);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 200ms;
  --dur: 300ms;
  --dur-slow: 400ms;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --maxw: 540px;
  --tap: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* legacy aliases (kept so nothing referencing old names breaks) */
  --ink: var(--bg); --ink-2: var(--surface); --ink-3: var(--surface-2);
  --line: var(--border); --line-2: var(--border-2);
  --paper: var(--text-1); --muted: var(--text-2); --faint: var(--text-3);
  --gold: var(--accent); --gold-deep: var(--accent-deep); --gold-soft: var(--accent-soft); --on-gold: var(--on-accent);
}

@media (min-width: 768px) { :root { --maxw: 720px; } }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font);
  font-size: var(--text-sm);
  line-height: 1.55;
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;   /* numbers never jitter */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
  background-image:
    radial-gradient(130% 70% at 100% -10%, rgba(205, 176, 129, 0.07), transparent 55%),
    radial-gradient(90% 50% at -10% 0%, rgba(120, 140, 200, 0.05), transparent 55%);
  background-attachment: fixed;
}

h1, h2, h3 { margin: 0; line-height: 1.08; }
button { font-family: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* Keep these above the grain overlay */
.app, .signin, .boot { position: relative; z-index: 1; }

/* Screen cross-fades (boot → sign-in → app) */
#boot, #signin, #app { transition: opacity var(--dur-slow) var(--ease); }
.screen-out { opacity: 0 !important; pointer-events: none; }

/* Accent focus ring everywhere, no default outline */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.sr-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Shared label device */
.eyebrow {
  font-size: var(--label); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2);
}

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}

/* ---------- Skeleton shimmer ---------- */
.sk {
  background: linear-gradient(100deg, var(--surface) 28%, var(--surface-2) 50%, var(--surface) 72%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.boot { position: fixed; inset: 0; display: flex; align-items: stretch; }
.boot-skeleton {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: calc(var(--space-8) + var(--safe-top)) var(--space-5) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.sk-eyebrow { width: 38%; height: 12px; border-radius: 999px; }
.sk-figure { width: 60%; height: 96px; border-radius: var(--radius); }
.sk-line { width: 80%; height: 14px; border-radius: 999px; }
.sk-card { width: 100%; height: 196px; border-radius: var(--radius); margin-top: var(--space-2); }
.sk-ledger { width: 100%; height: 84px; border-radius: var(--radius); }

/* ---------- Brand mark ---------- */
/* the actual app icon, so the in-app mark always matches it exactly */
.brand-mark {
  width: 58px; height: 58px; border-radius: 16px; display: block;
  box-shadow: 0 18px 46px -18px rgba(0, 0, 0, 0.7);
}

/* ---------- Sign-in ---------- */
.signin {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--space-8) + var(--safe-top)) var(--space-6) calc(var(--space-8) + var(--safe-bottom));
}
.signin-card { width: 100%; max-width: 400px; }
.signin .brand-mark { margin: 0 0 var(--space-7); }
.signin h1 {
  font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: var(--space-4); line-height: 1.04;
}
.signin h1 em { font-style: normal; color: var(--accent); }
.signin-sub { color: var(--text-2); margin: 0 0 var(--space-7); font-size: var(--text-sm); max-width: 36ch; }
.signin-sub strong { color: var(--text-1); font-weight: 600; }
.signin-foot {
  color: var(--text-3); font-size: var(--text-xs); margin-top: var(--space-7); max-width: 42ch;
  padding-top: var(--space-5); border-top: 1px solid var(--border);
}
.signin-error {
  color: var(--clay); font-size: var(--text-xs); margin-top: var(--space-4);
  background: var(--clay-soft); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  border: 1px solid rgba(207, 128, 104, 0.3);
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  width: 100%; min-height: var(--tap);
  border: none; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn-primary {
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  color: var(--on-accent); font-weight: 700;
  box-shadow: 0 14px 36px -16px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.985); }
.btn-google { background: transparent; color: var(--text-1); border: 1px solid var(--border-2); font-weight: 600; }
.btn-google:hover { background: var(--surface); border-color: var(--text-3); }
.btn-google:active { transform: scale(0.99); }
.btn-google svg path { fill: var(--text-1); }
.btn-secondary { background: var(--surface-2); color: var(--text-1); border: 1px solid var(--border-2); }
.btn-secondary:hover { border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text-1); }

/* ---------- App shell ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--space-3) + var(--safe-top)) var(--space-5) var(--space-3);
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
/* condenses subtly once you scroll under it */
.topbar.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom-color: var(--border-2);
  box-shadow: 0 10px 34px -20px rgba(0, 0, 0, 0.8);
}
.topbar-title { font-size: var(--text-md); font-weight: 700; letter-spacing: -0.02em; }
.topbar-title::first-letter { color: var(--accent); }
.icon-btn {
  width: var(--tap); height: var(--tap); margin-right: -10px; border-radius: var(--radius-sm);
  border: none; background: transparent; color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--text-1); background: var(--surface); }

.view {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: var(--space-2) var(--space-5) calc(108px + var(--safe-bottom));
}

/* ---------- Bottom tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center; gap: var(--space-1);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(150%) blur(22px);
  -webkit-backdrop-filter: saturate(150%) blur(22px);
  border-top: 1px solid var(--border);
}
.tab {
  flex: 1; max-width: 150px; min-height: 52px;
  border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1);
  color: var(--text-3); border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}
.tab svg { width: 21px; height: 21px; transition: transform var(--dur) var(--ease-out); }
.tab[aria-selected="true"] { color: var(--accent); }
.tab[aria-selected="true"] svg { transform: translateY(-1px); }

/* ---------- Masthead (signature numerals) ---------- */
.masthead {
  padding: var(--space-5) 0 var(--space-6);
  border-bottom: 1px solid var(--border); margin-bottom: var(--space-6);
}
.masthead-eyebrow { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.masthead-eyebrow .dot-sep { color: var(--text-3); }
.masthead-figure { position: relative; display: flex; align-items: flex-end; gap: var(--space-4); }
/* radial glow behind the countdown number */
.masthead-figure::before {
  content: ""; position: absolute; left: -8%; top: -30%; width: 62%; height: 170%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 72%);
  filter: blur(22px); z-index: 0; pointer-events: none;
}
.masthead-num {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--text-xxl); line-height: 0.82; letter-spacing: -0.04em; color: var(--text-1);
}
.masthead-num.gold { color: var(--accent); }
.masthead-pct { font-size: 0.34em; color: var(--text-2); letter-spacing: 0; margin-left: 0.05em; }
.masthead-unit { position: relative; z-index: 1; padding-bottom: 0.7rem; }
.masthead-unit .u-big { font-family: var(--font-display); font-size: var(--text-md); font-style: italic; color: var(--accent); display: block; line-height: 1; }
.masthead-unit .u-small { color: var(--text-2); font-size: var(--text-xs); }
.masthead-cap { color: var(--text-2); font-size: var(--text-sm); margin-top: var(--space-4); max-width: 44ch; }
.masthead-cap strong { color: var(--text-1); font-weight: 600; }
.masthead-cap em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ---------- Ledger ---------- */
.ledger {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: var(--space-7); background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.ledger-cell { padding: var(--space-4); border-right: 1px solid var(--border); }
.ledger-cell:last-child { border-right: none; }
.ledger-num {
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-md); line-height: 1;
  letter-spacing: -0.02em;
}
.ledger-num .of { color: var(--text-3); font-size: 0.62em; }
.ledger-num.gold { color: var(--accent); }
.ledger-label {
  font-size: var(--label); font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-3); margin-top: var(--space-2);
}

/* ---------- Section eyebrow ---------- */
.section-title {
  display: flex; align-items: center; gap: var(--space-3);
  font-size: var(--label); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-2); margin: var(--space-7) 0 var(--space-4);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.section-title .count { color: var(--accent); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-5); margin-bottom: var(--space-3);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease-out);
}

/* Hero — the next action */
.hero {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: var(--space-6); margin-bottom: var(--space-4);
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 72%);
}
.hero-kicker {
  font-size: var(--label); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3);
}
.hero-title {
  font-size: var(--text-md); font-weight: 650; line-height: 1.2;
  letter-spacing: -0.02em; margin-bottom: var(--space-3);
}
.hero-meta {
  color: var(--text-2); font-size: var(--text-xs);
  margin-bottom: var(--space-5); display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center;
}
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.watch-btn { text-decoration: none; }
.watch-btn svg { width: 19px; height: 19px; }

/* ---------- Video rows ---------- */
.vid {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4) var(--space-1); border-bottom: 1px solid var(--border);
}
.vid:last-child { border-bottom: none; }
.vid-check {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--border-2); display: grid; place-items: center;
  color: transparent; background: transparent; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.vid-check.on { background: var(--sage); border-color: var(--sage); color: var(--bg); }
.vid-check svg { width: 13px; height: 13px; }
.vid-main { flex: 1; min-width: 0; }
.vid-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.vid-sub {
  font-size: var(--text-xs); color: var(--text-3);
  margin-top: var(--space-1); display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap;
}
.vid-yt { color: var(--accent); text-decoration: none; font-weight: 600; transition: opacity var(--dur-fast) var(--ease); }
.vid-yt:hover { opacity: 0.75; }
.badge-mastered {
  font-size: var(--label); font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--sage);
  background: var(--sage-soft); padding: 2px var(--space-2); border-radius: var(--radius-sm);
}

/* ---------- Rating control ---------- */
.rate { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.rate-btn {
  flex: 1; min-width: 0; min-height: var(--tap);
  border: 1px solid var(--border-2); background: transparent;
  color: var(--text-2); border-radius: var(--radius-sm);
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-md);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.rate-btn:hover { border-color: var(--text-3); color: var(--text-1); }
.rate-btn:active { transform: scale(0.93); }
.rate-btn.sel {
  background: linear-gradient(150deg, var(--accent), var(--accent-deep));
  color: var(--on-accent); border-color: transparent;
  box-shadow: 0 10px 26px -14px var(--accent-glow);
}
.rate-legend {
  display: flex; justify-content: space-between; margin-top: var(--space-2); padding: 0 var(--space-1);
  font-size: var(--label); letter-spacing: 0.04em; color: var(--text-3);
}

/* ---------- Notes ---------- */
.note {
  width: 100%; margin-top: var(--space-3); resize: none;
  background: var(--bg); color: var(--text-1);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: var(--space-3); font-family: var(--font); font-size: var(--text-xs); line-height: 1.5;
  min-height: var(--tap); transition: border-color var(--dur-fast) var(--ease);
}
.note::placeholder { color: var(--text-3); }
.note:focus-visible { outline: none; border-color: var(--accent); }

/* ---------- Roadmap ---------- */
.plan { display: flex; flex-direction: column; }
.card.plan { padding: var(--space-1) var(--space-5); }
.plan-row {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  gap: var(--space-1) var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--border);
}
.plan-row:last-child { border-bottom: none; }
.plan-label { font-weight: 600; font-size: var(--text-sm); }
.plan-val {
  font-family: var(--font-display); font-weight: 500; font-size: var(--text-md);
  color: var(--accent); text-align: right; white-space: nowrap; letter-spacing: -0.02em;
}
.plan-note { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--text-3); }

.domain { border-bottom: 1px solid var(--border); overflow: hidden; }
.domain:first-of-type { border-top: 1px solid var(--border); }
.domain-head {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  padding: var(--space-5) var(--space-1); color: var(--text-1); display: block;
  transition: background var(--dur) var(--ease);
}
.domain-head:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.domain-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.domain-name { font-size: var(--text-sm); font-weight: 650; letter-spacing: -0.01em; }
.domain-left { font-size: var(--text-xs); color: var(--text-2); flex: none; }
.domain-left.done { color: var(--sage); font-weight: 600; }
.bar { height: 3px; border-radius: 999px; background: var(--border); margin-top: var(--space-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width var(--dur-slow) var(--ease-out); }
.bar.full > span { background: var(--sage); }
.domain-body { padding: var(--space-1) 0 var(--space-3); }
.chev { color: var(--text-3); transition: transform var(--dur) var(--ease-out); margin-left: var(--space-2); }
.domain.open .chev { transform: rotate(180deg); }

/* ---------- Weakspots / empty ---------- */
.empty, .weak-empty { text-align: center; color: var(--text-2); padding: var(--space-8) var(--space-5); }
.empty-mark {
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--accent);
  margin-bottom: var(--space-2); font-style: italic;
}
.empty strong { color: var(--text-1); font-weight: 600; }
.pill {
  font-size: var(--label); font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 3px var(--space-2); border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
}
.pill.r1 { background: var(--clay-soft); color: var(--clay); }
.pill.r2 { background: var(--accent-soft); color: var(--accent); }
.pill.r3 { background: var(--accent-soft); color: var(--accent); }
.scheduled-date { font-size: var(--text-xs); color: var(--text-3); }

.graduating { animation: graduate var(--dur-slow) var(--ease) forwards; }
@keyframes graduate {
  to { opacity: 0; transform: translateX(36px) scale(0.97); max-height: 0; padding-top: 0; padding-bottom: 0; margin: 0; }
}

/* ---------- Settings sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); animation: fade var(--dur) var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-panel {
  position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border-2); border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-3) var(--space-6) calc(var(--space-6) + var(--safe-bottom));
  box-shadow: var(--shadow);
  animation: sheet-up var(--dur-slow) var(--ease-out);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 38px; height: 4px; border-radius: 999px; background: var(--border-2); margin: var(--space-1) auto var(--space-5); }
.sheet-panel h2 { font-size: var(--text-md); font-weight: 700; margin-bottom: var(--space-5); letter-spacing: -0.02em; }
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }
.field > span { font-size: var(--label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.field input {
  min-height: var(--tap); background: var(--bg); color: var(--text-1);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 0 var(--space-3);
  font-family: var(--font); font-size: var(--text-sm);
  transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus-visible { outline: none; border-color: var(--accent); }
.field-hint { font-size: var(--text-xs); color: var(--text-3); margin: 0 0 var(--space-4); }
.study-plan {
  font-size: var(--text-xs); color: var(--text-1); line-height: 1.55;
  background: var(--accent-soft); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent); margin: 0 0 var(--space-5);
}
.account-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); color: var(--text-2); font-size: var(--text-xs); }
.account-row img { width: 34px; height: 34px; border-radius: 50%; }
.sheet-panel .btn-secondary { margin-bottom: var(--space-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(116px + var(--safe-bottom)); z-index: 50;
  background: var(--surface-2); color: var(--text-1); border: 1px solid var(--border-2);
  padding: var(--space-3) var(--space-5); border-radius: 999px; box-shadow: var(--shadow);
  font-size: var(--text-xs); font-weight: 600; animation: toast-in var(--dur) var(--ease-out);
}
.toast.good { border-color: var(--sage); color: var(--sage); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Scroll reveal ---------- */
/* Above-the-fold items animate in via the Web Animations API on entrance;
   below-the-fold items get .reveal and rise in as they scroll into view. */
.view > *.reveal { opacity: 0; transform: translateY(34px) scale(0.985); filter: blur(7px); will-change: opacity, transform, filter; }
.view > *.reveal.in {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity 0.72s var(--ease-out), transform 0.72s var(--ease-out), filter 0.72s var(--ease-out);
}
.masthead { will-change: transform, opacity; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
