/* The palette, type, radii and motion curves live in tokens.css, which
   parent.html loads first. This file used to carry its own copy of the old
   pre-Celestial-Compass values, which is why the dashboard and the student
   app had drifted into looking like two different products. */
:root {
  /* The stack itself lives in tokens.css so both frontends share one. */
  font-family: var(--sans);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.hidden { display: none !important; }

.lock-screen {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}
.lock-card {
  /* Centres, but starts at the top edge instead of overflowing off it once
     the card is taller than the screen -- the forgot-password and reset
     states are taller than the plain login one. */
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 280px;
  text-align: center;
}
.lock-title { font-family: var(--serif); font-weight: 400; font-size: 18px; margin-bottom: 4px; }
.lock-sub { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.lock-card input,
.lock-card select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}
.lock-card button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.lock-error { color: var(--struggling-text); font-size: 12.5px; margin-top: 10px; }
.lock-hint { color: var(--ink-soft); font-size: 12.5px; margin-top: 10px; }
.lock-card button.lock-link-btn {
  width: auto;
  background: none;
  /* .lock-card button is a filled gold control and carries --accent-border;
     this one is a plain text link, so it has to give that edge back. */
  border: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 12.5px;
  padding: 0;
  margin-top: 14px;
  text-decoration: underline;
}
.lock-card button.lock-link-btn:hover { color: var(--accent-text); }

/* First-run parent onboarding wizard (Northstar sections 60-66), shown once
   after the first successful unlock, before the dashboard itself. Same card
   language as the lock screen, sized for actual form content plus a step
   progress indicator. */
.onboarding-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.onboarding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 28px rgba(36, 31, 26, 0.08);
}

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 22px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s ease, transform 0.2s ease;
}
.onboarding-dot.active { background: var(--accent-text); transform: scale(1.2); }
.onboarding-dot.done { background: var(--accent-soft); }

.onboarding-step {
  display: flex;
  flex-direction: column;
  text-align: center;
  /* nova-enter from the canonical library in tokens.css (section 123). */
  animation: nova-enter var(--dur-fast) var(--ease-out);
}
.onboarding-icon { font-size: 30px; margin-bottom: 10px; }
.onboarding-eyebrow {
  /* JetBrains Mono is loaded at 400 and 500 only -- 600+ would be faked. */
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 6px;
}
.onboarding-title { font-family: var(--serif); font-weight: 400; font-size: 18px; margin-bottom: 12px; line-height: 1.3; }
.onboarding-body {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 20px;
  text-align: left;
}

/* Onboarding steps reuse the dashboard's .field / .field-label styling
   (see Coaching Settings below) so first-run inputs look identical to the
   ones she'll edit later -- just left-aligned inside a centered card. */
.onboarding-step .field { text-align: left; margin-bottom: 14px; }

.onboarding-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 6px;
  cursor: pointer;
}
.onboarding-toggle-row input { width: 17px; height: 17px; accent-color: var(--accent-text); cursor: pointer; }

