/* Ukeplanen v0.2 — design language adapted from Skolesekken 3.x.
   The single-grade view and white-label API remain independent. */
:root{
  --bg:#f6f7f3;--ink:#263d3a;--muted:#78918c;--line:#e7ebe5;
  --forest:var(--brand,#225e52);--mint:#e4f2e9;--sun:#ffe8c8;--orange:var(--accent,#ed9561);
  --shadow:0 12px 35px rgba(37,70,58,.05);
}
body{background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased;}
.shell{max-width:1170px;width:auto;padding:0 30px 70px;margin:auto}
.topbar{height:100px;padding:0;border:0;gap:16px}
.logo{gap:12px;color:var(--ink)}
.brand-mark{width:42px;height:42px;border-radius:14px;background:var(--forest);box-shadow:0 6px 12px rgba(45,85,65,.13);color:#fff;font-size:23px}
.logo strong{font-size:24px;font-weight:870;letter-spacing:-1.35px}
.logo .logo-accent{color:var(--orange)}
.logo small{font-size:10px;font-weight:800;letter-spacing:.18em;color:#8da49b;margin-top:2px}
.date-chip{font-size:13px;font-weight:700;color:#768c84;text-transform:none}
.week-badge{background:#e2f0e7;color:#285f53;border-radius:13px;padding:9px 14px;font-size:14px;letter-spacing:.02em}
.ghost,.small-button{background:#fff;border:1px solid var(--line);padding:11px 15px;border-radius:12px;color:#426f61;font-weight:800;font-size:12px;min-height:42px}
.ghost:hover,.small-button:hover{background:#e9f4ec}
/* Gate is its own first-run page, styled consistently with the original app. */
.gate{max-width:760px;margin:5vh auto 9vh;padding:42px;background:linear-gradient(130deg,#eaf5e9,#f4f8ed 70%,#fff);border:1px solid #e3eee0;box-shadow:var(--shadow);border-radius:28px}
.gate-icon{background:var(--forest);color:#fff;border-radius:21px}
.gate h1{font-weight:880;letter-spacing:-1.7px}
.gate .eyebrow{color:#528575}
.gate .grade{background:#fff;border-color:#e4ede5;box-shadow:0 6px 14px rgba(37,70,58,.03)}
.gate .grade:hover{background:#e8f5ed;border-color:#71a08b}
.gate .grade strong{color:var(--forest)}
/* Primary header reproduces Skolesekken's wide green spotlight and small weather tile. */
.hero{grid-template-columns:minmax(0,1fr) 242px;gap:14px;margin:15px 0 20px}
.hero>div:first-child{position:relative;overflow:hidden;background:linear-gradient(108deg,#eaf5e9,#f4f8ed);border:1px solid #e3eee0;border-radius:25px;min-height:163px;padding:27px 32px;align-self:stretch}
.hero>div:first-child::after{content:'✳';position:absolute;right:-6px;top:-53px;font-size:170px;line-height:1;color:#b7d5bf;opacity:.2;pointer-events:none}
.hero h1{font-size:clamp(30px,4vw,45px);line-height:1.14;letter-spacing:-1.2px;font-weight:900;margin:0 0 6px;position:relative;z-index:1}
.hero .eyebrow{font-size:10px;color:#528575;font-weight:900;letter-spacing:.15em;margin-bottom:8px;position:relative;z-index:1}
.hero .lead{font-size:14px;line-height:1.6;color:#59796d;position:relative;z-index:1;margin:0}
.hero-actions{position:relative;z-index:1;margin-top:19px;gap:9px}
.hero-actions a{font-size:12px;color:#3f7665}
.state-pill{font-size:11px;font-weight:850;border-radius:9px;padding:8px 10px;background:#e3f0e6}
.state-warning{background:#fff0d9;color:#94611d}.state-error{background:#fce6e1;color:#ad4637}
.weather{background:#fff;border:1px solid #e2ece4;min-height:163px;box-shadow:none;border-radius:25px;padding:21px 23px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.weather .eyebrow{font-size:10px;letter-spacing:.09em;color:#769289;margin:0 0 7px}
.weather-main{margin:0;gap:10px}.weather-icon{font-size:33px}
.weather-main strong{font-size:26px;line-height:1.2;letter-spacing:-1px;font-weight:880}
.weather-desc{font-size:12px;color:#768b82;line-height:1.4}
.source-note{font-size:10px;color:#91a49b;margin:4px 0 0}
.alert,.rain-alert{border-radius:14px;font-size:13px}
/* Distinct original-style single white weekday selector. */
.weekdays{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:22px;padding:8px;gap:6px;margin:0 0 22px}
.day{min-height:81px;background:transparent;border:0;border-radius:16px;padding:12px 8px;align-items:center;justify-content:center;gap:5px;color:#607d72}
.day span{font-weight:850;font-size:14px}.day strong{font-size:12px;font-weight:600}
.day:hover:not(.active){background:#f0f6f0}
.day.active{background:#286457;box-shadow:0 5px 12px rgba(34,94,82,.19);color:#fff;border:0}
.day.past:not(.active){opacity:.56}
/* As in Skolesekken: big program at left, mint packing card at right. */
.columns{grid-template-columns:minmax(0,1.15fr) minmax(315px,.85fr);gap:20px}
.panel{border-radius:23px;border:1px solid var(--line);box-shadow:var(--shadow);padding:26px;margin-bottom:20px}
.panel-head{margin-bottom:20px}.panel-head h2{font-size:22px;letter-spacing:-.8px;font-weight:860}
.panel-head .eyebrow{font-size:10px;font-weight:900;letter-spacing:.16em;color:#6a9184;margin-bottom:6px}
.section-icon{height:46px;width:46px;display:grid;place-items:center;border-radius:16px;background:#e8f4ee;font-size:24px;padding:0}
.event{display:grid;grid-template-columns:50px 1fr;gap:14px;align-items:start;border:0;padding:10px 0;font-size:14px;line-height:1.52;font-weight:680}
.event+.event{padding-top:17px;border-top:1px solid #eef0eb}
.event-dot{font-size:0;width:50px;height:50px;margin:0;background:#e8f4ee;border-radius:17px;display:grid;place-items:center;color:#276355}
.event-dot::after{content:'📚';font-size:23px}
.event:nth-child(3n+2) .event-dot{background:#fff1e3}.event:nth-child(3n+2) .event-dot::after{content:'✏️'}
.event:nth-child(3n) .event-dot{background:#efe8ff}.event:nth-child(3n) .event-dot::after{content:'🎨'}
.event small{font-size:12px;font-weight:850;color:#447466;margin-bottom:3px}
.bag{background:#eef7f2;border:1px solid #dfede4}
.bag .section-icon{background:#d8ebe0}
.bag .panel-head{margin-bottom:17px}
.bag .checkrow{background:#fff;border:1px solid #e7eee8;border-radius:14px;margin:7px 0;min-height:55px;padding:12px 14px;font-weight:780}
.bag .empty{background:#ffffffb0;border-color:#d8e9df}
.bag .checkrow.done{opacity:.64}
/* Homework is a light, spacious secondary section rather than another heavy card. */
.homework{margin:2px 0 19px;padding:23px 25px;border-radius:22px}
.homework .items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 13px}
.checkrow{min-width:0;background:#fafbf9;border:1px solid #edf1ec;border-radius:13px;padding:13px 14px;align-items:flex-start;line-height:1.55;font-size:13px}
.checkrow input{width:19px;height:19px;margin:1px 0 0;accent-color:#338465}
.subject{font-size:11px;border-radius:8px;padding:3px 7px;background:#e5f1e9;color:#235e51;margin-right:6px}
.theme{background:linear-gradient(125deg,#fff8df 0%,#fffdf3 55%,#fff 100%);border:1px solid #f2dfb3;border-radius:23px;padding:25px 27px}
.theme .section-icon{background:#fff0bd}.theme .eyebrow{color:#98753d}
.theme h2{color:#5d461e}.theme #theme-content{font-size:17px;font-weight:800;color:#5d461e;line-height:1.5}
.mission{background:#fff;border:1px solid #f2e3bc;border-radius:19px;padding:19px 21px;margin-top:19px}
.mission strong{font-size:14px;color:#936521}.mission p{font-size:15px;color:#493a22;line-height:1.5;font-weight:680}
.mission-check{background:#e4f2e9;padding:9px 12px;border-radius:11px;color:#276348;font-weight:800}
.mission-done{background:#e3f4e6;border-radius:13px;padding:14px 16px;color:#276348}
.subjects{border-color:#f2e3bc}
.details{border-color:var(--line);border-radius:20px;box-shadow:none}
.details summary{font-weight:850;padding:19px 23px}
.details-content{color:#728b80;padding:0 23px 16px}
.disclaimer{color:#8ba198;font-size:12px}
footer{border-color:var(--line);color:#92a49c}
@media(max-width:900px){.shell{padding:0 20px 50px}.topbar{height:86px}.columns{grid-template-columns:minmax(0,1fr) 340px;gap:14px}.panel{padding:21px}}
@media(max-width:700px){.shell{width:auto;padding:0 14px 48px}.topbar{height:73px;align-items:center}.brand-mark{height:36px;width:36px;font-size:19px;border-radius:11px}.logo strong{font-size:21px}.logo small{font-size:8px}.week-badge{font-size:12px;padding:8px 10px}.hero{grid-template-columns:1fr;gap:12px;margin-top:14px}.hero>div:first-child{padding:23px;min-height:135px}.hero-actions{margin-top:15px}.weather{min-height:130px;padding:18px 21px}.weather-main{margin:0}.columns{grid-template-columns:1fr;gap:0}.weekdays{gap:4px}.day{min-height:70px;padding:10px 3px}.day span{font-size:12px}.day strong{font-size:11px}.homework .items{grid-template-columns:1fr}.gate{padding:27px 20px;margin:25px auto 45px}.grades{grid-template-columns:repeat(4,1fr)}}
@media(max-width:420px){.hero h1{font-size:33px}.logo strong{font-size:19px}.header-actions{gap:6px}.ghost{padding:8px 9px;font-size:11px}.day span{font-size:10.5px}.day strong{font-size:10px}.gate h1{font-size:32px}.checkrow{overflow-wrap:anywhere}}

/* Keep weekly subject overview separate from a genuine theme / optional mission. */
.subjects-panel{margin-top:19px;background:#fff}
.subjects-panel .items{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.subject-item{margin:0;padding:12px 15px;border-radius:13px;background:#f4f6f2;color:#45695b;font-size:13px;line-height:1.45}

/* A small, nonintrusive note for partial plans (never a full warning card). */
.plan-feedback.feedback-partial{display:flex;align-items:center;gap:10px;margin:5px 0 15px;padding:10px 14px;background:#fff9ee;border:1px solid #f0dfbb;border-radius:13px;box-shadow:none;min-height:0}
.feedback-partial .feedback-illustration{display:none}
.feedback-partial .feedback-content{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;min-width:0}
.feedback-partial .feedback-eyebrow{display:none}
.feedback-partial .feedback-content h2{font-size:13px;letter-spacing:0;line-height:1.4;font-weight:800;margin:0;color:#765a27}
.feedback-partial .feedback-description{font-size:12px;line-height:1.4;margin:0;color:#765a27}
.feedback-partial .feedback-actions{display:flex;margin:0;padding:0;gap:7px}
.feedback-partial .feedback-secondary-link{min-height:0;padding:5px 9px;border:1px solid #dfc99c;border-radius:8px;background:white;font-size:12px;color:#72551f}
/* Special illustrated content comes from the actual PDF pages, never generated art. */
.special-panel{background:#fff;}
.special-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr));gap:18px}
.special-card{display:flex;flex-direction:column;gap:15px;background:#f8faf7;border:1px solid #e1ebe2;border-radius:17px;padding:18px;min-width:0}
.special-type{font-size:10px;letter-spacing:.1em;font-weight:850;color:#528575;margin:0 0 8px}
.special-copy h3{margin:0 0 8px;font-size:19px;line-height:1.3;color:#285c4a}
.special-copy>p:not(.special-type){font-size:14px;line-height:1.6;margin:0 0 10px;color:#4b685d}
.special-copy>a{font-size:13px;font-weight:800;color:#256351}
.special-visual{padding:12px;background:#e9efea;border-radius:12px;color:#6d857a;font-size:12px;min-height:85px;display:grid;place-items:center;overflow:hidden}
.special-visual canvas{max-width:100%;height:auto!important;display:block;border-radius:8px;background:white;box-shadow:0 4px 14px #24463622}
@media(max-width:700px){.plan-feedback.feedback-partial{padding:9px 11px;margin:0 0 12px}.feedback-partial .feedback-content{gap:3px 8px}.special-card{padding:14px}}
/* Municipality-wide, searchable school picker. */
.school-gate{max-width:840px;text-align:left;padding:35px 38px}
.school-gate .gate-icon,.school-gate>h1,.school-gate>.eyebrow,.school-gate>.lead,.school-gate>.fineprint{text-align:center}
.school-gate .gate-icon{margin-left:auto;margin-right:auto}
.school-search-label{display:block;font-size:12px;font-weight:850;letter-spacing:.03em;color:#53786b;margin:22px 0 7px}
.school-search{width:100%;border:1.5px solid #d2e3d8;background:#fff;border-radius:14px;padding:13px 17px;font-size:16px;min-height:50px;color:#274c40}
.school-search:focus{outline:3px solid #d7ebe0;outline-offset:1px}
.school-match-count{font-size:12px;color:#7f9689;font-weight:700;margin:11px 0}
.school-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;max-height:445px;overflow:auto;padding:2px 4px 5px 0}
.school-choice{border:1px solid #dfe9e1;border-radius:13px;background:#fff;display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;padding:13px 15px;min-height:59px;color:#2b5346;font-size:14px;font-weight:800}
.school-choice:hover,.school-choice:focus-visible{background:#e8f5ed;border-color:#75a892}
.school-choice .school-type{font-size:10px;font-weight:750;color:#7e988b;white-space:nowrap}
.school-choice .school-chevron{color:#82a696;font-size:17px}
.school-empty{padding:24px;text-align:center;color:#7e988b;grid-column:1/-1}
@media(max-width:700px){.school-gate{padding:26px 20px}.school-choices{grid-template-columns:1fr;max-height:60vh}.school-choice{min-height:56px}.topbar .header-actions{gap:5px}}
@media(max-width:420px){.header-actions #change-school,.header-actions #change-grade{padding:6px 8px;font-size:10px}}

/* v0.7: high-visibility AI analysis and clear official-school recovery actions. */
.state-pill.state-ai-processing{background:#235e52;color:#fff;padding:10px 14px;font-size:13px;box-shadow:0 5px 16px rgba(32,93,77,.18);gap:9px}
.state-ai-processing::before{content:'';width:15px;height:15px;border:2px solid #ffffff75;border-top-color:#fff;border-radius:50%;display:inline-block;animation:feedback-spin .85s linear infinite;flex:none}
.state-pill.state-ai-ready{background:#d9f1e4;color:#245c47;padding:9px 13px;font-size:12px}
.plan-feedback{display:flex;align-items:center;gap:22px;border-radius:23px;padding:24px 28px;margin:0 0 22px;box-shadow:0 10px 27px rgba(24,77,65,.07);overflow:hidden;min-width:0}
.plan-feedback.feedback-analyzing{background:linear-gradient(115deg,#dcefe7,#f0f7ee 72%,#fff);border:1.5px solid #bdd9c9;color:#254f42}
.plan-feedback.feedback-missing{background:linear-gradient(115deg,#fff2e1,#fff9ee 72%,#fff);border:1.5px solid #eed8b7;color:#6d4927}
.feedback-illustration{position:relative;width:84px;height:88px;flex:0 0 84px;display:grid;place-items:center;border-radius:22px;background:#ffffffa1;border:1px solid #ffffffc0}
.feedback-sheet{position:relative;display:block;width:48px;height:60px;border-radius:7px;background:white;border:2px solid #91b6a4;transform:rotate(-6deg);box-shadow:2px 5px 14px rgba(23,93,69,.15);overflow:hidden}
.feedback-sheet i{display:block;height:4px;background:#bfdfd0;border-radius:6px;margin:10px 9px -4px}
.feedback-sheet i:nth-child(2){width:21px}.feedback-sheet i:nth-child(3){width:27px}
.feedback-sheet b{display:block;position:absolute;inset:0;background:linear-gradient(to bottom,transparent 32%,#4ac99f70 50%,transparent 68%);animation:feedback-scan 2.4s ease-in-out infinite}
.feedback-symbol{display:none;font-size:39px;font-weight:900;color:#aa6929}
.feedback-missing .feedback-sheet{display:none}.feedback-missing .feedback-symbol{display:block}
.feedback-content{flex:1;min-width:0}.feedback-eyebrow{margin:0 0 5px;font-size:11px;font-weight:900;letter-spacing:.13em;color:#3d7865}
.feedback-missing .feedback-eyebrow{color:#9c642b}
.plan-feedback h2{font-size:clamp(20px,2.7vw,25px);line-height:1.24;letter-spacing:-.65px;font-weight:880}
.feedback-description{font-size:14px;line-height:1.6;max-width:760px;margin:8px 0 0;color:#58776a}
.feedback-missing .feedback-description{color:#81694f}
.feedback-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px;align-items:center}
.feedback-primary-link,.feedback-secondary-link,.feedback-retry{border-radius:12px;min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:14px;font-weight:850;text-decoration:none;padding:12px 17px;line-height:1.2}
.feedback-primary-link{background:#245f50;color:#fff;box-shadow:0 6px 15px rgba(36,95,80,.17)}
.feedback-primary-link:hover{background:#194b3d;color:#fff;transform:translateY(-1px)}
.feedback-secondary-link{border:1px solid #d8c9b8;color:#745539;background:#fff}
.feedback-secondary-link:hover{background:#fff5e7}
.feedback-retry{background:transparent;color:#446e5a;border:1px solid #bcd6c6}
.feedback-retry:hover{background:#ffffff99}
.feedback-missing .feedback-retry{color:#8c5d31;border-color:#e6cfad}
.grade-missing{margin:18px 0 20px;border:1px solid #eed8b7;background:#fff9ec;border-radius:17px;padding:20px;text-align:center;color:#604b31}
.grade-missing strong{font-size:17px}.grade-missing p{font-size:14px;line-height:1.55;color:#81694f;margin:8px 0 15px}
@keyframes feedback-spin{to{transform:rotate(360deg)}}
@keyframes feedback-scan{0%,100%{transform:translateY(-60%)}50%{transform:translateY(75%)}}
@media(max-width:700px){.plan-feedback{padding:20px;gap:14px;align-items:flex-start}.feedback-illustration{width:60px;height:67px;flex-basis:60px;border-radius:17px}.feedback-sheet{transform:scale(.76) rotate(-6deg)}.feedback-symbol{font-size:30px}.plan-feedback h2{font-size:21px}.feedback-primary-link{width:100%}.feedback-actions{align-items:stretch}.feedback-secondary-link,.feedback-retry{flex:1}}
@media(max-width:440px){.plan-feedback{gap:10px;padding:18px 15px}.feedback-illustration{width:48px;height:54px;flex-basis:48px}.feedback-sheet{transform:scale(.62) rotate(-6deg)}.feedback-symbol{font-size:26px}.feedback-description{font-size:13px}.feedback-eyebrow{font-size:10px}}
@media(prefers-reduced-motion:reduce){.state-ai-processing::before,.feedback-sheet b{animation:none}.feedback-primary-link:hover{transform:none}}

/* v0.10: group-scoped instructions, inviting homework progress, and safe full-page visual toggle */
.group-badge{display:inline-flex;align-items:center;vertical-align:middle;padding:4px 8px;margin:0 8px 6px 0;border-radius:9px;letter-spacing:.02em;font-size:11px;font-weight:900;background:#eef1ff;color:#4b448b;border:1px solid #dcdafa;white-space:nowrap}
.group-red{background:#ffe9e9;border-color:#efb6b9;color:#9c2732}
.group-green{background:#e0f3e9;border-color:#b1ddc5;color:#176543}
.group-blue{background:#e4edff;border-color:#b5cbf3;color:#28589a}
.special-copy h3 .group-badge{margin-right:6px}
.special-expand{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;border:1px solid #bcd3c6;border-radius:11px;padding:9px 13px;background:#fff;color:#28604d;cursor:pointer;font-size:12px;font-weight:800}
.special-expand:hover,.special-expand:focus-visible{background:#e5f5ed}
.special-visual{max-width:100%}
.homework-progress{border:1px solid #d6e9d5;background:linear-gradient(105deg,#f0fae9,#fffaf0);border-radius:18px;margin:0 0 19px;padding:17px 20px}
.homework-progress-top{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#2c6552;font-size:15px;font-weight:900}
#homework-progress-stars{color:#bd8c14;font-size:22px;letter-spacing:4px}
.homework-progress-track{height:15px;border-radius:20px;background:#d6e9da;margin:13px 0 8px;overflow:hidden;position:relative}
.homework-progress-fill{height:100%;width:0;background:linear-gradient(90deg,#69b986,#1d8969);border-radius:20px;transition:width .42s ease}
.homework-progress p{color:#587b66;font-size:13px;font-weight:750;margin:0}
.homework-progress.is-complete{background:linear-gradient(100deg,#e2f7d8,#fff4d0);border-color:#9bce99}
.homework-progress.is-complete #homework-progress-stars{animation:homework-win .6s ease}
@keyframes homework-win{50%{transform:scale(1.14) rotate(-5deg)}}
@media(prefers-reduced-motion:reduce){.homework-progress-fill{transition:none}.homework-progress.is-complete #homework-progress-stars{animation:none}}
@media(max-width:550px){.homework-progress{padding:15px 13px}.homework-progress-top{font-size:13px}#homework-progress-stars{font-size:19px}}

/* v0.11: actual elapsed time + honest indeterminate AI activity */
.analysis-progress{margin-top:15px;max-width:620px}
.analysis-progress-top{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;font-weight:800;color:#275748;margin-bottom:8px}
.analysis-progress-top span{font-variant-numeric:tabular-nums;color:#587b6e}
.analysis-track{height:12px;border-radius:999px;background:#b8d5c3;position:relative;overflow:hidden}
.analysis-bar{position:absolute;top:0;bottom:0;width:38%;left:-38%;background:linear-gradient(90deg,#2b8867,#60d4a1,#2b8867);border-radius:999px;animation:analysis-run 2.5s ease-in-out infinite}
.analysis-progress p{font-size:12px;color:#587769;margin:8px 0 0}
@keyframes analysis-run{0%{transform:translateX(0)}100%{transform:translateX(380%)}}
#plan-body.ai-pending{opacity:.58;filter:grayscale(.32);transition:opacity .35s ease,filter .35s ease}
#plan-body.ai-pending .checkrow{pointer-events:none;cursor:wait}
.homework-due{display:inline-flex;align-items:center;padding:4px 8px;margin:0 7px 6px 0;background:#fff1d6;color:#785219;border-radius:8px;font-size:11px;font-weight:900;white-space:nowrap}
.event-endtime{display:block!important;margin:10px 0 0!important;font-size:12px!important;color:#316b5e!important;border-top:1px dashed #d5e4da;padding-top:7px}
.day-group-summary{padding:13px 17px;margin:-8px 0 18px;border:1.5px solid #b9d8c7;background:#edf8f1;border-radius:13px;font-size:13px;color:#245741;line-height:2}
.day-group-summary strong{margin-right:10px}
.special-crop-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.special-crop-button{border:1px solid #b4d4c3;background:#fff;color:#245b49;font-size:12px;border-radius:9px;padding:9px 13px;font-weight:800;cursor:pointer}
.special-crop-button:hover:not(:disabled){background:#e1f4ea}
.special-crop-button:disabled{opacity:.4;cursor:default}
@media(max-width:440px){.analysis-progress-top{flex-wrap:wrap}.day-group-summary{margin-top:-4px}.special-crop-button{flex:1}}
@media(prefers-reduced-motion:reduce){.analysis-bar{animation:none;left:0;width:100%;background:#358669}}

/* Common activities remain separate from verified subgroup-specific meeting times. */
.day-attendance{margin-top:16px;padding:14px 16px;border-radius:14px;border:1px solid #c6dce1;background:#f0f7fa;display:grid;gap:9px;color:#244b57}
.day-attendance[hidden]{display:none}
.attendance-heading{font-size:12px;font-weight:900;letter-spacing:.015em}
.attendance-entry{display:flex;align-items:center;flex-wrap:wrap;gap:6px 9px;font-size:13px;line-height:1.4}
.attendance-entry strong{font-size:14px;color:#1c4d5b}
.attendance-entry .group-badge{margin:0}
@media(max-width:430px){.day-attendance{padding:11px}.attendance-entry{align-items:flex-start}}

/* Only show completed AI content; estimated progress remains visibly provisional. */
#plan-body[hidden]{display:none!important}
#analysis-progress:not([hidden]){max-width:none;margin-top:24px;padding:20px;border:1px solid #c1dfcf;border-radius:17px;background:rgba(255,255,255,.62)}
.feedback-analyzing{min-height:245px;align-items:center}
.feedback-analyzing .feedback-content{width:100%}
.analysis-progress-top{font-size:15px}
.analysis-progress-top #analysis-percent{font-size:22px;color:#20664d;font-weight:900;font-variant-numeric:tabular-nums}
.analysis-elapsed{margin:5px 0 9px!important;font-weight:700}
.analysis-track{height:17px;background:#c2dfcf}
.analysis-track .analysis-bar{left:0;width:0;transition:width 1s linear;background:linear-gradient(95deg,#1d795a,#58c88e);animation:none}
.columns.bag-empty{grid-template-columns:minmax(0,1fr)}
.columns.bag-empty .bag{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding:15px 19px;margin:0 0 17px;border-radius:17px;background:#f1f7f3}
.columns.bag-empty .bag .panel-head{margin:0;align-items:center;gap:10px}
.columns.bag-empty .bag .panel-head h2{font-size:16px;margin:0}
.columns.bag-empty .bag .panel-head .eyebrow,.columns.bag-empty .bag .section-icon{display:none}
.columns.bag-empty .bag .items{flex:1 1 210px}
.columns.bag-empty .bag .empty{border:0;background:none;padding:0}
.homework-repeat{display:inline-block;padding:4px 8px;background:#e7edf9;border-radius:8px;color:#365d90;font-size:11px;font-weight:850;margin:0 7px 5px 0}
@media(max-width:700px){.feedback-analyzing{min-height:260px}.analysis-progress-top #analysis-percent{font-size:20px}.columns.bag-empty .bag{flex-direction:column;align-items:flex-start;gap:6px}.columns.bag-empty .bag .items{flex:none}}
@media(prefers-reduced-motion:reduce){.analysis-track .analysis-bar{transition:none}}

.feedback-fetching{background:linear-gradient(120deg,#e8f2fc,#eff6fb);border:1.5px solid #c7deeb;color:#28536a;min-height:150px}
.feedback-fetching .feedback-sheet{border-color:#86b8d1;animation:feedback-sheet-float 1.6s ease-in-out infinite}
@keyframes feedback-sheet-float{50%{transform:translateY(-6px) rotate(-5deg)}}
.day-notes{background:#f4f8fd;border:1px solid #dbe9f4;border-radius:15px;margin-top:19px;padding:16px 18px}
.day-notes h3{font-size:15px;color:#365d78;margin:0 0 9px}
.day-notes p{font-size:14px;line-height:1.6;white-space:pre-wrap;margin:8px 0;color:#36556b}
.subjects-panel.compact-empty{padding:13px 19px;margin-bottom:12px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.subjects-panel.compact-empty .panel-head{margin:0;flex:0 0 auto}
.subjects-panel.compact-empty .panel-head h2{font-size:15px}
.subjects-panel.compact-empty .panel-head .eyebrow,.subjects-panel.compact-empty .section-icon{display:none}
.subjects-panel.compact-empty #subjects-list{flex:1}
.subjects-panel.compact-empty .empty{padding:0;border:0;background:transparent}
.details.compact-empty{margin-bottom:9px;box-shadow:none;background:#f8faf8;border-color:#e9eeea}
.details.compact-empty summary{font-size:13px;padding:12px 16px;color:#72887a}
.details.compact-empty summary .chevron{display:none}
.details.compact-empty .details-content .empty{border:0;background:transparent;padding:4px 0}
.section-empty-hint{font-size:12px;color:#859b90;font-weight:500;margin-left:auto}
@media(prefers-reduced-motion:reduce){.feedback-fetching .feedback-sheet{animation:none}}


/* Mobile-first refinement: one final responsive layer overrides earlier legacy rules.
   Keep desktop hero/weather layout and the existing color language unchanged. */
.mobile-selection-menu,.weather-toggle{display:none}
.mobile-selection-actions{display:grid;gap:4px}
.weather-details{min-width:0}
.hero.is-awaiting .weather{display:none!important}
.hero.is-awaiting .hero-intro{min-height:0}
.hero.is-awaiting .hero-intro::after{display:none}
.hero.is-awaiting .hero-intro h1,.hero.is-awaiting .hero-intro .lead,.hero.is-awaiting .hero-actions{display:none}
.hero.is-awaiting .hero-intro .eyebrow{margin:0}
@media (max-width: 700px){
 .shell{padding:0 14px 42px;max-width:100%;min-width:0}
 .topbar{height:auto;min-height:68px;gap:8px;padding:10px 0;align-items:center}
 .logo{min-width:0;gap:7px}
 .brand-mark{width:34px;height:34px;min-width:34px;font-size:19px;border-radius:10px}
 .logo strong{font-size:19px;letter-spacing:-1px}
 .logo small{display:none}
 .topbar .header-actions{display:flex;gap:7px;flex-wrap:nowrap;align-items:center}
 .header-actions .date-chip,.header-actions #change-school,.header-actions #change-grade{display:none!important}
 .week-badge{font-size:11px;padding:8px 9px;white-space:nowrap;border-radius:10px}
 .mobile-selection-menu:not([hidden]){display:block;position:relative}
 .mobile-selection-menu summary{display:flex;align-items:center;min-height:44px;padding:8px 10px;border-radius:11px;border:1px solid #cddad3;background:#fff;color:#225e52;font-size:12px;font-weight:850;cursor:pointer;white-space:nowrap;list-style:none}
 .mobile-selection-menu summary::-webkit-details-marker{display:none}
 .mobile-selection-menu[open] summary{background:#e8f5ed}
 .mobile-selection-actions{position:absolute;z-index:20;right:0;top:calc(100% + 5px);width:190px;padding:7px;background:#fff;border:1px solid #dbe9df;box-shadow:0 12px 32px #254b3b24;border-radius:13px}
 .mobile-selection-actions button{min-height:44px;padding:9px 12px;text-align:left;border:0;border-radius:8px;background:#fff;color:#235945;font-size:13px;font-weight:750}
 .mobile-selection-actions button:active,.mobile-selection-actions button:hover{background:#e9f6ec}
 .hero{grid-template-columns:minmax(0,1fr);gap:8px;margin:8px 0 12px}
 .hero>.hero-intro{min-height:0;padding:16px 17px;border-radius:17px}
 .hero>.hero-intro::after{font-size:110px;right:-3px;top:-32px}
 .hero h1{font-size:clamp(26px,7vw,31px);letter-spacing:-.9px;margin:0 0 4px}
 .hero .eyebrow{font-size:10px;line-height:1.3;margin-bottom:5px;letter-spacing:.08em;overflow-wrap:anywhere}
 .hero .lead{font-size:13px;line-height:1.4;margin:0}
 .hero-actions{margin-top:9px;gap:7px}
 .hero-actions .small-button,.hero-actions .state-pill{font-size:11px;min-height:38px;padding:7px 10px}
 .hero-actions #school-source{font-size:11px;min-height:30px;display:inline-flex;align-items:center}
 .hero.is-awaiting{margin-bottom:8px}
 .hero.is-awaiting>.hero-intro{padding:12px 15px;background:#f1f5ef;border-radius:13px}
 .weather:not([hidden]){min-height:0;padding:9px 12px;display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 8px;align-items:center;border-radius:13px}
 .weather>.eyebrow{display:none}
 .weather-main{margin:0;gap:6px;white-space:nowrap}
 .weather-icon{font-size:23px}
 .weather-main strong{font-size:17px;letter-spacing:-.5px}
 .weather-toggle{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-height:44px;width:100%;padding:4px 6px;border:0;background:transparent;text-align:right;color:#3f6e5e;font-size:12px;font-weight:800}
 .weather-toggle span{font-size:19px;transition:transform .2s}
 .weather.is-expanded .weather-toggle span{transform:rotate(180deg)}
 .weather-details{display:none;grid-column:1/-1;border-top:1px solid #e8eee8;padding:9px 0 4px}
 .weather.is-expanded .weather-details{display:block}
 .weather-desc{font-size:13px;margin:0;line-height:1.4}
 .weather-details .source-note{font-size:11px;margin:7px 0 0}
 .weekdays{margin:0 0 12px;border-radius:13px;padding:4px;gap:3px}
 .day{min-height:54px;padding:6px 1px;border-radius:9px;gap:2px}
 .day span{font-size:12px;line-height:1.2}
 .day strong{font-size:11px;line-height:1.2}
 .day.past:not(.active){opacity:.72}
 .columns{grid-template-columns:minmax(0,1fr);gap:0}
 .panel{padding:16px;margin-bottom:12px;border-radius:16px}
 .panel-head{margin-bottom:13px}
 .panel-head h2{font-size:19px;letter-spacing:-.5px}
 .panel-head .eyebrow{font-size:10px;letter-spacing:.10em}
 .section-icon{height:37px;width:37px;min-width:37px;border-radius:11px;font-size:19px}
 .event{grid-template-columns:38px minmax(0,1fr);gap:10px;padding:9px 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
 .event+.event{padding-top:12px}
 .event-dot{width:38px;height:38px;border-radius:11px}
 .event-dot::after{font-size:19px}
 .checkrow,.bag .checkrow{min-height:52px;padding:11px 12px;font-size:14px;line-height:1.5}
 .checkrow input,.mission-check input{min-width:22px;width:22px;height:22px;margin-top:1px}
 .homework{padding:15px}
 .homework .items{grid-template-columns:minmax(0,1fr);gap:8px}
 .homework-progress{padding:12px 13px;margin-bottom:12px;border-radius:13px}
 .homework-progress-top{font-size:13px}
 .details{border-radius:14px}
 .details summary{min-height:48px;padding:12px 14px;font-size:14px}
 .special-items{grid-template-columns:minmax(0,1fr);gap:12px}
 .special-card{padding:13px;border-radius:14px}
 .special-copy h3{font-size:17px}
 .special-visual{padding:7px}
 .special-visual canvas{max-width:100%;height:auto}
 .special-crop-button,.special-expand{min-height:44px}
 .plan-feedback{padding:17px 15px;gap:10px;margin-bottom:14px;border-radius:16px}
 .feedback-analyzing{min-height:0}
 .plan-feedback h2{font-size:20px}
 .feedback-description{font-size:13px;line-height:1.5}
 #analysis-progress:not([hidden]){margin-top:15px;padding:12px;border-radius:12px}
 .feedback-actions{margin-top:12px}
 .feedback-primary-link,.feedback-secondary-link,.feedback-retry{min-height:44px;font-size:13px;padding:10px 13px}
 .subjects-panel.compact-empty{padding:10px 13px;gap:8px}
 .subjects-panel.compact-empty .panel-head h2{font-size:14px}
 .details.compact-empty summary{padding:10px 13px}
 .day-notes{padding:12px}
 .disclaimer{margin:16px 0 22px}
}
@media(max-width:360px){
 .shell{padding-left:10px;padding-right:10px}
 .logo strong{font-size:18px}
 .week-badge{font-size:10px;padding:7px}
 .mobile-selection-menu summary{font-size:11px;padding:7px}
 .day span{font-size:11px}
 .day strong{font-size:10px}
 .hero-actions{gap:5px}
 .panel{padding:13px}
}
@media(prefers-reduced-motion:reduce){
 .weather-toggle span{transition:none}
}

/* Verified school-group badge palette: background follows the named colour. */
.group-badge.group-yellow{background:#fff3b0;border-color:#e3c663;color:#654a03}
.group-badge.group-orange{background:#ffdfc1;border-color:#edb57c;color:#86400b}
.group-badge.group-purple{background:#efe1ff;border-color:#cdb5e9;color:#663d90}
.group-badge.group-pink{background:#ffe0ef;border-color:#e7a9c7;color:#8a2c5b}
.group-badge.group-turquoise{background:#d9f4f2;border-color:#a0d9d2;color:#145f5e}
.group-badge.group-brown{background:#eaddcf;border-color:#c6ac91;color:#644026}
.group-badge.group-gray{background:#ecedf1;border-color:#c6cad2;color:#39404d}
.group-badge.group-white{background:#fff;border-color:#b8c3c0;color:#3d514a}
.group-badge.group-black{background:#30363b;border-color:#1c2226;color:#fff}
.group-badge.group-class{background:#eef1ff;border-color:#dcdafa;color:#4b448b}
/* Simultaneous lessons share one timestamp but retain distinct descriptions. */
.event-content{display:block;min-width:0;overflow-wrap:anywhere}
.event-time{display:block!important;font-size:13px!important;font-weight:900!important;margin:0 0 6px!important;color:#275b4e!important}
.event-subitem{display:block;line-height:1.5;min-width:0}
.event-subitem+.event-subitem{border-top:1px dashed #e5eae6;margin-top:8px;padding-top:8px}
.event-subitem .group-badge{margin-bottom:3px}
/* Vaccination information must be visible within daily practical notes. */
.day-notes p.day-note-critical{padding:15px 16px;border-radius:12px;border:2px solid #d7a33f;background:#fff6dd;color:#664614;font-weight:750;margin:12px 0}
.day-note-critical strong{display:block;color:#71450a;font-size:15px;font-weight:900;margin-bottom:6px}
.day-note-critical .group-badge{margin:2px 5px 5px 0}
.footer-meta{display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}
.footer-meta a{font-weight:750;overflow-wrap:anywhere}
@media(max-width:700px){.event-subitem+.event-subitem{margin-top:7px;padding-top:7px}.day-notes p.day-note-critical{padding:12px}.footer-meta{display:flex;margin-top:7px}}

/* Homework tutor */
.homework-assist-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-bottom:1px solid #e8ece9;padding:6px 0}
.homework-assist-row .checkrow{flex:1;min-width:210px}
.helper-open{border:1px solid #bed7ce;background:#edf8f3;border-radius:12px;padding:9px 13px;font-weight:750;cursor:pointer;color:#174c40}
.helper-overlay:not([hidden]){position:fixed;z-index:1000;inset:0;background:rgba(15,31,27,.62);display:grid;place-items:center;padding:16px}
.helper-dialog{position:relative;width:min(100%,610px);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:25px;box-shadow:0 16px 50px #12251b55}
.helper-close{position:absolute;right:16px;top:14px;border:0;background:transparent;font-size:22px;cursor:pointer}
.helper-task{padding:12px 15px;background:#f3f7f5;border-radius:12px;overflow-wrap:anywhere}
.helper-actions{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}
.helper-actions button{background:#eaf4ed;border:1px solid #a8cdb9;border-radius:12px;padding:10px;cursor:pointer;font-weight:700}
.helper-actions button:disabled{opacity:.5;cursor:wait}
.helper-result{white-space:pre-wrap;line-height:1.65;overflow-wrap:anywhere}
.helper-small{font-size:12px;color:#53665d;margin-top:18px}
@media(max-width:600px){.helper-dialog{padding:20px}.helper-open{width:100%}}
\n.smart-week-row{display:flex;gap:12px;align-items:center;justify-content:space-between;margin:8px 0}.smart-week-row button,.quiz-header button,#word-quiz-next,#word-quiz-form button{border:1px solid #aacac1;border-radius:10px;background:#e9f5f0;padding:9px 12px;cursor:pointer;font-weight:750}#word-quiz{margin-top:16px;padding:16px;background:#f3f8f4;border-radius:15px}.quiz-header{display:flex;align-items:center;justify-content:space-between;gap:12px}#word-quiz-question{font-size:21px;font-weight:800}#word-quiz-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:9px;margin:10px 0}#word-quiz-options button{border:1px solid #b5d1c2;background:white;padding:12px;border-radius:10px;cursor:pointer}#word-quiz-options button:disabled{opacity:.7}#word-quiz-form input{padding:10px;border:1px solid #a2bbb1;border-radius:8px;max-width:100%}#word-quiz-feedback{font-weight:700}\n

/* Meaning-based English quizzes and real Norwegian spelling practice. */
#word-quiz-description{color:#4b655a;font-size:14px;line-height:1.5;margin:10px 0}
#word-quiz-language{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
#word-quiz-language button{border-radius:20px;border:1px solid #bacdc3;padding:9px 15px;background:#fff;font-weight:750;cursor:pointer}
#word-quiz-language button[aria-pressed="true"]{background:#255e51;color:#fff;border-color:#255e51}
#word-quiz-progress{font-size:13px;color:#536a5f;font-weight:750}
#word-quiz-kind{font-size:13px;font-weight:800;color:#39715d;margin:13px 0 4px}
#word-quiz-question{font-size:19px;line-height:1.5;margin:8px 0 14px}
#word-quiz-form{display:flex;flex-wrap:wrap;align-items:end;gap:12px}
#word-quiz-form label{display:block;font-size:13px;font-weight:750;width:100%;margin-bottom:-5px}
#word-quiz-answer{min-width:180px;flex:1;font-size:17px;padding:12px;border:1px solid #a2bbb1;border-radius:10px}
#word-quiz-form button,.quiz-tools button{border:1px solid #a6c8b7;background:#fff;border-radius:10px;padding:12px 14px;font-weight:750;cursor:pointer}
#word-quiz-form button{background:#205e50;color:white}
#word-quiz-form button:disabled,.quiz-tools button:disabled{opacity:.6;cursor:default}
.quiz-tools{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}
.quiz-preview{border-radius:12px;background:#e2f1e6;padding:16px;text-align:center;font-size:25px;font-weight:900;letter-spacing:1px}
#word-quiz-feedback{min-height:22px;line-height:1.6}
@media(max-width:600px){#word-quiz-form button{width:100%}#word-quiz-answer{min-width:0;width:100%}}

#word-quiz [hidden]{display:none!important}

#vocabulary-list[hidden]{display:none!important}

/* Second English stage: select a Norwegian translation from known PDF meanings. */
.quiz-meaning-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;margin:14px 0}
.quiz-meaning-options button{padding:13px 14px;border-radius:12px;border:1px solid #bad2c6;background:#fff;color:#1d4e42;font-weight:750;cursor:pointer;text-align:center;min-height:48px}
.quiz-meaning-options button:hover:not(:disabled),.quiz-meaning-options button:focus-visible{background:#e6f4ed;border-color:#477967}
.quiz-meaning-options button:disabled{opacity:.65;cursor:default}
#word-quiz-options[hidden]{display:none!important}
