@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --surface: #f1f2eb;
  --card: #fcfdf8;
  --rail: #152a21;
  --rail-text: #edf3e9;
  --rail-muted: #c4d2c5;
  --rail-selected: #294537;
  --ink: #192820;
  --muted: #4b5c51;
  --subtle: #5d6a61;
  --line: #d3dcd0;
  --green: #254b39;
  --green-soft: #e9f0e3;
  --sage: #bfdba9;
  --violet: #59446e;
  --violet-soft: #efebf5;
  --ring: #54724a;
  --radius: 20px;
  --focus: #3d724e;
  --shadow: 0 1px 2px rgb(30 48 37 / 4%);
  --space: clamp(1.25rem, 3vw, 2.6rem);
  --display: Georgia, "Times New Roman", serif;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  background: var(--surface);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 290px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
a { color: var(--green); }
img, svg { display: block; }
svg { flex-shrink: 0; width: 1.25rem; height: 1.25rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.15rem 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { letter-spacing: -0.055em; font-weight: 760; }
h2, h3 { letter-spacing: -0.032em; font-weight: 740; }
p:last-child { margin-bottom: 0; }

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  padding: 26px 17px 17px;
  background: var(--rail);
  color: var(--rail-text);
  border-right: 1px solid #263f33;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  margin: 0 8px 42px;
  color: var(--ink);
  font-size: 1.23rem;
  font-weight: 800;
  letter-spacing: -0.053em;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
}

.brand small { display: block; color: var(--muted); font-size: 0.75rem; letter-spacing: 0; font-weight: 550; }
.sidebar .brand { color: var(--rail-text); }
.sidebar .brand img { border: 1px solid #526b5a; }

.workspace-label,
.eyebrow {
  color: var(--green);
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 780;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}

.workspace-label { margin: 0 12px 10px; color: var(--rail-muted); }
.nav-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }

.nav-link {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 45px;
  padding: 10px 12px;
  background: transparent;
  color: #4a594f;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 650;
}

.nav-link svg { width: 1.16rem; height: 1.16rem; }
.nav-link:hover { color: var(--ink); background: #eef1e9; }
.nav-link[aria-current="page"] {
  background: #e5efde;
  border-color: #dce8d5;
  color: #234333;
  font-weight: 770;
}

.sidebar .nav-link,
.mobile-nav .nav-link { color: var(--rail-muted); }
.sidebar .nav-link:hover,
.mobile-nav .nav-link:hover { background: #203b2e; color: var(--rail-text); }
.sidebar .nav-link[aria-current="page"],
.mobile-nav .nav-link[aria-current="page"] {
  color: #dbedcf;
  background: var(--rail-selected);
  border-color: #466550;
}
.sidebar :focus-visible,
.mobile-nav :focus-visible { outline-color: var(--sage); }

.sidebar-bottom { display: grid; gap: 12px; margin-top: auto; padding-top: 32px; }

.cycle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 13px 13px 14px;
  color: var(--rail-text);
  background: #1e392c;
  border: 1px solid #3e5448;
  border-radius: 12px;
  text-align: left;
}

.cycle-card p, .cycle-card small { display: block; margin: 0; color: var(--rail-muted); font-size: 0.76rem; }
.cycle-card strong { display: block; font-size: 0.98rem; }
.cycle-card svg { width: 1rem; height: 1rem; }
.cycle-icon { display: grid; place-items: center; width: 31px; height: 31px; color: #dbe8d6; background: #385143; border-radius: 8px; }
button.cycle-card:hover { background: #2a4435; }

.main-shell { min-width: 0; }
.topbar {
  position: sticky;
  z-index: 6;
  top: 0;
  background: #f8f9f4;
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1470px;
  min-height: 66px;
  margin-inline: auto;
  padding: 8px var(--space);
}

.breadcrumbs,
.topbar-actions,
.heading-actions,
.mobile-brand { display: flex; align-items: center; gap: 9px; }

.breadcrumbs { gap: 8px; min-width: 0; color: var(--subtle); font-size: 0.88rem; }
.breadcrumbs svg { width: 13px; height: 13px; }
.breadcrumbs strong,
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 730; }
.topbar-actions { flex: 0 0 auto; }

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #e1e8dd;
  border-radius: 20px;
  background: #f2f6ee;
  color: #456050;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.local-badge i { width: 6px; height: 6px; border-radius: 50%; background: #537455; }

.topbar .profile-button {
  display: inline-grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  color: #4f3c64;
  background: var(--violet-soft);
  border: 1px solid #e6ddeb;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 780;
  text-decoration: none;
}

.topbar .profile-button:hover { background: #e9e1f0; border-color: #d8c9e4; }

.topbar .brand, .mobile-brand, .mobile-nav { display: none; }

.content { max-width: 1470px; margin-inline: auto; padding: 34px var(--space) 52px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
}

.page-heading > :first-child { min-width: 0; }
.page-heading .eyebrow { margin-bottom: 7px; }
.page-heading h1 { margin: 0 0 7px; font-family: var(--display); font-size: clamp(2.25rem, 4.6vw, 3.7rem); font-weight: 700; overflow-wrap: anywhere; }
.page-description { max-width: 65ch; margin-bottom: 0; color: var(--muted); font-size: 1rem; }
.heading-actions { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.overview-grid,
.stats-grid,
.dashboard-grid,
.school-grid,
.resource-grid {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.overview-grid { grid-template-columns: minmax(0, 1.8fr) minmax(265px, 1fr); }
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); margin-top: 16px; align-items: start; }
.school-grid, .resource-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr)); }

