@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,800;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html  { scroll-behavior: smooth; }
ul    { list-style: none; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --navy:       #1B2D6B;
  --navy-dark:  #101d4a;
  --navy-mid:   #243888;
  --gold:       #C9A84C;
  --gold-light: #e8d5a0;
  --gold-dark:  #9e7e2d;
  --fr-blue:    #002395;
  --fr-red:     #ED2939;
  --cream:      #FAF8F3;
  --off-white:  #F2F0EB;
  --white:      #FFFFFF;
  --text:       #1a1e3a;
  --text-muted: #64748b;
  --border:     #E2E4ED;
  --shadow:     rgba(27, 45, 107, 0.13);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.15;
}

/* ── Tricolore bar ────────────────────────────────────────── */
.tricolore {
  display: flex;
  height: 4px;
  width: 72px;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0 1.75rem;
}
.tricolore.centered { margin-left: auto; margin-right: auto; }
.tricolore span     { flex: 1; }
.t-b { background: var(--fr-blue); }
.t-w { background: rgba(255,255,255,0.80); }
.t-r { background: var(--fr-red); }

/* ── Countdown timer bar ──────────────────────────────────── */
.timer-bar {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 190;
  background: var(--navy-dark, #111d47);
  border-bottom: 2px solid var(--gold);
  padding: 0.35rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.timer-bar[hidden] { display: none; }
.timer-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 1100px;
  width: 100%;
}
.timer-bar-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.timer-bar-clock {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  min-width: 3.2rem;
  text-align: left;
  transition: color 0.3s;
}
.timer-bar-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.timer-bar--urgent .timer-bar-clock { color: #f87171; }
.timer-bar--urgent .timer-bar-label { color: #f87171; }
.timer-bar--urgent { border-bottom-color: #f87171; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand img {
  height: 50px;
  width: auto;
  border-radius: 7px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-menu a {
  color: rgba(255,255,255,0.80);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--white);
  background: rgba(255,255,255,0.10);
}

.nav-menu a.nav-cta {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 0.5rem 1.1rem;
}
.nav-menu a.nav-cta:hover {
  background: var(--gold-light);
  color: var(--navy-dark);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.24s, opacity 0.24s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(201,168,76,0.38);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.10);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--shadow);
}

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-row.centered { justify-content: center; }

/* ── Home Hero ────────────────────────────────────────────── */
.home-hero {
  background: var(--navy);
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(201,168,76,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--fr-blue) 33.3%, rgba(255,255,255,0.5) 33.3% 66.6%, var(--fr-red) 66.6%);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 660px;
}

.home-hero-logo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 auto 2rem;
  box-shadow: 0 28px 70px rgba(0,0,0,0.45);
  border: 2px solid rgba(201,168,76,0.35);
}

.home-hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}

.home-hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.home-hero h1 em {
  color: var(--gold);
  font-style: italic;
}

.home-hero-sub {
  color: rgba(255,255,255,0.70);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 4rem 1.5rem 3.5rem;
  text-align: center;
  position: relative;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--fr-blue) 33.3%, rgba(255,255,255,0.5) 33.3% 66.6%, var(--fr-red) 66.6%);
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.page-hero p {
  color: rgba(255,255,255,0.68);
  font-size: 1.025rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 5rem 1.5rem; }
.section.bg-cream     { background: var(--cream); }
.section.bg-off-white { background: var(--off-white); }
.section.bg-navy      { background: var(--navy); }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header { margin-bottom: 3rem; }
.section-header.centered { text-align: center; }

.section-eyebrow {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.55rem;
}
.section.bg-navy .section-eyebrow { color: var(--gold); }

.section-header h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  color: var(--navy);
  font-weight: 700;
}
.section.bg-navy .section-header h2 { color: var(--white); }

.section-header p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.975rem;
  max-width: 560px;
}
.section-header.centered p { margin-left: auto; margin-right: auto; }
.section.bg-navy .section-header p { color: rgba(255,255,255,0.68); }

