/* Teacher Shokh — editorial theme */
:root {
  /* Default theme, palette from the reference:
     Forest Green #012B1D (background) · Jungle Green #01B36C (accent text, glow) · Tangerine #FF8A3D (clickable) */
  --paper: #012b1d;
  --paper-2: #023a28;     /* raised panels, footer */
  --ink: #ffffff;
  --ink-2: #e4eee8;
  --muted: #a9c2b6;
  --rule: #1f4d3c;
  --forest: #01b36c;      /* jungle green: headline accent, wordmark, rules */
  --accent: #01b36c;      /* jungle green for small labels (5.6:1) */
  --peach: #ff8a3d;       /* tangerine: everything clickable */
  --on-peach: #012b1d;
  --hl-fg: var(--on-peach);
  --focus: #ff8a3d;
  --grain: rgba(255,255,255,.03);
  --page-glow: radial-gradient(70% 55% at 88% -5%, rgba(1,179,108,.28), transparent 70%), radial-gradient(50% 40% at 0% 45%, rgba(1,179,108,.10), transparent 70%);
  --grid-line: rgba(255,255,255,.06);
  --btn-glow: 0 0 0 1px rgba(255,138,61,.45), 0 0 28px rgba(255,138,61,.28);
  /* component roles (night mode overrides these to keep its original look) */
  --btn-bg: var(--peach); --btn-fg: var(--on-peach); --btn-border: var(--peach);
  --btn-hover-bg: #ffffff; --btn-hover-fg: var(--on-peach); --btn-hover-border: #ffffff;
  --ghost-hover-bg: var(--peach); --ghost-hover-fg: var(--on-peach);
  --chip-bg: var(--peach); --chip-fg: var(--on-peach); --chip-border: var(--peach);
  --tag-bg: var(--peach); --tag-fg: var(--on-peach); --tag-pad: 3px 8px;
  --hover-tint: #02341f;
  --hl: var(--peach);     /* thin peach line under clickable text, fills in on hover */
  --hl-h: 2px;
  --link-fg: var(--peach);
  --more-pad: 4px 2px;
  --nav-line: var(--peach); --nav-line-h: 2px;
  --card-bg: #023a28; --card-glow: rgba(1,179,108,.45); --card-fg: #ffffff;
  --play-bg: var(--peach); --play-fg: var(--on-peach);
  --band-bg: #023a28; --band-fg: #ffffff; --band-muted: #a9c2b6; --band-pad: clamp(40px, 6vw, 64px) var(--gutter); --band-mb: clamp(48px, 7vw, 88px);
  --band-w: calc(100% - 2 * var(--gutter)); --band-maxw: calc(var(--wrap) - 2 * var(--gutter)); --label-op: .9;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1512; --paper-2: #17201b; --ink: #e8eee9; --ink-2: #c3cdc6;
    --muted: #8f9b94; --rule: #2a3530;
    --forest: #36b872; --accent: #36b872; --hl-fg: #36b872; --focus: #5fd394;
    --btn-bg: #36b872; --btn-fg: #0b1510; --btn-border: #36b872;
    --btn-hover-bg: var(--ink); --btn-hover-fg: var(--paper); --btn-hover-border: var(--ink);
    --ghost-hover-bg: var(--ink); --ghost-hover-fg: var(--paper);
    --chip-bg: var(--ink); --chip-fg: var(--paper); --chip-border: var(--ink);
    --tag-bg: transparent; --tag-fg: #36b872; --tag-pad: 0;
    --hover-tint: var(--paper-2);
    --hl: transparent; --hl-h: .5em; --more-pad: 0; --grain: rgba(40,90,60,.07); --page-glow: none; --grid-line: transparent; --btn-glow: none; --link-fg: var(--accent);
    --nav-line: #36b872; --nav-line-h: 2px;
    --card-bg: #10241a; --card-glow: rgba(54,184,114,.55); --card-fg: #f4f1e8;
    --play-bg: #36b872; --play-fg: #0e1f16;
    --band-bg: transparent; --band-fg: var(--ink); --band-muted: var(--muted); --band-pad: clamp(40px, 6vw, 64px) var(--gutter) clamp(48px, 7vw, 80px); --band-mb: 0;
    --band-w: auto; --band-maxw: var(--wrap); --label-op: .7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1512; --paper-2: #17201b; --ink: #e8eee9; --ink-2: #c3cdc6;
  --muted: #8f9b94; --rule: #2a3530;
  --forest: #36b872; --accent: #36b872; --hl-fg: #36b872; --focus: #5fd394;
  --btn-bg: #36b872; --btn-fg: #0b1510; --btn-border: #36b872;
  --btn-hover-bg: var(--ink); --btn-hover-fg: var(--paper); --btn-hover-border: var(--ink);
  --ghost-hover-bg: var(--ink); --ghost-hover-fg: var(--paper);
  --chip-bg: var(--ink); --chip-fg: var(--paper); --chip-border: var(--ink);
  --tag-bg: transparent; --tag-fg: #36b872; --tag-pad: 0;
  --hover-tint: var(--paper-2);
  --hl: transparent; --hl-h: .5em; --more-pad: 0; --grain: rgba(40,90,60,.07); --page-glow: none; --grid-line: transparent; --btn-glow: none; --link-fg: var(--accent);
  --nav-line: #36b872; --nav-line-h: 2px;
  --card-bg: #10241a; --card-glow: rgba(54,184,114,.55); --card-fg: #f4f1e8;
  --play-bg: #36b872; --play-fg: #0e1f16;
  --band-bg: transparent; --band-fg: var(--ink); --band-muted: var(--muted); --band-pad: clamp(40px, 6vw, 64px) var(--gutter) clamp(48px, 7vw, 80px); --band-mb: 0;
    --band-w: auto; --band-maxw: var(--wrap); --label-op: .7;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--page-glow), var(--paper); background-repeat: no-repeat; background-size: 100% 1800px; color: var(--ink);
  font-family: var(--serif); font-size: 19px; line-height: 1.6;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* faint paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: radial-gradient(var(--grain) 1px, transparent 1px);
  background-size: 3px 3px;
}
main, header, footer { position: relative; z-index: 1; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead__top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); color: var(--muted);
}
.controls { display: flex; align-items: center; gap: 10px; }
.theme {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer;
}
.theme svg path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: none; }
  :root:not([data-theme="light"]) .theme .moon { display: block; }
}
.masthead__brand {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 32px;
  padding-top: 18px; padding-bottom: 14px;
}
.wordmark { font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -.02em; text-decoration: none; line-height: 1; }
.wordmark em { font-weight: 400; color: var(--forest); }
.wordmark--sm { font-size: 24px; }
.wordmark__dot { color: #ff8a3d; margin: 0 .04em 0 .01em; }   /* the tangerine full stop: Teacher.Shokh */
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.nav a { font-size: 17px; text-decoration: none; color: var(--ink-2); padding: 4px 0; background: linear-gradient(var(--nav-line), var(--nav-line)) 0 92% / 0 var(--nav-line-h) no-repeat; transition: background-size .25s; }
.nav a:hover { background-size: 100% var(--nav-line-h); color: var(--ink); }

/* Hero */
.hero { position: relative; padding-top: clamp(40px, 8vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--rule); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: linear-gradient(var(--grid-line), var(--grid-line)) 33.33% 0 / 1px 100% no-repeat,
              linear-gradient(var(--grid-line), var(--grid-line)) 66.66% 0 / 1px 100% no-repeat;
}
.kicker { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; }
.hero__title {
  font-size: clamp(40px, 7.4vw, 92px); line-height: 1.02; letter-spacing: -.025em; font-weight: 400;
  margin: 0 0 clamp(28px, 4vw, 48px); max-width: none; text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--forest); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.hero__lede { border-left: 3px solid var(--forest); padding-left: 20px; font-size: clamp(19px, 2vw, 23px); line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 38em; }
.dropcap::first-letter { float: left; font-size: 4.1em; line-height: .82; padding: .06em .1em 0 0; color: var(--accent); font-weight: 500; }
.facts { margin: 0 0 24px; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font: 500 11px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 16px; line-height: 1.45; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 500 13px/1 var(--mono);
  letter-spacing: .06em; text-transform: uppercase; padding: 13px 18px; border: 1px solid var(--ink); border-radius: 2px;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--ghost-hover-bg); color: var(--ghost-hover-fg); }
