/* Design Index — editorial news portal */
:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --sunken: #efefeb;
  --ink: #111110;
  --ink-2: #44443f;
  --ink-3: #82827b;
  --line: #e4e3de;
  --line-2: #d4d3cc;
  --accent: #ff4f00;
  --focus: #2f6bff;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 10px;
  --r-lg: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0e; --surface: #171716; --sunken: #1c1c1b; --ink: #ededea; --ink-2: #b5b5ae; --ink-3: #7c7c76;
    --line: #262624; --line-2: #33332f; --accent: #ff6a2b; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0e; --surface: #171716; --sunken: #1c1c1b; --ink: #ededea; --ink-2: #b5b5ae; --ink-3: #7c7c76;
  --line: #262624; --line-2: #33332f; --accent: #ff6a2b; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.no-scroll { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -60px; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--ink-3); }
em { font-style: italic; }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.masthead__bar { height: 60px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; }
.wordmark em { font-family: var(--serif); font-weight: 400; font-size: 1.24em; letter-spacing: 0; margin-left: 1px; }
.wordmark__mark { width: 22px; height: 22px; stroke-width: 1.8; }
.wordmark__mark rect { fill: var(--ink); stroke: none; }
.wordmark__mark path { stroke: var(--bg); stroke-width: 2; }
.masthead__date { font: 500 11.5px/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.masthead__actions { display: flex; align-items: center; gap: 6px; }
.search-trigger { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; min-width: 220px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-3); font-size: 13.5px; transition: border-color .15s; }
.search-trigger:hover { border-color: var(--line-2); color: var(--ink-2); }
.search-trigger svg { width: 16px; height: 16px; }
.search-trigger span { flex: 1; text-align: left; }
kbd { font: 500 11px/1 var(--mono); padding: 4px 6px; border-radius: 5px; background: var(--sunken); color: var(--ink-3); border: 1px solid var(--line); }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-button:hover { background: var(--sunken); color: var(--ink); }
.icon-button .fill { fill: currentColor; stroke: none; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font: 600 10px/16px var(--sans); text-align: center; }