/* ── Feature cards ────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.9rem 1.7rem;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
}
.feature-card:hover {
  box-shadow: 0 10px 34px var(--shadow);
  transform: translateY(-4px);
  border-color: var(--gold);
}
.feature-icon  { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.45rem;
}
.feature-card p { font-size: 0.875rem; color: var(--text-muted); }

.bg-cream .feature-card  { background: var(--white); }

/* ── Course cards ─────────────────────────────────────────── */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s, transform 0.22s;
}
.course-card:hover {
  box-shadow: 0 14px 44px var(--shadow);
  transform: translateY(-4px);
}

.course-card-header {
  background: var(--navy);
  padding: 1.7rem 1.75rem 1.4rem;
  position: relative;
}
.course-card-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fr-blue) 33.3%, rgba(255,255,255,0.6) 33.3% 66.6%, var(--fr-red) 66.6%);
}
.course-icon      { font-size: 1.9rem; margin-bottom: 0.7rem; }
.course-card-header h3 {
  color: var(--white);
  font-size: 1.2rem;
}
.course-level {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201,168,76,0.18);
  color: var(--gold-light);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}

.course-card-body {
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.course-card-body > p { font-size: 0.875rem; color: var(--text-muted); flex: 1; }

.course-features { display: flex; flex-direction: column; gap: 0.45rem; }
.course-features li {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.course-features li::before {
  content: '✓';
  color: var(--gold-dark);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background: var(--navy);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,168,76,0.10) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner-inner {
  position: relative;
  max-width: 580px;
  margin: 0 auto;
}
.cta-banner h2 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.7rem;
}
.cta-banner p {
  color: rgba(255,255,255,0.70);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ── About page ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

.about-photo-wrap {
  margin-bottom: 2.25rem;
}
.about-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(27, 45, 107, 0.14);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 0.975rem;
}
.about-text p:last-child { margin-bottom: 0; }

.info-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
}
.info-card:last-of-type { margin-bottom: 0; }
.info-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  margin-bottom: 0.85rem;
}

.info-list { display: flex; flex-direction: column; gap: 0.55rem; }
.info-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.info-list li strong { color: var(--text); }

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
}
.philosophy-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 10px 10px;
  padding: 1.2rem 1.4rem;
  transition: box-shadow 0.2s;
}
.philosophy-card:hover { box-shadow: 0 6px 20px var(--shadow); }
.philosophy-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 0.4rem; }
.philosophy-card p  { font-size: 0.845rem; color: var(--text-muted); }

/* ── Student Portal ───────────────────────────────────────── */
.portal-wrap {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  background: var(--cream);
}
.portal-inner {
  max-width: 480px;
  text-align: center;
}
.portal-icon  { font-size: 3.5rem; margin-bottom: 1.5rem; }
.portal-inner h2 { font-size: 2rem; color: var(--navy); margin-bottom: 0.7rem; }
.portal-inner > p { color: var(--text-muted); margin-bottom: 2.5rem; font-size: 0.975rem; }

.portal-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 340px;
  margin: 0 auto 2rem;
}

.portal-btn {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.5rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  text-decoration: none;
  text-align: left;
}
.portal-btn-icon { font-size: 1.6rem; flex-shrink: 0; }
.portal-btn-meta { font-size: 0.72rem; font-weight: 500; opacity: 0.65; }

.portal-btn.login {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.portal-btn.login:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--shadow);
}

.portal-btn.homework {
  background: var(--white);
  color: var(--navy);
  border-color: var(--gold);
}
.portal-btn.homework:hover {
  background: var(--gold);
  color: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(201,168,76,0.30);
}

.portal-note {
  display: inline-block;
  font-size: 0.80rem;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1rem;
}

