/* Reads — one responsive component set in a macOS / Reeder idiom.
   Desktop: source list | article list | reader. Below 1024px the source list
   is a sheet; below 721px the list and the reader are one pane each and the
   list's tools sit in an iOS-style bottom bar. Colours are the macOS system
   palette (systemBlue accent, darkened where it carries small text so every
   pairing meets WCAG AA). */
:root {
  color-scheme: light;
  --window: #ffffff;
  --sidebar: #ebebed;
  --sidebar-glass: rgb(236 236 238 / 82%);
  --bar-glass: rgb(255 255 255 / 84%);
  --label: #1d1d1f;
  --label-2: #5f5f64;
  --label-3: #7d7d82;
  --separator: rgb(0 0 0 / 12%);
  --separator-strong: rgb(0 0 0 / 18%);
  --fill: rgb(0 0 0 / 5%);
  --fill-2: rgb(0 0 0 / 8%);
  --hover: rgb(0 0 0 / 4.5%);
  --unemph: rgb(0 0 0 / 9%);
  --accent: #007aff;
  --accent-text: #0062cc;
  --accent-fill: #0064e1;
  --on-accent: #ffffff;
  --on-accent-2: rgb(255 255 255 / 92%);
  --segment-on: #ffffff;
  --segment-shadow: 0 1px 2px rgb(0 0 0 / 14%), 0 0 0 .5px rgb(0 0 0 / 6%);
  --menu: rgb(246 246 248 / 92%);
  --menu-shadow: 0 0 0 .5px rgb(0 0 0 / 14%), 0 10px 32px rgb(0 0 0 / 18%);
  --scrim: rgb(0 0 0 / 28%);
  --code: #f4f4f6;
  --avatar-1: #e4efff; --avatar-1-ink: #1d4f91;
  --avatar-2: #e3f6ee; --avatar-2-ink: #11624a;
  --avatar-3: #fff1df; --avatar-3-ink: #8a4b00;
  --avatar-4: #fde9f1; --avatar-4-ink: #9b1d4c;
  --avatar-5: #eeeaff; --avatar-5-ink: #4a33c4;
  --avatar-6: #ececf0; --avatar-6-ink: #3d4b60;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: .18s;
  --star: #b86200;
  --row: 32px;
  --target: 28px;
  --bar: 52px;
  /* The list column's one content edge, and the row rhythm (4/8px). */
  --gutter: 16px;
  --row-pad: 14px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --window: #1e1e1e; --sidebar: #2a2a2c; --sidebar-glass: rgb(42 42 44 / 82%); --bar-glass: rgb(30 30 30 / 84%);
    --label: #ececee; --label-2: #a7a7ad; --label-3: #77777d;
    --separator: rgb(255 255 255 / 11%); --separator-strong: rgb(255 255 255 / 18%);
    --fill: rgb(255 255 255 / 7%); --fill-2: rgb(255 255 255 / 11%); --hover: rgb(255 255 255 / 5%); --unemph: rgb(255 255 255 / 11%);
    --accent: #0a84ff; --accent-text: #4aa3ff; --accent-fill: #0a5fd1; --on-accent: #ffffff; --on-accent-2: rgb(255 255 255 / 92%);
    --segment-on: #5b5b60; --segment-shadow: 0 1px 2px rgb(0 0 0 / 30%);
    --menu: rgb(44 44 46 / 92%); --menu-shadow: 0 0 0 .5px rgb(255 255 255 / 14%), 0 10px 32px rgb(0 0 0 / 50%);
    --scrim: rgb(0 0 0 / 50%); --code: #2a2a2c; --star: #ffb340;
    --avatar-1: #1b3352; --avatar-1-ink: #a9cbff; --avatar-2: #173b30; --avatar-2-ink: #8fe0c0;
    --avatar-3: #3d2d16; --avatar-3-ink: #ffcf8a; --avatar-4: #401b2b; --avatar-4-ink: #ffadc9;
    --avatar-5: #2d265a; --avatar-5-ink: #c8bdff; --avatar-6: #333338; --avatar-6-ink: #c9ced8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --window: #1e1e1e; --sidebar: #2a2a2c; --sidebar-glass: rgb(42 42 44 / 82%); --bar-glass: rgb(30 30 30 / 84%);
  --label: #ececee; --label-2: #a7a7ad; --label-3: #77777d;
  --separator: rgb(255 255 255 / 11%); --separator-strong: rgb(255 255 255 / 18%);
  --fill: rgb(255 255 255 / 7%); --fill-2: rgb(255 255 255 / 11%); --hover: rgb(255 255 255 / 5%); --unemph: rgb(255 255 255 / 11%);
  --accent: #0a84ff; --accent-text: #4aa3ff; --accent-fill: #0a5fd1; --on-accent: #ffffff; --on-accent-2: rgb(255 255 255 / 92%);
  --segment-on: #5b5b60; --segment-shadow: 0 1px 2px rgb(0 0 0 / 30%);
  --menu: rgb(44 44 46 / 92%); --menu-shadow: 0 0 0 .5px rgb(255 255 255 / 14%), 0 10px 32px rgb(0 0 0 / 50%);
  --scrim: rgb(0 0 0 / 50%); --code: #2a2a2c; --star: #ffb340;
  --avatar-1: #1b3352; --avatar-1-ink: #a9cbff; --avatar-2: #173b30; --avatar-2-ink: #8fe0c0;
  --avatar-3: #3d2d16; --avatar-3-ink: #ffcf8a; --avatar-4: #401b2b; --avatar-4-ink: #ffadc9;
  --avatar-5: #2d265a; --avatar-5-ink: #c8bdff; --avatar-6: #333338; --avatar-6-ink: #c9ced8;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--window);
  color: var(--label);
  font-family: var(--font);
  font-size: 13px;
  line-height: 18px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2 { font: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-radius: 6px; }
[hidden] { display: none !important; }
/* <span data-icon> only carries its icon: the svg is the flex item itself. */
span[data-icon] { display: contents; }
svg.icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- controls ---------------------------------------------------------- */
.icon-button, .text-button, .button, .tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  min-height: var(--target);
  border: 0;
  border-radius: 6px;
  background: none;
  cursor: default;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.icon-button { min-width: var(--target); padding: 0; color: var(--label-2); }
.icon-button svg.icon { width: 17px; height: 17px; }
.icon-button:hover:not(:disabled) { background: var(--hover); color: var(--label); text-decoration: none; }
.icon-button:active:not(:disabled) { background: var(--fill-2); }
.icon-button[aria-pressed="true"], .icon-button[aria-expanded="true"] { background: var(--fill-2); color: var(--accent-text); }
.icon-button:disabled { color: var(--label-3); opacity: .55; }
.icon-button[data-flash]::after {
  content: attr(data-flash);
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--menu);
  box-shadow: var(--menu-shadow);
  color: var(--label);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}