.btn--solid { background: var(--btn-bg); border-color: var(--btn-border); color: var(--btn-fg); box-shadow: var(--btn-glow); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--lg { padding: 16px 24px; font-size: 14px; }

/* Sections */
.section { padding-top: clamp(56px, 8vw, 96px); padding-bottom: 8px; }
.section__head {
  display: grid; grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 6px; align-items: baseline;
  border-top: 3px double var(--ink); padding-top: 18px; margin-bottom: clamp(28px, 4vw, 44px);
}
.section__no { color: var(--accent); }
.section__head { border-top-color: var(--forest); }
.section__head h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 400; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.section__dek { grid-column: 2; margin: 4px 0 0; color: var(--muted); font-style: italic; font-size: 18px; max-width: 40em; }

/* Featured post */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--rule); min-height: 160px;
}
.feature__media { display: block; text-decoration: none; aspect-ratio: 16 / 11; background: var(--paper-2); overflow: hidden; border: 1px solid var(--rule); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) contrast(1.02); transition: transform .6s; }
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__media--empty {
  display: grid; place-items: center;
  background: repeating-linear-gradient(0deg, transparent 0 31px, var(--rule) 31px 32px), var(--paper-2);
}
.feature__media--empty span { font-size: clamp(80px, 12vw, 160px); font-style: italic; color: var(--forest); opacity: .9; line-height: 1; }
.feature__meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); margin-bottom: 14px; }
.feature__meta .tag { background: var(--tag-bg); color: var(--tag-fg); padding: var(--tag-pad); border-radius: 2px; }
.feature h3 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.02em; font-weight: 500; margin: 0 0 14px; text-wrap: balance; }
.feature h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s; }
.feature h3 a:hover { background-size: 100% 2px; }
.feature p { color: var(--ink-2); font-size: 20px; margin: 0 0 20px; font-style: italic; }
.readlink { font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--link-fg); text-decoration: none; padding: 2px 0; background: linear-gradient(var(--hl), var(--hl)) 0 100% / 100% var(--hl-h) no-repeat; transition: background-size .2s; }
.readlink:hover, .more:hover { background-size: 100% 100%; color: var(--hl-fg); }
.readlink:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Index of posts */
.index { list-style: none; margin: 0; padding: 0; counter-reset: post 1; }
.index li { counter-increment: post; border-bottom: 1px solid var(--rule); }
.index a {
  display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 8px 20px; align-items: baseline;
  padding: 22px 0; text-decoration: none; transition: padding .25s, background .25s;
}
.index a::before { content: counter(post, decimal-leading-zero); font: 500 12px/1 var(--mono); letter-spacing: .08em; color: var(--accent); padding-top: 8px; }
.index a:hover { padding-left: 10px; background: linear-gradient(90deg, var(--hover-tint), transparent 75%); }
.index h4 { font-size: clamp(21px, 2.2vw, 26px); font-weight: 500; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
.index p { margin: 0; color: var(--muted); font-size: 17px; font-style: italic; }
.index .when { color: var(--muted); white-space: nowrap; text-align: right; }
.more { display: inline-flex; gap: 8px; margin-top: 24px; font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--link-fg); padding: var(--more-pad); background: linear-gradient(var(--hl), var(--hl)) 0 100% / 100% var(--hl-h) no-repeat; transition: background-size .2s; }
.more:hover span:last-child { transform: translateX(4px); }
.more span:last-child { transition: transform .2s; }
.skeleton { height: 1em; background: var(--paper-2); border-radius: 2px; }