.onboarding-review {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.7;
}
.onboarding-review-row { display: flex; justify-content: space-between; gap: 12px; }
.onboarding-review-row + .onboarding-review-row { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
.onboarding-review-label { color: var(--ink-soft); flex-shrink: 0; }
.onboarding-review-value { font-weight: 600; text-align: right; }

.onboarding-actions { display: flex; gap: 10px; margin-top: 4px; }
.onboarding-next-btn,
.onboarding-back-btn {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.onboarding-next-btn { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent-border); }
.onboarding-next-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.onboarding-back-btn { background: var(--bg); color: var(--ink-soft); border: 1px solid var(--border); }
.onboarding-back-btn:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* Step 1 has no Back button -- its lone Next button gets the same
   full-width treatment directly rather than via .onboarding-actions. */
.onboarding-step[data-step="1"] > .onboarding-next-btn {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
}

.dashboard { max-width: 780px; margin: 0 auto; padding: 24px 20px 60px; }
.dash-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  margin-bottom: 24px;
}
.dash-title { font-family: var(--serif); font-size: 22px; font-weight: 400; }
.dash-sub { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
/* Each link on one line; the row wraps as a whole when they don't fit. */
.dash-header-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dash-header-links > * { white-space: nowrap; }
.back-link { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.back-link:hover { color: var(--accent-text); }
.back-link-btn { font: inherit; font-size: 13px; color: var(--ink-soft); background: none; border: none; padding: 0; cursor: pointer; }
.back-link-btn:hover { color: var(--accent-text); }

.empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 30px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.session-list { display: flex; flex-direction: column; gap: 16px; }

.session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}

.session-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.session-date { font-weight: 600; font-size: 14.5px; }
.session-meta { font-size: 12px; color: var(--ink-soft); }

.pending-note { font-size: 13px; color: var(--ink-soft); font-style: italic; }

.subjects { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.subject-chip {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.section-label {
  /* JetBrains Mono is loaded at 400 and 500 only -- 600+ would be faked. */
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 12px 0 6px;
}

ul.plain { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.6; }

.flag-box {
  background: var(--struggling-soft);
  border: 1px solid var(--status-error-border);
  color: var(--struggling-text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 10px;
}

/* ---------- Panels (Weekly Brief / Mastery Overview / Session Log) ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 16px;
  margin-bottom: 14px;
}
/* A long note beside the title wraps under it on a phone rather than
   squeezing the title into a column (2026-10-19). */
.panel-head > .panel-title { flex: 0 0 auto; }

.panel-title { font-family: var(--serif); font-weight: 400; font-size: 15px; }

.ghost-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent-text);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.ghost-btn:hover { border-color: var(--accent-text); background: var(--accent-soft); }
.ghost-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.muted-note { font-size: 13.5px; color: var(--ink-soft); font-style: italic; }

/* Weekly brief card */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill.green { background: var(--status-strong-soft); color: var(--strong-text); }
.status-pill.yellow { background: var(--status-developing-soft); color: var(--developing-text); }
.status-pill.red { background: var(--struggling-soft); color: var(--struggling-text); }

.brief-meta { font-size: 12px; color: var(--ink-soft); margin: 6px 0 16px; }

.brief-block { margin-bottom: 14px; }
.brief-block:last-child { margin-bottom: 0; }
.brief-block-label {
  /* JetBrains Mono is loaded at 400 and 500 only -- 600+ would be faked. */
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.brief-block-body { font-size: 13.5px; line-height: 1.55; }

.recommend-box {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px 14px;
}
.recommend-box ul.plain { margin: 0; }

/* Mastery overview */

.mastery-list { display: flex; flex-direction: column; gap: 2px; }

.mastery-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.mastery-row:last-child { border-bottom: none; }

/* A NOVA Signal (Northstar section 117), not an emoji: it takes the state's
   own text colour from tokens.css and is aria-hidden, because the visible
   .mastery-state-label beside it already says the same thing in words. The
   glyph is redundant reinforcement, never the carrier. */
.mastery-signal {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: var(--ink-soft);
}
.mastery-signal[data-state="DEVELOPING"] { color: var(--developing-text); }
.mastery-signal[data-state="PROFICIENT"],
.mastery-signal[data-state="MASTERED"]   { color: var(--strong-text); }
.mastery-topic { flex: 1; min-width: 0; }
.mastery-topic-name { font-weight: 600; }
.mastery-topic-subject { color: var(--ink-soft); font-size: 12px; }
.mastery-state-label { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.mastery-error-chip {
  background: var(--struggling-soft);
  color: var(--struggling-text);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Visual Mastery (Northstar section 53) -- a distinct, parallel signal from
   the main mastery state, shown only once she's independently produced a
   visual representation at least once. */
/* Canonical NOVA Moments (section 110). Same chip shape as the visual and
   error chips beside them, coloured by what the moment means: self-correction
   and growth are good news, "worth another look" is neutral rather than a
   warning -- it is a suggestion, not a problem. */
.moment-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--status-strong-soft);
  color: var(--strong-text);
}
.moment-chip[data-moment="RETURN"] {
  background: var(--surface-raised, var(--surface));
  color: var(--ink-soft);
}

.mastery-visual-chip {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Session log topic rows (updated schema) */

.topic-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.topic-block:last-child { margin-bottom: 0; }
.topic-block-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.topic-name { font-weight: 600; font-size: 13.5px; }
.topic-subject-tag { font-size: 11px; color: var(--ink-soft); }
.topic-signals { display: flex; gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.signal-chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-soft);
}
.signal-chip.on { background: var(--status-strong-soft); color: var(--strong-text); border-color: transparent; }
.topic-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Coaching Settings ---------- */

.settings-grid { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink); }
.field-hint { font-size: 11.5px; color: var(--ink-soft); }
/* A status line that is usually blank (a paused capability, section 243)
   must not leave a gap in the column when there is nothing to say. */
.field-hint:empty { display: none; }

.field textarea,
.field input[type="text"],
.field input[type="number"],
.field select {
  font-family: inherit;
  font-size: 13.5px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.field textarea:focus,
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent-text);
}

.save-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--strong-text);
}