/* ── Contact page ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

.accepting-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(27,45,107,0.07);
  border: 1px solid rgba(27,45,107,0.18);
  color: var(--navy);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.accepting-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--navy);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.28; }
}

.form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.74rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.18s, background 0.18s;
  outline: none;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--navy);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 140px; }

.contact-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  margin-bottom: 0.75rem;
}
.contact-link-card:hover {
  border-color: var(--navy);
  transform: translateX(4px);
  box-shadow: 0 4px 14px var(--shadow);
}
.contact-link-card:last-child { margin-bottom: 0; }
.clc-icon  { font-size: 1.3rem; flex-shrink: 0; }
.clc-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
}
.clc-value { font-size: 0.875rem; color: var(--text); }

.contact-sidebar-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  margin-top: 1rem;
}
.contact-sidebar-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
  margin-bottom: 0.8rem;
}

.form-success {
  display: none;
  margin-top: 1.2rem;
  padding: 1rem 1.25rem;
  background: rgba(27,45,107,0.07);
  border: 1px solid rgba(27,45,107,0.2);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.9rem;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.62);
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 3rem;
  align-items: start;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0;
}

.footer-logo img {
  height: 64px;
  width: auto;
  border-radius: 8px;
  opacity: 0.88;
}
.footer-tagline {
  font-size: 0.78rem;
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nav h4,
.footer-contact h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav a,
.footer-contact a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.58);
  transition: color 0.18s;
}
.footer-nav a:hover,
.footer-contact a:hover { color: var(--white); }
.footer-contact p { font-size: 0.875rem; margin-bottom: 0.35rem; }

.footer-tricolore {
  display: flex;
  height: 3px;
  width: 40px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 1.1rem;
}
.footer-tricolore span { flex: 1; }
.ft-b { background: var(--fr-blue); }
.ft-w { background: rgba(255,255,255,0.45); }
.ft-r { background: var(--fr-red); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  font-size: 0.775rem;
  color: rgba(255,255,255,0.32);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── Auth pages ───────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--cream);
}

.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem 2.25rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px var(--shadow);
}

.auth-logo {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border);
}

.auth-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.35rem;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card .form { gap: 1rem; }

.auth-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.auth-alert {
  display: none;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.auth-alert.error {
  background: rgba(237, 41, 57, 0.08);
  border: 1px solid rgba(237, 41, 57, 0.25);
  color: #c0392b;
}
.auth-alert.success {
  background: rgba(27, 45, 107, 0.07);
  border: 1px solid rgba(27, 45, 107, 0.2);
  color: var(--navy);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-footer a:hover { color: var(--gold-dark); }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-wrap {
  min-height: calc(100vh - 70px);
  padding: 3.5rem 1.5rem;
  background: var(--cream);
}

.dashboard-inner {
  max-width: 680px;
  margin: 0 auto;
}

.dashboard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.5rem 2.25rem;
  box-shadow: 0 8px 40px var(--shadow);
  text-align: center;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(27, 45, 107, 0.07);
  border: 1px solid rgba(27, 45, 107, 0.16);
  color: var(--navy);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.25rem;
}

.dashboard-icon { font-size: 3rem; margin-bottom: 0.75rem; }

.dashboard-card h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.dashboard-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.dashboard-coming-soon {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  text-align: left;
}

.dcs-item {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  opacity: 0.65;
}
.dcs-icon { font-size: 1.3rem; margin-bottom: 0.4rem; }
.dcs-item h4 { font-size: 0.875rem; color: var(--navy); margin-bottom: 0.2rem; }
.dcs-item p  { font-size: 0.78rem; color: var(--text-muted); }

.dashboard-logout {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

/* ── Dashboard (extended) ─────────────────────────────────── */
.dashboard-inner--wide { max-width: 780px; }

.dashboard-card--slim {
  text-align: center;
  padding: 1.75rem 2.25rem;
}
.dashboard-card--slim h1 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.dashboard-card--slim > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ── Homework section ─────────────────────────────────────── */
.hw-section,
.submissions-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem 2.25rem 2.25rem;
  box-shadow: 0 4px 20px var(--shadow);
  margin-top: 1.5rem;
}

