/* The card file on /articles/ (Vela, 2026-11-14): a desk Rolodex of index cards, filed A to Z.
   Built only from site.css tokens. The cards are paper: a quiet serif for the titles (the one place the site uses
   one), mono for the typed date and read time, ruled lines and one accent rule as on a real index card.
   Without JavaScript or with reduced motion the same list shows as plain index cards (bottom of this file). */
:root { --serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif; }

.rdx-page { max-width: var(--max); margin-inline: auto; padding: clamp(28px, 5vw, 64px) var(--gutter) 40px; }
.rdx-intro .crumb { display: flex; align-items: center; gap: 12px; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rdx-intro .crumb::before { content: ""; width: 22px; height: 1px; background: var(--accent); flex: none; }
.rdx-intro h1 { margin-top: 14px; color: var(--head); font: 400 clamp(2.2rem, 6vw, 3.1rem)/1.06 var(--sans); letter-spacing: -0.032em; }
.rdx-lead { margin-top: 16px; max-width: 30ch; font-size: 1.12rem; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.rdx-feed { margin-top: 18px; font: 400 12.5px/1.6 var(--mono); }
.rdx-feed a { color: var(--muted); text-underline-offset: 3px; }
.rdx-feed a:hover { color: var(--accent); }

/* ---------- the turning file (only once js/rolodex.js has built it) ---------- */
.rdx {
  --w: 440px; --h: 250px; --r: 16px;          /* card size; the cards' feet sit --r above the hub */
  --pad: 58px;                                 /* the drum's reach beyond the cards, so every card sits inside it */
  --dome-top: 72px;                            /* how far the drum rises above the cards (room for the tabs) */
  --below: 44px;                               /* how far it reaches below the hub */
  --axis: 104px;                               /* the hub's height above the stage's foot */
  --knob: 88px; --grip: 12px;                                /* the two knobs, one on each end of the drum */
  --cx: 50%;
  --hub: calc(var(--axis) + (var(--r) + var(--h)) * .3);   /* the knobs' centre, on the drum's ends */
  --top: calc(var(--dome-top) + 14px);
  /* the body is one light cream plastic, warmed from the logo's gold; dimmer at night */
  --cream: #efe8d8; --cream-2: #e6dcc6; --cream-line: #cfc2a4;
  --rule: color-mix(in srgb, var(--accent) 16%, var(--line));
  margin-top: 8px;
}
.has-rdx .rdx-page { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 24px clamp(32px, 5vw, 72px); align-items: start; }
.has-rdx .rdx-intro { padding-top: 56px; }
.rdx-stage { position: relative; height: calc(var(--h) + var(--r) + var(--axis) + var(--top)); overflow: hidden; touch-action: none; cursor: grab; border-radius: var(--r-l); user-select: none; -webkit-user-select: none; }
.rdx-stage:active { cursor: grabbing; }
.rdx-stage:focus-visible { outline: 1px solid var(--accent); outline-offset: 0; }
.rdx-scene { position: absolute; inset: 0; perspective: 1500px; perspective-origin: 50% -40%; }
.rdx-drum { position: absolute; left: var(--cx); bottom: calc(var(--axis) + var(--r)); width: var(--w); height: var(--h); margin-left: calc(var(--w) / -2); transform-style: preserve-3d; pointer-events: none; }   /* the flat drum box must not catch the clicks meant for the cards */
.rdx-card { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% calc(100% + var(--r)); transition: transform .62s cubic-bezier(.22, .8, .24, 1), visibility 0s; cursor: pointer; pointer-events: none; }
/* only the front card takes clicks: in 3D, Chrome can hand a click on it to a card leaning behind */
.rdx-card.is-front { pointer-events: auto; }
.rdx-face, .rdx-back { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rdx-back { transform: rotateX(180deg); background: var(--sunk); }
/* the two slots at the foot of every card, where it rides on the rails */
.rdx-face::after, .rdx-back::after { content: ""; position: absolute; bottom: -1px; left: 50%; width: 46%; height: 9px; transform: translateX(-50%);
  background: radial-gradient(circle at 9px 9px, var(--bg) 0 5px, var(--line-strong) 5px 6px, transparent 6px) 0 0 / 50% 100% no-repeat,
              radial-gradient(circle at calc(100% - 9px) 9px, var(--bg) 0 5px, var(--line-strong) 5px 6px, transparent 6px) 100% 0 / 50% 100% no-repeat; }
.rdx-card:not(.is-front) .rdx-face { background-color: color-mix(in srgb, var(--surface) 92%, var(--bg)); }

/* the letter tab on top of each card; tabs step across the width, six positions, as on a real file */
.rdx-tab { position: absolute; top: -23px; left: calc(16px + var(--tab) * (var(--w) - 32px - 44px) / 5); width: 44px; height: 24px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 7px 7px 0 0; background: inherit; font: 500 11.5px/1 var(--mono); color: var(--faint); }
.is-article .rdx-tab { color: var(--accent); font-weight: 650; }
.is-front .rdx-tab { color: var(--head); }
.is-front .rdx-tab::after { content: ""; position: absolute; left: 10px; right: 10px; top: 4px; height: 1px; background: var(--accent); }

/* the divider cards: ruled, blank */
.rdx-card:not(.is-article) .rdx-face { background-image: linear-gradient(var(--accent), var(--accent)), repeating-linear-gradient(to bottom, transparent 0 25px, var(--rule) 25px 26px);
  background-size: 100% 1px, 100% calc(100% - 64px); background-position: 0 50px, 0 64px; background-repeat: no-repeat; opacity: .96; }

/* an article card: typed date and read time, the title, one accent rule, then one line on the ruled part */
.is-article .rdx-face { display: flex; flex-direction: column; padding: 24px 30px 0; }
.rdx-meta { font: 400 12px/1.5 var(--mono); color: var(--muted); letter-spacing: .02em; }
.rdx-meta .dot, .rdx-count .dot { margin-inline: 8px; opacity: .5; font-style: normal; }
.rdx-title { margin-top: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--accent); font: 400 28px/1.12 var(--serif); letter-spacing: -0.012em; color: var(--head); text-wrap: balance; }
.rdx-title a { color: inherit; text-decoration: none; }
.rdx-title a:focus-visible { outline-offset: 4px; }
.rdx-title a::after { content: ""; position: absolute; inset: 0; }   /* the whole front card is the link */
/* the ruled part: every line of text sits ON a rule, never crossed by one. One row = --lh; the rule is drawn
   --sink below the row's top, just under the baseline (2px below it), so descenders may touch it but no rule runs
   through or above the words. */
.rdx-ruled { --lh: 26px; --sink: 22px; flex: 1; min-height: 0; overflow: hidden; margin: 6px -30px 0; padding: 0 30px;
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--sink) - 1px), var(--rule) calc(var(--sink) - 1px) var(--sink), transparent var(--sink) var(--lh)); }
.rdx-line { font: italic 400 16px/var(--lh) var(--serif); color: var(--text); text-wrap: pretty; }
/* a thin halo in the paper's colour: where a descender (p, g, y) meets its rule, the rule breaks around it, like
   skip-ink on an underline, so no line ever crosses a letter */
