/* CIRC HQ theme layer. Loads after app.css and reskins it: navy and blue with warm cream surfaces,
   Fredoka for display type, Nunito Sans for body. Built for any CIRC room, not one teacher. */

:root {
  --canvas: #fffaf1;
  --surface: #ffffff;
  --blue: #175fb5;
  --blue-dark: #175fb5;
  --pale-blue: #eaf3ff;
  --ink: #102b50;
  --heading: #102b50;
  --secondary: #52618a;
  --border: rgba(18, 38, 73, 0.12);
  --warning: #fbeae6;
  --warning-border: rgba(206, 68, 51, 0.3);
  --radius-large: 22px;
  --radius: 16px;
  --accent-grad: linear-gradient(180deg, #175fb5, #0b62cc);
  --shadow-card: 0 14px 34px rgba(18, 38, 73, 0.10);
  --shadow-glow: 0 10px 24px rgba(14, 111, 214, 0.35);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

html, body {
  background:
    radial-gradient(circle at 8% 0%, rgba(30, 134, 240, 0.08), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(206, 68, 51, 0.05), transparent 40%),
    radial-gradient(rgba(18, 38, 73, 0.05) 1.4px, transparent 1.4px) 0 0 / 26px 26px,
    var(--canvas);
}

h1, h2, h3, h4,
.brand-lockup strong,
.page-heading h1,
.clock-value,
.runner-timer-value,
.project-title,
.project-library-title,
.entrance-card h2,
.student-waiting-card h2 {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--heading);
}

/* Header and nav */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(18, 38, 73, 0.06);
}
.brand-lockup strong { font-size: 1.35rem; color: var(--blue-dark); }
.brand-lockup strong + span {
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--secondary);
}
.primary-nav button,
.primary-nav .nav-link {
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  border-radius: 999px;
  text-decoration: none;
}
.primary-nav button:hover,
.primary-nav .nav-link:hover { background: var(--pale-blue); }
.primary-nav button[aria-current="page"] {
  background: var(--pale-blue);
  color: var(--blue-dark);
  box-shadow: inset 0 0 0 1.5px rgba(14, 111, 214, 0.25);
}
.primary-nav { grid-template-columns: repeat(6, minmax(64px, 1fr)); gap: 4px; }
.primary-nav button,
.primary-nav .nav-link { border-bottom: 0 !important; border-radius: 12px; }
.primary-nav .nav-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
}
.primary-nav .nav-link svg { width: 22px; height: 22px; }

/* Buttons */
.primary-action,
.entrance-cta.primary-action,
.welcome-primary {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #fff;
  background: var(--accent-grad);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.primary-action:hover { filter: brightness(1.05); }
.secondary-action,
.entrance-cta.secondary-action {
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(18, 38, 73, 0.06);
}
.button-link { color: var(--blue-dark); font-weight: 700; }

/* Splash: CIRC HQ lockup, no personal banner */
.welcome-view.welcome-terrarium {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.welcome-view.welcome-terrarium .welcome-maker,
.welcome-terrarium .welcome-maker,
img.welcome-maker { display: none !important; }
.welcome-copy { display: flex; flex-direction: column; padding: 34px 8px 8px; }
.welcome-copy > * { order: 5; }
.welcome-copy h1 {
  order: 1;
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 5.4rem);
  line-height: 1;
  letter-spacing: 1px;
  color: var(--blue-dark);
  text-shadow: 3px 4px 0 rgba(18, 38, 73, 0.18), 0 18px 38px rgba(14, 111, 214, 0.28);
}
.welcome-copy .eyebrow {
  order: 2;
  margin: 14px 0 0;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ink);
}
.welcome-copy .welcome-description {
  order: 3;
  margin: 6px 0 26px;
  font-weight: 600;
  color: var(--secondary);
}
.welcome-entrances { gap: 18px; }
.entrance-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}
.entrance-card.entrance-student { background: linear-gradient(0deg, var(--pale-blue), #fff); }
.entrance-card h2 { font-size: 1.35rem; }
.entrance-card p { color: var(--secondary); font-weight: 600; }
.student-waiting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

/* FID: demoted to one quiet line. It only matters on a snow day. */
.fid-home-entry {
  margin: 26px 0 0;
  padding: 10px 16px;
  background: transparent;
  border: 1.5px dashed rgba(18, 38, 73, 0.22);
  border-left: 1.5px dashed rgba(18, 38, 73, 0.22);
  border-radius: 999px;
  font-family: "Nunito Sans", system-ui, sans-serif;
}
.fid-home-entry p { display: none; }
.fid-home-entry h2 {
  margin: 0;
  font-family: "Nunito Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary);
}
.fid-home-entry h2::before { content: "Snow day? "; color: var(--ink); font-weight: 800; }
.fid-home-entry .fid-open-link {
  min-height: 34px;
  padding: 4px 14px;
  font-size: 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--blue-dark);
}

/* Today: the experience card reads like a published unit */
.project-hero-copy .eyebrow,
.eyebrow {
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-dark);
}
.project-title { letter-spacing: 0; color: var(--heading); }

