/* Pandu Studios Brief. Design brief: docs/design.md.
   Serif (Piazzolla) = what sources say. Sans (Schibsted Grotesk) = what we say and what you do. */

:root {
  --size: 0;
  --paper: #E6ECE3;
  --paper-deep: #D8E0D4;
  --paper-lift: #EFF3EC;
  --ink: #161A36;
  --ink-soft: #454A66;
  --ink-faint: #555A75;
  --line: rgba(22, 26, 54, 0.2);
  --line-soft: rgba(22, 26, 54, 0.1);
  --mark: #E0A100;
  --mark-wash: rgba(224, 161, 0, 0.2);
  --alert: #A3261C;
  --lean-left: #1F4FBF;
  --lean-lleft: #456FC6;
  --lean-center: #5F6575;
  --lean-lright: #C2554C;
  --lean-right: #B3261E;
  --serif: 'Piazzolla', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Schibsted Grotesk', 'Gill Sans', 'Trebuchet MS', sans-serif;
  --rail: 15.5rem;
  --col: 34.5rem;
  --margin: 19rem;
  --gap: 3rem;
}

[data-theme='dark'] {
  --paper: #12152B;
  --paper-deep: #0C0F22;
  --paper-lift: #1B1F3C;
  --ink: #E6EADF;
  --ink-soft: #B4B9CC;
  --ink-faint: #8A90A8;
  --line: rgba(230, 234, 223, 0.24);
  --line-soft: rgba(230, 234, 223, 0.11);
  --mark: #F2B62B;
  --mark-wash: rgba(242, 182, 43, 0.18);
  --alert: #F08A7E;
  --lean-left: #6F9BFF;
  --lean-lleft: #9DB8F2;
  --lean-center: #A3A8B8;
  --lean-lright: #F0A69F;
  --lean-right: #FF7468;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: calc(106.25% + var(--size) * 6.25%);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}
@media (min-width: 60rem) { html { font-size: calc(112.5% + var(--size) * 6.25%); } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.rail :focus-visible, .sec-head :focus-visible, .video-load:focus-visible { outline-color: var(--paper); }
[data-theme='dark'] .rail :focus-visible, [data-theme='dark'] .sec-head :focus-visible, [data-theme='dark'] .video-load:focus-visible { outline-color: var(--ink); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; font-family: var(--sans); z-index: 50; }
.skip:focus { left: 0; }

.loading, .empty { font-family: var(--sans); color: var(--ink-soft); padding: 4rem 1.25rem; max-width: 34rem; }

/* ───────── Shell ───────── */

.shell { display: block; }
main { display: block; padding: 0 1.15rem 6rem; outline: none; }

/* ───────── Rail (top bar on small screens) ───────── */

.rail {
  position: sticky; top: 0; z-index: 20;
  background: var(--ink); color: var(--paper);
  font-family: var(--sans);
}
.rail a { text-decoration: none; }
.rail-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1.15rem; }
.wordmark { font-weight: 800; font-size: 1.02rem; letter-spacing: -0.02em; line-height: 1.05; }
.wordmark span { font-weight: 500; opacity: 0.72; }
.rail-date { margin-left: auto; font-size: 0.82rem; opacity: 0.85; font-variant-numeric: tabular-nums; }
.rail-menu { font-size: 0.82rem; font-weight: 700; padding: 0.4rem 0.7rem; border: 1px solid rgba(255,255,255,0.4); border-radius: 4px; color: inherit; }
[data-theme='dark'] .rail { background: var(--paper-deep); color: var(--ink); border-bottom: 1px solid var(--line); }
[data-theme='dark'] .rail-menu { border-color: var(--line); }

.rail-panel { display: none; padding: 0.4rem 1.15rem 1.4rem; max-height: calc(100vh - 3.2rem); overflow: auto; }
.rail.is-open .rail-panel { display: block; }

.rail-group + .rail-group { margin-top: 1.25rem; }
.rail-label { font-size: 0.74rem; font-weight: 600; opacity: 0.62; margin-bottom: 0.4rem; }

.daynav { display: flex; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; }
.daynav a, .daynav span.off { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border: 1px solid currentColor; border-radius: 4px; font-weight: 700; }
.daynav span.off { opacity: 0.28; }
.daynav strong { font-weight: 700; font-size: 0.92rem; flex: 1; }

.viewtabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid currentColor; border-radius: 4px; overflow: hidden; }
.viewtabs a { text-align: center; padding: 0.45rem 0.3rem; font-weight: 700; font-size: 0.86rem; }
.viewtabs a[aria-current='page'] { background: var(--paper); color: var(--ink); }
[data-theme='dark'] .viewtabs a[aria-current='page'] { background: var(--ink); color: var(--paper); }