.hw-section-header        { margin-bottom: 1.5rem; }
.hw-section-header h2,
.submissions-section > h2 {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.hw-section-header p { font-size: 0.875rem; color: var(--text-muted); }

/* ── Tabs ─────────────────────────────────────────────────── */
.hw-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
}

.hw-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.55rem 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, border-color 0.15s;
}
.hw-tab-btn:hover    { color: var(--navy); }
.hw-tab-btn.active   { color: var(--navy); border-bottom-color: var(--navy); }

/* ── Main dashboard tabs (Today's Tasks / My Progress) ─────── */
.dash-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.75rem;
}

.dash-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: color 0.15s, border-color 0.15s;
}
.dash-tab-btn:hover  { color: var(--navy); }
.dash-tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }

/* ── Progress: grouped submissions ───────────────────────── */
.progress-date-group {
  margin-bottom: 2rem;
}
.progress-date-group:last-child { margin-bottom: 0; }

.progress-date-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  background: #f8f9fb;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* ── Progress accordion ───────────────────────────────────── */
.progress-accordion {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.progress-accordion:last-child { margin-bottom: 0; }

.progress-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #fff;
  transition: background 0.15s;
}
.progress-accordion-summary::-webkit-details-marker { display: none; }
.progress-accordion-summary:hover { background: #f8f9fb; }

.pa-task {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.pa-wc {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.pa-chevron {
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  line-height: 1;
}
details[open] .pa-chevron { transform: rotate(90deg); }

.progress-accordion-body {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  background: #fafbfc;
}

/* ── Panel submit button ──────────────────────────────────── */
.hw-panel .btn { margin-top: 1rem; }

/* ── Speaking recorder ────────────────────────────────────── */
.speaking-recorder {
  margin-top: 1.25rem;
  text-align: center;
}

.btn-record {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 0.9rem 2.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
}
.btn-record:hover  { background: #2a3f6f; transform: scale(1.03); }
.rec-icon          { font-size: 1.2rem; }
.rec-hint          { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.75rem; }

.rec-active-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  animation: rec-pulse 1.2s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.8); }
}
.rec-timer {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}
.rec-label { font-size: 0.875rem; color: var(--text-muted); }

.rec-audio-preview {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}
.rec-playback-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn-rerecord {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-rerecord:hover { border-color: var(--navy); color: var(--navy); }

.speaking-transcription {
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: left;
}
.speaking-transcription-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.speaking-transcription p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

/* ── Speaking: urgent timer (red when ≤60s) ───────────────── */
.rec-timer--urgent { color: #dc2626 !important; }

/* ── Speaking: locked state ───────────────────────────────── */
.speaking-locked-msg {
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  margin-top: 1.25rem;
}
.speaking-locked-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.speaking-locked-text { font-weight: 600; font-size: 1rem; color: var(--navy); margin: 0; }
.speaking-locked-sub  { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Speaking: topic selector ─────────────────────────────── */
.speaking-topic-wrap {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.speaking-topic-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.speaking-topic-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.speaking-select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
  transition: border-color 0.18s;
}
.speaking-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 45, 107, 0.12);
}
.selected-topic-display {
  background: var(--navy);
  color: var(--white);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
}

/* ── Speaking feedback (simplified format) ────────────────── */
.spk-topic-pill {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.spk-topic-icon { flex-shrink: 0; }
.spk-feedback-block {
  margin-bottom: 1rem;
}
.spk-feedback-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.spk-feedback-text {
  font-size: 0.9rem;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}
.spk-vocab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.spk-vocab-chip {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
}

/* ── File drop zone ───────────────────────────────────────── */
.file-drop {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.18s, background 0.18s;
  margin-bottom: 1rem;
  user-select: none;
}
.file-drop:hover,
.file-drop.drag-over {
  border-color: var(--navy);
  background: var(--off-white);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  pointer-events: none; /* clicks routed via JS */
}
.file-drop-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; }
.file-drop-text  { font-size: 0.95rem; font-weight: 500; color: var(--text); margin-bottom: 0.25rem; }
.file-drop-sub   { font-size: 0.85rem; color: var(--text-muted); }
.file-browse-link { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.file-drop-hint  { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ── File preview ─────────────────────────────────────────── */
.file-preview {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.file-preview audio   { width: 100%; }
.file-preview-meta    { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.file-name            { font-size: 0.82rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-clear {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.file-clear:hover { border-color: var(--fr-red); color: var(--fr-red); }

/* ── Submissions list ─────────────────────────────────────── */
.submissions-section > h2 { margin-bottom: 1.5rem; }

.submissions-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0;
}

.submission-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.18s;
}
.submission-item:last-child { margin-bottom: 0; }
.submission-item:hover      { box-shadow: 0 4px 16px var(--shadow); }

.submission-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
}
.sub-badge.writing {
  background: rgba(27, 45, 107, 0.08);
  border: 1px solid rgba(27, 45, 107, 0.18);
  color: var(--navy);
}
.sub-badge.speaking {
  background: rgba(201, 168, 76, 0.12);
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: var(--gold-dark);
}

.sub-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

.sub-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--cream);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.sub-audio { width: 100%; display: block; }

.sub-feedback {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}
.sub-feedback-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
}

/* ── Error annotation tooltip ─────────────────────────────── */
.error {
  text-decoration: underline wavy #e63946;
  cursor: help;
  position: relative;
}
.error::after {
  content: attr(data-correction);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #2d6a4f;
  color: #fff;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 0.78em;
  font-style: normal;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 10;
}
.error:hover::after { opacity: 1; }

/* ── AI Evaluation result ─────────────────────────────────── */
.eval-result-wrap {
  margin-top: 1.25rem;
}

.eval-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1.1rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.eval-loading--error { color: var(--fr-red); }

.eval-result {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.eval-score-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.eval-score {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

.eval-score-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.eval-annotated {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  word-break: break-word;
}

.eval-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.eval-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  margin-bottom: 0.55rem;
}

.eval-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.eval-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1.1rem;
  position: relative;
}
.eval-list li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: #e63946;
  font-weight: 700;
  font-size: 0.75rem;
}
.eval-list--strengths li::before {
  content: '✓';
  color: #2d6a4f;
}

.eval-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
}

@media (max-width: 540px) {
  .eval-columns { grid-template-columns: 1fr; }
}

/* ── CEFR level badge ─────────────────────────────────────── */
.cefr-badge {
  display: inline-block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  padding: 0.1rem 0.85rem;
  border-radius: 8px;
  letter-spacing: 0.04em;
}
.cefr--red    { background: #fee2e2; color: #b91c1c; }
.cefr--yellow { background: #fef3c7; color: #92400e; }
.cefr--green  { background: #d1fae5; color: #065f46; }
.cefr--grey   { background: var(--cream); color: var(--text-muted); }

/* ── Vocabulary / Verb upgrade sections ───────────────────── */
.eval-upgrade-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.upgrade-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.upgrade-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
}
.upgrade-basic {
  color: var(--text-muted);
  text-decoration: line-through;
  font-style: italic;
}
.upgrade-arrow {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
}
.upgrade-better {
  color: var(--navy);
  font-weight: 700;
}
.upgrade-example {
  flex-basis: 100%;
  padding-left: 0.25rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
}

/* ── Pronoun & structure tips ─────────────────────────────── */
.pronoun-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.pronoun-tip {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.85rem;
  row-gap: 0.2rem;
  padding: 0.6rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
}
.pronoun-structure {
  grid-row: 1;
  grid-column: 1;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  align-self: start;
}
.pronoun-example {
  grid-row: 1;
  grid-column: 2;
  font-size: 0.85rem;
  color: var(--text);
  font-style: italic;
  align-self: center;
}
.pronoun-why {
  grid-row: 2;
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.1rem;
}

/* ── Accent picker ────────────────────────────────────────── */
.accent-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0.45rem 0.65rem;
}

.accent-picker-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}

.accent-picker-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.accent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
  padding: 0;
  line-height: 1;
}
.accent-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}
.accent-btn:active {
  background: var(--gold);
  border-color: var(--gold-dark);
  color: var(--navy-dark);
  transform: translateY(0);
}