/* Pull quote */
.pull { margin: 0 auto; padding-top: clamp(64px, 9vw, 112px); padding-bottom: 8px; text-align: center; }
.pull blockquote { margin: 0 auto 16px; font-size: clamp(34px, 5.4vw, 68px); line-height: 1.1; font-style: italic; font-weight: 300; letter-spacing: -.02em; max-width: 18ch; text-wrap: balance; }
.pull figcaption { color: var(--muted); font-size: 16px; }

/* Watch */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.watch__card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 280px;
  padding: 28px; text-decoration: none; color: var(--card-fg); background: var(--card-bg); overflow: hidden; border-radius: 2px;
}
.watch__card::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--card-glow), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 4px);
}
.watch__card > * { position: relative; }
.watch__play {
  position: absolute; top: 28px; left: 28px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--play-bg); transition: transform .3s;
}
.watch__play path { fill: var(--play-fg); }
.watch__card:hover .watch__play { transform: scale(1.08); }
.watch__label { opacity: var(--label-op); }
.watch__title { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.watch__go { font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-top: 10px; opacity: .85; }
.series { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.series li { display: grid; grid-template-columns: 3em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 19px; align-items: baseline; }
.series .mono { color: var(--accent); }

/* Work */
.work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.work__item { position: relative; padding: 24px 24px 28px 0; text-decoration: none; display: block; }
.work__item + .work__item { padding-left: 24px; border-left: 1px solid var(--rule); }
.work__tag { color: var(--accent); }
.work__item h3 { font-size: 28px; font-weight: 500; letter-spacing: -.01em; margin: 12px 0 8px; line-height: 1.15; }
.work__item p { margin: 0; color: var(--ink-2); font-size: 17px; }
.work__go { position: absolute; top: 20px; right: 20px; font-size: 20px; color: var(--forest); transition: transform .25s; }
a.work__item:hover .work__go { transform: translate(3px, -3px); }
a.work__item:hover { background: linear-gradient(180deg, var(--hover-tint), transparent 85%); }
a.work__item:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about__text p { margin: 0 0 1em; font-size: 20px; color: var(--ink-2); }
.about__text p:first-child::first-line { font-variant: small-caps; letter-spacing: .03em; color: var(--ink); }
.ledger { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.ledger caption { text-align: left; color: var(--muted); padding-bottom: 10px; }
.ledger th, .ledger td { text-align: left; vertical-align: baseline; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.ledger th { font: 500 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); width: 7.5em; padding-right: 12px; }
.ledger td { font-size: 17px; line-height: 1.45; }

/* Subscribe */
.subscribe {
  margin-top: clamp(64px, 9vw, 112px); padding: var(--band-pad);
  text-align: center; border-top: 3px double var(--forest);
  background: var(--band-bg) padding-box; color: var(--band-fg); margin-bottom: var(--band-mb);
}
.wrap.subscribe { width: var(--band-w); max-width: var(--band-maxw); }
.subscribe h2 { font-size: clamp(30px, 4.6vw, 54px); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; margin: 0 auto 12px; max-width: 20ch; text-wrap: balance; }
.subscribe p { color: var(--band-muted); font-style: italic; margin: 0 0 28px; }

/* Footer */
.footer { border-top: 1px solid var(--ink); background: var(--paper-2); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { font-size: 16px; color: var(--ink-2); text-decoration: none; }
.footer__links a:hover { color: var(--hl-fg); background: var(--hl); }
.footer__fine { color: var(--muted); }

/* Language filter */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 28px; }
.filters button {
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}
.filters button:hover { border-color: var(--ink); color: var(--ink); background: var(--hover-tint); }
.filters button[aria-pressed="true"] { background: var(--chip-bg); border-color: var(--chip-border); color: var(--chip-fg); }
.feature__meta .src { color: var(--ink-2); }
.index .when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.index .when span { opacity: .8; }

/* Reader */
.reader { max-width: 760px; padding-top: clamp(32px, 6vw, 64px); padding-bottom: 24px; }
.back { display: inline-flex; gap: 8px; color: var(--muted); text-decoration: none; margin-bottom: clamp(28px, 5vw, 48px); }
.back:hover { color: var(--accent); }
.reader__head { border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 36px; }
.reader__meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); margin: 0 0 16px; }
.reader__head h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -.025em; font-weight: 400; margin: 0; text-wrap: balance; }
.prose { font-size: clamp(19px, 1.9vw, 21px); line-height: 1.72; color: var(--ink); }
.prose p { margin: 0 0 1.25em; }
.prose > p:first-child::first-letter { float: left; font-size: 3.6em; line-height: .84; padding: .07em .1em 0 0; color: var(--accent); font-weight: 500; }
.prose blockquote {
  margin: 1.6em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--forest);
  font-size: 1.12em; font-style: italic; line-height: 1.5; color: var(--ink-2);
}
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }
.prose a { color: var(--accent); text-underline-offset: 3px; text-decoration-color: var(--forest); background: linear-gradient(var(--hl), var(--hl)) 0 100% / 100% var(--hl-h) no-repeat; }
.reader__next { display: flex; flex-direction: column; gap: 8px; margin-top: 48px; padding: 24px 0; border-top: 3px double var(--ink); border-bottom: 1px solid var(--rule); }
.reader__next:empty { display: none; }
.reader__next .mono { color: var(--muted); }
.reader__next a { font-size: clamp(24px, 3vw, 32px); text-decoration: none; letter-spacing: -.01em; line-height: 1.2; }
.reader__next a:hover { color: var(--accent); background: var(--hover-tint); }
.comments { margin-top: 56px; }
.comments h2 { color: var(--muted); font-weight: 500; margin: 0 0 20px; }