.rdx-line, .rdx-foot { text-shadow: 2px 0 var(--surface), -2px 0 var(--surface), 0 2px var(--surface), 1.5px 1.5px var(--surface), -1.5px 1.5px var(--surface); }
.rdx-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: var(--lh); font: 400 11.5px/var(--lh) var(--mono); color: var(--muted); }
.rdx-go { color: var(--accent); white-space: nowrap; }
/* no box-shadow on a turning card: Chrome then clips the letter tab at the card's edge */
.rdx-card.is-gone { visibility: hidden; }   /* far round the drum, under the stand */
.is-front:hover .rdx-title { color: var(--accent); }

/* ---------- the body: our own covered rotary file, all in one light cream ----------
   Drawn flat behind the cards: the drum (rounded over the top, less under the bottom), its rim one hairline inside,
   and the hub rod the cards ride on. Below it a short neck and a round foot, centred under the drum. A big ridged
   knob on each end of the drum, each saying "turn me": the left one turns back, the right one turns on, and either
   can be dragged up or down. */
:root[data-theme="dark"] .rdx { --cream: #4a463d; --cream-2: #3f3b33; --cream-line: #6b6453; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rdx { --cream: #4a463d; --cream-2: #3f3b33; --cream-line: #6b6453; } }
.rdx-back-layer, .rdx-front { position: absolute; inset: 0; pointer-events: none; }
.rdx-drum-shell { position: absolute; left: calc(var(--cx) - var(--w) / 2 - var(--pad)); width: calc(var(--w) + 2 * var(--pad)); bottom: calc(var(--axis) - var(--below)); height: calc(var(--below) + var(--r) + var(--h) + var(--dome-top));
  border: 1px solid var(--cream-line); border-radius: 46% 46% 30% 30% / 40% 40% 24% 24%; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.rdx-drum-shell::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--cream-line); border-radius: inherit; opacity: .6; }   /* the rim */
.rdx-rod { position: absolute; left: calc(var(--cx) - var(--w) / 2 - 18px); width: calc(var(--w) + 36px); bottom: calc(var(--axis) - 3px); height: 7px; border: 1px solid var(--cream-line); border-radius: 4px; background: var(--cream); }
.rdx-neck { position: absolute; left: calc(var(--cx) - 40px); width: 80px; bottom: 24px; height: calc(var(--axis) - var(--below) - 12px); border: 1px solid var(--cream-line); border-top: 0; background: var(--cream-2); }
.rdx-pedestal { position: absolute; left: calc(var(--cx) - var(--w) * .42); width: calc(var(--w) * .84); bottom: 6px; height: 32px; border: 1px solid var(--cream-line); border-radius: 50%; background: var(--cream); }
.rdx-pedestal::before { content: ""; position: absolute; inset: 5px 12% 9px; border-radius: 50%; border-top: 1px solid var(--cream-line); opacity: .8; }