.card {
  min-width: 0;
  padding: 19px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  margin: 0 0 13px;
}

.card-heading h2 { margin: 0; font-size: 1.13rem; }
.card > h2, .card > h3 { margin-bottom: 6px; }
.card > p { color: var(--muted); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 240px;
  overflow: hidden;
  padding: clamp(1.45rem, 3.35vw, 2.1rem);
  color: #f6f9ed;
  background-color: #10281e;
  background-image:
    linear-gradient(90deg, #10281e 1%, rgb(16 40 30 / 97%) 26%, rgb(16 40 30 / 50%) 59%, transparent 83%),
    url("assets/route-landscape.jpg");
  background-size: 100% 100%, auto 116%;
  background-repeat: no-repeat;
  background-position: center, right 36%;
  border: 1px solid #142c20;
  border-radius: var(--radius);
}

.hero-art { display: none; }
.hero-copy { position: relative; z-index: 1; max-width: min(75%, 34rem); }
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #d9ee9c;
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.115em;
  text-transform: uppercase;
}
.hero-kicker svg { width: 0.96rem; height: 0.96rem; }
.hero h2 { max-width: 20ch; margin: 0 0 9px; font-family: var(--display); font-size: clamp(1.75rem, 3.35vw, 2.65rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.043em; }
.hero p { max-width: 32ch; margin-bottom: 17px; color: #d6dfd4; line-height: 1.4; }
.hero .button.primary {
  background: var(--sage);
  border-color: transparent;
  color: #172e1e;
}
.hero .button.primary:hover { background: #d9eacb; border-color: #d9eacb; color: #172e1e; }
.hero .button:focus-visible { outline-color: var(--sage); }

.progress-card { padding: 17px 19px; }
.progress-overview { display: flex; align-items: center; gap: 13px; margin: 12px 0; }
.progress-ring {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  justify-items: center;
  flex: 0 0 85px;
  width: 85px;
  height: 85px;
  margin: 0;
  border-radius: 50%;
  background: conic-gradient(var(--ring) var(--progress, 0%), #e8ede3 0);
}

.progress-ring::before {
  position: absolute;
  z-index: -1;
  inset: 7px;
  background: var(--card);
  border-radius: inherit;
  content: "";
}

.progress-value { display: block; color: var(--ink); font-size: 1.6rem; font-weight: 800; line-height: 1.05; letter-spacing: -0.06em; }
.progress-caption { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.25; }
.progress-caption strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 1.12rem; letter-spacing: -0.025em; }
.phase-list { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.phase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  min-width: 0;
  padding: 5px 0 4px;
  border-top: 1px solid #edf0e9;
  color: #465448;
  font-size: 0.84rem;
}
.phase-row > :last-child { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.phase-row svg { width: 14px; height: 14px; }
.phase-row strong { color: var(--ink); }

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 87px;
  padding: 13px 15px;
}
a.stat-card { color: var(--ink); text-decoration: none; }
a.stat-card:hover { border-color: #a1b6a1; }
a.stat-card > svg:last-child { width: 17px; height: 17px; margin-left: auto; color: #6b786d; }
.experience-stats { margin: 0 0 16px; }
.stat-icon,
.list-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #36533c;
  background: var(--green-soft);
  border-radius: 10px;
}
.stat-icon svg, .list-icon svg { width: 19px; height: 19px; }
.lavender { background: var(--violet-soft); color: var(--violet); }
.peach { background: #f6eee0; color: #76502b; }
.stat-value { display: block; color: var(--ink); font-size: 1.45rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1.06; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.84rem; line-height: 1.25; }

.panel { padding: 17px 19px; }
.panel .card-heading { flex-wrap: wrap; margin-bottom: 9px; }
.stack { display: grid; gap: 14px; }
.list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }

.list-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 57px;
  padding: 9px 0;
  border-top: 1px solid #e8ede3;
}
.list-row:first-child { border-top: 0; }
button.list-row { width: 100%; background: transparent; border-right: 0; border-bottom: 0; border-left: 0; color: var(--ink); text-align: left; }
button.list-row:hover { background: #f5f7f1; }
button.list-row > svg:last-child { width: 16px; height: 16px; color: #637368; }
.list-row .list-icon { width: 34px; height: 34px; border-radius: 8px; }
.list-row .list-icon svg { width: 16px; height: 16px; }
.list-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list-body h3, .list-body p, .list-body strong { margin: 0; }
.list-body h3, .list-body strong { color: var(--ink); font-size: 0.92rem; font-weight: 740; }
.list-body p, .list-body > span, .list-meta { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.42; }
.list-body strong { display: block; line-height: 1.35; }
.list-meta { flex: 0 0 auto; text-align: right; }
.list-row > :last-child.list-meta { max-width: 42%; overflow-wrap: anywhere; }

.badge, .chip {
  display: inline-flex;
  align-items: center;
  align-self: start;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 8px;
  color: #335341;
  background: #ebf1e6;
  border: 1px solid #e4ecdf;
  border-radius: 100px;
  font-size: 0.75rem;
  line-height: 1.25;
  font-weight: 730;
}

.badge svg, .chip svg { width: 13px; height: 13px; }
.badge.overdue { background: #f9eae4; border-color: #f1dfd8; color: #943934; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid #d6dfd2;
  border-radius: 9px;
  font-size: 0.89rem;
  line-height: 1.2;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition: background-color 140ms, border-color 140ms, color 140ms;
}

.button svg { width: 1rem; height: 1rem; }
.button:hover { background: #edf2e8; border-color: #b7c8b4; }
.button.primary { background: #214732; border-color: #214732; color: white; }
.button.primary:hover { background: #183625; border-color: #183625; }
.button.secondary { color: #274737; }
.button.quiet { background: transparent; border-color: transparent; color: var(--green); }
.button.quiet:hover { background: var(--green-soft); }
.button.danger { color: #96372f; background: #fff8f4; border-color: #efd9d2; }
.button.danger:hover { background: #fae8e2; border-color: #e6b7ad; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--card);
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 9px;
}
.icon-button:hover { background: var(--green-soft); }
.icon-button svg { width: 18px; height: 18px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--green);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: #a2b4a4;
  text-underline-offset: 0.2em;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link svg { width: 14px; height: 14px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.school-filters { display: flex; gap: 8px; flex: 0 1 365px; }
.school-filters .search-field { position: relative; flex: 1; }
.school-filters .search-field > svg { position: absolute; z-index: 1; top: 50%; left: 11px; width: 17px; height: 17px; color: #5a6b5e; transform: translateY(-50%); pointer-events: none; }
.school-filters .search-field > input { padding-left: 34px; }
.school-filters select { min-width: 117px; }

.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tabs button {
  min-height: 38px;
  padding: 7px 12px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
}
.tabs button:hover { background: #ebf0e6; }
.tabs button[aria-pressed="true"] {
  background: #e3eddb;
  color: #274535;
  border-color: #cddfc7;
}

.tabs button span { margin-left: 3px; padding: 1px 6px; background: #f4f7ef; border-radius: 20px; color: #425a49; font-size: 0.77rem; }

.school-card,
.resource-grid > .card,
.resource-card { display: flex; flex-direction: column; gap: 9px; }
.school-card h2, .resource-card h2,
.school-card h3, .resource-card h3 { margin: 0; font-size: 1.15rem; }
.school-card p, .resource-card p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.school-card .card-heading, .resource-card .card-heading { margin: 0; }
.school-actions, .school-status { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.school-actions { justify-content: space-between; margin-top: auto; padding-top: 6px; }
.school-status .list-meta { display: inline-flex; gap: 4px; align-items: center; }
.school-status .list-meta svg { width: 14px; height: 14px; }
.resource-card > .text-link { margin-top: auto; padding-top: 7px; }

.task-card { padding-block: 14px; }
.task-stage { justify-content: flex-start; }
.task-stage p { margin: 3px 0 0; color: var(--muted); font-size: 0.87rem; line-height: 1.36; }
.task-stage .badge { margin-left: auto; white-space: nowrap; }
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 11px 0;
  border-top: 1px solid #e8ede3;
}
.task-label { display: flex; flex: 1; align-items: center; align-self: stretch; gap: 11px; min-width: 0; cursor: pointer; }
.task-complete .list-body strong { color: var(--muted); }
.task-date { flex-shrink: 0; }
.task-checkbox {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  margin: 0;
  color: #fff;
  background: #fff;
  border: 1px solid #9bad9c;
  border-radius: 5px;
  accent-color: #3f7451;
  cursor: pointer;
}
input.task-checkbox { display: inline-block; }

.empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  align-content: center;
  gap: 10px;
  min-height: 97px;
  padding: 13px;
  background: #f5f7f1;
  border: 1px dashed #d6e0d2;
  border-radius: 13px;
  color: var(--muted);
}
.empty h2,
.empty h3,
.empty p { margin: 0; }
.empty h2, .empty h3 { color: var(--ink); font-size: 1.01rem; }
.empty strong { color: var(--ink); }
.empty p { max-width: 52ch; font-size: 0.91rem; }
.empty .button, .empty .text-link { margin-top: 9px; }

.field { display: grid; gap: 5px; min-width: 0; }
.field > label,
.field > span:first-child,
label.field { font-size: 0.89rem; font-weight: 740; }
.field > small { color: var(--muted); font-size: 0.81rem; font-weight: 450; }

input:not([type="checkbox"], [type="radio"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 8px 11px;
  color: var(--ink);
  background: #fffefa;
  border: 1px solid #cdd9cb;
  border-radius: 8px;
  font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: #667367; opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: #3f7451; }
select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23475a4b' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: right 10px center;
}
textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid > .wide { grid-column: 1 / -1; }
.form-error { margin-top: 8px; color: #943934; font-size: 0.88rem; }
.helper-text { color: var(--muted); font-size: 0.89rem; }
.directory-note { margin: 0 0 13px; }

.modal {
  width: min(100% - 26px, 548px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 75px #172b2450;
}
.modal::backdrop { background: #18292390; }
.modal-content { display: grid; gap: 14px; padding: 21px; }
.modal-content .card-heading { margin-bottom: 0; }
.modal-content .card-heading h2 { font-size: 1.4rem; }
.modal-content h2, .modal-content p { margin: 0; }
.modal-content .dialog-intro { margin-bottom: 12px; color: var(--muted); }
.modal-content .dialog-intro strong { color: var(--ink); }
.modal-content .form-grid + .helper-text { margin-top: 7px; }
.modal-content .form-error:not([hidden]) { margin-block: 8px 0; }
.backup-section { display: grid; gap: 6px; margin-top: 15px; padding: 11px 0; border-block: 1px solid var(--line); }
.backup-section h3 { margin: 0; font-size: 0.97rem; }
.backup-actions, .footer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 13px; }
.modal-footer .danger:first-child { margin-right: auto; }

.toast {
  position: fixed;
  z-index: 12;
  right: 22px;
  bottom: 22px;
  max-width: min(calc(100vw - 44px), 395px);
  padding: 10px 15px;
  border-radius: 10px;
  background: #183728;
  color: #f6faef;
  font-size: 0.92rem;
  font-weight: 680;
  box-shadow: 0 6px 23px #1c352836;
}

.toast:empty { display: none; }
.skip-link { position: fixed; z-index: 20; left: 10px; top: -150px; padding: 7px 10px; background: white; color: var(--ink); }
.skip-link:focus { top: 10px; }

.today-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.89rem;
}
.today-strip p { display: flex; align-items: center; gap: 5px; margin: 0; }
.today-strip svg { width: 1rem; height: 1rem; color: var(--green); }
.today-strip strong { color: var(--ink); }

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 12px;
  margin: 22px 0 10px;
}
.section-heading :is(h2, h3) { margin: 0; font-family: var(--display); font-size: clamp(1.4rem, 2.35vw, 1.8rem); }
.section-heading p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.module-grid,
.lesson-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.module-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 72px;
  padding: 12px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  text-decoration: none;
}
.module-card:hover { border-color: #82a084; background: #f6f9f0; }
.module-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 9px;
}
.module-icon.lavender { background: var(--violet-soft); color: var(--violet); }
.module-icon.peach { background: #f6eee0; color: #76502b; }
.module-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.module-copy :is(strong, h2, h3) { color: var(--ink); font-size: 0.98rem; font-weight: 760; line-height: 1.24; }
.module-copy :is(span, p) { color: var(--muted); font-size: 0.83rem; line-height: 1.32; }
.module-copy :is(h2, h3, p) { margin: 0; }

.lesson-feature {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 14px;
  padding: 16px 18px;
  color: var(--ink);
  background: #e7efe0;
  border: 1px solid #cbdcca;
  border-radius: 15px;
}
.lesson-feature > div { flex: 1 1 15rem; min-width: 0; }
.lesson-feature :is(h2, h3) { margin: 0 0 4px; font-size: 1.27rem; }
.lesson-feature p { margin: 0; color: var(--muted); }
.youtube-feature { margin-bottom: 14px; }
.lesson-feature .eyebrow { margin-bottom: 4px; color: var(--green); }

.lesson-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
}
.lesson-card :is(h2, h3) { margin: 0; font-size: 1.12rem; }
.lesson-card p { margin: 0; color: var(--muted); line-height: 1.44; }
.lesson-card .card-heading { align-items: flex-start; margin: 0; }
.lesson-card > .button { align-self: start; margin-top: auto; }
.lesson-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lesson-tags :is(.badge, .chip) { white-space: normal; }
.lesson-progress { margin: 0; color: var(--muted); font-size: 0.87rem; font-weight: 650; }
.toolbar:has(.lesson-progress) { align-items: center; }
.lesson-progress strong { color: var(--green); font-weight: 780; }
.lesson-detail { display: grid; gap: 13px; max-width: 805px; }
.lesson-detail :is(h2, h3) { margin-bottom: 6px; }
.lesson-detail :is(p, ul, ol) { max-width: 68ch; }
.lesson-step {
  min-width: 0;
  padding: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
}
.lesson-step h2 { font-size: 1.25rem; }
.lesson-step p { color: var(--muted); }
.lesson-step :is(ul, ol) { margin: 8px 0 0; padding-left: 1.35em; }
.lesson-step li + li { margin-top: 0.6em; }
.lesson-step li p { margin: 2px 0 0; }
.lesson-video .card-heading { justify-content: flex-start; margin-bottom: 8px; }
.lesson-video .card-heading h2 { margin: 0; }
.lesson-video p { margin-bottom: 12px; }
.lesson-actions, .lesson-nav, .account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lesson-actions { margin-top: 11px; }
.lesson-nav { justify-content: space-between; margin-bottom: 12px; }
.lesson-nav .text-link { min-height: 28px; }

.account-banner,
.sync-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 14px;
  padding: 12px 15px;
  background: #e9efe3;
  border: 1px solid #d0ddcb;
  border-radius: 13px;
}
.account-banner > div:first-child { flex: 1 1 15rem; min-width: 0; }
.account-banner :is(h2, h3, p), .sync-error p { margin: 0; overflow-wrap: anywhere; }
.account-banner :is(h2, h3) { margin-bottom: 3px; font-size: 1.01rem; }
.account-banner p, .sync-error { font-size: 0.89rem; }
.account-banner p { color: var(--muted); }
.account-status { color: var(--green); font-weight: 700; }
.sync-error { color: #802d27; background: #faeee9; border-color: #ebcfc6; }
.local-badge:is([data-status="conflict"], [data-status="expired"], [data-status="error"], [data-status="limit"]) {
  color: #7c3c20;
  background: #fff3dd;
  border-color: #eed8b0;
}
.app-shell:has(.account-gate) { display: block; }
.account-gate {
  display: grid;
  align-items: start;
  justify-items: start;
  gap: 14px;
  width: min(100%, 610px);
  margin: clamp(18px, 10vh, 95px) auto 0;
  padding: clamp(21px, 6vw, 47px);
  color: var(--rail-text);
  background:
    linear-gradient(115deg, #162e23 24%, rgb(22 46 35 / 90%) 51%, rgb(22 46 35 / 55%)),
    url("assets/route-landscape.jpg") center / cover;
  border-color: #334b3b;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px #1c35281c;
}
.account-gate > .brand { margin: 0 0 8px; color: var(--rail-text); }
.account-gate > .brand img { border: 1px solid #5b7760; }
.account-gate h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 7.5vw, 3.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.account-gate p { max-width: 42ch; color: #dbe8d9; font-size: 1rem; }
.account-gate .button.primary { min-height: 46px; color: #172e1e; background: var(--sage); border-color: var(--sage); }
.account-gate .button.primary:hover { background: #d9eacb; border-color: #d9eacb; }
.account-gate :focus-visible { outline-color: var(--sage); }
.profile-gate {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}
.profile-gate > .brand { color: var(--ink); }
.profile-gate h1 { font-size: clamp(1.75rem, 6.5vw, 2.5rem); }
.profile-gate p { color: var(--muted); }
.profile-gate .form-error { color: #943934; }
.profile-gate :focus-visible { outline-color: var(--green); }
.profile-form { display: grid; gap: 14px; width: 100%; }
.profile-fields { display: grid; gap: 13px; }
.profile-fields :is(input, select):not([type="checkbox"]) { min-height: 44px; }
.profile-fields input:disabled { color: var(--muted); background: #ecf0e8; }
.profile-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.89rem;
}
.profile-check input { flex: none; width: 17px; height: 17px; margin: 0; }
.school-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.school-details h3 { margin: 0; font-size: 0.97rem; }
.school-details p { overflow-wrap: anywhere; }
.more-sheet { display: grid; gap: 11px; max-width: 840px; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 199px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .brand { margin-left: 4px; }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 171px minmax(0, 1fr); }
  .topbar-inner, .content { --space: 1.1rem; }
  .sidebar { padding-inline: 10px; }
  .brand { gap: 8px; font-size: 1.12rem; }
  .brand img { width: 34px; height: 34px; flex-basis: 34px; }
  .nav-link { padding-inline: 9px; }
  .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); }
  .hero { padding: 18px; }
  .hero-copy { max-width: 89%; }
  .hero p { max-width: 30ch; }
  .stat-card { padding-inline: 10px; gap: 7px; }
}

@media (max-width: 710px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar-inner {
    min-height: 56px;
    gap: 8px;
    padding-left: max(var(--space), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space), env(safe-area-inset-right, 0px));
  }
  .topbar {
    padding-top: env(safe-area-inset-top, 0px);
    color: var(--rail-text);
    background: var(--rail);
    border-bottom-color: #31483a;
  }
  .topbar .brand, .mobile-brand { display: flex; min-width: 0; margin: 0; color: var(--rail-text); }
  .topbar .brand img { border: 1px solid #4c6855; }
  .topbar .brand span { line-height: 1.1; }
  .topbar:has(.mobile-brand) .breadcrumbs, .topbar:has(.brand) .breadcrumbs { display: none; }
  .topbar-actions { gap: 7px; }
  .topbar-actions .button { min-height: 44px; }
  .topbar .profile-button {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    color: var(--rail-text);
    background: #2b4536;
    border-color: #54715b;
  }
  .topbar .profile-button:hover { background: #385844; border-color: #75927c; }
  .topbar .local-badge { color: #e0edda; background: #294437; border-color: #415c4a; }
  .topbar .local-badge i { background: var(--sage); }
  .topbar .local-badge:is([data-status="conflict"], [data-status="expired"], [data-status="error"], [data-status="limit"]) {
    color: #f5e5c5;
    background: #644528;
    border-color: #a17b4c;
  }
  .topbar :focus-visible { outline-color: var(--sage); }
  .content {
    padding-top: 18px;
    padding-left: max(var(--space), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space), env(safe-area-inset-right, 0px));
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .page-heading { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 16px; }
  .page-heading h1 { font-size: clamp(2.1rem, 8.5vw, 2.75rem); }
  .page-description { line-height: 1.37; }
  .page-heading > .heading-actions { justify-content: flex-start; }
  .school-filters { flex: 1 0 100%; }
  .task-date { min-height: 44px; }

  .mobile-nav {
    position: fixed;
    z-index: 9;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 3px;
    padding: 4px max(6px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: var(--rail);
    border-top: 1px solid #344b3e;
    box-shadow: 0 -3px 16px #14291f16;
  }

  .mobile-nav > .nav-link {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 4px 2px 3px;
    text-align: center;
    white-space: nowrap;
    font-size: 0.73rem;
    line-height: 1.05;
  }
  .mobile-nav svg { width: 19px; height: 19px; }

  .toast { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  .heading-actions .button, .hero .button, .modal .button, .school-actions .button,
  .lesson-card .button, .lesson-actions .button, .lesson-feature .button, .lesson-video .button,
  .account-actions .button { min-height: 44px; }
}

@media (max-width: 550px) {
  .overview-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .overview-grid, .dashboard-grid, .stats-grid, .school-grid, .resource-grid { gap: 12px; }
  .stats-grid, .dashboard-grid { margin-top: 12px; }
  .experience-stats { margin-top: 0; margin-bottom: 12px; }
  .hero {
    min-height: 204px;
    padding: 17px 18px;
    background-image:
      linear-gradient(90deg, #10281e 1%, rgb(16 40 30 / 94%) 36%, rgb(16 40 30 / 43%) 86%),
      url("assets/route-landscape.jpg");
    background-position: center, right 33%;
  }
  .hero h2 { font-size: clamp(1.75rem, 7vw, 2.12rem); }
  .hero p { font-size: 0.94rem; }
  .hero-copy { max-width: 95%; }
  .card { border-radius: 16px; }
  .today-progress { display: none; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 5px; min-height: 86px; }
  a.stat-card > svg:last-child { display: none; }
  .stat-icon { width: 34px; height: 34px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-value { font-size: 1.25rem; }
  .stat-label { font-size: 0.78rem; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
  .modal-content { padding: 17px; }
  .task-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 10px; }
  .task-stage .badge { grid-column: 2; justify-self: start; margin-left: 0; }
  .task-row { position: relative; gap: 2px; }
  .task-label { gap: 8px; }
  .task-row .task-date { padding-inline: 7px; font-size: 0.79rem; }
  .local-badge { font-size: 0.69rem; padding: 3px 5px; }
  .today-strip { margin-bottom: 11px; }
  .section-heading { margin-top: 17px; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .module-card { align-items: flex-start; flex-direction: column; gap: 7px; padding: 10px; }
  .module-icon { width: 33px; height: 33px; }
  .module-icon svg { width: 17px; height: 17px; }
  .lesson-grid { grid-template-columns: 1fr; gap: 8px; }
  .lesson-feature { margin-top: 11px; padding: 13px; }
  .lesson-card { gap: 8px; padding: 14px; }
  .lesson-detail { gap: 10px; }
  .lesson-step { padding: 13px; }
  .more-sheet .module-card { align-items: center; flex-direction: row; }
}

@media (max-width: 360px) {
  .mobile-nav > .nav-link { font-size: 0.69rem; letter-spacing: -0.025em; }
  .brand { font-size: 1.06rem; }
  .topbar-inner { gap: 7px; }
  .topbar-actions { gap: 5px; }
  .local-badge { font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