.contents li a { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; min-height: 2.4rem; padding: 0.28rem 0 0.28rem 0.7rem; font-size: 0.9rem; font-weight: 500; border-left: 3px solid transparent; margin-left: -0.7rem; }
.contents li a .n { opacity: 0.6; font-variant-numeric: tabular-nums; font-weight: 400; }
.contents li a.is-here { border-left-color: currentColor; font-weight: 800; }
.progress { font-size: 0.8rem; opacity: 0.75; margin-top: 0.5rem; }

.rail-links a { display: flex; justify-content: space-between; align-items: center; min-height: 2.4rem; padding: 0.28rem 0; font-size: 0.9rem; font-weight: 600; }
.rail-links a[aria-current='page'] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.rail-links .n { opacity: 0.6; font-weight: 400; font-variant-numeric: tabular-nums; }

.prefs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.prefs button { border: 1px solid currentColor; border-radius: 4px; padding: 0.32rem 0.7rem; min-height: 2.5rem; font-size: 0.82rem; font-weight: 600; opacity: 0.9; }
.prefs button:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.keys { display: none; font-size: 0.76rem; opacity: 0.7; margin-top: 0.7rem; line-height: 1.5; }
.keys kbd { font-family: var(--sans); font-weight: 700; border: 1px solid currentColor; border-radius: 3px; padding: 0 0.3em; }

/* ───────── Masthead ───────── */

.masthead { padding: 2.2rem 0 1.6rem; }
.masthead-main { max-width: var(--col); }
.leading { margin-top: 2rem; font-family: var(--sans); max-width: var(--col); }
.leading h2 { font-weight: 800; font-size: 0.92rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--ink); }
.leading li { padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); }
.leading a { display: block; font-weight: 700; font-size: 1rem; line-height: 1.25; letter-spacing: -0.012em; text-decoration: none; }
.leading a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.leading span { display: block; font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.2rem; }
.masthead-day { font-family: var(--sans); font-weight: 700; font-size: 1rem; color: var(--ink-soft); }
.masthead-date {
  font-family: var(--serif); font-weight: 300; font-style: normal;
  font-size: clamp(2.7rem, 11vw, 5.4rem); line-height: 0.96; letter-spacing: -0.035em;
  margin: 0.1rem 0 1.4rem -0.04em;
  font-variation-settings: 'opsz' 30;
}
.masthead-date em { font-style: italic; font-weight: 300; }
.edition-flag { display: inline-block; font-family: var(--sans); font-size: 0.82rem; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0.15rem 0.55rem; margin-bottom: 1.1rem; }
.edition-note { font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 1.2rem; max-width: 36rem; }

.lede p { font-size: 1.24rem; line-height: 1.5; }
.lede p + p { margin-top: 0.85rem; }
.lede p:first-child::first-line { font-weight: 600; }

