/* Course home, "Gallery" look. Values come straight from the two mock-ups (Main.dc.html, Home.dc.html). */
:root {
  --ink: #1C1712;
  --soft: #6E6255;
  --cream: #F3F1ED;
  --white: #FFFFFF;
  --line: rgba(28, 23, 18, 0.15);
  --beige: #C6B9AA;
  --track: rgba(190, 163, 137, 0.35);
  --coral: #ED7268;
  --stage: #2B2520;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Century Gothic', sans-serif;
  --label: 'Almarai', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; min-height: 100vh; }
a { color: inherit; }
button, input, textarea { font-family: inherit; }
[hidden] { display: none !important; }

/* header */
.top { background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; position: relative; }
.iconbtn { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; text-decoration: none; }
.iconbtn svg { stroke-width: 1.4; stroke-linecap: round; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; }
.logo .script { font-family: 'Pinyon Script', cursive; font-size: 27px; line-height: 1; }
.logo .caps { font-family: 'Bodoni Moda', Didot, serif; font-size: 9px; letter-spacing: 0.3em; padding-left: 0.3em; line-height: 1; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu .pop { position: absolute; top: 48px; left: 0; z-index: 20; background: var(--white); border: 1px solid var(--line); border-radius: 6.4px; min-width: 180px; width: max-content; max-width: calc(100vw - 24px); padding: 6px 0; box-shadow: 0 8px 24px rgba(28, 23, 18, 0.12); }
.menu .pop a, .menu .pop button { display: flex; align-items: center; width: 100%; box-sizing: border-box; white-space: nowrap; min-height: 44px; padding: 0 18px; border: 0; background: transparent; text-align: left; text-decoration: none; font-size: 16px; color: var(--ink); cursor: pointer; }

/* shells */
.shell { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; row-gap: 44px; padding-bottom: 72px; }
.shell.lesson { column-gap: 56px; padding: 0 0 72px; }
.shell.home { column-gap: 64px; padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px) 72px; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.shell.lesson .main { gap: 26px; }
.shell.home .main { gap: 40px; }
.side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.shell.home .side { flex-basis: 300px; gap: 36px; }
.pad { padding-inline: 20px; }
@media (min-width: 700px) {
  .shell.lesson { padding: 40px 48px 72px; }
  .shell.lesson .pad { padding-inline: 0; }
  .player, .stage { border-radius: 6.4px !important; }
}

/* type */
.kicker { font-family: var(--label); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--soft); }
.h-serif { margin: 0; font-family: var(--serif); font-weight: 300; letter-spacing: -0.01em; text-wrap: balance; font-variant-numeric: lining-nums; }
h1.lesson-title { font-size: clamp(35px, 4.2vw, 56px); line-height: 1.12; }
h1.hello { font-size: clamp(44px, 6vw, 72px); line-height: 1.05; }
h2.weeks-h { font-size: 30px; line-height: 1.15; }
.home h2.weeks-h { font-size: 32px; }
.muted { color: var(--soft); }
.small { font-size: 14px; }
.stack { display: flex; flex-direction: column; }
.g10 { gap: 10px; } .g14 { gap: 14px; } .g12 { gap: 12px; }