.icon-button { position: relative; }
.text-button { padding: 0 8px; color: var(--accent-text); font-size: 12px; }
.text-button:hover { background: var(--hover); }
.button { padding: 0 14px; min-height: 28px; background: var(--accent-fill); color: var(--on-accent); font-weight: 500; }
.button:hover { background: color-mix(in srgb, var(--accent-fill) 88%, #000); }
.button:disabled { opacity: .55; }
.tool-link { gap: 4px; padding: 0 8px; color: var(--label-2); font-size: 12px; }
.tool-link:hover { background: var(--hover); color: var(--label); text-decoration: none; }

/* pull-down menus (time window, sort, +) */
.menu .label { line-height: 1; }
.menu-wrap { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 172px;
  padding: 5px;
  border-radius: 10px;
  background: var(--menu);
  box-shadow: var(--menu-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
.menu button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px 0 6px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--label);
  text-align: left;
}
.menu button svg.icon { width: 13px; height: 13px; visibility: hidden; }
.menu button[aria-checked="true"] svg.icon { visibility: visible; }
.menu button:hover:not(:disabled), .menu button:focus-visible { background: var(--accent-fill); color: var(--on-accent); outline: none; }
.menu button:disabled { color: var(--label-3); }
.menu-note { margin: 4px 6px 2px; color: var(--label-2); font-size: 11px; line-height: 14px; }

/* ---- avatar: the one avatar everywhere (letter under, image over) ------ */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--avatar-size, 32px);
  height: var(--avatar-size, 32px);
  overflow: hidden;
  border-radius: calc(var(--avatar-size, 32px) * .24);
  background: var(--avatar-bg, var(--avatar-6));
  color: var(--avatar-ink, var(--avatar-6-ink));
  font-size: calc(var(--avatar-size, 32px) * .55);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.avatar.round { border-radius: 50%; }
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--window);
}
/* Lazy images keep their box (so they load) but stay invisible until loaded. */
.avatar img.pending { opacity: 0; background: transparent; }
.avatar[data-tone="1"] { --avatar-bg: var(--avatar-1); --avatar-ink: var(--avatar-1-ink); }
.avatar[data-tone="2"] { --avatar-bg: var(--avatar-2); --avatar-ink: var(--avatar-2-ink); }
.avatar[data-tone="3"] { --avatar-bg: var(--avatar-3); --avatar-ink: var(--avatar-3-ink); }
.avatar[data-tone="4"] { --avatar-bg: var(--avatar-4); --avatar-ink: var(--avatar-4-ink); }
.avatar[data-tone="5"] { --avatar-bg: var(--avatar-5); --avatar-ink: var(--avatar-5-ink); }
.avatar.xs { --avatar-size: 14px; }
.avatar.s { --avatar-size: 16px; }

/* ---- layout ------------------------------------------------------------ */
.app { display: flex; height: 100vh; height: 100dvh; min-height: 0; }
.toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  min-height: var(--bar);
  padding: 0 10px 0 14px;
}
.sources {
  display: flex;
  flex-direction: column;
  flex: 0 0 236px;
  width: 236px;
  min-height: 0;
  background: var(--sidebar);
  background: var(--sidebar-glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset -.5px 0 0 var(--separator-strong);
}
.list {
  display: flex;
  flex-direction: column;
  flex: 0 0 380px;
  width: 380px;
  min-width: 0;
  min-height: 0;
  background: var(--window);
  box-shadow: inset -.5px 0 0 var(--separator-strong);
}
.reader {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: var(--window);
}
.scrim { display: none; }

/* ---- sources: the source list ------------------------------------------ */
.sources-head { padding-left: 18px; }
.brand { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.brand-icon { flex: none; display: block; width: 20px; height: 20px; }
.brand-title { font-size: 13px; font-weight: 600; line-height: 1; }
.sources-close { display: none; }
.search {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 28px;
  margin: 0 12px 6px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--fill);
  color: var(--label-2);
}
.search svg.icon { width: 14px; height: 14px; }
.sources-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label);
  font: inherit;
  outline: none;
}
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.sources-search::placeholder { color: var(--label-2); }
/* The source filter is secondary to the tree: no fill, quieter text and
   icon until it is hovered or used. */
