/* Reading-first visual system. Shared tokens adapt all existing surfaces. */
/* Self-hosted variable fonts (SIL OFL, licences beside them): Inter for the interface,
   Source Serif 4 for articles. Both carry an optical-size axis, so small text opens up
   and large titles tighten on their own. Bump ?v= if a font file ever changes. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2?v=1") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("fonts/source-serif-4-latin.woff2?v=1") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("fonts/source-serif-4-italic-latin.woff2?v=1") format("woff2"); }
:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --surface-2: #f0f1f4;
  --line: #e7e8ed;
  --ink: #1d1d1f;
  --ink-2: #585b65;
  --muted: #747781;
  --accent: #0866da;
  --accent-soft: #edf4ff;
  --ok: #258453;
  --warn: #93631b;
  --danger: #c43d3d;
  --flame: #e8590c;
  --ice: #1a8fa8;
  --radius: 22px;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Charter, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* One type scale for the interface; everything below uses these steps. */
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 28px;
  --text-4xl: 34px;
  /* Articles: size, rhythm and line length in one place. */
  --read-size: 18px;
  --read-leading: 1.65;
  --read-measure: 36em;
  --shadow: 0 2px 6px #20293904, 0 12px 32px #20293909;
  --pop: #fff;
  --pop-shadow: 0 12px 40px #1826381c;
  --focus: #0866da80;
  --scrim: #12192680;
  --like: #e5264f;
  color-scheme: light;
}
/* The Settings theme stamps data-theme on <html>; "system" stamps nothing. Keep both dark blocks identical. */
:root[data-theme="dark"] {
  --bg: #111214;
  --surface: #1d1f23;
  --surface-2: #292c31;
  --line: #32353b;
  --ink: #f3f4f6;
  --ink-2: #b6b9c2;
  --muted: #9296a1;
  --accent: #75aeff;
  --accent-soft: #223247;
  --ok: #7fc99b;
  --warn: #d8b06c;
  --danger: #f18b8b;
  --flame: #ff8f4a;
  --ice: #6cc8db;
  --shadow: 0 10px 32px #0003;
  --pop: #272a30;
  --pop-shadow: 0 16px 40px #0006;
  --like: #ff5c80;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --surface: #1d1f23;
    --surface-2: #292c31;
    --line: #32353b;
    --ink: #f3f4f6;
    --ink-2: #b6b9c2;
    --muted: #9296a1;
    --accent: #75aeff;
    --accent-soft: #223247;
    --ok: #7fc99b;
    --warn: #d8b06c;
    --danger: #f18b8b;
    --flame: #ff8f4a;
    --ice: #6cc8db;
    --shadow: 0 10px 32px #0003;
    --pop: #272a30;
    --pop-shadow: 0 16px 40px #0006;
    --like: #ff5c80;
    color-scheme: dark;
  }
}
:root { --topbar-h: 76px; }
@media (max-width: 719px) { :root { --topbar-h: 64px; } }
body { font-family: var(--ui); font-size: var(--text-base); letter-spacing: -.008em; font-optical-sizing: auto; text-rendering: optimizeLegibility; }
h1, h2, h3 { text-wrap: balance; }
/* No tinted flash on tap anywhere (it is inherited); focus rings still show for the keyboard. */
html { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:where(a, button, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.dislike-icon { transform: rotate(180deg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar { height: var(--topbar-h); background: var(--bg); border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent); }
.topbar-inner { height: 76px; max-width: 1312px; padding: 0 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: var(--text-2xl); letter-spacing: -.045em; font-weight: 700; }
.brand::before { display: none; }
.brand-dot { margin-left: -9px; color: var(--accent); }
.brand-word { white-space: nowrap; }
.brand-word .brand-dot { margin-left: 0; }
.brand-mark { display: flex; align-items: center; gap: 3px; width: 29px; height: 28px; transform: rotate(-12deg); }
.brand-mark i { display: block; width: 6px; height: 22px; border-radius: 3px; background: var(--ink); }
.brand-mark i:nth-child(2) { height: 28px; background: var(--accent); }
.brand-mark i:nth-child(3) { height: 17px; }
/* First page of a visit: the bars grow in once, transform and opacity only. */
.intro .brand-mark i { animation: bar-in .9s cubic-bezier(.23, 1, .32, 1) both; transform-origin: bottom; }
.intro .brand-mark i:nth-child(2) { animation-delay: .08s; }
.intro .brand-mark i:nth-child(3) { animation-delay: .16s; }
@keyframes bar-in { from { transform: scaleY(.2); opacity: 0; } }
/* Installed app: Chrome's splash (manifest colours, 128px icon 16px above centre) fades out over
   this copy, whose bars ripple once before it clears. No name here: Chrome's is drawn in its own
   font, and a second one on top reads as the text changing. */
.launch-screen { display: none; }
.app-launch .launch-screen { position: fixed; z-index: 100; inset: 0; display: block; background: #f5f5f7; pointer-events: none; animation: launch-out .3s .7s ease-out forwards; }
.launch-screen svg { position: absolute; left: calc(50% - 64px); top: calc(50% - 80px); width: 128px; height: 128px; fill: #1d1d1f; animation: launch-in .3s cubic-bezier(.23, 1, .32, 1) both; }
.launch-screen .a { fill: #0866da; }
.launch-screen rect { transform-box: fill-box; transform-origin: bottom; animation: bar-ripple .4s .25s ease-in-out both; }
.launch-screen rect:nth-child(2) { animation-delay: .32s; }
.launch-screen rect:nth-child(3) { animation-delay: .39s; }
@keyframes launch-in { from { opacity: 0; transform: scale(.96); } }
@keyframes bar-ripple { 50% { transform: scaleY(.6); } }
@keyframes launch-out { to { opacity: 0; visibility: hidden; } }
.mainnav { padding: 4px; border-radius: 13px; background: var(--surface-2); gap: 2px; }
.mainnav a { padding: 8px 20px; border-radius: 10px; font-size: var(--text-sm); font-weight: 600; }
.mainnav a.on { background: var(--surface); box-shadow: 0 1px 4px #0000000d; }
.mainnav a.on::after, .settings-link.on::after { display: none; }
.settings-link { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; color: var(--ink-2); }
.settings-link .icon { width: 22px; height: 22px; stroke-width: 1.6; }
.settings-link.on { color: var(--accent); background: var(--accent-soft); }
/* The header's right-hand group: one gap, 40px targets, the streak pill the same height. Phones lose only the wordmark. */
.topbar-end { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; margin-left: 12px; }
.topbar-end > *, .ai-wrap > a { flex: none; }
.topbar-end .people-link { display: inline-flex; align-items: center; height: 40px; padding: 0 10px; }
.topbar-end .people-link::after { display: none; }
.ai-wrap { position: relative; display: flex; }
.settings-link.ai-link { border-radius: 99px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.settings-link.ai-link:hover { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.settings-link.ai-link.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
/* Once-only pointer under the Connect your AI icon (onboarding.header_moment); it floats, so nothing moves. */
.ai-wrap .ai-tip { position: absolute; z-index: 5; top: calc(100% + 9px); right: 0; margin: 0; max-width: calc(100vw - 20px); white-space: nowrap; transform-origin: calc(100% - 20px) 0; }
.ai-wrap .ai-tip[hidden] { display: none; }
.ai-wrap .ai-tip a, .ai-wrap .ai-tip .rate-hint-x { position: relative; }
.ai-wrap .ai-tip a { color: inherit; text-decoration: none; }
/* 40px hit areas without a bigger bubble. */
.ai-wrap .ai-tip a::before { content: ""; position: absolute; inset: -12px 0 -12px -6px; }
.ai-wrap .ai-tip .rate-hint-x::before { content: ""; position: absolute; inset: -5px; }
.ai-wrap .ai-tip::after { left: auto; right: 15px; bottom: auto; top: -5px; }
@media (max-width: 1023px) and (min-width: 720px) { .topbar-inner { gap: 8px; padding: 0 20px; } .mainnav a { padding: 8px 11px; } }
@media (max-width: 719px) { .topbar-end { margin-left: auto; } }
@media (max-width: 419px) {
  .topbar .topbar-inner { gap: 6px; padding: 0 12px; }
  .has-people .brand-word { display: none; }
  .topbar-end .people-link { padding: 0 6px; }
}
@media (max-width: 349px) { .brand-word { display: none; } }
@media (max-width: 340px) { .topbar .topbar-inner { padding: 0 8px; } .topbar-end .streak-flame { padding: 0 8px 0 5px; } }
/* Light/dark switch: the moon shows in light (tap for dark), the sun in dark; they turn through each other. */
.theme-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle .icon { grid-area: 1 / 1; width: 21px; height: 21px; stroke-width: 1.6; transition: transform .5s cubic-bezier(.23, 1, .32, 1), opacity .25s ease; }
.theme-toggle .sun, :root[data-theme="dark"] .theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 1; transform: none; }
}
/* The new theme spreads out from the switch (app.js); the page underneath stays still. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.mobile-nav { display: none; }
.shell { max-width: 1312px; padding: 44px 36px 100px; }
.page-head { align-items: center; margin: 0 0 32px; gap: 18px; }
h1 { font-size: var(--text-4xl); font-weight: 700; letter-spacing: -.028em; line-height: 1.12; }
.eyebrow { margin: 0 0 9px; color: var(--muted); font-size: var(--text-xs); letter-spacing: .025em; font-weight: 500; }
.sub { margin-top: 10px; font-size: var(--text-md); line-height: 1.5; }
.primary, .primary-link, .settings-form button, .settings-form .primary { background: var(--accent); color: var(--surface); border: 0; box-shadow: 0 3px 8px #0866da18; border-radius: 12px; min-height: 44px; }
.primary:hover, .primary-link:hover { filter: brightness(.95); }
.feed-add-source { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 17px; font-size: var(--text-sm); }
.feed-add-source .icon { width: 17px; height: 17px; }
.feed-controls { margin: 0 0 22px; gap: 18px; }
.segmented { background: var(--surface-2); border: 0; border-radius: 12px; padding: 4px; }
.seg { min-height: 36px; padding: 7px 18px; font-size: var(--text-sm); border-radius: 9px; }
.seg.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px #0000000d; }
.window-chips { gap: 2px; }
.window-chips .chip { border: 0; background: transparent; min-height: 36px; padding: 8px 11px; border-radius: 9px; font-size: var(--text-xs); color: var(--muted); }
.window-chips .chip.on { color: var(--ink); background: var(--surface); box-shadow: 0 1px 4px #00000008; }
.pill { background: var(--accent-soft); border: 0; font-size: var(--text-xs); padding: 8px 12px; }
.learning { padding: 0; margin: -6px 0 26px; background: none; border: 0; color: var(--muted); font-size: var(--text-xs); }
.chip { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; background: transparent; font-size: var(--text-xs); padding: 7px 10px; }
.chip.on { background: var(--surface); border-color: var(--line); color: var(--ink); }
.chip:hover { border-color: var(--line); background: var(--surface); }
/* One column on every width, so opening the reader beside it never reflows a card. */
.grid { grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.card { --platform-color: #71809a; padding: 0; border: 1px solid color-mix(in srgb, var(--platform-color) 10%, var(--line)); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 28px #20293908; overflow: clip; scroll-margin: calc(var(--topbar-h) + 12px) 0 96px; transition: transform .14s ease, border-color .15s ease, box-shadow .15s ease; content-visibility: auto; contain-intrinsic-size: auto 200px; }
.card[data-platform="substack"] { --platform-color: #c97749; }
.card[data-platform="instagram"] { --platform-color: #af6b97; }
.card[data-platform="x"] { --platform-color: #758192; }
.card[data-platform="youtube"] { --platform-color: #c76662; }
.card[data-platform="blog"] { --platform-color: #6286a2; }
.card[data-platform="newsletter"] { --platform-color: #8a78a5; }
.card[data-platform="research"] { --platform-color: #648d80; }
.card[data-platform="podcast"] { --platform-color: #9478a2; }
.card[data-platform="community"] { --platform-color: #688795; }
[data-card][data-item-id]:not(.is-hidden) { cursor: pointer; }
@media (hover: hover) { .card:not(.is-hidden):hover { border-color: color-mix(in srgb, var(--platform-color) 35%, var(--line)); box-shadow: 0 12px 32px #2029390d; } }
.card[data-item-id]:not(.is-hidden):active:not(:has(.card-foot :active, [data-media] :active)) { transform: scale(.992); }
.card.is-new { border-color: color-mix(in srgb, var(--platform-color) 18%, var(--line)); }
/* The card whose article is in the docked reader beside the feed. */
.card.is-active, .lib-row.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
/* The platform tint belongs to the header; the article stays a quiet reading surface. */
.card-meta { display: flex; align-items: center; gap: 12px; min-height: 76px; margin: 0; padding: 14px 26px; overflow: visible; white-space: nowrap; font-size: var(--text-sm); line-height: 1.25; color: var(--muted); background: linear-gradient(90deg, color-mix(in srgb, var(--platform-color) 7%, var(--surface)), var(--surface) 72%); }
.source-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--platform-color) 12%, var(--surface)); color: var(--platform-color); }
.source-avatar .g { width: 18px; height: 18px; }
.card-meta > .card-byline { display: flex; flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
.card-meta .card-src { display: block; min-width: 0; max-width: none; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-size: var(--text-sm); font-weight: 650; }
.card-details { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: var(--text-xs); }
.card-platform { color: color-mix(in srgb, var(--platform-color) 78%, var(--ink)); font-weight: 650; }
.card-details .sep { padding: 0 2px; opacity: .5; }
.check { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: var(--text-xs); font-weight: 500; }
.card:not(.is-read) .check { display: none; }
.card-main { display: block; padding: 21px 26px 0; }
.card:not(:has(> .inline-media)) .card-main { padding-top: 5px; }
.card-text { flex: 1; min-width: 0; }
.card-title { margin: 0 0 12px; font-family: var(--serif); font-size: var(--text-lg); line-height: 1.42; font-weight: 600; letter-spacing: -.008em; }
.card-title a { -webkit-line-clamp: 3; }
.card-title a:hover { color: inherit; }
.card.is-read .card-title a { color: var(--ink-2); font-weight: 600; }
.card-kicker { margin: 0 0 6px; color: var(--muted); font-size: var(--text-2xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.card-excerpt { margin: 0; color: var(--ink-2); font-family: var(--serif); font-size: var(--text-base); line-height: 1.62; letter-spacing: 0; -webkit-line-clamp: 3; }
/* A TL;DR is the gist; cutting it off mid-sentence defeats it. */
.card-excerpt.is-tldr { display: block; -webkit-line-clamp: unset; overflow: visible; }
/* An "Updates" card: a source's new posts as a list of headlines, each a full-width tap target. */
.bundle-list { margin: 0; padding: 0; list-style: none; }
.bundle-list li + li { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bundle-list li { display: flex; align-items: center; gap: 4px; }
.bundle-list a { display: block; flex: 1; min-width: 0; min-height: 44px; padding: 10px 0; color: inherit; text-decoration: none; }
.bundle-list .act.save { margin-right: -10px; }
.bundle-list a:hover .bundle-title { color: var(--accent); }
.bundle-title { display: block; font-family: var(--serif); font-size: var(--text-base); font-weight: 600; line-height: 1.4; }
.bundle-excerpt { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card > .inline-media { margin: 0; border-radius: 0; }
/* Recommendation context follows the post instead of interrupting the source and media. */
.card > .reason { display: block; margin: 17px 26px 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }
.card > .reason::before { display: none; }
.card > .reason.exploring { color: var(--accent); }
/* A fallback "why" (nothing learned explains the card yet) stays quieter than a learned one. */
.card > .reason.quiet { opacity: .72; }
/* The TL;DR is a preview; the full post is one tap away. */
.card-kicker .kicker-full { margin-left: .7em; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; text-decoration: none; }
.card-kicker .kicker-full:hover { color: var(--ink); text-decoration: underline; }
.card-kicker.summarizing .kicker-full { margin-left: .5em; }
/* "Folded" TL;DRs: the kicker is the toggle, the summary opens under it. */
.card-tldr > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .4em; }
.card-tldr > summary::-webkit-details-marker { display: none; }
.card-tldr > summary::after { content: "Show"; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.card-tldr[open] > summary::after { content: "Hide"; }
.card-tldr > .kicker-full { display: inline-block; margin-top: 4px; color: var(--muted); font-size: var(--text-xs); font-weight: 600; text-decoration: none; }
.card-tldr > .kicker-full:hover { color: var(--ink); text-decoration: underline; }
/* A folded "Not for me" card can say what was off. */
.card-hidden-row .less-reasons { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--muted); font-size: var(--text-xs); }
.card-hidden-row .less-reasons .chip { font-size: var(--text-xs); padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.card-hidden-row .less-reasons .chip.on { border-color: var(--ink-2); color: var(--ink); background: var(--surface-2); }
/* Actions: one always-visible row of 44px targets with 24px icons, Save on the right. */
.card-foot { display: flex; flex-wrap: nowrap; align-items: center; gap: 0; min-height: 58px; margin: 20px 20px 8px; padding: 7px 0 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent); }
.act { position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.act .icon { width: 24px; height: 24px; stroke-width: 1.6; }
@media (hover: hover) { .act:hover { color: var(--ink); background: var(--surface-2); } }
.act:focus-visible { outline-offset: 0; }
.act.like.on { color: var(--like); }
.act.on .icon { fill: currentColor; }
.act.less.on, .act.save.on { color: var(--ink); }
.act.pop .icon { animation: act-pop .15s cubic-bezier(.2, .8, .2, 1); }
@keyframes act-pop { 50% { scale: 1.28; } }
.ghost.rating.on, .ghost.save.on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.ghost.rating.on .icon, .ghost.save.on .icon { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
/* Double-tap to like: only images, and no double-tap zoom on them. */
.card img { touch-action: manipulation; -webkit-user-drag: none; }
.heart-burst { position: fixed; z-index: 70; width: 92px; height: 92px; margin: -46px 0 0 -46px; color: #fff; pointer-events: none; filter: drop-shadow(0 4px 18px #0007); animation: heart-burst .75s cubic-bezier(.2, .8, .2, 1) forwards; }
.heart-burst .icon { width: 100%; height: 100%; fill: currentColor; stroke: none; }
@keyframes heart-burst { 0% { opacity: 0; transform: scale(.3); } 15% { opacity: 1; transform: scale(1.15); } 30% { transform: scale(.94); } 45% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
/* "Not for me": the card folds to one row with Undo and Mute. */
.card-hidden-row { display: none; }
.card.is-hidden { content-visibility: visible; cursor: default; }
.card.is-hidden > :not(.card-hidden-row) { display: none; }
.card.is-hidden > .card-hidden-row { display: flex; align-items: center; gap: 6px; min-height: 52px; min-width: 0; padding: 0 6px 0 20px; color: var(--muted); font-size: var(--text-md); white-space: nowrap; }
.card.is-hidden > .card-hidden-row { flex-wrap: wrap; padding-bottom: 12px; }
.card-hidden-row .less-reasons { white-space: normal; }
.card-hidden-row .card-dismiss { margin-left: auto; color: var(--muted); }
.card-hidden-row .card-dismiss .icon { width: 18px; height: 18px; }
.link-button { min-width: 0; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font-size: var(--text-md); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.link-button.danger { color: var(--ink-2); font-weight: 500; }
.card-hidden-row > span, .card-hidden-row [data-unhide] { flex: 0 0 auto; }
/* A written item's summary is still being made; the card shows its excerpt meanwhile. */
.card-kicker.summarizing { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 6px; padding: 3px 9px 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: var(--text-2xs); font-weight: 600; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: skeleton-pulse .9s ease-in-out infinite alternate; }
.menu-pop { border-radius: 14px; padding: 7px; }
.menu-pop button { min-height: 44px; }
.day { margin-bottom: 36px; }
.day-label { margin: 10px 0 18px; text-transform: none; letter-spacing: -.01em; font-size: var(--text-sm); font-weight: 600; }
.day-dot { width: 4px; height: 4px; background: var(--muted); }
.hero-add { border-radius: 20px; padding: 12px; box-shadow: var(--shadow); border-color: var(--line); }
.hero-add input, input, textarea, select { border-radius: 11px; background: var(--surface); }
.source-row { padding: 22px; border-radius: 18px; border-color: color-mix(in srgb, var(--line) 75%, transparent); box-shadow: 0 3px 10px #20293903; }
.source-title { flex-wrap: wrap; font-size: var(--text-base); }
.source-actions { gap: 4px; }
.health { border: 0; background: var(--surface-2); padding: 4px 8px; font-size: var(--text-2xs); }
.health.ok { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); }
.bulk, .preview, .settings-form section, .panel { border-radius: 20px; border-style: solid; }
/* Settings: the source list is a card like the form sections, with real buttons. */
section.settings { margin: 16px 0; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
section.settings h2, .settings-form h2 { margin: 0 0 4px; font-size: var(--text-lg); font-weight: 700; letter-spacing: -.012em; }
.source-table > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; }
.source-table > div:last-child { border-bottom: 0; padding-bottom: 0; }
.source-table b { font-size: var(--text-base); font-weight: 600; }
.source-table span { grid-column: 1; color: var(--muted); font-size: var(--text-sm); }
.source-table form { grid-column: 2; grid-row: 1 / 3; }
.source-table button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
@media (hover: hover) { .source-table button:hover { color: var(--ink); background: var(--surface-2); } }
.reader-wrap { max-width: 760px; }
.reader { background: var(--surface); padding: 42px; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.worth-it .ghost { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; }
/* Ask AI: a labelled pill that opens a small panel; nothing sits inside the article. */
.ask-trigger { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; height: 40px; padding: 0 14px 0 12px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: var(--text-sm); font-weight: 650; cursor: pointer; }
.ask-trigger[aria-expanded="true"] { border-color: var(--accent); background: var(--accent); color: var(--surface); }
@media (hover: hover) { .ask-trigger:hover { border-color: var(--accent); } }
.ask-spark { font-size: 15px; line-height: 1; }
/* The panel: header, a thread that scrolls, and the composer. It grows with the conversation. */
.ask-panel { z-index: 45; display: flex; flex-direction: column; max-height: min(64dvh, 580px); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--pop-shadow), 0 2px 6px #1826380f; color: var(--ink); outline: none; transform-origin: bottom right; animation: ask-in .18s cubic-bezier(.2, .8, .2, 1); }
.ask-panel[hidden] { display: none; }
@keyframes ask-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ask-head { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.ask-head .ask-spark { color: var(--accent); }
.ask-head b { flex: 1; min-width: 0; overflow: hidden; font-size: var(--text-sm); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.ask-new { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
.ask-new[hidden] { display: none; }
.ask-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); cursor: pointer; }
.ask-close .icon { width: 18px; height: 18px; stroke-width: 2; }
@media (hover: hover) { .ask-new:hover, .ask-close:hover { color: var(--ink); background: var(--surface-2); } }
.assist-thread { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.assist-thread:not(:empty) { display: grid; align-content: start; gap: 16px; padding: 16px; }
.assist-form { flex: 0 0 auto; padding: 12px; }
.assist-thread:not(:empty) + .assist-form { border-top: 1px solid var(--line); }
.assist-starters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.assist-starter { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--text-xs); font-weight: 600; cursor: pointer; }
@media (hover: hover) { .assist-starter:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); } }
[data-assist].has-conversation .assist-starters { display: none; }
.assist-compose { display: flex; align-items: flex-end; gap: 6px; padding: 4px 4px 4px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.assist-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); background: var(--surface); }
/* 16px keeps iOS from zooming the page when the box is focused. */
.assist-compose textarea { flex: 1; min-width: 0; min-height: 0; height: 40px; max-height: 120px; resize: none; padding: 9px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 22px; }
.assist-send { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; margin: 2px 0; padding: 0; border: 0; border-radius: 10px; background: var(--accent); color: var(--surface); cursor: pointer; }
.assist-send:disabled, .assist-starter:disabled { opacity: .5; cursor: default; }
.assist-send .icon { width: 18px; height: 18px; }
.assist-turn { display: grid; gap: 8px; }
.assist-q { width: fit-content; max-width: 88%; margin: 0 0 0 auto; padding: 7px 12px; border-radius: 12px 12px 3px 12px; background: var(--surface-2); color: var(--ink); font-size: var(--text-sm); font-weight: 550; line-height: 1.45; }
.assist-a { color: var(--ink-2); font-size: var(--text-md); line-height: 1.6; padding: 0 2px; }
.assist-a > :first-child { margin-top: 0; } .assist-a > :last-child { margin-bottom: 0; }
.assist-a ul, .assist-a ol { padding-left: 20px; }
.assist-error { color: var(--danger); margin: 0; }
.assist-turn.is-pending .skeleton { padding: 4px 0; }
.assist-unavailable { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; }
.assist-unavailable p { flex: 1 1 200px; margin: 0; color: var(--ink-2); font-size: var(--text-sm); line-height: 1.5; }
.assist-unavailable a { color: var(--accent); font-size: var(--text-sm); font-weight: 650; text-decoration: none; }
/* In the reading sheet, the pill sits in the sticky bar and the panel opens just above it. */
.sheet-bar { position: relative; }
.sheet-bar .ask-trigger { margin-left: 6px; }
.sheet-bar .ask-panel { position: absolute; left: 10px; right: 10px; bottom: calc(100% + 8px); }
@media (max-width: 370px) {
  .sheet-bar .ask-trigger { padding: 0 11px; }
  .sheet-bar .ask-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* On the /read page it floats in the corner, above the phone's tab bar. */
.ask-float { position: fixed; z-index: 45; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ask-float .ask-trigger { order: 2; height: 48px; padding: 0 18px 0 16px; border-color: transparent; background: var(--accent); color: var(--surface); box-shadow: var(--pop-shadow); font-size: var(--text-md); }
.ask-float .ask-panel { order: 1; width: min(420px, calc(100vw - 32px)); }
.reader-wrap { padding-bottom: 72px; }
.lib-row { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lib-list { gap: 10px; }
.lib-title { font-size: var(--text-lg); line-height: 1.4; }
.toast { border-radius: 15px; }
@media (max-width: 1100px) and (min-width: 960px) {
  .shell { padding-left: 28px; padding-right: 28px; }
}
@media (max-width: 719px) {
  .topbar, .topbar-inner { height: 64px; }
  .topbar { border-bottom: 0; }
  .topbar-inner { padding: 0 22px; }
  .brand { width: auto; overflow: visible; font-size: var(--text-xl); gap: 8px; }
  .brand-mark { transform: rotate(-12deg) scale(.85); transform-origin: left center; width: 25px; }
  .brand-dot { margin-left: -7px; }
  .mainnav { display: none; }
  .mobile-nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 48px; width: 64px; border-radius: 12px; color: var(--muted); font-size: var(--text-2xs); font-weight: 500; text-decoration: none; }
  .mobile-nav .icon { width: 21px; height: 21px; }
  .mobile-nav a.on { color: var(--accent); background: var(--accent-soft); }
  .shell { padding: 22px 20px calc(112px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 24px; align-items: center; flex-wrap: nowrap; gap: 12px; }
  .page-head > div { min-width: 0; }
  .eyebrow { font-size: var(--text-2xs); margin-bottom: 7px; }
  h1 { font-size: var(--text-3xl); letter-spacing: -.026em; }
  .sub { font-size: var(--text-xs); margin-top: 8px; }
  .feed-add-source { padding: 11px 13px; font-size: var(--text-xs); gap: 4px; flex-shrink: 0; border-radius: 12px; }
  .feed-controls { flex-wrap: wrap; gap: 8px; margin: 0 0 17px; justify-content: space-between; }
  .seg { min-height: 40px; padding: 8px 13px; font-size: var(--text-xs); }
  .window-chips .chip { padding: 8px 9px; min-height: 44px; font-size: var(--text-2xs); }
  .learning { margin: -3px 0 18px; font-size: var(--text-2xs); line-height: 1.5; }
  .grid { gap: 18px; }
  .card-meta { min-height: 70px; padding: 13px 20px; }
  .card-main { padding: 19px 20px 0; }
  .card > .reason { margin-left: 20px; margin-right: 20px; }
  .card-foot { margin-left: 14px; margin-right: 14px; }
  .check { padding-left: 4px; }
  .check-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .source-row { padding: 18px; grid-template-columns: 20px minmax(0, 1fr); }
  .source-title { gap: 6px; font-size: var(--text-md); }
  .source-actions { gap: 2px; }
  .hero-add { padding: 10px; }
  .reader { padding: 24px 20px; border-radius: 20px; }
  .reader .worth-it { gap: 6px; }
  .ask-float { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .reader .worth-it > span:first-child { width: 100%; margin-bottom: 6px; }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .page-head:has(.search) { flex-wrap: wrap; }
  .lib-row { padding: 16px; }
  .lib-title { font-size: var(--text-base); }
}
@media (max-width: 360px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .topbar-inner { padding: 0 16px; }
  .eyebrow { font-size: var(--text-2xs); }
  h1 { font-size: var(--text-3xl); }
  .feed-add-source { padding: 11px; }
  .feed-add-source .icon { display: none; }
  .seg { padding: 8px 11px; }
  .window-chips .chip { padding: 8px; }
  .card-meta { padding-left: 16px; padding-right: 16px; }
  .card-main { padding-left: 16px; padding-right: 16px; }
  .card > .reason { margin-left: 16px; margin-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* The Feed and Saved read as one 680px column. */
.feed-head, .feed-controls, .recommendation-feed, .saved-page { max-width: 680px; margin-left: auto; margin-right: auto; }
.shell:has(> .feed-head) { padding-top: 20px; }
.feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.segmented.feed-modes, .segmented.saved-tabs { margin: 0; flex-wrap: nowrap; }
.segmented a.seg { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.segmented a.seg:hover { color: var(--ink); }
.segmented a.seg.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px #0000000d; }
.feed-modes .seg { min-width: 92px; }
.feed-add { display: grid; margin-left: auto; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.feed-add .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.feed-add:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.feed-controls { margin-top: -4px; }
.saved-head { justify-content: space-between; flex-wrap: nowrap; margin-bottom: 18px; }
.segmented.saved-tabs { margin: 0 0 16px; }
.saved-tabs .seg { flex: 1; }
.save-link { position: relative; }
.save-link > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.save-link > summary::-webkit-details-marker { display: none; }
.save-link > summary .icon { width: 17px; height: 17px; }
.save-link[open] > summary { background: var(--surface-2); }
.save-link .save-form { position: absolute; z-index: 20; right: 0; top: calc(100% + 8px); width: min(420px, calc(100vw - 40px)); padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--pop); box-shadow: var(--pop-shadow); }
.saved-search { display: flex; gap: 8px; margin: 0 0 16px; }
.saved-search input[type=search] { flex: 1; min-width: 0; }
.saved-search select { flex: 0 1 190px; min-width: 0; }
.saved-empty .icon { width: 18px; height: 18px; vertical-align: -3px; }
.lib-row { cursor: pointer; }
.lib-save { align-self: center; margin: -6px -8px -6px auto; }
@media (max-width: 719px) {
  .shell:has(> .feed-head) { padding-top: 12px; }
  .feed-head { margin: 0 0 12px; }
  .mobile-nav { padding-left: 8px; padding-right: 8px; }
  .mobile-nav a { width: 96px; min-width: 44px; }
  .saved-search { flex-wrap: wrap; }
  .saved-search select { flex: 1 1 100%; }
}

/* Social formats share the feed controls, but keep their own reading rhythm. */
.format-label { color: var(--muted); font-size: var(--text-2xs); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 12px; }
.social-card .card-title, .social-card .card-excerpt { font-family: var(--ui); letter-spacing: -.005em; }
.social-card .card-title { font-weight: 550; line-height: 1.48; }
.social-card .card-excerpt { line-height: 1.6; }
.social-card[data-platform="x"] .card-excerpt { white-space: pre-line; -webkit-line-clamp: 9; }
/* An X post reads like one: the post in plain weight with its own line breaks, then the
   picture inset below it, then its reply/repost/like counts. The card frame stays ours. */
.x-card .card-main { padding-top: 4px; }
/* The account's own picture, round as on X, with a small X mark so the platform still shows. */
.source-avatar.has-photo { position: relative; border-radius: 50%; }
.source-avatar.has-photo img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.source-avatar.has-photo .g { position: absolute; right: -4px; bottom: -4px; width: 17px; height: 17px; padding: 3px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.card-handle { color: var(--muted); }
.x-card .card-title.x-text { margin: 0; font-size: var(--text-base); font-weight: 430; line-height: 1.55; white-space: pre-line; }
.x-card .x-text a { -webkit-line-clamp: 10; }
.card.is-read.x-card .x-text a { color: var(--ink-2); font-weight: 430; }
/* The frame hugs the picture at its own shape, so a tall one stands narrower instead of
   being cropped to a slice. */
.x-card > .inline-media { width: fit-content; max-width: calc(100% - 52px); margin: 14px 26px 0; border: 1px solid var(--line); border-radius: 16px; }
.x-card .media-slide { aspect-ratio: auto; }
.x-card .media-slide img { width: auto; max-width: 100%; height: auto; max-height: min(400px, 60vh); }
.x-thread { margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); list-style: none; }
.x-thread li { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; color: var(--ink-2); font-size: var(--text-base); line-height: 1.55; white-space: pre-line; }
.x-thread li + li { margin-top: 10px; }
.x-thread-more { display: inline-block; margin-top: 10px; color: var(--muted); font-size: var(--text-sm); text-decoration: none; }
.x-thread-more:hover { color: var(--accent); }
/* The reader's thread: one post after another down a line, each with its own media, as on X. */
.x-thread-read { margin: 0; padding: 0; list-style: none; }
.x-thread-post { position: relative; padding: 0 0 26px 22px; border-left: 2px solid var(--line); }
.x-thread-post:last-child { padding-bottom: 4px; border-left-color: transparent; }
.x-thread-post::before { content: ""; position: absolute; top: 4px; left: -6px; width: 10px; height: 10px; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); }
.x-thread-count { display: block; margin: 0 0 6px; color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.x-thread-post > .body p:last-child { margin-bottom: 0; }
.reader .x-thread-post > .inline-media { width: fit-content; max-width: 100%; margin: 14px 0 0; border: 1px solid var(--line); border-radius: 16px; }
.x-thread-post .media-slide { aspect-ratio: auto; }
.x-thread-post .media-slide img { width: auto; max-width: 100%; height: auto; max-height: min(480px, 65vh); }
.x-stats { margin: 12px 26px 0; color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
/* A quoted post, framed under the post that quotes it as on X; its own picture or video sits inside. */
.x-quote { margin: 14px 26px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.reader .x-quote { margin: 18px 0 0; }
.x-quote-head { display: grid; gap: 4px; padding: 12px 14px; color: inherit; text-decoration: none; }
a.x-quote-head:hover { background: var(--surface-2); }
.x-quote-by { overflow: hidden; color: var(--muted); font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; }
.x-quote-by b { color: var(--ink); font-weight: 600; }
.x-quote-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; font-size: var(--text-sm); line-height: 1.5; white-space: pre-line; }
.reader .x-quote-text { -webkit-line-clamp: unset; font-size: var(--text-md); }
.x-quote .inline-media, .reader .x-quote .inline-media { margin: 0; border-top: 1px solid var(--line); border-radius: 0; }
.x-quote .media-slide { aspect-ratio: auto; }
.x-quote .media-slide :is(img, video) { display: block; width: 100%; height: auto; max-height: min(360px, 55vh); object-fit: cover; }
@media (max-width: 719px) { .x-card > .inline-media, .x-stats, .x-card > .x-quote { margin-left: 20px; margin-right: 20px; } .x-card > .inline-media { max-width: calc(100% - 40px); } }
@media (max-width: 360px) { .x-card > .inline-media, .x-stats, .x-card > .x-quote { margin-left: 16px; margin-right: 16px; } .x-card > .inline-media { max-width: calc(100% - 32px); } }
.preview-head { margin-bottom: 16px; }
.preview-head h1 { font-size: clamp(32px, 4vw, 48px); }
.preview-note { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; margin: 16px 0 24px; }
.preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.preview-open { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
@media (max-width: 959px) { .preview-grid { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin: auto; } }

.inline-media { margin: 8px 8px 0; overflow: hidden; border-radius: 16px; background: #111820; color: #fff; }
.card .inline-media { position: relative; }
.card .inline-media:not(.social-media) .media-slide img { object-fit: cover; }
/* An Instagram post shows whole at its own shape (4:5 until the picture loads), never cropped;
   a reel keeps 9:16 and narrows on a short screen, as the reader's embed does. */
.card[data-platform="instagram"] .media-slide { aspect-ratio: auto; }
.card[data-platform="instagram"] .media-slide img { height: auto; aspect-ratio: auto 4 / 5; max-height: min(80dvh, 760px); }
.card .vertical-media :is(.media-track, .media-stage), .card > .reader-embed { width: min(100%, calc(min(78dvh, 760px) * 9 / 16)); margin: 0 auto; }
.card .vertical-media .media-slide:has(video) { aspect-ratio: 9 / 16; }
.card > .reader-embed { border: 0; border-radius: 0; }
.card .media-toolbar { position: absolute; right: 0; bottom: 0; left: 0; background: linear-gradient(transparent, #101720a8); }
.card .media-toolbar:has([data-media-play]:not([hidden])) { background: linear-gradient(transparent, #101720c9); }
.card .media-toolbar:has([data-media-play][hidden]):not(:has([data-media-prev])) { display: none; }
/* Players draw their seek bar along the bottom, so over one the strip moves to the top. */
.card .inline-media:is([data-youtube], :has(video)) .media-toolbar { top: 0; bottom: auto; background: linear-gradient(#101720c9, transparent); }
.media-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.media-track::-webkit-scrollbar { display: none; }
.media-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 1; position: relative; }
.card .media-slide:has(> img):not(.is-loaded) { background: var(--surface-2); }
.media-slide img, .media-slide video { display: block; width: 100%; height: 100%; object-fit: contain; }
.vertical-media .media-slide, .vertical-media .media-stage { aspect-ratio: 9 / 16; }
.media-stage { position: relative; aspect-ratio: 16 / 9; min-height: 200px; }
.media-stage iframe, .media-stage > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-toolbar { display: flex; align-items: center; gap: 3px; min-height: 48px; padding: 2px 8px; background: #17202b; }
.media-toolbar[hidden], .media-toolbar button[hidden], .media-fallback[hidden] { display: none; }
.media-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; border: 0; border-radius: 10px; background: transparent; min-width: 44px; min-height: 44px; padding: 8px 11px; font-size: var(--text-xs); cursor: pointer; }
.media-toolbar button:hover { background: #ffffff18; }
.media-toolbar button:disabled { opacity: .35; cursor: default; }
.media-toolbar [data-media-prev], .media-toolbar [data-media-next] { font-size: 25px; }
.media-toolbar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.has-sound [data-media-sound] { background: #ffffff20; }
.media-position { font-size: var(--text-2xs); color: #d0d8e2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.media-fallback { font-size: var(--text-xs); color: #e1e6ef; margin: 0; padding: 14px; }
.media-watch { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 999px; background: #101720cc; color: #fff; font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; transform: translate(-50%, -50%); }
.media-lapsed { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 8px 8px 0; border-radius: 16px; background: #111820; color: #fff; font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.card > .media-lapsed { margin: 0; border-radius: 0; }
.reader .media-lapsed { margin: 0 0 26px; }
.reader .inline-media { margin: 0 0 26px; }
.reader .vertical-media { max-width: 360px; margin-left: auto; margin-right: auto; }
/* The platform's own embed (partials/reader_embed.html): a fixed box, so the sheet never jumps as it loads. */
.reader-embed { width: 100%; max-width: 540px; aspect-ratio: 4 / 5; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.reader-embed.embed-reel { width: min(100%, calc(min(78dvh, 760px) * 9 / 16)); aspect-ratio: 9 / 16; }
.reader-embed.embed-x { aspect-ratio: auto; height: min(72dvh, 640px); border: 0; border-radius: 12px; background: transparent; }
.reader-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.embed-x .embed-dark { display: none; }
:root[data-theme="dark"] .embed-x .embed-light { display: none; }
:root[data-theme="dark"] .embed-x .embed-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .embed-x .embed-light { display: none; }
  :root:not([data-theme="light"]) .embed-x .embed-dark { display: block; }
}
.embed-open { margin: 0 0 26px; text-align: center; font-size: var(--text-sm); }
.embed-open a { color: var(--muted); }

.inline-media:not(.social-media):not(.vertical-media) .media-slide { aspect-ratio: 1.85; }

.youtube-stage > img { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.reader .media-cover-play { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; width: 100%; height: 100%; border: 0; background: transparent; color: #171b20; cursor: pointer; }
.reader .media-cover-play span { display: grid; place-items: center; width: 62px; height: 62px; padding-left: 3px; border-radius: 50%; background: #fffef5f0; box-shadow: 0 7px 28px #0005; font-size: 24px; }
.reader .media-started .media-cover-play { display: none; }
.reader .inline-media[data-youtube]:not(.media-started) .media-toolbar { display: none; }

.skeleton { display: grid; gap: 12px; padding-top: 14px; }
.skeleton i { display: block; height: 12px; border-radius: 6px; background: var(--surface-2); animation: skeleton-pulse 1.1s ease-in-out infinite alternate; }
.skeleton i:first-child { height: 72px; border-radius: 14px; }
.skeleton i:nth-child(2) { width: 94%; }
.skeleton i:nth-child(3) { width: 88%; }
.skeleton i:last-child { width: 56%; }
@keyframes skeleton-pulse { to { opacity: .45; } }
.card.flash, .lib-row.flash { animation: card-flash .9s ease-out; }
@keyframes card-flash { 0%, 35% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); } }

/* The sheet: the reader (and anything else that opens it) over the page on phones,
   sliding up; from 1100px a 560px panel on the right with the page still live. */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; pointer-events: auto; transition: opacity .24s ease; }
.sheet.is-open .sheet-scrim { opacity: 1; }
.sheet-panel { position: absolute; inset: 0 0 auto; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: 14px 14px 0 0; box-shadow: var(--pop-shadow); pointer-events: auto; outline: none; transform: translateY(100%); transition: transform .24s cubic-bezier(.32, .72, 0, 1); will-change: transform; }
.sheet.is-open .sheet-panel { transform: none; }
.sheet-panel.is-dragging { transition: none; }
/* The top strip is the drag handle; ✕ sits at its right end. */
.sheet-grab { flex: 0 0 auto; display: flex; justify-content: center; height: 52px; padding-top: 8px; touch-action: none; cursor: grab; }
.sheet-grab span { width: 40px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.sheet-x { position: absolute; z-index: 2; top: 6px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.sheet-x:hover { color: var(--ink); }
.sheet-x .icon { width: 20px; height: 20px; stroke-width: 2; }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-body { max-width: 680px; margin: 0 auto; padding: 0 20px 32px; }
.sheet-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-bar[hidden] { display: none; }
.sheet-next { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 18px; border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: var(--text-md); font-weight: 600; }
.sheet-next .icon { width: 18px; height: 18px; stroke-width: 2; }
.sheet-next:disabled { opacity: .35; cursor: default; }
.sheet-error { margin: 12px 0; color: var(--muted); font-size: var(--text-md); }
.sheet-error a { color: var(--accent); }
/* The article inside the sheet drops the page reader's card frame. */
.sheet-body .reader { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.sheet-body .worth-it { display: none; }
.sheet-body .reader h1 { margin: 12px 0 22px; font-size: var(--text-3xl); line-height: 1.18; }
.up-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; margin: 28px 0 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); text-decoration: none; }
.up-next span { grid-column: 1; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.up-next b { grid-column: 1; font-size: 16px; font-weight: 600; line-height: 1.35; }
.up-next .icon { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; color: var(--ink-2); }
.up-next:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.summary-slot.is-arriving { animation: summary-in .4s ease-out; }
@keyframes summary-in { from { opacity: 0; transform: translateY(6px); } }
/* The page underneath stays exactly where it was: only its scrolling is paused. */
html.sheet-modal { overflow: hidden; }
@media (min-width: 1100px) {
  .sheet-panel { inset: var(--topbar-h) 0 auto auto; width: 560px; height: calc(100dvh - var(--topbar-h)); border-radius: 0; border-left: 1px solid var(--line); box-shadow: none; transform: translateX(100%); }
  .sheet-grab { height: 56px; cursor: default; }
  .sheet-grab span { display: none; }
  .sheet-x { top: 8px; right: 12px; }
  .sheet-body { padding: 0 32px 32px; }
  .sheet-bar { padding: 8px 16px; }
  html.sheet-docked .sheet-scrim { display: none; }
  /* Docked, the page makes room: the feed column keeps its width where it can. */
  html.sheet-docked .shell { max-width: none; margin: 0 560px 0 0; }
}
@media (max-width: 719px) {
  .sheet-body { padding: 0 20px 28px; }
  .sheet-body .reader h1 { font-size: 26px; }
}

/* ---------- Reading: the article's typography, in one place ---------- */
.reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.4; letter-spacing: 0; }
.reader-meta > span:nth-of-type(1) { color: var(--ink-2); font-weight: 600; }
.reader-meta .g { width: 14px; height: 14px; }
.reader-meta .sep { opacity: .6; }
.reader-meta a { color: var(--accent); font-weight: 500; text-decoration: none; }
.reader h1 { max-width: 22em; margin: 12px 0 24px; text-wrap: pretty; font-size: var(--text-4xl); font-weight: 700; line-height: 1.14; letter-spacing: -.024em; }
.reader .format-label { margin: 14px 0 -4px; }
.reader .inline-media { margin: 0 0 24px; }
.reader .youtube-stage > img { object-fit: cover; }

/* TL;DR and key points: a quiet panel that leads, not a loud box. */
.reader-body .summary { margin: 0 0 28px; padding: 18px 20px 20px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.summary-label { margin: 0 0 8px; color: var(--accent); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; }
.summary-tldr { margin: 0; color: var(--ink); font-size: var(--text-lg); font-weight: 500; line-height: 1.5; letter-spacing: -.012em; }
.summary-tldr + .summary-label { margin-top: 18px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--accent) 14%, transparent); }
.summary-points { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.summary-points li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: var(--text-base); line-height: 1.5; }
.summary-points li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
/* No summary yet (or none coming): one small line, never a panel. */
.reader-body .summary.pending { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 10px 14px; background: var(--surface-2); color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.summary.pending .summary-label { margin: 0; color: var(--muted); }
.summary.pending p:not(.summary-label) { margin: 0; }
.summary.pending a { color: var(--accent); }
.summary.pending form { margin: 0; }

/* With a summary, the full article is one tap away; it opens in the page's flow, not in a box. */
.full-article { margin: 0 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.full-article > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 2px; color: var(--ink); font-size: var(--text-base); font-weight: 600; cursor: pointer; }
.full-article > summary::-webkit-details-marker { display: none; }
.full-article > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform .2s cubic-bezier(.32, .72, 0, 1); }
.full-article[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .full-article > summary:hover { color: var(--accent); } }
.full-article-length { color: var(--muted); font-size: var(--text-sm); font-weight: 500; }
.full-article[open] { border-bottom: 0; }
.full-article > .body { padding: 8px 0 4px; }
/* Summary | Full post: one switch, two views of the same post. */
.read-views { margin: 0 0 28px; }
.view-radio { position: absolute; opacity: 0; pointer-events: none; }
.view-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; }
.view-switch .seg { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; color: var(--ink-2); font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.view-length { color: var(--muted); font-weight: 500; white-space: pre; }
.view-summary:checked ~ .view-switch .seg[for^="read-summary"], .view-full:checked ~ .view-switch .seg[for^="read-full"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px #0000000d; }
.view-radio:focus-visible ~ .view-switch { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.view-summary:checked ~ .pane-full, .view-full:checked ~ .pane-summary { display: none; }
.read-views .summary { margin-bottom: 0; }
/* The switch stays in reach while either view scrolls; a surface ring hides the text passing under it. */
.view-switch { position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 5; box-shadow: 0 0 0 8px var(--surface), 0 -6px 0 8px var(--surface); }
.read-views { scroll-margin-top: calc(var(--topbar-h) + 8px); }
.sheet-body .view-switch { top: 8px; }
.sheet-body .read-views { scroll-margin-top: 8px; }
/* After a tap or swipe the new view slides in from the side its tab sits on. */
.read-views.switched .view-summary:checked ~ .pane-summary { animation: pane-from-left .2s ease-out; }
.read-views.switched .view-full:checked ~ .pane-full { animation: pane-from-right .2s ease-out; }
@keyframes pane-from-left { from { opacity: 0; transform: translateX(-24px); } }
@keyframes pane-from-right { from { opacity: 0; transform: translateX(24px); } }
.reader-content-label { margin: 2px 0 13px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* The article body: a serif at a comfortable size, ~65 characters a line, open rhythm. */
.body { max-width: var(--read-measure); color: var(--ink); font-family: var(--serif); font-size: var(--read-size); line-height: var(--read-leading); letter-spacing: 0; overflow-wrap: break-word; font-optical-sizing: auto; font-kerning: normal; font-variant-ligatures: common-ligatures; }
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }
.body p, .body ul, .body ol, .body pre, .body table, .body details { margin: 0 0 1.05em; }
.body :is(h1, h2, h3, h4, h5, h6) { margin: 1.6em 0 .5em; color: var(--ink); font-family: var(--ui); font-weight: 700; line-height: 1.3; letter-spacing: -.016em; }
.body :is(h1, h2) { font-size: 1.22em; }
.body h3 { font-size: 1.08em; }
.body :is(h4, h5, h6) { font-size: 1em; letter-spacing: -.01em; }
.body :is(strong, b) { font-weight: 600; }
.body a { color: inherit; text-decoration-line: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (hover: hover) { .body a:hover { color: var(--accent); text-decoration-color: currentColor; } }
.body :is(ul, ol) { padding-left: 1.35em; }
.body li { margin: .35em 0; padding-left: .15em; }
.body li::marker { color: var(--muted); }
.body li > :is(ul, ol) { margin: .35em 0 0; }
.body blockquote { margin: 1.5em 0; padding: .1em 0 .1em 1.1em; border-left: 3px solid color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink-2); }
.body blockquote > :last-child { margin-bottom: 0; }
.body :is(img, video) { display: block; max-width: 100%; height: auto; margin: 1.5em auto; border-radius: 10px; }
.body a:has(> img) { text-decoration: none; }
.body figure { margin: 1.6em 0; }
.body figure :is(img, video) { margin: 0 auto; }
.body figure[data-reader-youtube] { max-width: 100%; overflow: hidden; border-radius: 14px; background: #111820; }
.body figure[data-reader-youtube] a { position: relative; display: block; aspect-ratio: 16 / 9; color: #fff; text-decoration: none; }
.body figure[data-reader-youtube] img { width: 100%; height: 100%; max-width: none; margin: 0; border-radius: 0; object-fit: cover; opacity: .88; }
.body figure[data-reader-youtube] span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-family: var(--ui); font-size: var(--text-sm); font-weight: 650; text-shadow: 0 1px 8px #000a; }
.body figure[data-reader-youtube] span::before { content: "▶"; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #ffffffeb; color: #1a1d21; font-size: 21px; text-shadow: none; }
.body figure[data-reader-youtube] iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.body figcaption { margin-top: .6em; color: var(--muted); font-family: var(--ui); font-size: var(--text-sm); line-height: 1.45; letter-spacing: 0; text-align: center; }
.body hr { height: 1px; margin: 2em 0; border: 0; background: var(--line); }
.body code { padding: .12em .35em; border-radius: 5px; background: var(--surface-2); font-family: var(--mono); font-size: .84em; }
.body pre { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); overflow-x: auto; font-size: var(--text-md); line-height: 1.55; }
.body pre code { padding: 0; background: none; font-size: inherit; }
.body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-family: var(--ui); font-size: var(--text-md); line-height: 1.45; }
.body :is(th, td) { padding: 7px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.body th { background: var(--surface-2); font-weight: 600; }

/* The full /read page: a roomier column and a larger size on wide screens. */
@media (min-width: 720px) {
  .reader-wrap .body { --read-size: 19px; }
}
@media (max-width: 719px) {
  .reader h1 { margin: 10px 0 20px; font-size: var(--text-3xl); line-height: 1.18; letter-spacing: -.022em; }
  .reader-body .summary { margin-bottom: 24px; padding: 16px 16px 18px; }
  .summary-tldr { font-size: var(--text-lg); }
}

/* ---------- Discovery: guided start, add sheet, suggestions, empty Feed ---------- */
.start-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.start-head h1 { font-size: var(--text-4xl); }
.skip-link { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.skip-link:hover { color: var(--ink); }
.discover { min-width: 0; }
.discover-search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.discover-search:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.discover-search > .icon { color: var(--muted); }
.discover-search input { flex: 1; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; background: transparent; font-size: 16px; }
.discover-search input:focus { outline: none; }
.discover-search input::-webkit-search-cancel-button { cursor: pointer; }
.discover-search .primary { flex: 0 0 auto; padding: 0 16px; min-height: 40px; border-radius: 11px; font-size: var(--text-md); font-weight: 600; }
.discover-results:empty { display: none; }
.discover-results { margin: 0 0 14px; transition: opacity .15s ease; }
.discover-results[data-busy] { opacity: .55; }
.discover-results .preview { margin: 0; }
.results-label { margin: 16px 0 8px; color: var(--muted); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.discover-results > .results-label:first-child { margin-top: 2px; }
.results-empty { margin: 4px 0; }
.lazy-slot:empty { display: none; }

/* Topic and format chips: one scrolling row each on phones. */
.chip-row { display: flex; gap: 6px; margin: 0 -20px 8px; padding: 2px 20px 4px; overflow-x: auto; scrollbar-width: none; scroll-padding-inline: 20px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { flex: 0 0 auto; gap: 6px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.chip-row .chip .g { width: 13px; height: 13px; }
.chip-row .chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
@media (min-width: 720px) {
  .chip-row { flex-wrap: wrap; margin: 0 0 8px; padding: 0; overflow: visible; }
}

.fmt-badge { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); }
.fmt-badge .g { width: 14px; height: 14px; }
.fmt-badge.lg { width: 40px; height: 40px; border-radius: 12px; }
.fmt-badge.lg .g, .fmt-badge.lg .icon { width: 20px; height: 20px; }

[data-browse][hidden], .peek-slot[hidden] { display: none; }
.peek-button { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.peek-button:hover { color: var(--ink); }
.peek-button .icon { width: 16px; height: 16px; transition: transform .15s ease; }
.peek-slot { padding: 0 12px; }
.peek-slot:empty { display: none; }
.peek-list { display: grid; gap: 0; margin: 6px 0 2px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.peek-list li { padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: var(--text-md); line-height: 1.4; }
.peek-list li:last-child { border-bottom: 0; }
.peek-list a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.peek-list a:hover { color: var(--accent); }
.peek-note { margin: 8px 0 4px; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.peek-note.bad { color: var(--danger); }
.peek-skeleton { padding: 8px 0; gap: 8px; }
.peek-skeleton i:first-child { height: 12px; border-radius: 6px; }

/* Cards to follow: suggestions, catalog matches and search results. */
.src-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: stretch; }
@media (min-width: 720px) { .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.src-card { --platform-color: #71809a; display: flex; flex-direction: column; min-width: 0; border: 1px solid color-mix(in srgb, var(--platform-color) 12%, var(--line)); border-radius: 18px; background: var(--surface); box-shadow: 0 8px 28px #20293908; overflow: hidden; }
.src-card[data-platform="substack"] { --platform-color: #c97749; }
.src-card[data-platform="youtube"] { --platform-color: #c76662; }
.src-card[data-platform="newsletter"] { --platform-color: #8a78a5; }
.src-card[data-platform="research"] { --platform-color: #648d80; }
.src-card[data-platform="podcast"] { --platform-color: #9478a2; }
.src-card[data-platform="community"] { --platform-color: #688795; }
.src-card[data-platform="blog"] { --platform-color: #6286a2; }
.src-card.is-followed { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.src-head { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--platform-color) 7%, var(--surface)), var(--surface) 72%); }
.src-head .fmt-badge { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--platform-color) 12%, var(--surface)); color: var(--platform-color); }
.src-head .fmt-badge .g { width: 18px; height: 18px; }
.src-id { display: grid; flex: 1; min-width: 0; gap: 3px; }
.src-format { color: color-mix(in srgb, var(--platform-color) 78%, var(--ink)); font-size: var(--text-xs); font-weight: 650; }
.src-sub { overflow: hidden; color: var(--muted); font-size: var(--text-xs); text-overflow: ellipsis; white-space: nowrap; }
.src-head form { flex: 0 0 auto; margin: 0 -6px 0 0; }
.src-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.src-x:hover { color: var(--ink); background: var(--surface-2); }
.src-x .icon { width: 18px; height: 18px; }
.src-body { flex: 1; padding: 17px 20px 12px; }
.src-name { margin: 0; color: var(--ink); font-family: var(--serif); font-size: var(--text-lg); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.src-blurb { margin: 8px 0 0; color: var(--ink-2); font-size: var(--text-md); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src-reason { margin: 14px 0 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.src-preview { margin: 0 20px; border-top: 1px solid var(--line); }
.src-preview summary { display: flex; align-items: center; gap: 4px; min-height: 40px; color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; cursor: pointer; list-style: none; }
.src-preview summary::-webkit-details-marker { display: none; }
.src-preview summary .icon { width: 16px; height: 16px; transition: transform .15s ease; }
.src-preview[open] summary .icon { transform: rotate(180deg); }
.src-preview .peek-list { margin-top: 0; }
.src-card > .peek-slot { padding: 0 20px; }
.src-actions { display: flex; align-items: center; gap: 8px; min-height: 64px; margin: auto 20px 0; padding: 10px 0; border-top: 1px solid var(--line); }
.src-actions form { margin: 0; }
.src-actions .peek-button { margin-left: -6px; }
.src-actions .notice { flex: 1; margin: 0; padding: 8px 10px; font-size: var(--text-sm); line-height: 1.4; }
.follow-btn { min-height: 40px; padding: 0 20px; border-radius: 12px; font-size: var(--text-md); font-weight: 700; }
.preview .follow-btn { margin-top: 12px; }
.suggested { margin: 6px 0 14px; }
.browse-link { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; }
.browse-link > span:nth-child(2) { display: grid; flex: 1; min-width: 0; gap: 2px; }
.browse-link b { font-size: var(--text-base); font-weight: 600; }
.browse-link span span { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; }
.browse-link > .icon { color: var(--ink-2); }
.browse-link:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.choices { display: grid; gap: 8px; }
.choices form { min-width: 0; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: var(--text-md); font-weight: 600; line-height: 1.35; text-align: left; overflow-wrap: anywhere; }
.preview-head .sub { text-transform: none; }
.choice .icon { width: 16px; height: 16px; color: var(--muted); }
.choice:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.preview .peek-list { margin-top: 0; }
.import-box { margin: 4px 0 22px; }
.reading-form { display: grid; gap: 6px; margin: 14px 0 0; }
.reading-form label, .import-sub { color: var(--ink-2); font-size: var(--text-sm); font-weight: 600; }
.import-sub { margin: 22px 0 0; }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
[data-reading-slot] .review { margin-top: 10px; }
[data-reading-slot] .review-row { cursor: pointer; }
[data-reading-slot] .review-main { display: grid; gap: 2px; }
.your-sources { margin-top: 8px; }

/* The Feed's add sheet. */
.add-sheet { padding-top: 2px; }
.add-sheet-title { margin: 0; font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.03em; }
.add-sheet > .sub { margin: 4px 0 16px; }
.add-sheet .chip-row { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }

/* "Suggested for you" inside the Feed. */

/* The empty Feed. */
.fetching { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.fetching h2 { margin: 0; font-size: var(--text-xl); letter-spacing: -.02em; }
.fetching > .sub { margin: 4px 0 12px; }
.fetch-list { margin: 0; padding: 0; list-style: none; }
.fetch-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line); }
.fetch-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.fetch-row.is-pending .fetch-dot { background: var(--accent); animation: skeleton-pulse .9s ease-in-out infinite alternate; }
.fetch-row.is-ok .fetch-dot { background: var(--ok); }
.fetch-row.is-error .fetch-dot { background: var(--danger); }
.fetch-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-base); font-weight: 600; }
.fetch-state { flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: var(--text-sm); text-align: right; }
.fetch-row.is-ok .fetch-state { color: var(--ok); font-weight: 600; }
.fetch-row.is-error { flex-wrap: wrap; }
.fetch-row.is-error .fetch-state { flex-basis: 100%; padding-left: 18px; color: var(--danger); text-align: left; }
.fetch-slow { margin: 12px 0 0; color: var(--ink-2); font-size: var(--text-md); line-height: 1.5; }
.fetch-slow a { color: var(--accent); }
.fetch-strip { display: flex; align-items: center; gap: 10px; max-width: 680px; min-height: 44px; margin: 0 auto 12px; padding: 6px 8px 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: var(--text-md); font-weight: 600; }
.fetch-strip .fetch-dot { background: var(--accent); animation: skeleton-pulse .9s ease-in-out infinite alternate; }
.fetch-strip.is-done .fetch-dot { background: var(--ok); animation: none; }
.fetch-strip [data-strip-text] { flex: 1; min-width: 0; }
.fetch-strip-show { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; background: var(--accent); color: #fff; font-size: var(--text-sm); font-weight: 600; text-decoration: none; }
.fetch-strip-show[hidden] { display: none; }
.skeleton-cards { margin-top: 12px; }
.skeleton-card { padding: 16px; content-visibility: visible; }
.skeleton-card .skeleton { padding-top: 0; }
.feed-main > .break { padding: 28px 0 8px; }
.feed-main .grid + .break, .feed-main .day + .break { padding: 36px 0 24px; }
.feed-extra { margin-top: 18px; border-top: 1px solid var(--line); }
.feed-extra > summary { display: flex; align-items: center; gap: 8px; min-height: 52px; color: var(--ink-2); font-size: var(--text-md); font-weight: 600; cursor: pointer; list-style: none; }
.feed-extra > summary::-webkit-details-marker { display: none; }
.feed-extra > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.75px solid var(--muted); border-bottom: 1.75px solid var(--muted); transform: translateY(-2px) rotate(45deg); }
.feed-extra[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.feed-extra .count { color: var(--muted); font-weight: 500; }

@media (max-width: 719px) {
  .start-head h1 { font-size: var(--text-3xl); }
  .discover-search .primary { padding: 0 13px; }
}
@media (max-width: 360px) {
  .chip-row { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}

/* ---------- Interests: what the feed learned, and what you read ---------- */
.interests { max-width: 680px; margin: 0 auto; }
.interests .panel { margin-bottom: 16px; text-align: left; }
.interests .panel h2 { margin-bottom: 14px; }
.taste-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.taste-head h2 { margin: 0; }
.panel .taste-state { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 18%, transparent); }
.taste-state.settled .state-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.mini-title { margin: 18px 0 10px; color: var(--muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.reading-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 28px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
/* Stronger interests read darker; the tint carries strength without a number. */
.topic-chip { padding: 5px 11px; border-radius: 99px; background: color-mix(in srgb, var(--accent) calc(8% + var(--s, .5) * 22%), var(--surface)); color: var(--ink); font-size: var(--text-sm); font-weight: 600; }
.topic-chips.skip .topic-chip { background: color-mix(in srgb, var(--danger) calc(6% + var(--s, .5) * 14%), var(--surface)); color: var(--ink-2); }
.count-bars, .recent-reads { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .taste-foot { margin: 16px 0 0; font-size: var(--text-sm); }
.tune .taste-head { margin-bottom: 4px; }
.tune-block { margin: 0 0 18px; }
.tune .mini-title { margin-top: 14px; }
.tune .segmented { margin: 0; }
.tune-mix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tune .seg { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--ink-2); font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.tune .seg[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 5px #0000000d; }
.panel .tune-hint { margin: 8px 2px 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.tune-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.tune-switch-row .tune-hint { margin-top: 2px; }
.tune-label { margin: 0; color: var(--ink); font-size: var(--text-md); font-weight: 600; }
/* A 52×32 track inside a 44px-tall button, so the whole touch target stays full size. */
.switch { position: relative; flex: 0 0 auto; width: 56px; height: 44px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.switch::before { content: ""; position: absolute; inset: 6px 2px; border-radius: 999px; background: var(--line); transition: background-color .2s ease; }
.switch span { position: absolute; top: 9px; left: 5px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #0003; transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.switch[aria-checked="true"]::before { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 999px; }
.tune-topics { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tune-topics li { margin: 0; }
.tune-topic { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.tune-name { min-width: 0; overflow: hidden; color: var(--ink); font-size: var(--text-md); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tune-name small { display: block; color: var(--muted); font-size: var(--text-2xs); font-weight: 600; }
.tune-lean { display: inline-flex; flex: 0 0 auto; }
.tune-lean .seg { padding: 6px 12px; font-size: var(--text-xs); }
.tune-lean .seg[value="more"][aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.tune-lean .seg[value="less"][aria-pressed="true"] { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.tune-more { margin-top: 6px; }
.tune-more summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.tune-more[open] summary { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .switch span, .switch::before, .tune .seg { transition: none; } }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stat-row div { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.stat-row dt { color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.stat-row dd { margin: 2px 0 0; color: var(--ink); font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day-strip { display: grid; grid-template-columns: repeat(28, minmax(0, 1fr)); align-items: end; gap: 2px; height: 72px; }
.day-bar { position: relative; height: max(3px, calc(var(--h) * 100%)); border-radius: 4px 4px 1px 1px; background: var(--accent); outline: none; }
.day-bar.zero { background: var(--surface-2); }
.day-bar:hover, .day-bar:focus-visible { background: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.day-bar.zero:hover, .day-bar.zero:focus-visible { background: var(--line); }
.day-bar::after { content: attr(data-tip); position: absolute; z-index: 2; bottom: calc(100% + 6px); left: 50%; padding: 5px 8px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: var(--text-2xs); font-weight: 600; white-space: nowrap; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.day-bar:nth-child(-n+4)::after { left: 0; transform: none; }
.day-bar:nth-last-child(-n+4)::after { left: auto; right: 0; transform: none; }
.day-bar:hover::after, .day-bar:focus-visible::after { opacity: 1; }
.panel .strip-axis { display: flex; justify-content: space-between; margin: 6px 0 4px; font-size: var(--text-2xs); font-weight: 600; }
.count-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 26px; align-items: center; gap: 10px; font-size: var(--text-md); }
.cb-track { height: 8px; border-radius: 99px; background: var(--surface-2); }
.cb-track span { display: block; width: calc(var(--w) * 100%); min-width: 4px; height: 100%; border-radius: 4px; background: var(--accent); }
.cb-num { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; text-align: right; }
.shifts { margin-top: 6px; }
.recent-reads li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.recent-reads li:last-child { padding-bottom: 0; border-bottom: 0; }
.recent-reads a { color: var(--ink); font-family: var(--serif); font-size: var(--text-base); font-weight: 600; line-height: 1.4; text-decoration: none; }
.recent-reads span { color: var(--muted); font-size: var(--text-xs); }
@media (max-width: 719px) {
  .reading-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-nav a { width: 76px; }
}

/* ---------- Podcast player: play, a waveform that fills as it plays, the time ---------- */
.audio-player { --audio: var(--platform-color, #9478a2); display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 9px 14px 9px 9px; border-radius: 14px; background: color-mix(in srgb, var(--audio) 8%, var(--surface-2)); }
.reader .audio-player { margin: 0 0 24px; }
.audio-play { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--audio); color: #fff; cursor: pointer; transition: transform .16s ease; }
.audio-play:active { transform: scale(.92); }
.audio-play svg { width: 16px; height: 16px; fill: currentColor; }
.audio-play .i-play { margin-left: 2px; }
.audio-play .i-pause, .audio-player.playing .i-play { display: none; }
.audio-player.playing .i-pause { display: block; }
.audio-player.loading .audio-play { animation: audio-wait 1s ease-in-out infinite; }
@keyframes audio-wait { 50% { opacity: .55; } }
.audio-wave { position: relative; flex: 1; height: 22px; cursor: pointer; outline: none; touch-action: pan-y; background: color-mix(in srgb, var(--audio) 30%, transparent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22'%3E%3Cpath d='M0 7h3v8h-3zM5 4h3v14h-3zM10 8h3v6h-3zM15 2h3v18h-3zM20 5.5h3v11h-3zM25 1h3v20h-3zM30 6.5h3v9h-3zM35 3.5h3v15h-3zM40 8.5h3v5h-3zM45 2.5h3v17h-3zM50 5h3v12h-3zM55 7.5h3v7h-3z'/%3E%3C/svg%3E") left center / 60px 22px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22'%3E%3Cpath d='M0 7h3v8h-3zM5 4h3v14h-3zM10 8h3v6h-3zM15 2h3v18h-3zM20 5.5h3v11h-3zM25 1h3v20h-3zM30 6.5h3v9h-3zM35 3.5h3v15h-3zM40 8.5h3v5h-3zM45 2.5h3v17h-3zM50 5h3v12h-3zM55 7.5h3v7h-3z'/%3E%3C/svg%3E") left center / 60px 22px repeat-x; }
.audio-wave-fill { position: absolute; inset: 0; background: var(--audio); clip-path: inset(0 calc(100% - var(--pos, 0%)) 0 0); transition: clip-path .25s linear; }
.audio-player.scrubbing .audio-wave-fill { transition: none; }
/* One speed for every episode, so each button reads the page's current rate. */
.audio-speed { flex: 0 0 auto; min-width: 44px; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--audio) 16%, transparent); color: var(--ink-2); font-size: var(--text-xs); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.audio-speed::before { content: var(--audio-rate, "1×"); }
.audio-player:has(.audio-wave:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.audio-time { flex: 0 0 auto; min-width: 42px; color: var(--muted); font-size: var(--text-xs); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.audio-player.failed .audio-time::after { content: " · can't play here"; }
/* A post whose site blocks reading here: said once, with the way out. */
.card-blocked { margin: 8px 0 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; }
.card-blocked a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* One story from several sources: the others sit under the card that stands for them. */
.card .also { margin: 8px 0 0; color: var(--muted); font-size: var(--text-xs); }
.card .also a { color: var(--ink-2); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.card .also a:hover { color: var(--ink); border-color: currentColor; }
/* Catch-up after a few days away: one line, then the Feed with what is new marked like a diff's added lines. */
.catch-up { display: flex; align-items: center; gap: 4px; margin: 0 0 14px; padding: 4px 4px 4px 0; border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.catch-up-text { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 6px 4px 6px 16px; color: inherit; text-decoration: none; }
.catch-up-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ok); }
.catch-up-lines { display: flex; flex: 1 1 auto; flex-direction: column; gap: 1px; min-width: 0; font-size: var(--text-sm); line-height: 1.3; }
.catch-up-lines b { color: var(--ink); font-weight: 650; }
.catch-up-lines span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.catch-up-show { flex: 0 0 auto; color: color-mix(in srgb, var(--ok) 75%, var(--ink)); font-size: var(--text-sm); font-weight: 650; white-space: nowrap; }
.catch-up-close { flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: var(--text-sm); cursor: pointer; }
.catch-up-text:hover .catch-up-show, .catch-up-close:hover { color: var(--ink); }
@media (max-width: 519px) { .catch-up-show-word { display: none; } .catch-up-show { font-size: var(--text-lg); } }
/* A new post's left edge, until "✕" on the catch-up says it has been seen. */
body:not(.new-seen) .card.is-new:not(.is-hidden):not(.is-active) { border-left: 4px solid var(--ok); }
.new-tag { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: color-mix(in srgb, var(--ok) 75%, var(--ink)); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .02em; }
.new-seen .new-tag { display: none; }
/* Source lists: chips over the Feed, and their editor on Sources. */
/* Lists and the catch-up sit in the Feed column, like the head and controls. */
.chip-row.list-chips { max-width: 680px; margin: 0 auto 14px; padding: 2px 0 4px; }
.catch-up { max-width: 680px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.source-lists .list-rows { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 8px; }
.source-lists .list-rows li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.source-lists .list-rows li > span { flex: 1; color: var(--muted); font-size: var(--text-sm); }
.source-lists .list-rows a { color: var(--ink); text-decoration: none; }
.source-lists .new-list > summary { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; list-style: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.source-lists .new-list > summary::-webkit-details-marker { display: none; }
.source-lists .new-list > summary .icon { width: 16px; height: 16px; }
.source-lists .new-list form { display: grid; gap: 10px; margin-top: 14px; }
.source-lists .list-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; border: 0; margin: 0; padding: 0; }
.source-lists .list-picks legend { margin-bottom: 6px; color: var(--muted); font-size: var(--text-xs); }
.source-lists .list-picks label { overflow: hidden; font-size: var(--text-sm); white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.source-lists .list-picks input { margin: 0 6px 0 0; vertical-align: -2px; }
/* Lists and imports are set up on a computer; a phone keeps Sources to finding and following. */
@media (max-width: 719px) { .desktop-only { display: none !important; } }
.source-lists, .source-requests { margin: 0 0 24px; padding: 20px 22px; text-align: left; }
/* A redirect to #requests or #lists lands with its heading below the sticky top bar. */
.block-title[id] { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.import-box > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; }
.import-box > summary::-webkit-details-marker { display: none; }
.import-box > summary .icon { width: 18px; height: 18px; color: var(--muted); transition: transform .2s ease; }
.import-box[open] > summary .icon { transform: rotate(180deg); }
/* Searches a reader asked the admin to look into, right under the search. */
.source-requests ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.source-requests li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--text-sm); }
.source-requests li b { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.source-requests li a { color: var(--accent); font-weight: 600; text-decoration: none; }
.source-requests .sub { margin: 0 0 12px; font-size: var(--text-sm); }
/* The invite page shows who sent it and a taste of what they read. */
.source-lists { text-align: left; }
.source-lists > .sub { margin: 0 0 6px; }
.source-lists .new-list form > label { display: grid; gap: 4px; max-width: 320px; font-size: var(--text-sm); font-weight: 600; }
.source-lists .new-list form > .primary { justify-self: start; width: auto; padding-inline: 18px; }

/* One person, many accounts (Sources): the person's accounts sit together under one heading, and
   a small "…" menu separates or joins them. Scoped under .person-group, since search cards also use .person-head. */
.person-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 4px; margin: 0 0 12px; box-shadow: var(--shadow); }
.person-group > .person-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; }
.person-group .person-name { font-size: var(--text-lg); margin: 0; }
.person-group .person-count { font-size: var(--text-sm); color: var(--muted); }
.person-group .person-accounts { border-left: 2px solid var(--surface-2); padding-left: 10px; }
.source-row.in-person { box-shadow: none; border-color: transparent; background: transparent; margin: 0; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; cursor: pointer; border-radius: 50%; display: grid; place-items: center; width: 34px; height: 34px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-pop { position: absolute; right: 0; top: 38px; z-index: 20; min-width: 200px; background: var(--pop); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop-shadow); padding: 6px; }
.row-menu-pop button, .row-menu-pop summary { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); font: 500 var(--text-md) var(--ui); padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.row-menu-pop button:hover, .row-menu-pop summary:hover { background: var(--surface-2); }
.same-as-picks { max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.also-on { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--text-sm); color: var(--muted); }
.also-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 9px; background: var(--surface-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.also-chip .g { width: 12px; height: 12px; }
.also-on .sep { display: none; }
.grouped-note { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
.grouped-note .link-button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }

/* Saved, organised: collection chips, a collection's head, notes on rows, and the note/collections popover. */
.collection-bar { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; }
.chip-row.collection-chips { flex: 1; min-width: 0; margin: 0; padding: 2px 0 4px; }
.collection-chips .chip .icon { width: 14px; height: 14px; stroke-width: 2; }
.chip-count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip.on .chip-count { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.row-menu > summary.chip-add { width: 38px; height: 38px; margin-top: 2px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.row-menu > summary.chip-add:hover, .row-menu[open] > summary.chip-add { color: var(--ink); background: var(--surface-2); }
.collection-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; }
.collection-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.collection-title h2 { margin: 0; overflow: hidden; font-size: var(--text-2xl); letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.collection-title span { color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }
.pill-button, .row-menu > summary.pill-button { display: inline-flex; align-items: center; gap: 7px; width: auto; height: auto; min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--text-sm) var(--ui); white-space: nowrap; cursor: pointer; }
.pill-button:hover { background: var(--surface-2); }
.pill-button .icon { width: 16px; height: 16px; stroke-width: 1.9; }
.pill-button.on, .row-menu > summary.pill-button.on { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.row-menu > summary.act { width: 44px; height: 44px; border-radius: 12px; }
.row-menu > summary.act.on { color: var(--accent); }
.row-menu[open] > summary.act { background: var(--surface-2); color: var(--ink); }

.pop-form { display: grid; gap: 10px; width: min(340px, calc(100vw - 32px)); padding: 14px; cursor: default; }
.pop-form form { display: grid; gap: 8px; margin: 0; }
.pop-form form.pop-field { display: flex; }
.pop-title { display: none; }
.pop-label { margin: 0; color: var(--muted); font-size: var(--text-xs); font-weight: 600; line-height: 1.45; }
.share-pop > .pop-label { color: var(--ink-2); font-size: var(--text-sm); font-weight: 500; }
.pop-field { display: flex; gap: 8px; }
.pop-field input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 11px; border-radius: 10px; font-size: var(--text-md); }
.pop-form textarea { width: 100%; min-height: 92px; padding: 10px 12px; border-radius: 12px; resize: vertical; font: var(--text-base)/1.5 var(--serif); }
.pop-row { display: flex; justify-content: flex-end; }
.pop-form .primary, .pop-form .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-height: 40px; padding: 0 14px; border-radius: 10px; font: 600 var(--text-sm) var(--ui); text-align: center; white-space: nowrap; }
.pop-form .primary, .pop-form .primary:hover { background: var(--accent); color: var(--surface); }
.pop-form .ghost { padding: 0 10px; border: 1px solid var(--line); color: var(--ink-2); }
.pop-picks { display: grid; gap: 2px; max-height: 240px; margin: -4px -4px 0; overflow-y: auto; }
.pop-picks > form:not(.pop-field) { display: block; }
.pop-picks .pop-field { margin: 6px 4px 0; }
.row-menu-pop .pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .icon { width: 17px; height: 17px; color: var(--muted); }
.row-menu-pop .pick.on { color: var(--accent); font-weight: 600; }
.pick.on .icon { color: var(--accent); stroke-width: 2.2; }
.pop-actions { display: grid; gap: 2px; margin: 0 -4px -4px; padding-top: 6px; border-top: 1px solid var(--line); }
.pop-actions form { display: block; }
.row-menu-pop .pop-action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: 500 var(--text-md) var(--ui); text-align: left; text-decoration: none; cursor: pointer; }
.row-menu-pop .pop-action:hover { background: var(--surface-2); }
.pop-action .icon { width: 17px; height: 17px; color: var(--ink-2); }
.row-menu-pop .pop-action.quiet { color: var(--ink-2); }
.row-menu-pop .pop-action.danger { color: var(--danger); }
.share-pop { width: min(380px, calc(100vw - 32px)); }
.share-pop input { font-size: var(--text-sm); color: var(--ink-2); }

.lib-actions { display: flex; align-items: flex-start; gap: 2px; margin-left: auto; }
.lib-actions .lib-save { margin-left: 0; }
.lib-note { display: -webkit-box; margin: 8px 0 0; padding: 1px 0 1px 12px; overflow: hidden; border-left: 2px solid var(--accent); color: var(--ink); font: var(--text-base)/1.55 var(--serif); white-space: pre-line; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.lib-note b { display: block; margin-bottom: 2px; color: var(--accent); font: 600 var(--text-xs)/1.4 var(--ui); }
.lib-shelves { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.lib-shelves a { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: var(--text-xs); font-weight: 600; text-decoration: none; }
.lib-shelves a:hover { color: var(--ink); }
.lib-row { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.shared-head { margin: 0 0 24px; }
.shared-head h1 { margin: 0; }
.shared-sub { margin: 8px 0 0; color: var(--muted); font-size: var(--text-sm); }
.shared-sub a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* A popover grows from its trigger's corner; it opens often, so it is quick. */
@media (min-width: 720px) {
  .row-menu[open] > .row-menu-pop { transform-origin: top right; animation: pop-in .16s cubic-bezier(.23, 1, .32, 1); }
}
@keyframes pop-in { from { opacity: 0; transform: scale(.97) translateY(-4px); } }

/* Your sources' heading carries its Share pill. */
.your-sources-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.your-sources-head .block-title { margin: 0; }

/* Shared pages seen without an account: the brand, a way in, one plain line about ownfeed. */
.guest-bar { display: flex; align-items: center; justify-content: space-between; max-width: 680px; margin: 0 auto 28px; }
.guest-bar .brand { color: var(--ink); font-size: var(--text-xl); text-decoration: none; }
.guest-signin { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font: 600 var(--text-sm) var(--ui); text-decoration: none; }
.guest-cta { display: grid; justify-items: center; gap: 14px; margin: 28px 0 0; padding: 24px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; }
.guest-cta p { margin: 0; color: var(--ink-2); font-size: var(--text-md); }
.guest-cta .primary { display: inline-flex; align-items: center; padding: 0 22px; font: 600 var(--text-md) var(--ui); text-decoration: none; transition: transform .16s cubic-bezier(.23, 1, .32, 1); }
.guest-cta .primary:active, .pack-bar .primary:active { transform: scale(.97); }
.guest-line { margin: 20px 0 0; color: var(--muted); font-size: var(--text-sm); text-align: center; }

/* Someone's shared sources: tap anywhere on a row to pick it; the floating button counts the picks. */
.pack-rows { --ease-out: cubic-bezier(.23, 1, .32, 1); }
.pack-rows .row { position: relative; }
.pack-pick { display: grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--line); border-radius: 50%; color: transparent; cursor: pointer; transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.pack-pick::after { content: ""; position: absolute; z-index: 1; inset: 0; }
.pack-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pack-pick:has(input:checked) { border-color: var(--accent); background: var(--accent); color: var(--surface); }
.pack-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-pick .icon { width: 16px; height: 16px; stroke-width: 2.4; }
/* Press feedback stays off .pack-pick: a transform there would shrink the row-wide tap area mid-tap. */
.pack-rows .row:active { background: var(--surface-2); }
.pack-state { color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.pack-bar { position: sticky; z-index: 30; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; justify-content: center; margin-top: 18px; pointer-events: none; }
.pack-bar .primary { min-width: 180px; padding: 0 26px; border-radius: 999px; font: 650 var(--text-md) var(--ui); box-shadow: 0 12px 28px #0866da38; pointer-events: auto; transition: transform .16s cubic-bezier(.23, 1, .32, 1), opacity .16s ease; }
.pack-bar .primary:disabled { opacity: .45; box-shadow: none; }
.pack-note { margin: 16px 0 0; color: var(--muted); font-size: var(--text-sm); text-align: center; }
.pack-note a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Phones: the popover forms rise as a sheet from the bottom over a scrim. */
@media (max-width: 719px) {
  .row-menu:has(> .pop-form)[open]::before { content: ""; position: fixed; z-index: 60; inset: 0; background: var(--scrim); animation: scrim-in .2s ease-out; }
  .row-menu > .pop-form { position: fixed; z-index: 61; inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px; top: auto; width: auto; max-height: calc(100dvh - 96px); padding: 18px; overflow-y: auto; border-radius: 22px; animation: sheet-up .28s cubic-bezier(.23, 1, .32, 1); }
  .lib-actions { flex-direction: column; gap: 0; margin-right: -8px; }
  .lib-actions .act, .lib-actions .row-menu > summary.act { height: 40px; }
  .pop-title { display: block; margin: 0 0 2px; overflow: hidden; font-size: var(--text-base); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .collection-title h2 { font-size: var(--text-xl); }
  .mobile-nav ~ .shell .pack-bar { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .guest-bar { margin-bottom: 20px; }
}
@keyframes scrim-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .row-menu > .pop-form, .row-menu[open]::before { animation: none; } }

/* The collection sheet (app.js): a bottom sheet on phones, a centred box on desktop; only the list scrolls. */
.act.save { -webkit-touch-callout: none; user-select: none; }
.collect-sheet { width: min(420px, calc(100vw - 32px)); max-width: none; max-height: min(560px, calc(100dvh - 48px)); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: var(--pop-shadow); overflow: hidden; }
.collect-sheet::backdrop { background: var(--scrim); }
.collect-sheet[open] { animation: collect-in .2s cubic-bezier(.23, 1, .32, 1); }
.collect-body { display: flex; flex-direction: column; box-sizing: border-box; max-height: inherit; padding: 4px 16px 16px; }
.collect-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.collect-head h2 { margin: 0; font-size: var(--text-lg); letter-spacing: -.01em; }
.collect-x { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.collect-x .icon { width: 20px; height: 20px; stroke-width: 2; }
.collect-list { flex: 1; min-height: 48px; margin: 0 -6px 12px; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; transition: opacity .15s ease; }
.collect-list[aria-busy] { opacity: .5; }
.collect-list .pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 500 var(--text-md) var(--ui); text-align: left; cursor: pointer; }
.collect-list .pick span { flex: 1; min-width: 0; }
.collect-list .pick small { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.collect-list .pick.on { color: var(--accent); font-weight: 600; }
.collect-list .pick:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .collect-list .pick:hover { background: var(--surface-2); } }
.collect-new input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 12px; font-size: 16px; }
.collect-new .primary { min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--accent); color: var(--surface); font: 600 var(--text-sm) var(--ui); white-space: nowrap; }
@keyframes collect-in { from { opacity: 0; transform: scale(.96); } }
@keyframes collect-up { from { transform: translateY(100%); } }
@media (max-width: 719px) {
  .collect-sheet { width: 100%; max-height: 75dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .collect-body { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .collect-sheet[open] { animation-name: collect-up; animation-duration: .24s; }
}
@media (prefers-reduced-motion: reduce) { .collect-sheet[open] { animation: collect-fade .2s ease; } }
@keyframes collect-fade { from { opacity: 0; } }

/* Highlights (highlight.js): a marker stroke over the words, and one floating button to add or remove one. */
mark.hl { padding: 0 1px; border-radius: 3px; background: color-mix(in srgb, #fbbf24 40%, transparent); color: inherit; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-pop { position: fixed; z-index: 70; transform: translate(-50%, -100%); min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--surface); font: 600 var(--text-sm) var(--ui); box-shadow: var(--pop-shadow); cursor: pointer; }
.hl-pop[hidden] { display: none; }
.hl-pop.docked { left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); min-height: 44px; padding: 0 20px; }
.lib-highlights { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.lib-highlights li { display: -webkit-box; padding: 1px 0 1px 12px; overflow: hidden; border-left: 3px solid #fbbf24; color: var(--ink); font: var(--text-base)/1.5 var(--serif); -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lib-highlights .lib-highlights-more { border-left-color: transparent; font: 600 var(--text-xs)/1.4 var(--ui); }
.lib-highlights-more a { color: var(--accent); text-decoration: none; }

/* An X Article inside a quoted post (x_quote.html): its title, then its opening, or in the reader its whole body. */
.x-quote-article { display: grid; gap: 4px; margin-top: 4px; }
.x-quote-article > b { font-size: var(--text-md); line-height: 1.35; }
.x-quote-body { padding: 4px 16px 8px; border-top: 1px solid var(--line); }

/* Interests: the reading card, the streak and Clean up your feed. */
.interests { --ease-out: cubic-bezier(.23, 1, .32, 1); }
.panel.reading-hero { padding-top: 22px; }
.hero-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.panel .hero-big { margin: 0; color: var(--ink); font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.panel .hero-week { margin: 0; padding: 4px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); font-size: var(--text-sm); font-weight: 650; font-variant-numeric: tabular-nums; }
.panel .hero-equals { margin: 10px 0 0; color: var(--ink); font-size: var(--text-lg); font-weight: 600; letter-spacing: -.01em; }
.hero-equals small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0; }
.hero-streak { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.week-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.week-dots li { display: grid; justify-items: center; gap: 5px; }
.week-dots .dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); }
.week-dots .dot .icon { width: 16px; height: 16px; color: var(--surface); stroke-width: 2.6; }
.week-dots .read .dot { background: var(--accent); animation: dot-in .32s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); }
.week-dots .today .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.week-dots .ahead .dot { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.week-dots .letter { color: var(--muted); font-size: var(--text-2xs); font-weight: 600; }
.week-dots .today .letter { color: var(--accent); }
.panel .streak-count { margin: 0; color: var(--ink-2); font-size: var(--text-md); font-weight: 600; text-align: right; }
.streak-count strong { color: var(--ink); font-size: var(--text-3xl); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-right: 4px; }
.streak-count small { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: 500; }
.milestones { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.milestones li { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: 99px; font-size: var(--text-sm); font-weight: 600; animation: chip-in .3s var(--ease-out) both; animation-delay: calc(240ms + var(--i) * 50ms); }
.milestones .earned { background: var(--accent-soft); color: var(--ink); }
.milestones .earned .icon { width: 15px; height: 15px; color: var(--accent); stroke-width: 2.4; }
.milestones .next { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.milestones .next small { color: var(--muted); font-size: var(--text-xs); font-weight: 500; }
.milestones .next small::before { content: "·"; margin-right: 6px; }
@keyframes dot-in { from { opacity: 0; transform: scale(.7); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(4px) scale(.97); } }

.action-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.action-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); transition: opacity .18s ease, transform .18s var(--ease-out); }
.action-row:first-child { border-top: 0; padding-top: 2px; }
.action-row .g { width: 22px; height: 22px; }
.action-main { display: grid; gap: 2px; min-width: 0; }
.action-name { overflow: hidden; color: var(--ink); font-size: var(--text-md); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.action-why { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.action-buttons { display: flex; gap: 6px; margin: 0; }
.action-buttons .pill-button { min-height: 40px; transition: transform .16s var(--ease-out), background-color .15s ease; }
.action-buttons .pill-button:active { transform: scale(.97); }
.action-buttons .unfollow { color: var(--danger); }
@media (hover: hover) and (pointer: fine) { .action-buttons .unfollow:hover { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); } }
.action-row.leaving { opacity: 0; transform: translateX(16px); }
.action-row.entering { animation: row-in .24s var(--ease-out) both; }
@keyframes row-in { from { opacity: 0; transform: translateX(-10px); } }
.action-rows.collapsed [data-extra] { display: none; }
.rows-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font: 600 var(--text-sm) var(--ui); cursor: pointer; }
.rows-more .icon { width: 16px; height: 16px; }
.panel .rows-done { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-weight: 600; animation: chip-in .3s var(--ease-out) both; }
.rows-done .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.rows-done[hidden] { display: none; }

.topic-mark { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); font-size: var(--text-md); font-weight: 700; }
.action-buttons .not-right { color: var(--ink-2); }
.panel .action-rows + .mini-title, .panel [data-rows] + [data-rows] .mini-title { margin-top: 20px; }

/* Freezes: a frozen day keeps the run going (ice dot), and the hero says how many are ready. */
.week-dots .frozen .dot { background: color-mix(in srgb, var(--ice) 14%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--ice); }
.week-dots .frozen .dot .icon { color: var(--ice); stroke-width: 2; }
.streak-count .freeze { display: inline-flex; align-items: center; gap: 4px; color: var(--ice); font-weight: 600; }
.streak-count .freeze .icon { width: 13px; height: 13px; stroke-width: 2; }

/* The top bar's flame: grey until today's reading counts, then lit; it pops on the visit it grows. */
.streak-flame { --ease-out: cubic-bezier(.23, 1, .32, 1); display: inline-flex; align-items: center; gap: 3px; height: 40px; padding: 0 10px 0 7px; border-radius: 99px; color: var(--muted); font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; transition: transform .16s var(--ease-out), background-color .15s ease; }
.streak-flame[hidden] { display: none; }
.streak-flame .icon { width: 20px; height: 20px; stroke-width: 1.8; transition: color .3s ease, fill .3s ease; }
.streak-flame.lit { color: var(--ink); }
.streak-flame.lit .icon { color: var(--flame); fill: var(--flame); }
.streak-flame:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .streak-flame:hover { background: var(--surface-2); } }
.streak-flame.pop .icon { animation: streak-pop .46s cubic-bezier(.34, 1.56, .64, 1) .25s both; }
@keyframes streak-pop { 0% { transform: scale(.9); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* Today's first read: the streak it made, over the reader for a moment. A first 7, 30 or 100 is bigger and stays longer. */
.streak-moment { --ease-out: cubic-bezier(.23, 1, .32, 1); position: fixed; z-index: 70; top: calc(14px + env(safe-area-inset-top)); left: 50%; display: grid; justify-items: center; gap: 4px; width: min(320px, calc(100vw - 32px)); padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--pop); box-shadow: var(--pop-shadow); text-align: center; cursor: pointer; transform: translateX(-50%); animation: moment-in .34s var(--ease-out) both; }
.streak-moment.leaving { opacity: 0; transform: translate(-50%, -8px) scale(.97); transition: opacity .2s ease, transform .2s var(--ease-out); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes moment-in { from { opacity: 0; transform: translate(-50%, -14px) scale(.96); } }
.streak-moment .flame { width: 40px; height: 40px; fill: var(--flame); stroke: var(--flame); stroke-width: 1.4; stroke-linejoin: round; animation: flame-in .5s cubic-bezier(.34, 1.56, .64, 1) .08s both; }
@keyframes flame-in { from { opacity: 0; transform: translateY(6px) scale(.6); } }
.streak-moment p { margin: 0; }
.streak-moment .moment-days { color: var(--ink); font-size: var(--text-lg); font-weight: 650; }
.moment-days strong { font-size: var(--text-2xl); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.streak-moment .moment-sub { color: var(--muted); font-size: var(--text-sm); }
.streak-moment .week-dots { gap: 6px; margin-top: 8px; }
.streak-moment .week-dots .dot { width: 26px; height: 26px; }
.streak-moment .week-dots .dot .icon { width: 14px; height: 14px; }
.streak-moment .week-dots .read .dot { animation: dot-in .3s var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 40ms); }
.streak-moment .week-dots .now .dot { background: var(--flame); animation: now-in .5s cubic-bezier(.34, 1.56, .64, 1) .5s both; }
@keyframes now-in { from { opacity: 0; transform: scale(.5); } }
.streak-moment.big { width: min(360px, calc(100vw - 32px)); padding: 24px 22px 18px; }
.streak-moment.big .flame { width: 64px; height: 64px; }
.streak-moment.big .moment-days strong { font-size: var(--text-3xl); }
@media (max-width: 719px) {
  .panel .hero-big { font-size: 44px; }
  .hero-streak { flex-direction: column; align-items: stretch; }
  .week-dots { justify-content: space-between; }
  .panel .streak-count { text-align: left; }
  .action-row { grid-template-columns: auto minmax(0, 1fr); }
  .action-buttons { grid-column: 2; }
  .action-buttons .pill-button { flex: 1; justify-content: center; }
  .action-row:has(.not-right) { grid-template-columns: auto minmax(0, 1fr) auto; }
  .action-row:has(.not-right) .action-buttons { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .week-dots .read .dot, .milestones li, .streak-flame.pop .icon, .action-row.entering, .streak-moment .flame, .streak-moment .week-dots .dot { animation: none; }
  .streak-moment { animation-name: fade-in; }
  .streak-moment.leaving { transform: translateX(-50%); }
  .action-row { transition: opacity .18s ease; }
  .action-row.leaving { transform: none; }
}

/* --- Sources: search first, who you follow as one compact list, finding more below ------------ */
.settings-link + .settings-link { margin-left: 2px; }
.sources-page { max-width: 880px; margin: 0 auto; }
.sources-page .page-head { margin-bottom: 14px; }
.sources-page .find-box { height: 56px; }
.sources-page .find-help { flex-wrap: nowrap; justify-content: flex-start; gap: 6px 14px; margin: 8px 2px 0; font-size: var(--text-xs); }
.sources-page .find-kinds { gap: 8px; white-space: nowrap; }
.sources-page .find-trust { padding: 3px 9px 3px 7px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap; }
.sources-page .find-trust .icon { width: 13px; height: 13px; }
@media (max-width: 480px) { .sources-page .public-note { display: none; } .sources-page .find-kinds { gap: 7px; } }
@media (max-width: 359px) { .sources-page .find-help { flex-wrap: wrap; } }

.sources-page .your-sources-head { margin: 26px 0 10px; }
.source-count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.sources-page .source-list { display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sources-page .source-list > :not([hidden]) ~ :not([hidden]), .sources-page .person-accounts > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid var(--line); }
.sources-page .source-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; margin: 0; padding: 8px 6px 8px 14px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.sources-page .source-row[hidden] { display: none; }
.sources-page .source-row.off { opacity: 1; }
.sources-page .source-row.off > .g, .sources-page .source-row.off .source-name, .sources-page .source-row.off .source-meta { opacity: .55; }
.sources-page .source-row.added { background: var(--accent-soft); }
.sources-page .source-row > .g { margin: 0; }
.sources-page .source-title { flex-wrap: wrap; gap: 3px 6px; font-size: var(--text-base); line-height: 1.3; }
.source-name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sources-page .health { padding: 2px 7px; }
.sources-page .source-meta { display: flex; min-width: 0; margin: 1px 0 0; color: var(--muted); font-size: var(--text-sm); }
.sources-page .source-url { min-width: 0; margin: 0; overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
.source-when { flex: none; white-space: nowrap; }
.source-when::before { content: "\00a0·\00a0"; }
.sources-page .source-actions { flex-wrap: nowrap; align-items: center; justify-content: flex-end; grid-column: auto; }
.sources-page .source-menu > summary { color: var(--ink-2); }
.sources-page .source-menu > summary:hover, .sources-page .source-menu[open] > summary { color: var(--ink); background: var(--surface-2); }
.sources-page .source-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* A note about this source sits in the menu; a small dot on the "…" says there is one. */
.source-menu > summary.has-note { position: relative; }
.source-menu > summary.has-note::after { content: ""; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface); }

.row-menu-pop.source-pop { width: min(300px, calc(100vw - 32px)); min-width: 220px; gap: 0; padding: 6px; }
.row-menu-pop.source-pop form { display: block; margin: 0; }
.source-pop button, .source-pop summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.source-pop button:focus-visible, .source-pop summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.source-pop .hint { margin: 0 0 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: var(--text-sm); line-height: 1.4; }
.source-pop .pop-danger { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.source-pop .pop-danger button { color: var(--danger); }
.source-pop .same-as > summary { list-style: none; }
.source-pop .same-as > summary::-webkit-details-marker { display: none; }
.source-pop .same-as > summary .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .15s ease; }
.source-pop .same-as[open] > summary .icon { transform: rotate(180deg); }
.source-pop .same-as-picks { margin-top: 0; }
@media (min-width: 720px) { .source-menu.up > .source-pop { top: auto; bottom: 38px; transform-origin: bottom right; } }
@media (max-width: 719px) {
  .row-menu > .row-menu-pop.source-pop { width: auto; padding: 6px 8px 10px; }
  .source-pop .pop-title { padding: 10px 10px 6px; font-size: var(--text-base); }
  .source-pop button, .source-pop summary { min-height: 48px; font-size: var(--text-base); }
  .source-pop .hint { margin-top: 0; font-size: var(--text-md); }
}

.sources-page .person-group { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.sources-page .person-group > .person-head { min-height: 40px; margin: 0; padding: 4px 6px 0 14px; }
.sources-page .person-group .person-id { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sources-page .person-group .person-name { overflow: hidden; font-size: var(--text-base); text-overflow: ellipsis; white-space: nowrap; }
.sources-page .person-group .person-count { flex: none; font-size: var(--text-sm); }
.sources-page .person-group .person-accounts { margin-left: 25px; padding-left: 0; border-left: 2px solid var(--line); }
.sources-page .person-group .source-row { padding-left: 12px; min-height: 60px; }

.sources-page .source-chips { margin: 0 0 10px; padding: 2px 0 4px; }
/* One row of shortcuts under the search box; a shortcut's panel opens right below it (:target), above the list. */
.source-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.shortcut { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: var(--text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; }
.shortcut .icon { width: 16px; height: 16px; }
.shortcut .chip-count { color: var(--muted); font-weight: 500; }
.shortcut.ai { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); background: var(--accent-soft); color: var(--accent); }
.shortcut:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .shortcut:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); } .shortcut.ai:hover { border-color: var(--accent); } }
.sources-page:has(#suggested:target) .shortcut[href="#suggested"], .sources-page:has(#import:target) .shortcut[href="#import"], .sources-page:has(#lists:target) .shortcut[href="#lists"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
/* The scroll margin keeps the search box and the shortcut row in view when a panel opens. */
.shortcut-panel { display: none; margin: 14px 0 0; scroll-margin-top: 320px; text-align: left; }
.shortcut-panel:target, .shortcut-panel.open { display: block; }
/* A panel opened by the page itself has no hash to clear, so it shows no close button. */
.shortcut-panel.open:not(:target) .panel-close { display: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.panel-head .block-title { margin: 0; font-size: var(--text-xs); }
/* The reader's own matches come first; the search's results for anyone new follow them. */
.sources-page .discover { display: flex; flex-direction: column; }
.sources-page .find { display: contents; }
.sources-page .find-results { order: 1; margin-top: 18px; }
/* With nobody followed, Suggested is open by default: search results go above it. */
.sources-page #suggested.open { order: 2; }
.sources-page [data-own][hidden] { display: none; }

.sources-page .suggested { margin: 26px 0 12px; }
.sources-page .src-grid { gap: 10px; }
.sources-page .src-head { min-height: 56px; padding: 8px 8px 8px 14px; gap: 10px; }
.sources-page .src-head .fmt-badge { width: 32px; height: 32px; border-radius: 10px; }
.sources-page .src-name { font-size: var(--text-base); }
.sources-page .src-body { padding: 8px 14px 4px; }
.sources-page .src-blurb { margin-top: 0; font-size: var(--text-sm); }
.sources-page .src-reason { margin-top: 6px; }
.sources-page .src-preview, .sources-page .src-card > .peek-slot { margin-left: 14px; margin-right: 14px; padding-left: 0; padding-right: 0; }
.sources-page .src-actions { min-height: 52px; margin: auto 14px 0; padding: 6px 0; }
.sources-page #lists, .sources-page #requests { margin-top: 28px; }
@media (max-width: 400px) { .sources-page .find-help { gap: 6px 10px; } .sources-page .find-kinds { gap: 5px; } }
