/* The unit's own layer; lesson pages keep their styles and their rendered bytes. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/hanken-grotesk.woff2") format("woff2"); }
.unit-read-entry a, .unit-read-ways a { color: var(--ink); font: 600 15px/1.4 var(--ui); text-underline-offset: .2em; }
.unit-read-entry a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid currentColor; border-radius: 8px; }
.unit-read-ways { display: flex; flex-wrap: nowrap; align-items: center; gap: 24px; overflow-x: auto; margin: 8px 0 12px; }
.unit-read-ways a { flex: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.pg-unit-read { --ui: "Hanken Grotesk", sans-serif; --display: var(--ui); --bg: #faf9f6; --panel: #fff; --ink: #171916; --dim: #41463f; --line: #555b51; --accent: #195536; --accent-soft: #edf4ed; --read-bg: #edf4ed; --read-line: #e5eee5; --rulebg: #edf4ed; --rule-edge: #195536; --warn: var(--ink); --gold: var(--ink); --ok: var(--accent); --row-edge: 24px; color: var(--ink); background: var(--bg); font: 18px/1.6 var(--ui); }
[data-theme="dark"] .pg-unit-read { --bg: #111410; --panel: #171b16; --ink: #f8faf5; --dim: #d2d8cf; --line: #929b8d; --accent: #a9ccb2; --accent-soft: #203023; --read-bg: #203023; --read-line: #203023; --rulebg: #203023; --rule-edge: #a9ccb2; --warnbg: #20251e; --goldbg: #20251e; }
/* With no script the look follows the device, as site.css does: the unit's dark tokens, not its light ones over the site's dark. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pg-unit-read { --bg: #111410; --panel: #171b16; --ink: #f8faf5; --dim: #d2d8cf; --line: #929b8d; --accent: #a9ccb2; --accent-soft: #203023; --read-bg: #203023; --read-line: #203023; --rulebg: #203023; --rule-edge: #a9ccb2; --warnbg: #20251e; --goldbg: #20251e; } }
html:has(> body.pg-unit-read) { scroll-behavior: auto; scroll-padding-top: 0; }
.pg-unit-read .lay { max-width: 900px; padding-top: 24px; }
.pg-unit-read .top { height: 56px; box-sizing: border-box; background: var(--bg); }
.pg-unit-read .top-tools { margin-left: auto; }
.pg-unit-read .top a, .pg-unit-read a { color: var(--ink); }
/* The page's own controls only: the header's keys keep the size the site gives them, so the look key matches Reading and Help. */
.pg-unit-read main :is(button, input, select, summary) { font-family: var(--ui); font-size: max(15px, 1em); }
.pg-unit-read :is(button, input, select) { border-color: var(--line); }
.pg-unit-read :is(button, summary, a):focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.pg-unit-read :is(h1, h2, h3, h4, h5, h6) { font-family: var(--ui); color: var(--ink); font-weight: 600; }
.pg-unit-read h1 { font-size: 36px; line-height: 1.15; max-width: 24ch; }
.unit-read-head > p { margin: 12px 0; }
.unit-read-head .unit-read-where { font-size: 15px; color: var(--dim); }
.unit-read-head .unit-progress { font-size: 15px; color: var(--dim); }
.unit-read-keys, .unit-lesson-end { display: flex; flex-wrap: nowrap; align-items: center; gap: 20px; overflow-x: auto; }
.unit-read-keys > *, .unit-lesson-end > * { flex: none; white-space: nowrap; margin: 0; min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; }
.pg-unit-read .listen { color: var(--bg); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 22px; font-weight: 600; background: var(--accent); }
.unit-listen-status:empty { display: none; }
.unit-section-nav { position: sticky; top: 56px; z-index: 4; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; background: var(--bg); border-block: 1px solid var(--line); margin: 24px 0 32px; padding: 4px 24px 4px 0; }
.unit-section-nav.unit-more, .unit-read-ways.unit-more, .unit-read-keys.unit-more, .unit-lesson-end.unit-more { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.unit-section-nav a { flex: none; display: inline-flex; align-items: center; gap: 8px; max-width: 220px; min-height: 44px; padding: 0 10px; font-size: 15px; text-decoration: none; border-bottom: 3px solid transparent; }
.unit-section-nav a[aria-current] { border-bottom-color: var(--ink); font-weight: 600; }
.unit-section-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-section-number, .unit-section-mark { flex: none; }
.unit-glance { margin-bottom: 64px; }
.unit-glance h2 { font-size: 28px; margin: 0 0 24px; }
.unit-glance-lessons { padding-left: 24px; }
.unit-glance-lessons > li { padding: 0 0 20px 8px; }
.unit-glance-lessons a { font-weight: 600; }
.unit-glance-lessons p { margin: 4px 0 0; }
.unit-glance-group { border-top: 1px solid var(--line); }
.unit-glance-group:last-child { border-bottom: 1px solid var(--line); }
.unit-glance-group > summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-weight: 600; }
.unit-glance-group > summary span { color: var(--dim); font-size: 15px; font-weight: 400; }
.unit-glance-group > ul { list-style: none; padding: 0; }
.unit-glance-group > ul > li { margin: 0 0 28px; }
.unit-glance-group a { font-weight: 600; }
.unit-glance-group p { margin: 8px 0; }
.pg-unit-read .unit-lesson, .pg-unit-read .th.lesson > .blk { scroll-margin-top: 136px; }
.unit-lesson { border-top: 2px solid var(--line); margin-top: 64px; padding-top: 28px; }
.unit-lesson-head { margin: 0 0 36px; }
.unit-lesson-head p { margin: 0 0 8px; color: var(--dim); font-size: 15px; }
.unit-lesson-head h2 { margin: 0 0 12px; font-size: 28px; line-height: 1.25; }
.unit-lesson-head a { font-size: 15px; }
.pg-unit-read .th.lesson { margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; font: calc(18px * var(--text-scale, 1))/1.65 var(--ui); }
.pg-unit-read .th.lesson > .blk { margin: 28px 0; padding: 0; }
.pg-unit-read .th.lesson :is(h3, h4, h5, h6) { font-size: 22px; line-height: 1.3; margin: 28px 0 12px; }
.pg-unit-read .th.lesson .blk > h3 .n { display: inline-block; margin-inline-end: 14px; padding-inline-end: 14px; border-inline-end: 1px solid var(--line); font: inherit; color: var(--ink); }
.pg-unit-read .th.lesson .blk.now-reading > h3 { color: var(--ink); }
/* The block being read carries the lesson page's bar beside its tint, and the step its tint and outline: the tint
   alone is too faint to find. Under sentence following only the spoken sentence is underlined, as on a lesson page. */
