:root {
  color-scheme: dark;
  font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: #eef7f8;
  background: #06121f;
  --bg: #06121f;
  --surface: #0c2232;
  --surface-2: #112d3e;
  --line: rgba(150, 205, 222, .17);
  --text: #eef7f8;
  --muted: #aac0ca;
  --accent: #82e8d8;
  --gold: #e6c999;
  --shadow: 0 26px 70px rgba(0, 7, 17, .28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 880px 620px at 0% 0%, rgba(29, 109, 129, .24), transparent 72%),
    radial-gradient(ellipse 780px 560px at 100% 45%, rgba(12, 72, 100, .19), transparent 76%),
    var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.shell { width: min(100%, 1440px); margin: 0 auto; padding: 28px clamp(20px, 4vw, 62px) 90px; }
.eyebrow { color: var(--accent); font-size: .77rem; font-weight: 800; letter-spacing: .18em; line-height: 1.4; text-transform: uppercase; }

/* Home: an editorial hero beside a live study console. */
.home-top { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr); align-items: stretch; gap: 20px; }
.sea-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 650px;
  overflow: hidden;
  padding: clamp(26px, 3.2vw, 46px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(3,17,29,.36), rgba(3,17,29,.03) 26%, rgba(3,17,29,.48) 57%, rgba(2,14,25,.95) 100%),
    linear-gradient(90deg, rgba(3,18,31,.35), transparent 70%),
    url("sea-fleet.webp") center / cover no-repeat;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.sea-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 82% 20%, rgba(231,207,167,.14), transparent 35%); pointer-events: none; }
