/* /learn course pages: the hub, the six modules and /teachers.
   Layered on help.css + content.css (tokens, header, .article, .crumb). */

.learn-wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px 70px; }
.learn-wrap h1 { font-size: 30px; line-height: 1.25; color: var(--text); margin: 8px 0 8px; letter-spacing: .3px; }
.learn-wrap .lead { font-size: 15px; color: var(--text); line-height: 1.6; max-width: 760px; margin: 0 0 24px; }
.learn-wrap p { color: #c3cbe2; }
.learn-wrap a { color: var(--blue); }

/* module header row: crumb left, progress right */
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 0; font-size: 12px; color: var(--muted); }
.mod-head .crumb { padding: 0; margin: 0; max-width: none; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog .bars { display: flex; gap: 5px; }
.prog .bars span { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.prog .bars span.done { background: var(--accent); }
.prog .bars span.here { background: var(--accent); opacity: .5; }

/* the lesson frame: the real map staged for this lesson */
.frame { border: 1px solid #2b3352; border-radius: 12px; background: var(--card); overflow: hidden; margin: 0 0 28px; }
.frame-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 12px; color: var(--muted); }
.frame-bar .tag { font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.frame-bar .tag.live { color: var(--green); }
.frame-bar .name { color: var(--text); }
.frame-bar .clock { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.frame iframe { display: block; width: 100%; height: 520px; border: 0; background: var(--bg); }
.frame-foot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.tool { font: inherit; font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--panel); cursor: pointer; }
.tool:hover { border-color: var(--accent); }
.tool.on { border-color: var(--accent); color: var(--accent); }
.stops { display: flex; gap: 10px; flex-grow: 1; }
.stop { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; flex: 1; text-align: left; background: transparent; font: inherit; color: var(--text); cursor: pointer; }
.stop:hover { border-color: rgba(255,179,71,.55); }
.stop.on { border-color: var(--accent); background: rgba(255,179,71,.06); }
.stop .k { font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.stop.on .k { color: var(--accent); }
.stop .v { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.frame-hint { padding: 8px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* the lesson steps: idea, task, reveal */
.step { display: flex; gap: 16px; margin: 0 0 26px; }
.step .num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.step .body { flex: 1; min-width: 0; }
.step h2 { font-size: 16px; font-weight: 700; color: var(--accent); margin: 3px 0 6px; border: 0; padding: 0; }
.step p { margin: 6px 0; max-width: 760px; }
.task-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.task-row input[type="text"], .task-row input[type="number"], .task-row select {
  font: inherit; font-size: 13px; padding: 9px 12px; width: 300px; max-width: 100%;
  background: rgba(10,13,22,.7); border: 1px solid #26314a; border-radius: 7px; color: #e6ebf5;
}
.task-row .check { font: inherit; font-size: 13px; font-weight: 700; padding: 9px 16px; border: 0; border-radius: 7px; background: var(--accent); color: #1a1205; cursor: pointer; }
.task-row .check:hover { background: #ffc266; }
.task-row .choice { font: inherit; font-size: 13px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); cursor: pointer; }
.task-row .choice:hover { border-color: rgba(255,179,71,.55); }
.task-row .choice.on { border-color: var(--accent); color: var(--accent); background: rgba(255,179,71,.06); }
.task-result { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; margin-top: 10px; min-height: 0; max-width: 760px; }
.task-result.ok { color: var(--green); }
.task-result.near { color: var(--accent); }
.task-result.miss { color: #ff8c9c; }
.task-result svg { flex: none; margin-top: 3px; }
.reveal-wrap { margin-top: 8px; }
.reveal-wrap[hidden] { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; }
.stat .v { font-size: 19px; font-weight: 700; color: var(--accent); }
.stat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

/* the anatomy panel (module 1) */
.anatomy { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px 20px; margin: 4px 0 26px; }
.anatomy .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.anatomy .head h3 { margin: 0; font-size: 18px; color: var(--text); letter-spacing: 0; }
.anatomy .head span { font-size: 12px; color: var(--muted); }
.anatomy svg { display: block; width: 100%; height: auto; }
.parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.part { padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.part .t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.part .t i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.part .d { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.part.bz { border-color: rgba(255,84,112,.5); }
.anatomy .draws { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.anatomy .draws .l { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.anatomy .draws p { font-size: 13px; color: var(--text); line-height: 1.6; max-width: 800px; margin: 0 0 8px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills span { font-size: 12px; color: var(--muted); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; }

/* optional extras + course nav */
.optional { margin: 0 0 24px; }
.optional .l { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); text-decoration: none; }
.opt:hover { border-color: rgba(255,179,71,.55); text-decoration: none; }
.opt .t { font-size: 14px; font-weight: 700; color: var(--text); }
.opt .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.opt .go { margin-left: auto; font-size: 12px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); white-space: nowrap; }
.course-nav { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 8px; }
.course-nav a { flex: 1; text-align: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); text-decoration: none; font-size: 13.5px; }
.course-nav a.next { border-color: rgba(255,179,71,.55); background: rgba(255,179,71,.06); color: var(--accent); font-weight: 700; }
.course-nav a:hover { border-color: var(--accent); text-decoration: none; }

/* quiz (unchanged look from v1) */
.quiz { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 26px; background: rgba(255,255,255,.02); max-width: 760px; }
.quiz h4 { font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.qq { margin: 12px 0 6px; font-weight: 600; color: var(--text); }
.qa { display: block; width: 100%; text-align: left; margin: 5px 0; padding: 9px 12px; font: inherit; font-size: 13.5px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer; }
.qa:hover { border-color: rgba(255,179,71,.5); }
.qa.right { border-color: #3ddc97; background: rgba(61,220,151,.1); }
.qa.wrong { border-color: #ff6a6a; background: rgba(255,106,106,.08); }
.qexp { font-size: 13px; color: var(--muted); margin: 6px 0 2px; display: none; }

/* the storm lab (module 5) and the wind dial (module 4) */
.lab { border: 1px solid rgba(255,179,71,.4); border-radius: 12px; padding: 16px 18px; margin: 10px 0 8px; background: rgba(255,179,71,.05); max-width: 760px; }
.lab label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.lab input[type="range"] { width: 100%; }
.lab select { font: inherit; font-size: 13px; padding: 5px 8px; background: rgba(10,13,22,.7); color: var(--text); border: 1px solid var(--line); border-radius: 7px; }
.lab-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.lab-note { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.wind-dial { display: flex; gap: 8px; flex-wrap: wrap; }

/* live conditions (module 6) */
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }

/* ---------- hub ---------- */
.hub-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; margin: 22px 0 40px; }
.hub-hero h1 { font-size: 34px; line-height: 1.2; margin: 0 0 16px; }
.hub-hero .lead { margin-bottom: 18px; }
.hub-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.btn-primary { background: var(--accent); color: #1a1205 !important; }
.btn-primary:hover { background: #ffc266; text-decoration: none; }
.btn-ghost { border: 1px solid var(--line); color: var(--text) !important; }
.btn-ghost:hover { border-color: var(--accent); text-decoration: none; }
.hub-prog { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.ticks { display: flex; gap: 6px; }
.tick { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #2b3352; display: inline-flex; align-items: center; justify-content: center; }
.tick.done { border-color: var(--green); background: rgba(61,220,151,.15); }
.tick.done::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.hub-hero .frame { margin: 0; }
.hub-hero .frame iframe { height: 300px; }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 0 0 14px; }
.sect-head h2 { margin: 0; font-size: 19px; color: var(--text); border: 0; padding: 0; }
.sect-head span { font-size: 12px; color: var(--muted); }
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 40px; }
.mod { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); min-height: 150px; text-decoration: none; color: var(--text); }
.mod:hover { border-color: rgba(255,179,71,.55); text-decoration: none; }
.mod.next { border-color: rgba(255,179,71,.55); }
.mod .n { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.mod .t { font-size: 16px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.mod .d { font-size: 13px; color: var(--muted); line-height: 1.5; flex-grow: 1; }
.mod .m { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; margin-top: 4px; }
.teach { display: flex; align-items: center; gap: 24px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 32px; }
.teach .t { font-size: 14px; font-weight: 700; color: var(--text); }
.teach .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.teach .body { flex: 1; }
.hub-note { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- teachers ---------- */
.plan { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 18px 20px; margin: 0 0 14px; }
.plan h3 { margin: 0 0 6px; font-size: 16px; color: var(--accent); letter-spacing: 0; }
.plan .meta { font-size: 11.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.plan ol { margin: 6px 0 0 18px; padding: 0; color: #c3cbe2; }
.plan ol li { margin: 4px 0; }
.plan .beat { color: var(--text); font-weight: 700; }
@media print {
  .help-top, .crumb, .course-nav, .foot, .no-print { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .plan { border-color: #bbb; background: #fff; break-inside: avoid; }
  .plan h3 { color: #111; } .plan ol { color: #222; } .plan .meta, .plan .beat { color: #333; }
  .learn-wrap p, .learn-wrap .lead { color: #222; }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .learn-wrap { padding: 0 14px 50px; }
  .learn-wrap h1 { font-size: 24px; }
  .hub-hero { grid-template-columns: 1fr; gap: 20px; }
  .hub-hero h1 { font-size: 27px; }
  .mods { grid-template-columns: 1fr; }
  .stats, .parts, .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid { grid-template-columns: 1fr; }
  .frame iframe { height: 340px; }
  .frame-foot { flex-wrap: wrap; }
  .stops { flex-direction: column; width: 100%; }
  .teach { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mod-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .course-nav { flex-direction: column; }
  .task-row input[type="text"], .task-row input[type="number"] { width: 100%; }
}