.source-filter { height: 26px; background: transparent; color: var(--label-3); font-size: 12px; transition: background-color .15s ease-out; }
.source-filter:hover, .source-filter:focus-within { background: var(--fill); color: var(--label-2); }
.source-filter:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.source-filter svg.icon { width: 12px; height: 12px; opacity: .8; }
.source-filter .sources-search::placeholder { color: var(--label-3); }
@media (prefers-reduced-motion: reduce) { .source-filter { transition: none; } }
.sources-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 10px 16px; overscroll-behavior: contain; }
.sources-foot { flex: none; padding: 8px 18px 12px; }
.foot-link { color: var(--label-2); font-size: 11px; }
.foot-link:hover { color: var(--label); }
.tree-empty { margin: 14px 8px; color: var(--label-2); font-size: 12px; }
.folder-line { position: relative; display: flex; align-items: center; margin-top: 2px; }
.disclosure {
  position: absolute;
  left: 0;
  z-index: 1;
  min-width: 18px;
  width: 18px;
  min-height: var(--row);
  color: var(--label-3);
}
.disclosure:hover:not(:disabled) { background: none; color: var(--label); }
.disclosure svg.icon { width: 11px; height: 11px; stroke-width: 2; transition: transform var(--fast) var(--ease); }
.disclosure[aria-expanded="true"] svg.icon { transform: rotate(90deg); }
.disclosure[aria-expanded="true"] { background: none; }
.disclosure-spacer { display: none; }
.source-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--row);
  margin-top: 2px;
  padding: 0 8px 0 20px;
  border-radius: 6px;
  color: var(--label);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.source-row.root { padding-left: 8px; margin-bottom: 8px; }
.source-row:hover { text-decoration: none; background: var(--hover); }
.source-row > svg.icon { color: var(--accent); }
.fold-inner > .source-row { padding-left: 44px; }
.source-row .name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-row .n { flex: none; color: var(--label-2); font-size: 11px; font-variant-numeric: tabular-nums; }
/* Selection: accent when the source list has focus, gray elsewhere. */
.source-row[aria-current="page"] { background: var(--unemph); }
.source-row[aria-current="page"] .n { color: var(--label); }
.app[data-focus="sources"]:not(.inactive) .source-row[aria-current="page"] { background: var(--accent-fill); color: var(--on-accent); }
.app[data-focus="sources"]:not(.inactive) .source-row[aria-current="page"] > svg.icon,
.app[data-focus="sources"]:not(.inactive) .source-row[aria-current="page"] .n { color: var(--on-accent); }
.folder-line:has(.source-row[aria-current="page"]) .disclosure { color: var(--label-2); }
.app[data-focus="sources"]:not(.inactive) .folder-line:has(.source-row[aria-current="page"]) .disclosure { color: var(--on-accent-2); }

/* disclosure body: height animates, collapsed content is inert */
.fold {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--fast) var(--ease), visibility 0s;
}
.fold.closed { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--fast) var(--ease), visibility 0s linear var(--fast); }
.fold-inner { min-height: 0; overflow: hidden; }

/* ---- list -------------------------------------------------------------- */
/* Two lines: the title with its tools, then the time window, the count and
   the catch-up count (or, while searching, the field). Everything starts on
   --gutter; --sub-h is the second line's control height, its hit area grows
   to --target without moving anything. */
