/* Feeds on the web. Tokens follow the Mac app so the two read as one product. */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7f5;
  --bg-3: #eceae6;
  --line: #dedcd7;
  --fg: #1b1b19;
  --fg-dim: #6d6b66;
  --fg-body: #2c2b28;
  --accent: #c81e63;
  --accent-fg: #ffffff;
  --accent-soft: #fdeaf1;
  --danger: #b4243a;
  --scrim: rgba(30, 30, 28, 0.35);
  --radius: 6px;
  --reader-size: 16px;
  --reader-width: 680px;
  --row-title-weight: 700;
  --row-title-size: 14px;
  --row-pad-y: 12px;
  --row-desc-weight: 400;
  --row-desc-size: 12px;
  --row-desc-lines: 2;
  --sidebar-w: 240px;
  --list-w: 380px;
  --ui: -apple-system, BlinkMacSystemFont, "Inter", system-ui, "Segoe UI", sans-serif;
  --read: var(--ui);
  color-scheme: light dark;
}
/* Dark: by system preference unless the reader chose a theme. */
:root[data-theme="dark"] {
    --bg: #191919;
    --bg-2: #1f1f1f;
    --bg-3: #262626;
    --line: #333333;
    --fg: #e8e6e3;
    --fg-dim: #8b8b8b;
    --fg-body: #d7d5d2;
    --accent: #ff2e88;
    --accent-fg: #12060c;
    --accent-soft: #2b1220;
    --danger: #f7768e;
    --scrim: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191919;
    --bg-2: #1f1f1f;
    --bg-3: #262626;
    --line: #333333;
    --fg: #e8e6e3;
    --fg-dim: #8b8b8b;
    --fg-body: #d7d5d2;
    --accent: #ff2e88;
    --accent-fg: #12060c;
    --accent-soft: #2b1220;
    --danger: #f7768e;
    --scrim: rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
kbd {
  font: 12px var(--ui);
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--bg-2);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- app shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) var(--list-w) minmax(0, 1fr);
  height: 100dvh;
}
.sidebar, .list, .pane { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

/* ---------- sidebar ---------- */
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 16px 10px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 14px 10px; }
.brand { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.group { margin-top: 10px; }
.group-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.group-head::-webkit-details-marker { display: none; }
.group-head::before { content: "▸"; font-size: 10px; transition: transform 0.15s; }
.group[open] > .group-head::before { transform: rotate(90deg); }
.group-name { flex: 1; text-decoration: none; }
.group-name:hover, .group-name.active { color: var(--accent); }
.nav { list-style: none; margin: 0 0 8px; padding: 0; }
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius);
  text-decoration: none; color: var(--fg-dim); font-size: 14px;
}
.nav-item:hover { background: var(--bg-3); color: var(--fg); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item.failing .nav-title { text-decoration: line-through; text-decoration-color: var(--danger); }
.nav-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item > span:first-child { flex: 1; }
.count { font-size: 12px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.nav-item.active .count { color: var(--accent); }
.nav-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 10px 6px; font-size: 12px; font-weight: 600; color: var(--fg-dim);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.nav-add {
  text-decoration: none; font-size: 18px; line-height: 1; width: 24px; height: 24px;
  display: grid; place-items: center; border-radius: 50%; color: var(--accent);
}
.nav-add:hover { background: var(--accent-soft); }
.feeds { flex: 1; }
.sidebar-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 10px 0; font-size: 13px; color: var(--fg-dim); border-top: 1px solid var(--line); }
.sidebar-foot a { text-decoration: none; }
.sidebar-foot a:hover { color: var(--fg); }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg-dim); font-size: 13px; }
.link-button:hover { color: var(--fg); }