/* the knobs: big, cream, ridged all round, one on each end of the drum */
.rdx-knob { position: absolute; z-index: 3; pointer-events: auto; bottom: calc(var(--hub) - var(--knob) / 2);
  width: var(--knob); height: var(--knob); padding: 0; border-radius: 50%; border: 1px solid var(--cream-line); background: var(--cream); color: var(--cream-line); cursor: grab; touch-action: none; transition: border-color .15s, color .15s; }
.rdx-knob.l { left: calc(var(--cx) - var(--w) / 2 - var(--pad) - var(--knob) + var(--grip)); }   /* outside the drum, on its axle end */
.rdx-knob.r { left: calc(var(--cx) + var(--w) / 2 + var(--pad) - var(--grip)); }
.rdx-knob:active { cursor: grabbing; }
.rdx-knob:hover, .rdx-knob:focus-visible { border-color: var(--accent); color: color-mix(in srgb, var(--accent) 70%, var(--cream-line)); }
.rdx-knob-face { position: absolute; inset: 0; border-radius: 50%; transform: rotate(var(--turn, 0deg)); transition: transform .62s cubic-bezier(.22, .8, .24, 1);
  background: radial-gradient(circle, var(--cream) 0 60%, var(--cream-line) 60% calc(60% + 1px), transparent calc(60% + 1px)),
              repeating-conic-gradient(from 0deg, currentColor 0 2deg, transparent 2deg 9deg); }
.rdx-knob-face::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; border: 1px solid var(--cream-line); }   /* the cap */
.rdx-knob-face i { position: absolute; left: 50%; top: 23%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--accent); }
.rdx-knob:hover .rdx-knob-face { transform: rotate(calc(var(--turn, 0deg) + 12deg)); transition-duration: .3s; }   /* a small nudge: I turn */
.is-turning .rdx-knob-face, .is-turning .rdx-card { transition-duration: .22s; }
/* once, a moment after the page opens, the knobs give a small turn, to show they move */
.rdx-knob.is-hint .rdx-knob-face { animation: rdx-hint 1.1s cubic-bezier(.3, 0, .2, 1) 1; }
@keyframes rdx-hint { 0%, 100% { transform: rotate(var(--turn, 0deg)); } 40% { transform: rotate(calc(var(--turn, 0deg) + 30deg)); } 70% { transform: rotate(calc(var(--turn, 0deg) - 6deg)); } }
/* a quiet "turn me" over each knob, so nobody has to guess */
.rdx-knob-tip { position: absolute; z-index: 3; width: 90px; bottom: calc(var(--hub) + var(--knob) / 2 + 8px); text-align: center; font: 400 11px/1.4 var(--mono); color: var(--muted); }
.rdx-knob-tip.l { left: calc(var(--cx) - var(--w) / 2 - var(--pad) - var(--knob) + var(--grip)); text-align: left; }   /* each label keeps to the knob's outer side, clear of the drum */
.rdx-knob-tip.r { left: calc(var(--cx) + var(--w) / 2 + var(--pad) + var(--knob) - var(--grip) - 90px); text-align: right; }

/* Tiny, the logo, sits on the foot, in the middle */
.rdx-tiny { position: absolute; z-index: 4; width: 36px; height: 36px; left: calc(var(--cx) - 18px); bottom: 14px; color: #dea03a; pointer-events: none; }
:root[data-theme="dark"] .rdx-tiny { color: #eab654; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rdx-tiny { color: #eab654; } }


/* ---------- under the file: the slider (a 2px track, like a volume slider), the letters under it, the count ----------
   The slider's two ends sit over the middles of A and Z, so every letter stands right under its place on it. */
.rdx-controls { --thumb: 20px; margin-top: 10px; }
.rdx-rail { position: relative; height: 32px; margin-inline: calc(100% / 52 - var(--thumb) / 2); }
.rdx-slider { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.rdx-slider::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: var(--line-strong); }
.rdx-slider::-moz-range-track { height: 2px; border-radius: 2px; background: var(--line-strong); }
.rdx-slider::-webkit-slider-thumb { -webkit-appearance: none; width: var(--thumb); height: var(--thumb); margin-top: calc(var(--thumb) / -2 + 1px); border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); }
.rdx-slider::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); box-sizing: border-box; }
.rdx-slider:focus-visible { outline: none; }
.rdx-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.rdx-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.rdx-marks { position: absolute; inset: 0; pointer-events: none; }
.rdx-mark { position: absolute; top: 50%; left: calc(var(--thumb) / 2 + var(--at) * (100% - var(--thumb))); width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--accent); }
.rdx-tabs { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); }
.rdx-letter { position: relative; display: grid; place-items: center; height: 34px; padding: 0; border: 0; background: none; font: 500 12.5px/1 var(--mono); color: var(--faint); opacity: .45; }
button.rdx-letter { opacity: 1; color: var(--accent); font-weight: 650; cursor: pointer; border-radius: 6px; }
button.rdx-letter:hover { background: var(--accent-soft); }
button.rdx-letter[aria-current="true"] { color: var(--head); }
.rdx-count { margin-top: 6px; text-align: center; font: 400 12px/1.6 var(--mono); color: var(--muted); }
.rdx-count b { color: var(--head); font-weight: 600; }


