/* Coach Laurien Learning: design tokens */
/* Brand: navy, slate, gold and cream with geometric line art */
:root {
  --mist: #F5EFE7;
  --paper: #FFFCF7;
  --glass: rgba(255, 252, 247, 0.9);
  --ink: #1C2340;
  --ink-2: #3A4266;
  --ink-3: #6B6F86;
  --line: #E6DCCB;
  --line-2: #D3C4A8;
  --navy: #1E2A52;
  --gold: #8A6A2F;
  --gold-light: #E8D6B3;
  --s6: #1E2A52;
  --s5: #8A6A2F;
  --accent: #1E2A52;
  --accent-soft: #F1E9DB;
  --mark: #EAD7A8;
  --ok: #2E6B3F;
  --warn: #8A5A12;
  --danger: #A3302A;
  --focus: #3A63C8;
  --bg-img: url("bg-light.jpg");
  --lift: 0 1px 2px rgba(30, 42, 82, .05), 0 10px 28px rgba(30, 42, 82, .06);
  --on-accent: #FFFFFF;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 6px; --r: 12px;
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mist: #121836; --paper: #1A2347; --glass: rgba(24, 32, 66, 0.9); --ink: #F5EFE7; --ink-2: #DCD3C3; --ink-3: #A9A9BC;
    --line: #2C3762; --line-2: #3D4877; --accent-soft: #232E5A; --mark: #6E5626; color-scheme: dark;
    --s6: #C9B27E; --s5: #E8D6B3; --accent: #E8D6B3; --gold: #E8D6B3; --navy: #E8D6B3;
    --bg-img: url("bg-dark.jpg");
    --lift: 0 1px 2px rgba(0,0,0,.25), 0 10px 28px rgba(0,0,0,.25); --on-accent: #121836;
  }
}
[data-course="s6"] { --accent: var(--s6); --accent-soft: color-mix(in srgb, var(--s6) 9%, var(--paper)); }
[data-course="s5"] { --accent: var(--s5); --accent-soft: color-mix(in srgb, var(--s5) 11%, var(--paper)); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; font-weight: 400; min-height: 100vh; }
/* Brand art background, fixed behind everything (works on phones too) */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--mist) var(--bg-img) right bottom / cover no-repeat; pointer-events: none; }
body.hero::before { background-image: url("bg-hero.jpg"); }
@media (prefers-color-scheme: dark) { body.hero::before { background-image: var(--bg-img); } }
@media (max-width: 720px) { body::before { background-position: 78% bottom; } }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--mist) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand svg { flex: none; }
.brand small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; line-height: 1.2; }
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 14px; min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { text-decoration: none; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who img, .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); display: inline-grid; place-items: center; font-weight: 600; color: var(--accent); }
@media (max-width: 720px) { .crumbs { display: none; } .who .name { display: none; } }