/* ---------- list ---------- */
.list { border-right: 1px solid var(--line); }
.list-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.list-head h1 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-button { display: none; }
.inline { display: inline; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.row-link:focus { outline: none; }
.row:has(.row-link:focus-visible) { box-shadow: inset 0 0 0 2px var(--accent); }
.row-link {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px;
  padding: var(--row-pad-y) 16px; text-decoration: none; color: var(--fg-dim);
}
@media (hover: hover) { .row:hover { background: var(--bg-2); } }
.row[aria-current="true"] { background: var(--accent-soft); }
.row[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.row-meta { display: flex; gap: 8px; font-size: 12px; }
.row-feed { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { flex: none; margin-left: auto; font-variant-numeric: tabular-nums; }
.row-saved { color: var(--accent); font-size: 9px; line-height: 18px; }
.row-title { font-size: var(--row-title-size); font-weight: var(--row-title-weight); color: var(--fg); line-height: 1.35; }
.row:not(.unread) .row-title { color: var(--fg-dim); }
.row-desc {
  font-size: var(--row-desc-size); font-weight: var(--row-desc-weight);
  display: -webkit-box; -webkit-line-clamp: var(--row-desc-lines); -webkit-box-orient: vertical; overflow: hidden;
}
[data-excerpt="0"] .row-desc, [data-images="0"] .row-thumb, [data-reading-time="0"] .reading-time { display: none; }
.row-thumb { flex: none; width: 64px; height: 64px; object-fit: cover; border-radius: 4px; margin: var(--row-pad-y) 16px var(--row-pad-y) 0; background: var(--bg-3); }
.more { display: block; padding: 16px; text-align: center; color: var(--fg-dim); font-size: 14px; }
.empty, .pane-empty { padding: 48px 24px; text-align: center; color: var(--fg-dim); margin: 0; }
.feed-problem { margin: 0; padding: 10px 16px; font-size: 13px; color: var(--danger); background: var(--bg-2); border-bottom: 1px solid var(--line); }

/* ---------- reader ---------- */
.pane { background: var(--bg); }
.reader-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.back { display: none; text-decoration: none; color: var(--accent); font-weight: 600; }
.actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.actions form { display: inline; }
.action {
  border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: var(--radius);
  padding: 5px 11px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.4;
}
.action:hover { border-color: var(--accent); color: var(--accent); }
.action.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.action.quiet { color: var(--fg-dim); }
.reader { max-width: var(--reader-width); margin: 0 auto; padding: 36px 24px 96px; }
.kicker { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.kicker a { text-decoration: none; }
.reader h1 { margin: 0 0 10px; font: 700 calc(var(--reader-size) * 1.75)/1.2 var(--read); letter-spacing: -0.01em; color: var(--fg); text-wrap: balance; }
.reader h1 a { text-decoration: none; }
@media (hover: hover) { .reader h1 a:hover { text-decoration: underline; text-decoration-thickness: 1px; } }
.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 28px; font-size: 13px; color: var(--fg-dim); }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 28px; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reader-body { font: var(--reader-size)/1.7 var(--read); color: var(--fg-body); overflow-wrap: break-word; }
.reader-body p { text-wrap: pretty; }
.reader-body p, .reader-body ul, .reader-body ol, .reader-body pre, .reader-body blockquote, .reader-body figure, .reader-body table { margin: 0 0 1.1em; }
.reader-body h1, .reader-body h2, .reader-body h3, .reader-body h4 { margin: 1.6em 0 0.5em; line-height: 1.3; color: var(--fg); font-size: 1.15em; }
.reader-body h1, .reader-body h2 { font-size: 1.3em; }
.reader-body a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.reader-body img { max-width: 100%; height: auto; border-radius: 4px; }
.reader-body figure { margin-left: 0; margin-right: 0; }
.reader-body figcaption { font: 13px/1.5 var(--ui); color: var(--fg-dim); margin-top: 6px; }
.reader-body blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--line); color: var(--fg-dim); }
.reader-body pre { font-size: 14px; background: var(--bg-2); padding: 12px 14px; border-radius: var(--radius); overflow-x: auto; }
.reader-body code { font-size: 0.88em; }
.reader-body table { display: block; overflow-x: auto; border-collapse: collapse; font: 14px/1.5 var(--ui); }
.reader-body td, .reader-body th { border: 1px solid var(--line); padding: 6px 10px; }
.reader-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.reader-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.reader-foot a { color: var(--accent); }

/* ---------- buttons and forms ---------- */
.button, .small-button {
  display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  border-radius: var(--radius); padding: 8px 16px; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.3;
}
.button.quiet, .small-button { background: var(--bg); color: var(--fg); border-color: var(--line); font-weight: 500; }
.small-button { padding: 4px 10px; font-size: 13px; }
.small-button:hover, .button.quiet:hover { border-color: var(--accent); color: var(--accent); }
.small-button.danger:hover { border-color: var(--danger); color: var(--danger); }
.icon-button { border: 0; background: none; font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; color: var(--fg); }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack label { font-size: 13px; font-weight: 600; color: var(--fg-dim); margin-top: 8px; }
.stack input[type="email"], .stack input[type="password"], .stack input[type="url"], .stack input[type="text"] {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: 16px;
}
.stack .button { margin-top: 14px; align-self: flex-start; }
.errors { color: var(--danger); margin: 0; padding-left: 18px; font-size: 14px; }

/* ---------- standalone pages ---------- */
.page { max-width: 820px; margin: 0 auto; padding: 24px 20px 80px; }
.page.narrow { max-width: 480px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head h1 { margin: 0; flex: 1; font-size: 24px; }
.back-link { width: 100%; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.manage { list-style: none; margin: 0; padding: 0; }
.manage-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rename { display: flex; gap: 6px; }
.rename input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: var(--radius); background: transparent; font-weight: 600; }
.rename input:hover, .rename input:focus { border-color: var(--line); background: var(--bg); }
.manage-url, .manage-status { grid-column: 1; margin: 0 8px; font-size: 13px; color: var(--fg-dim); overflow-wrap: anywhere; }
.manage-row.failing .manage-status { color: var(--danger); }
.manage-row form.button_to { grid-column: 2; grid-row: 1; }
.auth { max-width: 360px; margin: 0 auto; padding: 18vh 20px 40px; }
.auth .brand { padding: 0 0 8px; font-size: 28px; }
.auth-alt { font-size: 14px; color: var(--fg-dim); margin-top: 24px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 8px;
  background: var(--fg); color: var(--bg); font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s;
}
.toast-alert { background: var(--danger); color: #fff; }
.toast.hiding { opacity: 0; }
.scrim { display: none; }

/* ---------- narrower screens ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: var(--list-w) minmax(0, 1fr); }
  .menu-button { display: block; }
  .sidebar {
    position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(300px, 85vw);
    transform: translateX(-100%); transition: transform 0.2s ease, visibility 0.2s; visibility: hidden;
  }
  .app[data-menu-open] .sidebar { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, 0.2); }
  .app[data-menu-open] .scrim { display: block; position: fixed; inset: 0; z-index: 15; background: var(--scrim); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .list { border-right: 0; }
  .pane { display: none; }
  .app[data-reader-reading-value="true"] .list { display: none; }
  .app[data-reader-reading-value="true"] .pane { display: block; }
  .back { display: inline; }
  .reader { padding: 24px 18px 80px; }
  .reader h1 { font-size: 26px; }
  .reader-bar { padding: 10px 14px; }
  .actions .quiet[data-reader-target="unread"] { display: none; }
  .row-thumb { width: 56px; height: 56px; }
  .list-head { padding-top: calc(12px + env(safe-area-inset-top)); }
}

/* ---------- settings ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.settings-page { min-height: 100dvh; display: grid; place-items: start center; padding: 6vh 16px 40px; background: var(--bg-2); }
.settings-sheet { width: min(860px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.12); overflow: hidden; }
.settings-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 10px; }
.settings-head h1 { margin: 0; font-size: 22px; }
.settings-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); min-height: 460px; }
.settings-tabs { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 24px; border-right: 1px solid var(--line); }
.settings-tab { padding: 8px 12px; border-radius: var(--radius); text-decoration: none; color: var(--fg-dim); font-size: 15px; }
.settings-tab:hover { color: var(--fg); background: var(--bg-2); }
.settings-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.settings-panel { padding: 8px 28px 28px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setting:last-child { border-bottom: 0; }
.setting-text { display: flex; flex-direction: column; gap: 2px; }
.setting-label { font-size: 15px; }
.setting-hint { font-size: 13px; color: var(--fg-dim); }
.setting-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segment { position: relative; cursor: pointer; }
.segment input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.segment span { display: block; padding: 6px 14px; font-size: 14px; color: var(--fg-dim); border-left: 1px solid var(--line); }
.segment:first-child span { border-left: 0; }
.segment input:checked + span { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
.segmented:has(.swatch) { border: 0; gap: 8px; overflow: visible; }
.swatch span { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent !important; }
.swatch input:checked + span { outline: 2px solid var(--fg); outline-offset: 2px; background: inherit; }
.swatch-magenta span { background: #c81e63 !important; } .swatch-blue span { background: #2f6fb5 !important; }
.swatch-green span { background: #1f7a4d !important; } .swatch-orange span { background: #b1500a !important; }
.swatch-purple span { background: #6b3fbb !important; } .swatch-ink span { background: #333 !important; }
.shortcuts { margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 24px; }
.shortcuts div { display: flex; gap: 12px; align-items: baseline; }
.shortcuts dt { flex: none; min-width: 56px; }
.shortcuts dd { margin: 0; color: var(--fg-dim); font-size: 14px; }
@media (max-width: 760px) {
  .settings-page { padding: 0; }
  .settings-sheet { border-radius: 0; border: 0; min-height: 100dvh; }
  .settings-body { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px 12px 10px; }
  .settings-tab { white-space: nowrap; }
  .settings-panel { padding: 4px 18px 40px; }
}

/* ---------- filter bar and search ---------- */
.filterbar { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chips { display: flex; gap: 4px; }
.chip { padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--fg-dim); }
.chip:hover { color: var(--fg); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.list-count { margin-left: auto; font-size: 13px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.sort select { border: 0; background: transparent; font: 13px var(--ui); color: var(--fg-dim); cursor: pointer; }
.search { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.search input { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); font-size: 14px; }
.search input:focus { background: var(--bg); }
.toast-undo { margin-left: 10px; background: none; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- action bar ---------- */
.action-bar { width: min(620px, calc(100vw - 32px)); max-height: min(520px, 70vh); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); box-shadow: 0 24px 80px rgba(0,0,0,.28); overflow: hidden; }
.action-bar[open] { display: flex; flex-direction: column; }
.action-bar::backdrop { background: var(--scrim); }
.action-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.action-mark { color: var(--fg-dim); font-size: 17px; }
.action-field input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; }
.action-bar ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.command { display: flex; align-items: center; gap: 10px; border-radius: 8px; }
.command form { display: contents; }
.command-target { flex: 1; text-align: left; padding: 9px 12px; border: 0; background: none; font: 15px var(--ui); color: inherit; text-decoration: none; cursor: pointer; }
.command-hint { margin-right: 10px; }
.command[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.command[aria-selected="true"] kbd { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.command.none { justify-content: center; padding: 14px; color: var(--fg-dim); }
.action-bar template { display: none; }
.full-note { font-size: 13px; color: var(--fg-dim); margin-top: 1em; }
.full-note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: 0.25; } to { opacity: 1; } }

/* ---------- tags and notes ---------- */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: -14px 0 22px; padding: 0; }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 4px 2px 10px; }
.tag a { text-decoration: none; }
.tag form { display: inline; }
.tag-remove { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 4px; opacity: 0.6; }
.tag-remove:hover { opacity: 1; }
.note { margin: -8px 0 26px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; }
.note.empty { display: none; }
.note-label { display: block; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.note-text { width: 100%; border: 0; background: transparent; resize: vertical; font: 15px/1.6 var(--ui); color: var(--fg); padding: 0; }
.note-text:focus { outline: none; }
.note-status { font-size: 12px; color: var(--fg-dim); }
.note-page { padding-top: 24px; }
.note-full { min-height: 60vh; font-size: 17px; }

/* ---------- feed menu ---------- */
.menu { position: fixed; z-index: 40; left: var(--x); top: var(--y); min-width: 210px; padding: 5px; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 12px 40px rgba(0,0,0,.2); font-size: 14px; }
.menu form { display: block; margin: 0; }
.menu-item { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; border-radius: 5px; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--accent); color: var(--accent-fg); outline: none; }
.menu-item.indent { padding-left: 24px; position: relative; }
.menu-item.checked::before { content: "✓"; position: absolute; left: 8px; }
.menu-item.danger:hover { background: var(--danger); color: #fff; }
.menu-label { padding: 6px 10px 2px; font-size: 12px; color: var(--fg-dim); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.pinned { margin: 8px 0 0; }
.row-chip { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--bg-3); color: var(--fg-dim); }
.feed-problem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-problem p { margin: 0; flex: 1 1 100%; }

/* ---------- packs, stats, public pages ---------- */
.public { background: var(--bg-2); min-height: 100dvh; }
.public-head { padding: 18px 24px; }
.public-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.public-brand img { border-radius: 6px; }
.pack-page { max-width: 560px; margin: 4vh auto 60px; padding: 32px 28px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.pack-emoji { font-size: 56px; line-height: 1; }
.pack-page h1 { margin: 12px 0 4px; font-size: 28px; }
.pack-curator { margin: 0; color: var(--fg-dim); font-size: 14px; }
.pack-description { margin: 16px 0 0; font-size: 16px; color: var(--fg-body); white-space: pre-line; }
.pack-feeds { list-style: none; margin: 24px 0; padding: 0; text-align: left; border-top: 1px solid var(--line); }
.pack-feeds li { display: flex; align-items: baseline; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pack-feed-title { font-weight: 600; flex: 1; }
.pack-feed-site { font-size: 13px; color: var(--fg-dim); }
.pack-name-row { display: flex; gap: 10px; }
.pack-name-row .grow { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pack-emoji-field { width: 76px; display: flex; flex-direction: column; gap: 8px; }
.pack-emoji-field input { text-align: center; font-size: 20px; }
.stack textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font: 15px/1.5 var(--ui); }
.pack-pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 12px; margin-top: 12px; max-height: 320px; overflow-y: auto; }
.pack-pick legend { font-size: 13px; font-weight: 600; color: var(--fg-dim); padding: 0 4px; }
.pick { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 15px; font-weight: 400 !important; color: var(--fg) !important; margin: 0 !important; }
.pack-line { margin: 0; grid-column: 1 / -1; }
.pack-emoji-small { font-size: 18px; }
.stats-heading { font-size: 17px; margin: 8px 0 4px; }
.busiest { list-style: none; margin: 16px 0; padding: 0; }
.busiest li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.busiest-name a { text-decoration: none; font-weight: 600; }
.busiest-count { font-size: 13px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.busiest-bar { grid-column: 1 / -1; width: 100%; height: 6px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.plans form { display: contents; }
.plan { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; font: inherit; color: var(--fg); }
.plan:hover { border-color: var(--accent); }
.plan-price { font-size: 30px; font-weight: 800; }
.plan-term { color: var(--fg-dim); font-size: 14px; }
.nav-item.paused { opacity: 0.45; }
.plan-note { display: block; margin: 12px 10px 0; padding: 8px 10px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); font-size: 13px; text-decoration: none; }
.count:empty { display: none; }

/* ---------- a cleared Inbox ---------- */
/* Full-bleed photograph with the words on their own scrim: a caption readable
   over a bright sky is unreadable over a dark one, and there is no knowing which
   photograph today is. */
.pane { position: relative; }
.pane > turbo-frame#reader:has(.cleared) { display: block; position: absolute; inset: 0; }
.cleared { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; text-align: center; color: var(--fg-dim); }
.cleared-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.cleared-copy { position: relative; z-index: 1; padding: 24px; }
.cleared-line { font-size: 20px; font-weight: 500; margin: 0; color: var(--fg); }
.cleared-sub { font-size: 13px; margin: 6px 0 0; color: var(--fg-dim); }
.cleared.has-photo .cleared-copy { border-radius: 12px; padding: 18px 26px; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(2px); }
.cleared.has-photo .cleared-line, .cleared.has-photo .cleared-sub { color: #fff; }
.cleared.has-photo .cleared-sub { opacity: 0.85; }
.cleared-credit { position: absolute; right: 12px; bottom: 10px; z-index: 1; margin: 0; font-size: 11px; color: #fff; opacity: 0.55; }
/* On a phone the list is the screen, so the photograph fills it there instead. */
.cleared-in-list { display: none; }
@media (max-width: 760px) {
  .cleared-in-list { display: block; position: relative; height: calc(100dvh - 160px); }
}
@media print { .cleared, .cleared-in-list { display: none !important; } }