/* with the turning file on, the list stays only for screen readers */
.has-rdx .rdx-list-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  .has-rdx .rdx-page { grid-template-columns: minmax(0, 1fr); }
  .has-rdx .rdx-page { row-gap: 0; }
  .has-rdx .rdx-intro { padding-top: 0; }
  .rdx-lead { max-width: 36ch; }
}
@media (max-width: 640px) {
  .rdx { --pad: 16px; --knob: 52px; --grip: 8px; --w: min(260px, calc(100vw - 2 * var(--gutter) - 2 * var(--pad) - 2 * var(--knob) + 2 * var(--grip))); --h: 190px; --r: 12px; --below: 30px; --axis: 76px; --dome-top: 60px; }
  .rdx-drum-shell { border-radius: 36% 36% 26% 26% / 30% 30% 20% 20%; }
  .rdx-neck { left: calc(var(--cx) - 28px); width: 56px; }
  .rdx-pedestal { height: 26px; }
  .rdx-knob-face i { width: 4px; height: 4px; margin-left: -2px; top: 21%; }
  .rdx-knob-tip { font-size: 10px; }
  .is-article .rdx-face { padding: 16px 18px 0; }
  .rdx-meta { font-size: 10.5px; }
  .rdx-title { margin-top: 6px; padding-bottom: 10px; font-size: 21px; }
  .rdx-ruled { --lh: 22px; --sink: 19px; margin: 4px -18px 0; padding: 0 18px; }
  .rdx-line { font-size: 14px; }
  .rdx-foot { font-size: 10px; margin-top: 0; }
  .rdx-card:not(.is-article) .rdx-face { background-position: 0 40px, 0 52px; background-size: 100% 1px, 100% calc(100% - 52px); }
  .rdx-tab { width: 34px; left: calc(10px + var(--tab) * (var(--w) - 20px - 34px) / 5); font-size: 10.5px; }
  .rdx-tiny { width: 28px; height: 28px; left: calc(var(--cx) - 14px); bottom: 12px; }
  .rdx-controls { --thumb: 24px; }
  .rdx-rail { height: 40px; }
  .rdx-letter { height: 30px; font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) { .rdx-card, .rdx-knob-face { transition: none; animation: none; } }

/* ---------- no JavaScript, or reduced motion: the same articles as plain index cards ---------- */
.rdx-list-h { margin-top: 36px; font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rdx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 40px 24px; margin-top: 40px; border-top: 0; }
.rdx-list li { position: relative; padding: 22px 24px 20px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }
.rdx-list li + li { margin-top: 0; }
.rdx-list li::before { content: attr(data-letter); position: absolute; top: -23px; left: 18px; width: 44px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 7px 7px 0 0; background: var(--surface); font: 650 11.5px/1 var(--mono); color: var(--accent); }
.rdx-list li > a:first-child { display: block; padding-bottom: 12px; border-bottom: 1px solid var(--accent); font: 400 1.5rem/1.15 var(--serif); letter-spacing: -0.01em; color: var(--head); text-decoration: none; }
.rdx-list li > a:first-child:hover { color: var(--accent); }
.rdx-list li > p:not([class]) { margin-top: 12px; font: italic 400 16px/1.6 var(--serif); color: var(--text); }
.rdx-list .byline { margin-top: 10px; font: 400 12px/1.7 var(--mono); color: var(--muted); }
.rdx-list .byline .with { padding: 0; border: 0; }
.rdx-list .byline .dot { margin-inline: 6px; opacity: .5; font-style: normal; }
.rdx-list .more { margin-top: 6px; }
.rdx-list .more a { font: 500 13.5px var(--mono); color: var(--accent); text-underline-offset: 3px; }
.rdx-how { display: none; }
.has-rdx .rdx-how { display: inline; }
/* the byline on a card stays on one line; on a narrow card it ends in "…" rather than wrapping */
.rdx-foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