.list-head { flex: none; --sub-h: 24px; }
.list-bar { min-height: 0; padding-top: 6px; padding-left: var(--gutter); }
.list-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: var(--target);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tools { display: flex; align-items: center; gap: 2px; flex: none; }
.sources-open { display: none; }
/* 收藏 has no time window, sort or grouping. */
.app[data-view="starred"] :is(.window-wrap, #group-toggle, .sort-wrap) { display: none; }
/* A search is a relevance list: no sort (grouping is disabled, not hidden). */
.app[data-search="on"][data-view="feed"] .sort-wrap { display: none; }
.tools .star-toggle[aria-pressed="true"] { background: var(--fill-2); }

.list-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: var(--sub-h);
  padding: 2px var(--gutter) 8px;
  color: var(--label-2);
  font-size: 12px;
  line-height: 16px;
}
.list-sub button { position: relative; flex: none; border: 0; background: none; cursor: default; }
.list-sub button::after { content: ""; position: absolute; inset: calc((var(--sub-h) - var(--target)) / 2) 0; }
.list-count { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* The time window: a macOS pull-down, its text on the content edge. */
.window-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: var(--sub-h);
  margin-left: -6px;
  padding: 0 5px 0 6px;
  border-radius: 6px;
  color: var(--label);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--fast) var(--ease);
}
.window-button svg.icon { width: 10px; height: 10px; stroke-width: 2; color: var(--label-2); }
.window-button:hover, .window-button[aria-expanded="true"] { background: var(--fill); }
.window-wrap { flex: none; }
.list-sub .window-menu { top: calc(100% + 4px); right: auto; bottom: auto; left: -6px; min-width: 132px; transform: none; }
/* 上次以来 N 篇新: secondary, tappable, after a middle dot. */
.catchup { display: inline-flex; align-items: center; height: var(--sub-h); padding: 0; color: var(--accent-text); white-space: nowrap; }
.catchup::before { content: "·"; margin-right: 8px; color: var(--label-3); }
.catchup:hover { text-decoration: underline; }
.list-count:empty + .catchup::before { content: none; }
/* An active query: a removable chip. */
.query-chip {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 60%;
  height: var(--sub-h);
  border-radius: calc(var(--sub-h) / 2);
  background: var(--fill-2);
  color: var(--label);
}
.query-edit { display: inline-flex; align-items: center; gap: 4px; min-width: 0; height: 100%; padding: 0 2px 0 8px; color: inherit; }
.query-edit .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-edit svg.icon { width: 12px; height: 12px; color: var(--label-2); }
.query-clear { display: inline-flex; align-items: center; justify-content: center; width: var(--sub-h); height: 100%; border-radius: 50%; color: var(--label-2); }
.query-clear svg.icon { width: 10px; height: 10px; stroke-width: 2; }
.query-clear:hover { color: var(--label); }

/* Search: the magnifier (or /) swaps the second line for the field. */
/* Same height as the line it replaces, so opening it moves nothing. */
.list-search-row { display: none; align-items: center; gap: 4px; padding: 0 10px 6px var(--gutter); }
.app.search-open .list-search-row { display: flex; }
.app.search-open .list-sub { display: none; }
.list-search { flex: 1 1 auto; min-width: 0; margin: 0; }
.search-cancel { flex: none; }
.list-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label);
  font: inherit;
  outline: none;
}
.list-search input::placeholder { color: var(--label-2); }
.list-search input::-webkit-search-cancel-button { cursor: default; }
mark {
  padding: 0 1px;
  border-radius: 3px;
  background: color-mix(in srgb, #ffcc00 42%, transparent);
  color: inherit;
}
:root[data-theme="dark"] mark { background: color-mix(in srgb, #ffd60a 34%, transparent); }
.app[data-focus="list"]:not(.inactive) .card[aria-current="true"] mark { background: rgb(255 255 255 / 26%); }
.list-empty.loading, .list-empty.unavailable { color: var(--label-2); }
.list-empty.unavailable { font-weight: 500; }
.list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: inset 0 .5px 0 var(--separator);
}
.cards { margin: 0; padding: 4px 0; list-style: none; }
/* Each row's text starts on --gutter: the li insets the rounded hover box by
   8px and the card pads 8px more. Rows sit 4px apart, a hairline between. */
.cards > li { position: relative; padding: 0 8px; }
.cards > li + li { margin-top: 4px; }
.cards > li + li::before {
  content: "";
  position: absolute;
  top: -2px;
  left: var(--gutter);
  right: var(--gutter);
  border-top: .5px solid var(--separator);
  transition: opacity var(--fast) var(--ease);
}
.cards > li:has(> .card:hover)::before, .cards > li:has(> .card:hover) + li::before,
.cards > li:has(> .card[aria-current="true"])::before, .cards > li:has(> .card[aria-current="true"]) + li::before { opacity: 0; }
.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "main thumb";
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: var(--row-pad) calc(var(--gutter) - 8px);
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: default;
  transition: background-color var(--fast) var(--ease);
}
.card:focus-visible { outline-offset: -3px; border-radius: 8px; }
.card:hover { background: var(--hover); }
.card-main { grid-area: main; display: grid; gap: 4px; min-width: 0; }
.cards { --title-lh: 19px; }
.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--label);
  font-size: 14px;
  font-weight: 600;
  line-height: var(--title-lh);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
/* Without a thumbnail the star sits at the title's trailing edge. */
.card:not(:has(> .thumb:not(.pending))) .card-title { padding-right: 24px; }
/* The excerpt opens with its source: a quiet avatar, the name, the time,
   then the summary, one paragraph clamped as a whole. */