/* glue accent picker visually to the textarea below it */
.accent-picker + textarea,
.accent-picker + .tcf-ta {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* ── TCF Calendar ─────────────────────────────────────────── */
.tcf-cal-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.tcf-cal-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.tcf-cal-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
}
.tcf-cal-sub { font-size: 0.78rem; color: var(--text-muted); }
.cal-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.cal-legend-item { display: flex; align-items: center; gap: 0.35rem; }
/* static dots used in legend */
.cal-legend-item .cal-dot {
  position: static;
  transform: none;
  width: 8px;
  height: 8px;
}
.tcf-cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cal-month-lbl { font-weight: 700; font-size: 0.92rem; color: var(--navy); }
.cal-nav-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  line-height: 1;
}
.cal-nav-btn:hover { background: var(--cream); border-color: var(--navy); }
.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s;
  padding-bottom: 5px; /* space for dot */
}
.cal-cell:hover:not(:disabled) { background: var(--cream); border-color: var(--border); }
.cal-cell--empty               { pointer-events: none; }
.cal-cell--today               { font-weight: 700; border-color: var(--navy); color: var(--navy); }
.cal-cell--future              { color: var(--border); cursor: pointer; opacity: 0.45; }
.cal-cell--past                { color: var(--border); cursor: default; }
.cal-future-msg {
  font-size: 0.8rem;
  color: #b91c1c;
  background: rgba(185,28,28,0.06);
  border: 1px solid rgba(185,28,28,0.2);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
}
.cal-cell--selected            { background: var(--navy) !important; color: var(--white) !important; border-color: var(--navy) !important; }
.cal-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
}
.cal-dot--green  { background: #2d6a4f; }
.cal-dot--yellow { background: var(--gold-dark); }

/* ── TCF Task panel ───────────────────────────────────────── */
.tcf-panel { margin-bottom: 1.5rem; }
.tcf-panel-hdr { margin-bottom: 1.1rem; }
.tcf-panel-date {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.15rem;
}
.tcf-panel-sub-lbl { font-size: 0.78rem; color: var(--text-muted); }

.tcf-task-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
}
.tcf-task-card:last-child { margin-bottom: 0; }
.tcf-task-card--done { background: var(--cream); }