.sections { border-top: 1px solid var(--line); }
.sections__track { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.sections__track::-webkit-scrollbar { display: none; }
.sections__track a { position: relative; flex: none; padding: 12px 10px 11px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; transition: color .15s; }
.sections__track a:first-child { padding-left: 0; }
.sections__track a:hover { color: var(--ink); }
.sections__track a[aria-current] { color: var(--ink); }
.sections__track a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.sections__track a:first-child[aria-current]::after { left: 0; }

/* ---------- shared bits ---------- */
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 0; font: 500 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.kicker a { color: var(--ink-2); }
.kicker a:hover { color: var(--ink); }
.kicker .sep { margin: 0 7px; opacity: .5; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.meta time { font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; background: var(--sunken); color: var(--ink-2); font: 500 11px/1 var(--sans); }
.pill--video { background: color-mix(in srgb, var(--accent) 12%, transparent); color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.pill--new { background: var(--ink); color: var(--bg); }
.pill--quiet { background: transparent; border: 1px solid var(--line); }
.why { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); border-radius: 0 8px 8px 0; font-size: 14px; color: var(--ink-2); }
.why span { display: block; margin-bottom: 2px; font: 500 10.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.why--inline { margin-top: 8px; padding: 6px 10px; font-size: 13.5px; }
.media { position: relative; overflow: hidden; border-radius: var(--r); background: var(--sunken); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.media--empty { display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), color-mix(in srgb, var(--c) 5%, var(--surface))); }
.media--empty span { font-family: var(--serif); font-size: clamp(16px, 2.2vw, 28px); color: color-mix(in srgb, var(--c) 70%, var(--ink)); padding: 12px; text-align: center; line-height: 1.1; }
a:hover > .media img { transform: scale(1.025); }
.play { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .62); backdrop-filter: blur(6px); color: #fff; }
.play svg { width: 13px; height: 13px; fill: currentColor; stroke: none; margin-left: 2px; }
.is-read h2 a, .is-read h3 a, .is-read .card__title a { color: var(--ink-3); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 500; transition: background .15s, border-color .15s; }
.button:hover { border-color: var(--ink-3); }
.button.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.button--primary:hover { opacity: .88; }
.button--ghost { background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); transition: border-color .15s, background .15s; }
.chip .dot { margin-right: 6px; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips--bar { margin: 4px 0 28px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips--bar .chip { flex: none; }

/* ---------- intro ---------- */
#main { min-height: 70vh; outline: none; }
.intro { padding: 44px 0 28px; display: grid; gap: 10px; }
.intro h1 { font: 400 clamp(40px, 6vw, 68px)/.98 var(--serif); letter-spacing: -0.02em; }
.intro h1 em { font-style: italic; }
.intro > p { max-width: 62ch; color: var(--ink-2); font-size: 15.5px; }
.intro strong { color: var(--ink); font-weight: 600; }
.intro .eyebrow { display: flex; align-items: center; font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.intro__actions { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; padding: 8px 0 44px; border-bottom: 1px solid var(--line); }
.lead__link { display: block; }
.lead__media { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.lead__body { padding-top: 18px; display: grid; gap: 10px; }
.lead__title { font: 600 clamp(26px, 3vw, 36px)/1.12 var(--sans); letter-spacing: -0.028em; text-wrap: balance; }
.lead__title a:hover, .row__title a:hover, .card__title a:hover, .top h3 a:hover, .vtile h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.lead__dek { font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 64ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.top { display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.top:first-child { border-top: 0; padding-top: 0; }
.top:not(:has(.top__thumb)) { grid-template-columns: 28px minmax(0, 1fr); }
.top__n { font: 500 12px/1.6 var(--mono); color: var(--ink-3); }
.top__body { display: grid; gap: 6px; align-content: start; }
.top h3 { font-size: 16.5px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; text-wrap: pretty; }
.top__media { aspect-ratio: 4 / 3; border-radius: 8px; }

/* ---------- latest + rail ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; padding: 36px 0 24px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font: 600 20px/1.2 var(--sans); letter-spacing: -0.02em; }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--sunken); }
.tabs button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--ink-3); transition: background .15s, color .15s; }
.tabs button span { font: 500 11px/1 var(--mono); opacity: .7; }
.tabs button:hover:not(:disabled) { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--line); }
.tabs button:disabled { opacity: .4; cursor: default; }
.day { margin: 26px 0 0; padding-bottom: 8px; font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 168px; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.row:not(:has(.row__thumb)) { grid-template-columns: minmax(0, 1fr); }
.day + .row { border-top: 1px solid var(--line); }
.row__body { display: grid; gap: 7px; align-content: start; min-width: 0; }
.row__title { font-size: 18.5px; line-height: 1.3; font-weight: 600; letter-spacing: -0.018em; text-wrap: pretty; }
.row__dek { color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
.row__media { aspect-ratio: 16 / 10; }
.save { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--ink-3); opacity: .7; transition: opacity .15s, background .15s, color .15s; }
.row:hover .save, .save:focus-visible, .save.is-saved { opacity: 1; }
.save:hover { background: var(--sunken); color: var(--ink); }
.save svg { width: 16px; height: 16px; }
.save.is-saved { color: var(--ink); }
.save.is-saved svg { fill: currentColor; }
.more { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; margin-top: 20px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; font-weight: 500; background: var(--surface); transition: border-color .15s; }
.more:hover { border-color: var(--ink-3); }
.more span { color: var(--ink-3); font-weight: 400; font-size: 13px; }

.rail { display: flex; flex-direction: column; gap: 36px; }
.module__head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--ink); }
.module__head h2 { font: 600 15px/1.2 var(--sans); letter-spacing: -0.01em; }
.module__head a { font-size: 12.5px; color: var(--ink-3); }
.module__head a:hover { color: var(--ink); }
.module__videos { display: grid; gap: 18px; padding-top: 12px; }
.module__text { font-size: 13.5px; color: var(--ink-2); margin: 10px 0 14px; }
.module__text--small { font-size: 12.5px; color: var(--ink-3); margin: 14px 0 0; }
.module__text a { text-decoration: underline; text-underline-offset: 2px; color: var(--ink-2); }
.module--quiet .chips .chip { height: 28px; font-size: 12.5px; }
.covered { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.covered li { counter-increment: c; display: grid; gap: 4px; padding: 12px 0 12px 26px; position: relative; border-bottom: 1px solid var(--line); }
.covered li::before { content: counter(c); position: absolute; left: 0; top: 13px; font: 500 12px/1.3 var(--mono); color: var(--ink-3); }
.covered a { font-size: 14.5px; font-weight: 600; line-height: 1.32; letter-spacing: -0.01em; }
.covered a:hover { text-decoration: underline; text-underline-offset: 2px; }
.covered span { font-size: 12px; color: var(--ink-3); }

.vtile { display: grid; gap: 8px; align-content: start; }
.vtile__media { aspect-ratio: 16 / 9; }
.vtile h3 { font-size: 14.5px; line-height: 1.32; font-weight: 600; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vtile .meta { gap: 6px; }
.vtile .meta span::after { content: "·"; margin-left: 6px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; padding-bottom: 12px; }

.events-mini, .events-full { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.event__date { display: grid; justify-items: center; align-content: center; height: 48px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.event__date span { font: 500 10px/1 var(--mono); text-transform: uppercase; color: var(--accent); letter-spacing: .05em; }
.event__date strong { font-size: 18px; line-height: 1.15; font-weight: 600; }
.event h3 { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.event h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.event p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.events-full .event { grid-template-columns: 56px minmax(0, 1fr); padding: 20px 0; }
.events-full .event__date { height: 60px; }
.events-full .event h3 { font-size: 18px; }
.event__summary { font-size: 14px !important; color: var(--ink-2) !important; margin-top: 8px !important; }
.event__tags { display: flex; gap: 6px; margin-top: 10px !important; }

/* ---------- lanes ---------- */
.lane { padding: 40px 0 8px; border-top: 1px solid var(--line); }
.lane__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.lane__head h2 { font: 400 34px/1 var(--serif); letter-spacing: -0.01em; }
.lane__head p { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.lane__head a { flex: none; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.lane__head a:hover { color: var(--ink); }
.lane__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { display: grid; gap: 10px; align-content: start; }
.card__media { aspect-ratio: 3 / 2; }
.card__title { font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; text-wrap: pretty; }

/* ---------- other views ---------- */
.narrow { max-width: 760px; padding-bottom: 40px; }
.week section { margin-bottom: 36px; }
.week h2 { display: flex; align-items: center; font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px 40px; padding-bottom: 48px; }
.sources h2 { display: flex; align-items: center; font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sources li a:hover { text-decoration: underline; text-underline-offset: 2px; }
.status { font: 400 12px/1.6 var(--mono); color: var(--ink-3); white-space: nowrap; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--line-2); }
.status--updated::before { background: #30a46c; }
.status--error::before { background: #e5484d; }
.status--needs-attention::before { background: #f5a524; }
.feeds { list-style: none; margin: 0; padding: 0; }
.feeds li { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.feeds a { display: flex; align-items: center; font-weight: 500; }
.feeds a:hover { text-decoration: underline; text-underline-offset: 2px; }
.feeds code { font: 12px var(--mono); color: var(--ink-3); }
.prose p { font-size: 17px; line-height: 1.65; color: var(--ink-2); margin-bottom: 18px; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 48px 0; text-align: center; color: var(--ink-3); }
.empty h3, .empty h2 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.empty--page { padding: 120px 0; display: grid; gap: 12px; justify-items: center; }

/* loading skeleton */
.loading { padding: 44px 0; display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; }
.skeleton, .skeleton-list div { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton--hero { aspect-ratio: 16 / 10; }
.skeleton-list { display: grid; gap: 18px; align-content: start; }
.skeleton-list div { height: 74px; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- footer ---------- */
.footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding: 48px 0 36px; }
.footer__brand p { margin-top: 12px; max-width: 36ch; font-size: 14px; color: var(--ink-3); }
.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__links h3 { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 14px; }
.footer__links a { display: block; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.footer__links a:hover { color: var(--ink); }
.footer__meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 28px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.live { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #30a46c; box-shadow: 0 0 0 3px color-mix(in srgb, #30a46c 20%, transparent); }

/* ---------- reader ---------- */
.reader { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.reader__scrim { position: absolute; inset: 0; background: rgba(10, 10, 9, .38); opacity: 0; transition: opacity .25s; }
.reader__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(0, 0, 0, .12); transform: translateX(100%); transition: transform .32s var(--ease); outline: none; }
.reader.is-open { pointer-events: auto; }
.reader.is-open .reader__scrim { opacity: 1; }
.reader.is-open .reader__panel { transform: none; }
.reader__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px 0 28px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.reader__video { aspect-ratio: 16 / 9; background: #000; }
.reader__video iframe { width: 100%; height: 100%; border: 0; display: block; }
.reader__media { aspect-ratio: 16 / 9; border-radius: 0; }
.reader__body { padding: 28px 28px 48px; display: grid; gap: 14px; }
.reader__source { font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.reader__body h2 { font: 600 clamp(24px, 3.4vw, 30px)/1.16 var(--sans); letter-spacing: -0.026em; text-wrap: balance; }
.reader__dek { font-size: 17px; line-height: 1.55; color: var(--ink); }
.reader__excerpt { margin: 4px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line-2); }
.reader__excerpt p { font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.reader__excerpt cite { display: block; margin-top: 8px; font: normal 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.reader__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.reader__actions .button { height: 40px; }
.reader__also, .reader__related { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.reader__also h3, .reader__related h3 { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 10px; }
.reader__also ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reader__also a { display: inline-flex; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.reader__related a { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.reader__related strong { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.reader__related a:hover strong { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- search palette ---------- */
.palette { width: min(640px, calc(100% - 24px)); max-height: min(70vh, 640px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .22); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; animation: pop .18s var(--ease); }
.palette::backdrop { background: rgba(10, 10, 9, .35); backdrop-filter: blur(2px); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--line); }
.palette__field svg { color: var(--ink-3); }
.palette__field input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; }
.palette__field input::-webkit-search-cancel-button { display: none; }
.palette__results { overflow-y: auto; padding: 6px 8px 12px; }
.palette__label { display: flex; justify-content: space-between; padding: 14px 10px 6px; font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.palette__label span { text-transform: none; letter-spacing: 0; font-family: var(--sans); }
.chips--pad { padding: 4px 10px; }
.result { display: grid; gap: 3px; padding: 10px; border-radius: 9px; }
.result:hover, .result:focus-visible { background: var(--sunken); }
.result__main { display: flex; align-items: baseline; }
.result__main .dot { flex: none; }
.result strong { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.result__meta { padding-left: 14px; font-size: 12.5px; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 500; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- library: shared bits ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.swatch { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 3px; background: var(--fc); margin-right: 8px; }
.swatch--inbox { background: transparent; border: 1.5px dashed var(--ink-3); }
.folder-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.folder-tag:hover { border-color: var(--line-2); color: var(--ink); }
.folder-tag .swatch { width: 7px; height: 7px; margin-right: 6px; }
.row__tools { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.button--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.button--danger { color: #e5484d; }
.button--danger:hover { border-color: #e5484d; }
.confirm .button--danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.button--danger-ghost { background: transparent; color: #e5484d; border-color: transparent; }
.linklike { font-size: 12.5px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.linklike:hover { color: var(--ink); }
.linklike--danger { color: var(--ink-3); text-decoration: none; }
.linklike--danger:hover { color: #e5484d; }
.account-slot:empty { display: none; }
.account-slot { display: flex; align-items: center; margin-left: 4px; }
.account { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.account:hover .avatar { box-shadow: 0 0 0 2px var(--line-2); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--sunken); color: var(--ink-2); font-weight: 600; transition: box-shadow .15s; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 12.5px; }
.avatar--mono { background: var(--ink); color: var(--bg); }
.avatar--xl { width: 88px; height: 88px; font: 400 44px/1 var(--serif); }
.avatar--xl svg { width: 34px; height: 34px; }
.avatar--xl.avatar--mono:not(:has(svg)) { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #7c5cff)); color: #fff; }

/* ---------- profile ---------- */
.profile { display: grid; gap: 28px; padding: 44px 0 36px; border-bottom: 1px solid var(--line); }
.profile__id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.profile__who { display: grid; gap: 8px; min-width: 0; }
.profile .eyebrow { font: 500 11.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.profile h1 { font: 400 clamp(40px, 6vw, 64px)/.98 var(--serif); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.profile__meta { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.profile__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.profile__stats div { display: grid; gap: 4px; align-content: start; padding: 18px 22px; }
.profile__stats div + div { border-left: 1px solid var(--line); }
.profile__stats dt { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.profile__stats dd { margin: 0; font: 600 40px/1.05 var(--sans); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.profile__stats span { font-size: 12.5px; color: var(--ink-3); }
.taste { display: grid; gap: 10px; }
.taste__label { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.taste__bar { display: flex; gap: 3px; height: 10px; }
.taste__bar i { min-width: 6px; border-radius: 3px; background: var(--c); }
.taste__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--ink-2); }
.taste__legend li { display: flex; align-items: center; }
.taste__legend span { margin-left: 6px; font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.tidy { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.tidy p { display: flex; align-items: center; font-size: 14.5px; color: var(--ink-2); }
.tidy strong { color: var(--ink); font-weight: 600; }
.shelves { padding-top: 36px; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; padding-top: 20px; }
.folder { display: grid; gap: 12px; align-content: start; }
.folder__cover { display: grid; gap: 3px; aspect-ratio: 4 / 3; padding: 3px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--fc) 14%, var(--sunken)); border: 1px solid var(--line); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.folder__cover .media { border-radius: 9px; }
.folder__cover .media--empty span { font-size: 15px; }
.folder__cover--2, .folder__cover--4 { grid-template-columns: 1fr 1fr; }
.folder__cover--3 { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; }
.folder__cover--3 .media:first-child { grid-row: span 2; }
.folder__cover--empty { place-items: center; }
.folder__cover--empty span { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
a.folder:hover .folder__cover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .08); }
.folder__body { display: grid; gap: 3px; }
.folder__body strong { display: flex; align-items: center; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder__body > span { font-size: 12.5px; color: var(--ink-3); }
.folder--inbox .folder__cover { background: var(--sunken); border-style: dashed; border-color: var(--line-2); }
.folder--new { align-content: center; gap: 10px; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); min-height: 160px; }
.folder--new p { font-size: 12.5px; color: var(--ink-3); }
.folder--new .new-folder { flex-direction: column; }
.folder--new .new-folder input { flex: none; }
.new-folder { display: flex; gap: 6px; }
.new-folder input { flex: 1; min-width: 0; height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); outline: none; font-size: 13.5px; }
.new-folder input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.intro--folder h1 { display: flex; align-items: center; }
.intro--folder h1 .swatch { width: 16px; height: 16px; border-radius: 5px; margin-right: 14px; }
.backlink { justify-self: start; font-size: 13.5px; color: var(--ink-3); }
.backlink:hover { color: var(--ink); }
.rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rename input { flex: 1 1 280px; min-width: 0; height: 64px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font: 400 clamp(32px, 5vw, 48px)/1 var(--serif); outline: none; }
.rename input:focus { border-color: var(--ink-3); }

/* ---------- save sheet ---------- */
.shelf { position: fixed; z-index: 55; width: 320px; max-height: min(480px, calc(100vh - 24px)); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06); outline: none; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .16s, transform .2s var(--ease); }
.shelf.is-open { opacity: 1; transform: none; }
.shelf__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 4px 10px 8px; }
.shelf__tick { display: grid; place-items: center; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%; background: var(--ink); color: var(--bg); animation: tick .35s var(--ease); }
.shelf__tick svg { width: 15px; height: 15px; stroke-width: 2.4; }
@keyframes tick { from { transform: scale(.4); opacity: 0; } }
.shelf__head .icon-button { width: 30px; height: 30px; }
.shelf__title { font-size: 14px; color: var(--ink-2); }
.shelf__title strong { color: var(--ink); font-weight: 600; }
.shelf__story { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shelf__label { padding: 8px 10px 4px; border-top: 1px solid var(--line); font: 500 10.5px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.shelf__list { display: grid; }
.shelf__opt { display: flex; align-items: center; gap: 0; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 8px; text-align: left; font-size: 14px; }
.shelf__opt:hover, .shelf__opt:focus-visible { background: var(--sunken); }
.shelf__opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf__opt em { margin: 0 8px; font: normal 500 10.5px/1 var(--mono); color: color-mix(in srgb, var(--accent) 80%, var(--ink)); white-space: nowrap; }
.shelf__opt b { width: 16px; text-align: right; font-weight: 600; }
.shelf__opt[aria-pressed="true"] { font-weight: 600; }
.shelf__suggest { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: color-mix(in srgb, var(--accent) 85%, var(--ink)); font-weight: 500; }
.shelf__suggest span { display: grid; place-items: center; width: 18px; height: 18px; margin-left: -4px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-weight: 600; }
.shelf__suggest:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.new-folder--shelf { padding: 6px 4px 8px; }
.new-folder--shelf input { height: 34px; }
.new-folder--shelf .button { height: 34px; }
.shelf__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 8px 6px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

/* ---------- dialogs ---------- */
.signin, .confirm { width: min(420px, calc(100% - 32px)); padding: 32px 28px 26px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .22); }
.signin[open], .confirm[open] { animation: pop .18s var(--ease); }
.signin::backdrop, .confirm::backdrop { background: rgba(10, 10, 9, .35); backdrop-filter: blur(2px); }
.signin { position: fixed; text-align: center; }
.signin__close { position: absolute; top: 10px; right: 10px; }
.signin .eyebrow { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.signin h2 { margin: 12px 0 10px; font: 400 36px/1.02 var(--serif); letter-spacing: -0.015em; }
.signin > p:not(.eyebrow):not(.signin__fine) { font-size: 14.5px; color: var(--ink-2); }
.signin__button { display: grid; justify-items: center; gap: 8px; min-height: 44px; margin: 22px 0 16px; }
.signin__button small { font-size: 11.5px; color: var(--ink-3); }
.signin__fine { font-size: 12px; color: var(--ink-3); }
.confirm h2 { font: 600 19px/1.25 var(--sans); letter-spacing: -0.015em; }
.confirm p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.confirm__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast.has-action { pointer-events: auto; }
.toast button { font-weight: 600; color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
  .lane__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .masthead__date { display: none; }
  .masthead__bar { grid-template-columns: auto 1fr; }
  .masthead__actions { justify-content: flex-end; }
  .footer__inner { grid-template-columns: 1fr; }
  .loading { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .search-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; border-color: transparent; background: none; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .intro { padding: 28px 0 20px; }
  .hero { padding-bottom: 32px; }
  .lead__media { border-radius: var(--r); }
  .top { grid-template-columns: 22px minmax(0, 1fr) 80px; gap: 12px; }
  .row { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; padding: 16px 0; }
  .row__media { aspect-ratio: 1; }
  .row__title { font-size: 16.5px; }
  .row__dek { -webkit-line-clamp: 2; font-size: 14px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .tabs { width: 100%; overflow-x: auto; }
  .tabs button { flex: 1; justify-content: center; }
  .rail { grid-template-columns: minmax(0, 1fr); }
  .lane__grid { grid-template-columns: 1fr 1fr; gap: 20px 14px; }
  .lane__head h2 { font-size: 28px; }
  .lane__head p { display: none; }
  .card__title { font-size: 14.5px; }
  .footer__links { grid-template-columns: 1fr 1fr; }
  .reader__body { padding: 22px 20px 40px; }
  .reader__bar { padding-left: 20px; }
  .palette { margin-top: 8px; max-height: 85vh; }
  .sources { grid-template-columns: 1fr; }
  .profile { padding-top: 28px; gap: 22px; }
  .profile__id { grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
  .profile__action { grid-column: 1 / -1; }
  .avatar--xl { width: 64px; height: 64px; font-size: 32px; }
  .profile__stats div { padding: 14px; }
  .profile__stats dd { font-size: 30px; }
  .folders { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .folder--new { grid-column: 1 / -1; min-height: 0; }
  .folder-tag { display: none; }
  .shelf { left: 8px !important; right: 8px; top: auto !important; bottom: 8px; width: auto; max-height: 75vh; padding-bottom: calc(6px + env(safe-area-inset-bottom)); transform: translateY(16px); transform-origin: bottom center; }
  .shelf__opt, .shelf__suggest { min-height: 44px; }
  #shelf:not([hidden]) ~ .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
  .account-slot .button--sm { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
