:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(960px, 92%);
  margin: 0 auto;
}

.container-wide {
  width: min(1100px, 94%);
  margin: 0 auto;
}

.container-landing {
  width: min(1400px, 96%);
  margin: 0 auto;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}

nav a {
  margin-left: 1.25rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

main.container { flex: 1; padding-bottom: 3rem; }

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

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.subject-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent, var(--primary));
  transition: transform 0.15s, box-shadow 0.15s;
}

.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

.subject-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.subject-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.progress-text { color: var(--muted); font-size: 0.95rem; }

.badge {
  display: inline-block;
  margin-top: 0.75rem;
  background: #eef2ff;
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.set-list { display: flex; flex-direction: column; gap: 1rem; }

.set-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}

.set-card.locked { opacity: 0.7; }

.set-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.set-header h2 { font-size: 1.1rem; }

.status-badge {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text);
}

.btn-large {
  font-size: 1.1rem;
  padding: 1rem 2rem;
  margin-top: 1.5rem;
}

.lesson-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.lesson-section { margin-bottom: 1.5rem; }
.lesson-section h2 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--primary); }

.step-label {
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 1rem;
}

.check-list {
  margin: 1rem 0 0 1.5rem;
  font-size: 1.1rem;
}

.check-list li { margin-bottom: 0.75rem; }

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.letter-card {
  background: #fff7ed;
  border: 2px solid #fed7aa;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.bengali-char {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.25rem;
}

.bengali-page,
.bengali-text {
  font-family: "Noto Sans Bengali", "Kalpurush", "Hind Siliguri", "Segoe UI", system-ui, sans-serif;
}

.bengali-page .page-title {
  font-size: 2rem;
  line-height: 1.35;
}

.bengali-page .lesson-section h2 {
  font-size: 1.35rem;
}

.bengali-page .lesson-section p,
.bengali-page .letter-card p,
.bengali-page .letter-card strong {
  font-size: 1.1rem;
}

.quiz-form { margin-top: 1rem; }

.question-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.question-card h3 {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.options { display: flex; flex-direction: column; gap: 0.5rem; }

.option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.05rem;
}

.option-label:has(input:checked) {
  border-color: var(--primary);
  background: #eef2ff;
}

.option-label input { width: 1.1rem; height: 1.1rem; }

.quiz-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.quiz-timer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #fff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(49, 46, 129, 0.25);
  position: sticky;
  top: 0.5rem;
  z-index: 5;
}

.quiz-timer-label {
  font-weight: 600;
  font-size: 1rem;
}

.quiz-timer-value {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#progress-hint { margin-bottom: 0.75rem; font-weight: 600; }

.review-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  border-left: 5px solid var(--muted);
}

.review-correct { border-left-color: var(--success); }
.review-wrong { border-left-color: var(--error); }

.parent-review-page { max-width: 920px; margin: 0 auto; }
.parent-review-summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.parent-review-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.parent-review-item {
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: #fff;
}
.parent-signoff-form {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
.parent-comment-field {
  display: block;
  margin-bottom: 1rem;
}
.parent-comment-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.optional-tag {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}
.parent-comment-field textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
}
.parent-comment-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem;
}
.parent-comment-card--readonly {
  margin-top: 1rem;
}
.parent-comment-heading,
.parent-comment-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
  color: #1e3a8a;
}
.parent-comment-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}
.set-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}
.set-restart-form { margin: 0; }
.set-actions .done-msg {
  width: 100%;
  margin: 0 0 0.25rem;
}
.timing-actions { white-space: nowrap; }
.timing-actions .btn-small { padding: 0.35rem 0.65rem; font-size: 0.85rem; }
.timing-reset-form { display: inline-block; margin-left: 0.35rem; }
.parent-signed-note {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
}

.text-correct { color: var(--success); font-weight: 700; }
.text-wrong { color: var(--error); font-weight: 700; }

.explanation {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 10px;
}

.celebrate { text-align: center; padding: 2rem 0; }
.score-big { font-size: 1.5rem; margin: 1rem 0; }
.action-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

.pending-list { display: flex; flex-direction: column; gap: 1rem; }

.section-title {
  font-size: 1.35rem;
  margin: 2rem 0 1rem;
}

.timing-section { margin-bottom: 2rem; }

.timing-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.timing-table th,
.timing-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.timing-table th {
  background: #f8fafc;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.timing-table tr:last-child td { border-bottom: none; }

.pending-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.signoff-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

.input-password {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  min-width: 200px;
}

.flash-messages { margin-bottom: 1.5rem; }

.flash {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }

.locked-msg, .done-msg { color: var(--muted); }
.empty-state { text-align: center; padding: 3rem; }

/* ── Home hero dashboard ── */
.hero-dashboard--big {
  min-height: calc(100vh - 180px);
  margin-bottom: 1rem;
}

.hero-dashboard {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 12px 40px rgba(30, 64, 175, 0.18);
}

.hero-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 35%, #f59e0b 100%);
  z-index: 0;
}

.hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.2) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem 2rem 2.25rem;
  color: #fff;
}

.hero-content--stacked {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 2.5rem 3rem;
}

.hero-title--big {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero-tagline--big {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  max-width: 40rem;
}

.info-grid--wide {
  grid-template-columns: repeat(4, 1fr);
}

.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.hero-name {
  background: linear-gradient(90deg, #fde047, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

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

.info-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.info-icon { font-size: 1.5rem; }

.info-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

.info-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

#live-time {
  font-variant-numeric: tabular-nums;
}

.info-value--fallback {
  font-size: 0.9rem;
}

.info-value--local {
  color: #ecfdf5;
}

.info-value--muted {
  opacity: 0.85;
  font-weight: 600;
}

.info-hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0.88;
}

.info-locate-btn {
  margin-top: 0.45rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.info-locate-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
}

.info-locate-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.info-card--fallback {
  border-style: dashed;
}

.info-card--local {
  border-color: rgba(167, 243, 208, 0.55);
}

.hero-car-panel--big {
  padding: 2rem 2.5rem 2.5rem;
  width: 100%;
}

.hero-car-panel--locked {
  opacity: 0.85;
}

.hero-car-panel--locked .car-showcase-img {
  filter: brightness(0.95) saturate(0.9) contrast(1) grayscale(0.2);
}

.car-badge--big {
  font-size: 1.05rem;
  padding: 0.5rem 1.25rem;
}

.car-tap-hint {
  font-size: 1.35rem;
  color: #1d4ed8;
  margin-bottom: 1rem;
  animation: pulse-hint 1.5s ease-in-out infinite;
}

@keyframes pulse-hint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.car-launch-btn {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 20px;
}

.car-launch-btn:disabled {
  cursor: not-allowed;
}

.car-launch-btn:not(:disabled):hover .car-image-wrap--big {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(239, 68, 68, 0.35);
}

.car-launch-btn:not(:disabled):hover .car-launch-overlay {
  opacity: 1;
}

.car-launch-btn--go .car-image-wrap--big {
  transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(249, 115, 22, 0.5);
}

.car-image-wrap--big {
  position: relative;
  border-radius: 20px;
  margin-bottom: 1rem;
  background: linear-gradient(145deg, #fef9c3 0%, #7dd3fc 35%, #fde047 70%, #fbbf24 100%);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 5px solid #fbbf24;
  width: 100%;
  padding: 10px;
  line-height: 0;
  overflow: hidden;
  box-shadow:
    0 10px 40px rgba(251, 191, 36, 0.45),
    inset 0 2px 20px rgba(255, 255, 255, 0.65);
}

.car-showcase-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: contain;
  object-position: center center;
  position: relative;
  z-index: 1;
  filter: brightness(1.18) saturate(1.35) contrast(1.06);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.car-image--big {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.car-launch-overlay {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29, 78, 216, 0.3);
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.25s ease;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.car-name--big {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.student-code-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.student-code-panel h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #1e40af;
}

.student-code-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.student-code-input {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.5rem;
  text-align: center;
  width: 10rem;
  padding: 0.75rem 1rem;
  border: 3px solid #3b82f6;
  border-radius: 14px;
}

.student-code-error {
  color: #dc2626;
  font-weight: 700;
  margin-top: 0.75rem;
}

.subject-grid--learn {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.subject-card--big {
  padding: 2rem 1.5rem;
}

.subject-icon--big {
  font-size: 3rem !important;
}

.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-logout {
  color: #dc2626 !important;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.parent-login-page {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
}

.parent-login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  flex: 0 1 400px;
  min-width: 300px;
  max-width: 420px;
}

.parent-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.input-password--big {
  font-size: 1.25rem;
  padding: 1rem;
  width: 100%;
}

.parent-login-page .parent-teacher-img,
.parent-teacher-svg {
  width: min(720px, 52vw);
  min-width: 480px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.parent-teacher-img,
.parent-teacher-svg {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 0;
}

.parent-teacher-img--dashboard {
  max-width: 800px;
  width: 100%;
}

.parent-dashboard .parent-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
  margin-bottom: 2rem;
  background: #fef3c7;
  border-radius: var(--radius);
  padding: 2rem;
  border: 2px solid #fcd34d;
}

.parent-login-art {
  flex: 1 1 55%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (max-width: 768px) {
  .parent-login-page {
    flex-direction: column;
    gap: 1.5rem;
  }

  .parent-login-page .parent-teacher-img,
.parent-teacher-svg {
    width: min(560px, 92vw);
    min-width: 0;
    margin: 0 auto;
  }

  .parent-login-card {
    width: 100%;
    max-width: 100%;
  }

  .parent-teacher-img--dashboard {
    max-width: 100%;
  }
}

.hero-car-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 1.25rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.car-badge {
  display: inline-block;
  background: linear-gradient(90deg, #ef4444, #f97316);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.car-image-wrap {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #0f172a;
}

.car-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

/* legacy — home page uses .car-showcase-img instead */

.car-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 0.35rem;
}

.car-fact {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.car-refresh-note {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.subjects-section { margin-top: 0.5rem; }

.section-heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
  .hero-content,
  .hero-content--stacked {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .info-grid--wide {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .signoff-form { flex-direction: column; align-items: stretch; }
  .input-password { width: 100%; }
}

/* Home car — always show full image, never crop, keep bright & shiny */
img.car-showcase-img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: brightness(1.18) saturate(1.35) contrast(1.06) !important;
}

/* Registration & auth */
.register-page { max-width: 900px; margin: 0 auto; }
.required-tag,
.optional-tag {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.required-tag { color: #dc2626; }
.optional-tag { color: #64748b; }
.req-mark {
  color: #dc2626;
  font-weight: 700;
  margin-left: 0.2rem;
}
.req-legend {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: #64748b;
}
.register-form label .req-mark { margin-right: 0.15rem; margin-left: 0; }
.register-form label .label-text,
.register-form label .field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}
.register-form label .field-label .req-mark,
.register-form label.passcode-field .req-mark,
.student-security-card .field-label .req-mark {
  color: #dc2626;
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
}
.register-section--collapsed {
  display: none !important;
}
.register-form .btn-secondary#add-parent2-btn,
.register-form .btn-secondary#add-student-btn {
  margin-top: 0.75rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.register-errors {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  color: #991b1b;
}
.register-errors h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.register-errors ul { margin: 0; padding-left: 1.25rem; }
.register-errors li { margin-bottom: 0.35rem; }
.field-error {
  display: block;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
.input-invalid {
  border-color: #ef4444 !important;
  background: #fff7f7;
}
.register-section {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.register-section h2 { margin-top: 0; font-size: 1.25rem; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid--narrow { max-width: 420px; }
.form-grid label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; }
.form-grid input, .form-grid select, .security-row input, .security-row select {
  padding: 0.65rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
}
.security-block, .student-security-card {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
.security-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.student-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.student-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.student-pick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.student-pick-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}
.student-pick-option:has(input:checked) {
  border-color: #4f46e5;
  background: #eef2ff;
}
.student-pick-list { display: flex; flex-direction: column; gap: 0.75rem; }
.student-pick-btn { text-align: center; }
.passcode-input { letter-spacing: 0.35em; text-align: center; font-size: 1.5rem; max-width: 160px; }
.confirm-code-input {
  letter-spacing: 0.45em;
  text-align: center;
  font-size: 1.75rem;
  max-width: 220px;
  font-variant-numeric: tabular-nums;
}
.confirm-code-label { display: block; font-weight: 600; }
.register-confirm-form { max-width: 480px; }
.login-id-input { font-size: 1.1rem; letter-spacing: 0.02em; }
.login-field-label { display: block; font-weight: 600; margin-bottom: 0.75rem; }
.student-login-form .login-field-label input { width: 100%; margin-top: 0.35rem; }
.student-login-form { display: flex; flex-direction: column; gap: 0.25rem; max-width: 320px; margin: 0 auto; }
.parent-login-form .login-field-label { margin-bottom: 1rem; }
.parent-login-form .login-field-label input { width: 100%; margin-top: 0.35rem; }
.login-id-readonly { background: #f1f5f9; color: #334155; cursor: not-allowed; }
.auth-card, .landing-content { max-width: 560px; margin: 0 auto; }
.auth-form label { display: block; margin-bottom: 1rem; font-weight: 600; }
.auth-form input { width: 100%; margin-top: 0.35rem; }
.landing-actions { margin: 1.5rem 0; }
.home-register-banner {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.home-register-banner .landing-actions { margin-bottom: 0; }
.register-already { max-width: 36rem; margin-top: 1rem; }
.register-info-banner {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  color: #1e3a5f;
}
.register-info-banner a { font-weight: 600; }
.landing-note, .landing-sub, .hint, .forgot-link-wrap { color: #475569; }

.science-day-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 2px solid #bfdbfe;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
  text-align: left;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.08);
}
.science-day-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
}
.science-day-date {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #64748b;
  font-weight: 600;
}
.science-day-title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  line-height: 1.35;
  color: #0f172a;
}
.science-day-body {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  line-height: 1.55;
  color: #334155;
}
.science-day-quote {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid #3b82f6;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 0 10px 10px 0;
  font-size: 0.98rem;
  font-style: italic;
  color: #1e3a8a;
  line-height: 1.5;
}
.landing-content .science-day-card { max-width: 720px; margin-left: auto; margin-right: auto; }

.hint { font-size: 0.95rem; margin-bottom: 1rem; }
.forgot-link-wrap { margin-top: 0.75rem; text-align: center; }

@media (max-width: 700px) {
  .form-grid, .security-row { grid-template-columns: 1fr; }
}
