/* Learning Styles page styles. Served from /library/learning-styles/styles.css */
html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: one reading column; the lesson runs top to bottom (watch → read → do → rate → report), the stage and charts sit on a lit "lab plate". */
:root {
  --bg: #F2F4F3;
  --surface: #FFFFFF;
  --ink: #15202B;
  --muted: #5A6570;
  --line: #D3DADE;
  --blue: #2274D6;
  --blue-ink: #1658A8;
  --yellow: #F2BF00;
  --yellow-ink: #8A6A00;
  --green: #3C9A48;
  --green-ink: #2C7A37;
  --warn: #B4502A;
  --plate: #FBFCFC;
  --focus: #2274D6;
  --f-display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Literata", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1318; --surface: #141C23; --ink: #E4EAEF; --muted: #95A2AD; --line: #27333D;
    --blue: #5AA2F5; --blue-ink: #8BBDF8; --yellow: #F5C842; --yellow-ink: #F5C842;
    --green: #66C373; --green-ink: #7DD08A; --warn: #F08A5F; --plate: #F7F9F9; --focus: #8BBDF8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1318; --surface: #141C23; --ink: #E4EAEF; --muted: #95A2AD; --line: #27333D;
  --blue: #5AA2F5; --blue-ink: #8BBDF8; --yellow: #F5C842; --yellow-ink: #F5C842;
  --green: #66C373; --green-ink: #7DD08A; --warn: #F08A5F; --plate: #F7F9F9; --focus: #8BBDF8;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 28px 64px;
}
.wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 56px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.3rem, 7vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
.eyebrow { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.12rem; color: var(--ink); max-width: 62ch; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; }
header.hero { display: flex; flex-direction: column; gap: 14px; }
.route { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; padding: 0; list-style: none; }
.route li { font-family: var(--f-mono); font-size: 0.8rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; color: var(--muted); background: var(--surface); }
.route li b { color: var(--ink); font-weight: 500; }
.sec-head { display: flex; align-items: baseline; gap: 14px; }
.step { font-family: var(--f-mono); font-size: 0.9rem; color: var(--surface); background: var(--ink); border-radius: 6px; padding: 1px 8px; flex: none; position: relative; top: -3px; }
.tag { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.swatch { display: inline-block; width: 0.8em; height: 0.8em; border-radius: 2px; vertical-align: -0.05em; margin-right: 4px; }
.sw-blue { background: var(--blue); } .sw-yellow { background: var(--yellow); } .sw-green { background: var(--green); }

/* Stage */
.stage { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.plate { background: var(--plate); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 1; position: relative; }
.plate canvas { width: 100%; height: 100%; display: block; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; max-width: 560px; margin: 0 auto; width: 100%; }
.play { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; color: var(--surface); background: var(--ink); border: none; border-radius: 999px; padding: 10px 20px 10px 14px; cursor: pointer; }
.play svg { width: 22px; height: 22px; flex: none; }
.play:hover { filter: brightness(1.15); }
.play[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.icon-btn { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--muted); }
.seek { flex: 1 1 180px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.seek input { flex: 1; min-width: 0; accent-color: var(--blue); }
.clock { font-family: var(--f-mono); font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.audio-note { max-width: 560px; margin: 0 auto; width: 100%; font-style: italic; color: var(--muted); font-size: 0.95rem; }
.caption { max-width: 560px; margin: 0 auto; width: 100%; min-height: 3.3em; font-family: var(--f-display); font-size: 1.08rem; font-weight: 500; line-height: 1.45; color: var(--ink); border-left: 3px solid var(--blue); padding: 2px 0 2px 12px; }

/* Read & write */
figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
figcaption { font-size: 0.93rem; color: var(--muted); }
.chart-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px 8px; overflow-x: auto; }
.chart-box svg { display: block; width: 100%; height: auto; min-width: 520px; }
svg text { font-family: var(--f-mono); fill: var(--muted); }
svg .t-ink { fill: var(--ink); }
svg .axis { stroke: var(--line); }
svg .grid { stroke: var(--line); stroke-dasharray: 2 4; }
svg .c-blue { stroke: var(--blue); } svg .f-blue { fill: var(--blue); }
svg .c-yellow { stroke: var(--yellow-ink); } svg .f-yellow { fill: var(--yellow); }
svg .f-green { fill: var(--green); }
svg .t-blue { fill: var(--blue-ink); } svg .t-yellow { fill: var(--yellow-ink); } svg .t-green { fill: var(--green-ink); }
svg .guide { stroke: var(--muted); stroke-dasharray: 4 4; }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 65ch; }
.prose h3 { margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fact .v { font-family: var(--f-mono); font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.fact .k { font-size: 0.86rem; color: var(--muted); line-height: 1.35; }

/* Quiz */
.qs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; counter-reset: q; }
.qs li { display: flex; flex-direction: column; gap: 8px; counter-increment: q; }
.qs label { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; line-height: 1.35; }
.qs label::before { content: counter(q) ". "; font-family: var(--f-mono); font-weight: 500; color: var(--muted); }
.qs textarea { width: 100%; min-height: 3.2em; resize: vertical; font-family: var(--f-body); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.qs .qrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; }
.qs .qrow .btn:disabled { opacity: 0.55; cursor: default; }
.verdict { font-size: 0.95rem; line-height: 1.45; flex: 1 1 220px; min-width: 0; }
.verdict b { font-family: var(--f-display); font-weight: 700; margin-right: 6px; }
.verdict.ok b { color: var(--green-ink); } .verdict.no b { color: var(--warn); } .verdict.wait { color: var(--muted); font-style: italic; }

/* Do it */
ol.steps { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 8px; max-width: 65ch; }
.why { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; max-width: 65ch; }
.kit { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.kit li { border: 1px dashed var(--line); border-radius: 8px; padding: 4px 10px; font-size: 0.92rem; background: var(--surface); }

/* Survey */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; }
.example-pill { font-family: var(--f-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--yellow); color: #3B2E00; border-radius: 999px; padding: 3px 10px; }
.btn { font-family: var(--f-display); font-weight: 600; font-size: 0.95rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 7.5rem; align-items: center; gap: 6px 14px; }
.row label { font-family: var(--f-display); font-weight: 600; }
.row .sub { display: block; font-family: var(--f-body); font-weight: 400; font-size: 0.82rem; color: var(--muted); }
.row output { font-family: var(--f-mono); font-size: 0.9rem; text-align: right; font-variant-numeric: tabular-nums; }
.row input[type=range] { width: 100%; min-width: 0; }
.rows { display: flex; flex-direction: column; gap: 14px; }
.scale-ticks { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 7.5rem; gap: 14px; }
.scale-ticks .ticks { container-type: inline-size; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.scale-ticks .tk { position: relative; min-height: 1.4em; }
.scale-ticks .tk span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; line-height: 1.3; }
.scale-ticks .tk span:first-child { transform: none; } .scale-ticks .tk span.dnf { transform: translateX(-100%); text-align: right; }
@container (max-width: 420px) { .scale-ticks .tk { min-height: 4.1em; } .scale-ticks .tk span.dnf { top: 1.4em; white-space: normal; width: max-content; max-width: 7ch; } }
.note { font-size: 0.9rem; color: var(--muted); }
.note.warn { color: var(--warn); }
input[type=range] { accent-color: var(--ink); }
.r-va input[type=range] { accent-color: var(--blue); }
.r-rw input[type=range] { accent-color: var(--yellow-ink); }
.r-k input[type=range] { accent-color: var(--green); }
.dnc output { color: var(--warn); }
.disabled { opacity: 0.45; }

.comp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
.col .pct { display: flex; align-items: center; justify-content: center; gap: 4px; font-family: var(--f-mono); }
.col .pct input { width: 4.2em; font-family: var(--f-mono); font-size: 1rem; text-align: right; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--bg); color: var(--ink); }
.col { --c: var(--blue); container-type: inline-size; } .col.rw { --c: var(--yellow); } .col.k { --c: var(--green); }
.col .bar { height: 180px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); position: relative; overflow: hidden; }
.col .bar i { position: absolute; left: 0; right: 0; display: block; transition: height 120ms ease, bottom 120ms ease; }
.col .bar .core { bottom: 0; background: var(--c); }
.col .bar .cmp { background: repeating-linear-gradient(135deg, var(--c) 0 5px, transparent 5px 9px); box-shadow: inset 0 0 0 1.5px var(--c); }
.col .bar .fac { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--f-mono); font-size: 0.9rem; font-weight: 500; color: var(--ink); transition: bottom 120ms ease; }
.cticks { position: relative; height: 1.2em; margin-top: -4px; font-family: var(--f-mono); font-size: 0.68rem; color: var(--muted); }
.cticks span { position: absolute; top: 0; transform: translateX(-50%); }
.cticks span:first-child { transform: none; } .cticks span:last-child { transform: translateX(-100%); }
@container (max-width: 140px) { .cticks span:nth-child(2), .cticks span:nth-child(4) { display: none; } }
.col .fx { text-align: center; font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.col .name { text-align: center; font-family: var(--f-display); font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.split { display: flex; height: 28px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.split span { display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 0.75rem; white-space: nowrap; overflow: hidden; color: #15202B; }
.split .mat { background: repeating-linear-gradient(135deg, var(--line) 0 6px, var(--surface) 6px 12px); color: var(--ink); }
.split { height: 34px; }
.split .va { --c: var(--blue); } .split .rw { --c: var(--yellow); } .split .k { --c: var(--green); }
.split .core { background: var(--c); }
.split .cmp { background: repeating-linear-gradient(135deg, var(--c) 0 5px, transparent 5px 9px); box-shadow: inset 0 0 0 1px var(--c); }
.split b { font-weight: 500; background: rgba(255,255,255,0.92); color: #15202B; border-radius: 4px; padding: 0 4px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { font-family: var(--f-display); font-weight: 600; font-size: 0.95rem; border: none; background: var(--surface); color: var(--ink); padding: 8px 16px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.inline-fields { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.inline-fields label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95rem; }
.inline-fields input { width: 5.5em; font-family: var(--f-mono); font-size: 0.95rem; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; background: var(--bg); color: var(--ink); }

/* Report */
.summary { font-family: var(--f-display); font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 660px; font-size: 0.92rem; }
td { white-space: nowrap; }
th, td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { font-family: var(--f-mono); font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
td { font-family: var(--f-mono); }
td:first-child { font-family: var(--f-display); font-weight: 600; }
tr:last-child td { border-bottom: none; }
.mixes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mix { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.mix.picked { border: 2px solid var(--ink); padding: 11px 13px; }
.mix .lvl { font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.mix .what { font-family: var(--f-display); font-weight: 600; line-height: 1.3; }
.mix .num { font-family: var(--f-mono); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.mix .meta { font-size: 0.84rem; color: var(--muted); line-height: 1.35; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-family: var(--f-mono); font-size: 0.72rem; border-radius: 999px; padding: 1px 8px; color: #15202B; }
.chip.va { background: var(--blue); color: #fff; } .chip.rw { background: var(--yellow); } .chip.k { background: var(--green); color: #fff; }
details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--surface); }
details summary { cursor: pointer; font-family: var(--f-display); font-weight: 600; }
details .prose { margin-top: 10px; font-size: 0.95rem; }
code, .formula { font-family: var(--f-mono); font-size: 0.88rem; }
.export { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
footer { font-size: 0.88rem; color: var(--muted); display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; }
footer ol { margin: 0; padding-left: 1.2em; }
a { color: var(--blue-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .row, .scale-ticks { grid-template-columns: minmax(0, 1fr) 6.5rem; }
  .row label { grid-column: 1 / -1; }
  .scale-ticks > span:first-child { display: none; }
  .comp { gap: 8px; }
  .col .bar { height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .col .bar i { transition: none; } }