.edition-stats { font-family: var(--sans); font-size: 0.88rem; color: var(--ink-soft); margin-top: 1.4rem; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; font-family: var(--sans); }
.btn { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; border: 1.5px solid var(--ink); border-radius: 4px; padding: 0.42rem 0.85rem; font-family: var(--sans); font-size: 0.86rem; font-weight: 700; text-decoration: none; background: transparent; color: var(--ink); line-height: 1.2; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.is-on { background: var(--ink); color: var(--paper); }
.btn-quiet { border-color: var(--line); font-weight: 600; }
.btn-danger { border-color: var(--alert); color: var(--alert); }
.btn-danger:hover { background: var(--alert); color: var(--paper); }

.toptags { font-family: var(--sans); font-size: 0.88rem; margin-top: 1.2rem; color: var(--ink-soft); line-height: 1.5; display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.toptags a { color: var(--ink); font-weight: 600; white-space: nowrap; padding: 0.5rem 0; }

/* ───────── Sections ───────── */

.sec { margin-top: 2.6rem; }
.sec-head {
  display: flex; align-items: center; gap: 0.3rem 1rem;
  background: var(--ink); color: var(--paper);
  margin: 0 -1.15rem; padding: 0.3rem 1.15rem;
  position: sticky; top: 3.05rem; z-index: 5;
}
[data-theme='dark'] .sec-head { background: var(--paper-lift); color: var(--ink); }
.sec-head h2 { font-family: var(--sans); font-weight: 800; font-size: 1.14rem; letter-spacing: -0.02em; line-height: 1.15; min-width: 0; }
.sec-head h2 button { font-weight: inherit; display: inline-flex; align-items: baseline; gap: 0.55rem; min-height: 2.5rem; text-align: left; }
.sec-head .tally { font-family: var(--sans); font-size: 0.8rem; opacity: 0.8; margin-left: auto; white-space: nowrap; }
.chev { display: inline-block; width: 0.55em; height: 0.55em; border-right: 0.16em solid currentColor; border-bottom: 0.16em solid currentColor; transform: rotate(45deg) translateY(-0.18em); transition: transform 0.18s ease; flex: none; }
[aria-expanded='false'] > .chev { transform: rotate(-45deg) translateY(0); }
.sec.is-collapsed .sec-body { display: none; }

/* ───────── Story ───────── */

.story { padding: 1.9rem 0 2rem; border-bottom: 1px solid var(--line); scroll-margin-top: 6.9rem; }
.sec { scroll-margin-top: 3rem; }
.story:last-child { border-bottom: 0; }
.story.is-flash { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: var(--mark-wash); } to { background: transparent; } }

.story-sec { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.3rem; }
.story-h { font-family: var(--sans); font-weight: 750; font-size: 1.42rem; line-height: 1.16; letter-spacing: -0.022em; max-width: var(--col); text-wrap: balance; }
.story.w3 .story-h { font-size: 1.56rem; font-weight: 800; letter-spacing: -0.028em; }
.story-toggle { font-weight: inherit; display: block; width: 100%; }
.story-toggle:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.dek { font-size: 1.1rem; line-height: 1.45; color: var(--ink-soft); margin-top: 0.5rem; max-width: var(--col); }
.story.is-read .story-h, .story.is-read .dek { opacity: 0.55; }

.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 1.1rem; margin-top: 0.85rem; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); max-width: var(--col); }
.story-meta .acts { display: flex; gap: 0.4rem; margin-left: auto; }
.act { border: 1px solid var(--line); border-radius: 4px; min-height: 2.5rem; padding: 0.26rem 0.75rem; font-weight: 700; font-size: 0.8rem; color: var(--ink); line-height: 1.3; }
.act:hover { border-color: var(--ink); }
.act.is-on { background: var(--mark); border-color: var(--mark); color: #161A36; }
.act.is-on.done { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.single { color: var(--alert); font-weight: 700; border: 1.5px solid var(--alert); border-radius: 4px; padding: 0.1rem 0.45rem; }
.tags { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.6rem; max-width: var(--col); line-height: 1.5; display: flex; flex-wrap: wrap; gap: 0 0.8rem; }
.tags a { color: var(--ink-soft); white-space: nowrap; text-decoration-color: var(--line); padding: 0.55rem 0; }

.story.is-collapsed .story-grid { display: none; }
.story-grid { margin-top: 1.5rem; }

/* The source strip: one dot per source, placed by lean, filled by trust. */
.strip { display: inline-flex; align-items: center; gap: 0.5rem; }
.strip-axis { position: relative; width: 9.6rem; height: 1.3rem; flex: none; }
.strip-axis::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink-faint); opacity: 0.7; }
.strip-axis::after { content: ''; position: absolute; left: 50%; top: 12%; bottom: 12%; width: 1px; background: var(--ink-faint); opacity: 0.7; }
.strip-end { font-size: 0.78rem; color: var(--ink-soft); font-weight: 700; }
.dot {
  --c: var(--lean-center);
  display: inline-block; width: 0.66rem; height: 0.66rem; border-radius: 50%;
  border: 1.5px solid var(--c); background: var(--c); flex: none;
}
.strip-axis .dot { width: 0.7rem; height: 0.7rem; position: absolute; top: 50%; left: var(--x); margin: -0.35rem 0 0 calc(-0.35rem + var(--dx, 0px)); box-shadow: 0 0 0 1.5px var(--paper); }
.strip.seen .strip-axis .dot { animation: settle 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes settle { from { left: 50%; margin-left: -0.35rem; } }
.dot.l-left { --c: var(--lean-left); }
.dot.l-lean-left { --c: var(--lean-lleft); }
.dot.l-center { --c: var(--lean-center); }
.dot.l-lean-right { --c: var(--lean-lright); }
.dot.l-right { --c: var(--lean-right); }
.dot.t-mostly-high { background: conic-gradient(var(--c) 0 75%, transparent 75%); }
.dot.t-mixed { background: linear-gradient(90deg, var(--c) 50%, transparent 50%); }
.dot.t-low { background: transparent; }
.dot.primary { border-radius: 1px; --c: var(--ink-soft); background: transparent; transform: rotate(45deg) scale(0.86); }
.strip-primary { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--ink-soft); }
.strip-key { font-family: var(--sans); font-size: 0.84rem; color: var(--ink-soft); margin-top: 1.1rem; max-width: var(--col); line-height: 1.5; }
.strip-key .dot { vertical-align: -0.05em; margin: 0 0.15em; }