/* iPhone and iPad Safari zoom the whole page in when a text box with text
   smaller than 16px is tapped, and stay zoomed -- she then had to pinch the
   app back to fit (reported 2026-09-27, iPhone 17). On touch screens every
   text box is at least 16px, which is the threshold Safari checks. Desktop
   sizes are unchanged. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select { font-size: 16px !important; }
}

/* Timed tests table: scrolls sideways inside its panel on a phone. */
#mockTestsArea { overflow-x: auto; }
.mock-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.mock-table th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.mock-table td:nth-child(3), .mock-table td:nth-child(5) { white-space: nowrap; }

.test-pill { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--status-developing-soft, #FBF1DC); color: var(--status-developing-text, #8A6407); }

/* Pilot invites (operator only). */
.invite-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.invite-list:empty { display: none; }
#inviteLinkOutput { width: 100%; font: inherit; font-size: 13px; }

/* Delete all our data. */
.danger-btn { color: var(--status-error); border-color: var(--status-error); }
.danger-text { color: var(--status-error); }

/* Devices and sign-ins (Security Round 1): one row per trusted device or
   live session, same rhythm as .mastery-row. */
.device-list:empty { display: none; }
.device-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.device-row:last-child { border-bottom: none; }
.device-row-here { border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.device-row-main { flex: 1 1 auto; min-width: 0; }
.device-row-title { font-weight: 500; }
.device-row .field-hint { margin-top: 2px; }
.device-row .ghost-btn { flex: 0 0 auto; padding: 6px 10px; font-size: 12.5px; }
.device-pill {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Parental consent (dashboard and invite form). */
.consent-check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px; line-height: 1.5; margin: 4px 0 14px; }
.consent-check input { width: auto !important; margin: 3px 0 0 !important; flex-shrink: 0; }
.consent-under13 { text-align: left; font-size: 13px; line-height: 1.5; color: var(--ink); background: var(--accent-soft); padding: 10px 12px; border-radius: 10px; margin: 0 0 12px; }
.consent-under13.hidden { display: none; }
label.join-label { display: block; text-align: left; font-size: 13px; font-weight: 600; margin: 6px 0 4px; }

.support-line { margin-top: 2px; }

/* Weekly pilot feedback. */
.feedback-panel { border-color: var(--accent); }
.feedback-q { border: 0; margin: 0 0 14px; padding: 0; }
.feedback-q legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.feedback-scale { display: flex; gap: 8px; }
.feedback-scale label { flex: 1; max-width: 64px; }
.feedback-scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.feedback-scale span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; cursor: pointer; }
.feedback-scale input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.feedback-scale input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.feedback-ends { display: flex; justify-content: space-between; max-width: 352px; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.feedback-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.feedback-choices label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; }
.feedback-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 12px; }
.feedback-thanks { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
#feedbackComment { width: 100%; font: inherit; }

/* Families today (operator). */
.table-scroll { overflow-x: auto; }
.family-table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
.family-table th, .family-table td { text-align: left; padding: 6px 10px 6px 0; border-top: 1px solid var(--border); white-space: nowrap; }
.family-table th { font-weight: 600; color: var(--ink-soft); border-top: 0; }

/* The dashboard's log ends with a link to the full history (history.html). */
.session-more { display: inline-block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.session-more:hover { text-decoration: underline; }
.history-month { font-family: var(--serif); font-size: 15px; color: var(--ink-soft); margin: 22px 0 10px; }
.history-month:first-child { margin-top: 0; }