/* Activity screen: navy gradient command bar, Fredoka timers, step cards */
.runner-command-bar {
  background: linear-gradient(120deg, #0f2350 0%, #134a9e 58%, #175fb5 125%);
  box-shadow: 0 12px 30px rgba(15, 35, 80, 0.30);
}
.runner-command-bar .runner-timer-value { color: #fff; }
.runner-command-step { font-family: "Fredoka", system-ui, sans-serif; }
.runner-step-card,
.runner-student-directions {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}
.runner-student-directions li { font-weight: 700; font-size: 1.15em; }

/* Higher-specificity fixes after the first visual check */
.experience-runner .runner-command-bar,
.runner-command-bar {
  background: linear-gradient(120deg, #0f2350 0%, #134a9e 58%, #175fb5 125%) !important;
  border: 0 !important;
  border-radius: 0 0 22px 22px;
}
.runner-preview-label,
.runner-heading .runner-preview-label {
  background: var(--pale-blue) !important;
  border-color: rgba(14, 111, 214, 0.35) !important;
  color: var(--blue-dark) !important;
}
.runner-now-grid { grid-template-columns: minmax(0, 1fr) !important; }
.runner-teacher-help { max-width: none; }
.runner-student-directions li::marker { color: var(--blue-dark); font-weight: 800; }

/* Teacher home: quiet cream surfaces, navy hierarchy and teal actions. */
.th-home { --th-teal: #176a62; --th-navy: #163246; --th-cream: #f7f5ed; gap: 24px; }
.th-welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 12px 0 4px; }
.th-welcome h2 { margin: 5px 0 8px; color: var(--th-navy); font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.04em; }
.th-welcome p { margin: 0; max-width: 65ch; }
.th-home .eyebrow { color: var(--th-teal); letter-spacing: .12em; font-size: .72rem; }
.th-day-badge { flex-shrink: 0; padding: 12px 18px; border-radius: 12px; background: #e5efe9; color: #164f45; font-weight: 800; }
.th-home .th-card { border: 1px solid #d7ddd8; border-radius: 18px; background: #fffef9; box-shadow: 0 5px 20px rgba(22,50,70,.04); padding: clamp(18px, 2.5vw, 30px); gap: 14px; }
.th-home .th-class { border-top: 5px solid var(--th-teal); }
.th-home .th-class > h2 { font-size: 1.15rem; color: #526765; font-weight: 700; }
.th-class-handoff { padding: 16px; border-left: 4px solid #176a62; background: #edf3e7; border-radius: 0 10px 10px 0; display: grid; gap: 9px; }
.th-home .th-lesson > h3 { font-size: clamp(1.6rem, 2.7vw, 2.35rem); line-height: 1.16; letter-spacing: -.035em; color: var(--th-navy); }
.th-home .th-lesson > p { font-size: 1.08rem; max-width: 75ch; }
.th-lesson-columns { display: grid; gap: 24px; margin: 16px 0; }
.th-lesson-columns > div { min-width: 0; }
.th-home .th-card h4 { color: var(--th-teal); margin-bottom: 10px; }
.th-home .plain-list { line-height: 1.55; }
.th-lesson-steps { list-style: decimal-leading-zero; padding-left: 28px; margin: 0; }
.th-lesson-steps li { padding: 7px 0 7px 4px; border-bottom: 1px solid #e0e5df; }
.th-lesson-steps li::marker { color: var(--th-teal); font-weight: 800; }
.th-lesson-steps span { float: right; font-variant-numeric: tabular-nums; color: #546966; padding-left: 12px; }
.th-finish-check { padding: 14px; margin-top: 14px !important; background: #eef3e7; border-radius: 10px; color: #224d3f; font-weight: 700; line-height: 1.5; }
.th-home .primary-action { background: var(--th-teal); border-color: var(--th-teal); color: white; box-shadow: none; border-radius: 10px; }
.th-home .primary-action:hover { background: #11534d; }
.th-home .secondary-action { background: #fffef9; color: var(--th-navy); border: 1px solid #aebfba; border-radius: 10px; box-shadow: none; }
.th-home button:focus-visible, .th-home a:focus-visible, .th-home summary:focus-visible, .th-home input:focus-visible, .th-home select:focus-visible, .th-home textarea:focus-visible { outline: 3px solid #176a62; outline-offset: 3px; }
.th-home button:disabled { opacity: .55; cursor: not-allowed; }
.th-following-lesson { background: var(--th-cream); border: 1px solid #dae2d9; padding: 16px; border-radius: 12px; }
.th-home summary { cursor: pointer; font-weight: 750; color: var(--th-navy); line-height: 1.5; }
.th-home details[open] > summary { margin-bottom: 12px; }
.th-home .th-next, .th-home .th-timer, .th-home .th-later { border-top: 1px solid #d7ddd8; }
.th-section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.th-journal-layout { display: grid; gap: 28px; }
.th-journal-form { display: grid; gap: 9px; align-content: start; }
.th-journal-form label { font-size: .88rem; font-weight: 750; color: var(--th-navy); margin-top: 5px; }
.th-journal-form input, .th-journal-form select, .th-journal-form textarea { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 11px 12px; border: 1px solid #aebfba; border-radius: 9px; font: inherit; color: var(--th-navy); background: white; }
.th-journal-form textarea { resize: vertical; }
.th-journal-form .primary-action { justify-self: start; margin-top: 8px; }
.th-visit-list { padding: 0; list-style: none; display: grid; gap: 14px; }
.th-visit-list > li { border: 1px solid #d7e2dc; border-left: 4px solid var(--th-teal); background: #f5f7f0; border-radius: 10px; padding: 16px; display: grid; gap: 10px; }
.th-home .th-visit-meta { font-size: .8rem; font-weight: 750; color: #49615c; }
.th-home .th-visit-list h4 { font-size: 1rem; text-transform: none; letter-spacing: 0; margin: 0; color: var(--th-navy); }
.th-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.th-next-note { font-weight: 700; color: #24584d; }
.th-import-record { margin-top: 20px; }
.th-import-record input { display: block; max-width: 100%; margin-top: 10px; }
@media (min-width: 900px) {
  .th-home .th-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th-home .th-class { grid-column: 1 / -1; }
  .th-lesson-columns, .th-journal-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .th-welcome { align-items: flex-start; flex-direction: column; gap: 12px; }
  .th-home .th-actions { align-items: stretch; }
  .th-home .th-actions > * { flex: 1 1 100%; text-align: center; }
  .th-lesson-steps { font-size: .93rem; }
}
