:root {
  --ink: #172e43; --muted: #526675; --accent: #076b80; --paper: #f7fafb;
  --pale: #edf8f9; --line: #d8e4e8; --white: #fff; --stage: #eaf2f4;
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: grid; grid-template-rows: 72px minmax(0,1fr) 80px; }
button, summary, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; color: inherit; border: 0; background: none; }
button:disabled { cursor: default; opacity: .4; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
a { color: var(--accent); }
button, a { border-radius: 7px; }
.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; }
.skip-link { position: absolute; left: 16px; top: -100px; padding: 12px; background: white; z-index: 50; }
.skip-link:focus { top: 12px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 3vw; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 20px; color: var(--ink); text-decoration: none; letter-spacing: .08em; font-size: 14px; font-weight: 700; }
.brand img { width: 98px; height: 44px; object-fit: contain; }
.brand > span { border-left: 1px solid var(--line); padding-left: 20px; }
.brand small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .04em; color: var(--muted); margin-top: 4px; }
.top-actions, .advance-controls, .view-tools, .zoom-controls { display: flex; align-items: center; gap: 12px; }
.recorded-label { font-size: 11px; color: var(--muted); margin-right: 6px; }
.primary, .secondary, .quiet { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 11px 16px; font-size: 13px; line-height: 1.3; font-weight: 600; white-space: nowrap; }
.primary { background: var(--ink); color: white; min-width: 192px; justify-content: space-between; padding: 14px 20px; }
.primary:hover { background: #28506b; }
.secondary { background: white; border: 1px solid var(--line); }
.secondary:hover, .quiet:hover { background: var(--pale); }
.secondary:hover { border-color: var(--accent); }
.present-menu { position: relative; }
.present-menu summary { display: flex; align-items: center; gap: 16px; padding: 11px 16px; border: 1px solid var(--line); list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; }
.present-menu summary::-webkit-details-marker { display: none; }
.present-menu-options { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 210px; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 36px #19394b18; }
.present-menu-options button { display: block; width: 100%; text-align: left; padding: 12px; font-size: 13px; }
.present-menu-options button:hover { background: var(--pale); }
#stage { width: 100%; max-width: 1860px; min-height: 0; margin: 0 auto; padding: 20px 3vw 12px; display: flex; flex-direction: column; gap: 14px; outline: none; }
.view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; flex: none; }
.eyebrow { display: block; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 7px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { letter-spacing: -.035em; font-weight: 600; }
h1 { font-size: clamp(25px,2.5vw,40px); line-height: 1.12; margin-bottom: 8px; }
.instruction { font-size: clamp(16px,1.25vw,20px); line-height: 1.4; max-width: 80ch; color: var(--ink); }
.view-kind { flex: none; font-size: 10px; line-height: 1.4; color: var(--muted); border: 1px solid var(--line); padding: 7px 10px; border-radius: 6px; margin-top: 3px; }
.source-panels { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0,.40fr) minmax(0,.60fr); gap: 20px; }
.source-panels.without-pin { grid-template-columns: minmax(0,1fr); }
.source-panel, .detail-panel { min-height: 0; min-width: 0; display: flex; flex-direction: column; background: var(--stage); border-radius: 12px; overflow: hidden; }
.panel-head { min-height: 46px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex: none; border-bottom: 1px solid #dbe6ea; }
.panel-label { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.panel-head .quiet { font-size: 11px; padding: 6px 8px; font-weight: 500; color: var(--accent); }
.panel-head-actions { display: flex; gap: 6px; align-items: center; flex: none; }
.overview-panel, .detail-stage { display: flex; justify-content: center; align-items: center; min-height: 0; min-width: 0; flex: 1; padding: 14px; overflow: hidden; }
.overview-viewport { position: relative; display: block; padding: 0; border: 0; background: white; border-radius: 3px; flex: none; overflow: visible; }
.overview-viewport img { display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; }
.source-highlight { position: absolute; border: 2px solid var(--accent); box-shadow: 0 0 0 2px #ffffffb8; border-radius: 3px; pointer-events: none; z-index: 2; }
.detail-viewport { flex: none; position: relative; background: transparent; }
.detail-image-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 4px; background: white; }
.detail-image-clip img { position: absolute; display: block; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; }
.provenance { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 10px; color: var(--muted); flex: none; min-height: 17px; }
.navigation { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 3vw; border-top: 1px solid var(--line); }
.route-status { display: flex; align-items: center; gap: 18px; min-width: 250px; font-size: 11px; color: var(--muted); }
#modulePosition { font-weight: 650; color: var(--ink); }
#viewPosition { border-left: 1px solid var(--line); padding-left: 18px; font-variant-numeric: tabular-nums; }
.view-tools .quiet { font-weight: 500; font-size: 12px; padding: 10px; }
dialog { color: var(--ink); width: min(800px,94vw); border: 1px solid var(--line); border-radius: 14px; padding: 30px; max-height: 90dvh; background: white; box-shadow: 0 24px 90px #17374e30; }
dialog::backdrop { background: #122d4390; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 29px; line-height: 1.15; }
.close-button { min-width: 36px; height: 36px; border: 1px solid var(--line); font-size: 23px; }
dialog p { line-height: 1.55; margin-bottom: 16px; font-size: 15px; }
.muted { color: var(--muted); }
.section-links { display: grid; gap: 6px; }
.section-link { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; padding: 13px; text-align: left; align-items: center; border: 1px solid var(--line); }
.section-link:hover, .section-link[aria-current="true"] { background: var(--pale); border-color: var(--accent); }
.section-link span { color: var(--accent); font-size: 11px; }
.section-link strong { font-size: 16px; font-weight: 600; }
.section-link small { font-size: 10px; color: var(--muted); }
.inspect-dialog { width: min(1500px,96vw); height: 92dvh; }
.inspect-dialog[open] { display: flex; flex-direction: column; }
.inspect-dialog .dialog-head, .inspect-dialog > p { flex: none; }
.inspect-dialog .dialog-head h2 { font-size: 24px; }
.inspect-dialog > p { font-size: 11px; }
.inspect-scroll { overflow: auto; min-height: 0; flex: 1; padding: 12px; background: var(--stage); border: 1px solid var(--line); border-radius: 7px; }
.inspect-scroll img { display: block; max-width: none; height: auto; }
.zoom-controls { gap: 8px; }
.zoom-controls button { min-width: 36px; padding: 9px; }
.zoom-controls output { font-size: 11px; min-width: 40px; text-align: center; }
.shortcuts { display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 14px; margin: 20px 0; }
.shortcuts dt { font-weight: 650; }
.shortcuts dd { margin: 0; color: var(--muted); }
.notice { background: var(--pale); border-left: 3px solid var(--accent); padding: 14px; color: var(--muted); font-size: 13px; }
#presenterNotes { position: fixed; left: 24px; bottom: 94px; z-index: 12; width: min(550px,90vw); background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 50px #17374e28; padding: 20px 24px; }
#presenterNotes > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; margin-bottom: 10px; }
#presenterNotes p { font-size: 16px; line-height: 1.5; }
.recap { flex: 1; display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 7vw; padding: 2vw; }
.recap h1 { font-size: clamp(35px,4vw,64px); max-width: 11ch; line-height: 1.05; margin-bottom: 22px; }
.recap p { font-size: 20px; color: var(--muted); line-height: 1.5; }
.recap-list { display: grid; gap: 0; }
.recap-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; text-align: left; border-bottom: 1px solid var(--line); }
.recap-link strong { font-weight: 600; font-size: 17px; }
.recap-link small { font-size: 11px; color: var(--muted); display: block; margin-top: 4px; }
.recap-link:hover { color: var(--accent); }
@media (max-height: 820px) and (min-width: 901px) {
  body { grid-template-rows: 64px minmax(0,1fr) 72px; }
  #stage { padding-top: 16px; padding-bottom: 10px; gap: 12px; }
  .view-heading h1 { font-size: 29px; margin-bottom: 6px; }
  .instruction { font-size: 17px; }
  .eyebrow { margin-bottom: 5px; }
  .panel-head { min-height: 42px; padding: 6px 12px; }
  .overview-panel, .detail-stage { padding: 12px; }
}
@media (max-width: 1100px) {
  .recorded-label { display: none; }
  .route-status { min-width: 180px; gap: 12px; }
  #viewPosition { padding-left: 12px; }
  .view-tools { gap: 0; }
  .source-panels { gap: 12px; }
}
@media (max-width: 900px) {
  body { height: auto; min-height: 100dvh; display: block; }
  .topbar { min-height: 72px; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .brand { font-size: 11px; gap: 12px; }
  .brand > span { padding-left: 12px; }
  .brand img { width: 76px; height: 36px; }
  .top-actions { gap: 7px; }
  .top-actions .secondary, .present-menu summary { padding: 9px; font-size: 12px; }
  #stage { min-height: 760px; padding: 22px 16px 14px; }
  .view-heading { gap: 12px; }
  .view-kind { display: none; }
  .source-panels { display: flex; flex-direction: column; min-height: 620px; gap: 14px; }
  .source-panel { min-height: 235px; flex: 0 0 235px; }
  .detail-panel { min-height: 365px; flex: 1; }
  .source-panels.without-pin .source-panel { min-height: 540px; }
  .provenance { flex-wrap: wrap; font-size: 9px; gap: 5px; }
  .navigation { position: sticky; bottom: 0; flex-wrap: wrap; background: var(--paper); padding: 10px 16px; gap: 10px; z-index: 5; }
  .route-status { flex: 1; font-size: 10px; }
  .view-tools { display: none; }
  .advance-controls { flex: 1; justify-content: flex-end; }
  .primary { min-width: 145px; padding: 12px; }
  .recap { display: block; padding: 20px 0; }
  .recap h1 { max-width: 16ch; }
  .recap-list { margin-top: 28px; }
  dialog { padding: 22px; }
  .dialog-head h2 { font-size: 23px; }
  .inspect-dialog .dialog-head { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
/* Current Admin layout: copy left, complete source right, optional hover magnifier. */
.admin-layout { display: grid; grid-template-columns: minmax(250px,.28fr) minmax(0,.72fr); gap: 38px; min-height: 0; flex: 1; }
.view-copy { align-self: center; padding: 6px 0 16px; min-width: 0; }
.view-copy .eyebrow { margin-bottom: 18px; }
.view-copy h1 { font-size: clamp(30px,2.8vw,48px); line-height: 1.12; margin-bottom: 24px; }
.view-copy .instruction { font-size: clamp(17px,1.35vw,23px); line-height: 1.5; }
.view-source-note { margin-top: 28px; font-size: 10px; line-height: 1.6; color: var(--muted); }
.admin-layout > .source-panel { min-height: 0; }
.admin-layout .overview-viewport { cursor: zoom-in; }
.image-hint { flex: none; font-size: 10px; color: var(--muted); text-align: center; padding: 0 12px 12px; }
.hover-lens { position: absolute; pointer-events: none; border: 1px solid var(--accent); box-shadow: 0 0 0 1px #ffffffc0; background: #ffffff08; z-index: 3; }
.magnifier { position: fixed; z-index: 50; pointer-events: auto; padding: 8px; background: white; border: 1px solid #b4c9d2; border-radius: 9px; box-shadow: 0 12px 42px #15384938; cursor: zoom-in; }
.magnifier-label { font-size: 10px; line-height: 16px; color: var(--muted); margin-bottom: 6px; }
.magnifier-clip { position: relative; width: 100%; overflow: hidden; background: white; border-radius: 4px; }
.magnifier-clip img { position: absolute; display: block; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; }
@media (max-height: 820px) and (min-width: 901px) {
  .admin-layout { gap: 30px; grid-template-columns: minmax(250px,.28fr) minmax(0,.72fr); }
  .view-copy h1 { font-size: 32px; margin-bottom: 20px; }
  .view-copy .eyebrow { margin-bottom: 14px; }
  .view-copy .instruction { font-size: 18px; }
  .view-source-note { margin-top: 22px; }
}
@media (max-width: 900px) {
  .admin-layout { display: flex; flex-direction: column; gap: 24px; }
  .view-copy { align-self: stretch; }
  .admin-layout > .source-panel { min-height: 380px; flex: 1; }
  .view-source-note { margin-top: 16px; }
}
.worked-example { margin-top: 22px; border-left: 3px solid var(--accent); padding: 0 0 0 14px; }
.worked-example h2, .guide-onboarding h2 { font-size: 12px; letter-spacing: 0; font-weight: 700; margin-bottom: 7px; }
.worked-example p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.guide-onboarding { margin-top: 20px; }
.guide-onboarding ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.guide-onboarding li + li { margin-top: 6px; }
.learning-check-prompt { margin-top: 22px; }
.learning-check-prompt p { font-size: 13px; line-height: 1.45; color: var(--muted); margin-bottom: 9px; }
.learning-check-prompt button { font-size: 12px; }
.section-link .task-copy small { display: block; font-size: 12px; margin-top: 4px; line-height: 1.4; color: var(--muted); }
.section-link .task-count { white-space: nowrap; }
.check-question { border: 0; padding: 0; margin: 0; }
.check-question legend { font-size: 19px; font-weight: 600; line-height: 1.45; margin-bottom: 18px; }
.check-choice { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 7px; padding: 14px; margin-bottom: 10px; cursor: pointer; font-size: 15px; line-height: 1.45; }
.check-choice:has(input:checked) { background: var(--pale); border-color: var(--accent); }
.check-choice input { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--accent); }
.check-feedback { min-height: 25px; font-size: 15px; line-height: 1.5; margin-top: 16px; }
.check-feedback.correct { border-left: 3px solid var(--accent); padding-left: 12px; }
.check-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
#stage h1:focus { outline: none; }
@media (max-height:820px) and (min-width:901px) {
 .view-copy .eyebrow { margin-bottom: 12px; }
 .view-copy h1 { font-size: 30px; margin-bottom: 18px; }
 .view-copy .instruction { font-size: 17px; line-height: 1.45; }
 .worked-example { margin-top: 18px; }
 .worked-example p { font-size: 13px; line-height: 1.45; }
}