.pg-unit-read .th.lesson > .blk.now-reading::before { content: ""; position: absolute; z-index: -1; inset: -6px -12px; border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; background: var(--read-bg); pointer-events: none; }
.pg-unit-read .unit-reading .now-step { background-color: var(--read-line); outline: 3px solid var(--read-line); border-radius: 2px; }
html.sentence-following .pg-unit-read .unit-reading .now-step { text-decoration: none; }
.pg-unit-read .th.lesson { --curve: var(--accent); --mid: var(--ink); }
.pg-unit-read .th.lesson :is(p, li, td, .math) { font-size: max(18px, 1em); color: var(--ink); }
.pg-unit-read .th.lesson :is(.n, .wl, .k, .blk-say, .ladder-say, summary, figcaption, .ex-label, .ex-meta, small) { font-size: max(15px, .833333em); color: var(--ink); }
.pg-unit-read .th.lesson .rule-first { font: 600 22px/1.5 var(--ui); color: var(--ink); background: var(--rulebg); border-left: 3px solid var(--rule-edge); padding: 16px 20px; }
.pg-unit-read .th.lesson :is(figure, .explorer, .scene) { content-visibility: auto; contain-intrinsic-size: auto 360px; }
.unit-lesson-end { padding-block: 24px; border-top: 1px solid var(--line); }
.pg-unit-read .tick { margin: 0; font-size: 15px; border-radius: 8px; color: var(--ink); }
.pg-unit-read .tick[aria-pressed="true"] { color: var(--bg); background: var(--accent); }
.pg-unit-read .unit-saved-mark { font-size: 15px; font-weight: 600; border-left: 3px solid var(--ink); padding-left: 10px; }
.pg-unit-read .foot, .pg-unit-read .foot a { color: var(--dim); font: 15px/1.5 var(--ui); }
.pg-unit-read #transport .unit-listening-lesson { height: 28px; box-sizing: border-box; margin: 0; padding: 2px 16px; font: 600 15px/24px var(--ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); background: var(--panel); }
html.narrated:has(.pg-unit-read #transport.tp-bar) { --bar-h: calc(84px + env(safe-area-inset-bottom, 0px)); }
.pg-unit-read #transport :is(button, small, .cue-status, .cue-name) { font-size: 15px; }
@media (max-width: 599px) { .pg-unit-read h1 { font-size: 28px; } .unit-section-nav { margin-inline: -4px; } .unit-section-nav a { max-width: 190px; } }
@media (prefers-reduced-motion: reduce) { .pg-unit-read *, .pg-unit-read *::before, .pg-unit-read *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .unit-more { mask-image: none !important; } .pg-unit-read .th.lesson > .blk.now-reading::before { border-left-color: Highlight; } .pg-unit-read .unit-reading .now-step { outline-color: Highlight; } .unit-section-nav a[aria-current] { border-color: CanvasText; } .pg-unit-read .tick[aria-pressed="true"] { outline: 2px solid CanvasText; } }
@media print { .unit-section-nav, .unit-read-keys, .unit-lesson-end { display: none; } .pg-unit-read .th.lesson > .blk.now-reading::before { content: none; } .pg-unit-read .th.lesson :is(figure, .explorer, .scene) { content-visibility: visible; } }