/* Layout */
main { outline: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px 80px; }
.narrow { max-width: 760px; margin: 0 auto; }
.loading { padding: 80px 16px; text-align: center; color: var(--ink-3); }
h1, h2, h3, h4 { font-family: var(--sans); letter-spacing: -0.01em; line-height: 1.22; margin: 0; color: var(--navy); }
h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 600; }
h2 { font-size: 24px; font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.stack > * + * { margin-top: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--paper); border-radius: 999px; padding: 10px 18px; font-weight: 500; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.danger { color: var(--danger); }

/* Imigongo band: the one decorative element */
.imigongo { height: 12px; background: var(--gold); opacity: .85; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 10 L6 2 L12 10 L18 2 L24 10' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12'%3E%3Cpath d='M0 10 L6 2 L12 10 L18 2 L24 10' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; margin: 14px 18px 0; }

/* Sign in */
.signin { min-height: calc(100vh - 57px); display: grid; place-items: center; padding: 32px 16px; }
.signin-card { max-width: 520px; width: 100%; }
.signin-card h1 { margin: 18px 0 12px; }
.signin-card .lead { font-size: 18px; color: var(--ink-2); }
.gbtn { display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 22px; font-weight: 500; text-decoration: none; min-height: 48px; }
.gbtn:hover { border-color: var(--ink-2); }
.notice { border-left: 4px solid var(--accent); background: var(--paper); padding: 14px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.notice.warn { border-color: var(--warn); }
.notice.err { border-color: var(--danger); }
.notice.care { border-color: var(--s5); }

/* Home & course */
.greet { margin-bottom: 28px; }
.greet h1 { margin-bottom: 6px; }
.courses { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.course-tile { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.course-tile:hover { border-color: var(--accent); }
.course-tile .body { padding: 20px; display: grid; gap: 6px; }
.course-tile .code { font-weight: 600; color: var(--accent); }
.course-tile h2 { font-size: 22px; }
.meter { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.course-head { margin: 8px 0 28px; }
.course-head .code { color: var(--accent); font-weight: 600; }
.unit-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.unit-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.unit-row:hover { background: var(--glass); }
.unit-row .num { font-size: 34px; font-weight: 300; color: var(--accent); line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.unit-row h3 { font-size: 18px; font-weight: 500; }
.unit-row .meta { font-size: 14px; color: var(--ink-3); }
.stages { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); display: inline-block; }
.dot.half { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.dot.full { border-color: var(--accent); background: var(--accent); }
.dot.ret { border-color: var(--warn); background: var(--warn); }
@media (max-width: 560px) { .unit-row { grid-template-columns: 44px 1fr; } .unit-row .stages { grid-column: 2; } .unit-row .num { font-size: 26px; } }

/* Unit page */
.unit-cover { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.unit-cover .in { padding: 28px clamp(20px, 4vw, 40px) 32px; display: grid; grid-template-columns: auto 1fr; gap: 8px 28px; align-items: end; }
.unit-cover .big { font-size: clamp(72px, 12vw, 132px); font-weight: 200; line-height: .8; color: var(--accent); letter-spacing: -0.04em; grid-row: span 2; }
.unit-cover .kicker { color: var(--ink-3); font-size: 15px; }
.unit-cover h1 { font-size: clamp(26px, 3.6vw, 40px); }
.unit-cover .comp { grid-column: 1 / -1; margin-top: 18px; color: var(--ink-2); max-width: 70ch; }
@media (max-width: 560px) { .unit-cover .in { grid-template-columns: 1fr; } .unit-cover .big { grid-row: auto; } }

.coach { display: grid; grid-template-columns: 52px 1fr; gap: 14px; background: var(--accent-soft); border-radius: var(--r); padding: 20px; margin-bottom: 28px; }
.coach .face { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 600; font-size: 18px; }
.coach .who-l { font-weight: 600; margin-bottom: 4px; }
.coach p { font-family: var(--serif); font-size: 18px; line-height: 1.6; margin: 0; max-width: var(--measure); }
.coach .media { margin-top: 14px; }

.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.path > li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; position: relative; padding-bottom: 28px; }
.path > li:not(:last-child)::before { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--line-2); }
.path .n { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font-size: 22px; font-weight: 500; color: var(--accent); background: var(--paper); }
.path .n.done { background: var(--accent); color: var(--on-accent); }
.path .card { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.path .card h3 { margin-bottom: 4px; }
.path .card p { color: var(--ink-2); margin-bottom: 12px; }
.path .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status { font-size: 14px; color: var(--ink-3); }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); }

/* Key words first */
.terms { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 24px 0; }
.term { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.term h3 { font-size: 20px; margin-bottom: 6px; }
.term h3 span { background: linear-gradient(transparent 55%, var(--mark) 55%); }
.term p { margin: 0 0 8px; }
.term .origin { font-size: 14px; color: var(--ink-3); margin: 0; }

/* Reader */
.reader { display: grid; grid-template-columns: 260px minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.rail { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; font-size: 14px; }
.rail h4 { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 0 0 8px; }
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail a { display: grid; grid-template-columns: 18px 1fr; gap: 8px; padding: 7px 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); line-height: 1.35; }
.rail a:hover { background: var(--glass); }
.rail a[aria-current="page"] { background: var(--glass); color: var(--ink); font-weight: 500; box-shadow: inset 3px 0 0 var(--accent); }
.rail .tick { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 3px; }
.rail .tick.on { border-color: var(--accent); background: var(--accent); }
.qs { position: sticky; top: 80px; font-size: 14px; }
.qs details { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.qs summary { font-weight: 600; cursor: pointer; }
.qs ol { padding-left: 20px; margin: 10px 0 0; color: var(--ink-2); }
.qs li + li { margin-top: 6px; }
@media (max-width: 1100px) { .reader { grid-template-columns: 220px minmax(0, 1fr); } .qs { position: static; grid-column: 2; grid-row: 1; } }
@media (max-width: 820px) { .reader { grid-template-columns: 1fr; gap: 16px; } .rail { position: static; max-height: none; margin-top: 10px; } .rail-wrap { order: 0; } .qs { grid-column: auto; grid-row: auto; order: 1; } .article { order: 2; } }
.rail-toggle { display: none; }
@media (max-width: 820px) { .rail-toggle { display: inline-flex; } .rail.closed { display: none; } }

.article { min-width: 0; background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 3vw, 36px); box-shadow: var(--lift); }
.article-head { margin-bottom: 18px; }
.article-head .part { color: var(--ink-3); font-size: 14px; }
.article-head h1 { font-size: clamp(24px, 3vw, 34px); margin: 4px 0 8px; }
.intro-line { font-size: 16px; color: var(--ink-2); border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin: 0 0 24px; max-width: var(--measure); }
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.7; max-width: var(--measure); }
.prose p { margin: 0 0 1em; }
.prose h3 { font-family: var(--sans); font-size: 21px; margin: 1.6em 0 .5em; }
.prose h4 { font-family: var(--sans); font-size: 17px; margin: 1.4em 0 .4em; }
.prose ul.blist { margin: 0 0 1em; padding-left: 1.2em; }
.prose ul.blist li { margin: .25em 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--line-2); color: var(--ink-2); font-style: italic; }
.prose figure { margin: 1.4em 0; }
.prose figure img { display: block; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; margin: 0 auto; max-height: 520px; width: auto; }
.prose figcaption { font-family: var(--sans); font-size: 14px; color: var(--ink-3); margin-top: 8px; text-align: center; }
.prose .cap { font-family: var(--sans); font-size: 14px; color: var(--ink-3); }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 15px; margin: 1.2em 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--accent-soft); font-weight: 600; }
.prose details.act { background: var(--accent-soft); border-radius: var(--r); padding: 0; margin: 1.4em 0; font-size: 17px; }
.prose details.act > summary { font-family: var(--sans); font-weight: 600; font-size: 16px; padding: 14px 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.prose details.act > summary::-webkit-details-marker { display: none; }
.prose details.act > summary::after { content: "Open"; font-weight: 400; color: var(--ink-3); font-size: 14px; }
.prose details.act[open] > summary::after { content: "Close"; }
.prose details.act .act-body { padding: 0 18px 14px; }
.prose details.act .act-body > *:last-child { margin-bottom: 0; }

mark.kt { background: linear-gradient(transparent 50%, var(--mark) 50%); color: inherit; position: relative; cursor: help; border-radius: 2px; }
mark.kt:hover::after, mark.kt:focus::after { content: attr(data-def); position: absolute; left: 0; top: calc(100% + 6px); z-index: 10; width: min(300px, 80vw); background: var(--ink); color: var(--mist); font-family: var(--sans); font-size: 14px; line-height: 1.45; padding: 10px 12px; border-radius: var(--r-sm); font-weight: 400; }

.read-foot { max-width: var(--measure); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Media */
.media-frame { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #000; }
.media-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.audio { display: grid; gap: 8px; max-width: 520px; }
.audio audio { width: 100%; }
.speeds { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.speeds button { border: 1px solid var(--line-2); background: var(--paper); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.speeds button[aria-pressed="true"] { background: var(--ink); color: var(--mist); border-color: var(--ink); }
.voice-slot { font-size: 14px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; }

/* Work areas (Engage / Expand) */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .work { grid-template-columns: 1fr; } }
.side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 980px) { .side { position: static; max-height: none; } }
.panel { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin-bottom: 10px; }
.field { display: grid; gap: 6px; }
.field label, .lbl { font-weight: 500; }
.field .hint { font-size: 14px; color: var(--ink-3); }
textarea, input[type=text], input[type=email], select { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--paper); padding: 12px 14px; line-height: 1.6; }
textarea { resize: vertical; }
textarea.writing { font-family: var(--serif); font-size: 18px; line-height: 1.75; min-height: 60vh; padding: 18px 20px; }
textarea:focus, input:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--focus) 40%, transparent); border-color: var(--focus); }
.cornell { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
@media (max-width: 640px) { .cornell { grid-template-columns: 1fr; } }
.cornell textarea { min-height: 380px; font-size: 16px; }
.savebar { position: sticky; bottom: 0; z-index: 5; background: color-mix(in srgb, var(--mist) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.savebar .grow { flex: 1; min-width: 180px; }
.wordmeter { display: grid; gap: 4px; font-size: 14px; }
.wordmeter b { font-size: 20px; font-variant-numeric: tabular-nums; }
.wordmeter .meter { height: 8px; }
.wordmeter.met .meter > span { background: var(--ok); }
.prompt { font-family: var(--serif); font-size: 18px; line-height: 1.65; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.choice input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); }

/* Rubric */
.rubric { display: grid; gap: 12px; }
.crit { border-top: 1px solid var(--line); padding-top: 12px; }
.crit:first-child { border-top: 0; padding-top: 0; }
.crit .name { font-weight: 600; }
.crit .lvls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.crit .lvl { font-size: 13px; line-height: 1.35; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; color: var(--ink-2); background: var(--paper); text-align: left; }
.crit .lvl b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; margin-bottom: 2px; }
button.lvl { cursor: pointer; }
button.lvl[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.side .crit .lvls { grid-template-columns: 1fr 1fr; }
.score { font-size: 28px; font-weight: 600; color: var(--accent); }

/* Teacher */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0 22px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent); font-weight: 500; }
.table-wrap { overflow-x: auto; background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: var(--lift); border: 1px solid var(--line); border-radius: var(--r); }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.data th { font-weight: 500; color: var(--ink-3); background: var(--mist); }
table.data tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--line); color: var(--ink-2); }
.pill.submitted { background: color-mix(in srgb, var(--ok) 16%, var(--paper)); color: var(--ok); }
.pill.returned { background: color-mix(in srgb, var(--warn) 18%, var(--paper)); color: var(--warn); }
.pill.draft { background: var(--accent-soft); color: var(--ink-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.work-view { white-space: pre-wrap; font-family: var(--serif); font-size: 17px; line-height: 1.7; background: var(--mist); border-radius: var(--r-sm); padding: 14px 16px; max-height: 60vh; overflow: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 14px; }
.checks label { display: flex; gap: 6px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--mist); padding: 12px 18px; border-radius: var(--r); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.rubric.compact { gap: 0; }
.rubric.compact .crit { border-top: 1px solid var(--line); padding: 0; }
.rubric.compact .crit:first-child { border-top: 0; }
.rubric.compact summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; cursor: pointer; font-weight: 600; }
.rubric.compact .tag { font-weight: 400; font-size: 13px; color: var(--accent); white-space: nowrap; }
.lvls1 { display: grid; gap: 6px; padding-bottom: 12px; }
.lvls1 .lvl { font-size: 14px; line-height: 1.4; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; color: var(--ink-2); background: var(--paper); text-align: left; width: 100%; }
.lvls1 .lvl b { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.lvls1 .lvl[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* Course codes and join */
.codes { display: grid; gap: 10px; }
.code-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.code { font-size: 20px; letter-spacing: .08em; color: var(--navy); font-variant-numeric: tabular-nums; }
.join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.join-row input { flex: 1 1 220px; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; }
.join { max-width: 620px; }
.join h2 { margin-bottom: 6px; }
.pill .x { border: 0; background: none; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; color: inherit; }
.signin-card { background: var(--glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 5vw, 44px); box-shadow: var(--lift); }
.signin-card .imigongo { margin: 0 0 6px; width: 120px; }

main:focus, main:focus-visible { outline: none; }
.join-row input::placeholder { text-transform: none; letter-spacing: 0; }
.coach .face { font-family: var(--serif); font-size: 34px; line-height: 1; padding-top: 10px; }

.gc-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.gc-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.gc select { min-width: 160px; padding: 8px 10px; }

.unit-row.locked { opacity: .62; cursor: not-allowed; }
.unit-row .lock { color: var(--ink-3); }
.locked-panel h1 { font-size: 30px; margin-bottom: 10px; }
.edit-bar { display: grid; gap: 8px; margin: 0 0 18px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.edit-bar .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.prose.editing { outline: 2px dashed var(--gold); outline-offset: 8px; border-radius: 4px; caret-color: var(--navy); }
.prose mark.hl { background: var(--mark); color: inherit; }
.terms-edit { display: grid; gap: 10px; margin-top: 10px; }
.term-row { display: grid; grid-template-columns: 1fr 2fr 1.4fr auto; gap: 8px; align-items: center; }
@media (max-width: 720px) { .term-row { grid-template-columns: 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line); } }
.rec-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.slot.recording { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.slot.recording .rec-time { color: var(--danger); font-weight: 600; }
.slot audio { width: 100%; max-width: 520px; }

/* Engage guide */
.guide h2 { font-size: 22px; margin: 0 0 10px; }
.gsec { margin-top: 34px; scroll-margin-top: 80px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.chips a { text-decoration: none; font-size: 14px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--glass); }
.chips a:hover { border-color: var(--accent); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.grid3 .panel + .panel { margin-top: 0; }
.panel h4 { margin: 0 0 8px; font-size: 16px; }
ul.tight, ol.tight { margin: 0; padding-left: 20px; }
ul.tight li, ol.tight li { margin: 4px 0; }
.routine .step { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.rcards { display: grid; gap: 12px; margin-top: 12px; }
.rcard { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.rcard header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.rcard h4 { margin: 0; font-size: 17px; }
.rcard .pts { font-size: 14px; color: var(--accent); white-space: nowrap; }
.rcard .pts b { font-size: 20px; }
.bands { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .bands { grid-template-columns: 1fr 1fr; } }
.bands li { font-size: 13px; line-height: 1.4; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; background: var(--paper); color: var(--ink-2); }
.bands .bl { display: block; font-weight: 600; color: var(--ink); font-size: 12px; margin-bottom: 3px; }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .methods { grid-template-columns: 1fr; } }
.method { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.method[data-used] { border-color: var(--gold-light); }
.method summary { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.method summary::-webkit-details-marker { display: none; }
.method summary > span { display: grid; gap: 2px; }
.method ol { margin-top: 10px; }
svg.mthd { width: 96px; height: 64px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.5; }
svg.mthd rect:not(.o), svg.mthd circle { fill: var(--line-2); stroke: none; }
svg.mthd circle.o, svg.mthd rect.o, svg.mthd path.o { fill: none; stroke: var(--navy); }
svg.mthd .g { fill: var(--gold-light); }
svg.mthd .gf { fill: var(--gold-light); stroke: var(--gold); }
svg.mthd circle { fill: var(--gold-light); stroke: var(--gold); }
svg.mthd .t { fill: var(--gold); stroke: none; font: 600 11px var(--sans); }
table.plan svg.mthd { width: 42px; height: 28px; vertical-align: middle; margin-right: 6px; }
table.plan td { white-space: normal; }
table.sym { border-collapse: collapse; width: 100%; font-size: 14px; }
table.sym td { padding: 4px 8px; border-bottom: 1px solid var(--line); }
table.sym td:first-child { width: 110px; color: var(--navy); }
.checklist { list-style: none; margin: 0; padding: 0; }
.mark-panel .score { margin: 0 0 4px; }
.nb-hint { display: flex; gap: 12px; align-items: center; max-width: var(--measure); background: var(--accent-soft); border-radius: var(--r-sm); padding: 8px 12px; font-size: 15px; margin: -10px 0 24px; }
.nb-hint svg.mthd { width: 54px; height: 36px; }

/* Expand: flags and feedback */
.flag-panel { border-color: var(--warn); margin: 0 0 16px; }
.flags { margin: 10px 0; padding-left: 22px; display: grid; gap: 10px; }
.flags li { display: grid; gap: 4px; }
.flag-q { text-align: left; font: inherit; font-family: var(--serif); font-size: 16px; background: color-mix(in srgb, var(--warn) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--paper)); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; color: var(--ink); }
.flag-q:hover { border-color: var(--warn); }
mark.flagmark { background: color-mix(in srgb, var(--warn) 22%, transparent); color: inherit; border-bottom: 2px solid var(--warn); }
.fb-panel { margin: 18px 0; border-color: var(--accent); }
.fb-panel h4 { margin: 16px 0 6px; }
.fixes s { color: var(--danger); }
table.data td.wrapcell { white-space: normal; min-width: 240px; }
.pill.flagged { background: color-mix(in srgb, var(--warn) 18%, var(--paper)); color: var(--warn); }
.score-inputs { display: grid; gap: 8px; margin-top: 8px; }
.si { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.si input { width: 72px; padding: 6px 8px; text-align: right; }

#g-routine > details.panel { margin-top: 14px; }
.warn-text{color:#a33a1f;font-weight:600}
.ask-wrap{position:fixed;inset:0;background:rgba(20,24,30,.45);display:grid;place-items:center;z-index:1000;padding:16px}.ask{background:var(--paper,#fff);color:inherit;border-radius:14px;max-width:440px;width:100%;padding:22px;box-shadow:0 18px 50px rgba(0,0,0,.25)}.ask p{margin:0 0 18px;line-height:1.5}.ask-btns{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