.card-sum {
  display: -webkit-box;
  overflow: hidden;
  color: var(--label-2);
  font-size: 12px;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.card-meta { margin-right: 8px; }
.card-meta .avatar {
  margin-right: 5px;
  /* middle = the x-height's centre; lifted 1px toward the CJK centre */
  top: -1px;
  vertical-align: middle;
  opacity: .55;
  filter: grayscale(.3);
  transition: opacity var(--fast) var(--ease), filter var(--fast) var(--ease);
}
.card:hover .card-meta .avatar, .card[aria-current="true"] .card-meta .avatar { opacity: 1; filter: none; }
.card-meta .pub { font-weight: 500; }
.card-meta time { font-variant-numeric: tabular-nums; }
.card-meta .pub + time::before { content: "·"; margin: 0 4px; color: var(--label-3); }
/* A search hit on the original-language title: one quiet line. */
.card-orig {
  overflow: hidden;
  color: var(--label-2);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app[data-focus="list"]:not(.inactive) .card[aria-current="true"] .card-orig { color: var(--on-accent-2); }
.thumb {
  grid-area: thumb;
  width: 56px;
  height: 56px;
  margin-top: 2px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 0 .5px var(--separator);
}
/* Until it has loaded a thumbnail takes no room (it stays in layout, so a
   lazy image still loads). */
.thumb.pending { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }

/* Selected row: accent with inverted text while the list has focus. */
.card[aria-current="true"] { background: var(--unemph); }
.app[data-focus="list"]:not(.inactive) .card[aria-current="true"] { background: var(--accent-fill); }
.app[data-focus="list"]:not(.inactive) .card[aria-current="true"] .card-title { color: var(--on-accent); }
.app[data-focus="list"]:not(.inactive) .card[aria-current="true"] :is(.card-sum, .card-meta .pub + time::before) { color: var(--on-accent-2); }

/* The star: the row's sibling, laid over the row so it moves nothing. With
   no thumbnail it sits on the title's first line, its icon's trailing edge on
   the content edge; with one, it is a small glass disc in the thumbnail's top
   corner. Shown on hover or focus, and always once starred or on touch
   screens. The visible button is small; its hit area is 44px. */
.cards .star-toggle {
  position: absolute;
  top: calc(var(--row-pad) + (var(--title-lh) - 24px) / 2);
  right: calc(var(--gutter) - 4px);
  z-index: 1;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: 50%;
  color: var(--label-3);
  opacity: 0;
}
.cards .star-toggle::before { content: ""; position: absolute; inset: -10px; }
.cards .star-toggle svg.icon { width: 16px; height: 16px; }
.cards > li:has(> .card > .thumb:not(.pending)) .icon-button.star-toggle {
  top: calc(var(--row-pad) + 4px);
  right: calc(var(--gutter) + 2px);
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  background: var(--bar-glass);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: 0 0 0 .5px var(--separator);
  color: var(--label-2);
}
.cards > li:has(> .card > .thumb:not(.pending)) .star-toggle svg.icon { width: 13px; height: 13px; }
.cards > li:has(> .card > .thumb:not(.pending)) .icon-button.star-toggle[aria-pressed="true"] { color: var(--star); }
.icon-button.star-toggle[aria-pressed="true"], .icon-button.star-toggle[aria-pressed="true"]:hover:not(:disabled) { background: none; color: var(--star); }
.star-toggle[aria-pressed="true"] svg.icon { fill: currentColor; }
.cards > li:hover .star-toggle, .cards .star-toggle:focus-visible, .cards .star-toggle[aria-pressed="true"],
.cards > li:has(> .card[aria-current="true"]) .star-toggle { opacity: 1; }
@media (hover: none), (max-width: 720px) { .cards .star-toggle { opacity: 1; } }
.app[data-focus="list"]:not(.inactive) .cards > li:has(> .card[aria-current="true"]):not(:has(> .card > .thumb:not(.pending))) .star-toggle { color: var(--on-accent); }

.list-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--label-2);
  font-size: 11px;
}
.list-empty { padding: 48px 16px; color: var(--label-2); text-align: center; }

/* ---- groups: Reeder-style folders ----------------------------------------
   Header: avatar on the content edge, name beside it (where a row's source
   name sits), count and a trailing disclosure chevron on the right edge.
   Groups are sections: a hairline and 8px + 8px of air between them. */
