:root {
  color-scheme: dark;
  --bg: #090a0d; --surface: #14161b; --text: #f3f4f6; --muted: #a4a8b1;
  --accent: #c6e7fa; --separator: #d6e5fa23; --nav-height: 65px;
  --bottom-inset: max(env(safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --side-gutter: clamp(16px, 5vw, 32px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main:focus { outline: none; }
svg { inline-size: 19px; block-size: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.shell { max-width: 680px; min-height: 100dvh; margin-inline: auto; }
main {
  padding: clamp(20px, 5vw, 36px) var(--side-gutter) calc(var(--nav-height) + 32px + var(--bottom-inset));
  padding-left: max(var(--side-gutter), env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
  padding-right: max(var(--side-gutter), env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
}
[data-telegram] main { padding-top: max(20px, env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))); }
:where(a, button, input) { scroll-margin-block: 12px calc(var(--nav-height) + var(--bottom-inset) + 20px); }
.identity { min-height: 68px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 22px; }
.identity h1 { font-size: clamp(33px, 8vw, 48px); line-height: 1.02; letter-spacing: -.055em; }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .3em; text-transform: uppercase; }
.monogram { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--separator); border-radius: 50%; color: #e6e8ed; font: 23px/1 Georgia, serif; }
h1 { margin: 0; font-size: clamp(26px, 6.7vw, 38px); line-height: 1.12; letter-spacing: -.038em; font-weight: 650; text-wrap: balance; }
.page-intro { margin: 0 0 18px; }
.page-intro p { margin: 8px 0 0; max-width: 46ch; }
.muted, small, .status { color: var(--muted); }
.status { max-width: 48ch; }
.feature-stack { display: grid; gap: 10px; }
.feature, .section-hero {
  --art: none;
  border: 1px solid var(--separator);
  background-color: #111318;
  background-image: linear-gradient(90deg, #12151bf7 4%, #12151bc9 44%, #12151b35 100%), var(--art);
  background-size: cover; background-position: center;
  border-radius: 23px;
}
.cover-marathon { --art: url('/design/marathon.webp?v=title-cards'); }
.cover-income { --art: url('/design/income.webp'); }
.cover-foundation { --art: url('/design/foundation.webp?v=title-cards'); }
.cover-archive { --art: url('/design/archive.webp?v=title-cards'); }
.feature { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-block-size: 100px; padding: 18px; text-decoration: none; }
.feature .row-copy, .feature-copy { display: grid; gap: 5px; max-width: 84%; min-width: 0; }
.feature .row-copy strong, .feature-copy strong { font-size: clamp(20px, 5.2vw, 29px); line-height: 1.1; letter-spacing: -.025em; font-weight: 640; }
.feature .row-copy small, .feature-copy .feature-detail { line-height: 1.35; color: #c4c8d0; }
.feature > svg { align-self: center; color: #d3dae2; }
.feature:active { filter: brightness(1.13); }
.feature-primary {
  min-block-size: 132px; border-color: #c6e7fa70;
  box-shadow: inset 0 1px 14px #b4e1f31d;
  background-image: linear-gradient(90deg, #14191ff7 0%, #11161bbe 45%, #13191e39 100%), var(--art);
}
.shelves .cover-marathon { min-block-size: 172px; }
.shelves .cover-codex { min-block-size: 76px; }
.progress-summary { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; padding-inline: 5px; }
.progress-summary progress { inline-size: 64px; block-size: 4px; accent-color: var(--accent); }
.quick-links { margin-block-start: 18px; border-top: 1px solid var(--separator); }
.quick-link { min-height: 50px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--separator); text-decoration: none; gap: 12px; font-weight: 535; }
.quick-link svg, .result-row svg { color: var(--muted); width: 16px; }
.library-search {
  display: flex; gap: 10px; align-items: center; padding-inline: 14px; margin-block-end: 14px;
  min-height: 46px; border: 1px solid var(--separator); border-radius: 15px; background: var(--surface); color: var(--muted);
}
.library-search input { background: transparent; color: var(--text); flex: 1; min-inline-size: 0; border: 0; padding: 10px 0; }
.library-search input:focus { outline: none; }
.library-search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.section-hero { padding: 22px; min-height: 152px; display: flex; flex-direction: column; justify-content: flex-end; }
.section-hero p { color: #c4c8d0; }
.lesson-title { margin-block: 4px 18px; }
.group { padding: 0; margin: 0; list-style: none; }
.group li + li { border-top: 1px solid var(--separator); }
.row {
  --leading: 31px;
  display: grid; grid-template-columns: var(--leading) minmax(0, 1fr); align-items: center;
  column-gap: 12px; padding: 10px 3px; min-height: 63px; text-decoration: none;
}
.row:has(> :is(.lock,.check)) { grid-template-columns: var(--leading) minmax(0, 1fr) 18px; }
.row:active, .quick-link:active { background: #d6e5fa13; }
.row.result-row { grid-template-columns: minmax(0, 1fr); }
.row.result-row:has(> .lock) { grid-template-columns: minmax(0, 1fr) 18px; }
.row-copy { display: grid; gap: 3px; min-width: 0; }
.row-copy strong { font-weight: 630; line-height: 1.2; overflow-wrap: anywhere; }
.row-copy small { font-size: 13px; overflow-wrap: anywhere; }
.number { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: var(--muted); border: 1px solid var(--separator); font-size: 13px; font-variant-numeric: tabular-nums; }
.current .number { background: #b7dff329; color: var(--accent); border-color: #c6e7fa57; }
.locked .row-copy strong { color: #c1c4cb; }
.lock { position: relative; justify-self: center; width: 12px; height: 9px; margin-top: 5px; border: 1.5px solid var(--muted); border-radius: 2px; }
.lock::before { content: ''; position: absolute; width: 5px; height: 5px; left: 2px; bottom: calc(100% + 1px); border: 1.5px solid var(--muted); border-bottom: 0; border-radius: 5px 5px 0 0; }
.check { color: var(--accent); text-align: center; }
.back, .text-link { color: var(--accent); display: inline-flex; gap: 4px; align-items: center; min-height: 44px; margin-block-end: 12px; text-decoration: none; }
.text-link { margin-block: 12px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 8px 16px; text-align: center; border-radius: 24px; border: 1px solid var(--separator); font: inherit; font-weight: 620; text-decoration: none; color: var(--text); background: var(--surface); }
.button.primary { background: #b5dffc1d; border-color: #c6e7fa60; color: var(--accent); }
.player { display: block; width: 100%; aspect-ratio: 16 / 9; background: #101013; border: 1px solid var(--separator); border-radius: 16px; }
.after-player { margin-block-start: 14px; }
/* One unambiguous playback action; the entire photographic card remains the target. */
.playback-disc {
  display: inline-grid; place-items:center; flex:0 0 auto; box-sizing:border-box;
  width:29px; height:29px; border-radius:50%; color:#f1f5fa;
  border:1px solid #d5e0ee52; background:#141a22d1;
}
.playback-triangle {
  display:inline-block; width:0; height:0; margin-inline-start:2px;
  border-inline-start:7px solid currentColor; border-block:4.5px solid transparent;
}
.material-plate > .playback-disc { position:absolute; inset-block-start:11px; inset-inline-end:12px; }
.material-plate .plate-resume { color:#bfddf6; font-size:.79rem; line-height:1.28; font-weight:550; font-variant-numeric:tabular-nums; }
.playback-action, .home-resume { -webkit-tap-highlight-color: transparent; }
.playback-action {
  display:inline-flex; align-items:center; gap:9px; min-height:44px; padding:7px 16px 7px 10px;
  font:inherit; font-size:.94rem; font-weight:580; letter-spacing:-.012em; color:#e4f0fa;
  border:1px solid #536a7c; border-radius:999px; background:#203141; cursor:pointer;
}
.playback-action .playback-disc { width:23px; height:23px; border:0; color:#e4f1ff; background:#395167; }
.playback-disc.is-reload .playback-triangle { display:none; }
.playback-disc.is-reload::before { content:'↻'; font-size:17px; line-height:1; }
.playback-action[hidden],.playback-info:empty { display:none; }
.playback-action:active,.home-resume:active { background:#2b3d4c; }
.home-resume {
  display:flex; align-items:center; gap:11px; min-height:54px; margin-block:3px 4px; padding:7px 12px;
  color:var(--type-primary); border:1px solid #455261; border-radius:15px; background:linear-gradient(105deg,#19222b,#15191f); text-decoration:none;
}
.home-resume-copy { display:grid; gap:3px; min-width:0; }
.identity .profile-badge.profile-trigger {
  inline-size:44px; block-size:44px; box-sizing:border-box; text-decoration:none;
  box-shadow:inset 0 1px 0 #e7f2ff1f; cursor:pointer;
}
.profile-trigger:focus-visible,.my-materials a:focus-visible { outline:2px solid #a2c6e7; outline-offset:3px; }
.my-materials { min-inline-size:0; }
.my-materials .page-intro { margin-block-end:20px; }
.my-course,.my-empty,.my-resume-list {
  border:1px solid #363e49; border-radius:17px; background:linear-gradient(118deg,#192029,#14181e);
}
.my-course {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:11px 14px; min-height:62px; padding:13px 15px; color:var(--type-primary); text-decoration:none;
}
.my-course strong,.my-resume-row strong { font-size:1rem; line-height:1.26; font-weight:580; letter-spacing:-.012em; overflow-wrap:anywhere; }
.my-course-count,.my-resume-row small { color:#bcd3e9; font-size:.84rem; line-height:1.28; font-variant-numeric:tabular-nums; white-space:nowrap; }
.my-course-rail { grid-column:1/-1; height:3px; border-radius:99px; overflow:hidden; background:#3a424c; }
.my-course-rail::before { content:''; display:block; height:100%; width:var(--my-course-percent,0%); background:#9dbbd7; }
.my-materials .shelf-heading { margin:24px 2px 9px; }
.my-resume-list { margin:0; padding:0; list-style:none; overflow:hidden; }
.my-resume-list li + li { border-top:1px solid #343b44; }
.my-resume-row {
  display:grid; grid-template-columns:29px minmax(0,1fr) auto; align-items:center; gap:11px;
  min-height:55px; padding:10px 13px; color:var(--type-primary); text-decoration:none;
}
.my-resume-row:focus-visible { outline-offset:-3px !important; }
.my-empty { margin-block-start:18px; padding:17px 15px 11px; }
.my-empty h2 { margin:0; color:var(--type-primary); font-size:1rem; line-height:1.32; font-weight:595; }
.my-empty p { margin:6px 0 3px; max-inline-size:37ch; color:var(--type-secondary); line-height:1.45; }
.my-start { display:inline-flex; min-height:44px; align-items:center; color:#b4d7f4; font-weight:555; text-decoration:none; }
.my-course:active,.my-resume-row:active { background:#28333f; }
.my-materials {container:personal / inline-size;}
@container personal (max-width:14rem) {
  .my-resume-row { grid-template-columns:25px minmax(0,1fr); gap:3px 9px; }
  .my-resume-row .playback-disc { grid-row:1/3; width:24px; height:24px; }
  .my-resume-row small { grid-column:2; }
  .my-course { grid-template-columns:minmax(0,1fr); gap:5px; }
}
.home-resume-copy small { color:#bfddf6; font-size:.76rem; font-weight:550; font-variant-numeric:tabular-nums; }
.home-resume-copy strong { font-size:.94rem; font-weight:575; line-height:1.18; overflow-wrap:anywhere; }
.home-resume:focus-visible,.playback-action:focus-visible { outline:2px solid #a2c6e7; outline-offset:2px; }
@media (forced-colors:active) { .playback-disc { border:1px solid ButtonText; } }
.tabs {
  position: fixed; bottom: max(10px, var(--bottom-inset)); left: 50%; transform: translateX(-50%); z-index: 1;
  width: min(calc(100% - 28px), 384px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px;
  border: 1px solid #d6e5fa39; border-radius: 34px; background: #1b1e24;
  box-shadow: inset 0 1px 1px #ffffff18, 0 8px 25px #0009;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabs { background: #1b1e24d9; -webkit-backdrop-filter: blur(23px) saturate(125%); backdrop-filter: blur(23px) saturate(125%); }
}
.tabs a { display: grid; gap: 2px; align-content: center; justify-items: center; min-height: 53px; min-width: 0; text-align: center; text-decoration: none; color: #b2b6bf; font-size: 11px; }
.tabs a[aria-current] { color: var(--accent); font-weight: 650; background: #b9ddf31b; box-shadow: inset 0 0 0 1px #b9ddf33f; border-radius: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (min-width: 740px) { .shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shelves .cover-marathon { grid-column: 1 / -1; } }
@media (prefers-reduced-transparency: reduce) { .tabs { background: #1b1e24; -webkit-backdrop-filter: none; backdrop-filter: none; } }

.identity { margin-block-end: 16px; }
.protocol-mark { position: relative; overflow: hidden; width: 52px; height: 52px; background: #07080a; }
.protocol-mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.study-progress { margin: 0 0 13px; padding: 15px 16px 13px; border: 1px solid var(--separator); border-radius: 21px; background: linear-gradient(115deg,#16191f,#111318); }
.study-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.study-top h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.study-progress progress { display: block; width: 100%; height: 5px; margin-block: 10px 7px; border: 0; border-radius: 10px; overflow: hidden; background: #343841; accent-color: var(--accent); }
.study-progress progress::-webkit-progress-bar { background: #343841; }
.study-progress progress::-webkit-progress-value { background: #c6e7fa; }
.progress-note { margin: 0; font-size: 12px; color: var(--muted); }
.profile-badge { width: 43px; height: 43px; display: grid; place-items: center; position: relative; overflow: hidden; flex: none; background: #232933; border: 1px solid #c6e7fa4d; border-radius: 50%; color: var(--accent); font-size: 18px; font-weight: 630; }
.profile-badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-stack .cover-foundation { min-height: 104px; }
.row.has-thumbnail { --leading: clamp(64px, 18vw, 77px); min-height: 65px; }
.material-thumb { display: grid; position: relative; place-items: center; width: var(--leading, 77px); aspect-ratio: 16/9; overflow: hidden; border: 1px solid var(--separator); border-radius: 9px; background-color: #222630; background-image: var(--art); background-size: cover; background-position: center; }
.material-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.material-thumb .thumb-fallback { position: relative; text-shadow: 0 1px 5px #000; color: #fff; font-size: 13px; font-weight: 700; }
.material-thumb:has(img) .thumb-fallback { display: none; }
.video-timecodes { margin-block: 23px 10px; }
.video-timecodes:empty { display: none; }
.video-timecodes h2 { font-size: 19px; margin: 0 0 10px; }
.timecode-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.timecode { min-height: 44px; padding: 6px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--separator); border-radius: 11px; }
.timecode-time { color: var(--accent); font-variant-numeric: tabular-nums; }
.timecode[aria-current] { border-color: #c6e7fa7a; background: #202a35; }
.timecode-list.named { display: grid; gap: 0; border-top: 1px solid var(--separator); }
.timecode-list.named li { border-bottom: 1px solid var(--separator); }
.timecode-list.named .timecode {
  display: grid; grid-template-columns: 65px minmax(0, 1fr); align-items: center;
  width: 100%; min-height: 49px; gap: 8px; padding: 9px 8px; border: 0;
  border-radius: 0; background: transparent; text-align: start; font-size: 15px; line-height: 1.35;
}
.timecode-list.named .timecode-time { font-size: 13px; font-weight: 580; }
.timecode-list.named .timecode[aria-current] {
  background: #c6e7fa0f; box-shadow: inset 2px 0 var(--accent);
}
.timecode-list.named .timecode:active { background: #c6e7fa1c; }

/* Search and the newcomer route */
.catalog-search { margin-block: 0 15px; }
.catalog-search .library-search { margin: 0; min-height: 50px; }
.catalog-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-clear { flex: 0 0 44px; min-height: 44px; margin-inline-end: -10px; padding: 0; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 23px; }
.search-count { margin: 14px 0 10px; color: var(--muted); font-size: 13px; }
.search-time { min-width: 46px; color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.search-more { margin-block: 12px; }
.search-intro { max-inline-size: 41ch; margin: 20px 2px; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.newcomer-entry {
  display: flex; align-items: center; min-height: 60px; padding: 12px 16px;
  border: 1px solid #345b79; border-radius: 16px; text-decoration: none;
  background: #153855 linear-gradient(110deg, #173e60, #112e4b);
}
.newcomer-entry .row-copy { flex: 1; min-inline-size: 0; gap: 4px; }
.newcomer-entry .row-copy strong { color: #f0f8ff; font-size: 1.125rem; font-weight: 650; line-height: 1.18; letter-spacing: -.024em; }
.newcomer-entry .row-copy small { font-size: .8125rem; line-height: 1.35; color: #c3d9eb; }

/* Newcomer route: a photographic next action above a quieter second stage. */
.guide-page {
  display: grid; gap: clamp(14px, 4vw, 23px);
  --guide-copy: #c6d0dc; --guide-paper: #112335;
  --guide-border: #2b4257;
}
.guide-page :is(h2,p) { margin: 0; }
.guide-welcome {
  display: grid; gap: 7px; padding: 12px 1px 3px;
  border-block-start: 1px solid var(--separator);
}
.guide-welcome p {
  max-inline-size: 55ch; color: var(--guide-copy);
  font-size: .9375rem; line-height: 1.44; overflow-wrap: break-word;
}
.guide-welcome .guide-greeting {
  color: #f0f3f8; font-size: 1.0625rem; font-weight: 650; line-height: 1.3;
}
.guide-marathon, .guide-foundation {
  padding: clamp(13px, 3.65vw, 19px); min-inline-size: 0;
  border: 1px solid var(--guide-border); border-radius: 17px; background: var(--guide-paper);
}
.guide-section-heading {
  display: grid; grid-template-columns: minmax(0,max-content) max-content max-content;
  align-items: baseline; gap: clamp(5px, 1.4vw, 9px);
}
.guide-section-heading h2 {
  min-inline-size: 0; font-size: clamp(1.13rem, 4.8vw, 1.43rem); font-weight: 660;
  line-height: 1.19; letter-spacing: -.025em; overflow-wrap: anywhere;
}
.guide-divider { color: #8593a6; font-weight: 400; }
.guide-step, .guide-status {
  align-self: baseline; white-space: nowrap; color: #c2dbf0;
  font-size: .875rem; font-weight: 610; line-height: 1.3; font-variant-numeric: tabular-nums;
}
.guide-art {
  display: block; inline-size: 100%; block-size: auto; aspect-ratio: 14 / 5;
  margin-block-start: 11px; object-fit: cover; object-position: center;
  background: #101822; border-radius: 10px;
}
.guide-page .guide-description {
  margin-block-start: 7px; max-inline-size: 52ch; color: var(--guide-copy);
  font-size: .875rem; line-height: 1.45; overflow-wrap: break-word;
}
.guide-page .guide-action, .foundation-gate .button.primary {
  display: flex; width: 100%; min-height: 47px; margin-block-start: 15px; padding: 10px 14px;
  color: #0c2438; background: #baddfa; border: 0; border-radius: 12px;
  font-size: 1rem; font-weight: 630; line-height: 1.3;
}
.guide-page .guide-action { margin-block-start: 12px; border-radius: 11px; }
.guide-foundation { background: #15181e; border-color: #292e37; }
.guide-foundation .guide-stage {
  margin-block-end: 5px; color: #a4afbe; font-size: .75rem; font-weight: 600; line-height: 1.25;
}
.guide-foundation .guide-section-heading h2 {
  font-size: clamp(1.025rem, 4.4vw, 1.26rem);
}
.guide-foundation .guide-status {
  display: inline-flex; align-items: center; gap: 5px; color: #ff9a99; font-size: .8125rem;
}
.guide-foundation .guide-lock {
  flex: none; width: 10px; height: 7px; margin-block-start: 3px; border-color: currentColor;
}
.guide-foundation .guide-lock::before {
  width: 4px; height: 4px; left: 1.5px; bottom: 100%; border-color: currentColor;
}
.guide-foundation .guide-description { color: #b9c3cf; }
.guide-foundation.is-open { background: var(--guide-paper); border-color: var(--guide-border); }
.guide-foundation.is-open .guide-status { color: #b7d9f3; }
.guide-page:has(.guide-foundation.is-open) .guide-marathon {
  padding: 0 1px; border: 0; border-radius: 0; background: transparent;
}

/* Marathon: the seven lessons form one ordered list. Only the current
   lesson gets a large, edge-to-edge editorial cover; no art for future rows. */
.marathon-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 16px; padding-block: 4px 14px; border-bottom: 1px solid var(--separator);
}
.marathon-heading h1 { min-inline-size: 0; font-size: clamp(1.65rem, 6.3vw, 2.25rem); }
.marathon-edition {
  flex: none; padding-inline: 3px;
  color: #c4cfda; font: 550 clamp(2.4rem, 9.5vw, 3.25rem)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
}
.marathon-list { list-style: none; margin: 0; padding: 0; }
.marathon-list > li + li { margin-block-start: 3px; }
.marathon-row {
  display: grid; grid-template-columns: clamp(88px, 24vw, 135px) minmax(0, 1fr);
  align-items: center; gap: clamp(12px, 3.8vw, 22px); min-width: 0;
  padding: 10px 2px; color: var(--text); border-block-end: 1px solid #d6e5fa17; text-decoration: none;
}
.marathon-list > li:last-child .marathon-row { border-block-end-color: transparent; }
.marathon-cover {
  display: grid; place-items: center; width: 100%; aspect-ratio: 16/9; overflow: hidden;
  border-radius: 10px; background: #151a20;
}
.marathon-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.marathon-copy { display: grid; justify-items: start; gap: 4px; min-inline-size: 0; }
.marathon-copy strong {
  color: #ebeff4; font-size: clamp(1rem, 3.8vw, 1.17rem); line-height: 1.23;
  font-weight: 620; letter-spacing: -.014em; overflow-wrap: anywhere;
}
.marathon-number, .marathon-state {
  color: #9aa8b7; font-size: .785rem; font-weight: 500; line-height: 1.33; font-variant-numeric: tabular-nums;
}
.marathon-row.is-current {
  grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0;
  margin-block: 8px; overflow: hidden; background: #121b25;
  border: 1px solid #344556; border-radius: 16px;
}
.marathon-list > li:last-child .is-current { border-block-end-color: #344556; }
.is-current .marathon-cover {
  aspect-ratio: 16/9; border-radius: 0;
  border-block-end: 1px solid #c8d9ed13;
}
.is-current .marathon-copy {
  grid-template-columns: minmax(0, 1fr) max-content; column-gap: 8px; row-gap: 4px;
  padding: 13px clamp(13px, 3.8vw, 20px) 15px; align-items: baseline;
}
.is-current .marathon-number { grid-column: 1; grid-row: 1; color: #c6d8e8; }
.is-current .marathon-copy strong {
  grid-column: 1 / -1; grid-row: 2; font-size: clamp(1.14rem, 4.65vw, 1.45rem); color: #f3f5f8;
}
.is-current .marathon-state { grid-column: 2; grid-row: 1; color: #a7d6fa; }
.marathon-duration { color: #a4afbd; white-space: nowrap; }
.is-complete .marathon-state { color: #adbecc; }
.is-locked .marathon-cover { background: #14171c; border: 1px solid #23282e; }
.is-locked .marathon-cover .lock { --muted: #788493; }
.is-locked .marathon-copy strong { color: #b3bac4; font-weight: 550; }
.is-locked .marathon-state { color: #949fac; }
a.marathon-row:active { background-color: #202c38; }
@media (hover: hover) and (pointer: fine) {
  a.marathon-row:hover { background-color: #1c252f; }
}
.foundation-gate { max-inline-size: 56ch; }

/* Original photographic plates + native type: titles never depend on pixels. */
.material-plate {
  position: relative; isolation: isolate; display: grid; align-items: end;
  min-inline-size: 0; overflow: hidden; background: #10171e; color: #f7f8fa;
}
.material-plate img {
  position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.material-plate::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #090d13de 0%, #090e15a8 39%, #09101816 85%),
    linear-gradient(0deg,#070b1170,transparent 58%);
}
.plate-copy {
  display: grid; gap: 5px; align-content: end; justify-items: start; width: 100%;
  box-sizing: border-box; padding: 14px 16px; text-align: start;
}
.plate-copy .plate-series {
  display: block; font-size: .73rem; font-weight: 630; line-height: 1.25;
  color: #c8d6e5; letter-spacing: .035em;
}
.plate-copy .plate-title {
  display: block; max-width: min(81%, 30ch); font-weight: 635; font-size: clamp(1.09rem, 4vw, 1.38rem);
  letter-spacing: -.025em; line-height: 1.13; color: #f7f8fa;
  text-wrap: pretty; overflow-wrap: anywhere; text-shadow: 0 1px 5px #02050875;
}
.plate-copy .plate-meta { color: #c5d0dc; font-size: .75rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.marathon-row:has(.material-plate) {
  display: grid; grid-template-columns: minmax(0,1fr); gap: 0; padding: 0;
  background: #121920; overflow: hidden; border: 1px solid #293540; border-radius: 15px; margin-block: 8px;
}
.marathon-row.is-current { border-color: #3c5265; }
.marathon-row .material-plate { display: grid; place-items: end start; border-radius: 0; }
.marathon-row.is-current .marathon-number {
  font-size: clamp(1.02rem,4vw,1.3rem); color: #d5e7f7; font-weight: 650; letter-spacing: -.02em;
}
.marathon-row.is-current .plate-copy { gap: 7px; padding: clamp(16px,5vw,25px); }
.marathon-row.is-current .plate-title { font-size: clamp(1.45rem,6.2vw,2.1rem); line-height: 1.08; }
.marathon-row:has(.material-plate) .marathon-copy { display: block; padding: 8px 15px 9px; }
.recording-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.recording-row { display: block; border-radius: 15px; text-decoration: none; }
.recording-cover {
  min-block-size: clamp(108px,30vw,145px); border-radius: 15px;
  border: 1px solid #2b333d;
}
.recording-row:active .material-plate { border-color: #86a6bf; }
.material-viewer { display: grid; grid-template-columns: minmax(0,1fr); position: relative; container: playback / inline-size; }
/* At large system text sizes, don't squeeze the title into a fixed video poster.
   Container queries are relative to the actual viewer and the user's root font. */
@container playback (max-width: 16rem) {
  .material-viewer.has-video > .material-plate.player-cover {
    position:static; inset:auto; display:block; grid-area:1/1;
    aspect-ratio:auto; height:auto; width:auto; overflow:visible; clip-path:none;
    background:transparent; border:0;
  }
  .material-viewer.has-video > .material-plate.player-cover::before { display:none; }
  .material-viewer.has-video > .player { grid-area:2/1; }
  .material-viewer.has-video > .player-cover .plate-copy { width:100%; padding:0 0 .4rem; }
  .material-viewer.has-video > .player-cover .plate-title { max-width:100%; }
  .material-viewer.has-video > .player-cover .plate-brand { display:none; }
  .material-viewer:not(.has-video) > .material-plate.player-cover { aspect-ratio:auto; min-height:4rem; }
}
.material-viewer .player-cover, .material-viewer .player { grid-area: 1 / 1; align-self: stretch; }
.player-cover { aspect-ratio: 16/9; border-radius: 16px; border: 1px solid var(--separator); }
.player-cover .plate-copy { padding: clamp(14px,4vw,24px); }
.player-cover .plate-title { font-size: clamp(1.28rem,5.25vw,1.95rem); }
.player-cover .marathon-number { font-size: 1rem; }
.material-viewer.has-video .player-cover {
  position: absolute; inset: 0; display: block; pointer-events: none; background: none; border: 0;
}
.material-viewer.has-video .player-cover::before {
  background: linear-gradient(145deg,#090e17cf 0%,#090e1799 20%,transparent 62%);
}
.material-viewer.has-video .plate-copy { width: 90%; }
.material-viewer.is-playing .player-cover {
  /* Keep the page's heading available to assistive technology while the film plays. */
  width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.lesson-description { margin-block: -5px 16px; }
@media (hover: hover) and (pointer: fine) {
  .recording-row:hover .recording-cover { border-color: #64788a; }
}
.foundation-gate p { margin: 12px 0 16px; color: #c3ceda; }
.guide-page .guide-action:active, .foundation-gate .button.primary:active { background: #98c4e7; }
.catalog-search [hidden], .home-content[hidden], .shelves[hidden] { display: none !important; }

.shelf-heading { margin: 20px 0 12px; font-size: 19px; }
.audio-player { display: block; width: 100%; margin-block: 12px 0; color-scheme: dark; }

/* Home: newcomer action and quiet progress share one row. */
.home-overview {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(80px, 23vw, 92px);
  align-items: stretch; gap: 9px; margin-block-end: 14px;
}
.home-overview .newcomer-entry { margin: 0; min-height: 68px; }
.home-overview .study-progress.study-compact {
  position: relative; display: grid; place-items: center; align-content: center;
  gap: 4px; margin: 0; min-width: 0; min-height: 68px; padding: 7px 4px 6px;
  border: 1px solid #263d52; border-radius: 16px; background: #102334;
}
.study-compact .study-ring {
  display: grid; place-items: center; position: relative; inline-size: 41px; block-size: 41px;
  border-radius: 50%; background: conic-gradient(#9dd5ff var(--study-value, 0%), #355570 0);
}
.study-compact .study-ring::before {
  content: ""; position: absolute; inset: 3px; border-radius: inherit; background: #102334;
}
.study-compact .study-value {
  z-index: 1; position: relative; color: var(--text); font-size: 11px; font-weight: 680;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.study-compact .study-caption {
  margin: 0; max-width: 100%; color: #c1d4e5; font-size: .705rem; text-align: center; line-height: 1.2;
}

/* The right artwork has room to breathe; the copy stays on a stable dark scrim. */
.home-stack .feature:is(.cover-marathon, .cover-foundation), .home-content .home-archive {
  --home-art-width: 70%;
  --home-art-anchor: right center;
  background-color: #12161d;
  background-image: linear-gradient(90deg, #12161d 0%, #12161df5 32%, #12161da8 53%, #10151b3b 80%, #10151b42 100%), var(--art);
  background-repeat: no-repeat;
  background-position: center, var(--home-art-anchor);
  background-size: 100% 100%, var(--home-art-width) auto;
}
.home-stack .feature.cover-marathon { --home-art-anchor: right 47%; min-block-size: clamp(115px, 33vw, 147px); }
.home-stack .feature.cover-foundation { --home-art-anchor: right 48%; min-block-size: clamp(102px, 29vw, 130px); }
.home-stack .feature:is(.cover-marathon, .cover-foundation) .feature-copy, .home-content .home-archive .feature-copy {
  max-inline-size: 76%; text-shadow: 0 1px 5px #090a0d99; overflow-wrap: anywhere;
}
.home-content .home-archive {
  --art: url('/design/archive.webp?v=title-cards'); --home-art-anchor: right 56%; --home-art-width: 65%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-block-size: clamp(81px, 23vw, 108px); padding: 12px 18px; border: 1px solid var(--separator);
  border-radius: 21px; text-decoration: none; text-shadow: 0 1px 5px #090a0d99;
}
.home-content .home-archive > svg { color: #d3dae2; }
@media (max-width: 360px) {
  .home-overview { gap: 7px; }
  .home-overview .newcomer-entry { padding-inline: 12px; }
  .home-overview .newcomer-entry .row-copy small { font-size: 12px; }
  .home-stack .feature:is(.cover-marathon, .cover-foundation), .home-content .home-archive { padding-inline: 14px; }
}

/* Covers and search are intentionally kept legible at 320px and above. */
.home-stack .feature:is(.cover-marathon, .cover-foundation), .home-content .home-archive {
  background-size: 100% 100%, auto 110%;
}
.shelves .feature:is(.cover-marathon,.cover-foundation,.cover-archive),
.section-hero:is(.cover-marathon,.cover-foundation,.cover-archive) {
  background-position: center, right center;
}
.search-facets { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 0; }
.search-facet {
  display: inline-flex; gap: 5px; align-items: center; justify-content: center;
  min-height: 44px; padding: 3px 9px; border: 1px solid var(--separator); border-radius: 12px;
  color: #ccd3de; background: var(--surface); font-size: 12px; line-height: 1.15;
}
.search-facet-count { color: #a9bacd; font-variant-numeric: tabular-nums; }
.search-facet[aria-pressed="true"] { border-color: #b7dafb75; background: #253444; color: #e6f4ff; }
.row.result-row:has(> .search-time) {
  grid-template-columns: max-content minmax(0, 1fr); gap: 9px; min-height: 62px;
}
.row.result-row:has(> .search-time):has(> .lock) {
  grid-template-columns: max-content minmax(0, 1fr) 18px;
}
.search-time {
  min-width: 46px; text-align: center; border-radius: 7px; padding: 4px 5px;
  border: 1px solid #c6e7fa3a; background: #c6e7fa10;
}
@media (pointer: coarse) {
  body:has(.catalog-search input:focus) .tabs { visibility: hidden; }
}

/* Keep the member avatar on the far edge. Search has its own touch target. */
.identity .identity-copy { min-inline-size: 0; }
.identity.identity-home { align-items: center; margin-block-end: 19px; }
.identity-home .identity-subtitle { margin: 4px 0 0; color: #b6c3cf; font-size: 15px; font-weight: 540; line-height: 1.15; }
.identity .profile-badge { align-self: center; inline-size: 42px; block-size: 42px; }
.identity-actions { align-self: center; display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.home-search-trigger {
  display: grid; place-items: center; flex: none; inline-size: 44px; block-size: 44px; margin: 0; padding: 0;
  color: #e1eaf2; border: 1px solid #2c343e; border-radius: 50%; background: #181c22; text-decoration: none;
}
.home-search-trigger svg { width: 20px; height: 20px; stroke-width: 1.8; }
.home-search-trigger:active { background: #29333d; }
.home-codex {
  display: flex; align-items: center; min-height: 48px; margin: 12px 0 0; padding: 9px 2px;
  border-bottom: 1px solid var(--separator); color: #d7e1eb; font-size: .94rem; font-weight: 550; text-decoration: none;
}

/* Section covers: typeset title over abstract editorial cover art. */
.home-stack .feature:is(.cover-marathon,.cover-foundation,.cover-archive) {
  align-items: center;
  background-color: #111215;
  background-image: linear-gradient(90deg, #0d0f12 0%, #0d0f12f5 30%, #0d0f12d1 53%, #0d0f1254 73%, #0d0f1226 100%), var(--art);
  background-repeat: no-repeat;
  background-position: center, right center;
  background-size: 100% 100%, auto 100%;
}
.home-stack .feature:is(.cover-marathon,.cover-foundation,.cover-archive) .feature-copy {
  max-inline-size: 80%; gap: 5px;
}
.home-stack .feature:is(.cover-marathon,.cover-foundation,.cover-archive) .feature-copy strong {
  text-transform: uppercase; font-weight: 790; font-size: clamp(18px, 5vw, 29px);
  line-height: 1.03; letter-spacing: -.025em; text-wrap: balance;
}
.home-stack .feature .feature-copy .eyebrow {
  margin: 0 0 1px; color: #b6d2e8; font-size: 9px; letter-spacing: .12em;
}
.home-stack .cover-foundation .feature-copy strong { max-inline-size: 100%; overflow-wrap: normal; }

/* Editorial title cards: no artwork, number, line or chevron inside the covers. */
.feature-stack .feature.editorial-cover,
.home-content .feature.editorial-cover.home-archive {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  justify-content: stretch;
  aspect-ratio: 16 / 8.5;
  min-block-size: clamp(110px, 35vw, 156px);
  max-block-size: 246px;
  padding: clamp(14px, 5vw, 28px) 12px;
  color: #fff;
  background: #070707;
  border: 1px solid #222;
  border-radius: 14px;
  box-shadow: none;
  text-shadow: none;
  overflow: hidden;
}
.feature-stack .feature.editorial-cover .feature-copy,
.home-content .feature.editorial-cover.home-archive .feature-copy {
  display: grid; justify-items: center; gap: clamp(6px, 2vw, 11px);
  width: 100%; max-inline-size: 100%;
  text-align: center; text-shadow: none;
}
.feature-stack .feature.editorial-cover .editorial-series {
  color: #b7b7b7;
  font-size: clamp(8px, 2.4vw, 10px); font-weight: 680;
  line-height: 1.15; letter-spacing: .22em;
}
.feature-stack .feature.editorial-cover .editorial-title {
  color: #fafafa;
  font-size: clamp(18px, 6.05vw, 42px); font-weight: 900;
  line-height: .96; letter-spacing: -.034em;
  max-inline-size: 100%; text-wrap: initial;
}
.feature-stack .feature.editorial-cover.cover-foundation .editorial-title {
  font-size: clamp(17px, 5.45vw, 37px);
}
.feature-stack .feature.editorial-cover .editorial-line { display: block; white-space: nowrap; }
.feature-stack .feature.editorial-cover .editorial-subtitle {
  color: #b7b7b7;
  font-size: clamp(10px, 2.8vw, 13px); line-height: 1.22;
}
@media (min-width: 740px) {
  .shelves .feature.editorial-cover:is(.cover-foundation,.cover-archive) .editorial-title {font-size: 22px;}
}

/* Owner-only roster */
.admin-entry{display:flex;align-items:center;justify-content:space-between;margin-top:1.25rem;padding:1rem 0;border-top:1px solid var(--separator);color:var(--accent);text-decoration:none;font-size:.94rem;font-weight:550}
.admin-entry svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.5}
.admin-panel{margin:1rem 0 2rem}
.admin-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:.45rem 1rem;margin:0 0 1rem}
.admin-summary strong{font-size:1.6rem;letter-spacing:-.04em}
.admin-summary p{margin:0;font-size:.81rem}
.admin-search{display:block;width:100%;margin-bottom:.75rem;padding:.75rem .85rem;border:1px solid rgba(255,255,255,.16);border-radius:11px;background:var(--surface);color:inherit;font:inherit}
.admin-search:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.admin-list{margin:0;padding:0;list-style:none}
.admin-row{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:47px;padding:.55rem .25rem;border-bottom:1px solid rgba(255,255,255,.12);overflow-wrap:anywhere}
.admin-role{white-space:nowrap;opacity:.72;font-size:.76rem}
.admin-panel [hidden]{display:none}

/* Links read as actions without arrows; reserve glyphs for meaningful states. */
button.text-link { appearance: none; padding: 0; border: 0; background: transparent; text-align: start; }
:where(.text-link,.admin-entry):hover { text-decoration: underline; text-underline-offset: .18em; }
:where(.newcomer-entry,.feature,.row,.admin-entry,.timecode):focus-visible { outline-offset: -2px; }
.newcomer-entry:active { background: #19486c; }
.admin-entry:active { background: #222b34; }
@media (hover: hover) and (pointer: fine) {
  .row:hover, .timecode-list.named .timecode:hover { background-color: #b4cfed0d; }
  .newcomer-entry:hover { border-color: #648caf; }
  .home-search-trigger:hover { border-color: #4a6276; }
  .home-codex:hover { color: #eff8ff; }
  .guide-page .guide-action:hover, .foundation-gate .button.primary:hover { background: #c9e6ff; }
  .feature.editorial-cover:hover { border-color: #545a62; }
}

/* Income: scoped visual workspace */
.income-workspace{--iw-blue:#c6e7fa;--iw-hairline:#b6d1ed30;--iw-matte:#14181e;--iw-muted:#aab5c2;--iw-ink:#f4f7fb}
.income-mast{position:relative;padding:14px 0 16px;margin-bottom:15px;isolation:isolate;border-bottom:1px solid var(--iw-hairline)}
.income-mast h1{font-size:clamp(35px,8.5vw,53px);letter-spacing:-.065em;font-weight:745;line-height:.98;max-width:12ch;text-wrap:pretty}
.income-mast p{font-size:14px;color:var(--iw-muted);max-width:30ch;margin-top:12px}
.income-stripe{position:absolute;z-index:-1;right:0;top:17px;width:34%;height:43px;opacity:.65;background:linear-gradient(90deg,transparent 0,#a8d1ec72 100%);mask-image:repeating-linear-gradient(0deg,#000 0 1px,transparent 1px 9px)}
.income-inner-title h1{font-size:clamp(29px,7vw,41px);font-weight:730}
.income-next{padding:14px;border:1px solid var(--iw-hairline);border-radius:22px;background:linear-gradient(160deg,#1d2732,#14181e 62%);box-shadow:inset 0 1px 0 #f6f9ff16}
.income-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:3px;border-radius:20px;background:#0b0e13;margin-bottom:19px}
.income-mode{border:0;background:transparent;color:var(--iw-muted);line-height:1.15;min-height:43px;border-radius:17px;padding:6px 5px;font-size:12px;font-weight:630;overflow-wrap:anywhere}
.income-mode[aria-pressed=true]{color:var(--iw-ink);background:#253442;box-shadow:inset 0 0 0 1px #dcefff26}
.income-next-label{color:var(--iw-blue);font-size:12px;margin:0 0 5px}
.income-next h2,.income-block h2{margin:0;color:var(--iw-ink,#f4f7fb);letter-spacing:-.03em;line-height:1.1}
.income-next h2{font-size:27px}
.income-next-detail{margin:7px 0 12px;color:#c3ceda;font-size:14px;max-width:48ch}
.income-go,.income-control{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:0;border-radius:13px;font:inherit;font-weight:680;text-decoration:none;background:#d9ecf8;color:#11202c}
.income-control{width:100%;margin-top:13px}
.income-block{margin:22px 0 0}
.income-block h2{font-size:22px}
.income-hint{margin:7px 0;color:var(--iw-muted,#aab5c2);font-size:13px;overflow-wrap:anywhere}
.income-recordings,.income-steps{padding:0;margin:13px 0 0;list-style:none;border-top:1px solid var(--iw-hairline)}
.income-recording,.income-check,.income-stack-link{display:grid;align-items:center;grid-template-columns:29px minmax(0,1fr) 16px;gap:12px;min-height:55px;padding:9px 3px;text-decoration:none;border-bottom:1px solid var(--iw-hairline)}
.income-record-no{font-size:12px;letter-spacing:-.02em;color:var(--iw-blue);font-variant-numeric:tabular-nums}
.income-stack-copy{display:grid;gap:4px;line-height:1.2;overflow-wrap:anywhere}
.income-stack-copy small{color:var(--iw-muted);line-height:1.35;font-size:12px}
.income-recording svg,.income-stack-link svg{width:15px;color:var(--iw-blue)}
.income-stack-link{grid-template-columns:minmax(0,1fr) 16px;min-height:68px;margin:18px 0 0;padding:13px 14px;border:1px solid var(--iw-hairline);border-radius:14px;background:var(--iw-matte)}
.income-disclosure{border-bottom:1px solid var(--iw-hairline);overflow-wrap:anywhere}
.income-disclosure summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:620}
.income-check{grid-template-columns:23px minmax(0,1fr);padding-block:12px;cursor:pointer}
.income-check input{width:19px;height:19px;accent-color:var(--iw-blue);margin:0}
.income-field{display:grid;gap:5px;margin:13px 0;color:#dbe4ed;font-size:13px;font-weight:620}
.income-input{width:100%;min-width:0;min-height:44px;padding:9px 10px;border:1px solid var(--iw-hairline);border-radius:10px;background:var(--iw-matte);color:var(--iw-ink);font:500 16px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
textarea.income-input{resize:vertical}
.income-draft{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;padding:13px;background:var(--iw-matte);border-radius:10px}
.income-estimate{font-size:17px;color:var(--iw-blue)}
.income-conversation{padding-inline-start:20px;color:var(--muted)}
.income-conversation li{margin-block:8px}

/* Protocol editions: original monogram, neutral photographs, and editorial type. */
.material-plate { background: #080809; color: #f5f5f3; }
.material-plate > img { filter: grayscale(1) contrast(1.07); }
.material-plate::before {
  background: linear-gradient(90deg,#080809f7 0%,#080809d9 26%,#08080965 57%,transparent 86%),
    linear-gradient(0deg,#08080994,transparent 58%);
}
.plate-brand {
  position: absolute; inset-block-start: 10px; inset-inline-start: 15px;
  display: inline-flex; gap: .36rem; align-items: center;
  font-size: .56rem; font-weight: 720; line-height: 1;
  letter-spacing: .14em; color: #d7d7d7; text-transform: uppercase;
  pointer-events: none;
}
.plate-brand::before {
  content: ''; inline-size: 15px; block-size: 15px;
  background: url('/design/protocol-mark.webp') center / contain no-repeat;
  mix-blend-mode: screen;
}
.material-plate .plate-copy { padding-block-start: 30px; min-inline-size: 0; }
.material-plate .plate-copy .plate-series {
  color: #c9c9c9; font-size: .66rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase;
}
.material-plate .plate-copy .plate-title {
  color: #f5f5f3; font-weight: 820; line-height: 1.02; letter-spacing: -.025em;
  text-transform: uppercase; text-shadow: 0 1px 5px #0008;
}
.material-plate .plate-copy .plate-meta { color: #c5c5c5; }
.marathon-row:has(.material-plate) { background: #151617; border-color: #3a3b3d; }
.recording-cover { border-color: #3a3b3d; }
.marathon-row.is-current .plate-brand, .player-cover .plate-brand {
  inset-block-start: clamp(12px,4vw,25px);
  inset-inline-start: clamp(14px,5vw,25px);
}
.marathon-row.is-current .plate-copy { padding-block-start: 38px; }
.marathon-row.is-current .plate-copy .plate-title {
  font-size: clamp(1.25rem,5.55vw,2.1rem); max-width: min(81%,26ch);
}
.material-viewer.has-video .player-cover::before {
  background: linear-gradient(145deg,#080809eb 0%,#080809a8 28%,transparent 73%);
}
.material-viewer.has-video .plate-copy { padding-block-start: 39px; }
.material-viewer.has-video:not(.is-playing) .player { filter: grayscale(1) contrast(1.07); }

.marathon-row.is-complete .marathon-cover img { filter: grayscale(1) contrast(1.07); }

/* Exact compact row footprint; only the watched label may wrap to two lines. */
.marathon-row.is-complete .marathon-copy { gap: 2px; }
.marathon-row .marathon-copy .marathon-compact-title {
  max-inline-size: 100%; line-height: 15px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.marathon-compact-name { font-size: .82em; font-weight: 590; }


/* Reading hierarchy: titles in soft white, metadata in gray, steel blue for actions. */
:root {
  --type-primary: #eef1f4;
  --type-secondary: #bac3ce;
  --type-muted: #a7b3c2;
  --type-accent: #bbd9ef;
  --text: var(--type-primary); --muted: var(--type-muted); --accent: var(--type-accent);
}
.identity h1 { font-weight: 680; letter-spacing: -.042em; }
.identity-subtitle, .page-intro p, .section-hero p, .lesson-description { color: var(--type-secondary); }
.page-intro h1, .section-hero h1, .marathon-heading h1 {
  font-weight: 655; letter-spacing: -.031em; line-height: 1.14;
}
.feature-stack .feature.editorial-cover .editorial-title {
  color: var(--type-primary); font-weight: 680; letter-spacing: -.027em; line-height: 1.14; text-wrap: balance;
}
.feature-stack .feature.editorial-cover .editorial-subtitle { color: var(--type-secondary); }
.home-overview .newcomer-entry .row-copy strong { font-weight: 630; }
.guide-welcome .guide-greeting, .guide-section-heading h2, .shelf-heading { font-weight: 630; }
.guide-page .guide-action, .foundation-gate .button.primary { font-weight: 640; }
.foundation-gate .muted, .guide-welcome p, .guide-page .guide-description { color: var(--type-secondary); }
.result-row .row-copy strong, .shelf-heading, .video-timecodes h2 { font-weight: 600; }
.result-row .row-copy small, .catalog-search .search-count { color: var(--type-secondary); }
.timecode-list.named .timecode-title { font-weight: 490; }
.timecode-list.named .timecode-time { color: var(--type-muted); font-weight: 530; }
.timecode-list.named .timecode[aria-current] .timecode-time { color: var(--type-accent); font-weight: 630; }
.marathon-copy strong { font-weight: 610; }
.marathon-row.is-current .marathon-state { font-weight: 590; color: var(--type-accent); }
.material-plate .plate-copy .plate-title {
  color: var(--type-primary); font-weight: 630; line-height: 1.14;
  text-transform: none; letter-spacing: -.023em; text-shadow: 0 1px 5px #000b;
}
.marathon-row.is-current .plate-copy .plate-title { font-weight: 650; line-height: 1.1; }
.material-plate .plate-copy .plate-series { font-weight: 620; color: var(--type-secondary); }
.marathon-row.is-current .plate-brand, .player-cover .plate-brand { color: #b7c0c9; font-weight: 610; }
.recording-cover .plate-copy {
  padding: clamp(13px,3.8vw,22px); gap: 7px;
}
.recording-cover .plate-title {
  font-size: clamp(1.05rem,4.7vw,1.43rem); max-inline-size: min(81%, 30ch);
}
.material-plate .plate-meta { color: var(--type-secondary); font-size: .79rem; }
.material-plate .plate-meta .plate-viewed { color: var(--type-accent); font-weight: 520; }
.recording-cover::before {
  background: linear-gradient(90deg, #090a0ae3 0%, #090a0a9e 39%, #090a0a18 89%),
    linear-gradient(0deg,#090a0ac4,transparent 72%);
}
.player-cover .plate-copy .plate-title { font-weight: 630; }


/* Keep all themes visible in a predictable two-column grid at phone widths. */
.stream-themes { margin: 0 0 16px; }
.stream-theme-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 5px; }
.stream-theme-heading { margin: 0; color: var(--type-primary); font-size: .95rem; font-weight: 610; }
.stream-theme-all {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 8px;
  color: var(--type-accent); font-size: .84rem; font-weight: 550; text-decoration: none; border-radius: 10px;
}
.stream-theme-all .theme-count { color: var(--type-muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.stream-theme-all[aria-current="page"] { color: var(--type-primary); }
.stream-theme-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.stream-theme-pair { display: flex; align-items: center; gap: 7px; min-inline-size: 0; }
.stream-theme {
  display: flex; align-items: center; justify-content: center; min-inline-size: 0;
  min-height: 44px; padding: 6px clamp(11px,3.8vw,16px);
  border: 1px solid #aeb8c13b; border-radius: 999px;
  background: linear-gradient(170deg, #f2f6fc13, #f2f6fc03 63%) #15171c;
  box-shadow: inset 0 1px 0 #f5f8ff21, inset 0 -1px 0 #02030562;
  color: #d3dae2; font-size: .825rem; font-weight: 545; line-height: 1.18;
  text-align: center; text-wrap: balance; overflow-wrap: anywhere; text-decoration: none;
}
.stream-theme[aria-current="page"] {
  border-color: #9ebcd779; background: linear-gradient(169deg, #b6d6f120, #b6d6f104 65%) #263443;
  box-shadow: inset 0 1px 0 #d9eaff33, inset 0 -1px 0 #030b1258;
  color: #f0f6fd;
}
.stream-theme:active { filter: brightness(1.13); }
.stream-theme:focus-visible, .stream-theme-all:focus-visible { outline-offset: -2px; }

.section-hero.foundation-intro {
  background: #151515; border-color: #303030; border-radius: 16px;
  min-height: 0; padding: clamp(16px,5vw,24px);
}
.foundation-intro h1 { color: #eeeeee; text-wrap: initial; }
.foundation-intro p { color: #c3c3c3; }
.recording-topic + .recording-topic { margin-block-start: 28px; }

/* Let Russian compound words wrap when device text size is increased. */
.section-hero.foundation-intro h1,
.foundation-gate h1,
.recording-topic .shelf-heading {
  min-inline-size: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}


/* Keep the editorial tiles readable with enlarged system text. */
.home-stack .feature.editorial-cover .feature-copy {
  grid-template-columns: minmax(0, 1fr);
  min-inline-size: 0;
}
.home-stack .feature.editorial-cover .feature-copy .editorial-title,
.home-stack .feature.editorial-cover .feature-copy .editorial-subtitle,
.guide-page .guide-action {
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}