/* buttons */
.btn { min-height: 46px; padding: 0 20px; border: 2px solid #000; border-radius: 6.4px; background: transparent; color: #000; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn.solid { background: #000; color: #fff; }
.btn svg { stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.linkbtn { background: none; border: 0; padding: 0; color: #000; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; cursor: pointer; min-height: 44px; }

/* player */
.player { position: relative; aspect-ratio: 16 / 9; background: var(--stage); color: #fff; overflow: hidden; }
.player.empty video { display: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .tag { position: absolute; top: 14px; left: 16px; font-family: var(--label); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #D9CEC2; z-index: 2; pointer-events: none; }
.player .bigplay { position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; margin: -38px 0 0 -30px; border: 1.5px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, 0.25); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0 0 0 3px; cursor: pointer; z-index: 3; }
.player.playing .bigplay { opacity: 0; pointer-events: none; }
.player .bigplay[aria-disabled="true"] { cursor: default; }
.player .listen-panel { position: absolute; inset: 0; background: var(--stage); display: none; z-index: 1; }
.player.audio .listen-panel { display: block; }
.player.audio video { visibility: hidden; }
/* Captions: the Content Machine's "Katie" look, the one burned into the round-one lessons (Billy, 3 Dec 2026: "the
   exact same captions that are called katie"). Numbers are that look's own (ad-editor src/caption_presets.py "katie",
   highlight off, his size 1.05 and position 0.84): Avenir Next Medium, cream, letters 4.4% x 1.05 of the PICTURE's
   height, a soft dark haze round the letters, a soft shade a quarter strong behind the line, the line's middle 84%
   down the picture, never wider than 86% of it. --pic-top/--pic-h/--pic-w (the picture's own box inside the player)
   are set by player.js. Avenir Next is on every Apple device; elsewhere the site's own sans stands in. */
.player .caption { position: absolute; left: 50%; top: calc(var(--pic-top, 0px) + var(--pic-h, 100%) * 0.84); transform: translate(-50%, -50%); margin: 0; width: max-content; max-width: calc(var(--pic-w, 100%) * 0.86); text-align: center; text-wrap: balance; font-family: "Avenir Next", "AvenirNext-Medium", Avenir, var(--sans); font-weight: 500; font-size: max(11px, calc(var(--pic-h, 400px) * 0.0462)); letter-spacing: 0.01em; line-height: 1.366; color: rgb(243, 241, 237); text-shadow: 0 0.02em 0.04em rgba(70, 53, 39, 0.59), 0 0 0.1em rgba(28, 21, 17, 0.78); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; z-index: 5; pointer-events: none; }
.player .caption::before { content: ""; position: absolute; inset: -0.26em -0.62em; background: rgba(28, 21, 17, 0.25); border-radius: 0.5em; filter: blur(0.24em); z-index: -1; }
.player .caption:empty { display: none; }
/* Apple's own player (iPhone full screen, picture in picture) draws the captions itself, from the lesson's text
   track, and by default in the phone's own style: a system font in a dark box. These rules give them Katie's look
   there too: the same font, cream and soft haze, no box (the soft shade behind the line becomes two wide, faint
   shadows: a text track cannot have the blurred patch). Place and line breaks are set on the cues by player.js
   (layCues); the size comes from there in pixels (--cue-px, sizeCues), because a percentage here is not of the
   picture. Nothing in the page draws a system text track, so this changes nothing outside Apple's player. A
   member's own caption style from the phone's Accessibility settings still wins, as it should. */
video::cue { color: rgb(243, 241, 237); background: transparent; font-family: "Avenir Next", "AvenirNext-Medium", Avenir, "Jost", sans-serif; font-weight: 500; text-shadow: 0 0.02em 0.04em rgba(70, 53, 39, 0.59), 0 0 0.1em rgba(28, 21, 17, 0.78), 0 0 0.45em rgba(28, 21, 17, 0.42), 0 0 0.8em rgba(28, 21, 17, 0.3); }
video::-webkit-media-text-track-display-backdrop { background-color: transparent; }
video.cue-sized::cue { font-size: var(--cue-px, 11px); }
/* The caption never moves (Billy, 4 Dec 2026: "They should always stay in the same position relative to the
   frame"). It used to be lifted clear of the buttons on a small player; now the buttons simply show over it, as
   they did over the burned-in captions, and step aside after a moment of playing untouched. Two small things keep
   the words readable meanwhile: the caption is drawn above the buttons' progress line, and on a small player,
   where the words reach down among the buttons ("tight", set by player.js), the buttons sit at the foot of their
   row, just under the words. Their touch areas stay the same size. */
.player .bar, .player .tag { transition: opacity 0.25s; }
.player.playing.idle .bar, .player.playing.idle .tag { opacity: 0; pointer-events: none; }
.player.playing.idle { cursor: none; }
.player .bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 0 4px 2px; z-index: 4; }
.player .scrub { height: 3px; background: rgba(255, 255, 255, 0.3); margin-inline: 10px; border-radius: 2px; position: relative; cursor: pointer; }
.player .scrub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.player .scrub i { display: block; width: 0; height: 3px; background: var(--coral); border-radius: 2px; }
.player .row { display: flex; align-items: center; }
.player .time { padding-left: 10px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .row .sp { flex: 1; }
.player .ctl { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; font-size: 14px; font-weight: 500; }
.player .ctl svg { stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* the picture-quality button holds words ("Auto · 2160p"), so it is as wide as its words and never wraps */
.player .quality-btn { width: auto; min-width: 44px; padding: 0 6px; white-space: nowrap; }
.player .cc { background: #fff; color: var(--stage); border-radius: 3px; padding: 1px 5px; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; }
.player .cc.off { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.player.tight .ctl { align-items: flex-end; padding-bottom: 4px; }
.player.tight .time { align-self: flex-end; padding-bottom: 5px; }
.player:fullscreen { border-radius: 0 !important; aspect-ratio: auto; }
.player:fullscreen video { object-fit: contain; }

/* tabs */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { min-height: 46px; display: flex; align-items: center; color: var(--soft); text-decoration: none; font-size: 16px; white-space: nowrap; }
.tabs a[aria-selected="true"] { color: #000; font-weight: 500; box-shadow: inset 0 -2px 0 #000; }
.panel { display: none; flex-direction: column; gap: 30px; }
.panel.on { display: flex; }

/* worksheet */
.qrow { display: flex; flex-direction: column; gap: 14px; }
.qlab { display: flex; gap: 16px; align-items: flex-start; }
.qnum { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 44px; line-height: 0.85; min-width: 22px; font-variant-numeric: lining-nums; }
.qtext { font-size: 17px; line-height: 1.5; text-wrap: pretty; display: flex; flex-direction: column; gap: 8px; }
.qtext p { margin: 0; }
.qtext .ex { font-style: italic; font-weight: 300; color: var(--soft); }
.lead { font-family: var(--serif); font-weight: 300; font-size: 24px; line-height: 1.3; text-wrap: balance; padding-left: 38px; }
.lead input { font: inherit; border: 0; border-bottom: 1px solid var(--beige); background: transparent; width: 70px; text-align: center; color: var(--ink); padding: 0 4px; }
.lead input.wide { width: min(100%, 360px); }
.lead input:focus { outline: 2px solid var(--coral); outline-offset: 2px; }
.alabel { font-family: var(--label); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); margin-bottom: 6px; }
.area { padding-left: 38px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .cols { grid-template-columns: 1fr; } }
.ans { width: 100%; border: 1px solid var(--beige); border-radius: 6.4px; background: #fff; padding: 14px 16px; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); resize: none; overflow: hidden; display: block; }
.ans:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.wsbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.wsbar .only { display: flex; align-items: center; gap: 8px; color: var(--soft); font-size: 14px; }
.wsbar svg { stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.saved { font-size: 14px; color: var(--soft); min-width: 48px; }
.ws-actions { display: flex; align-items: center; gap: 18px; }
.printlink { min-height: 44px; display: flex; align-items: center; gap: 8px; color: #000; font-size: 14px; text-underline-offset: 4px; }

/* replays + comments */
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.item.off { color: var(--soft); }
.item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.comment .who { font-size: 14px; color: var(--soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.comment .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cform { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* weeks list */
.progress { height: 3px; background: var(--track); border-radius: 2px; }
.progress i { display: block; height: 3px; background: var(--coral); border-radius: 2px; }
.wk { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.wk:last-child { border-bottom: 0; }
.wk .n { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 24px; width: 30px; flex-shrink: 0; font-variant-numeric: lining-nums; }
.wk .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 16px; line-height: 1.35; }
.wk .t small { font-size: 13px; }
.wk svg { flex-shrink: 0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wk.locked { color: var(--soft); }
.wk.now .t, .wk.here .t > span:first-child { font-weight: 500; }
.wk.here { background: #fff; border-radius: 6.4px; padding-inline: 12px; margin-inline: -12px; border-bottom: 0; color: #000; }
.dot { width: 8px; height: 8px; margin: 0 6px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }

/* home */
.cont { display: flex; flex-wrap: wrap; background: #fff; border-radius: 6.4px; overflow: hidden; color: var(--ink); text-decoration: none; }
.cont .pic { flex: 1 1 240px; position: relative; aspect-ratio: 16 / 9; background: var(--stage); color: #fff; }
.cont .pic .tag { position: absolute; top: 14px; left: 16px; font-family: var(--label); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: #D9CEC2; }
.cont .pic .pl { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 1.5px solid #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding-left: 3px; }
.cont .pic .pg { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.3); }
.cont .pic .pg i { display: block; height: 4px; background: var(--coral); }
.cont .info { flex: 1 1 260px; padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.cont .info .ttl { font-family: var(--serif); font-weight: 300; font-size: 29px; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.cont .info .btn { margin-top: 8px; align-self: flex-start; }
.guide { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 14px; }
.guide b { font-family: var(--serif); font-weight: 300; font-size: 26px; line-height: 1.15; }
.guide span { font-size: 15px; color: var(--soft); }
.rule { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }

/* sign in, small pages */
.narrow { max-width: 460px; margin: 0 auto; padding: 56px 20px 72px; display: flex; flex-direction: column; gap: 22px; }
.field { width: 100%; min-height: 48px; border: 1px solid var(--beige); border-radius: 6.4px; background: #fff; padding: 0 16px; font-size: 16px; color: var(--ink); }
.field:focus { outline: 2px solid var(--coral); outline-offset: 1px; }
.note { font-size: 15px; }
.dev { border: 1px dashed var(--coral); padding: 8px 12px; border-radius: 6.4px; font-size: 13px; }

/* admin */
.admin { max-width: 1000px; margin: 0 auto; padding: 32px 20px 72px; display: flex; flex-direction: column; gap: 40px; }
.admin section { display: flex; flex-direction: column; gap: 12px; }
.admin form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.admin .field { width: auto; flex: 1 1 200px; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl th { font-family: var(--label); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.scroll { overflow-x: auto; }

/* print */
.printpage { max-width: 720px; margin: 0 auto; padding: 24px 20px; background: #fff; }
.printpage .q { break-inside: avoid; margin-bottom: 22px; }
.printpage .a { white-space: pre-wrap; border-bottom: 1px solid var(--beige); min-height: 28px; padding: 4px 0; overflow-wrap: anywhere; }
.printpage .al { font-family: var(--label); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); margin-top: 8px; }
@media print { body { background: #fff; } .noprint { display: none !important; } }
.blankline{display:inline-block;width:70px;border-bottom:1px solid var(--beige)}

/* audio programs */
.shell.listen { max-width: 900px; padding-bottom: 72px; }
.lhead { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.lhead .cover { width: 132px; height: 132px; border-radius: 6.4px; object-fit: cover; flex-shrink: 0; }
.lhead .cover.blank { background: var(--stage); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.aplayer { background: #fff; border-radius: 6.4px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.aplayer .ttl { font-family: var(--serif); font-weight: 300; font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
.scrub2 { height: 3px; background: var(--track); border-radius: 2px; position: relative; cursor: pointer; }
.scrub2::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; }
.scrub2 i { display: block; width: 0; height: 3px; background: var(--coral); border-radius: 2px; }
.ctrls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctrls .time { font-size: 13px; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctrls .sp { flex: 1; }
.abtn { min-width: 48px; height: 48px; border: 0; background: transparent; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0 6px; position: relative; }
.abtn b { font-size: 10px; font-weight: 500; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%); }
.abtn.big { width: 56px; height: 56px; border-radius: 50%; background: #000; color: #fff; padding-left: 3px; }
.abtn.txt { font-size: 14px; font-weight: 500; }
.wk.ep { min-height: 62px; }
.wk.ep .tick { flex-shrink: 0; }
.logo.kw { height: 44px; justify-content: center; }
.logo.kw img { height: 30px; width: auto; display: block; }
.menu .pop form { margin: 0; }