.group { position: relative; }
.group + .group { margin-top: 8px; padding-top: 8px; }
.group + .group::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: .5px solid var(--separator-strong);
}
.group-title { margin: 0; position: sticky; top: 0; z-index: 2; }
.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 var(--gutter);
  border: 0;
  background: var(--bar-glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  color: var(--label);
  text-align: left;
  cursor: default;
}
.group-head:focus-visible { outline-offset: -3px; }
.group-icon { display: inline-flex; color: var(--accent); }
.group-name { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.group-count { flex: none; margin-left: auto; color: var(--label-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.group-head .chev { width: 12px; height: 12px; color: var(--label-3); stroke-width: 2; transition: transform var(--fast) var(--ease); }
.group-head[aria-expanded="true"] .chev { transform: rotate(90deg); }
.group-head:hover .chev { color: var(--label); }
.group .cards { padding-top: 0; }
.group-more {
  display: flex;
  justify-content: flex-start;
  width: calc(100% - 16px);
  min-height: 32px;
  margin: 4px 8px 8px;
  padding: 0 calc(var(--gutter) - 8px);
  font-size: 12px;
}
/* Inside a folder the header already names the source; the singles section
   keeps it, since each row there is a different source. */
.group:not(.singles) .card-meta :is(.avatar, .pub) { display: none; }
.group:not(.singles) .card-meta time::before { content: none; }

/* ---- reader ------------------------------------------------------------ */
.reader-bar { gap: 4px; padding: 0 12px; transition: box-shadow var(--fast) var(--ease); }
.reader-bar.scrolled { box-shadow: inset 0 -.5px 0 var(--separator); }
.reader-bar .back { display: none; }
.nav-pair { display: flex; gap: 0; }
.crumb {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 0 8px;
  color: var(--label);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.reader-bar.scrolled .crumb { opacity: 1; }
.reader-actions { display: flex; align-items: center; gap: 2px; }
.reader-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.reader-empty { display: grid; place-content: center; justify-items: center; gap: 10px; min-height: 70%; padding: 40px 24px; color: var(--label-2); font-size: 13px; }
.reader-empty svg.icon { width: 44px; height: 44px; stroke-width: 1; color: var(--label-3); }
.article { max-width: 680px; margin: 0 auto; padding: 28px 32px 24px; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  color: var(--label-2);
  font-size: 12px;
  line-height: 16px;
}
.article-pub { font-weight: 600; color: var(--label); }
.article-meta time::before { content: "·"; margin-right: 7px; color: var(--label-3); }
.article h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.article .original-title, .article .article-original-title { margin: 0 0 10px; color: var(--label-2); font-size: 15px; line-height: 1.45; }
.article .byline { margin: 0 0 8px; color: var(--label-2); font-size: 12px; line-height: 16px; }
.article h1 ~ .article-body, .article .byline + .article-body { margin-top: 28px; }
.summary {
  margin: 24px 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--fill);
  font-size: 15px;
  line-height: 1.65;
}
.summary b { color: var(--accent-text); font-weight: 600; }
.source { margin: 28px 0 0; padding-top: 14px; border-top: .5px solid var(--separator); color: var(--label-2); font-size: 13px; line-height: 20px; }
.article-body { overflow-wrap: break-word; font-size: 17px; line-height: 1.75; }
.article-body > p, .article-body li { font-size: 17px; line-height: 1.75; }
.article-body > p { margin: 0 0 1.15em; }
.article-body h2, .article-body h3 { margin: 2em 0 .7em; font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.article-body h4, .article-body h5, .article-body h6 { margin: 1.8em 0 .6em; font-size: 18px; font-weight: 600; line-height: 1.4; }
.article-body ul, .article-body ol { margin: 12px 0 24px; padding-left: 24px; }
.article-body li { margin-bottom: 4px; }
/* Pull quotes: a quiet rule, secondary text, the body's rhythm inside. */
.article-body blockquote { margin: 1.6em 0; padding: 2px 0 2px 18px; border-left: 3px solid color-mix(in srgb, var(--label-3) 60%, transparent); color: var(--label-2); }
.article-body blockquote p, .article-body blockquote li { font-size: 17px; line-height: 1.7; }
.article-body blockquote p { margin: 0 0 .75em; }
.article-body blockquote > :first-child { margin-top: 0; }
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body blockquote blockquote { margin: .75em 0; border-left-color: var(--separator-strong); }
.article-body code { padding: .12em .32em; border-radius: 5px; background: var(--code); font-family: var(--font-mono); font-size: .86em; }
.article-body pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1.2em;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--code);
  font-size: 13px;
  line-height: 1.6;
}
.article-body pre code { display: block; padding: 0; background: none; white-space: pre; }
.article-body .table-scroll { max-width: 100%; overflow-x: auto; margin: 24px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.article-body th, .article-body td { padding: 8px 10px; border-bottom: .5px solid var(--separator-strong); text-align: left; vertical-align: top; }
.article-body th { font-weight: 600; }
.article-body .math-block { max-width: 100%; overflow-x: auto; margin: 24px 0; text-align: center; }
.article-body img, .article-image {
  display: block;
  max-width: 100%;
  /* Portrait phone screenshots and tall crops stay compact and centred;
     landscape images at column width are well under the cap. */
  max-height: min(60vh, 480px);
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 24px auto;
  border-radius: 8px;
}
.article-body .article-figure { margin: 24px 0; }
.article-body .article-figure .article-image { margin: 0 auto; }
.article-body .article-figure figcaption { margin-top: 8px; color: var(--label-2); font-size: 13px; line-height: 1.5; }
/* The timestamp link under a YouTube key frame reads as the figure's second caption line. */
.article-body .article-figure + .article-video-link { margin: -16px 0 24px; color: var(--label-2); font-size: 13px; line-height: 1.5; }
.article-body .mermaid-diagram {
  --pele-bg: var(--window); --pele-fg: var(--label); --pele-muted: var(--label-2); --pele-line: var(--label-2);
  --pele-surface: var(--fill); --pele-surface-alt: var(--fill-2); --pele-border: var(--separator-strong);
  --pele-accent: var(--accent); --pele-critical: #d70015; --pele-font: var(--font); --pele-radius: 8px;
  width: min(100%, 760px);
  overflow-x: auto;
  margin: 32px auto;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 0 0 .5px var(--separator-strong);
  background: var(--pele-bg);
}
:root[data-theme="dark"] .article-body .mermaid-diagram { --pele-critical: #ff6961; }
.article-body .mermaid-diagram svg { display: block; width: auto; height: auto; max-width: 100%; max-height: min(50vh, 460px); margin: 0 auto; }
.article-body .x-post-card { position: relative; margin: 24px 0; padding: 12px 14px; border-radius: 10px; box-shadow: 0 0 0 .5px var(--separator-strong); }
.article-body .x-post-mark { position: absolute; top: 12px; right: 14px; color: var(--label-2); font-weight: 700; }
.article-body .x-post-author { padding-right: 32px; font-weight: 700; }
.article-body .x-post-card p { margin: 8px 0 0; }
.article-body .x-post-meta { color: var(--label-2); font-size: .85em; }
.article-body .align-center { text-align: center; }
.article-body .align-right { text-align: right; }

.next-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 64px);
  max-width: 616px;
  margin: 8px auto 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--fill);
  text-align: left;
  cursor: default;
  transition: background-color var(--fast) var(--ease);
}
.next-card:hover { background: var(--fill-2); }
.next-copy { display: grid; flex: 1 1 auto; gap: 3px; min-width: 0; }
.next-label { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--label-2); font-size: 11px; line-height: 14px; }
.next-pub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-title { overflow: hidden; color: var(--label); font-size: 14px; font-weight: 600; line-height: 19px; text-overflow: ellipsis; white-space: nowrap; }
.next-card kbd {
  flex: none;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--window);
  box-shadow: 0 0 0 .5px var(--separator-strong), 0 1px 0 var(--separator-strong);
  color: var(--label-2);
  font: 11px/20px var(--font);
  text-align: center;
}