.tcf-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.tcf-card-meta  { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.tcf-num-badge {
  background: var(--navy);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.tcf-type-tag  { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.tcf-words-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 0.13rem 0.5rem;
  border-radius: 999px;
}
.tcf-done-chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: #2d6a4f;
  background: rgba(45,106,79,0.09);
  border: 1px solid rgba(45,106,79,0.25);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tcf-scenario {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.tcf-scenario--t3 {
  margin-bottom: 1rem;
}
.tcf-t3-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--gold);
}
.tcf-t3-docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 680px) {
  .tcf-t3-docs { grid-template-columns: 1fr; }
}
.tcf-t3-doc {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 0.65rem 0.9rem;
}
.tcf-t3-doc p {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.65;
  margin: 0;
}
.tcf-t3-doc-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.tcf-ta {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 0.74rem 1rem;
  color: var(--text);
  font-size: 0.93rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  display: block;
}
.tcf-ta:focus { border-color: var(--navy); background: var(--white); }
.tcf-wc-wrap {
  margin-top: 0.5rem;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
}
.tcf-footer-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.tcf-done-msg { font-size: 0.84rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── Word counter ─────────────────────────────────────────── */
.word-counter {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.wc-low  { color: #b91c1c;  border-color: rgba(185,28,28,0.35);  background: rgba(185,28,28,0.06); }
.wc-ok   { color: #2d6a4f;  border-color: rgba(45,106,79,0.35);  background: rgba(45,106,79,0.07); }
.wc-over { color: #b91c1c;  border-color: rgba(185,28,28,0.35);  background: rgba(185,28,28,0.06); }

/* ── Or divider ───────────────────────────────────────────── */
.hw-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 1.75rem 0;
  gap: 0.75rem;
}
.hw-or-divider::before,
.hw-or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-logo { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.2rem;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.75rem 1rem; font-size: 0.925rem; }
  .nav-menu a.nav-cta { margin-top: 0.25rem; text-align: center; justify-content: center; }

  .section { padding: 3.5rem 1.25rem; }
  .page-hero { padding: 3rem 1.25rem 2.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .home-hero-logo { width: 180px; height: 180px; }
  .portal-buttons { max-width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row.centered { align-items: center; }
}

/* ── Teacher comment display (student dashboard) ──────────── */
.teacher-comment-display {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgba(200,161,66,0.07);
  border-radius: 0 8px 8px 0;
}
.teacher-comment-display-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}
.teacher-comment-display-text {
  font-size: 0.88rem;
  color: var(--gold);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

/* ── Teacher dashboard page ───────────────────────────────── */
.teacher-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.teacher-header-card {
  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.teacher-header-card h1 {
  color: var(--white);
  font-size: 1.6rem;
  margin: 0 auto 0 0;
}
.teacher-header-card p {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  margin: 0;
  flex-basis: 100%;
}
.teacher-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--navy);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  flex-basis: 100%;
}
.teacher-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .teacher-layout { grid-template-columns: 1fr; }
}
.teacher-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.teacher-sidebar-hdr {
  padding: 0.85rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.student-btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  gap: 0.15rem;
  transition: background 0.15s;
}
.student-btn:last-child { border-bottom: none; }
.student-btn:hover { background: var(--cream); }
.student-btn.active { background: rgba(27,45,107,0.06); border-left: 3px solid var(--navy); }
.student-btn-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}
.student-btn-email {
  font-size: 0.75rem;
  color: var(--text-light);
  word-break: break-all;
}
.student-btn-meta {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.1rem;
}
.teacher-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.teacher-empty {
  color: var(--text-light);
  font-size: 0.9rem;
  padding: 1rem 0;
}
.teacher-placeholder {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}
.teacher-student-hdr {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.teacher-student-hdr h2 {
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
}
.teacher-sub-count {
  font-size: 0.8rem;
  color: var(--text-light);
}
.teacher-sub-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.teacher-sub-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.teacher-sub-date {
  font-size: 0.78rem;
  color: var(--text-light);
}
.teacher-task-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(27,45,107,0.08);
  color: var(--navy);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.teacher-writing {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  border-left: 3px solid var(--border);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  white-space: pre-wrap;
}
.teacher-feedback-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.teacher-feedback-summary {
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  background: var(--cream);
  list-style: none;
  user-select: none;
}
.teacher-feedback-summary::-webkit-details-marker { display: none; }
.teacher-feedback-summary::before { content: '▸ '; }
details[open] .teacher-feedback-summary::before { content: '▾ '; }
.teacher-feedback-body {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
}
.teacher-comment-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.teacher-comment-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.teacher-comment-ta {
  width: 100%;
  background: var(--white);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.teacher-comment-ta:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,45,107,0.12);
}
.teacher-comment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.teacher-comment-status {
  font-size: 0.8rem;
  color: var(--text-light);
}
.teacher-comment-status.success { color: #2d6a4f; }
.teacher-comment-status.error   { color: #b91c1c; }
.teacher-save-btn { padding: 0.45rem 1.1rem; font-size: 0.82rem; }