.hero-coordinate, .hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #e7f3f2; font-size: .71rem; font-weight: 800; letter-spacing: .19em; text-shadow: 0 1px 15px #001322; }
.hero-coordinate span:last-child { color: var(--gold); }
.hero-bottom { color: #b7cfce; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.27); }
.home-intro { max-width: 590px; margin: auto 0 46px; text-shadow: 0 2px 18px rgba(0,0,0,.15); }
.home-intro .eyebrow { color: #d5eddc; }
.home-intro h2 { margin: 15px 0 19px; color: white; font-size: clamp(2.65rem, 4.3vw, 4.85rem); font-weight: 830; line-height: 1.04; letter-spacing: -.055em; }
.home-intro h2 em { color: #9be8dc; font-style: normal; }
.home-intro p { max-width: 470px; margin: 0; color: #e3eeee; font-size: 1.07rem; line-height: 1.66; }
.hero-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 45px; min-height: 53px; margin-top: 30px; padding: 13px 18px 13px 23px; color: #082431; background: #ddfaf0; border-radius: 11px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 35px rgba(0,0,0,.25); transition: transform .2s, box-shadow .2s, background .2s; }
.hero-cta span { font-size: 1.3rem; line-height: 1; }
.hero-cta:hover { transform: translateY(-3px); background: white; box-shadow: 0 16px 38px rgba(0,0,0,.32); }

.dashboard { min-width: 0; padding: clamp(24px, 2.5vw, 38px); background: linear-gradient(145deg, rgba(20,54,72,.95), rgba(8,31,47,.97) 70%); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow), inset 0 1px rgba(255,255,255,.05); }
.dashboard-head { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 10px 16px; }
.dashboard h2 { margin: 7px 0 0; color: white; font-size: clamp(1.8rem,2.6vw,2.45rem); line-height: 1.12; letter-spacing: -.04em; }
.dashboard-head p { max-width: 210px; margin: 3px 0 0; color: #9fc1c9; font-size: .84rem; text-align: right; line-height: 1.4; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 27px 0 25px; }
.dashboard-metrics>div { min-height: 102px; padding: 16px 19px; background: rgba(151, 204, 218, .075); border: 1px solid rgba(173,217,225,.12); border-radius: 14px; }
.dashboard-metrics b { display: block; color: #f9ffff; font-size: clamp(1.85rem,2.3vw,2.5rem); font-weight: 750; line-height: 1.04; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.dashboard-metrics>div:first-child b { color: var(--gold); }
.dashboard-metrics span { display: block; margin-top: 7px; color: #a8c0c9; font-size: .84rem; line-height: 1.3; }
.dashboard-lower { display: grid; gap: 23px; }
.dashboard-lower strong { color: #e8f5f5; font-size: .92rem; }
.dashboard-lower p { margin: 9px 0 0; color: #a9c0c8; font-size: .87rem; line-height: 1.45; }
.dashboard-lower small { display: block; margin-top: 12px; color: #8eacb7; font-size: .76rem; line-height: 1.48; }
.goal-track, .lesson-track { height: 7px; overflow: hidden; margin: 12px 0 0; background: rgba(158,199,213,.16); border-radius: 99px; }
.goal-track span, .lesson-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#57c8c8,#9aefce); transition: width .25s; }
.week { display: flex; gap: 7px; margin-top: 17px; }
.day { display: grid; place-items: center; width: 30px; height: 30px; color: #afc6cb; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); border-radius: 9px; font-size: .7rem; font-weight: 800; }
.day.studied { color: #082a35; background: var(--accent); border-color: var(--accent); }
.dashboard-courses { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 12px; }
.dashboard-courses>strong { grid-column: 1 / -1; margin-bottom: 1px; }
.dashboard-course { display: grid; gap: 4px; min-width: 0; padding: 8px 0; color: #e9f5f3; text-decoration: none; border-bottom: 1px solid rgba(196,224,228,.13); }
.dashboard-course:hover strong { color: var(--accent); }
.dashboard-course span { overflow: hidden; color: #94b2be; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-empty { color: #a9c0c8; }

.courses-section { margin-top: 60px; scroll-margin-top: 100px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px 35px; margin-bottom: 22px; }
.section-heading h2 { margin: 5px 0 0; color: #f5fcfc; font-size: clamp(2.1rem,3.5vw,3.25rem); font-weight: 780; letter-spacing: -.048em; line-height: 1.1; }
.section-heading p { max-width: 320px; margin: 0 0 4px; color: var(--muted); line-height: 1.5; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.course-card {
  --card-accent: #8fe6d7;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 260px;
  overflow: hidden;
  padding: clamp(24px,2.5vw,34px);
  color: #f5fbfa;
  text-decoration: none;
  background: linear-gradient(145deg, #13364a, #0a2435 72%);
  border: 1px solid rgba(164,209,222,.19);
  border-radius: 21px;
  box-shadow: 0 12px 34px rgba(0,8,20,.14);
  transition: transform .22s, border-color .22s, box-shadow .22s;
  isolation: isolate;
}
.course-card:nth-child(2) { --card-accent:#a7c6ff; background: linear-gradient(145deg,#172e4b,#0b223b 72%); }
.course-card:nth-child(3) { --card-accent:#f4caa0; background: linear-gradient(145deg,#3a2d35,#152434 74%); }
.course-card:nth-child(4) { --card-accent:#b8d5f0; background: linear-gradient(145deg,#1b354b,#0b2639 72%); }
.course-card::before { content:""; position:absolute; z-index:-1; right:-90px; top:-95px; width:330px; height:330px; border-radius:50%; background: radial-gradient(circle, color-mix(in srgb, var(--card-accent), transparent 83%), transparent 67%); pointer-events:none; }
.course-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb,var(--card-accent),transparent 42%); box-shadow: 0 22px 54px rgba(0,8,20,.32); }
.card-index { display: inline-flex; align-items: center; gap: 13px; color: var(--card-accent); font-size: .72rem; font-weight: 850; letter-spacing: .17em; }
.card-line { width: 25px; height: 1px; background: currentColor; opacity: .6; }
.course-stat { margin-top: 25px; color: #9db9c3; font-size: .85rem; }
.course-card h3 { margin: 10px 0 9px; color: #fff; font-size: clamp(1.7rem,2.25vw,2.35rem); font-weight: 780; letter-spacing: -.045em; line-height: 1.12; }
.course-card h3 span { color: var(--card-accent); }
.course-card p { max-width: 435px; margin: 0; color: #b8ccd2; line-height: 1.5; }
.course-card .open { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 24px; color: #effafa; font-size: .9rem; font-weight: 800; }
.course-card .open span { display: grid; place-items: center; width: 36px; height: 36px; color: #092a35; background: var(--card-accent); border-radius: 10px; font-size: 1.18rem; transition: transform .22s; }
.course-card:hover .open span { transform: translate(2px,-2px); }
.sources { max-width: 960px; margin: 26px 0 0; color: #8faab6; font-size: .84rem; line-height: 1.62; }
.sources a { color: #9ee8da; text-decoration-color: #5baeb1; }

/* Course workspace */
.course-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 4px 0 21px; padding: 21px 27px; background: linear-gradient(115deg,#13374a,#0d293b); border: 1px solid var(--line); border-radius: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 11px; min-height: 43px; padding: 10px 15px; color: #d8eded; border: 1px solid rgba(170,219,223,.24); border-radius: 11px; text-decoration: none; font-size: .89rem; font-weight: 750; }
.back-link span { font-size: 1.18rem; }
.back-link:hover { background: rgba(159,221,221,.11); }
.course-nav-title { text-align: right; }
.course-nav h2 { margin: 3px 0 0; color: white; font-size: clamp(1.25rem,2vw,1.8rem); font-weight: 760; letter-spacing: -.035em; }
.modebar { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin-bottom: 20px; padding: 8px; background: #0b2131; border: 1px solid var(--line); border-radius: 16px; scrollbar-width: thin; }
.mode { flex: 0 0 auto; min-height: 44px; padding: 11px 16px; color: #aec7cf; background: transparent; border: 1px solid transparent; border-radius: 10px; font-size: .87rem; font-weight: 750; white-space: nowrap; transition: background .16s, color .16s; }
.mode:not(:disabled):hover { color: white; background: rgba(171,225,227,.09); }
.mode.active, .mode.active:not(:disabled):hover { color: #082b35; background: #93e7db; box-shadow: 0 3px 16px rgba(81,216,205,.18); }
.mode:disabled { opacity: .45; cursor: not-allowed; }
.timer { margin-left: auto; padding: 0 10px; color: var(--gold); font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sync-notice { margin: 0 0 18px; padding: 13px 18px; color: #f5dfbd; background: #453728; border: 1px solid #7c613c; border-radius: 11px; }
.sync-notice button { margin-left: 6px; padding: 0; color: white; background: none; border: 0; font-weight: 800; text-decoration: underline; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 298px; gap: 19px; align-items: start; }
.panel, .learning-panel { min-width: 0; padding: clamp(24px,3.3vw,46px); background: linear-gradient(155deg,#112e40,#0b2233 72%); border: 1px solid var(--line); border-radius: 23px; box-shadow: var(--shadow); }
.panel { min-height: 560px; }
.meta { display: flex; justify-content: space-between; gap: 15px; color: #a9c6cc; font-size: .86rem; font-weight: 800; letter-spacing: .04em; }
.track { height: 7px; overflow: hidden; margin: 19px 0 40px; background: rgba(180,218,225,.15); border-radius: 99px; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg,#54bfc7,#9aecd4); border-radius: inherit; transition: width .25s; }
.number { color: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
.question { max-width: 770px; margin: 13px 0 12px; color: #f5fbfb; font-size: clamp(1.7rem,2.8vw,2.45rem); font-weight: 760; line-height: 1.25; letter-spacing: -.04em; }
.hint { margin: 0 0 27px; color: #a5bdc8; line-height: 1.55; }
.options { display: grid; gap: 11px; }
.option { display: flex; width: 100%; min-height: 68px; align-items: flex-start; gap: 16px; padding: 17px; color: #e4f1f2; background: #142e40; border: 1px solid rgba(167,210,222,.17); border-radius: 13px; text-align: left; line-height: 1.5; transition: border-color .17s, background .17s, transform .17s; }
.option:not(:disabled):hover { border-color: #71cfc9; background: #1a3949; transform: translateX(3px); }
.option:disabled { cursor: default; }
.letter { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: 1px; color: #a9e6dd; background: rgba(125,222,207,.1); border: 1px solid rgba(128,220,211,.25); border-radius: 8px; font-size: .8rem; font-weight: 850; }
.option.selected { border-color: #82e8d8; background: #1c4b55; box-shadow: inset 3px 0 #82e8d8; }
.option.correct { border-color: #60cba3; background: #16483f; box-shadow: inset 3px 0 #60cba3; }
.option.correct .letter { color: #062a25; background: #8de7bd; border-color: #8de7bd; }
.option.wrong { border-color: #dd8d91; background: #51313c; box-shadow: inset 3px 0 #dd8d91; }
.option.wrong .letter { color: #421e2b; background: #efb1b1; border-color: #efb1b1; }
.option.dim { opacity: .57; }
.selected-note { margin: 12px 0 0; color: #a9c9cc; font-size: .88rem; }
.feedback { margin-top: 20px; padding: 22px 24px; color: #d9f5e9; line-height: 1.62; background: #153b3b; border: 1px solid #3a8672; border-radius: 14px; }
.feedback.bad { color: #f4d8d7; background: #3c2d39; border-color: #9a5c69; }
.feedback>strong { display: block; margin-bottom: 5px; color: #a3f0c7; font-size: 1.06rem; }
.feedback.bad>strong { color: #ffc7c1; }
.feedback p { margin: 5px 0 0; }
.why { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(210,237,227,.17); }
.why b { color: white; }
.why ul { margin: 10px 0 0; padding-left: 22px; }
.why li { margin: 8px 0; }
.why li strong { color: var(--gold); }
.flag-button { display: block; margin-top: 19px; padding: 10px 0; color: #a9ccd2; background: none; border: 0; text-align: left; font-size: .89rem; }
.flag-button.on { color: var(--gold); font-weight: 800; }
.actions, .result-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.action, .ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 19px; border-radius: 11px; font-size: .9rem; font-weight: 800; text-decoration: none; transition: transform .16s, background .16s, border-color .16s; }
.action { color: #082936; background: linear-gradient(120deg,#83e7d7,#aff0d8); border: 1px solid #a1f0dc; }
.action:hover:not(:disabled) { transform: translateY(-2px); background: #d0ffed; }
.ghost { color: #d5ecee; background: rgba(174,216,225,.06); border: 1px solid rgba(169,222,228,.27); }
.ghost:hover:not(:disabled) { background: rgba(174,216,225,.13); border-color: #8fd9d6; }
.action:disabled, .ghost:disabled { opacity: .42; cursor: not-allowed; }
.setup { max-width: 640px; padding: 18px 0; }
.setup p { color: #aac4ca; line-height: 1.67; }
.setup label { display: block; margin: 24px 0 9px; color: #e3f0ef; font-weight: 800; }
.setup select { display: block; width: min(100%,280px); min-height: 46px; margin-bottom: 22px; padding: 11px 13px; color: #f0f8f6; background: #18394b; border: 1px solid #5a8492; border-radius: 10px; }
.result { padding: 34px 8px; text-align: center; }
.result .seal { display: grid; place-items: center; width: 75px; height: 75px; margin: auto; color: #092e31; background: #9eebcd; border-radius: 22px; font-size: 2rem; }
.result h2 { margin: 19px 0 0; color: white; font-size: 2.25rem; letter-spacing: -.04em; }
.result .big { margin: 8px 0; color: #9be9dc; font-size: 4rem; font-weight: 800; letter-spacing: -.055em; }
.result p { color: #afc9d0; line-height: 1.6; }
.result-actions { justify-content: center; }
.side { position: sticky; top: 92px; min-width: 0; padding: 23px; color: #e8f5f5; background: #0e293a; border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 16px 40px rgba(0,8,19,.17); }
.side h2 { margin: 0 0 10px; color: var(--accent); font-size: .74rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.score { color: white; font-size: 2.25rem; font-weight: 800; letter-spacing: -.05em; }
.side p { margin: 7px 0 22px; color: #a4bec7; font-size: .88rem; line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.jump { aspect-ratio: 1; min-width: 0; color: #c6dde0; background: #1b3b4d; border: 1px solid rgba(172,218,224,.18); border-radius: 8px; font-size: .82rem; font-weight: 800; }
.jump:hover { border-color: var(--accent); }
.jump.current { outline: 2px solid var(--accent); outline-offset: 2px; }
.jump.right { color: #063b31; background: #89dfb5; border-color: #89dfb5; }
.jump.incorrect { color: #431d27; background: #e6a1a3; border-color: #e6a1a3; }
.jump.answered { color: #092f3a; background: #a6cdda; }
.jump.flagged { border: 1px dashed var(--gold); }
.legend { display: flex; flex-wrap: wrap; gap: 9px 12px; margin-top: 19px; color: #9fb9c3; font-size: .76rem; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; }
.dot.good { background: #89dfb5; } .dot.bad { background: #e6a1a3; } .dot.todo { background: #7896a2; }
.restart { width: 100%; margin-top: 25px; }

/* Lessons and active recall. */
.learning-intro { max-width: 940px; }
.learning-intro h2 { margin: 10px 0 12px; color: white; font-size: clamp(1.95rem,3.4vw,3.2rem); font-weight: 780; line-height: 1.12; letter-spacing: -.045em; }
.learning-intro p { max-width: 830px; margin: 0 0 19px; color: #b1cad0; font-size: 1.02rem; line-height: 1.65; }
.learning-intro small { color: #a4c0c6; }
.learning-intro .lesson-track { max-width: 570px; margin: 0 0 8px; }
.lesson-shell { display: grid; grid-template-columns: 258px minmax(0,1fr); gap: clamp(22px,3.8vw,60px); margin-top: 35px; }
.lesson-nav { display: grid; align-self: start; gap: 4px; padding: 9px; background: rgba(161,210,217,.05); border: 1px solid var(--line); border-radius: 15px; }
.lesson-link { display: flex; align-items: baseline; gap: 12px; padding: 12px; color: #a7c3cb; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: .86rem; line-height: 1.38; }
.lesson-link span { flex: none; color: #71b7ba; font-size: .78rem; font-weight: 850; }
.lesson-link.current { color: #082b35; background: #9de5d9; font-weight: 800; }
.lesson-link.current span { color: #175666; }
.lesson-link:not(.current):hover { color: white; background: rgba(174,225,225,.08); }
.lesson-body { max-width: 790px; color: #deecee; font-size: 1.03rem; line-height: 1.78; }
.lesson-body>p { margin: 0 0 21px; }
.lesson-section { margin: 26px 0; }
.lesson-section h3 { margin: 0 0 7px; color: var(--text); font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.lesson-section p { margin: 0; }
.learning-references { color: var(--muted); font-size: .85rem; margin-top: 14px; }
.learning-references summary { cursor: pointer; color: var(--text); }
.learning-references p { margin: 12px 0 8px; }
.learning-references ul { padding-left: 20px; display: grid; gap: 8px; }
.learning-references a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.learning-goal { padding: 17px 21px; color: #d9f5ed; background: rgba(101,208,187,.1); border: 1px solid rgba(123,222,199,.25); border-radius: 12px; }
.lesson-example, .lesson-check { margin: 27px 0; padding: 20px 23px; background: #17384a; border: 1px solid rgba(179,219,229,.17); border-radius: 14px; }
.lesson-example { border-left: 3px solid var(--gold); }
.lesson-check { border-left: 3px solid var(--accent); }
.lesson-example strong, .lesson-check strong { color: #f8e2b7; }
.lesson-check strong { color: var(--accent); }
.lesson-example p, .lesson-check p { margin: 8px 0 0; }
.lesson-check details { margin-top: 14px; }
.lesson-check summary { color: #9be8dd; cursor: pointer; font-weight: 800; }
.lesson-actions, .flash-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 29px; }
.learning-source { max-width: none; padding-top: 17px; border-top: 1px solid var(--line); }
.flash-area { max-width: 820px; margin: 35px auto 0; }
.flash-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 13px; color: #a5c4c8; font-size: .84rem; font-weight: 750; }
.flashcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 25px; width: 100%; min-height: 330px; padding: 36px clamp(25px,5vw,60px); color: #f7ffff; background: radial-gradient(circle at 88% 10%, rgba(117,232,210,.2), transparent 43%), linear-gradient(135deg,#155466,#0b3549 70%); border: 1px solid rgba(157,237,222,.57); border-radius: 22px; box-shadow: 0 22px 50px rgba(0,8,20,.24); text-align: center; transition: transform .25s, background .25s; }
.flashcard:hover { transform: translateY(-3px); }
.flashcard.flipped { color: #0d3541; background: linear-gradient(135deg,#e1f8f0,#c0eee4); border-color: #d8fff3; }
.flashcard strong { max-width: 620px; font-size: clamp(1.55rem,2.5vw,2.2rem); font-weight: 760; line-height: 1.38; letter-spacing: -.025em; }
.flashcard .eyebrow { color: #b4fbeb; }
.flashcard.flipped .eyebrow { color: #246f77; }
.flashcard>span:last-child { opacity: .72; font-size: .88rem; }
.flash-area>p { color: #96b4bf; font-size: .85rem; text-align: center; }
.flash-finish { max-width: 590px; margin: 45px auto; padding: 38px; background: #173849; border: 1px solid var(--line); border-radius: 17px; text-align: center; }
.flash-finish h3 { margin: 0 0 8px; color: white; font-size: 1.9rem; letter-spacing: -.03em; }
.flash-finish p { color: #b1cbd0; line-height: 1.6; }

#home>.sources, .layout+.sources { max-width: none; margin-top: 23px; padding: 15px 19px; background: rgba(139,191,203,.055); border: 1px solid rgba(164,209,222,.11); border-radius: 12px; }
.study-answers { margin-top: 25px; padding: 22px 26px; color: #d7e9eb; background: #102d3d; border: 1px solid var(--line); border-radius: 16px; }
.study-answers summary { color: var(--accent); cursor: pointer; font-weight: 800; }
.study-answers ol { margin: 23px 0 8px; padding-left: 26px; }
.study-answers li { margin-bottom: 22px; padding-left: 4px; line-height: 1.6; }
.study-answers li strong { display: block; margin-bottom: 5px; color: #f4faf9; }
.study-answers li p { margin: 0; color: #b2cbd0; }

@media (max-width: 1150px) {
  .home-top { grid-template-columns: 1fr; }
  .sea-hero { min-height: 460px; background-position: center 54%; }
  .dashboard-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .dashboard-lower { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; }
}
@media (max-width: 850px) {
  .layout { grid-template-columns: minmax(0,1fr) 245px; gap: 13px; }
  .grid { grid-template-columns: repeat(4,1fr); }
  .mode { padding-inline: 13px; }
  .lesson-shell { grid-template-columns: 220px minmax(0,1fr); gap: 22px; }
}
@media (max-width: 720px) {
  .shell { padding: 16px 15px 56px; }
  .sea-hero { min-height: 460px; padding: 25px; border-radius: 19px; background-position: 58% center; }
  .home-intro { margin-bottom: 30px; }
  .home-intro h2 { max-width: 520px; font-size: clamp(2.5rem,9vw,3.8rem); }
  .dashboard { padding: 24px; border-radius: 19px; }
  .dashboard-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-lower { grid-template-columns: 1fr; }
  .courses-section { margin-top: 45px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 12px; }
  .course-grid { grid-template-columns: 1fr; }
  .course-card { min-height: 238px; }
  .layout { display: flex; flex-direction: column; }
  .panel, .side { width: 100%; }
  .panel { min-height: 0; }
  .side { position: static; }
  .grid { grid-template-columns: repeat(8,1fr); }
  .lesson-shell { grid-template-columns: 1fr; }
  .lesson-nav { display: flex; overflow-x: auto; }
  .lesson-link { flex: 0 0 210px; }
}
@media (max-width: 470px) {
  .shell { padding: 11px 10px 45px; }
  .sea-hero { min-height: 445px; padding: 22px; }
  .hero-coordinate, .hero-bottom { font-size: .6rem; letter-spacing: .12em; }
  .home-intro h2 { font-size: 2.65rem; }
  .home-intro p { font-size: .97rem; }
  .dashboard { padding: 21px; }
  .dashboard-head p { text-align: left; }
  .dashboard-metrics>div { min-height: 94px; padding: 13px; }
  .dashboard-metrics b { font-size: 1.8rem; }
  .dashboard-courses { grid-template-columns: 1fr; }
  .course-nav { padding: 16px; }
  .back-link { padding: 8px 10px; font-size: .76rem; }
  .course-nav h2 { font-size: 1.18rem; }
  .panel, .learning-panel { padding: 23px 18px; border-radius: 17px; }
  .question { font-size: 1.65rem; }
  .option { padding: 14px; }
  .grid { grid-template-columns: repeat(6,1fr); }
  .flashcard { min-height: 280px; }
  .flash-actions>* { flex: 1 1 125px; }
  .timer { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Multiple-response questions share the existing quiz layout and keyboard controls. */
.option.multi-option{display:flex;align-items:flex-start;cursor:pointer;line-height:1.55}
.multi-option input{width:22px;height:22px;min-width:22px;margin:3px 0 0;accent-color:#82e8d8;cursor:pointer}
.multi-option small{display:block;margin-top:7px;font-weight:650;font-size:12px}
.multi-option:has(input:focus-visible){outline:3px solid #82e8d8;outline-offset:3px}
.multi-option:has(input:disabled){cursor:default}
.multi-submit{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:18px 0 24px}
.exam-answer{border-left:3px solid #82e8d8;background:#82e8d80a;padding:16px 20px;margin:22px 0}
.exam-answer h3,.feedback h3{font-size:18px;line-height:1.4;margin:8px 0 14px}
.feedback .medical-source{font-size:12px;line-height:1.6;opacity:.85}
.medical-source a{color:inherit;text-decoration:underline;text-underline-offset:3px}
@media(max-width:560px){.option.multi-option{gap:10px;padding:15px 12px}.multi-option .letter{display:none}.exam-answer{padding:12px 15px}.multi-submit{flex-wrap:wrap}}
.levels-wrap { margin: 1.4rem 0; max-width: 100%; }
.levels-table { border-collapse: collapse; width: 100%; color: inherit; table-layout: fixed; }
.levels-table caption { text-align: left; font-weight: 650; margin-bottom: .75rem; }
.levels-table th, .levels-table td { padding: .85rem; border: 1px solid #d5dee5; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.levels-table th { background: #edf2f5; font-size: .83rem; }
.levels-table th:last-child { width: 45%; }
.levels-table td { background: #fff; }
.levels-table select { width: 100%; min-height: 44px; font-size: 1rem; color: #102c40; background: #fff; border: 1px solid #899eaf; border-radius: 8px; padding: .5rem; }
.levels-table select:focus-visible { outline: 3px solid #af8540; outline-offset: 3px; }
.levels-table select:disabled { opacity: 1; color: #102c40; background: #edf2f5; }
.level-result { display: block; margin-top: .6rem; font-weight: 650; }
.level-result.correct { color: #126343; }
.level-result.wrong { color: #a0292d; }
.table-mobile-label { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.question-source a { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .levels-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .levels-table, .levels-table tbody, .levels-table tr { display: block; width: 100%; }
  .levels-table tr { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
  .levels-table td { display: block; padding: .75rem; }
  .levels-table td:last-child { grid-column: 1 / -1; border-top: 0; }
  .table-mobile-label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .3rem; }
}
.past-exam-note { padding: clamp(18px, 3vw, 30px); margin: 0 0 24px; border: 1px solid #d5dee5; border-radius: 18px; background: #f4f7f9; color: #19364b; }
.past-exam-note h2 { margin: .4rem 0 .75rem; font-size: clamp(1.5rem, 4vw, 2rem); }
.past-exam-note p { max-width: 80ch; line-height: 1.65; }
.past-exam-coverage { margin-top: 1rem; border-top: 1px solid #d5dee5; padding-top: 1rem; }
.past-exam-coverage summary { cursor: pointer; font-size: .92rem; font-weight: 650; }
.image-note { padding: .9rem 1rem; border-left: 3px solid #ac8349; background: #faf3e6; border-radius: 6px; color: #61491e; line-height: 1.6; }