.gate { margin-top: 24px; padding: 18px; border-radius: 12px; background: var(--fill); }
.gate h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 22px; }
.gate > p { margin: 0 0 12px; color: var(--label-2); font-size: 13px; }
.gate-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.field { display: grid; gap: 4px; color: var(--label-2); font-size: 11px; font-weight: 500; }
.field input, .submit-row input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--window);
  box-shadow: 0 0 0 .5px var(--separator-strong), inset 0 .5px 1px rgb(0 0 0 / 6%);
  color: var(--label);
  font: inherit;
  font-size: 13px;
}
.field input:focus, .submit-row input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }
.gate-status { min-height: 16px; margin: 8px 0 0; color: var(--label-2); font-size: 12px; }

.submit-dialog {
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--window);
  box-shadow: var(--menu-shadow);
  color: var(--label);
}
.submit-dialog::backdrop { background: var(--scrim); }
.submit-form { display: grid; gap: 14px; padding: 18px 18px 14px; }
.submit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.submit-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 20px; }
.submit-copy { margin: 2px 0 0; color: var(--label-2); font-size: 12px; }
.submit-row { display: flex; gap: 8px; }
.submit-status { min-height: 16px; margin: 0; color: var(--label-2); font-size: 12px; }

/* The + menu: its items carry their icon (not a check mark). */
.add-menu button svg.icon { visibility: visible; width: 14px; height: 14px; color: var(--label-2); }
.add-menu button:hover svg.icon, .add-menu button:focus-visible svg.icon { color: var(--on-accent); }

/* 推荐来源: an optional type as chips. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 12px;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover span { background: var(--fill-2); color: var(--label); }
.chip input:checked + span { background: var(--accent-fill); color: var(--on-accent); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }

/* 报告问题: preset checkboxes (several may apply), an optional note, one submit. */
.report-article { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-options { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.report-legend { padding: 0; color: var(--label-2); font-size: 11px; font-weight: 500; }
.report-list { display: grid; gap: 2px; min-width: 0; margin: 0 -8px; }
.report-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 18px;
  transition: background-color var(--fast) var(--ease);
}
.report-option:hover { background: var(--hover); }
.report-option:has(input:checked) { background: var(--unemph); }
/* A macOS square checkbox: a hairline box, the accent fill and a white tick when checked. */
.report-option input {
  flex: none;
  display: grid;
  place-content: center;
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid var(--separator-strong);
  border-radius: 3.5px;
  background: var(--window);
  box-shadow: 0 .5px 1px rgb(0 0 0 / 10%);
  appearance: none;
  -webkit-appearance: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.report-option input::after {
  content: "";
  width: 4px;
  height: 8px;
  margin-top: -2px;
  border: solid var(--on-accent);
  border-width: 0 1.75px 1.75px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--fast) var(--ease);
}
.report-option input:checked { border-color: var(--accent-fill); background: var(--accent-fill); }
.report-option input:checked::after { transform: rotate(45deg) scale(1); }
.report-option input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.report-loading { margin: 8px; color: var(--label-2); font-size: 12px; }
.report-note { position: relative; }
.report-note textarea {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: var(--window);
  box-shadow: 0 0 0 .5px var(--separator-strong), inset 0 .5px 1px rgb(0 0 0 / 6%);
  color: var(--label);
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  resize: vertical;
}
.report-note textarea:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }
.report-count { justify-self: end; color: var(--label-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.report-foot { display: flex; align-items: center; gap: 12px; }
.report-foot .submit-status { flex: 1 1 auto; }

/* ---- medium: the source list becomes a sheet ------------------------------- */
@media (max-width: 1279px) {
  .list { flex-basis: 340px; width: 340px; }
}
@media (max-width: 1023px) {
  .sources {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    width: auto;
    max-height: min(86dvh, 760px);
    border-radius: 14px 14px 0 0;
    background: var(--sidebar);
    box-shadow: 0 -0.5px 0 var(--separator-strong), 0 -10px 40px rgb(0 0 0 / 20%);
    padding-bottom: env(safe-area-inset-bottom);
    visibility: hidden;
    transform: translateY(100%);
    transition: transform .26s var(--ease), visibility 0s linear .26s;
  }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .sources { background: var(--sidebar-glass); }
  }
  .sources::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 5px;
    margin-left: -18px;
    border-radius: 3px;
    background: var(--separator-strong);
  }
  .app.sheet-open .sources { visibility: visible; transform: none; transition-delay: 0s; }
  .sources-head { padding-top: 10px; }
  .sources-close { display: inline-flex; }
  .sources-open { display: inline-flex; }
  .scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10;
    padding: 0;
    border: 0;
    background: var(--scrim);
  }
}

