/* Faris Al Ilm · application experience. Load last in app.html.
   Asset-free RTL skin; state and visibility remain owned by the application. */
:root {
  color-scheme: light;
  --experience-navy: #122e40;
  --experience-teal: #087f8c;
  --experience-teal-dark: #066570;
  --experience-mint: #eaf6f2;
  --experience-paper: #ffffff;
  --experience-line: #d7e5e5;
  --experience-shadow: 0 8px 30px rgb(18 46 64 / 5%);
  --ink: var(--experience-navy);
  --muted: #526a76;
  --green: var(--experience-teal);
  --bg: #f3f8f7;
  --line: var(--experience-line);
  --learning-blue: var(--experience-teal);
  --learning-teal: var(--experience-teal);
  --learning-accent: var(--experience-teal);
  --learning-surface: var(--experience-paper);
  --learning-radius: 22px;
  --learning-shadow: var(--experience-shadow);
}
/* Rebind the extension's local tokens as well as the global palette. */
:is([class^="dossier"], [class*=" dossier"], [class^="targeting"], [class*=" targeting"],
    [class^="staff"], [class*=" staff"], [class^="platform"], [class*=" platform"]) {
  --platform-ink: #122e40;
  --platform-muted: #526a76;
  --platform-line: #d7e5e5;
  --platform-paper: #fff;
  --platform-soft: #eff7f5;
  --platform-accent: #087f8c;
  --platform-selected: #e1f2f0;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-block-start: 24px; }
body {
  margin: 0;
  direction: rtl;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
body > aside {
  position: fixed;
  inset: 0 0 0 auto;
  width: 240px;
  height: 100vh;
  height: 100dvh;
  padding: 30px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fbfdfc;
  border: 0;
  border-inline-end: 1px solid var(--line);
  box-shadow: -6px 0 30px rgb(18 46 64 / 2%);
  backdrop-filter: none;
  z-index: 20;
  scrollbar-width: thin;
  scrollbar-color: #afc9c9 transparent;
}
.brand { color: var(--ink); font-size: 26px; font-weight: 750; letter-spacing: 0; text-decoration: none; line-height: 1.65; }
.brand > span { width: 42px; height: 42px; font-size: 27px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: 0 5px 12px rgb(18 46 64 / 12%); }
.brand small { margin-top: 12px; color: var(--muted); font-size: 10px; letter-spacing: 1.8px; }
.school { margin: 26px 8px 22px; color: var(--muted); }
.school strong { color: var(--ink); font-size: 14px; }
.school p { font-size: 12px; }
body > aside nav { display: grid; gap: 6px; }
body > aside nav button { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 11px 12px; color: #415d6b; background: transparent; border: 1px solid transparent; border-radius: 13px; font-size: 13px; text-align: start; line-height: 1.6; box-shadow: none; }
body > aside nav button.active { background: #e4f2ef; color: #075d68; border-color: #c8e3df; box-shadow: inset -3px 0 var(--experience-teal); font-weight: 700; }
.asidebottom { margin-top: auto; padding: 30px 8px 0; color: var(--muted); font-size: 13px; }
.asidebottom span { margin-top: 12px; font-size: 11px; }
body > main { margin: 0 240px 0 0; max-width: 1760px; min-width: 0; padding: 0 clamp(24px, 3.5vw, 60px); }
main > header { min-height: 76px; height: auto; padding-block: 16px; border-bottom: 1px solid var(--line); color: var(--muted); gap: 14px; flex-wrap: wrap; font-size: 13px; }
main > header > * { min-width: 0; overflow-wrap: anywhere; }
.dot { background: var(--experience-teal); }
.notice { margin: 20px 0; padding: 12px 18px; background: #eaf4f1; color: #365a62; border: 1px solid #d7e9e3; border-radius: 14px; box-shadow: none; font-size: 13px; }
.app-navigation { margin-block: 12px 24px; padding: 8px; border-color: var(--line); background: rgb(255 255 255 / 85%); border-radius: 16px; box-shadow: none; }
.app-navigation button { color: var(--ink); background: transparent; border-color: transparent; }
.app-navigation .signout { color: #a22f40; background: #fff0f2; border-color: #f0d5da; }
#content { min-width: 0; padding-bottom: 20px; }
#content :where(.grid, .columns, .row, .stats, .path-grid, .learning-grid, .platform-grid, .dossier-grid) > * { min-width: 0; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: normal; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 2.7vw, 40px); font-weight: 750; line-height: 1.5; margin: 8px 0 14px; }
h2 { font-size: clamp(21px, 2vw, 25px); line-height: 1.6; }
h3 { font-size: 18px; line-height: 1.65; }
p, li, dd, label { overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.eyebrow { display: inline-block; color: #076773; font-size: 11px; font-weight: 750; letter-spacing: .8px; line-height: 1.9; }
.sectionhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 32px 0 18px; }
.sectionhead h2 { margin-bottom: 5px; }
.sectionhead p { max-width: 68ch; }
.card, .learning-card, .assignment-card, .submission-card, .wizard,
.platform-card, .platform-panel, .dossier-card, .dossier-panel, .dossier-summary,
.targeting-card, .targeting-panel, .staff-card, .staff-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: clamp(20px, 2.2vw, 30px);
  box-shadow: var(--experience-shadow);
}
.grid > .card:nth-child(n) { border: 1px solid var(--line); }
.grid, .learning-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; }
.futuregrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Welcome artwork uses only two monochrome geometric outlines. */
.welcome { position: relative; isolation: isolate; overflow: hidden; padding: clamp(28px, 4vw, 56px); text-align: start; border: 1px solid #d0e6df; border-radius: 28px; background: linear-gradient(145deg, #eff9f5, #dff0ec); }
.welcome::before, .welcome::after { content: ""; position: absolute; pointer-events: none; z-index: -1; border: 1px solid rgb(8 127 140 / 16%); }
.welcome::before { width: 260px; height: 260px; border-width: 40px; border-radius: 50%; inset-inline-end: -100px; inset-block-start: -100px; }
.welcome::after { width: 205px; height: 205px; border-radius: 36px; transform: rotate(32deg); inset-inline-start: -85px; inset-block-end: -115px; background: rgb(255 255 255 / 22%); }
.welcome h1 { margin: 24px 0 18px; color: var(--ink); background: none; -webkit-text-fill-color: currentColor; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.45; letter-spacing: normal; }
.welcome p { max-width: 40ch; margin: 12px 0; color: #385a65; font-size: 16px; }
.welcome .pill { background: #fff; color: #075e68; border-color: #c5dfd9; }
.welcomeicons { justify-content: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.welcomeicons span { background: rgb(255 255 255 / 80%); border: 1px solid #cfe3dd; color: #375c65; padding: 7px 12px; box-shadow: none; border-radius: 12px; font-size: 12px; }
.authcard { width: 100%; max-width: 560px; margin-inline: auto; padding: clamp(24px, 3vw, 38px); border-color: var(--line); box-shadow: 0 14px 40px rgb(18 46 64 / 7%); }
.authcard h2 { font-size: 25px; }
.authcard label:first-child { margin-top: 0; }
.authcard .actions { gap: 10px; }
.authcard .actions > button { flex: 1 1 150px; }
.welcome h1 span { color: var(--experience-teal); -webkit-text-fill-color: currentColor; }
.welcomeicons > span { display: inline-flex; align-items: center; gap: 7px; }
.welcome-statement { margin-block: 32px 24px; padding-block: 20px 0; border-top: 1px solid #bcd9d1; color: #385a65; font-size: 15px; line-height: 2; }
.welcome-statement b { color: var(--ink); font-weight: 700; }
#content .welcome-link { color: #076773; font-size: 14px; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 5px; padding-block: 8px; }
/* Only login opts into this grid. Signup/help keep their normal document flow. */
body.is-guest #content.auth-view { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; gap: clamp(20px, 3vw, 40px); margin-block: 30px; }
body.is-guest #content.auth-view > .welcome { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 510px; }
body.is-guest #content.auth-view > .authcard { align-self: center; margin-block: 0; }
body.is-guest #content.auth-view > :not(.welcome):not(.authcard) { grid-column: 1 / -1; }
#content.is-auth-form { display: block; max-width: 840px; margin-inline: auto; }
body.is-auth-form #content, body.is-auth-form #content.auth-view { display: block; }
/* Student paths and teacher overview share a quiet, high-contrast hero. */
.hero, .experience-hero, #content .platform-hero, #content .dossier-hero {
  position: relative; overflow: hidden; border: 1px solid #193e50;
  border-radius: 26px; padding: clamp(26px, 3.4vw, 44px);
  background: linear-gradient(120deg, #122e40, #194a58);
  color: #fff; box-shadow: 0 12px 28px rgb(18 46 64 / 10%);
  min-height: 0; margin-block: 24px;
}
.experience-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.hero h1, #content :is(.experience-hero, .platform-hero, .dossier-hero) :is(h1, h2, h3) { color: #fff; font-size: clamp(27px, 3vw, 39px); }
.hero p, .hero .eyebrow, #content :is(.experience-hero, .platform-hero, .dossier-hero) :is(p, .muted, .eyebrow) { color: #d4e7e8; max-width: 60ch; }
#content :is(.hero, .experience-hero, .platform-hero, .dossier-hero) .pill { background: #264e5c; border-color: #62858d; color: #f1fbf8; }
#content :is(.hero, .experience-hero, .platform-hero, .dossier-hero) button { background: #e1f5ed; color: #133e49; border-color: #e1f5ed; border-radius: 13px; box-shadow: none; min-height: 48px; }
.sound i { background: #9cd5cf; width: 7px; }
.sound::after { content: ""; }
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-block: 22px; }
#content .path-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: start; min-width: 0; min-height: 240px; padding: 28px; border: 1px solid var(--line); border-radius: 23px; color: var(--ink); background: #fff; box-shadow: var(--experience-shadow); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.path-card h2, .path-card h3 { margin: 0; }
.path-card p { margin: 0; color: var(--muted); font-size: 14px; }
.path-card .actions { margin-top: auto; }
.path-card > button { margin-top: auto; width: 100%; }
.path-icon, .featureicon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: #e5f3f0; color: #086a76; margin: 0 0 8px; font-size: 24px; }
.path-card:nth-child(2) .path-icon { background: #eaf0f5; color: var(--ink); }
.path-card:nth-child(3) .path-icon { background: #f0f5e9; color: #426238; }
.files .featureicon { background: #e5f3f0; color: #086a76; }
.ui-icon { display: inline-block; width: 20px; height: 20px; min-width: 20px; flex: 0 0 20px; vertical-align: -.2em; color: inherit; pointer-events: none; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 24px; }
.stat strong, .stat:nth-child(n) strong, #content .platform-summary-card strong { color: var(--ink); font-size: clamp(28px, 3vw, 36px); font-weight: 750; line-height: 1.5; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.tasknum { color: #536c78; font-size: 12px; }
.tasktitle { color: var(--ink); font-size: 23px; }
.taskdesc { color: var(--muted); font-size: 14px; }
.taskfoot { flex-wrap: wrap; gap: 12px; }
/* ID scope intentionally wins over platform-next.css's nested control rules. */
button, #content button, #content .platform-button {
  min-height: 46px; padding: 11px 18px; border: 1px solid #d1e3e1; border-radius: 12px;
  background: #edf5f3; color: #164957; font: inherit; font-size: 14px; font-weight: 650;
  line-height: 1.65; white-space: normal; max-width: 100%; overflow-wrap: anywhere;
  cursor: pointer; touch-action: manipulation; box-shadow: none;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.primary, #content button.primary, #content .platform-button.primary { background: var(--experience-teal); border-color: var(--experience-teal); color: #fff; box-shadow: 0 4px 10px rgb(8 127 140 / 10%); }
.danger, #content button.danger { color: #a22f40; background: #fff0f2; border-color: #eccbd2; }
.error { color: #a22f40; }
button:disabled, #content button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
button:active:not(:disabled), #content button:active:not(:disabled) { transform: translateY(1px); }
#content :is(button[aria-selected="true"], button[aria-pressed="true"]) { color: #075e68; background: #def0ec; border-color: #78b7b4; }
#content :is(.learning-tabs [aria-selected="true"]) { color: #fff; background: var(--experience-teal); }
#content :is(label, .learning-label) { color: #304f60; font-size: 14px; font-weight: 600; }
input, select, textarea, #content :is(input, select, textarea) { min-width: 0; max-width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #b3c9ce; border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.7; box-shadow: none; }
textarea, #content textarea { min-height: 140px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #617680; opacity: 1; }
input:focus, select:focus, textarea:focus, #content :is(input, select, textarea):focus { border-color: #087f8c; outline: 3px solid rgb(8 127 140 / 15%); outline-offset: 1px; }
#content input:is([type="checkbox"], [type="radio"]) { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; padding: 0; accent-color: #087f8c; }
.check { align-items: flex-start; gap: 10px; }
input::file-selector-button { background: #e5f3f0; color: #075e68; border: 0; border-radius: 8px; padding: 8px 12px; margin-inline-end: 10px; font: inherit; }
.actions { flex-wrap: wrap; gap: 10px; }
.row { gap: 14px; }
.tag, .pill, #content :is(.pill, .tag, .learning-status) { display: inline-block; max-width: 100%; border: 1px solid #d5e6e2; border-radius: 999px; background: #edf6f2; color: #355e64; padding: 4px 11px; font-size: 12px; line-height: 1.8; }
.badge, #unread { background: #ae3247; color: #fff; font-size: 11px; line-height: 1.5; min-width: 22px; font-variant-numeric: tabular-nums; }
#content .learning-status:is([data-status="approved"], [data-status="completed"]) { color: #1e624b; background: #e8f6ee; border-color: #c2e1d1; }
#content .learning-status[data-status="pending"] { color: #765016; background: #fff4df; border-color: #ebd8ae; }
#content .learning-status[data-status="error"] { color: #a22f40; background: #fff0f2; border-color: #eccbd2; }
.hint, .learning-hint, .stage, .inbox-summary { background: #edf6f3; color: #355965; border: 1px solid #d5e7e1; box-shadow: none; border-radius: 16px; }
.english, textarea[lang="en"], .learning-editor { color: #214858; direction: ltr; text-align: left; }
.score, summary, #content :is(a, summary) { color: #076975; }
#content a { text-underline-offset: .25em; }
hr { border-color: var(--line); }
.steps p { border-color: var(--line); }
.steps p::before { background: #e1f1ea; color: #075f69; }
progress, #content progress { width: 100%; height: 9px; accent-color: var(--experience-teal); }
progress::-webkit-progress-bar { background: #e5efec; border-radius: 8px; }
progress::-webkit-progress-value { background: #087f8c; border-radius: 8px; }
progress::-moz-progress-bar { background: #087f8c; border-radius: 8px; }
.futurecard.writing, .futurecard.files { background: #fff; }
.futurecard ol { color: var(--muted); }
.upcoming { min-width: 0; }
.segmented, .learning-tabs, .platform-tabs, .dossier-tabs, .staff-tabs, .targeting-tabs { background: #e8f1ee; border-radius: 14px; max-width: 100%; }
.segmented { width: fit-content; }
#content .segmented button { border-color: transparent; background: transparent; }
#content .segmented button[aria-pressed="true"] { background: #fff; color: #075f69; border-color: #d2e5df; box-shadow: 0 2px 6px rgb(18 46 64 / 5%); }
.password-row { display: flex; align-items: stretch; min-width: 0; gap: 8px; }
#content .password-row > input { flex: 1 1 0; width: 0; min-width: 0; }
#content button.password-toggle { flex: 0 0 auto; min-width: 64px; min-height: 48px; padding: 9px 12px; border-color: #c4dcd8; background: #edf6f2; color: #075f69; font-size: 13px; }
#content button.auth-recovery { display: block; width: fit-content; margin-block: 5px 10px; margin-inline-start: auto; padding: 8px 2px; min-height: 44px; background: transparent; border-color: transparent; color: #076773; font-size: 13px; font-weight: 600; }
#content button.auth-submit { width: 100%; min-height: 50px; margin-top: 2px; font-size: 15px; }
.auth-new { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.auth-new p { color: #526a76; margin: 0 0 10px; font-size: 13px; }
#content .auth-new button { width: 100%; background: #fff; border-color: #b3ceca; color: #075f69; }
#content button.auth-help { display: block; width: 100%; margin-block: 14px 6px; background: transparent; border-color: transparent; color: #526a76; font-size: 13px; }
.authcard > .small { margin-top: 12px; padding-top: 12px; font-size: 12px; line-height: 1.9; }
.experience-hero > div:first-child { flex: 1 1 300px; min-width: 0; }
.journey-ring { display: flex; flex: 0 0 168px; flex-direction: column; align-items: center; justify-content: center; width: 168px; height: 168px; padding: 16px; border: 7px solid #8ccfc5; border-radius: 50%; background: rgb(255 255 255 / 4%); color: #fff; text-align: center; box-shadow: 0 0 0 8px rgb(140 207 197 / 8%); }
.journey-ring strong { direction: ltr; unicode-bidi: isolate; font-size: 38px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.journey-ring small { font-size: 18px; color: #d4e7e8; font-weight: 500; }
.journey-ring > span { color: #d4e7e8; font-size: 12px; }
#content .reflection { margin-top: 28px; padding-inline-start: 28px; background: #eaf6f0; border-color: #cde4d9; border-inline-start: 4px solid #087f8c; box-shadow: none; }
.reflection h3 { margin-block: 8px; }
.reflection p { color: #436471; }
#content .quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #076773; background: transparent; border-color: #c3dcd6; }
.review-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-block: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.review-pagination > span { color: #526a76; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.skip-link { position: fixed; inset-block-start: 10px; inset-inline-start: 12px; z-index: 1000; padding: 12px 20px; border: 1px solid #087f8c; border-radius: 12px; background: #fff; color: #122e40; font-weight: 700; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(calc(-100% - 20px)); box-shadow: 0 5px 20px rgb(18 46 64 / 16%); }
.skip-link:focus { opacity: 1; pointer-events: auto; transform: translateY(0); }
.segmented span { color: #526a76; }
.chatlog { background: #edf4f2; padding: 20px; overscroll-behavior: contain; }
.bubble { border-color: var(--line); background: #fff; }
.bubble.mine { background: #dff1ee; border: 1px solid #c5e3dd; }
.messagefoot, .bubble small { color: #4c6774; }
#replypreview { background: #eaf6f2; border-inline-start: 3px solid #087f8c; border-right: 3px solid #087f8c; }
.avatar, .dossier-avatar, .staff-avatar { background: #e1f2ed; color: #076975; }
video, audio { max-width: 100%; background: #122e40; }
.learning-shell, .learning-shell[data-module="writing"], .learning-writing,
.learning-shell[data-module="files"], .learning-files { --learning-accent: #087f8c; }
.wizard { margin-block: 24px; }
.learning-editor, .wizard textarea, #content :is(.learning-editor, .wizard textarea) { min-height: 240px; line-height: 1.95; }
.stepper > * { background: #edf4f1; color: #526a76; }
.stepper [aria-current="step"], .stepper > .active { background: #dff1eb; color: #075f69; box-shadow: inset 0 -3px #087f8c; }
#content ol.actions[aria-label] { list-style: none; padding: 8px; border: 1px solid var(--line); background: #edf4f1; border-radius: 14px; }
#content ol.actions[aria-label] > li { flex: 1 1 110px; padding: 9px 12px; text-align: center; border-radius: 9px; color: #526a76; font-size: 13px; }
#content ol.actions > [aria-current="step"] { background: #fff; color: #075f69; font-weight: 700; box-shadow: inset 0 -3px #087f8c; }
.learning-feedback { background: #edf8f2; border-color: #c8e1d4; border-inline-start-color: #087f8c; }
.learning-upload { background: #f2f9f5; border-color: #a3c9c2; }
.learning-upload:focus-within { background: #e6f5ee; border-color: #087f8c; }
.learning-file { border-color: var(--line); flex-wrap: wrap; }
.learning-counter { color: var(--muted); }
/* Real dossier currently renders an unclassed root: preserve that markup. */
#content > section:has([data-dossier-back]) { display: grid; gap: 22px; margin-block: 24px; }
#content > section:has([data-dossier-back]) > :is(.sectionhead, .actions, .stats) { margin-block: 0; }
#content > section:has([data-dossier-back]) > article:first-of-type { background: #edf7f3; border-color: #cce4db; }
#content > section:has([data-dossier-back]) section > h2 { margin-top: 10px; }
#content > section:has([data-dossier-back]) :is(ul, ol) { padding-inline-start: 22px; }
.platform-dashboard { gap: 22px; margin-block: 24px; }
.platform-dashboard > .sectionhead { margin-top: 0; }
.platform-dashboard > section { margin-block: 0; }
#content .platform-summary-card { display: grid; gap: 8px; padding: 24px; text-align: start; background: #fff; border-color: var(--line); border-radius: 20px; box-shadow: var(--experience-shadow); }
.platform-summary-card span { font-size: 14px; color: #526a76; }
#content .platform-student-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; text-align: start; width: 100%; padding: 15px 18px; margin-block: 10px; background: #f5faf8; border-color: var(--line); }
.platform-student-row small { color: #526a76; }
.dossier-entry, .dossier-event { border-inline-start-color: #6daea8; }
.platform-empty, .dossier-empty, .targeting-empty, .staff-empty { border-color: #aec9c5; }
/* Wide tables scroll locally; bare tables wrap content rather than widening main. */
:is(.learning-table, .platform-table, .dossier-table, .targeting-table, .staff-table) { max-width: 100%; overflow-x: auto; border-color: var(--line); overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
:is(.learning-table, .platform-table, .dossier-table, .targeting-table, .staff-table) table { table-layout: auto; min-width: 560px; }
th, td, #content :is(th, td) { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: start; overflow-wrap: anywhere; vertical-align: top; }
th, #content th { background: #edf5f2; color: #385c65; font-weight: 700; }
#content td { background: #fff; }
.confirmdialog { color: var(--ink); border: 1px solid #c2d8d7; border-radius: 22px; background: #fff; box-shadow: 0 24px 80px rgb(18 46 64 / 22%); }
.confirmdialog::backdrop { background: rgb(18 46 64 / 48%); backdrop-filter: blur(5px); }
#toast { color: #fff; background: #122e40; border: 1px solid #42616e; border-radius: 14px; box-shadow: 0 10px 30px rgb(18 46 64 / 18%); overflow-wrap: anywhere; }
footer { color: #526a76; font-size: 12px; padding: 32px 0; }
footer a { display: inline-block; padding-block: 8px; color: #076773; text-underline-offset: 4px; }
/* Strong keyboard focus stays visible on both dark and light surfaces. */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible,
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
#content :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #087f8c; outline-offset: 3px; box-shadow: 0 0 0 3px #fff;
}
@media (hover: hover) {
  button:hover:not(:disabled), #content button:hover:not(:disabled) { background: #deeeea; border-color: #a7cfca; filter: none; }
  .primary:hover:not(:disabled), #content button.primary:hover:not(:disabled) { background: #066570; border-color: #066570; color: #fff; }
  #content button.danger:hover:not(:disabled) { background: #f9e1e7; border-color: #e2abb9; }
  body > aside nav button:hover:not(:disabled) { background: #e8f3ee; color: #075f69; }
  #content .path-card:hover { transform: translateY(-3px); border-color: #86bab5; background: #fbfefd; box-shadow: 0 14px 30px rgb(18 46 64 / 9%); }
  #content :is(.hero, .experience-hero, .platform-hero, .dossier-hero) button:hover:not(:disabled) { background: #fff; color: #133e49; }
}
@media (max-width: 1180px) {
  body > main { padding-inline: 26px; }
  .grid, .learning-grid, .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.is-guest #content.auth-view { gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .welcome { padding: 28px; }
  .welcome h1 { font-size: 36px; }
  .welcomeicons span { padding: 6px 9px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  body.is-guest #content.auth-view { grid-template-columns: minmax(0, 1fr); }
  body.is-guest #content.auth-view > .welcome { min-height: 0; }
  body.is-guest #content.auth-view > .authcard { max-width: none; }
  .path-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  html { scroll-padding-block-start: 148px; }
  body > aside {
    position: sticky; inset: 0 auto auto; width: 100%; height: auto; max-height: none;
    overflow: visible; padding: max(10px, env(safe-area-inset-top)) 16px 8px;
    background: rgb(251 253 252 / 96%); border-inline-end: 0; border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 16px rgb(18 46 64 / 4%); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .brand { font-size: 23px; line-height: 1.5; }
  .brand > span { width: 34px; height: 34px; font-size: 23px; border-radius: 10px; }
  .brand small, .school, .asidebottom { display: none; }
  body > aside nav { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 9px; padding: 4px 3px 6px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #adc9c4 transparent; }
  body > aside nav button { flex: 0 0 auto; white-space: nowrap; min-height: 46px; padding: 10px 13px; font-size: 13px; gap: 8px; scroll-snap-align: start; }
  body > main { margin: 0; max-width: none; padding-inline: 18px; }
  main > header { min-height: 58px; padding-block: 12px; font-size: 12px; }
  .notice { margin-block: 16px; padding: 12px 14px; font-size: 12px; }
  .app-navigation { padding: 7px; gap: 6px; margin-bottom: 20px; }
  .app-navigation button { padding-inline: 12px; font-size: 13px; }
  .app-navigation .signout { margin-inline-start: auto; }
  body.is-guest #content.auth-view { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-block: 20px; }
  body.is-guest #content.auth-view > .welcome { min-height: 0; }
  body.is-guest #content.auth-view > .authcard { max-width: none; }
  .welcome { padding: 28px 24px; border-radius: 22px; }
  .welcome h1 { font-size: clamp(30px, 7vw, 38px); margin-top: 18px; }
  .welcome p { font-size: 15px; }
  .welcomeicons { margin-top: 20px; }
  .welcomeicons span { font-size: 11px; }
  .authcard { padding: 24px; }
  .hero, .experience-hero, #content .platform-hero, #content .dossier-hero { grid-template-columns: minmax(0, 1fr); padding: 26px; margin-block: 20px; border-radius: 22px; }
  .experience-hero, #content .platform-hero { flex-direction: column; align-items: stretch; gap: 18px; }
  .experience-hero > div:first-child { flex-basis: auto; }
  .journey-ring { align-self: center; flex-basis: 144px; width: 144px; height: 144px; margin-block: 8px; }
  .journey-ring strong { font-size: 32px; }
  .welcome-statement { margin-block: 24px 16px; }
  .sound { display: none; }
  .grid, .learning-grid, .futuregrid, .path-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card, .learning-card, .assignment-card, .submission-card, .wizard { padding: 21px; border-radius: 19px; }
  #content .path-card { min-height: 0; padding: 24px; border-radius: 20px; }
  .stats { gap: 12px; }
  .stat strong, .stat:nth-child(n) strong { font-size: 29px; }
  .stat span { font-size: 12px; }
  .sectionhead { margin-block: 26px 16px; }
  .row { flex-wrap: wrap; }
  #content .row > * { flex: 1 1 180px; min-width: 0; max-width: 100%; }
  .actions > button { flex: 1 1 140px; }
  .rubric { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviewtop { flex-wrap: wrap; }
  .bubble { max-width: 96%; }
  .chatlog { padding: 16px; }
  .messagefoot { flex-wrap: wrap; }
  .segmented { width: 100%; }
  .segmented button { flex: 1 1 auto; }
  .platform-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content .platform-summary-card { padding: 18px; }
  .platform-summary-card span { font-size: 13px; }
  #content .platform-student-row { flex-wrap: wrap; gap: 10px; padding: 14px; }
  th, td, #content :is(th, td) { padding: 12px 10px; font-size: 13px; }
  .learning-toolbar > :is(input, select) { flex: 1 1 180px; }
  .learning-editor, .wizard textarea, #content :is(.learning-editor, .wizard textarea) { min-height: 220px; }
  #toast { inset-inline: 16px; width: auto; margin-inline: auto; }
}
@media (max-width: 380px) {
  body > main { padding-inline: 12px; }
  body > aside { padding-inline: 12px; }
  .welcome, .authcard, .card, .wizard { padding: 20px; }
  .rubric { grid-template-columns: minmax(0, 1fr); }
  .app-navigation { flex-wrap: wrap; }
  .platform-quick-actions { gap: 10px; }
  #content .platform-summary-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #content .path-card:hover, button:active:not(:disabled), #content button:active:not(:disabled) { transform: none; }
}
@media (forced-colors: active) {
  .card, .path-card, .welcome, .authcard, button { border: 1px solid CanvasText; }
  .hero, .experience-hero, #content .platform-hero, #content .dossier-hero { background: Canvas; color: CanvasText; }
  .hero h1, .hero p, #content :is(.experience-hero, .platform-hero, .dossier-hero) :is(h1, h2, h3, p, .eyebrow) { color: CanvasText; }
  body > aside nav button.active { outline: 2px solid Highlight; }
  .welcome::before, .welcome::after { display: none; }
}
/* Never let layout, flex, badges or state hooks reveal application-hidden content. */
[hidden], body [hidden], #content [hidden], .badge:empty, #unread:empty { display: none !important; }
/* On a phone, the student has already chosen to enter: keep the form first. */
@media (max-width:680px){body.is-guest #content.auth-view .authcard{order:-1}body.is-guest #content.auth-view .welcome{min-height:0;padding:28px}body.is-guest #content.auth-view .welcome h1{font-size:32px}body.is-guest #content.auth-view .welcome-statement,body.is-guest #content.auth-view .welcomeicons{display:none}}
