*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: light;
  --rule: #bebfb3;
  --plate: #ebe8db;
  --selected: #e9e7dc;
  --page-width: 1264px;
  --gutter: clamp(20px, 4.6vw, 80px);
}
html { scroll-padding-top: 22px; }
body { margin: 0; color: var(--cad-text); background: var(--cad-paper); font: 400 16px/1.55 var(--cad-font-ui); }
[hidden] { display: none !important; }
button, audio, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .22em; }
button:focus-visible, a:focus-visible, video:focus-visible, audio:focus-visible {
  outline: 3px solid var(--cad-focus); outline-offset: 3px;
}
.wrap { width: min(var(--page-width), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.skip { position: absolute; z-index: 5; inset: 12px auto auto 16px; transform: translateY(-160%); padding: 9px 16px; background: var(--cad-surface); font-weight: 700; }
.skip:focus { transform: translateY(0); }
.masthead { border-bottom: 1px solid var(--cad-ink); }
.mast-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 700 24px/1 var(--cad-font-ui); }
.brand img { display: block; border-radius: 4px; }
.mast-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.mast-nav a { display: inline-flex; align-items: center; position: relative; min-height: 44px; text-decoration: none; color: var(--cad-text-muted); font-size: 14px; }
.mast-nav a[aria-current], .mast-nav a:hover { color: var(--cad-ink); }
.mast-nav a::after { content: ""; position: absolute; inset: auto 0 6px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform var(--cad-motion-feedback); }
.mast-nav a[aria-current]::after, .mast-nav a:hover::after { transform: scaleX(1); }
.lead { padding: clamp(34px, 4.2vw, 65px) 0 clamp(22px, 2.35vw, 36px); }
h1, h2, h3, p, ol, ul { margin: 0; }
h1 { font-size: clamp(40px, 4.45vw, 68px); line-height: 1.17; font-weight: 740; }
.hook { display: block; margin-bottom: 11px; color: var(--cad-text-muted); font-size: clamp(18px, 1.7vw, 26px); font-weight: 540; line-height: 1.34; }
.hook em { font: italic 530 1.13em/1 Georgia, "Times New Roman", serif; color: var(--cad-ink); }
.head-part { display: inline-block; }
.latin-name { margin-right: .15em; font-family: var(--cad-font-ui); }
.lead-bottom, .facts { display: flex; align-items: center; }
.lead-bottom { justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 17px; }
.subtitle { color: var(--cad-text-muted); font-size: clamp(16px, 1.38vw, 20px); }
.facts { gap: 10px; color: var(--cad-text-muted); font-size: 13px; white-space: nowrap; }
.mono, .timecode, .file-type, .fsize { font-family: var(--cad-font-mono); font-variant-numeric: tabular-nums; }
.facts span + span { border-left: 1px solid var(--cad-border); padding-left: 10px; line-height: 1; }
.screen-grid { display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(254px, 1fr); gap: clamp(20px, 2.4vw, 36px); align-items: start; }
.screen { position: relative; background: var(--plate); border: 1px solid var(--cad-ink); aspect-ratio: 16/9; min-width: 0; overflow: hidden; }
.screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--plate); }
.screen video:focus-visible { outline-offset: -4px; }
.cover-control { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  border: 0; background: transparent; color: var(--cad-ink); padding: 3.9% 4.7% 3.3%; text-align: left; cursor: pointer; }
.cover-control:focus-visible { outline-offset: -5px; }
.cover-question { font-size: clamp(20px, 2.15vw, 34px); font-weight: 690; line-height: 1.28; background: var(--plate); }
.cover-bottom { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 46px;
  padding: 8px 21px; background: var(--cad-primary); color: var(--cad-on-primary); border: 1px solid var(--cad-ink);
  border-radius: var(--cad-radius-editorial); font-weight: 700; transition: transform var(--cad-motion-feedback), background-color var(--cad-motion-feedback); }
.cover-control:focus-visible .cover-bottom { outline: 3px solid var(--cad-focus); outline-offset: 2px; }
.play-icon, .ch-indicator { width: 0; height: 0; border: 6px solid transparent; border-right: 0; border-left: 9px solid currentColor; }
.player-status, .voice-status { margin-top: 10px; padding: 10px 14px; color: var(--cad-ink); border-left: 3px solid var(--cad-error); background: var(--cad-background); }
.chapters { min-width: 0; align-self: stretch; display: flex; flex-direction: column; border-top: 2px solid var(--cad-ink); }
.chapters h2 { margin: 10px 0; font-size: 19px; line-height: 1.4; font-weight: 680; }
.chapters ol { list-style: none; padding: 0; display: grid; grid-template-rows: repeat(6,1fr); flex: 1; }
.chapters li { display: flex; min-width: 0; border-block-start: 1px solid var(--rule); }
.chapters li:last-child { border-bottom: 1px solid var(--rule); }
.chapter { position: relative; flex: 1; display: grid; grid-template-columns: clamp(52px,4.8vw,72px) minmax(0,1fr) 10px;
  grid-template-areas: "thumb time marker" "thumb name marker"; align-content: center; gap: 1px 12px;
  padding: 6px 10px; min-width: 0; min-height: 45px; text-decoration: none; transition: background-color var(--cad-motion-feedback); }
.chapter-thumb { grid-area: thumb; align-self: center; aspect-ratio: 1.62; display: grid; place-items: center; border: 1px solid var(--rule); background: var(--plate); overflow: hidden; }
.chapter-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chapter-thumb.is-missing::before { content: "▶"; color: var(--cad-text-muted); font-size: 12px; }
.timecode { grid-area: time; color: var(--cad-text-muted); font-size: 12px; line-height: 1.25; }
.ch-name { grid-area: name; font-size: clamp(14px,1.08vw,17px); line-height: 1.4; font-weight: 550; }
.ch-indicator { grid-area: marker; align-self: center; opacity: 0; border-width: 4px 0 4px 6px; }
.chapter[aria-current] { background: var(--selected); }
.chapter[aria-current]::before { position: absolute; content: ""; inset: 0 auto 0 0; width: 3px; background: var(--cad-primary); }
.chapter[aria-current] .ch-indicator, .chapter:focus-visible .ch-indicator { opacity: 1; }
.chapter:focus-visible { z-index: 1; outline-offset: -3px; }
