/* onemin.net — tokens follow episodes/*/design.md (paper, ink, one vermilion focus): the index is a drawing register, each episode a reference page. */
@font-face { font-family: "Sans"; src: url("/fonts/sans.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Serif"; src: url("/fonts/serif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Mono"; src: url("/fonts/mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #F1F0EC;
  --ink: #1B1D1F;
  --shu: #E1412B;
  --muted: #6B6A66;
  --rule: #D5D3CC;
  --stage: #DCD8CF;      /* design.md: ground for footage that has not arrived yet */
  --stage-text: #55544F; /* muted, darkened to hold 4.5:1 on stage */
  --sheet: #F7F6F2;
  --sans: "Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --serif: "Serif", "Songti SC", serif;
  --mono: "Mono", "Sans", ui-monospace, monospace;
  --gutter: 16px;
  --inner: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --lh: 29.75px; /* 17px × 1.75: one reading line, shared by the timeline's years and ticks */
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #A9A79F var(--paper); }
body {
  background-color: var(--paper);
  /* the video's 6px halftone grain, ink at 5% */
  background-image: radial-gradient(rgba(27, 29, 31, .05) 1px, transparent 1.3px);
  background-size: 6px 6px;
  color: var(--ink);
  font: 500 17px/1.75 var(--serif);
  font-feature-settings: "halt" 1;
  caret-color: var(--shu);
}
a { color: inherit; text-decoration: none; text-underline-offset: .28em; }
ol, ul { list-style: none; }
p, dd, li { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
.nw { white-space: nowrap; }
.cl { display: inline-block; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
.mono { font: 400 13px/1.5 var(--mono); letter-spacing: .02em; color: var(--muted); font-feature-settings: normal; font-variant-numeric: tabular-nums; }
.wrap, .top, .foot { width: min(100% - 2 * var(--gutter), var(--inner)); margin-inline: auto; }
.arw { width: 20px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; transition: transform .25s var(--ease); }
.arw.out { width: 11px; height: 11px; margin-left: 6px; vertical-align: .05em; stroke-width: 1.6; }

.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: var(--paper); padding: 14px 16px; font: 500 14px/1.2 var(--sans); z-index: 10; }
.skip:focus { top: 8px; }

/* ---------- masthead: series mark, name, the onemin corner tag, then the 4px ink rule ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 8px; border-bottom: 4px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; white-space: nowrap; }
.brand .mark { width: 30px; height: 30px; flex: none; }
.brand .name { font: 900 21px/1 var(--sans); letter-spacing: -.01em; }
.brand .tag { font: 400 13px/1 var(--mono); color: var(--shu); letter-spacing: .02em; align-self: flex-end; padding-bottom: 14px; }
@media (max-width: 359px) { .brand .tag { display: none; } }
.top nav { display: flex; gap: 4px; margin-right: -10px; }
.top nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; font: 500 15px/1 var(--sans); color: var(--muted); white-space: nowrap; }
@media (max-width: 479px) { .brand { gap: 8px; } .brand .name { font-size: 19px; } .top nav { gap: 0; margin-right: -8px; } .top nav a { padding: 0 8px; } }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- index: the claim, how it is made, then the contents ---------- */
.hero { padding-top: clamp(36px, 7vw, 96px); display: grid; gap: 40px; }
.hero h1 { font: 900 clamp(32px, 6.1vw, 88px)/1.12 var(--sans); letter-spacing: -.02em; }
.slogan { margin-top: clamp(14px, 1.6vw, 22px); font: 500 clamp(18px, 1.9vw, 24px)/1.6 var(--serif); }
.how h2 { font: 900 15px/1 var(--sans); padding-top: 12px; border-top: 4px solid var(--ink); }
.fmt { margin-top: 18px; font: 500 14px/1.6 var(--sans); color: var(--muted); }
.how dl { margin-top: 6px; }
.how dl div { padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.how dt { font: 900 18px/1.4 var(--sans); }
.how dd { margin-top: 2px; font-size: 15.5px; line-height: 1.7; }
@media (min-width: 960px) {
  .hero { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: end; }
  .claim { grid-column: 1 / 9; }
  .how { grid-column: 9 / 13; }
}

.eps { margin-top: clamp(48px, 6.5vw, 88px); }
.eps-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; padding-top: 12px; border-top: 4px solid var(--ink); }
.eps-head h2 { font: 900 22px/1.3 var(--sans); letter-spacing: -.01em; }
.eps-head b { font-weight: 400; color: var(--ink); }

/* the newest issue as a drawing sheet: the figure, then a title block whose cells carry the evidence.
   the whole sheet is one link; its lines are 1px ink, as on a technical drawing */
.dwg { position: relative; display: grid; margin-top: 28px; background: var(--sheet); border: 1px solid var(--ink); }
.dwg-fig { display: block; border: 0; border-bottom: 1px solid var(--ink); padding: clamp(36px, 4vw, 48px) clamp(12px, 3vw, 40px) clamp(16px, 2.5vw, 28px); }
@media (min-width: 900px) {
  .dwg { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .dwg-fig { border-bottom: 0; border-right: 1px solid var(--ink); align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
  .dwg-fig svg { max-height: 480px; }
}
.tb { display: flex; flex-direction: column; min-width: 0; }
.tb > * { padding: 12px clamp(16px, 2vw, 24px); border-bottom: 1px solid var(--ink); }
.tb .k { display: block; font: 500 12px/1.4 var(--sans); color: var(--muted); letter-spacing: .04em; }
.tb-no { display: flex; align-items: baseline; gap: 12px; }
.tb-no .k { display: inline; }
.tb-no .v { color: var(--ink); font-size: 15px; }
.badge { margin-left: auto; padding: 3px 8px; background: var(--ink); color: var(--paper); font: 500 12px/1.3 var(--sans); white-space: nowrap; }
.tb-name { padding-top: 14px; padding-bottom: 18px; }
.tb h3 { margin-top: 4px; font: 900 clamp(30px, 3.4vw, 48px)/1.15 var(--sans); letter-spacing: -.02em; }
.tb h3 a { text-decoration-thickness: 4px; text-underline-offset: 8px; }
.stretch::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.stretch:focus-visible { outline: 0; }
.dwg:has(.stretch:focus-visible) { outline: 2px solid var(--shu); outline-offset: 3px; }
.dwg:hover h3 a, .stretch:focus-visible { text-decoration-line: underline; }
.tb .one { margin-top: 10px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.7; }
.proof { margin-top: 4px; }
.proof li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: baseline; padding: 6px 0; }
.proof li + li { border-top: 1px solid var(--rule); }
.proof time { color: var(--ink); }
.proof p { font-size: 15.5px; line-height: 1.6; }
.std { font-family: var(--mono); font-size: .9em; letter-spacing: 0; white-space: nowrap; font-feature-settings: normal; }
.tb-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 !important; }
.tb-fields div { padding: 10px clamp(16px, 2vw, 24px) 12px; }
.tb-fields div:nth-child(odd) { border-right: 1px solid var(--ink); }
.tb-fields div:nth-child(n + 3) { border-top: 1px solid var(--ink); }
.tb-fields dd { font: 500 16px/1.5 var(--sans); }
.tb-fields dd.mono { font-size: 15px; color: var(--ink); }
.tb-go { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; background: var(--ink); color: var(--paper); font: 700 16px/1.3 var(--sans); border-bottom: 0 !important; }
.dwg:hover .tb-go .arw, .dwg:has(.stretch:focus-visible) .tb-go .arw { color: var(--shu); transform: translateX(4px); }

/* past issues: a drawing register, one row per issue, so 30 issues is a 30-line table */
.sub { font: 900 18px/1.3 var(--sans); padding-top: 10px; border-top: 2px solid var(--ink); }
.eps .sub { margin-top: clamp(48px, 6vw, 80px); }
.reg { margin-top: 4px; }
.reg a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.reg .r-name { font: 900 clamp(18px, 2vw, 22px)/1.35 var(--sans); }
.reg .r-meta { grid-column: 2; grid-row: 2; }
.reg .arw { grid-column: 3; grid-row: 1 / 3; }
.reg a:hover .r-name { text-decoration: underline; text-decoration-thickness: 3px; }
.reg a:hover .arw { color: var(--shu); transform: translateX(4px); }
@media (min-width: 720px) { .reg a { grid-template-columns: 56px minmax(0, 1fr) 200px 20px; } .reg .r-meta { grid-column: 3; grid-row: 1; text-align: right; } .reg .arw { grid-column: 4; grid-row: 1; } }

/* every issue lives on /episodes/; the index ends its list with one row pointing there */
.all { display: flex; align-items: center; gap: 16px; min-height: 56px; margin-top: 24px; padding: 0 0 0 2px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); font: 900 18px/1.3 var(--sans); }
.all .mono { margin-left: auto; }
.all:hover span:first-child { text-decoration: underline; text-decoration-thickness: 3px; }
.all:hover .arw { color: var(--shu); transform: translateX(4px); }
.list-page .reg { margin-top: clamp(28px, 4vw, 48px); border-top: 4px solid var(--ink); }

/* planned topics: an empty slot per topic, the one in production hatched */
.next ol { margin-top: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 32px; }
.next li { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 0; border-bottom: 1px solid var(--rule); font: 500 16px/1.45 var(--sans); }
.next .slot { width: 28px; height: 8px; flex: none; background: var(--rule); }
.next .now .slot { background: repeating-linear-gradient(-45deg, var(--ink) 0 1.5px, var(--rule) 1.5px 6px); }
.next .st { margin-left: auto; padding: 2px 6px; border: 1px solid var(--ink); color: var(--ink); font-size: 12px; white-space: nowrap; }

.foot { margin-top: clamp(80px, 10vw, 136px); padding: 18px 0 40px; border-top: 1px solid var(--rule); font: 500 14px/1.7 var(--sans); color: var(--muted); }
.foot p + p { margin-top: 6px; }

/* ---------- episode: a reference page — title, readout, the player slot, drawing, a dated scale, sources ---------- */
.ep-head { padding-top: clamp(32px, 6vw, 80px); }
.ep-head h1 { font: 900 clamp(38px, 7vw, 96px)/1.1 var(--sans); letter-spacing: -.02em; }
.ep-head .one { margin-top: 16px; font-size: clamp(18px, 2vw, 23px); line-height: 1.65; max-width: 30em; }
.readout { margin-top: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.readout div { padding: 10px 12px 12px 0; border-bottom: 1px solid var(--rule); }
.readout dt { font: 500 12px/1.4 var(--sans); color: var(--muted); }
.readout dd { font: 400 15px/1.5 var(--mono); letter-spacing: .01em; white-space: nowrap; }
@media (min-width: 720px) {
  .readout { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
  .readout div { padding: 10px 28px 12px 0; border-bottom: 0; }
  .readout div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
}

.ep-body { margin-top: clamp(32px, 5vw, 64px); display: grid; gap: 40px; }
@media (min-width: 960px) {
  .ep-body { grid-template-columns: 340px minmax(0, 1fr); gap: clamp(48px, 5vw, 72px); align-items: start; }
  .side { position: sticky; top: 24px; }
}

/* the player slot keeps the video's 9:16 frame; with no video id it is a stage-coloured placeholder that says so */
.player { position: relative; aspect-ratio: 9 / 16; background: var(--stage); }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.player.is-empty { display: flex; flex-direction: column; justify-content: space-between; padding: 24px; background-image: radial-gradient(rgba(27, 29, 31, .07) 1px, transparent 1.3px); background-size: 6px 6px; }
.player.is-empty .mark { width: 56px; height: 56px; }
.player figcaption { display: grid; gap: 6px; }
.player .ps { font: 900 28px/1.25 var(--sans); }
.player .pd { font-size: 15px; line-height: 1.6; color: var(--stage-text); }
@media (max-width: 959px) {
  .player:not(.is-empty) { max-width: 420px; max-height: 80vh; margin-inline: auto; }
  .player.is-empty { aspect-ratio: auto; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; padding: 14px 16px; }
  .player.is-empty .mark { width: 36px; height: 36px; }
  .player figcaption { gap: 2px; }
  .player .ps { font-size: 18px; }
  .player .pd { display: none; }
}

.read { min-width: 0; }
.ep-fig { padding: clamp(32px, 4vw, 48px) clamp(12px, 3vw, 40px) clamp(16px, 2.5vw, 28px); }
.ep-fig svg { max-height: 520px; }
.read h2 { margin-top: clamp(48px, 6vw, 72px); padding-top: 12px; border-top: 4px solid var(--ink); font: 900 22px/1.3 var(--sans); letter-spacing: -.01em; }
.read h2 + * { margin-top: 24px; }

/* the dated scale: years in the margin, one 2px ink spine, a tick per fact; the undated fact gets a hollow tick */
.ticks { --year: 5.25rem; --gap: 32px; }
.ticks li { position: relative; display: grid; grid-template-columns: var(--year) minmax(0, 1fr); column-gap: var(--gap); padding-bottom: 20px; }
.ticks li::before { content: ""; position: absolute; left: calc(var(--year) + var(--gap) / 2 - 1px); top: 0; bottom: 0; width: 2px; background: var(--ink); }
.ticks li:first-child::before { top: calc(var(--lh) / 2); }
.ticks li:last-child::before { bottom: auto; height: calc(var(--lh) / 2); }
.ticks li::after { content: ""; position: absolute; left: calc(var(--year) + var(--gap) / 2 - 9px); top: calc(var(--lh) / 2 - 1px); width: 18px; height: 2px; background: var(--ink); }
.ticks time { font: 400 14px/var(--lh) var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.ticks p { line-height: var(--lh); max-width: 36em; }
.ticks .undated time { color: var(--muted); font-family: var(--sans); font-weight: 500; }
.ticks .undated::after { left: calc(var(--year) + var(--gap) / 2 - 6px); width: 12px; height: 12px; top: calc(var(--lh) / 2 - 6px); background: var(--paper); border: 2px solid var(--ink); }
@media (max-width: 719px) { .ticks { --year: 3.9rem; --gap: 24px; } .ticks time { font-size: 13px; } }

.sources li { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; }
.sources .sn { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 10px; background: var(--ink); color: var(--paper); font-size: 12px; }
.sources a { display: block; min-height: 44px; padding: 8px 0 10px; font: 500 17px/1.6 var(--sans); overflow-wrap: anywhere; }
.sources .sl { text-decoration: underline; text-decoration-thickness: 1px; }
.sources a:hover .sl { text-decoration-color: var(--shu); text-decoration-thickness: 2px; }
.sources .sh { display: block; margin-top: 2px; }
.note { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.7; color: var(--muted); }

.pager { margin-top: clamp(64px, 8vw, 104px); display: grid; border-top: 4px solid var(--ink); }
.pg { display: flex; flex-direction: column; gap: 2px; padding: 16px 0; min-height: 44px; }
.pg + .pg { border-top: 1px solid var(--rule); }
.pg .pt { font: 900 20px/1.4 var(--sans); }
.pg.is-plan .pt { color: var(--muted); }
a.pg:hover .pt { text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 720px) {
  .pager { grid-template-columns: 1fr 1fr; gap: 32px; }
  .pg + .pg { border-top: 0; }
  .pg.next { text-align: right; align-items: flex-end; }
}

/* ---------- drawings: the object in ink, one vermilion callout that draws itself once ---------- */
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--rule); }
/* plate label, as on a magazine figure: 图 + episode number */
.plate { position: absolute; top: 12px; left: 12px; font: 400 12px/1 var(--mono); color: var(--muted); }
.plate b { display: inline-block; background: var(--ink); color: var(--sheet); font: 500 12px/1 var(--sans); padding: 3px 5px; margin-right: 6px; }
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.figure .ink { fill: var(--ink); }
.figure .shu { fill: var(--shu); }
.figure .body { fill: var(--paper); stroke: var(--ink); stroke-width: 6; }
.figure .lead { fill: none; stroke: var(--shu); stroke-width: 3; }
.figure text { font-family: var(--sans); fill: var(--ink); }
.figure .fl { font-size: 40px; font-weight: 900; fill: var(--shu); }
.figure .fs { font-size: 24px; font-weight: 500; }
.figure .fn { font-size: 26px; font-weight: 900; }
.figure .m { fill: var(--muted); font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .figure .lead { stroke-dasharray: 1; animation: draw .45s .5s var(--ease) backwards; }
  .figure .callout { animation: show .4s .85s ease-out backwards; }
}
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes show { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