/* Parts of a story */
.part { max-width: var(--col); }
.part + .part { margin-top: 1.7rem; }
.part > h4 { font-family: var(--sans); font-weight: 800; font-size: 0.92rem; letter-spacing: -0.005em; margin-bottom: 0.5rem; }
.part > h4 small { font-weight: 500; color: var(--ink-soft); font-size: 0.82rem; margin-left: 0.5rem; }
.part p { font-size: 1.06rem; }
.part p + p { margin-top: 0.8rem; }

.cites { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; vertical-align: 0.35em; margin-left: 0.3em; white-space: nowrap; line-height: 0; }
.cites button { padding: 0.45em 0.34em; margin-right: 0.05em; line-height: 1; color: var(--ink-soft); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.25em; }
.cites button:hover { color: var(--ink); text-decoration-color: var(--ink); }

.part-framing p { color: var(--ink-soft); }

.part-analysis { border-left: 4px solid var(--ink); padding: 0.1rem 0 0.1rem 1.05rem; }
.part-analysis p, .part-qa .a p { font-family: var(--sans); font-size: 0.97rem; line-height: 1.58; }

.part-qa li { border-top: 1px solid var(--line-soft); }
.part-qa li:last-child { border-bottom: 1px solid var(--line-soft); }
.q { display: flex; align-items: baseline; gap: 1rem; width: 100%; min-height: 2.5rem; padding: 0.75rem 0; font-family: var(--sans); font-weight: 650; font-size: 1rem; line-height: 1.35; }
.q .q-act { margin-left: auto; flex: none; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.q:hover .q-act { color: var(--ink); text-decoration-color: var(--ink); }
.a { margin: 0 0 1rem; padding: 0.1rem 0 0.1rem 1.05rem; border-left: 4px solid var(--ink); }
.a-label { font-family: var(--sans); font-size: 0.76rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 0.2rem; }

.video { margin-bottom: 0.9rem; }
.video-load { display: flex; align-items: center; gap: 0.9rem; width: 100%; background: var(--ink); color: var(--paper); padding: 1rem 1.1rem; font-family: var(--sans); border-radius: 4px; }
[data-theme='dark'] .video-load { background: var(--paper-lift); color: var(--ink); }
.video-load .play { width: 0; height: 0; border-left: 1rem solid currentColor; border-top: 0.62rem solid transparent; border-bottom: 0.62rem solid transparent; flex: none; }
.video-load b { display: block; font-weight: 700; line-height: 1.25; }
.video-load small { opacity: 0.7; font-size: 0.8rem; }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.video-alt { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.3rem; }

.photos li { font-size: 0.98rem; padding: 0.35rem 0; }
.photos .where { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); }

