/* Nattestudie: a focused dark shell, readable light exercise and lesson surfaces. */
body.is-student,body.is-guest{
  --night-bg:#101829;
  --night-surface:#1c2940;
  --night-raised:#22314d;
  --night-line:#354762;
  --night-text:#f4f8ff;
  --night-muted:#b9c7dc;
  --night-lime:#d9f56f;
  background:var(--night-bg);
}
body.is-student main{color:var(--night-text)}
body.is-student .site-header,body.is-guest .site-header{
  background:#172238;color:var(--night-text);border-bottom-color:var(--night-line);
}
body.is-student .brand,body.is-guest .brand{color:var(--night-text)}
body.is-student .brand>span:last-child span,body.is-guest .brand>span:last-child span{color:var(--night-lime)}
body.is-student .brand-mark,body.is-guest .brand-mark{
  color:#172238;background:var(--night-lime);box-shadow:3px 4px 0 #0b1120,inset 2px 2px 5px #ffffff70;
}
body.is-student .brand-mark span,body.is-guest .brand-mark span{color:#6452c1}
body.is-student .main-nav .nav-link{color:#d3dff0}
body.is-student .main-nav .nav-link:hover{color:#fff;background:#2a3955}
body.is-student .main-nav .nav-link.is-active{color:var(--night-lime);background:#2a3955}
body.is-student .header-points{background:var(--night-lime);color:#1b2a30;box-shadow:0 3px 0 #8aa747}
body.is-student .nav-button{color:#dfebf7;border-color:#50617b;background:transparent}
body.is-student .nav-button:hover{color:#fff;background:#2a3955}
body.is-guest .header-tagline{color:#c6d2e4}
body.is-student .site-footer,body.is-guest .site-footer{background:#152036;color:#c2cee0;border-top-color:var(--night-line)}
body.is-student .footer-inner>span:first-child,body.is-guest .footer-inner>span:first-child{color:#f3f7ff}
body.is-student .footer-inner .footer-dot,body.is-guest .footer-inner .footer-dot{color:var(--night-lime)}
body.is-student .skip-link:focus,body.is-guest .skip-link:focus{background:#f7f9ff;color:#19243a}
body.is-student :focus-visible,body.is-guest :focus-visible{outline-color:var(--night-lime)}
body.is-student .panel :focus-visible,body.is-student .card :focus-visible{outline-color:#6654e8}

/* Home: the same next actions, now with clear, tactile subject tiles. */
body.is-student .student-home,body.is-student .student-subject-page,body.is-student .student-profile-page{color:var(--night-text)}
body.is-student .student-welcome .eyebrow{color:var(--night-lime)}
body.is-student .student-welcome p{color:var(--night-muted)}
body.is-student .student-welcome h1{max-width:820px}
body.is-student .student-grade-link{color:#f2f6ff;background:var(--night-surface);border-color:var(--night-line)}
body.is-student .student-grade-link:hover{background:var(--night-raised)}
body.is-student .student-section-heading{margin:32px 0 17px}
body.is-student .student-section-heading h2{color:var(--night-text)}
body.is-student .student-section-heading p{color:var(--night-muted)}
body.is-student .simple-home .student-subject-grid{gap:16px}
body.is-student .simple-home .student-subject-card{
  display:grid;grid-template-columns:60px minmax(0,1fr);grid-template-rows:auto 1fr;align-items:center;
  column-gap:17px;row-gap:20px;min-height:184px;padding:22px;border:1px solid var(--night-line);
  border-radius:18px;background:var(--night-surface);color:var(--night-text);
  box-shadow:0 5px 0 #0b1220,0 14px 28px #080d1930;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
body.is-student .simple-home .student-subject-card:hover{
  transform:translateY(-3px);border-color:color-mix(in srgb,var(--subject) 56%,var(--night-line));
  box-shadow:0 8px 0 #0b1220,0 18px 30px #080d1940;
}
body.is-student .simple-home .student-subject-card:focus-within{border-color:var(--night-lime)}
body.is-student .simple-home .simple-subject-icon{
  display:grid;place-items:center;width:56px;height:56px;border-radius:15px;
  color:#14233a;background:linear-gradient(140deg,color-mix(in srgb,var(--subject) 48%,white),var(--subject));
  box-shadow:5px 6px 0 #0b1220,inset 3px 3px 7px #ffffff75,inset -4px -5px 7px #00000028;
  transform:rotate(-6deg) skewY(-2deg);transition:transform .18s ease;
}
body.is-student .simple-home .simple-subject-icon svg{width:30px;height:30px;color:#14233a;stroke-width:2.1}
body.is-student .simple-home .student-subject-card:hover .simple-subject-icon{transform:translateY(-2px) rotate(0deg) skewY(0)}
body.is-student .student-subject-copy{min-width:0;align-self:center}
body.is-student .simple-home .student-subject-card h2{font-size:1.3rem;line-height:1.25;margin:0 0 6px;color:var(--night-text)}
body.is-student .simple-home .student-subject-card p{font-size:.84rem;line-height:1.45;color:var(--night-muted);overflow-wrap:anywhere}
body.is-student .student-subject-actions{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap;align-self:end}
body.is-student .simple-home .student-subject-card .student-subject-link{
  width:auto;min-height:42px;margin:0;padding:0 14px;background:var(--night-lime);color:#1c2a30;
  box-shadow:0 3px 0 #8da74c;border-radius:10px;justify-content:center;
}
body.is-student .simple-home .student-subject-card .student-subject-link:hover{background:#e5ffa2;transform:translateY(-1px)}
body.is-student .student-subject-explore{color:#d4e3f6;font-size:.78rem;font-weight:750;text-underline-offset:3px;min-height:42px;display:inline-flex;align-items:center}
body.is-student .student-subject-explore:hover{color:#fff}
body.is-student .simple-home .simple-disclosure,body.is-student .student-subject-page .simple-disclosure,body.is-student .science-shell .simple-disclosure{
  background:var(--night-surface);color:var(--night-text);border-color:var(--night-line);
}
body.is-student .simple-home details p,body.is-student .simple-home>.helper{color:var(--night-muted)}
body.is-student .simple-home>.helper a{color:var(--night-lime)}
body.is-student .student-activity-list{background:var(--night-raised);border-color:var(--night-line)}
body.is-student .student-activity-item{border-bottom-color:var(--night-line)}
body.is-student .student-activity-item p,body.is-student .student-activity-points small{color:var(--night-muted)}
body.is-student .student-activity-points{color:var(--night-lime)}
body.is-student .student-activity-status.is-correct{background:#244b48;color:#b5f4d2}
body.is-student .student-activity-status.is-learning{background:#5a4733;color:#ffe0a8}

/* Subject pages use the dark palette, while reading and question panels stay light. */
body.is-student .back-link,body.is-student .student-subject-page>.back-link,body.is-student .student-profile-page>.back-link{color:#d1def0}
body.is-student .back-link:hover{color:#fff}
body.is-student .student-subject-banner,body.is-student .science-hero,body.is-student .progress-hero{
  background:linear-gradient(120deg,#1c2b45,#273f55);border:1px solid var(--night-line);color:var(--night-text);
}
body.is-student .student-subject-banner h1,body.is-student .science-hero h1,body.is-student .progress-hero h1{color:#fff}
body.is-student .student-subject-banner p,body.is-student .science-hero p,body.is-student .progress-hero p{color:#d5e3f2}
body.is-student .student-subject-banner .eyebrow,body.is-student .science-hero .eyebrow,body.is-student .progress-hero .eyebrow{color:var(--night-lime)}
body.is-student .student-banner-art{
  background:linear-gradient(145deg,color-mix(in srgb,var(--subject) 55%,white),var(--subject));
  color:#14233a;box-shadow:6px 8px 0 #111a2a,inset 4px 4px 9px #ffffff55,inset -5px -5px 8px #0002;
}
body.is-student .focus-panel.panel{background:var(--night-raised);border:1px solid var(--night-line);color:var(--night-text)}
body.is-student .focus-panel p{color:var(--night-muted)}
body.is-student .focus-panel .eyebrow{color:var(--night-lime)}
body.is-student .focus-measure{color:var(--night-muted)}
body.is-student .focus-measure strong{color:var(--night-text)}
body.is-student .focus-measure a{color:var(--night-lime)}
body.is-student .focus-panel .button-primary,body.is-student .science-topic .button-primary{
  background:var(--night-lime);color:#1c2a30;box-shadow:0 4px 0 #8ca546;
}
body.is-student .focus-panel .button-primary:hover,body.is-student .science-topic .button-primary:hover{background:#e5ffa2}
body.is-student .focus-panel .button-secondary,body.is-student .science-topic .button-secondary{background:#354761;color:#edf6ff}
body.is-student .student-category-card,body.is-student .science-topic,body.is-student .student-profile-subject{
  background:var(--night-surface);color:var(--night-text);border-color:var(--night-line);
}
body.is-student .student-category-description,body.is-student .science-topic>p,body.is-student .student-profile-footnote{color:var(--night-muted)}
body.is-student .student-category-symbol,body.is-student .student-profile-subject-icon{background:color-mix(in srgb,var(--category,var(--subject)) 32%,#293a58);color:#f3f8ff}
body.is-student .student-level{background:#344762;color:#e2ecfa}
body.is-student .student-card-stats,body.is-student .student-card-stats strong,body.is-student .student-level-note{color:#d3dfef}
body.is-student .student-level-track{background:#34435b}
body.is-student .student-practice-panel{background:var(--night-raised);border-top-color:var(--night-line);color:var(--night-text)}
body.is-student .student-practice-fields label,body.is-student .student-availability-note{color:var(--night-muted)}
body.is-student .student-practice-fields select,body.is-student .science-grade select{background:#f7f9ff;color:#26324b;border-color:#aebad0}
body.is-student .student-practice-panel>.student-subject-link{background:var(--night-lime);color:#1c2a30}
body.is-student .student-practice-panel>.student-subject-link:hover{background:#e5ffa2}
body.is-student .student-upcoming,body.is-student .student-empty,body.is-student .student-profile-note{background:var(--night-surface);color:var(--night-text);border-color:var(--night-line)}
body.is-student .student-upcoming p,body.is-student .student-upcoming-item,body.is-student .student-upcoming-item small,
body.is-student .student-empty p,body.is-student .student-profile-note p{color:var(--night-muted)}
body.is-student .student-learning-note,body.is-student .science-grade,body.is-student .science-note,body.is-student .science-help{color:var(--night-muted)}
body.is-student .science-note{background:var(--night-surface);border:1px solid var(--night-line)}
body.is-student .science-topic .eyebrow{color:#ccedbd}
body.is-student .science-topic .science-stats{color:var(--night-muted)}
body.is-student .science-lesson .panel{background:#f7f9ff;color:#202a42;border-color:#dce3ef}
body.is-student .science-lesson .panel .helper{color:#626c7f}
body.is-student .science-lesson .panel a:not(.button){color:#5141aa}
body.is-student .science-hero .science-emblem{color:var(--night-lime)}
body.is-student .science-grade small{color:var(--night-muted)}

/* Training: dark frame, bright high-contrast question card. */
body.is-student .training-shell{background:var(--night-bg);color:var(--night-text)}
body.is-student .training-heading-copy .eyebrow{color:var(--night-lime)}
body.is-student .training-heading-copy p,body.is-student .training-header .back-link{color:var(--night-muted)}
body.is-student .training-streak{background:var(--night-surface);border-color:var(--night-line)}
body.is-student .training-streak svg{color:#ffbf70}
body.is-student .training-streak span{color:var(--night-muted)}
body.is-student .training-shell .question-card{background:#f8faff;color:#202a42;border-color:#dfe6f1;box-shadow:0 12px 35px #080d1930}
body.is-student .training-shell .question-card .helper{color:#616a7d}
body.is-student .training-session-score{background:var(--night-raised);border:1px solid var(--night-line)}
body.is-student .training-session-score>span:not(.training-score-icon),body.is-student .training-session-score>small{color:var(--night-muted)}
body.is-student .training-goal{background:var(--night-surface);border-color:var(--night-line);color:var(--night-text)}
body.is-student .training-goal-heading>strong{color:var(--night-lime)}
body.is-student .training-goal>p,body.is-student .training-howto dt,body.is-student .training-howto p{color:var(--night-muted)}
body.is-student .training-howto dd{color:var(--night-lime)}
body.is-student .training-howto p{border-top-color:var(--night-line)}
body.is-student .training-goal.goal-complete{background:#25483d;border-color:#5da477}
body.is-student .training-shell .session-progress{background:#3b4a63}
body.is-student .training-shell .session-progress span{background:var(--night-lime)}
body.is-student .training-shell .answer-input,body.is-student .training-shell .choice{color:#27324a}
body.is-student .training-shell .answer-input:focus,body.is-student .training-shell .choice:has(input:focus-visible){outline-color:#6654e8}
body.is-student .training-shell .celebrate{animation:night-success .3s ease-out}
@keyframes night-success{50%{transform:translateY(-3px)}}

/* Benchmarks, charts and explanations stay on pale reading surfaces. */
body.is-student .progress-shell .panel,body.is-student .progress-shell .simple-disclosure{
  background:#f7f9ff;color:#202a42;border-color:#dfe6f1;
}
body.is-student .progress-shell .panel .helper{color:#5b667a}
body.is-student .progress-shell .progress-hero{background:linear-gradient(120deg,#1c2b45,#273f55);color:#fff}
body.is-student .progress-shell .progress-hero p{color:#d5e3f2}
body.is-student .progress-shell .back-link{color:var(--night-muted)}
body.is-student .progress-shell .progress-filters>label{color:var(--night-text)}
body.is-student .progress-shell .progress-advanced .progress-filters>label{color:#202a42}
body.is-student .progress-shell .progress-empty{background:#e9edf8}
body.is-student .progress-shell .progress-number{color:#4939af}

/* Profile and game shells. Their forms and cards remain light for long sessions. */
body.is-student .student-profile-hero{background:linear-gradient(120deg,#1c2b45,#273f55);border:1px solid var(--night-line)}
body.is-student .student-profile-note strong{color:#f0f5ff}
body.is-student .student-profile-subject-heading>div>span,body.is-student .student-profile-stats dt{color:var(--night-muted)}
body.is-student .student-icon-link{color:var(--night-muted)}
body.is-student .student-icon-link:hover{background:var(--night-raised)}
body.is-student .timeline-page{background:var(--night-bg);color:var(--night-text)}
body.is-student .timeline-page .timeline-intro h1{color:var(--night-text)}
body.is-student .timeline-page .timeline-intro h1 span{color:var(--night-lime)}
body.is-student .timeline-page .timeline-intro p,body.is-student .timeline-page .eyebrow,body.is-student .timeline-page .timeline-back{color:var(--night-muted)}
body.is-student .timeline-page .timeline-setup,body.is-student .timeline-page .timeline-game,body.is-student .timeline-page .timeline-finish{background:#f7f9ff;color:#202a42;border-color:#dfe6f1}
body.is-student .timeline-page .timeline-game-head{background:#f7f9ff}

/* Existing login geometry, with the same night palette and tactile subject tiles. */
body.is-guest .login-hero{background:var(--night-bg)}
body.is-guest .login-hero::after{background:radial-gradient(ellipse at 5% 0%,#5e7ca044,transparent 57%)}
body.is-guest .login-copy>p,body.is-guest .login-promise{color:var(--night-muted)}
body.is-guest .login-copy h1>span,body.is-guest .login-eyebrow{color:var(--night-lime)}
body.is-guest .login-subject-tile{box-shadow:5px 6px 0 #0b1220,inset 4px 4px 8px #ffffff80,inset -4px -5px 8px #0002}

@media(max-width:560px){
  body.is-student .simple-home .student-subject-card{min-height:158px;padding:18px;row-gap:16px}
  body.is-student .simple-home .student-subject-grid{gap:14px}
  body.is-student .student-section-heading{margin-top:27px}
  body.is-student .training-shell .question-card{box-shadow:0 8px 25px #080d1924}
}
@media(prefers-reduced-motion:reduce){
  body.is-student .simple-home .student-subject-card,body.is-student .simple-home .simple-subject-icon{transition:none}
  body.is-student .simple-home .student-subject-card:hover,body.is-student .simple-home .student-subject-card:hover .simple-subject-icon{transform:none}
  body.is-student .training-shell .celebrate{animation:none}
}
