:root {
  color-scheme: light;
  --navy: #1c2d5a;
  --red: #af1e2b;
  --muted: #536276;
  --line: #d6dde6;
  --pale: #edf3f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--navy);
  background: #f8fafb;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
.wrap { width: min(92%, 1440px); margin: 0 auto; }
.top { background: white; border-bottom: 1px solid var(--line); }
.top-inner { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 16px; }
.top-inner nav, .top-inner nav form { display: flex; align-items: center; gap: 20px; margin: 0; }
.brand { width: 167px; height: auto; display: block; }
a { color: var(--navy); }
a:hover, .link:hover { color: var(--red); }
.top nav a, .link, .back { font-size: .88rem; font-weight: 650; text-underline-offset: 4px; }
.link { background: none; border: 0; color: var(--navy); text-decoration: underline; padding: 6px 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #1671a2; outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 2; background: white; padding: 10px; }
.skip:focus { top: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; text-wrap: pretty; }
h1 { font-size: clamp(2.1rem, 4.3vw, 4.2rem); letter-spacing: -.055em; }
h2 { font-size: clamp(1.55rem, 2.2vw, 2.2rem); letter-spacing: -.04em; }
h3 { font-size: 1.08rem; letter-spacing: -.025em; }
.eyebrow, .card-meta, .scope-tag, .num { font-size: .72rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.eyebrow { color: var(--muted); margin-bottom: 10px; }
.intro { font-size: 1.02rem; color: var(--muted); margin-top: 12px; }
.page-head, .lesson-head, .section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.page-head { padding: clamp(30px,4vw,64px) 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; font-size: .9rem; font-weight: 700; padding: 10px 16px; min-height: 44px; text-decoration: none; }
.primary { background: var(--red); color: white; border: 1px solid var(--red); }
.primary:hover { background: #901824; }
.secondary { background: white; color: var(--navy); border: 1px solid #a5b3c1; }
.secondary:hover { border-color: var(--navy); background: var(--pale); color: var(--navy); }
button:disabled { opacity: .65; cursor: wait; }
.library { display: grid; grid-template-columns: minmax(190px, 225px) minmax(0,1fr); gap: clamp(24px, 3vw, 50px); padding-bottom: 60px; }
.skill-list h2 { font-size: 1.25rem; margin: 5px 0 16px; }
.skill-list nav { display: grid; gap: 3px; }
.skill-list a { display: flex; align-items: baseline; gap: 12px; padding: 8px 12px; border-radius: 6px; font-size: .91rem; font-weight: 600; text-decoration: none; }
.skill-list a:hover { background: #eef1f5; }
.skill-list a[aria-current] { background: var(--navy); color: white; }
.num { color: #626f80; }
[aria-current] .num { color: #c0e6ef; }
.mobile-choose { display: none; }
.section-head { align-items: end; margin-bottom: 18px; }
.section-head .eyebrow { margin-bottom: 3px; }
.count { white-space: nowrap; color: var(--muted); font-size: .9rem; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,230px),1fr)); gap: 20px; }
.card { display: block; height: 100%; background: white; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.card:hover { border-color: #8495a7; color: var(--navy); box-shadow: 0 3px 10px #1c2d5a12; }
.thumb, .player { position: relative; aspect-ratio: 16/9; background: #172751; }
.thumb img, .player img, video { width: 100%; height: 100%; object-fit: contain; display: block; }
.duration { position: absolute; right: 8px; bottom: 8px; border-radius: 4px; background: #14213d; color: #fff; font-size: .76rem; font-variant-numeric: tabular-nums; padding: 2px 6px; }
.card-copy { padding: 14px 16px 17px; }
.card-meta { display: block; color: var(--muted); margin-bottom: 7px; }
.card-status { margin-top: 8px; font-size: .8rem; color: var(--muted); }
.card-status span { display: inline-block; }
.done { color: #125b46; font-weight: 650; }
.back { display: inline-block; margin-top: 28px; text-decoration: none; }
.lesson-head { align-items: center; margin: 18px 0 26px; }
.lesson-head h1 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.lesson-head .eyebrow span { color: #9ba6b2; padding: 0 4px; }
.review-form { flex: none; }
.workspace { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(300px,.85fr); align-items: start; gap: clamp(18px,3vw,40px); margin-bottom: 64px; }
.player { border-radius: 10px; }
#play { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--navy); border-radius: inherit; }
#play img, video { border-radius: inherit; }
#play span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--red); color: white; border: 2px solid white; border-radius: 50%; width: 62px; height: 62px; display: grid; place-items: center; font-size: 24px; padding-left: 3px; }
.feedback, .series, .login { border: 1px solid var(--line); border-radius: 12px; background: white; padding: clamp(18px,2.4vw,36px); }
.feedback h2 { font-size: 1.6rem; margin-bottom: 20px; }
.series { max-width: 720px; margin: 22px auto 60px; }
.series .intro, .login .intro { margin-bottom: 26px; }
.login { max-width: 430px; margin: clamp(38px,12vh,130px) auto; }
.login h1 { font-size: 3rem; }
label, legend { display: block; font-size: .88rem; font-weight: 650; margin-bottom: 6px; }
textarea, select, input[type=password] { width: 100%; border: 1px solid #8697a7; border-radius: 6px; background: white; color: var(--navy); padding: 10px 12px; font-size: 1rem; }
textarea { resize: vertical; display: block; min-height: 88px; }
.feedback-form .primary, .login .primary { margin-top: 12px; }
.scope { border: 0; margin: 0 0 14px; padding: 0; }
.scope label { display: inline-flex; align-items: center; gap: 5px; margin: 0 10px 0 0; min-height: 34px; font-weight: 500; }
.scope input { accent-color: var(--navy); }
.notice:not(:empty), .error { margin-top: 8px; color: var(--muted); font-size: .88rem; }
.error { color: var(--red); }
.notes-title { margin: 28px 0 8px; font-size: 1rem; }
.notes { list-style: none; padding: 0; margin: 0; }
.notes li { border-top: 1px solid var(--line); padding: 12px 0; }
.notes p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; color: #273547; }
.scope-tag { color: var(--muted); }
.moment { font: 650 .85rem/1.25 monospace; color: var(--navy); border: 1px solid #afc7d4; border-radius: 4px; background: #ecf6f9; padding: 4px 8px; }
@media (max-width: 880px) {
  .workspace { grid-template-columns: 1fr; }
  .library { grid-template-columns: minmax(158px, 180px) minmax(0,1fr); }
  .cards { grid-template-columns: repeat(auto-fill,minmax(min(100%,180px),1fr)); gap: 12px; }
}
@media (max-width: 650px) {
  .top-inner { min-height: 60px; }
  .top-inner nav { gap: 10px; }
  .brand { width: 128px; }
  .top nav a, .link { font-size: .78rem; }
  .library { display: block; }
  .js .skill-list { display: none; }
  .js .mobile-choose { display: block; margin-bottom: 22px; }
  .page-head, .lesson-head { align-items: start; flex-direction: column; gap: 14px; }
  .page-head { margin-bottom: 20px; padding-bottom: 20px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-copy { padding: 10px; }
  .card h3 { font-size: .96rem; }
  .card-meta { font-size: .65rem; }
}
@media (max-width: 360px) {
  .top-inner { flex-wrap: wrap; padding: 10px 0; gap: 8px; }
  .cards { grid-template-columns: 1fr; }
}
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.lesson-nav a { font-size: .88rem; font-weight: 650; padding: 6px 0; text-underline-offset: 3px; }
.lesson-nav .next { margin-left: auto; }
.note-actions, .note-buttons { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.note-action summary { cursor: pointer; list-style: none; }
.note-action summary::-webkit-details-marker { display: none; }
.note-action[open] { flex: 1 0 100%; }
.note-actions:has(.note-action[open]) .note-action:not([open]) { display: none; }
.notes li:has(.note-edit[open]) .note-text { display: none; }
.note-buttons { margin-top: 10px; }
.cancel-note { display: none; }
.js .cancel-note { display: inline-flex; }