.part-notes textarea {
  display: block; width: 100%; min-height: 4.6rem; resize: vertical;
  background: var(--paper-lift); border: 1px solid var(--line); border-radius: 4px;
  padding: 0.6rem 0.75rem; font-family: var(--sans); font-size: 0.95rem; line-height: 1.5;
}
.part-notes textarea:focus { border-color: var(--ink); outline: none; box-shadow: inset 0 -3px 0 var(--mark); }
.note-state { font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft); min-height: 1.2em; display: block; margin-top: 0.25rem; }
.checked { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); margin-top: 1.4rem; max-width: var(--col); }

/* Sources beside the story */
.story-sources { margin-top: 2rem; font-family: var(--sans); }
.story-sources > h4 { font-weight: 800; font-size: 0.92rem; margin-bottom: 0.2rem; }
.src { padding: 0.8rem 0; border-top: 1px solid var(--line-soft); font-size: 0.88rem; line-height: 1.4; }
.src.is-flash { animation: flash 1.6s ease-out; }
.src-top { display: flex; align-items: center; gap: 0.45rem; }
.src-n { font-weight: 800; font-size: 0.78rem; min-width: 1.1em; font-variant-numeric: tabular-nums; }
.src-outlet { font-weight: 800; }
.src-via { color: var(--ink-faint); font-size: 0.78rem; }
.src-title { display: block; font-family: var(--serif); font-size: 0.98rem; line-height: 1.32; margin: 0.25rem 0 0.3rem; overflow-wrap: anywhere; }
.src-labels { color: var(--ink-soft); font-size: 0.82rem; }
.src-labels b { color: var(--ink); font-weight: 700; }
.src details { margin-top: 0.3rem; }
.src summary { cursor: pointer; padding: 0.6rem 0; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); list-style: none; display: inline; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.src summary::-webkit-details-marker { display: none; }
.src details > summary { display: inline-block; }
.src details p { font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.4rem; }
.src details p b { color: var(--ink); }
.src-save { display: block; padding: 0.6rem 0; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.src-save.is-on { color: var(--ink); text-decoration-color: var(--mark); text-decoration-thickness: 3px; }

/* ───────── Pick view ───────── */

.pagehead { padding: 2.2rem 0 0.4rem; max-width: 46rem; }
.pagehead h1 { font-family: var(--sans); font-weight: 800; font-size: clamp(2rem, 7vw, 3.1rem); letter-spacing: -0.035em; line-height: 1.02; }
.pagehead .sub { font-size: 1.12rem; color: var(--ink-soft); margin-top: 0.7rem; max-width: var(--col); }

.filters { font-family: var(--sans); margin-top: 1.5rem; max-width: 52rem; }
.filters input[type='search'] { width: 100%; max-width: 26rem; background: var(--paper-lift); border: 1.5px solid var(--ink); border-radius: 4px; padding: 0.55rem 0.8rem; font-size: 0.95rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; align-items: center; }
.filter-row .lbl { font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); margin-right: 0.3rem; min-width: 4.2rem; }
.chip { border: 1px solid var(--line); border-radius: 4px; min-height: 2.5rem; padding: 0.24rem 0.7rem; font-size: 0.82rem; font-weight: 600; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { opacity: 0.6; font-weight: 400; margin-left: 0.3rem; }
.tagbox { margin-top: 0.8rem; }
.tagbox > summary { cursor: pointer; font-size: 0.86rem; font-weight: 700; padding: 0.6rem 0; display: inline-block; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; list-style: none; }
.tagbox > summary::-webkit-details-marker { display: none; }
.tagbox .filter-row { margin-top: 0.3rem; }
.picklist .story { padding: 1.15rem 0 1.2rem; }
.picklist .story.is-collapsed .story-h { font-size: 1.14rem; font-weight: 700; letter-spacing: -0.015em; }
.picklist .story.is-collapsed .dek { font-size: 1rem; margin-top: 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.picklist .story.is-collapsed .tags { display: none; }
.picklist .story.is-collapsed .story-meta { margin-top: 0.6rem; }
.resultline { font-family: var(--sans); font-size: 0.88rem; color: var(--ink-soft); margin-top: 1.2rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); }

/* ───────── Saved, Sources, Archive ───────── */

.block { margin-top: 2.4rem; max-width: 40rem; }
.block > h2 { font-family: var(--sans); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; padding-bottom: 0.45rem; border-bottom: 2px solid var(--ink); }
.block > h2 .n { font-weight: 400; color: var(--ink-soft); margin-left: 0.4rem; }
.block .none { font-family: var(--sans); color: var(--ink-soft); font-size: 0.95rem; padding: 0.9rem 0; }
.item { padding: 0.95rem 0; border-bottom: 1px solid var(--line-soft); }
.item h3 { font-family: var(--sans); font-weight: 700; font-size: 1.06rem; line-height: 1.25; letter-spacing: -0.012em; }
.item h3 a { text-decoration: none; }
.item h3 a:hover { text-decoration: underline; }
.item .meta { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.25rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: center; }
.item .body { margin-top: 0.4rem; font-size: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.item .body.note { font-family: var(--sans); font-size: 0.97rem; border-left: 4px solid var(--mark); padding-left: 0.9rem; }
.item .rm { padding: 0.6rem 0; font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.2em; }
.data-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.data-note { font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.8rem; max-width: 36rem; }
.status-line { font-family: var(--sans); font-size: 0.88rem; font-weight: 700; margin-top: 0.7rem; min-height: 1.3em; }

.legend { display: grid; gap: 1.4rem; margin-top: 1.4rem; max-width: 38rem; }
.outlets { max-width: 40rem; }
.legend h3 { font-family: var(--sans); font-weight: 800; font-size: 0.98rem; margin-bottom: 0.4rem; }
.legend p { font-size: 1.02rem; }
.legend ul li { display: flex; align-items: baseline; gap: 0.6rem; font-family: var(--sans); font-size: 0.92rem; padding: 0.22rem 0; }
.legend ul li .dot:not(.primary) { transform: translateY(0.08rem); }

.outlet { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.outlet h3 { font-family: var(--sans); font-weight: 800; font-size: 1.06rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.outlet h3 small { font-weight: 500; color: var(--ink-soft); font-size: 0.82rem; }
.outlet .labels { font-family: var(--sans); font-size: 0.88rem; margin-top: 0.2rem; }
.outlet .labels b { font-weight: 700; }
.outlet p { font-size: 0.98rem; margin-top: 0.35rem; }
.outlet .raters { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.35rem; }

.edition-row { display: grid; grid-template-columns: 1fr; gap: 0.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.edition-row h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.1; }
.edition-row h3 a { text-decoration-thickness: 1px; text-decoration-color: var(--line); }
.edition-row h3 a:hover { text-decoration-color: currentColor; }
.edition-row .meta { font-family: var(--sans); font-size: 0.82rem; color: var(--ink-soft); }
.edition-row ul { margin-top: 0.35rem; }
.edition-row li { font-family: var(--sans); font-size: 0.92rem; line-height: 1.35; padding: 0.12rem 0; }

.colophon { font-family: var(--sans); font-size: 0.8rem; color: var(--ink-faint); margin-top: 4rem; max-width: 40rem; line-height: 1.55; }

/* ───────── Tablet: sources move beside the text ───────── */

@media (min-width: 60rem) {
  main { padding: 0 2.2rem 7rem; }
  .sec-head { margin: 0 -2.2rem; padding: 0.75rem 2.2rem; }
  .rail-bar { padding: 0.6rem 2.2rem; }
  .rail-panel { padding: 0.4rem 2.2rem 1.4rem; }
  .story-grid { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(14rem, var(--margin)); column-gap: var(--gap); align-items: start; }
  .story-sources { margin-top: 0; }
  .story-sources.fits { position: sticky; top: 7.4rem; }
  .picklist .story.is-collapsed .story-head { display: grid; grid-template-columns: minmax(0, var(--col)) minmax(14rem, var(--margin)); column-gap: var(--gap); align-items: start; }
  .picklist .story.is-collapsed .story-head > * { grid-column: 1; }
  .picklist .story.is-collapsed .story-meta { grid-column: 2; grid-row: 1 / span 3; margin-top: 0.2rem; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .picklist .story.is-collapsed .story-meta .acts { margin-left: 0; }
  .story { scroll-margin-top: 7.4rem; }
  .sec { scroll-margin-top: 3.2rem; }
  .sec-head h2 { font-size: 1.28rem; }
  .story-sources .src:first-of-type { border-top: 2px solid var(--ink); }
  .story-sources > h4 { margin-bottom: 0.55rem; }
  .masthead { padding-top: 3rem; display: grid; grid-template-columns: minmax(0, var(--col)) minmax(14rem, var(--margin)); column-gap: var(--gap); align-items: start; }
  .leading { margin-top: 0.4rem; }
  .lede p { font-size: 1.32rem; }
  .story.w3 .story-h { font-size: 1.86rem; letter-spacing: -0.03em; }
}

/* ───────── Desktop: the rail stands at the left ───────── */

@media (min-width: 77rem) {
  .shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
  .rail { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 1.6rem 1.35rem 2rem; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-bar { display: block; padding: 0; }
  .rail-menu, .rail-date { display: none; }
  .wordmark { display: block; font-size: 1.5rem; line-height: 0.98; letter-spacing: -0.035em; }
  .wordmark span { display: block; font-size: 0.84rem; letter-spacing: 0; margin-bottom: 0.35rem; }
  .rail-panel { display: block; padding: 1.5rem 0 0; max-height: none; overflow: visible; }
  main { padding: 0 3.2rem 8rem; }
  .sec-head { margin: 0 -3.2rem; padding: 0.8rem 3.2rem; top: 0; }
  .sec-head h2 { font-size: 1.45rem; }
  .story-sources.fits { top: 4.6rem; }
  .story { scroll-margin-top: 4.2rem; }
  .sec { scroll-margin-top: 0; }
  .keys { display: block; }
  html { scroll-padding-top: 4rem; }
  .masthead { padding-top: 3.6rem; }
  .leading { margin-top: 2.2rem; }
}

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

@media print {
  .rail, .toolbar, .story-meta .acts, .part-notes, .video-load, .filters { display: none !important; }
  body { background: #fff; color: #000; }
  .sec-head { position: static; background: none; color: #000; border-bottom: 2px solid #000; }
  .story.is-collapsed .story-grid, .a[hidden] { display: block !important; }
}