/* ---- narrow: one pane at a time, iOS-style bars ----------------------------- */
@media (max-width: 720px) {
  :root { --target: 44px; --row: 44px; --bar: 48px; }
  .sources-head { align-items: center; padding-top: 10px; }
  .brand-title { line-height: 18px; }
  .list, .reader { flex: 1 1 auto; width: 100%; box-shadow: none; }
  .app[data-pane="list"] .reader { display: none; }
  .app[data-pane="reader"] .list { display: none; }
  /* The tools live in the bottom bar: the header is the title, then one line. */
  .list-head { --sub-h: 32px; }
  .list-bar { min-height: 44px; padding: 4px var(--gutter) 0; }
  .list-title { font-size: 20px; line-height: 40px; }
  .list-sub { padding: 2px var(--gutter) 8px; font-size: 13px; line-height: 18px; }
  .list-search-row { padding: 0 4px 6px var(--gutter); }
  .list-head .list-search { height: 36px; margin: 0; }
  .list-search input { font-size: 16px; }
  .search-cancel { position: relative; min-height: 36px; padding: 0 12px; font-size: 15px; }
  .search-cancel::after { content: ""; position: absolute; inset: -4px 0; }
  .report-option { min-height: 44px; gap: 10px; font-size: 15px; }
  .report-option input { width: 18px; height: 18px; border-radius: 4.5px; }
  .report-option input::after { width: 5px; height: 10px; border-width: 0 2px 2px 0; }
  .report-legend { font-size: 13px; }
  .report-note textarea { font-size: 16px; }
  .report-foot .button { min-height: 44px; }
  .chip span { min-height: 44px; padding: 0 14px; border-radius: 22px; font-size: 15px; }
  .add-menu button svg.icon { width: 18px; height: 18px; }
  .tools {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 5;
    justify-content: space-around;
    padding: 2px 8px env(safe-area-inset-bottom);
    background: var(--bar-glass);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: inset 0 .5px 0 var(--separator-strong);
  }
  .tools .icon-button svg.icon { width: 21px; height: 21px; }
  .tools .icon-button { color: var(--accent-text); }
  .tools .icon-button[aria-pressed="true"], .tools .icon-button[aria-expanded="true"] { background: var(--fill); }
  .menu { top: auto; bottom: calc(100% + 8px); right: 50%; transform: translateX(50%); }
  .menu button { min-height: 44px; font-size: 15px; }
  .list-scroll { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .cards > li { padding: 0; }
  .card { padding: var(--row-pad) var(--gutter); border-radius: 0; }
  .cards { --title-lh: 20px; }
  .card-title { font-size: 15px; }
  .card-sum { font-size: 13px; line-height: 19px; }
  .group-head { min-height: 44px; }
  .group-more { width: 100%; min-height: 44px; margin: 0; padding: 0 var(--gutter); }
  .reader-bar { padding: 0 6px; }
  .reader-bar .back { display: inline-flex; }
  .reader-bar .icon-button { color: var(--accent-text); }
  .reader-bar .icon-button svg.icon { width: 20px; height: 20px; }
  .crumb { display: none; }
  .reader-actions { margin-left: auto; }
  .article { padding: 8px 20px 20px; }
  .article h1 { font-size: 24px; }
  .article-body, .article-body > p, .article-body li { font-size: 17px; }
  .next-card { width: calc(100% - 40px); }
  .sources-head { min-height: 52px; padding-left: 18px; }
  .search { height: 36px; margin: 0 16px 8px; }
  .sources-scroll { padding: 4px 12px 16px; }
  .source-row { font-size: 15px; }
  .disclosure { min-width: 28px; width: 28px; }
  .source-row { padding-left: 30px; }
  .source-row.root { padding-left: 10px; }
  .fold-inner > .source-row { padding-left: 54px; }
  .gate-form { grid-template-columns: 1fr; }
  .field input, .gate-form .button, .submit-row input, .submit-row .button { min-height: 44px; font-size: 16px; }
  .submit-row { display: grid; }
  .submit-dialog .icon-button { min-width: 44px; min-height: 44px; }
}
@media (pointer: coarse) {
  :root { --target: 44px; --row: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Link peek: a hovered article link that is (or is not yet) in the library. */
.link-peek {
  position: fixed;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(420px, calc(100vw - 16px));
  padding: 6px 6px 6px 10px;
  border-radius: 10px;
  background: var(--menu);
  box-shadow: var(--menu-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  font-size: 12px;
  line-height: 1.35;
  color: var(--label);
}
.link-peek[hidden] { display: none; }
.link-peek-label { flex: none; color: var(--label-2); }
.link-peek-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-peek-action {
  flex: none;
  min-height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.link-peek-action:disabled { background: var(--fill); color: var(--label-2); cursor: default; }
