/* student.css — PRECISION surface sheet: auth gate, intro handoff, setup view,
   student dashboard, PS home (docs/PRECISION.md §10, agent C). Absorbs
   auth.css and the dashboard/home parts of new-screens.css; loads last, so
   equal-specificity rules here win over the legacy sheets during the
   transition. Kit vocabulary only (tokens/base/shell/components.css). */

/* ---- Auth gate ------------------------------------------------------------
   Full-viewport --bg ground (no floating-in-space feel), one centered
   hairline card. auth.js toggles only ids + .hidden; classes are free. */

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.auth-card {
  width: min(360px, 100%);
  text-align: center;
  padding: 30px 28px 24px;
}

/* The original brand row: mark | divider | shimmer "Goldmine" (treatment in
   base.css .goldmine-word, preserved verbatim). */
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 6px;
}
.auth-logo {
  display: block;
  height: 40px;
  width: auto;
}
.auth-divider {
  width: 2px;
  height: 32px;
  background: var(--line);
  flex-shrink: 0;
}
.auth-word { font-size: 2.1rem; }
.auth-sub {
  font-size: 12.5px;
  color: var(--sub);
  margin: 4px 0 20px;
}

/* Full-width CTAs inside the card (variant styling comes from .btn-*) */
.auth-wide {
  width: 100%;
  padding-top: 7px;
  padding-bottom: 7px;
}

.auth-or {
  display: flex;
  align-items: center;
  color: var(--faint);
  font-size: 11px;
  margin: 14px 0;
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-or span { padding: 0 10px; }

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-form input { width: 100%; }

.auth-toggle {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--sub);
}

/* Quiet text buttons: toggle + resend */
.auth-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.auth-link:hover { color: var(--ink); }
.auth-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

/* One style for errors and notices (auth.js writes both into #authNote) */
.auth-note {
  margin: 14px 0 0;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: left;
  color: var(--ink);
  background: var(--soft);
  border-radius: var(--r);
}
#authResendBtn { display: inline-block; margin-top: 8px; }

/* ---- Setup view -----------------------------------------------------------
   First-run screen: whead + one primary card (+ the demo card at /demo).
   Overrides the legacy .setup/.setup-grid rules until brainstorm.css drops
   them; the .demo-only reveal mechanic lives here now. */

.setup {
  max-width: none;
  margin: 0;
  padding: 0;
}
.setup-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  max-width: none;
  margin: 0;
}
.setup-card {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
}
.setup-card .card-desc { max-width: 60ch; }
.setup-card .persona-dropdown { margin-top: 12px; }
.setup-cta-row {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  gap: 8px;
}
.setup-quiet-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 10px;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.setup-quiet-link:hover { color: var(--ink); }

/* Demo chrome reveal (body.demo-mode set by main.js at /demo) */
.demo-only { display: none; }
body.demo-mode .demo-only { display: flex; }
body.demo-mode .setup-wrap { max-width: 940px; }
body.demo-mode .setup-grid { grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) {
  body.demo-mode .setup-grid { grid-template-columns: 1fr; }
}

/* ---- Student dashboard ----------------------------------------------------
   Signed-in landing: whead ("Home"), a quiet lead line, one grid of work
   cards (personal statement / supplements / activities). */

.dashboard {
  max-width: none;
  margin: 0;
  padding: 0;
}
.dash-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dash-lead {
  font-size: 12.5px;
  color: var(--sub);
  margin: 0;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dash-card-head .card-eyebrow { margin-bottom: 0; }
.dash-card-line {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.5;
  margin: 0;
}
.dash-card-hint {
  font-size: 12px;
  color: var(--faint);
  margin: 0;
}
.dash-card-cta { margin-top: auto; padding-top: 6px; }

/* Coming-soon degradation: quiet, clearly not yet live */
.dash-card-soon { background: var(--soft); }
.dash-card-soon .card-title { color: var(--sub); }

/* Your name (§3): one quiet row, inline edit in place */
.dash-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-name-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sub);
}
form.dash-name { align-items: flex-start; flex-direction: column; gap: 6px; }
.dash-name-fields {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.dash-name-fields input { max-width: 180px; }

/* Test account strip (SHIP_SPEC §5.4): a caution, so --warn, never gold */
.dash-test-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--warn-soft);
}
.dash-test-note {
  font-size: 12px;
  color: var(--warn);
}

/* ---- PS home --------------------------------------------------------------
   The personal-statement hub: status hero, coach note, coach comments,
   essay-plan unit cards, and the quiet how-this-works steps. */

.home {
  max-width: none;
  margin: 0;
  padding: 0;
}
.home-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Status hero: hairline card, .badge for state */
.home-hero { padding: 18px 20px 16px; }
.home-hero-top { margin-bottom: 10px; }
.home-title {
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 6px;
}
.home-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--sub);
  max-width: 62ch;
  margin: 0;
}
.home-cta-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

/* Coach note: SHARED shape — also emitted by editing.js, supplement/index.js,
   and activities/index.js (as a div there). Do not scope it to .home. */
.home-note {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--soft);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
}
.home-note-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: 4px;
}
.home-note p {
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}

/* Coach comments pointer */
.home-comments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}
.home-comments h2 {
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}
.home-comments p {
  font-size: 12.5px;
  color: var(--sub);
  margin: 0;
}

/* Essay plan */
.home-plan-head { margin-bottom: 2px; }
.home-plan-head h2 {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 3px;
}
.home-plan-head .hint {
  font-size: 12px;
  color: var(--sub);
  margin: 0;
}
.home-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.home-unit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: none;
}
.home-unit:hover { border-color: var(--line); box-shadow: none; }
.home-unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-unit-num {
  display: inline-block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
}
.home-unit-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.home-unit-title {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.home-unit-angle {
  font-family: var(--ui);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--sub);
  margin: 0;
}
.home-unit-cta { margin-top: auto; padding-top: 6px; }
.home-plan-add { margin: 4px 0 0; }

/* How this works: quiet steps with mono numbers */
.home-steps { margin-top: 8px; }
.home-steps-title {
  font-family: var(--ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sub);
  margin: 0 0 12px;
}
.home-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.home-steps-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.home-step-num {
  flex: 0 0 auto;
  display: inline-block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--faint);
  margin-top: 2px;
}
.home-steps-list li.current .home-step-num {
  background: none;
  border-color: transparent;
  color: var(--gold);
}
.home-steps-list li.done .home-step-num {
  background: none;
  border-color: transparent;
  color: var(--ok);
}
.home-steps-list strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1px;
}
.home-steps-list li p {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.45;
  margin: 0;
}