/* Telegram */
.tg-count { color: var(--muted); align-self: center; margin-left: auto; }
.tg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px); }
.tg-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; height: 100%; }
.tg-card__img { display: block; aspect-ratio: 1200 / 750; overflow: hidden; border: 1px solid var(--rule); background: var(--paper-2); border-radius: 2px; }
.tg-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.tg-card:hover .tg-card__img img { transform: scale(1.035); }
.tg-card:hover .tg-card__img { border-color: var(--hl-fg); }
.tg-card__meta { display: flex; gap: 12px; color: var(--muted); margin-top: 4px; }
.tg-card__title { font-size: 22px; line-height: 1.22; letter-spacing: -.01em; font-weight: 500; }
.tg-card:hover .tg-card__title { text-decoration: underline; text-decoration-color: var(--focus); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tg-card__ex { color: var(--muted); font-size: 16px; line-height: 1.5; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(28px, 4vw, 44px); }
.tg-actions .more { margin-top: 0; }
.reader__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.reader__tags span { color: var(--accent); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 10px; }
.reader__cover { margin: 0 0 32px; border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; }
.reader__cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 750; }
.reader__media { margin: -8px 0 32px; color: var(--muted); font-size: 16px; font-style: italic; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.reader__media .readlink { font-style: normal; }
.tg-text { overflow-wrap: anywhere; }
.tg-text code { font-family: var(--mono); font-size: .8em; }
@media (max-width: 880px) { .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tg-grid { grid-template-columns: 1fr; } .tg-count { margin-left: 0; width: 100%; } }

/* What I read */
.hero--page { border-bottom: 0; padding-bottom: 8px; }
.hero--page .hero__title { max-width: none; }
.rl__total { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.rl__total span:nth-child(odd) { color: var(--accent); }
.rl__toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(28px, 4vw, 44px); }
.rl__toc a { display: inline-flex; gap: 8px; align-items: baseline; text-decoration: none; font-size: 16px; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; transition: border-color .2s, background .2s, color .2s; }
.rl__toc a .mono { color: var(--accent); font-size: 11px; }
.rl__toc a:hover { border-color: var(--hl-fg); background: var(--hover-tint); color: var(--ink); }
.rl .section__head { margin-bottom: 8px; }
.rl__count { font-style: normal; font-size: 12px; }
.rl__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.src { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--rule); align-content: start; }
.src__name { font-size: 23px; line-height: 1.2; letter-spacing: -.01em; text-decoration: none; justify-self: start;
  background: linear-gradient(var(--hl), var(--hl)) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.src__name span { color: var(--accent); font-size: .7em; }
.src__name:hover { background-size: 100% 2px; }
.src__by { color: var(--accent); }
.src__desc { margin: 2px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.src__desc::first-letter { text-transform: uppercase; }
.src__host { color: var(--muted); font-size: 11px; }
.nav a[aria-current="page"] { color: var(--ink); background-size: 100% var(--nav-line-h); }
@media (max-width: 760px) { .rl__list { grid-template-columns: 1fr; } }

/* Telegram page */
button.btn { background: transparent; color: var(--ink); cursor: pointer; }
.tg-filters { margin: 22px 0 0; }
.tg-chip__n { color: var(--muted); font-size: 11px; }
.tg-cat .section__head { margin-bottom: clamp(20px, 3vw, 32px); }
.tg-cat .tg-actions { margin-top: 24px; }
.tg-cat .tg-actions:has(> [hidden]) { display: none; }
.tg-quotes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tg-quote { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; height: 100%; min-height: 170px;
  padding: 22px 22px 18px; text-decoration: none; border: 1px solid var(--rule); border-radius: 2px; background: var(--paper-2);
  position: relative; transition: border-color .2s, transform .2s; }
.tg-quote::before { content: "“"; position: absolute; top: -6px; right: 16px; font-size: 72px; line-height: 1; font-style: italic; color: var(--focus); opacity: .9; }
.tg-quote__text { font-size: 21px; line-height: 1.32; font-style: italic; letter-spacing: -.005em; padding-right: 26px;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tg-quote .tg-card__meta { margin: 0; }
.tg-quote:hover { border-color: var(--hl-fg); transform: translateY(-2px); }
@media (max-width: 880px) { .tg-quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tg-quotes { grid-template-columns: 1fr; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 880px) {
  .hero__grid, .feature, .watch, .about { grid-template-columns: 1fr; }
  .work { grid-template-columns: 1fr; }
  .work__item, .work__item + .work__item { padding: 22px 36px 24px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .work__go { right: 0; }
}
@media (max-width: 600px) {
  body { font-size: 18px; }
  .masthead__top .mono:first-child { font-size: 10px; }
  .masthead__brand { flex-direction: column; align-items: flex-start; }
  .nav { gap: 4px 18px; }
  .nav a { font-size: 16px; }
  .section__head { grid-template-columns: 1fr; }
  .section__dek { grid-column: 1; }
  .index a { grid-template-columns: 2.4em minmax(0, 1fr); }
  .index .when { grid-column: 2; flex-direction: row; align-items: baseline; gap: 12px; }
  .facts div { grid-template-columns: 6.5em 1fr; }
  .watch__card { min-height: 240px; padding: 22px; }
  .feature__media { aspect-ratio: 16 / 8; }
  .watch__play { top: 22px; left: 22px; width: 54px; height: 54px; }
}

/* Watch: home list of latest videos */
.series--yt li { display: block; padding: 0; }
.series--yt a { display: grid; grid-template-columns: 4.2em minmax(0, 1fr); gap: 12px; padding: 14px 0; align-items: baseline; text-decoration: none; }
.series--yt .mono { font-size: 13px; }
.series--yt a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--focus); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Watch page: video cards that play in place */
.yt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 44px) clamp(16px, 2.4vw, 28px); }
.yt-grid--shorts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.yt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.yt[hidden] { display: none; }
.yt__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--rule); background: #000; border-radius: 2px; transition: border-color .2s; }
.yt-grid--shorts .yt__media { aspect-ratio: 9 / 16; }
.yt__thumb { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.yt__thumb:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; }
.yt__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.yt__thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 42%); pointer-events: none; }
.yt__icon { position: absolute; left: 50%; top: 50%; z-index: 1; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; display: grid; place-items: center; background: var(--play-bg); box-shadow: 0 6px 24px rgba(0, 0, 0, .35); transition: transform .3s; }
.yt__icon svg { margin-left: 3px; }
.yt__icon path { fill: var(--play-fg); }
.yt__thumb:hover img { transform: scale(1.04); }
.yt__thumb:hover .yt__icon { transform: scale(1.1); }
.yt__dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 4px 6px; border-radius: 2px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 11px; line-height: 1; letter-spacing: .04em; }
.yt__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt.is-playing .yt__media, .yt__media:hover { border-color: var(--hl-fg); }
.yt .tg-card__meta { margin-top: 4px; }
.yt__title { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; overflow-wrap: anywhere; }
.yt-grid--shorts .yt__title { font-size: 17px; }
.yt__open { align-self: flex-start; margin-top: 2px; font-size: 12px; }
.yt-grid--shorts .yt__icon { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.yt-handle { color: var(--link-fg); text-decoration: none; font-size: 12px; font-style: normal; white-space: nowrap; }
.yt-handle:hover { text-decoration: underline; }
.yt-cat .tg-actions { margin-top: 24px; }
.yt-cat .tg-actions:has(> [hidden]) { display: none; }
@media (max-width: 880px) { .yt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .yt-grid--shorts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .yt-grid { grid-template-columns: 1fr; } .yt-grid--shorts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* About: inline links */
.about__text a { color: var(--link-fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.about__text a:hover { text-decoration-thickness: 2px; }

/* About: the Telegram channels, one per interest */
.elsewhere { margin-top: clamp(36px, 5vw, 56px); }
.elsewhere__h { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.elsewhere__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.elsewhere__list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 16px 18px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink-2); font-size: 17px; line-height: 1.35; box-sizing: border-box; }
.elsewhere__list .mono { color: var(--link-fg); font-size: 13px; letter-spacing: .01em; text-transform: none; overflow-wrap: anywhere; }
.elsewhere__list a:hover { color: var(--ink); }
.elsewhere__list a:hover .mono { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 880px) { .elsewhere__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Home: a few of each, then "Read all" / "Watch all" */
.btn--more span[aria-hidden] { transition: transform .2s; }
.btn--more:hover span[aria-hidden] { transform: translateX(4px); }
.section--flush { padding-top: clamp(24px, 4vw, 40px); }

/* Phones */
@media (max-width: 600px) {
  /* the menu is one row you can swipe, not two wrapped lines */
  .masthead__brand { gap: 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; gap: 0 22px; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 12px 0; background-position: 0 78%; }
  .hero__title { font-size: clamp(28px, 8.2vw, 40px); }
  .hero__lede { font-size: 19px; }
  /* home teasers: swipe sideways, the next card peeks in */
  .teaser { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
            width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .teaser::-webkit-scrollbar { display: none; }
  .teaser > li { scroll-snap-align: start; }
  .teaser .tg-card__title, .teaser .yt__title { font-size: 19px; }
  .tg-actions { gap: 14px 22px; margin-top: 24px; }
  .btn { padding: 14px 18px; }
  /* channels: one per row */
  .elsewhere__list { grid-template-columns: 1fr; }
  .elsewhere__list a { gap: 2px; padding: 12px 0; }
  .footer__links a { display: inline-block; padding: 8px 0; }
  .feature__media--empty { display: none; }
  /* topic chips: one swipeable row */
  .rl__toc { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--gutter)); margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .rl__toc::-webkit-scrollbar { display: none; }
  .rl__toc a { flex: none; }
  /* Telegram page: compact rows (small cover, title) instead of full-width cards */
  .tg-grid:not(.teaser) { gap: 0; }
  .tg-grid:not(.teaser) > li { border-bottom: 1px solid var(--rule); }
  .tg-grid:not(.teaser) .tg-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-content: start; column-gap: 14px; row-gap: 6px; padding: 14px 0; }
  .tg-grid:not(.teaser) .tg-card__img { grid-row: 1 / span 2; }
  .tg-grid:not(.teaser) .tg-card__meta { margin-top: 0; font-size: 11px; gap: 10px; }
  .tg-grid:not(.teaser) .tg-card__title { font-size: 18px; line-height: 1.25; }
  .tg-grid:not(.teaser) .tg-card__ex { display: none; }
  .filters button { min-height: 38px; }
}

/* Writing page: filters sit under the hero text */
.hero--page .filters { margin-top: clamp(24px, 4vw, 40px); }

/* Telegram comments under a post */
.tg-discuss { margin: 16px 0 0; }
#giscus iframe[id^="telegram-discussion"] { width: 100% !important; border-radius: 4px; }

/* Home: Work as a short list linking into the Work page */
.work--list { display: block; }
.work__row { position: relative; display: grid; grid-template-columns: 11em minmax(0, 15em) minmax(0, 1fr) 2em; gap: 6px 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.work__row h3 { font-size: 24px; font-weight: 500; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
.work__row p { margin: 0; color: var(--ink-2); font-size: 17px; font-style: italic; }
.work__row .work__go { position: static; text-align: right; }
.work__row:hover { background: linear-gradient(90deg, var(--hover-tint), transparent 75%); }
.work__row:hover .work__go { transform: translateX(4px); }
@media (max-width: 880px) { .work__row { grid-template-columns: minmax(0, 1fr) 2em; } .work__row .work__tag { grid-column: 1 / -1; } .work__row p { grid-column: 1; } .work__row .work__go { grid-row: 2; grid-column: 2; } }

/* Work page */
.wk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.wk-text p { font-size: 19px; line-height: 1.6; color: var(--ink-2); margin: 0 0 16px; }
.wk-text .work__tag { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.wk-text .hero__ctas { margin-top: 24px; }
.wk-bits { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.wk-bits li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--rule); position: relative; font-size: 17px; color: var(--ink-2); }
.wk-bits li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); }
.wk-fig { margin: 0; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: clamp(10px, 2vw, 20px); }
.wk-sub { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; margin: clamp(36px, 5vw, 56px) 0 16px; }
.wk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.wk-steps li { padding: 20px 20px 22px 0; display: grid; gap: 10px; align-content: start; }
.wk-steps li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.wk-steps__n { color: var(--accent); font-size: 12px; }
.wk-steps h4 { margin: 0 0 6px; font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.wk-steps p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.wk-shots { display: grid; grid-template-columns: 1.05fr 1.4fr 1.4fr .62fr; gap: 16px; margin-top: clamp(32px, 4vw, 48px); align-items: start; }
.wk-shot { margin: 0; }
.wk-shot img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper-2); }
.wk-shot figcaption { color: var(--muted); font-size: 15px; font-style: italic; margin-top: 8px; line-height: 1.4; }
.wk-note { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin: 12px 0 0; }

/* Work illustrations: drawn with the theme's tokens */
.ill { width: 100%; height: auto; display: block; font-family: var(--mono); }
.ill-panel { fill: var(--paper); }
.ill-stroke { stroke: var(--rule); stroke-width: 1.5; }
.ill-faint, .ill-faint rect { fill: var(--rule); }
.ill-ink-fill { fill: var(--ink); }
.ill-hl { fill: none; stroke: var(--accent); stroke-width: 2; }
.ill-tick { fill: var(--accent); font-size: 14px; font-weight: 700; }
.ill-stand { fill: var(--rule); }
.ill-arrow { fill: none; stroke: var(--accent); stroke-width: 2; }
.ill-dash { stroke-dasharray: 5 6; }
.ill-head { fill: var(--accent); }
.ill-label { fill: var(--ink-2); font-size: 13px; }
.ill-dim { fill: var(--muted); }
.ill-kicker { fill: var(--accent); font-size: 11px; letter-spacing: .12em; }
.ill-h { fill: var(--ink); font-family: var(--serif, Newsreader, Georgia, serif); font-size: 22px; }
.ill-h3 { fill: var(--ink); font-family: var(--serif, Newsreader, Georgia, serif); font-size: 19px; }
.ill-small { fill: var(--ink-2); font-size: 11.5px; }
.ill-strong { font-weight: 700; fill: var(--ink); }
.ill-note { fill: var(--muted); font-size: 10px; font-style: italic; }
.ill-btn { fill: var(--play-bg); }
.ill-btn-t, .ill-on-btn-t { fill: var(--play-fg); font-size: 11px; font-weight: 700; }
.ill-on-btn { fill: var(--play-fg); }
.ill-on-btn-t.ill-h3 { font-size: 19px; font-weight: 400; }
.ill-ok { fill: var(--accent); opacity: .35; }
.ill-watch { fill: var(--accent); opacity: .7; }
.ill-bad { fill: var(--play-bg); }
.ill-focus { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 4; }
.ill-chip { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.ill-chip-t { fill: var(--accent); font-size: 11px; }
.ill-track { fill: var(--rule); }
.ill-bar { fill: var(--accent); }
.ill-callout { fill: var(--paper); stroke: var(--play-bg); stroke-width: 1.5; }
.ill-wave rect { fill: var(--accent); opacity: .8; }

@media (max-width: 880px) {
  .wk-grid { grid-template-columns: 1fr; }
  .wk-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .wk-steps li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .wk-shots { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wk-text p { font-size: 18px; }
  .wk-steps { grid-template-columns: 1fr; }
  .wk-steps li, .wk-steps li + li { padding: 16px 0; border-left: 0; }
  .wk-steps li + li { border-top: 1px solid var(--rule); }
  .wk-shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; align-items: flex-start;
              width: calc(100% + 2 * var(--gutter)); margin-left: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .wk-shots::-webkit-scrollbar { display: none; }
  .wk-shot { flex: 0 0 84%; scroll-snap-align: start; }
  .wk-shot--tall { flex: 0 0 46%; }
  /* illustrations keep a readable size; swipe if they are wider than the screen */
  .wk-fig { overflow-x: auto; scrollbar-width: none; }
  .wk-fig::-webkit-scrollbar { display: none; }
  .wk-fig .ill { min-width: 480px; }
  .work__row h3 { font-size: 21px; }
}
