/* Inter v4.1, sourced from https://github.com/rsms/inter under SIL OFL 1.1. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}

:root {
  --black: #000000;
  --white: #ffffff;
  --surface-soft: #e3e1e3;
  --surface-muted: var(--hairline-soft);
  --hairline: #d9d9d9;
  --hairline-soft: rgba(0, 0, 0, 0.12);
  --soft-pink: #fe8282;
  --soft-blue: #c6f4ff;
  --yellow: #fafb66;
  --green: #24cb71;
  --blue: #01b6ff;
  --orange: #ff7238;
  --lime: var(--yellow);
  --lilac: var(--blue);
  --cream: var(--yellow);
  --pink: var(--orange);
  --mint: var(--green);
  --coral: var(--orange);
  --navy: var(--black);
  --magenta: var(--orange);
  --success: var(--green);
  --danger: var(--orange);
  --text-muted: rgba(0, 0, 0, 0.58);
  --text-disabled: rgba(0, 0, 0, 0.42);
  --text: var(--black);
  --accent: var(--blue);
  --border-interactive: rgba(0, 0, 0, 0.48);
  --focus-ring: var(--blue);
  --type-label: 12px;
  --type-meta: 14px;
  --type-body: 16px;
  --page-action-height: 44px;
  --page-action-font-size: var(--type-meta);
  --page-action-font-weight: 500;
  --page-action-line-height: 20px;
  --type-title: 18px;
  --type-heading: 24px;
  --icon-inline: 18px;
  --icon-touch: 44px;
  --motion-fast: 160ms;
  --topbar-height: calc(80px + env(safe-area-inset-top));
  --radius-control: 8px;
  --radius-card: 24px;
  --radius-surface: 32px;
  --radius-pill: 10000px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 48px;
  --today-module-inset-x: 24px;
  --today-module-inset-y: 24px;
  --today-module-gap: 40px;
  --library-pane-inset-x: 48px;
  --content-filter-rail-width: 180px;
  --content-filter-rail-offset: var(--library-pane-inset-x);
  --content-filter-rail-anchor: 0.5;
  --page-heading-inset-x: 20px;
  --page-heading-content-offset: 52px;
  --home-page-inset-x: 40px;
  --home-page-section-gap: 40px;
  --library-list-inset-y: 12px;
  --library-list-row-gap: 8px;
  --library-list-row-padding-x: 16px;
  --library-list-row-padding-y: 12px;
  --topic-on-gradient-muted: #d9d9d9;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", Menlo, "PingFang SC", monospace;
  --reading: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.07);
  --shadow-fab: 0 8px 24px rgba(0, 0, 0, 0.16);
  --matter-card-aspect: 272 / 360;
  --matter-card-radius: 16px;
  --matter-card-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  --matter-card-shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.08);
  --matter-card-hover-scale: 0.95;
  --matter-card-motion: transform 0.2s ease;
  --carousel-gap: 24px;
  --carousel-control-size: 40px;
  --masonry-shell-bg: #CBBCF8;
  --masonry-card-bg: #000000;
}

html[data-appearance="dark"] {
  color-scheme: dark;
  --masonry-shell-bg: #1f2023;
  --app-bg: #1f2023;
  --app-fg: #f4f4f5;
  --app-hairline: rgba(255, 255, 255, 0.12);
  --app-surface-soft: rgba(255, 255, 255, 0.08);
  --app-text-muted: rgba(255, 255, 255, 0.58);
  --hairline: var(--app-hairline);
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --surface-soft: var(--app-surface-soft);
  --text-muted: var(--app-text-muted);
}

html[data-appearance="dark"] body,
html[data-appearance="dark"] html {
  background: var(--app-bg);
  color: var(--app-fg);
}

html[data-appearance="dark"] .topbar {
  background: var(--app-bg);
  color: var(--app-fg);
  border-color: var(--app-hairline);
}

html[data-appearance="dark"] .sidebar {
  background: var(--app-bg);
  color: var(--app-fg);
  border-color: var(--app-hairline);
}

html[data-appearance="dark"] .sidebar-rule {
  background: var(--app-hairline);
}

html[data-appearance="dark"] .side-nav-item {
  color: var(--app-fg);
}

html[data-appearance="dark"] .sidebar-utility-button {
  background: var(--app-surface-soft);
  color: var(--app-fg);
}

html[data-appearance="dark"] .main-content {
  background: var(--app-bg);
  color: var(--app-fg);
}

html[data-appearance="dark"] .search-agent-page--conversation.main-content {
  background: var(--app-bg);
}

html[data-appearance="dark"] .search-agent-composer-wrap {
  background: var(--app-bg);
}

html[data-appearance="dark"] .search-agent-scroll-fade--top {
  box-shadow: inset 0 18px 14px -14px rgba(31, 32, 35, 0.96);
}

html[data-appearance="dark"] .search-agent-scroll-fade--bottom {
  box-shadow: inset 0 -18px 14px -14px rgba(31, 32, 35, 0.96);
}

html[data-appearance="dark"] .search-agent-activity-panel {
  background: rgba(255, 255, 255, 0.04);
}

html[data-appearance="dark"] :is(
  .library-search-field,
  .matter-control-select,
  .filter-more-trigger
) {
  color: var(--black);
}

html[data-appearance="dark"] .library-search-field input {
  color: var(--black);
}

html[data-appearance="dark"] .library-search-field input::placeholder {
  color: rgba(0, 0, 0, 0.58);
}

html[data-appearance="dark"] :is(.highlight-tag-pill, .filter-chip) {
  color: var(--black);
}

html[data-appearance="dark"] .line-sidebar__label {
  color: var(--app-fg);
}

html[data-appearance="dark"] .popover {
  color: var(--black);
}

html[data-appearance="dark"] .popover-header h2,
html[data-appearance="dark"] .popover .close-button,
html[data-appearance="dark"] .popover .filter-field > span,
html[data-appearance="dark"] .popover .date-range-fields > span,
html[data-appearance="dark"] .popover .text-button {
  color: var(--black);
}

html[data-appearance="dark"] .popover .close-button {
  background: var(--surface-soft);
}

html[data-appearance="dark"] .highlight-row-action {
  color: var(--app-fg);
}

html[data-appearance="dark"] .highlight-row-action:hover:not(:disabled),
html[data-appearance="dark"] .highlight-row-action:focus-visible:not(:disabled),
html[data-appearance="dark"] .highlight-row-action.is-active {
  background: rgba(255, 255, 255, 0.12);
}

html[data-appearance="dark"] button:focus-visible,
html[data-appearance="dark"] input:focus-visible,
html[data-appearance="dark"] select:focus-visible,
html[data-appearance="dark"] a:focus-visible {
  outline-color: var(--blue);
}

html[data-appearance="dark"] :is(
  .page-footer,
  .list-heading,
  .search-page .toolbar-area,
  .settings-page .inbox-masthead,
  .sources-page .inbox-masthead,
  .sources-page .source-list > .section-heading,
  .settings-section-heading
) {
  border-color: var(--app-hairline);
}

* { box-sizing: border-box; }

html { background: var(--white); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  font-synthesis: none;
  font-feature-settings: "kern", "liga", "clig", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.has-modal-sheet { overflow: hidden; }

button, input, select { font: inherit; color: inherit; }
button, input, select, a { touch-action: manipulation; }
button { border: 0; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }
a { color: inherit; }

.skip-link { position: fixed; z-index: 100; top: max(8px, env(safe-area-inset-top)); left: 16px; padding: 10px 16px; transform: translateY(-150%); background: var(--black); color: var(--white); border-radius: var(--radius-pill); text-decoration: none; transition: transform var(--motion-fast) ease; }
.skip-link:focus { transform: translateY(0); }

.icon { display: inline-block; width: var(--icon-inline); height: var(--icon-inline); flex: 0 0 auto; vertical-align: middle; shape-rendering: geometricPrecision; }
.icon-asset { background-color: currentColor; -webkit-mask-image: var(--icon-asset); mask-image: var(--icon-asset); -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; }
[data-item-action="toggle-star"]:not(:disabled):active .icon[data-icon="frame"] { --icon-asset: url('/icons/figma/bold-frame.svg'); }
.channel-icon, .story-fact-icon, .text-button-icon { width: 14px; height: 14px; }
.back-icon { width: 18px; height: 18px; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.3;
  text-transform: uppercase;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: env(safe-area-inset-top) 32px 0;
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
}

.topbar-today {
  position: sticky;
  padding-left: 264px;
  border-bottom: 0;
}
.topbar-today::before, .topbar-today::after { position: absolute; content: ""; pointer-events: none; }
.topbar-today::before { top: 0; bottom: 0; left: 232px; width: 1px; background: var(--hairline); }
.topbar-today::after { right: 0; bottom: 0; left: 232px; height: 1px; background: var(--hairline); }
.topbar-today .brand-cluster { display: none; }
.topbar-today { align-items: center; }
.topbar-today { justify-content: flex-end; }
.locale-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 36px;
  padding: 8px 14px;
  margin-left: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.locale-toggle:hover,
.locale-toggle:focus-visible { border-color: var(--black); background: var(--black); color: var(--white); outline: none; }

.brand-cluster { display: flex; align-items: center; flex: 0 0 248px; min-width: 248px; }
.brand { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 0; background: transparent; text-align: left; }
.brand-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; overflow: hidden; background: var(--black); border-radius: 12px; }
.brand-mark::before { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; background: var(--lime); border-radius: 8px; content: ""; }
.brand-mark span { position: relative; z-index: 1; display: block; color: var(--white); font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: -0.08em; line-height: 1; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.brand-copy strong { overflow: hidden; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy span { overflow: hidden; font-family: var(--sans); font-size: 10px; font-weight: 500; letter-spacing: 0.065em; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }

.top-tabs { display: flex; align-items: center; gap: 4px; }
.top-tab { min-height: 44px; padding: 8px 16px; background: transparent; border-radius: var(--radius-pill); font-size: var(--type-meta); font-weight: 500; }
.top-tab.is-active { background: var(--black); color: var(--white); }
.top-tab.is-active .tab-dot { display: inline-block; width: 6px; height: 6px; margin-left: 4px; background: var(--lime); border-radius: 50%; vertical-align: middle; }
.top-tab.is-disabled { color: var(--text-muted); opacity: 1; }

.top-actions { position: relative; display: flex; align-items: center; gap: 12px; margin-left: auto; }
.top-action-wrap { position: relative; }
.icon-button, .avatar-button { display: inline-flex; align-items: center; justify-content: center; width: var(--icon-touch); height: var(--icon-touch); background: var(--surface-soft); border-radius: var(--radius-pill); font-size: 20px; line-height: 1; }
.icon-button:hover:not(:disabled), .avatar-button:hover { background: var(--black); color: var(--white); }
.notification-button { position: relative; }
.notification-dot { position: absolute; right: 6px; top: 6px; width: 8px; height: 8px; background: var(--magenta); border: 1px solid var(--surface-soft); border-radius: 50%; }
.avatar-button { gap: 2px; width: 44px; background: var(--black); color: var(--white); font-family: var(--mono); font-size: 14px; }
.avatar-button span { font-family: var(--sans); font-size: 12px; }
.mobile-menu-button { display: none; margin-right: 16px; background: transparent; }

.workspace { display: grid; grid-template-columns: 76px minmax(0, 1fr); min-height: calc(100vh - var(--topbar-height)); --sidebar-width: 76px; }
.workspace:has(.sidebar:not(.is-collapsed)) { grid-template-columns: 232px minmax(0, 1fr); --sidebar-width: 232px; }
.sidebar { position: sticky; top: 0; z-index: 46; display: flex; width: 76px; height: 100vh; min-height: 0; margin-top: calc(var(--topbar-height) * -1); flex-direction: column; overflow: visible; overscroll-behavior: contain; padding: 28px 14px 20px; border-right: 1px solid var(--hairline); background: var(--white); transition: width 180ms ease; }
.sidebar.is-collapsed:hover { box-shadow: none; }
.sidebar:not(.is-collapsed) { width: 232px; padding-right: 24px; padding-left: 24px; }
.sidebar-brand { display: flex; align-items: center; min-height: 44px; margin: 0 12px 44px; }
.sidebar-brand .brand { position: relative; width: 100%; }
.sidebar-brand-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) 44px; align-items: center; gap: 10px; width: 100%; }
.brand-expand-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 0; padding: 0; background: transparent; border: 0; }
.brand-expand-button .brand-mark { position: absolute; top: 50%; left: 50%; box-sizing: border-box; flex: none; width: 32px; height: 32px; border-radius: 8px; transform: translate(-50%, -50%); transition: width 180ms ease, height 180ms ease, min-height 180ms ease, border-radius 180ms ease, background 180ms ease; }
.brand-mark-static { display: inline-flex; width: 32px; height: 32px; border-radius: 8px; }
.brand-toggle-icon { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: var(--black); pointer-events: none; }
.brand-toggle-icon .icon { flex-shrink: 0; }
.brand-expand-button:hover .brand-mark-logo,
.brand-expand-button:focus-visible .brand-mark-logo { display: none; }
.brand-expand-button:hover .brand-toggle-icon,
.brand-expand-button:focus-visible .brand-toggle-icon { display: inline-flex; }
.brand-expand-button:hover .brand-mark,
.brand-expand-button:focus-visible .brand-mark { width: 44px; height: 28px; min-height: 28px; border-radius: 999px; background: var(--surface-soft); color: var(--black); }
.sidebar-collapse-button { position: relative; flex-shrink: 0; width: 44px; height: 28px; min-height: 28px; border-radius: 999px; }
.sidebar-collapse-button .icon,
.brand-toggle-icon .icon { width: 20px; height: 20px; }
.sidebar-brand .brand-mark-static { width: 32px; height: 32px; border-radius: 8px; }
.sidebar-brand .brand-mark span { font-size: 8px; }
.sidebar-brand .brand-copy strong { font-size: 14px; }
.sidebar:not(.is-collapsed) .sidebar-brand .brand-copy span { display: none; }
.sidebar-topline, .sidebar-heading, .list-heading, .page-footer, .story-footer, .reader-heading { display: flex; align-items: center; justify-content: space-between; }
.sidebar-topline { padding: 0 12px 22px; }
.sidebar-date { font-family: var(--mono); font-size: var(--type-label); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.sidebar-section { display: grid; gap: 4px; }
.sidebar-rule { height: 1px; margin: 24px 12px; background: var(--hairline); }
.sidebar-heading { padding: 0 12px 8px; font-family: var(--mono); font-size: var(--type-label); letter-spacing: 0.1em; }
.sidebar-heading > span:last-child { opacity: 0.55; }
.side-nav-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; background: transparent; border-radius: var(--radius-pill); font-size: var(--type-meta); font-weight: 500; letter-spacing: 0; text-align: left; }
.sidebar.is-collapsed .brand-copy { display: none; }
.sidebar.is-collapsed .brand-copy,
.sidebar.is-collapsed .side-nav-item > span:not(.nav-glyph):not(.tool-tooltip),
.sidebar.is-collapsed .sidebar-toggle-label { opacity: 0; visibility: hidden; pointer-events: none; }
.sidebar.is-collapsed .sidebar-brand { justify-content: center; margin-right: 0; margin-left: 0; }
.sidebar.is-collapsed .sidebar-section { gap: 8px; }
.sidebar.is-collapsed .side-nav-item { grid-template-columns: 1fr; justify-self: center; justify-items: center; width: 44px; min-width: 44px; height: 28px; min-height: 28px; padding: 0; border-radius: 14px; }
.sidebar.is-collapsed .side-nav-item > span:not(.nav-glyph):not(.tool-tooltip) { display: none; }
.sidebar.is-collapsed .sidebar-rule { margin-right: 8px; margin-left: 8px; }
.sidebar.is-collapsed .sidebar-brand { justify-content: center; margin-right: 0; margin-left: 0; }
.sidebar.is-collapsed .brand-mark-logo { display: inline-flex; }
.brand-mark-logo { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; color: var(--white); font-family: var(--mono); font-size: 8px; font-weight: 600; letter-spacing: -0.08em; line-height: 1; }
.sidebar:not(.is-collapsed) .brand-mark-static { background: var(--surface-soft); color: var(--black); }
.sidebar:not(.is-collapsed) .brand-mark-static .brand-mark-logo { color: var(--black); }
.side-nav-item.role-nav { border-radius: 0; }
.side-nav-item:hover:not(.is-disabled):not(.is-selected):not(.is-selected-soft) { background: var(--surface-soft); }
.side-nav-item.is-selected { background: var(--black); color: var(--white); }
.side-nav-item.is-selected-soft { background: var(--black); color: var(--white); box-shadow: none; font-weight: 600; }
.side-nav-item.is-selected-soft:hover { background: var(--black); }
.side-nav-item.role-nav.is-selected-soft .role-dot { width: 8px; height: 8px; margin-left: 6px; }
.side-nav-item.is-disabled { color: var(--text-disabled); cursor: not-allowed; opacity: 1; }
.side-nav-item strong { font-family: var(--mono); font-size: var(--type-label); font-weight: 400; }
.nav-glyph { display: inline-flex; align-items: center; justify-content: center; width: 18px; }
.nav-glyph .icon { width: 18px; height: 18px; }
.nav-glyph.role-dot { width: 6px; height: 6px; margin-left: 6px; background: currentColor; border-radius: 50%; }
.sidebar-utility-wrap { position: relative; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--hairline); }
.sidebar-utilities { display: flex; align-items: center; gap: 8px; }
.sidebar.is-collapsed .sidebar-utilities { flex-direction: column-reverse; gap: 8px; }
.sidebar-utility-button { position: relative; background: var(--surface-soft); }
.sidebar-utility-button .utility-icon,
.sidebar-utility-button .icon { width: 18px; height: 18px; }
.sidebar-utility-wrap .notification-panel { position: fixed; top: auto; right: auto; bottom: 20px; left: 256px; }

@media (min-width: 1024px) {
  /* Skiper UI Skiper98-inspired reveal: https://skiper-ui.com/v1/skiper98 */
  /* Keep the full labels in the DOM for accessibility. */
  .sidebar.is-collapsed .side-nav-item.has-tool-tooltip,
  .sidebar.is-collapsed .sidebar-utility-button.has-tool-tooltip,
  .sidebar.is-collapsed .brand-expand-button.has-tool-tooltip {
    overflow: visible;
  }

  .sidebar.is-collapsed .side-nav-item .tool-tooltip,
  .sidebar.is-collapsed .sidebar-utility-button .tool-tooltip,
  .sidebar.is-collapsed .brand-expand-button .tool-tooltip {
    display: inline-flex;
    opacity: 0;
    visibility: hidden;
    clip-path: inset(0 100% 0 0 round 10px);
    transform: translate(-8px, -50%) scale(0.96);
    transform-origin: left center;
    transition: opacity 140ms ease,
      clip-path 260ms cubic-bezier(0.22, 1, 0.36, 1),
      transform 360ms cubic-bezier(0.22, 1.36, 0.36, 1),
      visibility 0s linear 360ms;
  }

  .sidebar.is-collapsed .side-nav-item:hover .tool-tooltip,
  .sidebar.is-collapsed .side-nav-item:focus-visible .tool-tooltip,
  .sidebar.is-collapsed .sidebar-utility-button:hover .tool-tooltip,
  .sidebar.is-collapsed .sidebar-utility-button:focus-visible .tool-tooltip,
  .sidebar.is-collapsed .brand-expand-button:hover .tool-tooltip,
  .sidebar.is-collapsed .brand-expand-button:focus-visible .tool-tooltip {
    opacity: 1;
    visibility: visible;
    clip-path: inset(0 0 0 0 round 10px);
    transform: translate(0, -50%) scale(1);
    transition-delay: 0s;
  }

  .sidebar.is-collapsed .side-nav-item .tool-tooltip,
  .sidebar.is-collapsed .sidebar-utility-button .tool-tooltip {
    left: calc(100% + 12px);
    padding: 8px 12px;
    background: var(--black);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    font-size: 12px;
    font-weight: 600;
  }

  .sidebar.is-collapsed .side-nav-item .tool-tooltip::before,
  .sidebar.is-collapsed .sidebar-utility-button .tool-tooltip::before,
  .sidebar.is-collapsed .brand-expand-button .tool-tooltip::before {
    border-right-color: var(--black);
  }

  .sidebar.is-collapsed .brand-expand-button .tool-tooltip {
    left: calc(100% + 12px);
  }
}

.main-content { width: 100%; max-width: 1280px; min-width: 0; margin: 0 auto; padding: 32px 48px 76px; }
.inbox-masthead { position: relative; display: flex; align-items: center; justify-content: flex-start; min-height: 80px; overflow: hidden; padding: 16px var(--today-module-inset-x); background: var(--lilac); border-radius: var(--radius-surface); }
.hero-copy { position: relative; z-index: 1; min-width: 0; max-width: 760px; }
.hero-copy .eyebrow { font-size: 12px; letter-spacing: 0.08em; }
.hero-copy h1 { max-width: 760px; margin: 4px 0 0; font-size: clamp(20px, 2.2vw, 24px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.hero-copy h1 em { font-style: normal; font-weight: 700; }
.hero-orbit { position: absolute; border: 1px solid rgba(0, 0, 0, 0.36); border-radius: 10000px; transform: rotate(-20deg); opacity: 0.28; pointer-events: none; }
.hero-orbit-one { right: 16%; top: -134px; width: 300px; height: 300px; }
.hero-orbit-two { right: 10%; top: -68px; width: 210px; height: 210px; border-color: rgba(0, 0, 0, 0.18); }
.toolbar-title { min-width: max-content; margin: 0; font-size: var(--type-heading); font-weight: 600; letter-spacing: -0.035em; line-height: 1.2; white-space: nowrap; }
.result-count { color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); letter-spacing: 0.03em; white-space: nowrap; }
.collecting-note { color: var(--success); font-size: var(--type-meta); font-weight: 500; }

.toolbar-area { position: relative; z-index: 10; margin-top: 24px; }
.toolbar { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content max-content; align-items: center; gap: 16px; }
.search-page .toolbar-area { margin-top: 0; padding: 28px 0 20px; border-bottom: 1px solid var(--black); }
.search-page .toolbar { grid-template-columns: max-content minmax(220px, 37.5%) max-content max-content; justify-content: space-between; }
.search-page .story-list { margin-top: 16px; }
.search-agent-page.main-content { position: relative; display: flex; flex-direction: column; max-width: none; min-height: calc(100vh - var(--topbar-height)); padding: 0 24px 24px; background: #fafafa; overflow: hidden; }
.search-agent-page.main-content::before { position: absolute; inset: 0; background: radial-gradient(ellipse 33vw 30vh at calc(50% - (var(--sidebar-width) / 2)) 45%, rgba(232, 232, 232, 0.72) 0%, rgba(241, 241, 241, 0.34) 55%, rgba(250, 250, 250, 0) 100%); content: ""; pointer-events: none; }
.search-agent-page:has(.search-agent-thread.is-empty) { padding-bottom: 0; }
.search-agent-page:has(.search-agent-thread.is-empty) .search-agent-layout { transform: translateX(calc(var(--sidebar-width) / -2)); }
.search-agent-page--conversation { padding: 0; height: calc(100vh - var(--topbar-height)); max-height: calc(100vh - var(--topbar-height)); min-height: 0; }
.search-agent-page--conversation::before { display: none; }
.workspace:has(.search-agent-page--conversation) { height: calc(100vh - var(--topbar-height)); max-height: calc(100vh - var(--topbar-height)); min-height: 0; overflow: hidden; }
.search-agent-layout { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; gap: 16px; width: min(800px, 100%); min-height: 0; margin: 0 auto; }
.search-agent-layout.is-conversation { width: 100%; max-width: none; gap: 0; height: 100%; max-height: 100%; min-height: 0; }
.search-agent-shell { display: flex; flex: 1; gap: 12px; width: 100%; height: 100%; max-height: 100%; min-height: 0; overflow: hidden; }
.search-agent-main { display: flex; flex: 1; flex-direction: column; width: 100%; min-width: 0; height: 100%; max-height: 100%; min-height: 0; overflow: hidden; }
.search-agent-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: 16px 24px 0; }
.search-agent-header-copy { display: grid; gap: 2px; min-width: 0; flex: 1; padding-bottom: 12px; }
.search-agent-session-title { margin: 0; min-width: 0; font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-session-meta { min-width: 0; color: var(--text-muted); font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-new-button { position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 24px; height: 20px; margin-top: 0; padding: 0; background: transparent; border: 0; border-radius: 4px; color: var(--text-muted); }
.search-agent-new-button:hover:not(:disabled), .search-agent-new-button:focus-visible:not(:disabled) { color: var(--black); background: transparent; outline: none; }
.search-agent-new-button:focus-visible:not(:disabled) { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.search-agent-new-button:disabled { opacity: 0.32; cursor: not-allowed; }
.search-agent-new-button .icon { width: 14px; height: 14px; opacity: 0.72; }
.search-agent-new-button:hover:not(:disabled) .icon, .search-agent-new-button:focus-visible:not(:disabled) .icon { opacity: 1; }
.search-agent-transcript { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.search-agent-thread { display: flex; flex: 1; flex-direction: column; gap: 16px; min-height: 0; overflow: hidden; padding-right: 4px; }
.search-agent-thread.is-empty { justify-content: center; min-height: 200px; padding: 48px 0; }
.search-agent-thread.has-messages { flex: 1; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 16px 80px 16px 24px; scrollbar-width: none; -ms-overflow-style: none; }
.search-agent-thread.has-messages::-webkit-scrollbar { display: none; width: 0; height: 0; }
.search-agent-scroll-progress { position: absolute; z-index: 2; top: 50%; right: 28px; display: block; width: 44px; height: min(240px, calc(100% - 48px)); pointer-events: none; user-select: none; transform: translateY(-50%); }
.search-agent-scroll-progress[hidden] { display: none; }
.search-agent-scroll-progress-track { position: relative; display: block; margin-left: calc(50% - 3px); width: 6px; height: 100%; overflow: visible; background: #d9d9d9; border-radius: 3px; }
.search-agent-scroll-progress-fill { position: absolute; top: 0; left: 0; display: block; width: 6px; height: var(--search-agent-progress-height, 0px); background: #000000; border-radius: 3px; }
.search-agent-scroll-progress-marker { position: absolute; top: 0; left: 50%; display: block; width: 16px; height: 1px; background: #000000; transform: translate(-50%, var(--search-agent-progress-offset, 0px)); }
.search-agent-scroll-progress-value { position: absolute; top: 0; left: calc(50% + 14px); display: block; color: #000000; font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; transform: translateY(var(--search-agent-progress-offset, 0px)); }
.search-agent-scroll-progress--compact { right: 10px; width: 28px; height: min(180px, calc(100% - 24px)); }
.search-agent-scroll-progress--compact .search-agent-scroll-progress-value { display: none; }
.search-agent-thread-inner { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 768px; margin: 0 auto; margin-top: auto; }
.search-agent-scroll-fade { position: absolute; left: 0; right: 0; z-index: 2; height: 32px; pointer-events: none; transition: opacity var(--motion-fast) ease-out; }
.search-agent-scroll-fade--top { top: 0; background: transparent; box-shadow: inset 0 18px 14px -14px rgba(250, 250, 250, 0.96); }
.search-agent-scroll-fade--bottom { bottom: 0; background: transparent; box-shadow: inset 0 -18px 14px -14px rgba(250, 250, 250, 0.96); }
.search-agent-scroll-fade[hidden] { opacity: 0; }
.search-agent-scroll-fade:not([hidden]) { opacity: 1; }
.search-agent-jump { position: absolute; left: 50%; bottom: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: var(--radius-control); background: var(--white); color: var(--black); box-shadow: var(--shadow-soft); font-size: var(--type-label); font-weight: 500; transform: translateX(-50%); }
.search-agent-jump:hover { background: var(--surface-soft); }
.search-agent-jump:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.search-agent-jump .icon { width: 14px; height: 14px; }
.search-agent-activity { display: none; flex-shrink: 0; width: 320px; height: 100%; max-height: 100%; min-height: 0; padding: 16px 24px 24px 0; overflow: hidden; }
.search-agent-activity-title { margin: 0; padding: 0 8px 30px; font-size: 15px; font-weight: 600; line-height: 20px; letter-spacing: -0.01em; flex-shrink: 0; }
.search-agent-activity-panel { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; margin-top: 0; padding: 0; border: 1px solid var(--hairline-soft); border-radius: 14px; background: rgba(255, 255, 255, 0.72); overflow: hidden; }
.search-agent-activity-empty { padding: 16px 12px; color: var(--text-muted); font-size: var(--type-label); line-height: 1.5; }
.search-agent-activity-list { position: relative; flex: 1; margin: 0; padding: 8px; list-style: none; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
.search-agent-activity-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
.search-agent-activity-item { position: relative; display: flex; gap: 12px; box-sizing: border-box; width: 100%; padding: 8px 10px 16px; margin: 0; border-radius: 10px; transition: background var(--motion-fast) ease; }
.search-agent-activity-item:not(:last-child)::after { position: absolute; top: 24px; left: 17px; z-index: 0; width: 1px; height: calc(100% - 10px); background: var(--hairline); content: ""; pointer-events: none; }
.search-agent-activity-item:last-child { padding-bottom: 6px; }
.search-agent-activity-item:hover,
.search-agent-activity-item:focus-within,
.search-agent-activity-item.is-menu-open { background: var(--surface-soft); }
.search-agent-activity-marker { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px; }
.search-agent-activity-marker-icon { width: 16px; height: 16px; }
.search-agent-activity-marker-ring { width: 10px; height: 10px; border: 1.5px solid var(--hairline); border-radius: 50%; }
.search-agent-activity-marker.is-running .search-agent-activity-marker-ring { border-color: var(--text-muted); animation: search-agent-pulse 1.4s ease-in-out infinite; }
.search-agent-activity-marker.is-stopped .search-agent-activity-marker-ring { border-color: var(--text-muted); opacity: 0.72; }
@keyframes search-agent-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.search-agent-activity-copy { min-width: 0; flex: 1; }
.search-agent-activity-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; }
.search-agent-activity-hit { display: grid; gap: 2px; grid-column: 1; grid-row: 1 / span 2; min-width: 0; padding: 0; background: transparent; border: 0; text-align: left; cursor: pointer; }
.search-agent-activity-item:hover .search-agent-activity-hit,
.search-agent-activity-item:focus-within .search-agent-activity-hit,
.search-agent-activity-item.is-menu-open .search-agent-activity-hit { padding-right: 52px; }
.search-agent-activity-hit:disabled { cursor: default; }
.search-agent-activity-hit:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 8px; }
.search-agent-activity-agent { overflow: hidden; font-size: var(--type-meta); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-activity-trailing { display: inline-flex; align-items: center; gap: 4px; grid-column: 2; grid-row: 1; flex: 0 0 auto; margin-top: 1px; }
.search-agent-activity-actions { display: inline-flex; align-items: center; gap: 2px; opacity: 0; pointer-events: none; transition: opacity var(--motion-fast) ease; }
.search-agent-activity-item:hover .search-agent-activity-actions,
.search-agent-activity-item:focus-within .search-agent-activity-actions,
.search-agent-activity-item.is-menu-open .search-agent-activity-actions { opacity: 1; pointer-events: auto; }
.search-agent-activity-action { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; background: transparent; border: 0; border-radius: 6px; color: var(--text-muted); }
.search-agent-activity-action:hover,
.search-agent-activity-action:focus-visible { background: rgba(0, 0, 0, 0.06); color: var(--black); outline: 0; }
.search-agent-activity-action-icon { width: 14px; height: 14px; }
.search-agent-activity-menu-wrap { position: relative; display: inline-flex; }
.search-agent-activity-menu.ui-menu-surface { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: min(196px, calc(100vw - 24px)); min-width: 176px; }
.search-agent-activity-item.is-unread .search-agent-activity-agent { font-weight: 700; }
.search-agent-activity-detail { overflow: hidden; color: var(--text-muted); font-size: 12px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-step-anchor { display: block; height: 0; overflow: hidden; }
.search-agent-empty-state { display: grid; justify-items: center; gap: 40px; width: 100%; }
.search-agent-empty-state h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 400; letter-spacing: 0; line-height: 1.3; text-align: center; }
.search-agent-composer-wrap { position: relative; z-index: 3; flex-shrink: 0; padding: 8px 24px 24px; background: #fafafa; }
.search-agent-composer { display: grid; gap: 10px; width: 100%; max-width: 768px; margin: 0 auto; }
.search-agent-composer-shell { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 72px; padding: 10px 12px; background: var(--white); border: 0; border-radius: 36px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.search-agent-composer-shell.is-empty { width: min(720px, 100%); justify-self: center; }
.search-agent-composer-shell.is-conversation { min-height: 0; border: 1px solid var(--hairline); border-radius: 14px; box-shadow: none; }
.search-agent-composer-shell.is-conversation:focus-within { border-color: var(--border-interactive); }
.search-agent-composer-shell:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.search-agent-composer-shell.is-conversation:focus-within { outline-offset: 0; }
.search-agent-composer.is-multiline .search-agent-composer-shell { grid-template-columns: 1fr; grid-template-rows: auto auto; align-items: stretch; min-height: 0; padding: 12px; border-radius: 24px; }
.search-agent-composer.is-multiline .search-agent-plus-button { justify-self: start; }
.search-agent-composer.is-multiline .search-agent-composer-tools { justify-content: flex-end; }
.search-agent-plus-button,
.search-agent-send-button { width: 44px; height: 44px; background: transparent; }
.search-agent-composer-field { display: block; min-width: 0; }
.search-agent-composer-field textarea { box-sizing: border-box; width: 100%; min-height: 24px; max-height: 160px; padding: 8px 4px; border: 0; background: transparent; resize: none; overflow-y: auto; font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.search-agent-composer:not(.is-multiline) .search-agent-composer-field { display: flex; align-items: center; min-height: var(--icon-touch); }
.search-agent-composer:not(.is-multiline) .search-agent-composer-field textarea { height: 24px; min-height: 24px; max-height: 24px; padding: 0 4px; line-height: 24px; overflow: hidden; }
.search-agent-composer:not(.is-multiline) .search-agent-plus-button,
.search-agent-composer:not(.is-multiline) .search-agent-composer-tools { align-self: center; }
.search-agent-composer-field textarea:focus { outline: 0; }
.search-agent-composer-tools { display: inline-flex; align-items: center; gap: 8px; }
.search-agent-scope-wrap { position: relative; }
.search-agent-scope-trigger { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; background: transparent; border: 0; border-radius: var(--radius-pill); font-size: var(--type-label); font-weight: 500; white-space: nowrap; }
.search-agent-scope-trigger:hover:not(:disabled),
.search-agent-scope-trigger:focus-visible { background: var(--surface-soft); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.search-agent-scope-menu,
.search-agent-plus-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: min(264px, calc(100vw - 32px)); }
.search-agent-plus-menu { left: 0; right: auto; width: min(260px, calc(100vw - 32px)); }
.search-agent-scope-item.is-disabled,
.search-agent-plus-item.is-disabled { cursor: not-allowed; }
.search-agent-scope-item-copy { display: grid; gap: 2px; min-width: 0; }
.search-agent-scope-item-copy strong { font-weight: 500; }
.search-agent-plus-item-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--ui-menu-icon-size); height: var(--ui-menu-icon-size); }
.search-agent-plus-item-icon .icon { width: var(--ui-menu-icon-size); height: var(--ui-menu-icon-size); }
.search-agent-plus-item-copy { display: grid; gap: 2px; min-width: 0; white-space: normal; }
.search-agent-plus-item-copy strong { font-weight: 500; }
.search-agent-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.search-agent-references { display: flex; flex-wrap: wrap; gap: 8px; }
.search-agent-reference-chip { display: inline-flex; align-items: center; gap: 8px; max-width: min(100%, 320px); padding: 6px 8px 6px 10px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--radius-pill); font-size: 12px; }
.search-agent-reference-icon { display: inline-flex; align-items: center; flex: 0 0 auto; width: 16px; height: 16px; }
.search-agent-reference-icon .icon { width: 16px; height: 16px; }
.search-agent-reference-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-reference-remove { width: 28px; height: 28px; background: transparent; }
.search-agent-attachment-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 8px 6px 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-pill); font-size: 12px; }
.search-agent-attachment-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-attachment-remove { width: 32px; height: 32px; background: transparent; }
.search-agent-message { display: flex; }
.search-agent-message-user { justify-content: flex-end; }
.search-agent-message-assistant { flex-direction: column; align-items: flex-start; gap: 10px; max-width: min(100%, 42rem); }
.search-agent-agent-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 6px; background: var(--surface-soft); color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.search-agent-assistant-body { width: 100%; line-height: 1.65; }
.search-agent-bubble { max-width: min(100%, 85%); padding: 10px 14px; border-radius: 14px; line-height: 1.65; }
.search-agent-bubble-user { background: var(--surface-soft); color: var(--black); }
.search-agent-bubble-user p { margin: 0; font-size: var(--type-meta); line-height: 1.6; }
.search-agent-message-meta { display: block; margin-bottom: 6px; color: var(--text-muted); font-size: 12px; }
.search-agent-bubble-assistant { background: transparent; padding-left: 0; }
.search-agent-stage { margin: 0; color: var(--text-muted); }
.search-agent-answer { margin: 0 0 8px; font-size: 16px; }
.search-agent-status-copy { margin: 0; color: var(--text-muted); font-size: var(--type-label); }
.search-agent-evidence { margin-top: 12px; }
.search-agent-evidence-title { margin: 0 0 8px; font-size: var(--type-meta); font-weight: 600; }
.search-agent-supplement-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.search-agent-citations { display: grid; gap: 8px; }
.search-agent-citation { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--white); color: inherit; text-decoration: none; }
.search-agent-citation:hover { border-color: var(--black); }
.search-agent-citation-copy { display: grid; gap: 4px; min-width: 0; }
.search-agent-citation-copy strong { display: -webkit-box; overflow: hidden; font-weight: 500; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-agent-citation-copy span { color: var(--text-muted); font-size: var(--type-label); }
.search-agent-citation-copy .search-agent-citation-snippet { display: -webkit-box; overflow: hidden; color: var(--black); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-agent-message-error .search-agent-bubble-assistant { color: #ff7238; }
.search-agent-composer-field { position: relative; }
.search-agent-mention-menu { position: absolute; right: 0; bottom: calc(100% + 10px); left: 0; z-index: 80; max-height: 280px; }
.search-agent-mention-item-icon { display: inline-flex; align-items: center; justify-content: center; width: var(--ui-menu-icon-size); height: var(--ui-menu-icon-size); }
.search-agent-mention-item-icon .icon { width: var(--ui-menu-icon-size); height: var(--ui-menu-icon-size); }
.search-agent-mention-item-copy { display: grid; gap: 4px; min-width: 0; }
.search-agent-mention-item-copy strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.search-agent-mention-item-copy span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.search-agent-mention-state { padding: 8px 10px; color: var(--text-muted); font-size: 14px; line-height: 20px; }

@media (min-width: 1024px) {
  .search-agent-activity { display: flex; flex-direction: column; }
}

@media (max-width: 1023px) {
  .search-agent-header,
  .search-agent-thread.has-messages,
  .search-agent-composer-wrap { padding-left: 16px; padding-right: 16px; }
  .search-agent-scroll-progress { display: none !important; }
}

@media (max-width: 640px) {
  .search-agent-page.main-content { padding: 0 16px 16px; }
  .search-agent-page--conversation.main-content { padding: 0; }
  .search-agent-page.main-content::before { background: radial-gradient(ellipse 33vw 30vh at 50% 45%, rgba(232, 232, 232, 0.58) 0%, rgba(241, 241, 241, 0.26) 55%, rgba(250, 250, 250, 0) 100%); }
  .search-agent-empty-state { gap: 24px; }
  .search-agent-composer-shell,
  .search-agent-composer-shell.is-empty { width: 100%; grid-template-columns: 1fr; grid-template-rows: auto auto; align-items: stretch; min-height: 0; padding: 12px; border-radius: 24px; }
  .search-agent-composer-shell.is-conversation { border-radius: 14px; }
  .search-agent-composer-tools { justify-content: space-between; width: 100%; }
  .search-agent-plus-button { justify-self: start; }
}

.search-field { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: var(--page-action-height); padding: 0 16px; border: 1px solid var(--border-interactive); border-radius: var(--radius-pill); background: var(--white); }
.search-field:focus-within { border-color: var(--black); box-shadow: 0 0 0 2px var(--focus-ring); }
.search-icon { flex: 0 0 auto; align-self: center; color: var(--text-muted); }
.search-field input { width: 100%; flex: 1 1 auto; align-self: stretch; min-height: 24px; padding: 0; border: 0; outline: 0; background: transparent; font-size: var(--page-action-font-size); font-weight: var(--page-action-font-weight); line-height: var(--page-action-line-height); }
.search-field input::placeholder { color: var(--text-muted); opacity: 1; }
.outline-pill, .black-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--page-action-height); height: var(--page-action-height); padding: 8px 16px; border-radius: var(--radius-pill); font-size: var(--page-action-font-size); font-weight: var(--page-action-font-weight); line-height: var(--page-action-line-height); white-space: nowrap; }
.outline-pill { background: var(--white); }
.outline-pill:hover:not(:disabled) { background: var(--surface-soft); }
.outline-pill[aria-expanded="true"] { background: var(--black); color: var(--white); }
.filter-more-trigger:hover:not(:disabled) { border-color: var(--border-interactive); }
.matter-control-button.filter-more-trigger[aria-expanded="true"] { background: var(--black); color: var(--white); border-color: var(--black); }
.matter-control-button.filter-more-trigger[aria-expanded="true"]:hover:not(:disabled) { background: #000000; border-color: #000000; }
.filter-button-icon { width: 16px; height: 16px; }
.black-pill { background: var(--black); color: var(--white); text-decoration: none; }
.black-pill:hover { background: #000000; }
.small-pill { min-height: var(--page-action-height); padding: 8px 16px; font-size: var(--page-action-font-size); }
.is-disabled:disabled { color: var(--text-disabled); cursor: not-allowed; opacity: 1; }

/* Page header action bars: keep search, selects and buttons on one rhythm. */
:is(.library-header-actions, .favorites-header-actions, .page-heading-actions, .home-titlebar-actions, .sources-masthead-actions, .tags-toolbar, .library-toolbar, .toolbar, .source-filter-group) :is(.search-field, .source-filter-search) {
  box-sizing: border-box;
  height: var(--page-action-height);
  min-height: var(--page-action-height);
}
:is(.library-header-actions, .favorites-header-actions, .page-heading-actions, .home-titlebar-actions, .sources-masthead-actions, .tags-toolbar, .library-toolbar, .toolbar, .source-filter-group) :is(.outline-pill, .black-pill, .library-icon-add-button, .matter-control-button, .ui-choice-trigger, select.select-control, .matter-control-select, .source-toolbar-trigger) {
  box-sizing: border-box;
  min-height: var(--page-action-height);
  height: var(--page-action-height);
  font-size: var(--page-action-font-size);
  font-weight: var(--page-action-font-weight);
  line-height: var(--page-action-line-height);
}

.popover { position: absolute; top: calc(100% + 12px); right: 0; z-index: 60; width: min(480px, calc(100vw - 32px)); max-height: min(680px, calc(100dvh - 112px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: var(--white); border: 1px solid var(--black); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); animation: popover-in var(--motion-fast) ease-out both; }
.popover,
.search-agent-scope-menu,
.search-agent-plus-menu,
.search-agent-mention-menu,
.quick-reads-feedback-menu,
.story-more-menu,
.reader-more-menu,
.reader-settings-panel,
.reader-settings-options,
.notebook-menu,
.notebook-highlights,
.reader-selection-toolbar,
.entry-dialog,
.tag-choice-list,
.source-toolbar-menu-panel {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.popover::-webkit-scrollbar,
.search-agent-scope-menu::-webkit-scrollbar,
.search-agent-plus-menu::-webkit-scrollbar,
.search-agent-mention-menu::-webkit-scrollbar,
.quick-reads-feedback-menu::-webkit-scrollbar,
.story-more-menu::-webkit-scrollbar,
.reader-more-menu::-webkit-scrollbar,
.reader-settings-panel::-webkit-scrollbar,
.reader-settings-options::-webkit-scrollbar,
.notebook-menu::-webkit-scrollbar,
.notebook-highlights::-webkit-scrollbar,
.reader-selection-toolbar::-webkit-scrollbar,
.entry-dialog::-webkit-scrollbar,
.tag-choice-list::-webkit-scrollbar,
.source-toolbar-menu-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.popover-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.popover-header h2 { margin: 8px 0 0; font-size: var(--type-heading); font-weight: 600; letter-spacing: -0.025em; }
.close-button { display: inline-flex; align-items: center; justify-content: center; width: var(--icon-touch); height: var(--icon-touch); background: var(--surface-soft); border-radius: var(--radius-pill); line-height: 1; }
.close-button:hover { background: var(--black); color: var(--white); }
.filter-set { display: grid; gap: 16px; padding-top: 16px; }
.more-panel { width: min(420px, calc(100vw - 32px)); }
.filter-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; font-family: var(--sans); }
.filter-field > span { color: var(--text-muted); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; }
.filter-field select,
.filter-field .filter-text-input,
.filter-field .date-range-fields input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: var(--page-action-height);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--page-action-font-size);
  font-weight: var(--page-action-font-weight);
  line-height: var(--page-action-line-height);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.filter-field select { cursor: pointer; }
.filter-field select:hover,
.filter-field .filter-text-input:hover,
.filter-field .date-range-fields input:hover { border-color: var(--border-interactive); }
.filter-field select:focus,
.filter-field .filter-text-input:focus,
.filter-field .date-range-fields input:focus { border-color: var(--black); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.filter-text-input { display: block; }
.select-control {
  min-height: 40px;
  padding: 8px 36px 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236d6d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--black);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
.select-control:hover:not(:disabled) { border-color: var(--border-interactive); }
.select-control:focus { border-color: var(--black); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.select-control:disabled { background-image: none; color: var(--text-muted); cursor: not-allowed; }
.date-range-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.date-range-fields span { color: var(--text-muted); }
.popover-footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.text-button { padding: 4px 0; background: transparent; font-size: var(--type-meta); font-weight: 500; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.filter-chip, .clear-all { min-height: 32px; padding: 8px 12px; border-radius: var(--radius-pill); font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; }
.filter-chip { background: var(--cream); }
.filter-chip:hover { background: var(--lime); }
.clear-all { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.popover-scrim { display: none; }

.topics-section { margin-top: var(--today-module-gap); padding: 0 var(--today-module-inset-x); }
.topics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.topics-heading-copy { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
.topics-heading-copy .eyebrow { color: var(--text-muted); }
.topics-heading-copy h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.topic-carousel { position: relative; isolation: isolate; }
.topic-control { position: absolute; z-index: 4; top: 50%; display: inline-flex; align-items: center; justify-content: center; width: var(--carousel-control-size); height: var(--carousel-control-size); background: rgba(255, 255, 255, 0.62); color: rgba(0, 0, 0, 0.82); border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.55); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); transform: translateY(-50%) scale(1); transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.topic-control .icon { width: 16px; height: 16px; }
.topic-control-prev { left: 16px; }
.topic-control-next { right: 16px; }
@media (hover: hover) {
  .topic-control:hover { background: rgba(255, 255, 255, 0.84); color: var(--black); border-color: rgba(255, 255, 255, 0.92); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.72); transform: translateY(-50%) scale(1.04); }
}
.topic-control:active { transform: translateY(-50%) scale(0.96); }
.topic-control-next .icon { transform: rotate(180deg); }
.topic-strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--carousel-gap)) / 4); gap: var(--carousel-gap); min-width: 0; overflow-x: auto; padding: 0 0 12px; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: 0; scrollbar-width: none; }
.topic-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.topic-card { position: relative; min-width: 0; overflow: hidden; background: var(--topic-base, var(--navy)); border: 1px solid transparent; border-radius: var(--matter-card-radius); box-shadow: var(--matter-card-shadow); scroll-snap-align: start; scroll-snap-stop: always; transform: scale(1); transition: var(--matter-card-motion); }
.topic-card--hero, .topic-card--shelf, .topic-card--matter { aspect-ratio: var(--matter-card-aspect); }
@media (hover: hover) {
  .topic-card:hover, .topic-card:focus-within { transform: scale(var(--matter-card-hover-scale)); border-color: transparent; will-change: transform; }
}
.topic-card::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(to top, rgba(var(--topic-base-rgb), 1) 0%, rgba(var(--topic-base-rgb), 1) 48%, rgba(var(--topic-base-rgb), 0.72) 66%, rgba(var(--topic-base-rgb), 0.16) 82%, rgba(var(--topic-base-rgb), 0) 92%); content: ""; pointer-events: none; }
.topic-more-card { display: flex; align-items: center; justify-content: center; background: var(--black); color: var(--white); text-decoration: none; cursor: pointer; }
.topic-card--compact-more { aspect-ratio: auto; min-height: 220px; }
.topic-more-card::after { display: none; }
.topic-more-card:hover, .topic-more-card:focus-visible { background: var(--lime); border-color: transparent; color: var(--black); }
.topic-more-card-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100%; padding: 20px; text-align: center; }
.topic-more-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255, 255, 255, 0.14); border-radius: 50%; }
.topic-more-card:hover .topic-more-card-icon, .topic-more-card:focus-visible .topic-more-card-icon { background: rgba(0, 0, 0, 0.12); }
.topic-more-card-icon .icon { width: 18px; height: 18px; }
.topic-more-card-content strong { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.topic-more-card-content > span:last-child { color: currentColor; font-size: var(--type-label); opacity: 0.72; }
.topic-more-card:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }
.topic-card-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.topic-card-hit { position: absolute; z-index: 1; inset: 0; border-radius: inherit; text-decoration: none; }
.topic-card-hit:focus-visible { outline: 2px solid var(--white); outline-offset: -3px; }
.topic-visual-topline { position: absolute; z-index: 3; top: 14px; right: 14px; left: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
.topic-visual-topline .topic-actions { pointer-events: auto; }
.topic-time-badge { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 4px 10px; background: rgba(0, 0, 0, 0.52); color: var(--white); border-radius: var(--radius-pill); font-size: 12px; font-weight: 500; line-height: 1; }
.topic-time-icon { width: 12px; height: 12px; }
.topic-quick-time { display: inline-flex; align-items: center; gap: 4px; margin-top: var(--topic-quick-section-gap, 6px); color: var(--text-muted); font-size: 13px; line-height: 18px; }
.topic-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease, visibility var(--motion-fast) ease; }
.topic-card:hover .topic-actions, .topic-card:focus-within .topic-actions { opacity: 1; visibility: visible; transform: translateY(0); }
@media (hover: none), (pointer: coarse) {
  .topic-actions { opacity: 1; visibility: visible; transform: translateY(0); }
}
.topic-icon-button { display: inline-flex; align-items: center; justify-content: center; width: var(--icon-touch); height: var(--icon-touch); background: rgba(0, 0, 0, 0.58); color: var(--white); border-radius: 50%; }
.topic-icon-button:hover:not(:disabled), .topic-icon-button.is-active { background: rgba(0, 0, 0, 0.78); color: var(--white); }
.topic-icon-button:focus-visible { outline-color: var(--white); }
.topic-icon-button .icon { width: 18px; height: 18px; }
.topic-icon-button.is-disabled { color: var(--text-disabled); }
.topic-card-body { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 20px 18px; color: var(--white); pointer-events: none; }
.topic-source-line { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--type-label); font-weight: 500; line-height: 1.35; }
.topic-source-line .channel-inline { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.topic-source-line .channel-mark { width: 18px; height: 18px; }
.topic-source-line .channel-icon { width: 12px; height: 12px; }
.topic-source-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-card-body .topic-card-title { display: -webkit-box; overflow: hidden; margin: 12px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.22; text-wrap: wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.topic-card-body .topic-card-summary { display: -webkit-box; overflow: hidden; margin: 0; color: var(--topic-on-gradient-muted); font-size: var(--type-body); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.topic-card--hero .topic-card-body .topic-card-title { font-size: 20px; }
.topic-card--shelf .topic-card-body .topic-card-title { font-size: 18px; }
.topic-card--shelf .topic-card-body { padding: 18px 18px 16px; }
.topic-card--matter { border: 0; border-radius: 16px; }
.topic-card--matter::after { background: linear-gradient(to top, rgba(var(--topic-base-rgb), 1) 0%, rgba(var(--topic-base-rgb), 0.98) 24%, rgba(var(--topic-base-rgb), 0.82) 50%, rgba(var(--topic-base-rgb), 0.2) 80%, rgba(var(--topic-base-rgb), 0) 100%); }
.topic-card--matter .topic-visual-topline { top: 12px; right: 12px; left: 12px; }
.topic-card--matter .topic-icon-button { width: 36px; height: 36px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.22); }
.topic-card--matter .topic-icon-button:hover:not(:disabled), .topic-card--matter .topic-icon-button.is-active { background: rgba(0, 0, 0, 0.62); }
.topic-card--matter { --topic-card-section-gap: 10px; --topic-card-source-height: 18px; --topic-card-title-height: 46px; --topic-card-summary-height: 72px; }
.topic-card--matter .topic-card-body { justify-content: flex-end; padding: 0 20px 20px; }
.topic-card--matter .topic-source-line { flex: 0 0 var(--topic-card-source-height); height: var(--topic-card-source-height); min-height: var(--topic-card-source-height); margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 16px; font-weight: 400; letter-spacing: -0.026em; line-height: var(--topic-card-source-height); }
.topic-card--matter .topic-source-line--matter .channel-inline { display: none; }
.topic-card--matter .topic-card-body .topic-card-title { flex: 0 0 var(--topic-card-title-height); height: var(--topic-card-title-height); margin: var(--topic-card-section-gap) 0 0; font-size: 18px; font-weight: 700; letter-spacing: -0.031em; line-height: 1.29; -webkit-line-clamp: 2; }
.topic-card--matter .topic-card-body .topic-card-summary { flex: 0 0 var(--topic-card-summary-height); height: var(--topic-card-summary-height); margin: var(--topic-card-section-gap) 0 0; color: rgba(255, 255, 255, 0.75); font-size: 16px; letter-spacing: -0.026em; line-height: 18px; -webkit-line-clamp: 4; }
.topic-card--matter.topic-card--no-image .topic-card-body { position: absolute; inset: 0; justify-content: flex-end; min-height: 0; padding: 0 20px 20px; }
.topic-card--matter .topic-tags { display: none; }
.topic-card--no-image { background: var(--surface-soft); border: 1px solid var(--hairline); box-shadow: none; color: var(--black); }
.topic-card--no-image::after { display: none; }
.topic-card--no-image { aspect-ratio: auto; min-height: 220px; }
.topic-card--no-image .topic-card-body { position: relative; min-height: 220px; padding: 24px 20px; color: var(--black); justify-content: center; }
.topic-card--no-image .topic-source-line { color: var(--text-muted); }
.topic-card--no-image .topic-card-body .topic-card-title { color: var(--black); }
.topic-card--no-image .topic-card-body .topic-card-summary { color: var(--text-muted); }
.topic-card--no-image .topic-visual-topline { color: var(--text-muted); }
.topic-card--no-image .topic-icon-button { background: var(--white); border: 1px solid var(--hairline); color: var(--black); }
.topic-card--no-image .topic-icon-button:hover:not(:disabled), .topic-card--no-image .topic-icon-button.is-active { background: var(--black); border-color: var(--black); color: var(--white); }
.topic-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.topic-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, 0.34); border-radius: var(--radius-pill); color: var(--white); font-size: 12px; font-weight: 500; }

.topic-carousel--accordion { display: flex; align-items: stretch; justify-content: flex-start; gap: 12px; min-width: 0; }
.topic-accordion { --accordion-active-grow: 4; --accordion-active-width: 260px; --accordion-collapsed-width: 64px; display: flex; flex: 0 1 auto; justify-content: flex-start; gap: 10px; width: max-content; max-width: 100%; min-width: 0; height: clamp(280px, 34vw, 420px); perspective: 1400px; perspective-origin: 50% 50%; }
.topic-accordion-panel { position: relative; flex: 0 1 var(--accordion-collapsed-width); width: var(--accordion-collapsed-width); min-width: 0; min-height: 0; overflow: hidden; background: var(--topic-base, var(--navy)); border-radius: 16px; box-shadow: 0 7px 18px -15px rgba(0, 0, 0, 0.48); cursor: pointer; transform: rotateY(calc(var(--accordion-tilt, 0) * 1deg)); transform-origin: center center; transform-style: preserve-3d; transition: flex-basis 680ms cubic-bezier(0.16, 1, 0.3, 1), width 680ms cubic-bezier(0.16, 1, 0.3, 1), transform 680ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 280ms ease; will-change: flex-basis, transform; -webkit-tap-highlight-color: transparent; }
.topic-accordion-panel.is-active { flex-basis: var(--accordion-active-width); width: var(--accordion-active-width); box-shadow: 0 9px 20px -16px rgba(0, 0, 0, 0.44); }
.topic-accordion-panel:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }
.topic-accordion-frame { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; background: var(--topic-base, var(--navy)); }
.topic-accordion-image { filter: grayscale(1) contrast(0.9) brightness(0.56); transform: scale(1.02); transition: filter 680ms cubic-bezier(0.16, 1, 0.3, 1), transform 680ms cubic-bezier(0.16, 1, 0.3, 1); }
.topic-accordion-panel.is-active .topic-accordion-image { filter: grayscale(0) contrast(1.02) brightness(0.86) saturate(1.05); transform: scale(1.06); }
.topic-accordion-overlay { position: absolute; inset: 0; background: transparent; box-shadow: none; pointer-events: none; }
.topic-accordion-panel.is-active .topic-accordion-overlay { background: transparent; box-shadow: none; }
.topic-accordion-hit { z-index: 2; }
.topic-accordion-panel:not(.is-active) .topic-accordion-hit { pointer-events: none; }
.topic-accordion-topline { z-index: 4; top: 14px; right: 14px; left: 14px; }
.topic-accordion-panel.is-active .topic-actions, .topic-accordion-panel:focus-within .topic-actions { opacity: 1; visibility: visible; transform: translateY(0); }
.topic-accordion-body { z-index: 3; padding: 24px 24px 22px; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity 300ms ease, transform 680ms cubic-bezier(0.16, 1, 0.3, 1); }
.topic-accordion-body::before { position: absolute; right: 0; bottom: 0; left: 0; height: 42%; background: rgba(0, 0, 0, 0.8); box-shadow: 0 -38px 52px -28px rgba(0, 0, 0, 0.72); content: ""; pointer-events: none; }
.topic-accordion-body > * { position: relative; z-index: 1; }
.topic-accordion-panel.is-active .topic-accordion-body { opacity: 1; transform: translateY(0); pointer-events: none; transition-delay: 120ms; }
.topic-accordion-panel .topic-source-line--accordion { min-height: 20px; color: rgba(255, 255, 255, 0.78); font-size: 14px; font-weight: 500; line-height: 20px; }
.topic-source-line--accordion .channel-inline { display: inline-flex; align-items: center; gap: 6px; }
.topic-source-line--accordion .channel-inline .channel-icon { width: 14px; height: 14px; }
.topic-accordion-panel .topic-card-body .topic-card-title { margin: 8px 0 8px; color: var(--white); font-size: clamp(18px, 2vw, 24px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.18; }
.topic-accordion-panel .topic-card-body .topic-card-summary { color: rgba(255, 255, 255, 0.78); font-size: 14px; line-height: 1.5; -webkit-line-clamp: 4; }
.topic-accordion-more { flex: 0 0 clamp(86px, 10vw, 116px); min-width: 0; }
.topic-accordion-more .topic-more-card { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-radius: 16px; }
.topic-accordion-more .topic-more-card-content { padding: 12px; }
.topic-accordion-more .topic-more-card-icon { width: 34px; height: 34px; }
.topic-accordion-more .topic-more-card-content strong { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .topic-accordion-panel, .topic-accordion-image, .topic-accordion-body { transition-duration: 0.01ms; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .topic-accordion-panel:nth-of-type(5) { display: none; }
}

@media (min-width: 768px) and (max-width: 879px) {
  .topic-accordion-panel:nth-of-type(4) { display: none; }
}

.category-feed { display: grid; gap: var(--today-module-gap); margin-top: var(--today-module-gap); }
.category-section { position: relative; min-width: 0; padding: var(--today-module-inset-y) var(--today-module-inset-x); overflow: visible; background: var(--surface-soft); border-radius: var(--radius-surface); }
.category-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.category-heading-actions { position: relative; display: inline-flex; align-items: center; }
.category-heading h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.category-feed-more { display: flex; justify-content: center; padding-top: 4px; }
.category-feed-more-button { min-height: 44px; border: 1px solid var(--border-interactive); }
.category-feed-more-count { margin-left: 4px; color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); }

.quick-reads-section { position: relative; margin-top: var(--today-module-gap); padding: var(--today-module-inset-y) var(--today-module-inset-x); overflow: visible; background: var(--surface-soft); color: var(--black); border-radius: var(--radius-surface); }
.quick-reads-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.quick-reads-heading h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
.quick-reads-heading-actions { position: relative; display: flex; align-items: center; }
.quick-reads-more-button { display: inline-flex; align-items: center; justify-content: center; width: var(--icon-touch); height: var(--icon-touch); background: transparent; border: 1px solid transparent; color: var(--black); border-radius: var(--radius-control); }
.quick-reads-more-button:hover, .quick-reads-more-button[aria-expanded="true"] { background: transparent; border-color: var(--black); color: var(--black); }
.quick-reads-more-icon { width: 18px; height: 18px; }
.quick-reads-strip { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--carousel-gap)) / 5); gap: var(--carousel-gap); min-width: 0; overflow-x: auto; padding-bottom: 4px; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-left: var(--carousel-gap); scrollbar-width: none; }
.quick-reads-strip::-webkit-scrollbar { display: none; width: 0; height: 0; }
.quick-read-card { min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.quick-read-card > a { display: block; min-width: 0; color: inherit; text-decoration: none; transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease; }
.quick-read-card:hover > a, .quick-read-card:focus-within > a { transform: translateY(-2px); }
.quick-read-image-wrap { aspect-ratio: 1 / 1; overflow: hidden; background: var(--topic-base, #000000); border-radius: var(--matter-card-radius); box-shadow: var(--matter-card-shadow-sm); transform: scale(1); transition: var(--matter-card-motion); }
@media (hover: hover) {
  .quick-read-card > a:hover .quick-read-image-wrap, .quick-read-card > a:focus-visible .quick-read-image-wrap { transform: scale(var(--matter-card-hover-scale)); will-change: transform; }
}
.quick-read-image-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.quick-read-card--no-image { padding-top: 14px; border-top: 1px solid var(--hairline); }
.quick-read-card--no-image .quick-read-copy { padding-top: 0; }
.quick-read-copy { min-width: 0; padding-top: 14px; }
.quick-read-source { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-muted); font-size: var(--type-meta); line-height: 1.35; }
.quick-read-source .channel-inline { display: inline-flex; flex: 0 0 auto; align-items: center; }
.quick-read-source .channel-mark { width: 20px; height: 20px; }
.quick-read-source .channel-icon { width: 12px; height: 12px; }
.quick-read-source > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-read-card .topic-card-title { display: -webkit-box; overflow: hidden; margin: 8px 0 0; color: var(--black); font-size: 18px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.28; text-wrap: wrap; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.quick-reads-feedback-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; width: min(248px, calc(100vw - 24px)); }
.quick-reads-feedback-option > span { min-width: 0; flex: 1; }
.feedback-icon { width: var(--ui-menu-icon-size); height: var(--ui-menu-icon-size); flex: 0 0 var(--ui-menu-icon-size); }
.feedback-icon.is-down { transform: rotate(180deg); }
.tags-page .tags-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-right: var(--library-pane-inset-x);
  padding-left: var(--library-pane-inset-x);
}
.matter-control-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--page-action-height);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.matter-control-button:hover:not(:disabled) { border-color: var(--border-interactive); }
.matter-control-button:disabled { cursor: not-allowed; color: var(--text-muted); }
.matter-control-icon { width: 16px; height: 16px; }
.tags-list {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  border-top: 1px solid var(--hairline);
}
.tag-row {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 68px;
  padding: 6px 10px 6px var(--library-pane-inset-x);
  border-bottom: 1px solid var(--hairline-soft);
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease, box-shadow 220ms ease;
}
.tag-row-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tag-row-main:focus-visible {
  outline: 2px solid var(--border-interactive);
  outline-offset: -2px;
}
.tag-row:hover,
.tag-row:focus-within {
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  transform: translateY(-2px);
}
.tag-row-leading { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; background: var(--surface-soft); color: var(--black); }
.tag-row-leading .icon { width: 18px; height: 18px; }
.tag-row-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tag-row-name {
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tag-row-meta { color: var(--text-muted); font-size: 14px; line-height: 1.35; }
.tag-row-count {
  color: var(--text-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.tag-row-trailing { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: auto; color: var(--text-muted); }
.tag-row-trailing .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.tag-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  opacity: 0;
  transform: translateX(4px);
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.tag-row:hover .tag-row-actions,
.tag-row:focus-within .tag-row-actions {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.tag-row:hover .tag-row-trailing,
.tag-row:focus-within .tag-row-trailing { opacity: 0; width: 0; overflow: hidden; }
.tag-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.tag-row-action:hover,
.tag-row-action:focus-visible { background: var(--white); color: var(--black); outline: none; }
.tag-row-action-danger:hover,
.tag-row-action-danger:focus-visible { color: var(--danger, #ff7238); }
.tag-row-action .icon { width: 16px; height: 16px; }
@media (hover: none), (pointer: coarse) {
  .tag-row-actions { opacity: 1; transform: none; pointer-events: auto; }
  .tag-row-trailing { display: none; }
}
.tags-empty-search {
  margin-top: 32px;
  padding-right: var(--library-pane-inset-x);
  padding-left: var(--library-pane-inset-x);
  color: var(--text-muted);
  font-size: 14px;
}
.tags-empty-search p { margin: 0; }
.tags-empty-search .text-button { margin-top: 8px; }
.tags-heading .hero-copy,
.tags-content-view .hero-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.tags-heading .hero-copy h1,
.tags-content-view .hero-copy h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tags-heading .hero-copy .result-count,
.tags-content-view .hero-copy .result-count {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}
.tags-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.tag-heading-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
}
.tag-heading-action:hover,
.tag-heading-action:focus-visible {
  border-color: var(--black);
  color: var(--black);
  outline: none;
}
.tag-heading-action-danger:hover,
.tag-heading-action-danger:focus-visible { color: var(--danger, #ff7238); }
.tag-heading-action .icon { width: 16px; height: 16px; }
.tag-filter-sidebar .line-sidebar__text { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.library-page-topic-zone {
  padding: 12px var(--library-pane-inset-x) 16px;
  overflow: hidden;
}
.section-topic-nav.home-pill-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 5px solid #000;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 5px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.section-topic-nav.home-pill-nav::-webkit-scrollbar { display: none; }
.section-topic-nav .home-pill {
  flex: 0 0 auto;
  white-space: nowrap;
}
.section-topic-nav .home-pill-label {
  position: relative;
  z-index: 1;
  transform: none;
  opacity: 1;
}
.section-topic-nav .home-pill-circle,
.section-topic-nav .home-pill-hover {
  display: none;
}
.section-topic-nav .home-pill:hover,
.section-topic-nav .home-pill:focus-visible {
  background: #000;
  color: #fff;
}
.section-topic-nav .home-pill:hover .home-pill-label,
.section-topic-nav .home-pill:focus-visible .home-pill-label {
  transform: none;
  opacity: 1;
}
.section-topic-nav .home-pill[aria-pressed="true"] .home-pill-label {
  color: #fff;
}
.tags-content-list { margin-top: 0; }
.tags-page .page-footer { border-color: var(--hairline); margin-top: 16px; }

.list-heading { margin: var(--space-6) 0 var(--space-2); padding-bottom: 10px; border-bottom: 1px solid var(--black); }
.story-list { display: grid; margin-top: 16px; border-top: 1px solid var(--hairline); }
.story-card { min-width: 0; padding: 16px 8px; background: var(--white); border-bottom: 1px solid var(--hairline-soft); border-radius: 0; transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease; }
.story-card:hover, .story-card:focus-within { background: var(--surface-soft); transform: translateY(-2px); }
.story-card.is-read { background: var(--white); }
.story-card.is-read:hover, .story-card.is-read:focus-within { background: var(--surface-soft); }
.story-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; width: 100%; min-width: 0; }
.story-leading { padding-top: 4px; }
.source-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; overflow: hidden; border-radius: var(--radius-control); background: var(--black); color: var(--white); font-family: var(--sans); font-size: var(--type-label); font-weight: 600; line-height: 1; text-align: center; }
.source-avatar-wechat { background: var(--mint); color: var(--black); }
.source-avatar-youtube { background: var(--coral); color: var(--black); }
.story-content, .story-card-main { width: 100%; min-width: 0; }
.story-card-main { display: block; width: 100%; padding: 0; background: transparent; text-align: left; text-decoration: none; }
.story-topline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-3); min-width: 0; }
.story-title { display: -webkit-box; overflow: hidden; min-width: 0; max-width: none; margin: 0; font-size: var(--type-title); font-weight: 600; letter-spacing: -0.018em; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.story-facts { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.story-facts > span { display: inline-flex; align-items: center; line-height: 1; }
.story-facts > span:nth-child(2) { gap: 6px; }
.read-state { display: inline-flex; align-items: center; gap: 8px; }
.read-state i { width: 8px; height: 8px; background: var(--black); border-radius: 50%; }
.is-read .read-state i { border: 1px solid var(--black); background: transparent; }
.grade-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-family: var(--sans); font-size: 12px; font-weight: 600; }
.grade-s { background: var(--lime); }
.grade-a { background: var(--mint); }
.grade-b { background: var(--cream); }
.grade-c { background: var(--pink); }
.story-summary { display: -webkit-box; overflow: hidden; max-width: 910px; margin: 8px 0 12px; color: var(--text-muted); font-size: var(--type-body); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.story-tags, .detail-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; min-height: 32px; padding: 8px 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-pill); font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; }
.story-footer { gap: 16px; min-width: 0; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline-soft); }
.source-line { display: flex; flex: 1 1 0; align-items: center; gap: 8px; min-width: 0; max-width: none; color: var(--text-muted); font-size: var(--type-meta); line-height: 1; }
.channel-inline { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 20px; }
.channel-mark { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 20px; height: 20px; background: var(--black); color: var(--white); border-radius: 50%; font-family: var(--mono); font-size: var(--type-label); line-height: 1; }
.channel-mark .icon { display: block; }
.channel-wechat { background: var(--mint); color: var(--black); }
.channel-youtube { background: var(--coral); color: var(--black); }
.source-name { display: inline-flex; align-items: center; min-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; line-height: 1.2; }
.source-separator { display: inline-flex; align-items: center; min-height: 20px; line-height: 1; opacity: 0.5; }
.source-line time { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 20px; font-family: var(--sans); font-size: var(--type-label); letter-spacing: 0; line-height: 1.2; font-variant-numeric: tabular-nums; }
.card-actions { display: flex; flex: 0 0 auto; gap: 8px; margin-left: auto; }
.story-actions-wrap { position: relative; flex: 0 0 auto; }
.story-more-button .quick-reads-more-icon,
.story-more-button .icon { width: 18px; height: 18px; }
.story-more-menu { position: fixed; z-index: 70; width: min(248px, calc(100vw - 24px)); max-height: min(360px, calc(100dvh - 24px)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.story-more-menu-item .menu-item-icon { flex: 0 0 var(--ui-menu-icon-size); }
.story-more-menu-item > span { min-width: 0; flex: 1; }
.story-more-divider { height: 1px; margin: 6px 4px; border: 0; background: var(--hairline); }
.icon-button-small { width: var(--icon-touch); height: var(--icon-touch); background: var(--white); }
.icon-button-small.is-active { background: var(--black); color: var(--white); }


.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; padding: 48px 24px; background: var(--cream); border-radius: var(--radius-card); text-align: center; }
.empty-filter-state { background: var(--mint); }
.empty-mark { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 16px; background: var(--black); color: var(--white); border-radius: 50%; }
.empty-state h2, .empty-state h1 { margin: 0 0 12px; font-size: var(--type-heading); font-weight: 600; letter-spacing: -0.04em; }
.empty-state p { margin: 0 0 24px; font-size: var(--type-body); line-height: 1.6; }
.page-footer { gap: 24px; margin-top: var(--today-module-gap); padding: 16px var(--today-module-inset-x) 0; border-top: 1px solid var(--black); }
.footer-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.status-pulse { width: 8px; height: 8px; background: var(--lime); border: 1px solid var(--black); border-radius: 50%; }
.page-footer .outline-pill, .load-more-button { min-height: 44px; padding: 8px 16px; font-size: var(--type-label); }
.load-more-button { margin-left: auto; }
.load-more-icon, .refresh-icon, .load-more-fab .icon { width: 20px; height: 20px; }
.load-more-fab { position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 36; width: 48px; min-width: 48px; min-height: 48px; margin: 0; padding: 0; border: 1px solid var(--white); border-radius: var(--radius-pill); box-shadow: var(--shadow-fab); pointer-events: auto; }
.load-more-fab.has-tool-tooltip { position: fixed; }
.load-more-fab:hover { background: var(--lime); color: var(--black); border-color: var(--black); transform: translateY(-2px); }
.load-more-fab:active:not(:disabled) { transform: translateY(2px); }
.load-more-fab:disabled { cursor: wait; }
.load-more-spinner { width: 16px; height: 16px; border: 1px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.load-more-status { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding-left: 12px; color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); white-space: nowrap; }
.sr-only { position: absolute; width: 2px; height: 2px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.detail-shell { max-width: 1240px; margin: 0 auto; padding: 40px 48px 72px; }
.back-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: 12px; color: var(--black); }
.back-button:hover, .back-button:focus-visible { background: rgba(0, 0, 0, 0.06); }
.back-button .back-icon { width: 20px; height: 20px; }
.detail-hero { padding: 48px; background: var(--cream); border-radius: var(--radius-surface); }
.detail-hero-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.detail-hero h1 { max-width: 840px; margin: 24px 0 16px; font-size: clamp(36px, 6vw, 64px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.04; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; }
.detail-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-size: var(--type-meta); }
.detail-tags { margin-top: 24px; }
.reader-stage { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 24px; padding: 32px 0 52px; }
.reader-tool-rail { position: fixed; z-index: 40; top: 50%; left: 16px; display: flex; flex-direction: column; align-items: center; overflow: visible; transform: translateY(-50%); }
.reader-tool-stack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; background: var(--white); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); overflow: visible; }
.reader-tool-more-wrap, .reader-settings-wrap { position: relative; }
.reader-tool-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 0; border-radius: 12px; color: var(--black); text-decoration: none; }
.reader-tool-button:hover, .reader-tool-button:focus-visible { background: rgba(0, 0, 0, 0.06); outline: none; }
.reader-tool-button.is-active { background: rgba(0, 0, 0, 0.08); color: var(--black); }
.reader-tool-button:disabled { opacity: 0.45; cursor: not-allowed; }
.reader-tool-button .icon { width: 18px; height: 18px; }
.reader-aa { font-size: 14px; font-weight: 600; letter-spacing: -0.04em; }
.reader-more-menu { position: fixed; z-index: 90; isolation: isolate; width: min(220px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.reader-more-menu.is-closing { pointer-events: none !important; opacity: 0; transition: opacity 120ms ease; }
.reader-more-menu-item .menu-item-icon { flex: 0 0 var(--ui-menu-icon-size); }
.reader-more-menu-item > span { min-width: 0; flex: 1; }
.reader-more-menu-item kbd { color: var(--text-muted); font-family: var(--sans); font-size: 12px; line-height: 18px; white-space: nowrap; }
.reader-more-divider { height: 1px; margin: 6px 4px; background: var(--hairline); }
.reader-settings-panel { position: fixed; z-index: 90; width: min(300px, calc(100vw - 24px)); padding: 14px 16px 12px; overflow: visible; background: var(--white); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14); transform-origin: var(--reader-menu-origin-x, 50%) var(--reader-menu-origin-y, 50%); animation: reader-more-menu-in 380ms cubic-bezier(.22, 1, .36, 1) both; overscroll-behavior: contain; font-size: 14px; will-change: transform, opacity, filter; }
.reader-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; padding: 6px 0; }
.reader-settings-row--theme { align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid var(--hairline-soft); }
.reader-settings-row--stepper { min-height: 40px; }
.reader-settings-label { flex: 0 0 auto; color: var(--text-muted); font-size: 14px; font-weight: 600; line-height: 1.3; }
.reader-settings-row--theme .reader-settings-label { padding-top: 8px; }
.reader-settings-field { display: grid; gap: 6px; flex: 0 0 186px; width: 186px; min-width: 0; justify-items: end; }
.reader-settings-combobox { position: relative; width: 100%; }
.reader-settings-select.ui-choice-trigger { width: 100%; }
.reader-settings-options { position: fixed; z-index: 100; top: 0; right: auto; left: 0; display: grid; width: 186px; max-height: min(420px, calc(100dvh - 24px)); gap: 2px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.reader-theme-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
.reader-theme-swatch { display: flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 2px; background: var(--swatch); border: 1px solid var(--hairline); border-radius: 8px; color: var(--black); font-size: 12px; font-weight: 400; line-height: 1.2; }
.reader-theme-swatch.is-selected { border-color: #01b6ff; box-shadow: 0 0 0 2px #01b6ff; }
.reader-settings-stepper { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; min-height: 36px; }
.reader-settings-glyph { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; color: var(--black); }
.reader-settings-glyph-size { font-family: var(--reading); font-size: 14px; font-weight: 400; line-height: 1; letter-spacing: -0.02em; }
.reader-settings-row-icon { width: 14px; height: 14px; }
.reader-settings-icon-width { transform: rotate(90deg); }
.reader-settings-adjust-group { display: inline-flex; align-items: stretch; height: 36px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 8px; overflow: hidden; }
.reader-settings-adjust { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 100%; padding: 0; background: transparent; border: 0; border-radius: 0; color: var(--black); }
.reader-settings-adjust + .reader-settings-adjust { border-left: 1px solid var(--hairline); }
.reader-settings-adjust:hover:not(:disabled), .reader-settings-adjust:focus-visible:not(:disabled) { background: rgba(0, 0, 0, 0.04); outline: none; }
.reader-settings-adjust:disabled { opacity: 0.4; cursor: not-allowed; }
.reader-settings-adjust-icon { width: 14px; height: 14px; }
.reader-settings-reset { width: 100%; min-height: 32px; margin-top: 8px; padding: 6px 12px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 8px; color: var(--black); font-family: var(--sans); font-size: var(--reader-settings-control-size); font-weight: var(--reader-settings-control-weight); line-height: var(--reader-settings-control-line); text-align: center; }
.reader-settings-reset:hover, .reader-settings-reset:focus-visible { border-color: var(--black); outline: none; }
.reader-notebook-dock { position: fixed; z-index: 70; top: 32px; right: 24px; display: flex; align-items: center; gap: 2px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; animation: popover-in var(--motion-fast) ease-out both; }
.reader-dock-button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 12px; color: var(--black); }
.reader-dock-button:hover, .reader-dock-button:focus-visible, .reader-dock-button.is-active { background: var(--reader-soft); border-color: var(--reader-line); outline: none; }
.reader-app.reader-color-dark .reader-notebook-dock { border-color: transparent; box-shadow: none; }
.reader-app.reader-color-dark .reader-dock-button:hover, .reader-app.reader-color-dark .reader-dock-button:focus-visible, .reader-app.reader-color-dark .reader-dock-button.is-active { background: rgba(255, 255, 255, 0.1); border-color: var(--reader-line); }
.reader-dock-button .icon { width: 18px; height: 18px; }
.reader-layout { min-width: 0; padding: 0; }
.reader-column { max-width: var(--reader-width, 720px); margin: 0 auto; color: var(--reader-text, inherit); }
.reader-outline {
  --reader-outline-width: 156px;
  --reader-outline-edge: clamp(32px, 6vw, 80px);
  position: fixed;
  z-index: 60;
  top: 50%;
  transform: translateY(-50%);
  right: var(--reader-outline-edge);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(var(--reader-outline-width), calc((100vw - var(--reader-width, 720px)) / 2 - 24px));
  max-height: min(560px, calc(100vh - 48px));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--reader-text);
  box-shadow: none;
  transition: right 220ms ease;
}
.reader-outline::-webkit-scrollbar { display: none; width: 0; height: 0; }
.reader-outline.is-notebook-open {
  right: calc(min(340px, 100vw) + 24px);
}
.reader-scroll-progress {
  --reader-progress-right: calc(clamp(32px, 6vw, 80px) + 156px + 18px);
  position: fixed;
  z-index: 55;
  top: 50%;
  right: var(--reader-progress-right);
  display: block;
  width: 44px;
  height: 240px;
  pointer-events: none;
  user-select: none;
  transform: translateY(-50%);
  transition: right 220ms ease;
}
.reader-scroll-progress[hidden] { display: none; }
.reader-scroll-progress.is-notebook-open { right: calc(min(340px, 100vw) + 24px + 156px + 18px); }
.reader-scroll-progress-track {
  position: relative;
  display: block;
  margin-left: calc(50% - 3px);
  width: 6px;
  height: 240px;
  overflow: visible;
  background: #d9d9d9;
  border-radius: 3px;
}
.reader-scroll-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 6px;
  height: var(--reader-progress-height, 0px);
  background: #000000;
  border-radius: 3px;
}
.reader-scroll-progress-marker {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 16px;
  height: 1px;
  background: #000000;
  transform: translate(-50%, var(--reader-progress-offset, 0px));
}
.reader-scroll-progress-value {
  position: absolute;
  top: 0;
  left: calc(50% + 14px);
  display: block;
  color: #000000;
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(var(--reader-progress-offset, 0px));
}
@media (min-width: 1024px) {
  .reader-page-main.is-notebook-open {
    transform: translateX(min(0px, calc(50vw - 904px)));
  }
}
.reader-outline-kicker {
  color: var(--reader-muted);
  font-family: var(--sans);
  margin: 0 16px 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 16px;
}
.reader-outline h2 {
  display: -webkit-box;
  margin: 0 16px 8px;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 476;
  letter-spacing: normal;
  line-height: 32px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.reader-outline-nav { display: grid; gap: 0; }
.reader-outline-link {
  display: block;
  min-height: 0;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--reader-muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.reader-outline-link:hover,
.reader-outline-link:focus-visible { color: var(--reader-text); background: var(--reader-soft); outline: none; }
.reader-outline-link:hover { color: var(--reader-text); background: color-mix(in srgb, var(--reader-soft) 66%, transparent); transform: translateX(4px); }
.reader-outline-link.is-active { color: var(--reader-text); border-color: var(--reader-muted); outline: none; }
.reader-prose [id^="reader-section-"] { scroll-margin-top: 96px; }
.reader-app { min-height: 100vh; background: var(--reader-surface); color: var(--reader-text); }
.reader-app.reader-theme-white { --reader-surface: #ffffff; --reader-text: #000000; --reader-soft: #e3e1e3; --reader-line: rgba(0, 0, 0, 0.12); --reader-muted: rgba(0, 0, 0, 0.58); }
.reader-app.reader-theme-sepia { --reader-surface: #c6f4ff; --reader-text: #000000; --reader-soft: #fe8282; --reader-line: rgba(0, 0, 0, 0.12); --reader-muted: rgba(0, 0, 0, 0.58); }
.reader-app.reader-theme-paper { --reader-surface: #d9d9d9; --reader-text: #000000; --reader-soft: #e3e1e3; --reader-line: rgba(0, 0, 0, 0.12); --reader-muted: rgba(0, 0, 0, 0.58); }
.reader-app.reader-theme-dawn { --reader-surface: #fe8282; --reader-text: #000000; --reader-soft: #c6f4ff; --reader-line: rgba(0, 0, 0, 0.12); --reader-muted: rgba(0, 0, 0, 0.58); }
.reader-app.reader-color-dark { --reader-surface: #000000; --reader-text: #ffffff; --reader-soft: rgba(255, 255, 255, 0.1); --reader-line: rgba(255, 255, 255, 0.18); --reader-muted: rgba(255, 255, 255, 0.62); }
.reader-app.reader-color-dark.reader-theme-carbon { --reader-surface: #000000; --reader-text: #ffffff; --reader-soft: rgba(255, 255, 255, 0.1); --reader-line: rgba(255, 255, 255, 0.18); --reader-muted: rgba(255, 255, 255, 0.62); }
.reader-app.reader-color-dark.reader-theme-black { --reader-surface: #000000; --reader-text: #ffffff; --reader-soft: rgba(255, 255, 255, 0.1); --reader-line: rgba(255, 255, 255, 0.18); --reader-muted: rgba(255, 255, 255, 0.62); }
.reader-app.reader-color-dark.reader-theme-winter { --reader-surface: #000000; --reader-text: #c6f4ff; --reader-soft: rgba(198, 244, 255, 0.1); --reader-line: rgba(198, 244, 255, 0.22); --reader-muted: rgba(198, 244, 255, 0.72); }
.reader-app.reader-color-dark.reader-theme-forest { --reader-surface: #000000; --reader-text: #fe8282; --reader-soft: rgba(254, 130, 130, 0.1); --reader-line: rgba(254, 130, 130, 0.22); --reader-muted: rgba(254, 130, 130, 0.72); }
.reader-app { --black: var(--reader-text); --white: var(--reader-surface); --surface-soft: var(--reader-soft); --hairline: var(--reader-line); --hairline-soft: var(--reader-line); --text-muted: var(--reader-muted); }
.reader-app .detail-shell { min-height: 100vh; background: var(--reader-surface); color: var(--reader-text); }
.reader-stage { background: transparent; }
.reader-layout { background: transparent; border-radius: var(--radius-card); }
.reader-heading { padding-bottom: 16px; border-bottom: 1px solid var(--black); }
.reader-length { font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.reader-lead { margin: 0 0 28px; padding: 20px 22px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); color: color-mix(in srgb, var(--ink) 78%, transparent); font-size: calc(var(--reader-font-size, 20px) * 0.92); line-height: 1.7; }
.reader-lead p { margin: 0; }
.reader-lead--empty { color: color-mix(in srgb, var(--ink) 52%, transparent); }
.reader-lead-source { margin: 12px 0 0; font-size: 0.82em; color: color-mix(in srgb, var(--ink) 48%, transparent); }
.reader-body-empty { margin: 12px 0 0; color: color-mix(in srgb, var(--ink) 58%, transparent); font-size: calc(var(--reader-font-size, 20px) * 0.95); }
.reader-prose { font-family: var(--reader-font-family, var(--reading)); font-size: var(--reader-font-size, 20px); font-weight: 400; letter-spacing: 0.01em; line-height: var(--reader-line-height, 1.75); color: inherit; }
.reader-prose p { margin: 28px 0 0; }
.reader-highlight { padding: 0 0.08em; background: #fafb66; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reader-highlight.is-located { background: #fafb66; outline: 2px solid rgba(0, 0, 0, 0.18); outline-offset: 2px; }
.reader-notebook { position: fixed; z-index: 70; inset: 0 0 0 auto; display: flex; flex-direction: column; width: min(340px, 100vw); min-width: 0; padding: 0 24px 24px; border: 0; border-left: 1px solid var(--hairline); background: var(--white); overflow: hidden; }
.reader-notebook-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; padding: calc(env(safe-area-inset-top) + 16px) 0 14px; border-bottom: 1px solid var(--hairline-soft); }
.reader-notebook-header h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -0.035em; }
.reader-notebook-actions { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.notebook-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 0; border-radius: 12px; color: var(--black); }
.notebook-icon-button:hover, .notebook-icon-button:focus-visible { background: rgba(0, 0, 0, 0.06); outline: none; }
.notebook-icon-button .icon { width: 18px; height: 18px; }
.notebook-collapse-icon { position: relative; display: block; width: 20px; height: 20px; font-size: 0; }
.notebook-collapse-icon::before, .notebook-collapse-icon::after { position: absolute; top: 6px; width: 10px; height: 10px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; content: ""; transform: rotate(45deg); }
.notebook-collapse-icon::before { left: 0; }
.notebook-collapse-icon::after { left: 8px; }
.reader-notebook-compose { position: relative; display: block; padding: 18px 0 18px 16px; border-bottom: 1px solid var(--hairline); }
.reader-notebook-compose::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 0; width: 4px; background: rgba(0, 0, 0, 0.14); border-radius: 10000px; }
.reader-notebook-compose textarea { display: block; width: 100%; min-height: 72px; max-height: 180px; padding: 0; overflow: hidden; resize: none; background: transparent; border: 0; font-family: var(--sans); font-size: var(--type-body); line-height: 1.6; color: var(--black); }
.reader-notebook-compose textarea.is-expanded { max-height: none; }
.reader-notebook-compose textarea::placeholder { color: var(--text-muted); }
.reader-notebook-compose textarea:focus { outline: none; }
.reader-note-compose-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.notebook-save-button { min-height: 36px; padding: 6px 14px; font-size: var(--type-label); }
.reader-note-status { color: var(--text-muted); font-size: var(--type-label); line-height: 1.45; }
.reader-note-status.is-error { color: #ff7238; }
.notebook-note-toggle { display: block; margin-top: 10px; padding: 0; background: transparent; border: 0; color: var(--text-muted); font: inherit; font-size: var(--type-label); cursor: pointer; }
.notebook-note-toggle:hover, .notebook-note-toggle:focus-visible { color: var(--black); text-decoration: underline; text-underline-offset: 4px; outline: none; }
.notebook-highlights { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-top: 8px; }
.notebook-empty { margin: 16px 0 0; color: var(--text-muted); font-size: var(--type-label); line-height: 1.5; }
.notebook-highlight { position: relative; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.notebook-highlight-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.notebook-highlight-progress { padding: 0; background: transparent; border: 0; color: var(--text-muted); font-family: var(--sans); font-size: 12px; font-variant-numeric: tabular-nums; cursor: pointer; }
.notebook-highlight-progress:hover, .notebook-highlight-progress:focus-visible { color: var(--black); outline: none; text-decoration: underline; text-underline-offset: 4px; }
.notebook-highlight-menu-wrap, .notebook-header-menu-wrap, .notebook-compose-menu-wrap { position: relative; }
.reader-note-compose-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notebook-highlight-quote { position: relative; display: block; width: 100%; margin: 0; padding: 0 0 0 14px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.notebook-highlight-quote:hover .notebook-highlight-text, .notebook-highlight-quote:focus-visible .notebook-highlight-text { text-decoration: underline; text-underline-offset: 4px; }
.notebook-highlight-quote:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.notebook-highlight-bar { position: absolute; top: 0.2em; bottom: 0.2em; left: 0; width: 4px; background: #fafb66; border-radius: 10000px; }
.notebook-highlight-text { display: block; margin: 0; font-family: var(--reading); font-size: 16px; line-height: 1.65; }
.notebook-highlight-note-text { margin: 10px 0 0; padding-left: 14px; color: var(--text-muted); font-size: var(--type-label); line-height: 1.6; white-space: pre-wrap; }
.notebook-highlight-note textarea { display: block; width: 100%; min-height: 88px; margin-top: 10px; padding: 10px 12px; resize: vertical; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--radius-control); font: inherit; line-height: 1.6; }
.notebook-highlight-editor-actions { display: flex; gap: 12px; margin-top: 8px; padding-left: 14px; }
.notebook-menu { position: fixed; z-index: 92; width: min(220px, calc(100vw - 24px)); min-width: 0; max-height: calc(100dvh - 24px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.notebook-menu-item .menu-item-icon { flex: 0 0 var(--ui-menu-icon-size); }
.notebook-menu-item > span { min-width: 0; flex: 1; }
.notebook-menu-divider { height: 1px; margin: 6px 4px; background: var(--hairline); }
.notebook-text-button { padding: 6px 10px; background: transparent; border: 0; border-radius: 8px; color: var(--black); font-family: var(--sans); font-size: 14px; font-weight: 500; }
.notebook-text-button:hover:not(:disabled), .notebook-text-button:focus-visible:not(:disabled) { background: rgba(0, 0, 0, 0.06); outline: none; }
.notebook-text-button:disabled { opacity: 0.48; cursor: wait; }
.notebook-highlight.is-batch-mode .notebook-highlight-head { align-items: flex-start; }
.notebook-highlight-check { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -8px 2px -8px -8px; flex: 0 0 32px; cursor: pointer; }
.notebook-highlight-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.notebook-check-indicator { display: block; width: 18px; height: 18px; border: 1px solid rgba(0, 0, 0, 0.24); border-radius: 8px; background: var(--white); transition: background var(--motion-fast), border-color var(--motion-fast); }
.notebook-highlight-check input:checked + .notebook-check-indicator { border-color: var(--black); background: var(--black); box-shadow: inset 0 0 0 2px var(--white); }
.notebook-highlight-check input:focus-visible + .notebook-check-indicator { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.notebook-highlight.is-selected { background: rgba(0, 0, 0, 0.035); margin-inline: -8px; padding-inline: 8px; border-radius: 12px; }
.notebook-highlight.is-batch-mode .notebook-highlight-quote:hover .notebook-highlight-text, .notebook-highlight.is-batch-mode .notebook-highlight-quote:focus-visible .notebook-highlight-text { text-decoration: none; }
.reader-notebook.is-batch-mode .reader-notebook-compose { opacity: 0.56; }
.notebook-batch-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-shrink: 0; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--hairline); }
.notebook-batch-count { margin-right: auto; color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.notebook-batch-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 10000px; color: var(--black); font-family: var(--sans); font-size: 14px; font-weight: 500; }
.notebook-batch-action:hover:not(:disabled), .notebook-batch-action:focus-visible:not(:disabled) { background: rgba(0, 0, 0, 0.06); outline: none; }
.notebook-batch-action:disabled { opacity: 0.48; cursor: wait; }
.notebook-batch-action-danger { min-height: 44px; min-width: 108px; background: #fe8282; border-color: #ff7238; color: var(--black); }
.notebook-batch-action-danger:hover:not(:disabled), .notebook-batch-action-danger:focus-visible:not(:disabled) { background: #fe8282; border-color: #ff7238; }
.notebook-batch-icon { width: 16px; height: 16px; }
.notebook-confirm-dialog { width: min(360px, 100%); padding: 24px; border-radius: 20px; background: var(--white); text-align: center; }
.notebook-confirm-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.notebook-confirm-dialog p { margin: 12px 0 0; color: var(--text-muted); font-size: var(--type-body); line-height: 1.6; }
.notebook-confirm-actions { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }
.reader-library-inline { position: static; margin-top: 28px; }
.summary-source { display: flex; align-items: center; gap: 8px; margin-top: 32px; padding: 16px; background: var(--surface-soft); border-radius: var(--radius-control); font-family: var(--sans); font-size: var(--type-label); font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.reader-notes { margin-top: 32px; padding: 20px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.reader-notes-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.reader-notes-header h2 { margin: 8px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.reader-notes .close-button { width: 36px; height: 36px; }
.reader-notes textarea { display: block; width: 100%; min-height: 132px; margin-top: 20px; padding: 14px; resize: vertical; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-control); font-family: var(--sans); font-size: var(--type-body); line-height: 1.6; }
.reader-notes textarea:focus { border-color: var(--black); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.reader-notes .small-pill { margin-top: 12px; }
.reader-selection-fallback { margin-top: 24px; padding: 16px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: var(--radius-card); }
.reader-selection-fallback p { margin: 0; font-family: var(--sans); font-size: var(--type-label); line-height: 1.5; }
.reader-selection-fallback p + p { margin-top: 8px; }
.reader-selection-toolbar { position: fixed; z-index: 76; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--white); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); transform-origin: var(--reader-menu-origin-x, 50%) var(--reader-menu-origin-y, 50%); animation: reader-more-menu-in 380ms cubic-bezier(.22, 1, .36, 1) both; will-change: transform, opacity, filter; }
.reader-selection-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; border-radius: 8px; color: var(--black); }
.reader-selection-button:hover:not(:disabled), .reader-selection-button:focus-visible:not(:disabled) { background: rgba(0, 0, 0, 0.06); outline: none; }
.reader-selection-button:disabled { opacity: 0.48; cursor: wait; }
.reader-selection-button .icon { width: 18px; height: 18px; }
.has-tool-tooltip { position: relative; }
.tool-tooltip { position: absolute; top: 50%; left: calc(100% + 10px); z-index: 100; display: none; align-items: center; gap: 6px; max-width: min(280px, calc(100vw - 24px)); padding: 6px 10px; overflow: hidden; background: #000000; color: var(--white); border-radius: 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); font-family: var(--sans); font-size: 12px; font-weight: 500; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; transform: translateY(-50%); }
.tool-tooltip kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.24); border-radius: 4px; font-family: var(--sans); font-size: 12px; line-height: 1; }
.tool-tooltip::before { content: ""; position: absolute; top: 50%; right: 100%; transform: translateY(-50%); border: 6px solid transparent; border-right-color: #000000; }
.has-tool-tooltip:hover .tool-tooltip, .has-tool-tooltip:focus-visible .tool-tooltip { display: inline-flex; }
.has-tool-tooltip--above .tool-tooltip { top: auto; right: auto; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.has-tool-tooltip--above .tool-tooltip::before { display: none; }
.has-tool-tooltip--above .tool-tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #000000; }
.has-tool-tooltip--below .tool-tooltip { top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }
.has-tool-tooltip--below .tool-tooltip::before { top: auto; right: auto; bottom: 100%; left: 50%; transform: translateX(-50%); border-right-color: transparent; border-bottom-color: #000000; }
.back-button:not(.has-tool-tooltip), .reader-back-button:not(.has-tool-tooltip), .reader-tool-button:not(.has-tool-tooltip) { position: relative; }
.reader-selection-status { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 280px; margin: 0; padding: 8px 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: 8px; color: #ff7238; font-size: var(--type-label); line-height: 1.4; box-shadow: var(--shadow-soft); }
.reader-selection-version { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 0; background: transparent; color: var(--text-muted); font-size: var(--type-label); white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; }
.reader-selection-error { color: #ff7238; }
.reader-selection-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-top: 12px; }
.reader-selection-actions .small-pill { margin-top: 0; }
.reader-annotations { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--black); }
.reader-annotations-heading h2 { margin: 8px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.reader-annotations blockquote { margin: 16px 0 0; padding: 14px 16px; background: var(--surface-soft); border-left: 1px solid var(--lime); }
.reader-annotations blockquote p { margin: 0; line-height: 1.6; }
.reader-annotations blockquote cite { display: block; margin-top: 8px; color: var(--text-muted); font-family: var(--sans); font-size: var(--type-label); font-style: normal; }
.annotation-card { margin-top: 16px; padding: 18px; border: 1px solid var(--hairline); border-radius: var(--radius-card); overflow-wrap: break-word; }
.annotation-kind { color: var(--text-muted); font-size: var(--type-label); }
.annotation-card blockquote { margin: 12px 0; }
.annotation-note { margin: 12px 0 0; white-space: pre-wrap; line-height: 1.6; }
.annotation-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }
.annotation-actions .text-button { min-height: 44px; }
.annotation-editor { margin-top: 16px; }
.annotation-editor label { display: grid; gap: 8px; font-size: var(--type-label); }
.annotation-editor textarea { width: 100%; min-height: 112px; resize: vertical; padding: 12px; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-control); font: inherit; line-height: 1.6; }
.annotation-editor textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.annotation-editor p { margin: 12px 0; font-size: var(--type-label); line-height: 1.6; }
.reader-ask { margin-top: 32px; padding: 20px; background: var(--lilac); border: 1px solid var(--black); border-radius: var(--radius-card); }
.reader-ask-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.reader-ask-header h2 { margin: 8px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.reader-ask .close-button { width: 36px; height: 36px; }
.reader-ask-boundary { margin: 16px 0 0; color: var(--text-muted); font-size: var(--type-label); line-height: 1.5; }
.reader-ask-field { display: grid; gap: 8px; margin-top: 20px; font-size: var(--type-label); font-weight: 600; }
.reader-ask textarea { display: block; width: 100%; min-height: 88px; padding: 14px; resize: vertical; background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-control); font-family: var(--sans); font-size: var(--type-body); font-weight: 400; line-height: 1.6; }
.reader-ask textarea:focus { border-color: var(--black); outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.reader-ask .small-pill { margin-top: 12px; }
.ask-result { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(0, 0, 0, 0.25); }
.ask-result p { margin: 8px 0 0; line-height: 1.6; }
.ask-result-error { color: #ff7238; }
.ask-answer { font-size: var(--type-body); font-weight: 600; }
.ask-status-copy { color: var(--text-muted); font-size: var(--type-label); }
.ask-citations { display: grid; gap: 8px; margin-top: 16px; font-size: var(--type-label); }
.ask-citations strong { font-weight: 600; }
.ask-citations span { padding: 10px 12px; background: rgba(255, 255, 255, 0.58); border-radius: var(--radius-control); line-height: 1.5; }
.ask-citation { display: grid; gap: 4px; padding: 10px 12px; background: rgba(255, 255, 255, 0.58); border-radius: var(--radius-control); color: inherit; text-decoration: none; line-height: 1.5; }
.ask-citation:hover { outline: 2px solid var(--hairline); }
.ask-citation strong, .ask-citation span { padding: 0; background: transparent; }
.ask-citation span { color: var(--text-muted); }
.reader-related { position: sticky; top: calc(var(--topbar-height) + 24px); min-width: 0; }
.reader-related-header { padding-bottom: 16px; border-bottom: 1px solid var(--black); }
.reader-related-header h2 { margin: 0; font-size: var(--type-title); font-weight: 600; letter-spacing: -0.025em; }
.related-card { display: block; margin-top: 16px; padding: 16px; background: var(--surface-soft); border-radius: var(--radius-card); text-decoration: none; }
.related-card:hover, .related-card:focus-visible { background: var(--lime); }
.related-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.related-card-grade { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--mint); border-radius: 50%; font-size: var(--type-label); font-weight: 600; }
.related-card-time, .related-card p { color: var(--text-muted); font-family: var(--sans); font-size: var(--type-label); font-weight: 500; }
.related-card h3 { margin: 20px 0 12px; font-size: var(--type-meta); font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.related-card p { margin: 0; line-height: 1.4; }
.source-mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: var(--lime); border-radius: 50%; }
.source-mark .icon { width: 12px; height: 12px; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; border-top: 1px solid var(--black); }
.detail-secondary-actions { display: flex; gap: 8px; }
.detail-secondary-actions .outline-pill { min-height: 44px; padding: 8px 16px; font-size: var(--type-meta); }
.detail-shell > .black-pill { min-height: 48px; padding: 10px 20px; font-size: 16px; }
.detail-shell .tag { min-height: 30px; padding: 6px 12px; background: var(--surface-soft); border: 0; font-size: 12px; }
.detail-shell .channel-mark { width: 18px; height: 18px; }
.missing-state { max-width: 680px; margin: 100px auto; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(360px, calc(100vw - 48px)); padding: 14px 18px; background: var(--black); color: var(--white); border-radius: var(--radius-pill); box-shadow: var(--shadow-soft); font-size: 14px; animation: toast-in var(--motion-fast) ease-out both; }
.notification-panel { right: 0; width: 380px; }
.notification-item { display: flex; align-items: flex-start; width: 100%; gap: 8px; margin-top: 16px; padding: 16px; background: var(--surface-soft); border-radius: var(--radius-control); text-align: left; }
.notification-item:hover { background: var(--lime); }
.notification-item.is-read { opacity: 0.68; }
.notification-status-mark { display: block; width: 8px; height: 8px; flex: 0 0 8px; margin-top: 8px; background: var(--magenta); border-radius: 50%; }
.queue-collect-status { margin: 8px 0 0; }
.queue-collect-status-button { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; padding: 0; color: var(--text-muted); font-size: var(--type-label); line-height: 1.45; }
.queue-collect-status-button:hover { color: var(--text); }
.queue-collect-status-mark { display: block; width: 8px; height: 8px; flex: 0 0 8px; background: var(--magenta); border-radius: 50%; }
.queue-collect-status-mark.is-running { animation: queue-collect-pulse 1.2s ease-in-out infinite; }
@keyframes queue-collect-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}
.notification-copy { display: flex; flex-direction: column; gap: 8px; }
.notification-copy strong { font-size: var(--type-meta); font-weight: 600; }
.notification-copy span, .notification-copy small { font-size: var(--type-label); line-height: 1.45; }
.notification-copy small { color: var(--text-muted); opacity: 1; }
.sidebar-backdrop { display: none; }

@keyframes popover-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reader-more-menu-in {
  0% { opacity: 0; filter: blur(5px); transform: scale(.78) translate3d(0, -5px, 0); border-radius: 999px; }
  62% { opacity: 1; filter: blur(.7px); transform: scale(1.018) translate3d(0, 0, 0); border-radius: 19px; }
  82% { filter: blur(0); transform: scale(.994) translate3d(0, 0, 0); border-radius: 17px; }
  100% { opacity: 1; filter: blur(0); transform: scale(1) translate3d(0, 0, 0); border-radius: 16px; }
}

@keyframes reader-more-menu-out {
  0% { opacity: 1; filter: blur(0); transform: scale(1); border-radius: 16px; }
  62% { opacity: .7; filter: blur(1.8px); transform: scale(.9); border-radius: 20px; }
  100% { opacity: 0; filter: blur(4px); transform: scale(.78); border-radius: 999px; }
}

@keyframes reader-more-menu-item-in {
  from { opacity: 0; filter: blur(4px); transform: translate3d(-6px, 5px, 0); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }
}

@keyframes reader-more-menu-item-out {
  from { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0); }
  to { opacity: 0; filter: blur(3px); transform: translate3d(-4px, 2px, 0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrim-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes search-empty-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 1340px) {
  .topic-strip { grid-auto-columns: calc((100% - 5 * var(--carousel-gap)) / 6); }
}

@media (min-width: 1080px) and (max-width: 1339px) {
  .topic-strip { grid-auto-columns: calc((100% - 3 * var(--carousel-gap)) / 4); }
}

@media (max-width: 999px) {
  .quick-reads-strip { grid-auto-columns: calc((100% - 2 * var(--carousel-gap)) / 3); }
}

@media (max-width: 1100px) {
  :root { --library-pane-inset-x: 32px; --home-page-inset-x: 24px; }
  .topbar { padding: env(safe-area-inset-top) 24px 0; }
  .brand-cluster { flex-basis: 240px; min-width: 240px; }
  .main-content { padding-right: 32px; padding-left: 32px; }
  .reader-stage { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  :root { --today-module-inset-x: 28px; --today-module-inset-y: 28px; }
  :root { --topbar-height: calc(72px + env(safe-area-inset-top)); }
  .topbar { min-height: var(--topbar-height); }
  .topbar-today { padding-left: 24px; }
  .topbar-today::before, .topbar-today::after { display: none; }
  .topbar-today .brand-cluster { display: flex; }
  .brand-cluster { flex: 0 1 auto; min-width: auto; }
  .mobile-menu-button { display: inline-flex; }
  .workspace, .workspace:has(.sidebar:not(.is-collapsed)) { display: block; min-height: calc(100vh - var(--topbar-height)); --sidebar-width: 0px; }
  .sidebar, .sidebar.is-collapsed { position: fixed; z-index: 80; top: var(--topbar-height); left: 0; display: flex; width: min(296px, calc(100vw - 48px)); height: calc(100vh - var(--topbar-height)); margin-top: 0; overflow-x: hidden; overflow-y: auto; transform: translateX(-104%); transition: transform 180ms ease; box-shadow: var(--shadow-soft); }
  .sidebar.is-collapsed .brand-copy,
  .sidebar.is-collapsed .side-nav-item > span:not(.nav-glyph):not(.tool-tooltip),
  .sidebar.is-collapsed .sidebar-toggle-label { opacity: 1; visibility: visible; pointer-events: auto; }
  .sidebar.is-collapsed .brand-copy { display: flex; }
  .sidebar.is-collapsed .sidebar-brand { justify-content: flex-start; margin-right: 12px; margin-left: 12px; }
  .sidebar.is-collapsed .side-nav-item { grid-template-columns: 20px minmax(0, 1fr) auto; justify-self: stretch; justify-items: initial; width: auto; min-width: 0; height: auto; min-height: 44px; padding-right: 12px; padding-left: 12px; }
  .sidebar.is-collapsed .side-nav-item > span:not(.nav-glyph):not(.tool-tooltip) { display: block; }
  .sidebar.is-collapsed .sidebar-section { gap: 4px; }
  .sidebar.is-collapsed .side-nav-item { border-radius: var(--radius-pill); }
  .sidebar.is-collapsed .sidebar-rule { margin-right: 12px; margin-left: 12px; }
  .sidebar.is-collapsed .brand-expand-button { width: auto; height: auto; }
  .sidebar.is-collapsed .sidebar-utilities { flex-direction: row; gap: 8px; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; z-index: 70; inset: var(--topbar-height) 0 0; display: block; width: 100%; height: calc(100vh - var(--topbar-height)); background: rgba(0, 0, 0, 0.38); animation: scrim-in var(--motion-fast) ease-out both; }
  .main-content { max-width: 860px; padding: 32px 32px 68px; }
  .toolbar { grid-template-columns: max-content minmax(0, 1fr) max-content max-content; gap: 12px; }
  .toolbar-title { font-size: 20px; }
  .search-field { max-width: none; }
  .topic-strip { grid-auto-columns: calc((100% - 2 * var(--carousel-gap)) / 2.5); }
  .quick-reads-strip { grid-auto-columns: calc((100% - 2 * var(--carousel-gap)) / 3.5); }
  .sidebar-utility-wrap .notification-panel { top: auto; right: auto; bottom: 20px; left: 312px; }
  .reader-stage { grid-template-columns: minmax(0, 1fr); }
  .reader-notebook-dock { top: calc(env(safe-area-inset-top) + 16px); right: 16px; }
  .reader-notebook { width: min(100vw, 360px); }
  .reader-related { position: static; grid-column: 2; margin-top: 40px; }
}

@media (max-width: 767px) {
  :root { --today-module-inset-x: 20px; --today-module-inset-y: 20px; --today-module-gap: 32px; --library-pane-inset-x: 16px; --page-heading-inset-x: 16px; --home-page-inset-x: 16px; --home-page-section-gap: 32px; }
  html, body, #app { max-width: 100%; overflow-x: hidden; }
  .topbar { padding: env(safe-area-inset-top) 16px 0; }
  .brand-copy strong { font-size: 14px; }
  .brand-copy span { display: none; }
  .top-tabs { display: none; }
  .top-actions { gap: 8px; }
  .icon-button, .avatar-button { width: var(--icon-touch); height: var(--icon-touch); }
  .main-content { max-width: 100%; overflow-x: hidden; padding: 24px 16px 48px; }
  .inbox-masthead { display: flex; min-height: 72px; border-radius: var(--radius-surface); }
  .hero-copy h1 { margin-top: 6px; font-size: clamp(20px, 5.5vw, 24px); }
  .hero-orbit { display: none; }
  .search-page .toolbar-area { margin-top: 0; padding-top: 20px; }
  .search-page .toolbar { grid-template-columns: minmax(0, 1fr) max-content; }
  .toolbar { grid-template-columns: minmax(0, 1fr) max-content; width: 100%; gap: 8px; }
  .toolbar-title, .search-field { grid-column: 1 / -1; }
  .toolbar-title { min-width: 0; font-size: 24px; }
  .search-field { width: 100%; max-width: none; }
  .toolbar .result-count { grid-column: 1; align-self: center; }
  .filter-more-trigger { grid-column: 2; width: auto; min-width: 0; justify-self: stretch; padding-right: 12px; padding-left: 12px; }
  .topics-section { margin-top: var(--today-module-gap); }
  .topics-heading-copy { flex-direction: column-reverse; }
  .topics-heading-copy h2, .quick-reads-heading h2 { font-size: 16px; }
  .topic-actions { opacity: 1; visibility: visible; transform: translateY(0); }
  .topic-control { width: 36px; height: 36px; }
  .topic-control .icon { width: 14px; height: 14px; }
  .topic-control-prev { left: 10px; }
  .topic-control-next { right: 10px; }
  .topic-strip { grid-auto-columns: calc(100% - 32px); gap: 20px; }
  .topic-carousel--accordion { display: block; }
  .topic-accordion { width: auto; max-width: none; height: min(520px, calc(100svh - 210px)); min-height: 390px; flex-direction: column; gap: 8px; perspective: none; }
  .topic-accordion-panel { flex: 1 1 0; width: auto; transform: none !important; }
  .topic-accordion-panel.is-active { flex: var(--accordion-active-grow) 1 0; width: auto; }
  .topic-accordion-body { padding: 20px; }
  .topic-accordion-panel .topic-card-body .topic-card-title { font-size: 18px; }
  .topic-accordion-more { width: 100%; height: 56px; margin-top: 12px; }
  .topic-accordion-more .topic-more-card { min-height: 56px; }
  .topic-card-body { padding: 18px 18px 16px; }
  .quick-reads-section { margin-top: var(--today-module-gap); border-radius: var(--radius-card); }
  .quick-reads-heading { gap: 10px; margin-bottom: 16px; }
  .quick-reads-strip { grid-auto-columns: calc((100% - var(--carousel-gap)) / 2); gap: 20px; }
  .category-feed { gap: var(--today-module-gap); margin-top: var(--today-module-gap); }
  .category-section { border-radius: var(--radius-card); }
  .category-heading h2 { font-size: 16px; }
  .quick-reads-feedback-menu { right: 0; left: auto; width: min(186px, calc(100vw - 64px)); }
  .popover { right: 0; width: min(480px, calc(100vw - 32px)); }
  .popover-scrim { position: fixed; z-index: 55; inset: var(--topbar-height) 0 0; display: block; width: 100%; height: calc(100dvh - var(--topbar-height)); padding: 0; background: rgba(0, 0, 0, 0.38); animation: scrim-in var(--motion-fast) ease-out both; }
  .more-panel { position: fixed; z-index: 60; top: calc(var(--topbar-height) + 16px); right: 16px; bottom: 16px; left: 16px; width: auto; max-height: none; border-radius: var(--radius-card); }
  .more-panel .popover-footer { position: sticky; bottom: 0; margin-top: 24px; padding-bottom: 4px; background: var(--white); }
  .story-card { padding: 16px 0; }
  .story-list, .story-card, .story-content { width: 100%; max-width: 100%; }
  .story-row { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
  .source-avatar { width: 32px; height: 32px; border-radius: var(--radius-control); font-size: var(--type-label); }
  .story-topline { display: block; }
  .story-title { max-width: 100%; font-size: 18px; -webkit-line-clamp: 2; }
  .story-facts { flex-wrap: wrap; margin-top: 8px; white-space: normal; }
  .story-summary { font-size: var(--type-body); }
  .source-line { flex-basis: 180px; }
  .card-actions { margin-left: auto; }
  .story-more-menu { width: min(248px, calc(100vw - 24px)); }
  .icon-button-small { width: var(--icon-touch); height: var(--icon-touch); }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-footer .load-more-status { margin-left: 0; padding-left: 0; }
  .page-footer .outline-pill { width: 100%; }
  .load-more-fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 44px; min-width: 44px; min-height: 44px; }
  .detail-shell { padding: 24px 16px 48px; }
  #app:has(> .detail-shell) .detail-shell { padding: calc(env(safe-area-inset-top) + 64px) 16px 48px; }
  .reader-back-button { left: 12px; }
  .reader-tool-rail { position: static; width: 100%; margin: 0 0 16px; transform: none; }
  #app:has(> .detail-shell) .detail-hero.reader-hero h1 { font-size: 32px; }
  .reader-stage { display: grid; padding: 24px 0 36px; }
  .reader-tool-stack { flex-direction: row; justify-content: center; flex-wrap: wrap; width: 100%; box-sizing: border-box; }
  .reader-layout { padding: 0; }
  .reader-related { position: static; margin-top: 40px; }
  .reader-prose { font-size: 18px; line-height: 1.75; }
  .reader-selection-fallback { align-items: stretch; }
  .reader-selection-actions { justify-content: space-between; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-actions > .black-pill { width: 100%; }
  .detail-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-secondary-actions .outline-pill { padding: 8px 10px; font-size: 12px; }
  .notification-panel { position: fixed; top: calc(var(--topbar-height) + 16px); right: 16px; width: calc(100vw - 32px); max-height: calc(100dvh - var(--topbar-height) - 32px); }
  .sidebar-utility-wrap .notification-panel { top: calc(var(--topbar-height) + 16px); right: 16px; bottom: auto; left: 16px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 420px) {
  .reader-settings-panel { padding: 12px; }
  .reader-settings-row { gap: 10px; }
  .reader-settings-field { flex-basis: min(186px, calc(100% - 56px)); width: min(186px, calc(100% - 56px)); }
}

.sources-masthead { min-height: 160px; }
.sources-lede { max-width: 560px; margin: 12px 0 0; color: var(--text-muted); }
.source-create-panel, .source-list { margin-top: var(--today-module-gap); padding: 24px; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--white); }
.source-create-panel h2, .source-list h2 { margin: 6px 0 0; font-size: 22px; }
.source-create-form { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) max-content; gap: 12px; align-items: end; margin-top: 24px; }
.source-create-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; }
.source-create-form input, .source-create-form select, .source-create-form textarea { min-height: 42px; padding: 8px 12px; border: 1px solid var(--border-interactive); border-radius: var(--radius-control); color: var(--black); background: var(--white); }
.source-create-form textarea { resize: vertical; line-height: 1.5; }
.input-create-form { grid-template-columns: max-content minmax(0, 0.9fr) minmax(0, 1.4fr) minmax(0, 0.8fr) max-content; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.source-row-card { border-bottom: 0; }
.source-row-card.library-list-row .source-row-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 12px; }
.source-row-card.library-list-row .source-row-inner { transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease, box-shadow 220ms ease; }
.source-row-card.library-list-row:hover .source-row-inner,
.source-row-card.library-list-row:focus-within .source-row-inner,
.source-row-card.library-list-row.is-selected .source-row-inner,
.source-row-card.library-list-row.is-reordering .source-row-inner { background: var(--surface-soft); }
.source-row-card.library-list-row:hover .source-row-inner,
.source-row-card.library-list-row:focus-within .source-row-inner {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.source-row-card.is-selected .source-row-inner { box-shadow: inset 2px 0 0 var(--accent); }
.source-row-card.is-dragging { opacity: 0.55; }
.source-row-card.is-drop-target { box-shadow: inset 0 1px 0 var(--accent); }
.source-row-card.is-reordering { opacity: 0.72; }
.source-row-select { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 36px; flex-shrink: 0; }
.source-row-select input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.source-drag-handle, .source-drag-placeholder { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 36px; flex-shrink: 0; border: 0; background: transparent; padding: 0; cursor: grab; touch-action: none; }
.source-drag-handle span { display: block; width: 2px; height: 2px; margin: 8px auto; border-radius: 50%; background: var(--text-muted); box-shadow: 4px 0 0 var(--text-muted), -4px 0 0 var(--text-muted), 0 4px 0 var(--text-muted), 4px 4px 0 var(--text-muted), -4px 4px 0 var(--text-muted), 0 8px 0 var(--text-muted), 4px 8px 0 var(--text-muted), -4px 8px 0 var(--text-muted); opacity: 0.55; }
.source-drag-handle:disabled, .source-drag-placeholder { cursor: not-allowed; opacity: 0.35; }
.source-list-table { display: grid; gap: 0; }
.source-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 16px; background: var(--surface-soft); }
.source-bulk-count { font-size: 14px; font-weight: 600; margin-right: 4px; }
.source-select-all-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-muted, rgba(0, 0, 0, 0.03)); color: var(--text-muted); font-size: 14px; }
.source-select-all-banner.is-active { background: var(--lilac); color: var(--text); }
.source-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; }
.source-page-label { color: var(--text-muted); font-size: 14px; }
.source-reorder-actions { display: inline-flex; gap: 4px; margin-right: 4px; }
.source-row-card strong { font-size: 16px; }
.source-row-card span, .source-row-card small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; }
.source-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.source-list-toolbar { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(120px, 0.7fr)); gap: 12px; margin-bottom: 20px; }
.source-row-main { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px; }
.source-row-leading { display: grid; grid-template-columns: 16px 20px 36px; align-items: start; gap: 8px; }
.source-list-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-soft); font-size: 10px; }
.source-list-icon .source-avatar-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.source-list-icon:has(.source-avatar-image) .source-avatar-fallback { display: none; }
.source-row-body { min-width: 0; }
.source-row-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.source-row-title strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-type-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-muted); color: var(--text-muted); font-size: 12px; line-height: 1.2; flex-shrink: 0; }
.source-row-domain, .source-row-meta { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.source-row-domain { margin: 4px 0 0; }
.source-row-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.source-row-body > .source-row-meta { display: none; }
.source-row-trailing { min-height: 36px; }
.source-row-status { min-width: 170px; }
.source-row-actions { gap: 0; }
.source-row-action .icon { width: 18px; height: 18px; }
.source-reorder-actions { display: inline-flex; gap: 0; margin-right: 4px; }
.source-row-card.is-deleted { opacity: 0.88; }
.source-entry-dialog { width: min(640px, calc(100vw - 48px)); }
.source-entry-dialog .source-create-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.source-entry-dialog .source-create-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; }
.source-form-inline { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 8px; align-items: center; }
.source-form-switch { grid-template-columns: 1fr auto; align-items: center; }
.source-form-switch .sr-only { grid-column: 1 / -1; }
.source-web-config { display: grid; gap: 12px; margin: 0; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-control); }
.source-web-config legend { padding: 0 6px; color: var(--text-muted); font-size: 12px; }
.source-web-config label { margin: 0; }
.source-check-panel { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--radius-control); background: var(--surface-muted); }
.source-preview-list { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 14px; }
.source-preview-list li { display: grid; gap: 2px; margin-bottom: 6px; }
.source-confirm-dialog { width: min(480px, calc(100vw - 48px)); padding: 24px; border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-popover); }
.source-confirm-overlay { align-items: center; justify-content: center; }
.sources-masthead { align-items: flex-start; }
.sources-masthead-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.source-retry-banner { margin: 8px 0 0; color: var(--text-muted); font-size: 14px; }
.collect-preflight-dialog { width: min(520px, calc(100vw - 48px)); }
.collect-preflight-body { display: grid; gap: 10px; color: var(--text-muted); font-size: 14px; }
.collect-preflight-skips { margin: 0; padding-left: 18px; }
.source-run-heading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: var(--type-label);
  line-height: 1.45;
}
.source-run-heading-sep { margin: 0 4px; color: var(--text-muted); }
.source-run-content { margin-right: 40px; margin-left: 40px; }
.source-run-content .source-list-toolbar { margin-bottom: 0; }
.source-run-filter-group { gap: 8px; }
.source-run-filter-pill {
  min-height: var(--page-action-height);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--text-muted);
  font-size: var(--page-action-font-size);
  font-weight: var(--page-action-font-weight);
  line-height: var(--page-action-line-height);
}
.source-run-filter-pill.is-active {
  border-color: var(--black);
  color: var(--black);
  font-weight: 600;
}
.source-run-section-title {
  margin: 24px 0 8px;
  padding: 0 var(--library-list-row-padding-x);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.source-run-sources + .source-run-items .source-run-section-title { margin-top: 32px; }
.source-run-source-table,
.source-run-items-list {
  display: flex;
  flex-direction: column;
  gap: var(--library-list-row-gap);
  margin-top: 0;
  padding: var(--library-list-inset-y) 0 var(--library-pane-inset-x);
}
.source-run-page .library-list-row--source-run .highlight-row-title { -webkit-line-clamp: 1; }
.source-run-page .library-list-row--source-run .highlight-row-inner {
  padding: var(--library-list-row-padding-y) var(--library-list-row-padding-x);
}
.source-run-empty {
  margin: 0;
  padding: 0 var(--library-list-row-padding-x);
  color: var(--text-muted);
  font-size: 14px;
}
.source-run-page .empty-state {
  min-height: auto;
  margin-top: 24px;
  padding: 0 var(--library-list-row-padding-x);
  background: transparent;
  border: none;
  border-radius: 0;
}

@media (max-width: 767px) {
  .sources-masthead { flex-direction: column; gap: 14px; }
  .sources-masthead-actions { width: 100%; }
  .sources-masthead-actions .outline-pill, .sources-masthead-actions .black-pill { flex: 1; }
  .source-create-form { grid-template-columns: 1fr; }
  .source-list-toolbar { grid-template-columns: 1fr; }
  .source-row-card.library-list-row .source-row-inner { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 8px; }
  .source-row-main { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; }
  .source-row-leading { grid-template-columns: 16px 20px 36px; }
  .source-row-trailing { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .source-row-status { display: none; }
  .source-row-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .source-reorder-actions { width: auto; margin: 0 4px 0 0; }
}

/* Settings and explicit entry actions share the existing surface and control tokens. */
.settings-category { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 640px; padding: 24px; border: 1px solid var(--hairline); border-radius: 24px; background: var(--white); color: var(--black); text-align: left; }
.settings-category .icon { transform: rotate(180deg); }
.settings-auth-card { max-width: 640px; margin-bottom: 16px; padding: 24px; border: 1px solid var(--hairline); border-radius: 24px; background: var(--white); }
.settings-auth-card h2 { margin: 0 0 8px; font-size: 18px; }
.settings-auth-meta { margin: 0 0 16px; color: var(--gray-600); font-size: 14px; }
.login-page { display: grid; place-items: center; min-height: calc(100vh - 72px); padding: 24px; }
.login-card { width: min(100%, 420px); padding: 32px; border: 1px solid var(--hairline); border-radius: 24px; background: var(--white); }
.login-card h1 { margin: 0 0 12px; font-size: 28px; }
.login-card p { margin: 0 0 24px; color: var(--gray-600); line-height: 1.5; }
.login-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.sources-masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hero-copy > [data-action="add-content"] { margin-top: 24px; }
.entry-overlay { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, 0.6); }
.entry-dialog { width: min(560px, 100%); max-height: calc(100dvh - 48px); overflow-x: hidden; overflow-y: auto; padding: 24px; border-radius: 24px; background: var(--white); }
.tag-create-dialog { width: min(420px, 100%); padding: 28px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16); }
.entry-dialog.source-entry-dialog { width: min(640px, calc(100vw - 48px)); }
.tag-create-lede { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.tag-create-dialog .entry-form { margin-top: 24px; }
.tag-create-field { gap: 8px; }
.tag-create-field > span { color: var(--black); font-size: 14px; font-weight: 600; }
.tag-create-field input { min-height: 48px; padding: 12px 14px; border-color: var(--hairline); border-radius: 12px; background: var(--surface-soft); transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.tag-create-field input:hover { border-color: var(--border-interactive); background: var(--white); }
.tag-create-field input:focus { border-color: var(--black); background: var(--white); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08); outline: none; }
.tag-create-dialog .entry-actions { margin-top: 28px; }
.tag-editor-dialog { width: min(520px, calc(100vw - 48px)); }
.tag-editor-lede { margin-top: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-editor-form { margin-top: 20px; }
.tag-editor-section-label { margin: 0; padding: 0; color: var(--black); font-size: 14px; font-weight: 600; }
.tag-choice-list { display: grid; max-height: 220px; overflow-x: hidden; overflow-y: auto; gap: 6px; margin-top: -4px; }
.tag-choice { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 12px; cursor: pointer; }
.tag-choice:has(input:checked) { border-color: var(--black); background: var(--surface-soft); }
.tag-choice input { width: 16px; height: 16px; accent-color: var(--black); }
.tag-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.tag-choice small { color: var(--text-muted); font-size: 12px; }
.tag-editor-empty { margin: 0; color: var(--text-muted); font-size: 14px; }
.tags-toolbar .matter-control-button { transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease; }
.tags-toolbar .matter-control-button:hover,
.tags-toolbar .matter-control-button:focus-visible { border-color: var(--black); background: var(--surface-soft); outline: none; transform: translateY(-2px); }
.entry-form { display: block; margin-top: 16px; }
.entry-form fieldset { display: grid; gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.source-create-form [hidden] { display: none; }
.entry-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 24px; }
.entry-dialog [role="alert"] { margin-top: 16px; }
.sidebar-utility-wrap .notification-panel { z-index: 110; opacity: 1; background: var(--white); }

#app:has(> .detail-shell) {
  --reader-chrome-top: calc(env(safe-area-inset-top) + 16px);
}

#app:has(> .detail-shell) .detail-shell {
  max-width: 840px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 72px) 40px 72px;
}

.reader-back-button {
  position: fixed;
  top: var(--reader-chrome-top);
  left: 16px;
  z-index: 50;
  display: inline-flex;
}

.reader-page-main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

#app:has(> .detail-shell) .detail-hero.reader-hero {
  padding: 0 0 28px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
}

.reader-hero-eyebrow {
  margin: 0 0 14px;
  color: var(--reader-muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

#app:has(> .detail-shell) .detail-hero.reader-hero h1 {
  max-width: none;
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
}

.reader-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
  color: var(--reader-muted);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.reader-hero-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
}

.reader-hero-source-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-hero-meta .source-avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 10px;
}

.reader-hero-meta .reader-source-icon {
  position: relative;
  background: var(--surface-soft);
  color: var(--black);
}

.reader-hero-meta .source-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-hero-meta .reader-source-icon:has(.source-avatar-image) .source-avatar-fallback {
  display: none;
}

.reader-hero-reading-time,
.reader-hero-published-at,
.reader-hero-capability {
  color: inherit;
  font: inherit;
}

.reader-hero-sep {
  opacity: 0.45;
}

#app:has(> .detail-shell) .reader-stage {
  padding-top: 28px;
}


@media (max-width: 767px) {
  .entry-overlay { padding: 16px; }
  .entry-dialog { max-height: calc(100dvh - 32px); padding: 24px; }
  .sources-masthead { align-items: flex-start; flex-direction: column; }
}

/* Reading workspace: retain the existing palette and card language. */
.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
.today-page .inbox-masthead { gap: 24px; }
.home-page.main-content { max-width: none; padding: 0 0 76px; }
.home-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 12px var(--page-heading-inset-x); border-bottom: 1px solid var(--hairline); }
.home-page .home-titlebar { align-items: center; min-height: 80px; padding: 12px var(--page-heading-inset-x); }
.home-page .topics-heading { align-items: center; width: 100%; margin-bottom: 20px; }
.home-page .topics-heading-copy { flex: 1 1 auto; min-width: 0; }
.home-page .home-shelf-more-button { flex: 0 0 auto; width: 44px; height: 28px; min-height: 28px; background: transparent; border: 0; border-radius: 999px; color: var(--black); }
.home-page .home-shelf-more-button:hover:not(:disabled), .home-page .home-shelf-more-button:focus-visible:not(:disabled) { background: var(--surface-soft); border-color: transparent; color: var(--black); }
.home-page .home-shelf-more-button .quick-reads-more-icon, .home-page .home-shelf-more-button .icon { width: 18px; height: 18px; }
.home-titlebar .hero-copy h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.035em; }
.home-titlebar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.home-titlebar .locale-toggle { align-self: center; margin-left: 0; }
.home-page .home-shelf { margin-top: var(--home-page-section-gap); padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
.home-page .home-shelf:first-of-type { margin-top: var(--home-page-section-gap); }
.home-page .topics-heading-copy h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
.home-shelf-title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-shelf-scope { color: var(--text-muted); font-size: var(--type-label); line-height: 1.35; }
.home-shelf-count { color: var(--text-muted); font-family: var(--mono); font-size: var(--type-label); font-variant-numeric: tabular-nums; }
.home-shelf-empty { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--radius-control); color: var(--text-muted); }
.home-shelf-empty-copy { flex: 1; }
.home-shelf-empty .empty-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; margin: 0; background: var(--lilac); color: var(--black); border-radius: 50%; }
.home-shelf-empty .empty-mark .icon { width: 18px; height: 18px; }
.home-empty-card { display: flex; align-items: center; justify-content: center; background: var(--surface-soft); color: var(--text-muted); }
.home-empty-card::after { display: none; }
.home-empty-card-content { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 210px; padding: 24px; text-align: center; }
.home-empty-card .empty-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; margin: 0; background: var(--lilac); color: var(--black); border-radius: 50%; }
.home-empty-card .empty-mark .icon { width: 20px; height: 20px; }
.home-empty-card-content > span:last-child { font-size: var(--type-label); line-height: 1.5; }
.home-empty { margin-top: var(--home-page-section-gap); padding-right: var(--home-page-inset-x); padding-bottom: var(--home-page-section-gap); padding-left: var(--home-page-inset-x); }
.home-empty .empty-state { min-height: 300px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 16px; }
.home-empty .empty-mark { background: var(--lilac); color: var(--black); }
.home-empty .empty-state p { max-width: 420px; color: var(--text-muted); }
.home-page .topic-strip { padding-bottom: 16px; }
.home-page .topic-strip { grid-auto-columns: calc((100% - 3 * var(--carousel-gap)) / 4.1); }
.today-empty { margin-top: 32px; }
.library-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 0 28px; border-bottom: 1px solid var(--hairline); }
.library-heading .hero-copy h1 { margin-top: 8px; font-size: 32px; letter-spacing: -0.035em; }
.library-heading .hero-copy p { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.library-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0 12px; }
.library-list-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.library-page .story-list { margin-top: 0; }
.library-page .story-list .empty-state { margin-top: var(--space-3); }
.library-page .page-footer { border-color: var(--hairline); margin-top: 16px; }
.library-page .empty-state, .today-empty .empty-state { min-height: 300px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 16px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.library-page .empty-mark, .today-empty .empty-mark { background: var(--lilac); color: var(--black); }
.library-page .empty-state p, .today-empty .empty-state p { max-width: 420px; color: var(--text-muted); }
.knowledge-list { border-top: 1px solid var(--hairline); }
.knowledge-card { display: flex; align-items: flex-start; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--hairline); transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease; }
.knowledge-card:hover, .knowledge-card:focus-within { background: var(--surface-soft); transform: translateY(-2px); }
.knowledge-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-soft);
}

.knowledge-card-icon .knowledge-source-icon {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  font-size: 12px;
}

.knowledge-card-icon .source-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.knowledge-card-icon .knowledge-source-icon:has(.source-avatar-image) {
  background: transparent;
}

.knowledge-card-icon .knowledge-source-icon:has(.source-avatar-image) .source-avatar-fallback {
  display: none;
}
.knowledge-card-content { flex: 1; min-width: 0; }
.knowledge-card-content a { color: inherit; text-decoration: none; }
.knowledge-card-content a:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.knowledge-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; line-height: 1.6; }
.scope-badge { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-soft); }
.knowledge-status { color: var(--text-muted); }
.knowledge-card h2 { margin: 12px 0 8px; font-size: 22px; line-height: 1.5; font-weight: 600; }
.knowledge-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 14px; line-height: 1.8; color: var(--text-muted); white-space: pre-wrap; }
.knowledge-card-footer { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; color: var(--text-muted); font-size: 12px; }
.knowledge-card-footer .text-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--black); }
.knowledge-card-footer .icon { transform: rotate(180deg); }
.topic-read-state { padding: 6px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,.88); font-size: 12px; }
.topic-icon-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.topic-visual-topline { gap: 8px; }
.topic-actions { margin-left: auto; }
.reader-library { position: sticky; top: calc(var(--topbar-height) + 24px); padding: 20px; background: var(--surface-soft); border: 1px solid var(--hairline); border-radius: 16px; min-width: 0; }
.reader-library h2 { font-size: 16px; margin: 0 0 16px; }
.reader-library .detail-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 0; border: 0; }
.reader-library .detail-secondary-actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.knowledge-action-group, .reader-knowledge-status { display: grid; gap: 8px; padding: 16px 0; margin: 4px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.knowledge-action-group h3 { font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 0 0 4px; }
.reader-knowledge-status { font-size: 12px; line-height: 1.7; }
.reader-knowledge-status span { color: var(--text-muted); }
.reader-knowledge-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.reader-library button:disabled { color: var(--text-muted); opacity: .65; cursor: not-allowed; }
.detail-hero h1 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.35; }
.detail-hero { padding: 32px; }
.detail-tags:empty { display: none; }
.reader-stage { padding-top: 36px; }
.reader-prose { overflow-wrap: break-word; word-break: normal; }
.reader-tool-button { width: 44px; height: 44px; }
.reader-length { color: var(--text-muted); font-size: 12px; }
@media (min-width: 1024px) {
  .topbar-today { display: none; }
  .workspace { min-height: 100vh; }
  .sidebar { margin-top: 0; }
  .main-content { padding-top: 40px; }
}
@media (max-width: 1023px) {
  .reader-library { position: static; grid-column: 2; }
  .reader-library .detail-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-action-group, .reader-knowledge-status { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .today-page .inbox-masthead, .home-titlebar, .library-heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .page-heading-actions { margin-left: 0; }
  .home-titlebar { padding: 20px 16px; }
  .home-page .home-shelf { margin-top: var(--home-page-section-gap); padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
  .home-empty .empty-state { padding: 32px 20px; }
  .home-empty .empty-state h2 { font-size: 22px; line-height: 1.5; }
  .home-page .topics-heading-copy h2 { font-size: 20px; }
  .home-page .topic-strip { grid-auto-columns: calc(100% - 32px); }
  .library-heading { padding-top: 0; }
  .library-heading .hero-copy h1 { font-size: 28px; }
  .knowledge-card { gap: 12px; padding: 20px 0; }
  .knowledge-card-icon { flex-basis: 32px; width: 32px; height: 32px; border-radius: 8px; }
  .knowledge-card-icon .knowledge-source-icon { font-size: 10px; }
  .knowledge-card h2 { font-size: 18px; }
  .knowledge-card-meta { gap: 6px; }
  .knowledge-card-footer { align-items: flex-start; flex-direction: column; gap: 4px; }
  .library-page .empty-state, .today-empty .empty-state { padding: 32px 20px; }
  .library-page .empty-state h2, .today-empty .empty-state h2 { font-size: 22px; line-height: 1.5; }
  .detail-hero { padding: 24px 20px; }
  .detail-hero h1 { margin-top: 16px; font-size: 28px; line-height: 1.4; }
  .reader-library { margin-top: 28px; }
  .reader-stage { padding-top: 24px; }
}
@media (min-width: 1340px) {
  .topic-strip { grid-auto-columns: calc((100% - 5 * var(--carousel-gap)) / 6); }
}
.topic-control:disabled { visibility: hidden; pointer-events: none; }
.reader-prose p { white-space: pre-wrap; }

.library-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 24px; }
.library-toolbar .search-field { max-width: 520px; background: var(--surface-soft); border-color: var(--hairline); }
.library-toolbar .search-field:focus-within { border-color: var(--black); }
.library-sort { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.library-sort select { min-height: var(--page-action-height); max-width: 160px; padding: 8px 32px 8px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); background: var(--white); color: var(--black); font-size: var(--page-action-font-size); font-weight: var(--page-action-font-weight); line-height: var(--page-action-line-height); }
.library-toolbar input:disabled, .library-sort select:disabled { cursor: not-allowed; color: var(--text-muted); }
.library-page .active-filters { margin-top: 16px; }

.highlights-list,
.favorites-list,
.library-list {
  display: flex;
  flex-direction: column;
  gap: var(--library-list-row-gap);
  margin-top: 4px;
}
.library-list-row { border-bottom: 0; }
.library-list-row .highlight-row-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 12px;
  border-radius: 12px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease, box-shadow 220ms ease;
}
.library-list-row:hover .highlight-row-inner,
.library-list-row:focus-within .highlight-row-inner,
.library-list-row.is-menu-open .highlight-row-inner {
  background: var(--surface-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.highlight-row-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  padding: 16px 4px;
}
.highlight-row-main {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.library-list-row .highlight-row-main:hover .highlight-row-title,
.library-list-row .highlight-row-main:focus-visible .highlight-row-title {
  text-decoration: none;
}
.highlight-row-main:hover .highlight-row-title,
.highlight-row-main:focus-visible .highlight-row-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.highlight-row-main:focus-visible { outline: none; }
.library-list-row--favorites .highlight-source-icon { border-radius: 50%; }
.highlight-row-trailing {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 36px;
}
.highlight-row-tail {
  display: grid;
  flex: 0 0 auto;
  align-items: center;
  justify-items: end;
  min-width: 152px;
}
.highlight-row-status,
.highlight-row-actions {
  grid-area: 1 / 1;
}
.highlight-row-leading { display: flex; align-items: flex-start; justify-content: flex-start; }
.highlight-source-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
}
.highlight-source-icon .source-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.highlight-source-icon:has(.source-avatar-image) .source-avatar-fallback { display: none; }
.highlight-row-body { min-width: 0; }
.highlight-row-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.library-list-row--favorites .highlight-row-title { -webkit-line-clamp: 1; }
.library-list-row--knowledge .highlight-row-title { -webkit-line-clamp: 1; }
.library-list-row--knowledge .highlight-row-badges { max-width: min(420px, 34vw); }
.library-list-row--knowledge .highlight-row-tail { min-width: 0; }
.highlight-row-meta {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.highlight-row-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}
.highlight-row-badges--with-count .highlight-count-pill {
  flex: 0 0 auto;
}
.highlight-row-badges--with-count .highlight-tag-pill {
  flex: 0 1 auto;
  min-width: 0;
}
.highlight-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  background: #fafb66;
  border: 0;
  border-radius: var(--radius-pill);
  color: inherit;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.highlight-count-pill:hover,
.highlight-count-pill:focus-visible {
  background: #f3f45c;
  outline: none;
}
.highlight-count-pill:active {
  transform: scale(0.97);
}
.highlight-count-icon { width: 14px; height: 14px; }
.highlight-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.highlight-row-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: opacity var(--motion-fast) ease, visibility var(--motion-fast) ease;
}
.highlight-row-sep { opacity: 0.45; }
.highlight-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, visibility var(--motion-fast) ease;
}
.library-list-row:hover .highlight-row-actions,
.library-list-row:focus-within .highlight-row-actions,
.library-list-row.is-menu-open .highlight-row-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.library-list-row:hover .highlight-row-status,
.library-list-row:focus-within .highlight-row-status,
.library-list-row.is-menu-open .highlight-row-status {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.highlight-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-touch);
  height: var(--icon-touch);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--black);
  cursor: pointer;
}
.highlight-row-action .icon { width: 18px; height: 18px; }
.highlight-row-action:hover:not(:disabled),
.highlight-row-action:focus-visible:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
  outline: none;
}
.highlight-row-action.is-active {
  background: rgba(0, 0, 0, 0.06);
}
.highlight-row-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.highlight-row-more-wrap { position: relative; }
.list-row-more-menu { z-index: 90; }
.highlights-page .empty-state,
.favorites-page .empty-state,
.knowledge-page .empty-state,
.tags-page .empty-state { margin-top: var(--space-3); }

.library-pane-page.main-content,
.favorites-page.main-content {
  max-width: none;
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}
.library-page-layout { position: relative; min-width: 0; }
.library-page-content {
  min-width: 0;
  margin-right: 0;
  margin-left: calc(var(--content-filter-rail-width) + var(--content-filter-rail-offset));
}
.library-page-body { min-width: 0; }
.content-filter-rail {
  position: fixed;
  top: calc(100dvh * var(--content-filter-rail-anchor));
  transform: translateY(-50%);
  left: var(--sidebar-width);
  z-index: 35;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: calc(var(--content-filter-rail-width) + var(--content-filter-rail-offset));
  max-height: calc(100vh - var(--topbar-height) - 16px);
  padding: 8px 24px 8px var(--content-filter-rail-offset);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
  scrollbar-width: none;
  box-sizing: border-box;
}
.content-filter-rail::-webkit-scrollbar { display: none; }
.content-filter-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  pointer-events: auto;
}
.content-filter-sidebar { pointer-events: auto; }
.content-filter-sidebar .line-sidebar__list {
  padding-right: 0;
}
.line-sidebar { position: relative; display: flex; justify-content: flex-start; }
.line-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0 20px 0 0;
  list-style: none;
}
.line-sidebar__item { position: relative; cursor: pointer; }
.line-sidebar__item::before { position: absolute; inset: -8px -20px -8px -64px; content: ""; }
.line-sidebar__button {
  position: relative;
  display: block;
  min-height: 24px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.line-sidebar__label {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  color: color-mix(in srgb, var(--black) calc(var(--effect, 0) * 100%), var(--text-muted));
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(calc(var(--effect, 0) * 20px));
}
.line-sidebar__index {
  width: 22px;
  margin-right: 8px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  opacity: calc(0.45 + var(--effect, 0) * 0.55);
}
.line-sidebar__text { font-weight: 500; }
.line-sidebar__marker {
  position: absolute;
  top: 50%;
  left: -44px;
  width: 34px;
  height: 1px;
  background: color-mix(in srgb, var(--black) calc(var(--effect, 0) * 100%), var(--hairline));
  transform: translateY(-50%) scaleX(calc(0.7 + var(--effect, 0) * 0.5));
  transform-origin: left center;
}
.line-sidebar__item:not(:last-child)::after {
  position: absolute;
  top: calc(100% + 10px);
  left: -44px;
  width: 17px;
  height: 1px;
  background: var(--hairline);
  content: "";
  opacity: 0.8;
  transform: translateY(-50%) scaleX(calc(0.7 + var(--effect, 0) * 0.6));
  transform-origin: left center;
}
.line-sidebar__button:focus-visible { outline: 2px solid var(--black); outline-offset: 5px; }
.line-sidebar__item.is-active .line-sidebar__text { font-weight: 700; }
.line-sidebar__item.is-active .line-sidebar__marker { height: 2px; }
.library-pane-page .library-heading,
.favorites-page .library-heading {
  position: relative;
  align-items: center;
  min-height: 80px;
  padding: 12px var(--library-pane-inset-x);
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 1024px) {
  .library-pane-page .library-heading {
    margin-left: calc(-1 * (var(--content-filter-rail-width) + var(--content-filter-rail-offset)));
    padding-left: var(--page-heading-content-offset);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag-row,
  .story-card,
  .knowledge-card,
  .quick-read-card > a,
  .library-list-row .highlight-row-inner,
  .source-row-card.library-list-row .source-row-inner,
  .source-run-source-row,
  .source-run-item-row {
    transition-duration: 0.01ms;
  }
}
.library-pane-page .library-heading .hero-copy h1,
.favorites-page .library-heading .hero-copy h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.library-header-actions,
.favorites-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.library-search-field,
.favorites-search-field {
  min-width: 180px;
  max-width: 240px;
  background: var(--white);
  border-color: var(--hairline);
}
.library-search-field:focus-within,
.favorites-search-field:focus-within { border-color: var(--black); }
.library-icon-add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--page-action-height);
  min-width: var(--page-action-height);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
}
.library-icon-add-button:hover:not(:disabled) { background: #000000; }
.library-icon-add-button:disabled { cursor: not-allowed; opacity: 0.5; }
.library-icon-add-icon { width: 18px; height: 18px; }
.library-pane-page .library-list-row .highlight-row-inner,
.favorites-page .library-list-row .highlight-row-inner {
  padding: var(--library-list-row-padding-y) var(--library-list-row-padding-x);
}
.library-pane-page .active-filters,
.library-pane-page .page-footer,
.favorites-page .active-filters,
.favorites-page .page-footer {
  padding-right: var(--library-pane-inset-x);
  padding-left: var(--library-pane-inset-x);
}
.library-pane-page .knowledge-card {
  padding-right: var(--library-pane-inset-x);
  padding-left: var(--library-pane-inset-x);
}
.library-pane-page .highlights-list,
.library-pane-page .favorites-list,
.library-pane-page .tags-content-list,
.library-pane-page .library-list {
  margin-top: 0;
  padding: var(--library-list-inset-y) var(--library-pane-inset-x) var(--library-pane-inset-x);
  border-top: 0;
}
.favorites-list { margin-top: 0; border-top: 0; }
.library-pane-page .page-footer,
.favorites-page .page-footer { border-color: var(--hairline); margin-top: 16px; }
.library-page .page-footer { border-top: 0; padding-top: 8px; }
.library-pane-page .empty-state,
.favorites-page .empty-state,
.knowledge-page .empty-state,
.tags-page .empty-state {
  min-height: auto;
  margin-top: 56px;
  padding: 0 var(--library-pane-inset-x);
  background: transparent;
  border: none;
  border-radius: 0;
}
.library-pane-page .empty-mark,
.favorites-page .empty-mark,
.knowledge-page .empty-mark,
.tags-page .empty-mark {
  width: 48px;
  height: 48px;
  background: transparent;
  color: var(--text-muted);
}
.library-pane-page .empty-state h2,
.favorites-page .empty-state h2,
.knowledge-page .empty-state h2,
.tags-page .empty-state h2 {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
}
.library-pane-page .empty-state p,
.favorites-page .empty-state p,
.knowledge-page .empty-state p,
.tags-page .empty-state p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 14px;
}
.library-pane-page .empty-actions,
.favorites-page .empty-actions,
.knowledge-page .empty-actions,
.tags-page .empty-actions { margin-top: 20px; }

/* Empty library views share the main page's center, independent of filter rows. */
@media (min-width: 1024px) {
  .library-pane-page.main-content { padding-bottom: 0; }
  .library-pane-page .library-page-layout {
    min-height: max(560px, 100dvh);
  }
  .library-pane-page .library-page-body .empty-state:only-child {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 2 * (var(--content-filter-rail-width) + var(--content-filter-rail-offset)));
    margin: 0;
    transform: translate(-50%, -50%);
  }
}
@media (max-width: 1023px) {
  .library-pane-page .library-page-body .empty-state:only-child {
    min-height: 320px;
    margin: 0;
  }
}
.matter-control { display: inline-flex; }
.matter-control-select {
  min-height: var(--page-action-height);
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--black);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236d6d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.matter-control-select:hover:not(:disabled) { border-color: var(--border-interactive); }
.matter-control-select:disabled { cursor: not-allowed; color: var(--text-muted); }

/* All select-based controls share the same compact pill geometry and chevron. */
.filter-field select.select-control,
.library-sort select.select-control,
.matter-control-select.select-control,
.reader-settings-select.select-control {
  min-height: var(--page-action-height);
  padding: 8px 36px 8px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236d6d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 14px center;
  font-size: 14px;
  font-weight: 500;
}
.filter-field select.select-control { width: 100%; }
.library-sort select.select-control { max-width: 160px; }
.matter-control-select.select-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236d6d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.select-control:disabled { background-image: none; }

@media (max-width: 1023px) {
  .library-page-content { margin-right: 0; margin-left: 0; }
  .content-filter-rail {
    position: static;
    align-items: stretch;
    justify-content: flex-start;
    width: auto;
    max-height: none;
    padding: 16px var(--library-pane-inset-x) 12px;
    overflow: visible;
    transform: none;
  }
  .content-filter-stack {
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    transform: none;
  }
  .content-filter-sidebar .line-sidebar__list {
    padding-right: 0;
  }
  .library-page-topic-zone {
    padding: 12px var(--library-pane-inset-x) 12px;
  }
  .line-sidebar { width: 100%; }
  .line-sidebar__list {
    flex-direction: row;
    gap: 8px;
    width: max-content;
    padding: 0 0 2px;
  }
  .line-sidebar__item::before { inset: -6px; }
  .line-sidebar__item::after,
  .line-sidebar__marker { display: none; }
  .line-sidebar__button { min-height: 36px; }
  .line-sidebar__label {
    padding: 8px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    background: var(--white);
    transform: none;
  }
  html[data-appearance="dark"] .line-sidebar__label {
    color: var(--black);
  }
  .line-sidebar__item.is-active .line-sidebar__label { border-color: var(--black); background: var(--black); color: var(--white); }
  .line-sidebar__index { display: none; }
  .reader-outline, .reader-scroll-progress { display: none; }
  .highlight-row-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }
  .library-list-row .highlight-row-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .library-pane-page .library-list-row .highlight-row-inner,
  .favorites-page .library-list-row .highlight-row-inner {
    padding: var(--library-list-row-padding-y) var(--library-list-row-padding-x);
  }
  .highlight-row-main { grid-template-columns: 36px minmax(0, 1fr); }
  .highlight-row-trailing {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    padding-left: 48px;
  }
  .highlight-row-tail {
    min-width: 0;
    flex: 1 1 auto;
  }
  .highlight-row-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .highlight-row-status { display: none; }
}

@media (hover: none), (pointer: coarse) {
  .library-list-row .highlight-row-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .library-list-row .highlight-row-status {
    display: none;
  }
}

/* Homepage first frame: a quiet editorial desk with a lively signal wall. */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.24fr);
  gap: 18px;
  padding: 32px var(--home-page-inset-x) 0;
  isolation: isolate;
}

.home-intro-card,
.home-masonry-card {
  position: relative;
  height: clamp(520px, calc(100vh - 112px), 640px);
  min-height: clamp(520px, calc(100vh - 112px), 640px);
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.08);
}

.home-intro-card {
  display: flex;
  flex-direction: column;
  padding: 30px 32px 28px;
  background: #d9d9d9;
  color: var(--navy);
}

.home-intro-card::before,
.home-intro-card::after,
.home-masonry-card::before,
.home-masonry-card::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.home-intro-card::before {
  top: -18%;
  right: -18%;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  transform: rotate(-22deg);
}

.home-intro-card::after {
  right: -10%;
  bottom: -18%;
  width: 42%;
  aspect-ratio: 1;
  background: var(--lilac);
  border-radius: 50%;
  opacity: 0.7;
}

.home-intro-topline,
.home-intro-copy,
.home-intro-bottom {
  position: relative;
  z-index: 1;
}

.home-intro-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.home-intro-topline .eyebrow {
  color: rgba(0, 0, 0, 0.64);
  font-size: 10px;
}

.home-intro-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--navy);
  border-radius: 10px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.home-intro-date {
  margin-left: auto;
  color: rgba(0, 0, 0, 0.58);
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.home-intro-copy {
  max-width: 540px;
  margin-top: clamp(72px, 10vh, 128px);
}

.home-intro-kicker {
  display: block;
  color: rgba(0, 0, 0, 0.62);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.home-intro-copy h1 {
  max-width: 520px;
  margin: 14px 0 20px;
  color: #F8FFA3;
  font-size: clamp(58px, 6vw, 104px);
  font-weight: 500;
  letter-spacing: -0.095em;
  line-height: 0.92;
  text-wrap: balance;
}

.home-intro-copy h1 em {
  color: #F8FFA3;
  font-style: normal;
  font-weight: 650;
}

.home-intro-copy p {
  max-width: 400px;
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
}

.home-intro-bottom {
  display: grid;
  grid-template-columns: minmax(138px, 0.56fr) minmax(0, 1.32fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.16);
}

.home-intro-bottom-copy .eyebrow {
  color: rgba(0, 0, 0, 0.56);
  font-size: 9px;
}

.home-intro-bottom h2 {
  max-width: 150px;
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.home-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.home-keyword-bubble {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 6px 11px 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 40% 60% 52% 48% / 54% 44% 56% 46%;
  background: rgba(255, 255, 255, 0.54);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transform: rotate(-3deg);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 240ms cubic-bezier(0.22, 1.36, 0.36, 1);
  animation: home-bubble-in 620ms cubic-bezier(0.22, 1.36, 0.36, 1) both;
  animation-delay: calc(var(--bubble-index, 0) * 90ms);
}

.home-keyword-bubble--1 { --bubble-index: 0; --bubble-rotation: -3deg; }
.home-keyword-bubble--2 { --bubble-index: 1; --bubble-rotation: 4deg; background: var(--lime); }
.home-keyword-bubble--3 { --bubble-index: 2; --bubble-rotation: -6deg; background: var(--cream); }
.home-keyword-bubble--4 { --bubble-index: 3; --bubble-rotation: 3deg; background: var(--coral); }
.home-keyword-bubble--5 { --bubble-index: 4; --bubble-rotation: -2deg; background: var(--mint); }
.home-keyword-bubble small { margin-left: 3px; color: rgba(0, 0, 0, 0.52); font-family: var(--mono); font-size: 9px; font-weight: 500; }
.home-keyword-hash { color: #01b6ff; font-family: var(--mono); font-size: 11px; }
.home-keyword-bubble:hover,
.home-keyword-bubble:focus-visible { border-color: var(--navy); background: var(--navy); color: var(--white); outline: none; transform: translateY(-5px) rotate(0deg) scale(1.04); }
.home-keyword-bubble:hover small,
.home-keyword-bubble:focus-visible small,
.home-keyword-bubble:hover .home-keyword-hash,
.home-keyword-bubble:focus-visible .home-keyword-hash { color: var(--lime); }

.home-keyword-empty {
  align-self: center;
  color: #000;
  font-size: 12px;
  line-height: 1.4;
}

.home-intro-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-intro-actions .black-pill { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.home-intro-actions .locale-toggle { min-width: 40px; min-height: 38px; padding: 7px 10px; }

.home-masonry-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--blue);
  color: var(--navy);
}

.home-masonry-card::before {
  top: -12%;
  right: -3%;
  width: 42%;
  height: 54%;
  background: var(--coral);
  border-radius: 48% 52% 36% 64%;
  opacity: 0.7;
  transform: rotate(18deg);
}

.home-masonry-card::after {
  right: 6%;
  bottom: -18%;
  width: 48%;
  height: 44%;
  background: var(--lilac);
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.76;
}

.home-masonry {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.02fr 0.82fr 0.96fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 24px;
  flex: 1;
  min-height: 0;
  margin-top: 0;
}

.home-masonry-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--masonry-base, var(--navy));
  box-shadow: none;
  color: var(--white);
  text-decoration: none;
  transform: translateY(18px) scale(0.94);
  animation: home-masonry-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--masonry-delay, 0ms);
  transition: transform 280ms cubic-bezier(0.22, 1.36, 0.36, 1), box-shadow 280ms ease;
}

.home-masonry-item--1 { grid-column: 1; grid-row: 1 / span 2; }
.home-masonry-item--2 { grid-column: 2; grid-row: 1; }
.home-masonry-item--3 { grid-column: 3; grid-row: 1 / span 2; }
.home-masonry-item--4 { grid-column: 2; grid-row: 2 / span 2; }
.home-masonry-item--5 { grid-column: 3; grid-row: 3; }
.home-masonry-item:hover,
.home-masonry-item:focus-visible { box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22); outline: none; transform: translateY(-3px) scale(0.97); }

.home-masonry-visual {
  position: relative;
  display: block;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.home-masonry-visual::after { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.24); content: ""; pointer-events: none; }
.home-masonry-visual img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.86) contrast(1.04); transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), filter 500ms ease; }
.home-masonry-item:hover .home-masonry-visual img,
.home-masonry-item:focus-visible .home-masonry-visual img { filter: saturate(1.04) contrast(1.02); transform: scale(1.08); }
.home-masonry-copy { display: grid; gap: 5px; min-height: 96px; padding: 13px 14px 15px; background: rgba(0, 0, 0, 0.92); }
.home-masonry-source { overflow: hidden; color: rgba(255, 255, 255, 0.68); font-family: var(--mono); font-size: 9px; letter-spacing: 0.04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.home-masonry-copy strong { display: -webkit-box; overflow: hidden; font-size: 14px; font-weight: 650; letter-spacing: -0.025em; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.home-masonry-meta { color: rgba(255, 255, 255, 0.58); font-size: 10px; }

.home-masonry-empty { display: grid; place-items: center; align-content: center; flex: 1; gap: 14px; color: rgba(0, 0, 0, 0.6); font-size: 13px; text-align: center; }
.home-masonry-empty-mark { display: grid; place-items: center; width: 48px; height: 48px; background: var(--lilac); border-radius: 50%; color: var(--navy); font-size: 22px; }

.home-mobile-nav-trigger { display: none; }

@keyframes home-bubble-in {
  0% { opacity: 0; transform: translateY(18px) scale(0.62) rotate(0deg); }
  72% { opacity: 1; transform: translateY(-4px) scale(1.06) rotate(var(--bubble-rotation, -3deg)); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--bubble-rotation, -3deg)); }
}

@keyframes home-masonry-in {
  0% { opacity: 0; filter: blur(10px); transform: translateY(34px) scale(0.9); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .home-keyword-bubble,
  .home-masonry-item { animation: none; transform: none; transition: none; }
  .home-masonry-visual img { transition: none; }
}

@media (max-width: 1100px) and (min-width: 768px) {
  .home-hero { grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr); padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
  .home-intro-card, .home-masonry-card { height: 560px; min-height: 560px; }
  .home-intro-card { padding-right: 24px; padding-left: 24px; }
  .home-intro-copy h1 { font-size: clamp(52px, 7vw, 78px); }
  .home-intro-bottom { grid-template-columns: 1fr; align-items: start; }
  .home-intro-bottom h2 { max-width: none; }
  .home-intro-actions { justify-content: flex-start; }
}

@media (max-width: 1023px) {
  .home-mobile-nav-trigger { position: absolute; z-index: 4; top: 44px; left: var(--home-page-inset-x); display: inline-flex; background: rgba(255, 255, 255, 0.72); }
  .home-mobile-nav-trigger:hover { background: var(--navy); }
  .home-page .home-hero { padding-top: 24px; }
  .workspace:has(.home-page) .sidebar { top: 0; height: 100vh; }
  .workspace:has(.home-page) .sidebar-backdrop { inset: 0; height: 100vh; }
}

@media (max-width: 767px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px var(--home-page-inset-x) 0; }
  .home-intro-card, .home-masonry-card { height: 600px; min-height: 600px; border-radius: 24px; }
  .home-intro-card { padding: 72px 20px 20px; }
  .home-mobile-nav-trigger { top: 30px; left: 30px; }
  .home-intro-date { display: none; }
  .home-intro-copy { margin-top: 68px; }
  .home-intro-copy h1 { font-size: clamp(60px, 17vw, 94px); }
  .home-intro-copy p { max-width: 330px; font-size: 15px; }
  .home-intro-bottom { grid-template-columns: 1fr auto; align-items: end; gap: 16px 10px; }
  .home-intro-bottom-copy { grid-column: 1 / -1; }
  .home-intro-bottom h2 { max-width: none; }
  .home-keyword-cloud { grid-column: 1 / -1; }
  .home-intro-actions { grid-column: 1 / -1; justify-content: space-between; }
  .home-masonry-card { padding: 0; }
  .home-masonry { min-height: 480px; gap: 16px; }
  .home-masonry-item { border-radius: 15px; }
  .home-masonry-copy { min-height: 78px; padding: 10px; }
  .home-masonry-copy strong { font-size: 11px; -webkit-line-clamp: 2; }
  .home-masonry-source, .home-masonry-meta { font-size: 8px; }
  .home-page .home-shelf { margin-top: var(--home-page-section-gap); padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
}

@media (max-width: 767px) {
  .library-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
  .library-toolbar .search-field { max-width: none; }
  .library-sort { justify-content: flex-end; }
  .library-pane-page .library-heading,
  .favorites-page .library-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    min-height: auto;
    padding: 24px var(--library-pane-inset-x) 20px;
  }
  .library-header-actions,
  .favorites-header-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
  .library-search-field,
  .favorites-search-field {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
  .library-pane-page .library-heading .hero-copy h1,
  .favorites-page .library-heading .hero-copy h1 { font-size: 22px; }
  .library-list-row--knowledge .highlight-row-badges { width: 100%; max-width: none; flex-wrap: wrap; }
  .library-list-row--knowledge .highlight-row-trailing { padding-left: 0; }
  .tags-page .tags-toolbar {
    flex-wrap: wrap;
    margin-top: 16px;
  }
  .tags-heading .hero-copy,
  .tags-content-view .hero-copy {
    flex-wrap: wrap;
    gap: 8px;
  }
  .tags-heading .hero-copy h1,
  .tags-content-view .hero-copy h1 {
    flex: 1 1 100%;
    white-space: normal;
  }
  .tags-heading-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

/* The language control is part of the global top-right utility area on desktop. */
@media (min-width: 1024px) {
  .topbar-today {
    position: fixed;
    top: 0;
    right: 0;
    left: 76px;
    z-index: 50;
    display: flex;
    min-height: 64px;
    padding: 12px 32px;
    background: transparent;
    pointer-events: none;
    transition: left 180ms ease;
  }
  .topbar-today::before,
  .topbar-today::after { display: none; }
  .topbar-today .locale-toggle { pointer-events: auto; }
  #app:has(.sidebar:not(.is-collapsed)) .topbar-today { left: 232px; }
}
@media (max-width: 767px) {
  .home-page .home-titlebar { align-items: center; flex-direction: row; min-height: auto; padding: 20px var(--home-page-inset-x); }
  .home-titlebar-actions { align-items: center; gap: 6px; }
}

/* Home end screen: the footer and the return card share one memorable closing frame. */
.home-endcap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 36%);
  gap: clamp(32px, 8vw, 112px);
  min-height: min(720px, calc(100vh - var(--topbar-height)));
  margin-top: 96px;
  padding: clamp(56px, 8vw, 112px) clamp(24px, 8vw, 96px) 32px;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.home-endcap::before,
.home-endcap::after { position: absolute; content: ""; pointer-events: none; }
.home-endcap::before { top: -30%; right: -6%; width: 66%; height: 120%; border: 1px solid rgba(250, 251, 102, 0.24); border-radius: 50%; transform: rotate(-18deg); }
.home-endcap::after { right: 12%; bottom: -42%; width: 56%; height: 64%; background: rgba(1, 182, 255, 0.16); border-radius: 50%; filter: blur(24px); }
.home-endcap-content { position: relative; z-index: 2; display: flex; min-width: 0; min-height: 100%; flex-direction: column; }
.home-endcap-brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.home-endcap-brand-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; overflow: hidden; background: var(--white); color: var(--navy); border-radius: 12px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: -0.09em; }
.home-endcap-brand-mark::after { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; background: var(--lime); border-radius: 8px; content: ""; }
.home-endcap-brand-mark span { position: relative; z-index: 1; }
.home-endcap-brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.home-endcap-copy { max-width: 560px; margin-top: clamp(72px, 12vh, 148px); }
.home-endcap-copy .eyebrow { color: var(--lime); }
.home-endcap-copy h2 { max-width: 560px; margin: 18px 0 16px; font-size: clamp(34px, 6vw, 72px); font-weight: 600; letter-spacing: -0.065em; line-height: 0.98; }
.home-endcap-copy p { max-width: 360px; margin: 0; color: rgba(255, 255, 255, 0.68); font-size: 16px; line-height: 1.55; }
.home-endcap-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: auto; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.home-endcap-nav a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; color: rgba(255, 255, 255, 0.84); font-size: 14px; text-underline-offset: 4px; transition: color var(--motion-fast) ease, transform var(--motion-fast) ease; }
.home-endcap-nav a:hover,
.home-endcap-nav a:focus-visible { color: var(--lime); transform: translateY(-2px); }
.home-endcap-meta { margin: 18px 0 0; color: rgba(255, 255, 255, 0.46); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.home-lanyard { position: relative; z-index: 2; display: flex; min-width: 0; min-height: 520px; align-items: flex-start; justify-content: center; padding-top: 6px; }
.home-lanyard-band { position: absolute; top: 0; left: 50%; display: block; width: 38px; height: 188px; overflow: hidden; background: var(--lime); border: 1px solid rgba(255, 255, 255, 0.42); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); transform: translateX(-50%) rotate(2deg); }
.home-lanyard-band span { position: absolute; top: 12px; left: 50%; color: var(--navy); font-family: var(--mono); font-size: 8px; font-weight: 700; letter-spacing: 0.18em; writing-mode: vertical-rl; transform: translateX(-50%) rotate(180deg); white-space: nowrap; }
.home-lanyard-connector { position: absolute; z-index: 1; top: 160px; left: 50%; width: 58px; height: 58px; border: 10px solid var(--lime); border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.44), 0 10px 18px rgba(0, 0, 0, 0.24); transform: translateX(-50%); }
.home-lanyard-card-wrap { position: relative; z-index: 2; width: min(286px, 100%); aspect-ratio: 3 / 4.18; margin-top: 190px; transform-origin: 50% 0; animation: home-lanyard-sway 6.4s ease-in-out infinite; }
.home-lanyard-card { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; padding: 22px 22px 20px; background: var(--blue); color: var(--navy); border: 1px solid rgba(255, 255, 255, 0.74); border-radius: 24px; box-shadow: 0 28px 56px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9); text-align: left; transform: rotate(4deg); transition: box-shadow 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1); }
.home-lanyard-card:hover,
.home-lanyard-card:focus-visible { box-shadow: 0 34px 64px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.9); transform: translateY(-8px) rotate(-2deg); }
.home-lanyard-card:focus-visible { outline: 4px solid var(--lime); outline-offset: 6px; }
.home-lanyard-card:active { transform: translateY(-2px) rotate(2deg) scale(0.98); }
.home-lanyard-card-glow { position: absolute; top: -20%; right: -18%; width: 76%; height: 46%; background: rgba(255, 255, 255, 0.56); border-radius: 50%; filter: blur(2px); transform: rotate(-24deg); pointer-events: none; }
.home-lanyard-card-topline { position: relative; display: flex; align-items: center; justify-content: space-between; color: rgba(0, 0, 0, 0.52); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; }
.home-lanyard-card-brand { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 30px; font-size: 14px; font-weight: 650; }
.home-lanyard-card-mark { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: var(--navy); color: var(--white); border-radius: 16px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: -0.1em; box-shadow: 6px 6px 0 var(--lime); }
.home-lanyard-card-copy { position: relative; display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.home-lanyard-card-copy strong { max-width: 180px; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.065em; line-height: 0.98; }
.home-lanyard-card-copy span { max-width: 180px; color: rgba(0, 0, 0, 0.64); font-size: 12px; line-height: 1.45; }
.home-lanyard-card-arrow { position: absolute; right: 20px; bottom: 60px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--navy); color: var(--white); border-radius: 50%; box-shadow: 6px 6px 0 var(--lime); }
.home-lanyard-card-arrow .icon { width: 20px; height: 20px; }
.home-lanyard-card-footer { position: relative; display: block; margin-top: 24px; padding-top: 14px; border-top: 1px solid rgba(0, 0, 0, 0.2); color: rgba(0, 0, 0, 0.58); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.13em; }
.home-lanyard-floor-shadow { position: absolute; right: 8%; bottom: 12px; left: 8%; height: 22px; background: rgba(0, 0, 0, 0.24); border-radius: 50%; filter: blur(14px); transform: scaleX(0.72); }
@keyframes home-lanyard-sway {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-lanyard-card-wrap { animation: none; }
  .home-lanyard-card,
  .home-endcap-nav a { transition-duration: 0.01ms; }
}
@media (max-width: 1023px) {
  .home-endcap { grid-template-columns: minmax(0, 1fr) minmax(240px, 38%); gap: 28px; padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
  .home-endcap-copy { margin-top: 80px; }
  .home-endcap-copy h2 { font-size: clamp(34px, 6vw, 58px); }
  .home-lanyard-card-wrap { width: min(238px, 100%); }
}
@media (max-width: 767px) {
  .home-endcap { display: flex; min-height: auto; flex-direction: column; gap: 22px; margin-top: 64px; padding: 48px 20px 28px; }
  .home-endcap-copy { margin-top: 64px; }
  .home-endcap-copy h2 { margin-top: 14px; font-size: clamp(34px, 12vw, 52px); }
  .home-endcap-nav { gap: 12px 22px; margin-top: 64px; }
  .home-lanyard { min-height: 430px; margin-top: -4px; }
  .home-lanyard-card-wrap { width: min(252px, 78vw); }
  .home-lanyard-floor-shadow { bottom: 4px; }
}

/* Home end screen: a quiet black stage with a tiny, draggable return tag. */
.home-endcap { display: block; margin-top: 96px; overflow: hidden; background: var(--white); color: var(--navy); }
.home-endcap::before,
.home-endcap::after { display: none; }
.home-endcap-hero { position: relative; min-height: min(600px, calc(100vh - var(--topbar-height))); padding: clamp(28px, 4vw, 64px) clamp(24px, 6vw, 80px) 28px; overflow: hidden; background: #000000; border-radius: 0 0 72px 72px; color: var(--white); }
.home-endcap-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.home-endcap-brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; }
.home-endcap-brand-mark { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 50%; color: var(--white); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: -0.09em; }
.home-endcap-brand-mark::after { position: absolute; right: 2px; bottom: 2px; width: 5px; height: 5px; background: var(--lime); border-radius: 50%; content: ""; }
.home-endcap-brand-mark span { position: relative; z-index: 1; }
.home-endcap-brand-name { font-size: 13px; font-weight: 600; letter-spacing: -0.02em; }
.home-endcap-index { color: rgba(255, 255, 255, 0.48); font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; }
.home-endcap-stage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 30%); align-items: center; gap: clamp(28px, 8vw, 120px); min-height: 470px; }
.home-endcap-copy { max-width: 650px; }
.home-endcap-copy .eyebrow { color: var(--lime); }
.home-endcap-copy h2 { max-width: 640px; margin: 18px 0 18px; font-size: clamp(58px, 9vw, 124px); font-weight: 650; letter-spacing: -0.085em; line-height: 0.86; white-space: nowrap; }
.home-endcap-copy h2 span { color: var(--lime); }
.home-endcap-copy p { max-width: 360px; margin: 0; color: rgba(255, 255, 255, 0.58); font-size: 15px; line-height: 1.55; }
.home-lanyard { position: relative; z-index: 2; display: flex; min-width: 0; min-height: 400px; align-items: flex-start; justify-content: center; padding-top: 0; }
.home-lanyard-cord { position: absolute; top: 2px; left: 50%; width: 16px; height: 126px; overflow: visible; fill: none; stroke: rgba(255, 255, 255, 0.84); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; transform: translateX(-50%); animation: home-lanyard-cord-sway 5.4s ease-in-out infinite; transform-origin: 50% 0; }
.home-lanyard-connector { position: absolute; z-index: 1; top: 105px; left: 50%; width: 22px; height: 22px; background: #000000; border: 1px solid var(--white); border-radius: 50%; box-shadow: 0 0 0 3px rgba(250, 251, 102, 0.08); transform: translateX(-50%); animation: home-lanyard-ring-pulse 4.8s ease-in-out infinite; }
.home-lanyard-card-wrap { position: relative; z-index: 2; width: 112px; height: 156px; margin-top: 126px; transform: translate3d(var(--lanyard-drag-x, 0px), var(--lanyard-drag-y, 0px), 0); transition: transform 520ms cubic-bezier(0.22, 1.4, 0.36, 1); }
.home-lanyard-card-wrap.is-dragging { transition: none; }
.home-lanyard-card-swing { width: 100%; height: 100%; transform-origin: 50% 0; animation: home-lanyard-sway 6.8s ease-in-out infinite; }
.home-lanyard-card-swing.is-dragging,
.home-lanyard-card-swing.is-releasing { animation: none; transform: rotate(var(--lanyard-drag-tilt, 0deg)); }
.home-lanyard-card-swing.is-releasing { transition: transform 520ms cubic-bezier(0.22, 1.4, 0.36, 1); }
.home-lanyard-card { position: relative; display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; padding: 14px 13px 12px; background: #000000; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 12px; box-shadow: 14px 20px 34px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.1); text-align: left; touch-action: none; transition: border-color 180ms ease, box-shadow 220ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1); }
.home-lanyard-card:hover,
.home-lanyard-card:focus-visible { border-color: var(--lime); box-shadow: 16px 24px 38px rgba(0, 0, 0, 0.42), 0 0 0 3px rgba(250, 251, 102, 0.08); transform: translateY(-4px) rotate(-2deg); }
.home-lanyard-card:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
.home-lanyard-card:active { transform: translateY(-1px) scale(0.98); }
.home-lanyard-card-hole { position: absolute; top: 7px; left: 50%; width: 20px; height: 5px; border: 1px solid rgba(255, 255, 255, 0.48); border-radius: 5px; transform: translateX(-50%); }
.home-lanyard-card-topline { position: relative; display: flex; align-items: center; justify-content: space-between; color: rgba(255, 255, 255, 0.46); font-family: var(--mono); font-size: 7px; font-weight: 600; letter-spacing: 0.08em; }
.home-lanyard-card-symbol { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: auto auto 10px; background: var(--lime); color: #000000; border-radius: 50%; box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.14); }
.home-lanyard-card-symbol .icon { width: 16px; height: 16px; }
.home-lanyard-card-word { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.07em; line-height: 1; }
.home-lanyard-card-footer { display: block; margin-top: auto; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.44); font-family: var(--mono); font-size: 6px; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; }
.home-endcap-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; padding: 24px clamp(24px, 6vw, 80px) 28px; background: var(--white); }
.home-endcap-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.home-endcap-nav a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; color: var(--navy); font-size: 13px; text-underline-offset: 4px; transition: color var(--motion-fast) ease, transform var(--motion-fast) ease; }
.home-endcap-nav a:hover,
.home-endcap-nav a:focus-visible { color: #24cb71; transform: translateY(-2px); }
.home-endcap-meta { margin: 0; color: rgba(0, 0, 0, 0.46); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
@keyframes home-lanyard-sway {
  0%, 100% { transform: rotate(3deg) translateY(0); }
  50% { transform: rotate(-4deg) translateY(7px); }
}
@keyframes home-lanyard-cord-sway {
  0%, 100% { transform: translateX(-50%) rotate(1deg); }
  50% { transform: translateX(-50%) rotate(-2deg); }
}
@keyframes home-lanyard-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(250, 251, 102, 0.08); }
  50% { box-shadow: 0 0 0 6px rgba(250, 251, 102, 0.14); }
}
@media (prefers-reduced-motion: reduce) {
  .home-lanyard-card-swing,
  .home-lanyard-cord,
  .home-lanyard-connector { animation: none; }
  .home-lanyard-card-wrap,
  .home-lanyard-card-swing.is-releasing,
  .home-lanyard-card,
  .home-endcap-nav a { transition-duration: 0.01ms; }
}
@media (max-width: 1023px) {
  .home-endcap-hero { padding-right: var(--home-page-inset-x); padding-left: var(--home-page-inset-x); }
  .home-endcap-stage { grid-template-columns: minmax(0, 1fr) minmax(180px, 28%); gap: 28px; }
  .home-endcap-copy h2 { font-size: clamp(54px, 9vw, 94px); }
  .home-lanyard-card-wrap { width: 98px; height: 138px; }
}
@media (max-width: 767px) {
  .home-endcap { margin-top: 64px; }
  .home-endcap-hero { min-height: auto; padding: 24px 20px 18px; border-radius: 0 0 38px 38px; }
  .home-endcap-stage { display: flex; min-height: 0; flex-direction: column; align-items: stretch; gap: 18px; }
  .home-endcap-copy { padding-top: 68px; }
  .home-endcap-copy h2 { margin-top: 14px; font-size: clamp(54px, 16vw, 78px); }
  .home-lanyard { min-height: 250px; margin-top: -8px; }
  .home-lanyard-card-wrap { width: 88px; height: 124px; margin-top: 120px; }
  .home-lanyard-card { padding: 12px 11px 10px; }
  .home-lanyard-card-symbol { width: 30px; height: 30px; margin-bottom: 8px; }
  .home-lanyard-card-word { font-size: 15px; }
  .home-endcap-footer { align-items: flex-start; flex-direction: column; gap: 18px; min-height: 116px; padding: 24px 20px 28px; }
}

/* Settings and source maintenance pages use an editorial workspace rhythm.
   The existing lilac remains a brand accent, but no longer fills a floating
   page-sized pill or wraps the list in a second card. */
.settings-page,
.sources-page {
  max-width: 1080px;
  padding-top: 24px;
}

.settings-page .inbox-masthead,
.sources-page .inbox-masthead {
  min-height: 104px;
  padding: 18px 0 20px;
  border-radius: 0;
  border-bottom: 1px solid var(--black);
  background: transparent;
}

.settings-page .inbox-masthead h1,
.sources-page .inbox-masthead h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.sources-page .inbox-masthead {
  min-height: 128px;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--lilac);
}

.sources-page .sources-masthead-actions {
  align-self: flex-end;
}

.settings-page .settings-category {
  width: min(100%, 720px);
  max-width: none;
  min-height: 64px;
  margin-top: 40px;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
}

.settings-page .settings-category:hover,
.settings-page .settings-category:focus-visible {
  background: var(--surface-soft);
  outline-offset: 4px;
}

.settings-page .settings-auth-card {
  width: min(100%, 720px);
  max-width: none;
  margin: 32px 0 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
}

.sources-page .source-list {
  margin-top: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sources-page .source-list-toolbar {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.sources-page .source-list > .section-heading {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--black);
}

.sources-page .source-list-table {
  margin-top: 0;
}

.sources-page .source-row-card.library-list-row .source-row-inner {
  padding: 18px 0;
  border-radius: 0;
  border-bottom: 1px solid var(--hairline);
}

.sources-page .source-row-card.library-list-row:last-child .source-row-inner {
  border-bottom: 0;
}

.sources-page .source-list-icon {
  border-radius: var(--radius-control);
}

.source-entry-dialog,
.source-confirm-dialog {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 767px) {
  .settings-page,
  .sources-page {
    padding-top: 16px;
  }

  .settings-page .inbox-masthead,
  .sources-page .inbox-masthead {
    min-height: 84px;
    padding: 14px 0 16px;
  }

  .sources-page .inbox-masthead {
    min-height: 112px;
    align-items: flex-start;
    padding-top: 10px;
  }

  .settings-page .settings-category {
    width: 100%;
    margin-top: 28px;
  }

  .sources-page .source-list {
    margin-top: 28px;
  }

  .sources-page .source-row-card.library-list-row .source-row-inner {
    padding: 16px 0;
  }
}

/* Settings and source maintenance use the same full-width heading contract as
   the Favorites/Highlights library panes. The body keeps its page-specific
   controls, while the title row shares the same 80px rhythm and inset. */
.settings-page,
.sources-page {
  max-width: none;
  padding: 0 0 76px;
}

.settings-page .library-heading,
.sources-page .library-heading {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 12px var(--page-heading-inset-x);
  border-bottom: 1px solid var(--hairline);
  background: var(--white);
}

.settings-page .library-heading .hero-copy h1,
.sources-page .library-heading .hero-copy h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-heading-back-row {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 8px var(--page-heading-inset-x) 4px;
}

.page-heading-back {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: transparent;
  border-radius: var(--radius-pill);
}

.page-heading-back:hover:not(:disabled),
.page-heading-back:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.settings-page .settings-category,
.settings-page .settings-auth-card {
  margin-left: 40px;
}

.settings-page .settings-category {
  margin-top: 0;
}

.sources-page:not(.source-run-page) .source-list {
  margin-top: 0;
  margin-right: 40px;
  margin-left: 40px;
}

.sources-page:not(.source-run-page) .source-list-table {
  row-gap: 8px;
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row .source-row-inner {
  padding: var(--library-list-row-padding-y) var(--library-list-row-padding-x);
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease, box-shadow 220ms ease;
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row:hover .source-row-inner,
.sources-page:not(.source-run-page) .source-row-card.library-list-row:focus-within .source-row-inner {
  background: var(--surface-muted);
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row.is-selected .source-row-inner,
.sources-page:not(.source-run-page) .source-row-card.library-list-row.is-reordering .source-row-inner {
  background: var(--surface-soft);
}

.sources-page .sources-masthead-actions {
  align-self: center;
}

@media (max-width: 767px) {
  .settings-page .library-heading,
  .sources-page .library-heading {
    min-height: auto;
    padding: 20px 16px;
  }

  .settings-page .library-heading {
    align-items: center;
    flex-direction: row;
  }

  .sources-page .library-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-heading-back-row {
    min-height: 52px;
    padding: 6px 16px 2px;
  }

  .sources-page .sources-masthead-actions {
    width: 100%;
  }

  .source-run-page .source-run-content {
    margin-right: 16px;
    margin-left: 16px;
  }

  .settings-page .settings-category,
  .settings-page .settings-auth-card {
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
  }

  .sources-page:not(.source-run-page) .source-list {
    margin-top: 0;
    margin-right: 16px;
    margin-left: 16px;
  }

  .sources-page:not(.source-run-page) .source-row-card.library-list-row .source-row-inner {
    padding: 12px;
  }
}

/* Source list toolbar keeps navigation, list actions, pagination, and filters in one row. */
.sources-page:not(.source-run-page) .source-list {
  margin-top: 0;
}

.sources-page:not(.source-run-page) .source-list-toolbar,
.source-run-page .source-list-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}

.sources-page:not(.source-run-page) .source-list-back,
.source-run-page .source-list-back {
  flex: 0 0 40px;
  margin: 0;
}

.source-filter-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}

.source-filter-search {
  display: flex;
  align-items: center;
  width: min(240px, 28vw);
  min-width: 180px;
  min-height: var(--page-action-height);
  padding: 0 16px;
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-pill);
  background: var(--white);
}

.source-filter-search:focus-within {
  border-color: var(--black);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.source-filter-search input {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: var(--page-action-font-size);
  font-weight: var(--page-action-font-weight);
  line-height: var(--page-action-line-height);
}

.source-filter-search input::placeholder { color: var(--text-muted); opacity: 1; }

.source-filter-group > label:not(.source-filter-search) { display: inline-flex; }
.source-filter-group .select-control { min-height: var(--page-action-height); }

.source-list-actions-leading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  flex: 0 0 auto;
  min-width: 0;
}

.source-toolbar-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--page-action-height);
  padding: 4px 0;
}

.source-toolbar-action .icon { width: 18px; height: 18px; }

.source-toolbar-action--icon-only {
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
}

.source-toolbar-action--icon-only:hover,
.source-toolbar-action--icon-only:focus-visible {
  background: transparent;
  outline: none;
}

.source-toolbar-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background-color var(--motion-fast) ease;
}

.source-toolbar-action--icon-only:hover .source-toolbar-action-icon,
.source-toolbar-action--icon-only:focus-visible .source-toolbar-action-icon {
  background: var(--surface-soft);
}

.source-toolbar-menu {
  position: relative;
}

.source-toolbar-menu > summary {
  list-style: none;
}

.source-toolbar-menu > summary::-webkit-details-marker { display: none; }

.source-toolbar-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--page-action-height);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.source-toolbar-trigger::after {
  color: var(--text-muted);
  content: "⌄";
  font-size: 14px;
  line-height: 1;
}

.source-selection-trigger {
  width: 112px;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--white);
  gap: 0;
}

.source-selection-trigger::after { display: none; }

.source-selection-checkbox,
.source-selection-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.source-selection-checkbox::before {
  display: block;
  width: 16px;
  height: 16px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  content: "";
}

.source-selection-caret .icon { width: 18px; height: 18px; }

.source-selection-checkbox:hover,
.source-selection-caret:hover {
  background: var(--surface-soft);
}

.source-selection-trigger:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

.source-toolbar-trigger:hover,
.source-toolbar-menu[open] > .source-toolbar-trigger {
  border-color: var(--black);
  background: var(--surface-soft);
}

.source-toolbar-menu > .source-selection-trigger:hover,
.source-toolbar-menu[open] > .source-selection-trigger {
  border-color: transparent;
  background: var(--white);
}

.source-toolbar-menu-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(144px, calc(100vw - 24px));
  max-height: min(360px, calc(100dvh - 24px));
  overflow-x: hidden;
  overflow-y: auto;
}

.source-toolbar-menu-item > span { min-width: 0; flex: 1; }

.source-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  margin: 0;
}

.source-page-label {
  margin-right: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.source-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
}

.source-page-button-next .icon { transform: rotate(180deg); }

.source-page-button:hover:not(:disabled),
.source-page-button:focus-visible:not(:disabled) {
  background: var(--surface-soft);
  outline: none;
}

.source-page-button:disabled { color: var(--text-disabled); opacity: 0.45; }

.sources-page:not(.source-run-page) .source-list-table {
  row-gap: 8px;
}

.sources-page:not(.source-run-page):not(.is-selection-mode) .source-row-select {
  display: none;
}

.sources-page:not(.source-run-page) .source-row-leading:not(.is-selection-mode) {
  grid-template-columns: 20px 36px;
}

.sources-page:not(.source-run-page) .source-row-leading.is-selection-mode {
  grid-template-columns: 16px 20px 36px;
}

.sources-page:not(.source-run-page) .source-drag-handle,
.sources-page:not(.source-run-page) .source-drag-placeholder {
  align-self: center;
  justify-self: center;
}

.sources-page:not(.source-run-page) .source-drag-handle span {
  margin: 0 auto;
  transform: translateY(-4px);
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row .source-row-inner {
  border: 0;
  border-radius: 10px;
  background: var(--white);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), background-color var(--motion-fast) ease, box-shadow 220ms ease;
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row:hover .source-row-inner,
.sources-page:not(.source-run-page) .source-row-card.library-list-row:focus-within .source-row-inner {
  background: var(--surface-soft);
}

.sources-page:not(.source-run-page) .source-row-card.library-list-row.is-selected .source-row-inner,
.sources-page:not(.source-run-page) .source-row-card.library-list-row.is-reordering .source-row-inner {
  background: var(--surface-soft);
}

@media (max-width: 767px) {
  .sources-page:not(.source-run-page) .source-list-toolbar,
  .source-run-page .source-list-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 8px;
  }

  .sources-page:not(.source-run-page) .source-list-back,
  .source-run-page .source-list-back { margin-right: auto; }

  .source-filter-group {
    width: 100%;
    margin-left: 0;
  }

  .source-filter-search {
    width: 100%;
    max-width: none;
    flex: 1 1 100%;
  }

  .source-filter-group > label:not(.source-filter-search) {
    flex: 1 1 0;
  }

  .source-filter-group > label:not(.source-filter-search) .select-control { width: 100%; }

  .sources-page:not(.source-run-page) .source-list-toolbar,
  .source-run-page .source-list-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .sources-page:not(.source-run-page) .source-list-back,
  .source-run-page .source-list-back { margin-right: 0; }
  .source-list-actions-leading { flex: 0 0 auto; }
  .source-pagination { flex: 0 0 auto; width: auto; justify-content: flex-start; }
}

/* Homepage review pass: pure-color golden-ratio frame, calmer copy, and a
   wider responsive accordion rail. */
.home-hero {
  grid-template-columns: minmax(0, 0.618fr) minmax(0, 1fr);
  gap: 24px;
}

.home-intro-card,
.home-masonry-card {
  height: clamp(520px, 64svh, 900px);
  min-height: clamp(520px, 64svh, 900px);
}

.home-intro-card {
  padding: 0;
}

.home-intro-card::before,
.home-intro-card::after,
.home-masonry-card::before,
.home-masonry-card::after {
  display: none;
}

.home-intro-copy {
  max-width: none;
  margin-top: 0;
}

.home-intro-content {
  position: absolute;
  z-index: 1;
  top: 16.666%;
  right: 64px;
  bottom: 16.666%;
  left: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: auto;
  height: auto;
  margin: 0;
}

.home-intro-copy h1 {
  max-width: none;
  color: #F8FFA3;
  text-align: left;
  text-wrap: wrap;
}

.home-intro-copy h1 em {
  color: #F8FFA3;
}

.home-intro-copy p {
  width: 100%;
  max-width: none;
  text-wrap: wrap;
}

.home-intro-bottom {
  display: flex;
  flex: 0 0 34%;
  align-items: flex-end;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.home-keyword-cloud {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-items: center;
  align-content: stretch;
  width: 100%;
  height: 100%;
  gap: 12px 8px;
}

.home-keyword-bubble {
  min-height: 52px;
  padding: 11px 18px 11px 16px;
  font-size: 16px;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
  transform: rotate(var(--bubble-rotation, -3deg));
  animation: home-bubble-fall 900ms cubic-bezier(0.2, 0.86, 0.32, 1.08) both;
  animation-delay: calc(var(--bubble-index, 0) * 110ms);
}

.home-keyword-bubble:nth-child(1) {
  grid-column: 1 / span 3;
  grid-row: 1;
  justify-self: start;
}

.home-keyword-bubble:nth-child(2) {
  grid-column: 4 / span 3;
  grid-row: 1;
  justify-self: end;
}

.home-keyword-bubble:nth-child(3) {
  grid-column: 1 / span 2;
  grid-row: 2;
  justify-self: start;
}

.home-keyword-bubble:nth-child(4) {
  grid-column: 3 / span 2;
  grid-row: 2;
  justify-self: center;
}

.home-keyword-bubble:nth-child(5) {
  grid-column: 5 / span 2;
  grid-row: 2;
  justify-self: end;
}

.home-keyword-bubble--1 { --bubble-fall-x: -12px; --bubble-fall-rotation: -11deg; }
.home-keyword-bubble--2 { --bubble-fall-x: 16px; --bubble-fall-rotation: 13deg; }
.home-keyword-bubble--3 { --bubble-fall-x: -8px; --bubble-fall-rotation: 9deg; }
.home-keyword-bubble--4 { --bubble-fall-x: 10px; --bubble-fall-rotation: -14deg; }
.home-keyword-bubble--5 { --bubble-fall-x: 18px; --bubble-fall-rotation: 8deg; }

.home-keyword-bubble small {
  font-size: 12px;
}

.home-keyword-hash {
  font-size: 14px;
}

.home-keyword-bubble:hover,
.home-keyword-bubble:focus-visible {
  transform: translateY(-5px) rotate(0deg) scale(1.04);
}

@keyframes home-bubble-fall {
  0% {
    opacity: 0;
    transform: translate3d(var(--bubble-fall-x, 0), -min(680px, 54vh), 0) scale(0.72) rotate(var(--bubble-fall-rotation, 0deg));
  }
  64% {
    opacity: 1;
    transform: translate3d(calc(var(--bubble-fall-x, 0) * 0.28), 13px, 0) scale(1.08) rotate(calc(var(--bubble-fall-rotation, 0deg) * -0.28));
  }
  82% {
    transform: translate3d(calc(var(--bubble-fall-x, 0) * -0.12), -4px, 0) scale(0.98) rotate(calc(var(--bubble-rotation, -3deg) * 1.25));
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotate(var(--bubble-rotation, -3deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-keyword-bubble {
    animation: none;
    transform: rotate(var(--bubble-rotation, -3deg));
  }
}

.topic-accordion {
  --accordion-collapsed-width: 96px;
}

@media (min-width: 768px) {
  .topic-accordion-panel {
    flex-basis: var(--accordion-collapsed-width);
    width: var(--accordion-collapsed-width);
  }

  .topic-accordion-panel.is-active {
    flex-basis: var(--accordion-active-width);
    width: var(--accordion-active-width);
  }
}

@media (max-width: 1100px) and (min-width: 768px) {
  .home-hero {
    grid-template-columns: minmax(0, 0.618fr) minmax(0, 1fr);
  }

  .home-intro-card,
  .home-masonry-card {
    height: clamp(480px, 64svh, 680px);
    min-height: clamp(480px, 64svh, 680px);
  }

  .home-intro-card {
    padding: 0;
  }

  .home-intro-content {
    right: 48px;
    left: 48px;
  }
}

@media (max-width: 767px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-intro-card,
  .home-masonry-card {
    height: clamp(520px, 64svh, 600px);
    min-height: clamp(520px, 64svh, 600px);
  }

  .home-intro-card {
    padding: 0;
  }

  .home-intro-content {
    right: 32px;
    left: 32px;
  }

  .home-intro-copy h1 {
    font-size: clamp(60px, 17vw, 94px);
  }

  .home-intro-copy p {
    font-size: 15px;
  }

  .home-keyword-bubble {
    min-height: 46px;
    padding: 10px 12px 10px 11px;
    font-size: 14px;
  }

  .home-keyword-hash {
    font-size: 12px;
  }

  .home-keyword-bubble small {
    font-size: 10px;
  }

  .home-intro-bottom {
    padding-top: 24px;
  }
}

.sidebar.is-collapsed .sidebar-utilities {
  flex-direction: column;
}

.settings-subfunctions {
  width: min(100% - 80px, 720px);
  margin: 0 40px 32px;
}

.settings-section-heading {
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--black);
}

.settings-section-heading .eyebrow {
  color: var(--text-muted);
  font-size: 10px;
}

.settings-section-heading h2 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.settings-subfunction-list {
  border-bottom: 1px solid var(--hairline);
}

.settings-subfunction {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  color: var(--black);
  text-align: left;
}

.settings-subfunction:last-child {
  border-bottom: 0;
}

.settings-subfunction:hover:not(:disabled),
.settings-subfunction:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.settings-subfunction:disabled {
  color: var(--text-disabled);
  cursor: not-allowed;
}

.settings-subfunction-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
}

.settings-subfunction-icon .icon {
  width: 18px;
  height: 18px;
}

.settings-subfunction-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-subfunction-copy strong {
  font-size: 15px;
  font-weight: 650;
}

.settings-subfunction-copy small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.settings-subfunction-arrow {
  width: 16px !important;
  height: 16px !important;
  transform: rotate(180deg);
}

.settings-subfunction-value {
  min-width: 38px;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.settings-notification-wrap {
  margin-top: 16px;
}

.settings-notification-wrap .notification-panel {
  position: static;
  width: 100%;
  max-width: 520px;
  box-shadow: none;
}

@media (max-width: 767px) {
  .settings-subfunctions {
    width: calc(100% - 32px);
    margin-right: 16px;
    margin-left: 16px;
  }

  .settings-subfunction {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .settings-subfunction-icon {
    width: 36px;
    height: 36px;
  }
}

/* September 11 browser review: shared card geometry and exclusive icon states. */
.home-intro-copy h1 { display: flex; flex-direction: column; gap: 20px; }
.home-title-wordmark { display: flex; flex-direction: column; gap: 0.1em; width: fit-content; max-width: 100%; color: #F8FFA3; }
.home-title-line { display: flex; align-items: flex-end; gap: 0.04em; }
.home-title-glyph { display: block; flex: 0 0 auto; width: auto; height: 1em; overflow: visible; }
.home-intro-copy h1:has(.home-title-wordmark) { font-size: clamp(72px, 8.4cqw, 96px); font-weight: 400; line-height: 0.9; letter-spacing: 0; }
.home-intro-content { container-type: inline-size; }
.home-keyword-cloud { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 4px; height: auto; padding: 10px 0; }
.home-keyword-cloud .home-keyword-bubble { position: relative; grid-column: span 2; grid-row: auto; justify-self: stretch; justify-content: center; width: 100%; min-width: 0; min-height: 0; padding: 7cqw 1cqw; background: #F8FFA3; color: black; border: 0; font-size: clamp(10px, 3cqw, 28px); box-shadow: none; animation: none; }
.home-keyword-cloud .home-keyword-bubble:nth-child(4) { grid-column: 2 / span 2; }
.home-keyword-cloud .home-keyword-bubble:nth-child(5) { grid-column: 4 / span 2; }
.home-keyword-cloud .home-keyword-bubble small { font-size: 0.55em; }
.home-keyword-cloud .home-keyword-hash { font-size: 0.65em; color: inherit; }
.home-masonry-card { background: var(--masonry-shell-bg); height: auto; min-height: 0; align-self: start; }
.home-masonry { flex: none; grid-template-rows: none; grid-auto-rows: var(--home-card-height, 420px); gap: 16px; min-height: 0; width: 100%; }
.home-masonry .home-masonry-item { grid-column: auto; grid-row: auto; height: var(--home-card-height, 420px); border: 0; border-radius: 16px; background: var(--masonry-card-bg); box-shadow: none; outline: 0; animation: none; transform: none; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.home-masonry .home-masonry-item:not(.home-masonry-item--no-image) { background: transparent; }
.home-masonry-item[hidden] { display: none; }
.home-masonry-item:hover, .home-masonry-item:focus-visible { border: 0; box-shadow: none; outline: 0; transform: none; }
.home-masonry-copy { background: var(--masonry-card-bg); }
.home-page .topic-strip { grid-auto-columns: var(--home-card-width, 325px); }
.home-page .topic-card { height: var(--home-card-height, 420px); }
.topic-accordion-body::before { top: -24px; height: auto; background: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.86) 48px, rgba(0,0,0,.94) 100%); box-shadow: none; }
.sidebar-brand .brand-mark .brand-toggle-icon { position: absolute; inset: 0; display: none; color: var(--black); }
.brand-expand-button:hover .brand-mark .brand-toggle-icon, .brand-expand-button:focus-visible .brand-mark .brand-toggle-icon { display: flex; }
.brand-expand-button:hover .brand-mark .brand-mark-logo, .brand-expand-button:focus-visible .brand-mark .brand-mark-logo { display: none; }
.sidebar-hover-icon { display: none; }
.sidebar-collapse-button:hover .sidebar-default-icon, .sidebar-collapse-button:focus-visible .sidebar-default-icon { display: none; }
.sidebar-collapse-button:hover .sidebar-hover-icon, .sidebar-collapse-button:focus-visible .sidebar-hover-icon { display: inline-flex; }
@media (min-width: 768px) {
  .topic-carousel--accordion { display: flex; gap: 10px; width: 100%; }
  .topic-accordion { flex: 1; width: auto; max-width: none; height: var(--home-card-height, 420px); }
  .topic-accordion .topic-accordion-panel { display: block; flex: 0 0 var(--accordion-collapsed-width); transform: none; }
  .topic-accordion .topic-accordion-panel.is-active { flex-basis: var(--accordion-active-width); }
}
@media (max-width: 767px) {
  .home-masonry-card { height: auto; min-height: 0; }
  .home-intro-bottom { padding-top: 12px; }
}

.topic-accordion-body { top: auto; }
@media (min-width: 768px) {
  .home-intro-card { height: calc(var(--home-card-height, 420px) * 2 + 16px); min-height: 0; }
}
@media (max-width: 767px) {
  .topic-accordion { height: calc(var(--home-card-height, 420px) + 192px); min-height: 0; }
  .topic-accordion .topic-accordion-panel { display: block; flex: 0 0 56px; }
  .topic-accordion .topic-accordion-panel.is-active { flex: 0 0 var(--home-card-height, 420px); }
}
.sidebar-brand .brand-toggle-icon .icon { color: var(--black); }
.brand-expand-button:is(:hover, :focus-visible) .brand-mark::before { display: none; }

/* Source imagery, viewport-sized opening and a quiet physical closing scene. */
.home-page.main-content { padding-bottom: 0; }
.home-hero { height: 66.666667svh; }
.home-hero .home-intro-card, .home-hero .home-masonry-card { height: 100%; min-height: 0; }
.home-hero .home-intro-card { background: #716BEE; box-shadow: 0 10px 30px -16px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.025); }
.home-hero .home-masonry-card { background: #CBBCF8; }
.home-intro-content { top: 14%; bottom: 14%; right: clamp(24px, 2.7vw, 64px); left: clamp(24px, 2.7vw, 64px); }
.home-intro-copy h1,
.home-intro-copy h1 em { color: #F8FFA3; }
.home-intro-copy h1 { font-size: 96px; line-height: 1; font-weight: 700; }
.home-intro-copy p { margin-top: 24px; color: #ffffff; font-size: 24px; line-height: 1.6; }
.home-keyword-cloud .home-keyword-bubble { border: 1px solid #F8FFA3; background: #F8FFA3; }
.home-masonry { display: block; position: relative; height: 100%; overflow: hidden; }
.home-masonry .home-masonry-item { position: absolute; top: 0; left: 0; width: var(--home-card-width); height: var(--home-card-height); transition: none; }
.home-masonry-visual { overflow: hidden; border-radius: 16px 16px 0 0; }
.home-masonry-visual::after { display: none; }
.home-masonry-visual img { display: block; width: 100%; height: 100%; border: 0; filter: none; object-fit: cover; transform: scale(1.04); transform-origin: center center; }
.home-masonry-item--no-image { justify-content: center; }
.home-masonry-item--no-image .home-masonry-copy { padding: 28px; gap: 16px; }
.home-masonry-item--no-image .home-masonry-copy strong { font-size: 24px; line-height: 1.3; -webkit-line-clamp: 6; }
.home-masonry-item--no-image .home-masonry-visual { display: none; }
.topic-accordion-image, .topic-accordion-panel.is-active .topic-accordion-image { filter: none; transform: none; transition: none; }
.topic-accordion-overlay { background: rgba(0,0,0,.38); transition: opacity 320ms ease; }
.topic-accordion-panel.is-active .topic-accordion-overlay { background: rgba(0,0,0,.38); opacity: 0; }
.topic-accordion-panel--no-image, .topic-accordion-panel--no-image .topic-accordion-frame { background: #151515; }
.topic-accordion-panel--no-image .topic-accordion-body::before { display: none; }
.topic-accordion-panel .topic-accordion-body { transition: opacity 220ms ease; transform: none; }
.topic-accordion-panel.is-active .topic-accordion-body { transform: none; transition-delay: 100ms; }
.home-endcap { display: block; margin: 80px 0 0; padding: 0; min-height: 0; background: #f7f7f2; border-top: 1px solid #e9e9e3; }
.home-endcap-hero { padding: 40px var(--home-page-inset-x); min-height: min(780px, 85svh); background: transparent; color: #111; border-radius: 0; overflow: hidden; }
.home-endcap-brand { color: #111; }
.home-endcap-brand-mark { border: 0; border-radius: 12px; background: #111; color: white; }
.home-endcap-stage { position: static; display: flex; align-items: center; min-height: min(660px, 70svh); }
.home-endcap-copy { position: relative; z-index: 2; max-width: 55%; margin: 0; padding: 48px 0; }
.home-endcap-copy h2 { margin: 0 0 24px; font-size: clamp(48px, 6.8vw, 112px); line-height: 1.13; letter-spacing: -.055em; font-weight: 650; }
.home-endcap-copy h2 span { color: #01b6ff; }
.home-endcap-copy p { color: #50534e; font-size: 16px; max-width: none; }
.home-endcap-return { margin-top: 36px; gap: 10px; }
.home-lanyard-stage { position: absolute; top: 0; right: 0; width: 48%; height: 100%; }
.home-lanyard-host { position: absolute; inset: 0; }
.home-lanyard-poster { position: absolute; width: min(38%, 230px); height: auto; top: 25%; left: 32%; transform: rotate(8deg); filter: drop-shadow(0 16px 20px rgba(0,0,0,.12)); }
.home-lanyard-stage:has(canvas) .home-lanyard-poster { display: none; }
.home-endcap-footer { margin: 0; padding: 24px var(--home-page-inset-x); min-height: 80px; border-top: 1px solid #e0e1d9; background: transparent; }
.home-endcap-nav { margin: 0; }
.home-endcap-nav a { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; }
.home-endcap-meta { color: #50534e; }
@media (min-width: 768px) {
  .topic-accordion { display: block; position: relative; }
  .topic-accordion .topic-accordion-panel, .topic-accordion .topic-accordion-panel.is-active { position: absolute; inset: 0 auto 0 0; width: var(--accordion-active-width); transform: translate3d(var(--accordion-x, 0px), 0, 0); clip-path: inset(0 var(--accordion-clip, 0px) 0 0 round 16px); box-shadow: none; transition: transform 560ms cubic-bezier(.22,1,.36,1), clip-path 560ms cubic-bezier(.22,1,.36,1); will-change: transform, clip-path; }
  .topic-accordion-panel .topic-accordion-frame, .topic-accordion-panel .topic-accordion-body { width: var(--accordion-active-width); }
}
@media (max-width: 767px) {
  .home-hero { height: auto; }
  .home-hero .home-intro-card, .home-hero .home-masonry-card { height: max(430px, 66.666667svh); }
  .home-intro-copy h1 { font-size: clamp(42px, 14cqw, 64px); }
  .home-intro-copy p { margin-top: 20px; }
  .home-endcap { margin-top: 48px; padding: 0; }
  .home-endcap-hero { padding: 28px var(--home-page-inset-x) 0; min-height: 820px; }
  .home-endcap-stage { display: block; min-height: 750px; }
  .home-endcap-copy { max-width: 100%; padding-top: 48px; }
  .home-endcap-copy h2 { font-size: clamp(44px, 12vw, 68px); }
  .home-lanyard-stage { top: auto; bottom: 0; width: 100%; height: 440px; }
  .home-endcap-footer { padding: 24px var(--home-page-inset-x); gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .topic-accordion .topic-accordion-panel, .topic-accordion-overlay, .topic-accordion-body { transition: none; }
}
@media (min-width: 768px) {
  .topic-accordion { overflow: clip; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-today,
  .tag-row,
  .story-card,
  .knowledge-card,
  .quick-read-card > a,
  .library-list-row .highlight-row-inner,
  .source-row-card.library-list-row .source-row-inner,
  .source-run-source-row,
  .source-run-item-row {
    transition: none;
  }
}

/* Reader: reserve real space for reading chrome instead of translating prose. */
#app.reader-app { --reader-side-space: 0px; --reader-outline-space: 224px; }
#app.reader-app:has(.reader-notebook) { --reader-side-space: 340px; }
#app.reader-app > .detail-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  padding: calc(env(safe-area-inset-top) + 72px) calc(var(--reader-side-space) + var(--reader-outline-space) + 24px) 96px 96px;
}
.reader-page-main, .reader-page-main.is-notebook-open { transform: none; min-width: 0; }
.reader-prose { overflow-wrap: anywhere; }
.reader-outline { width: 156px; right: calc(var(--reader-side-space) + 24px); }
.reader-outline.is-notebook-open { right: calc(var(--reader-side-space) + 24px); }
.reader-scroll-progress, .reader-scroll-progress.is-notebook-open { right: calc(var(--reader-side-space) + 198px); }
.reader-outline-compact { display: none; }
.reader-highlight, .reader-highlight.is-located {
  background: linear-gradient(#F2AD91, #F2AD91) left center / 100% 100% no-repeat;
  color: #171717;
  border-radius: .3em;
}
.reader-highlight.will-reveal { background-size: 0% 100%; }
.reader-highlight.is-revealed { background-size: 100% 100%; transition: background-size 1s cubic-bezier(.22, 1, .36, 1) .4s; }
@media (max-width: 1399px) {
  #app.reader-app { --reader-outline-space: 0px; }
  .reader-outline, .reader-scroll-progress { display: none; }
  .reader-outline-compact { display: block; margin: 20px 0; color: var(--reader-muted); font-size: 14px; }
  .reader-outline-compact summary { cursor: pointer; width: fit-content; padding: 8px 0; }
  .reader-outline-compact nav { display: grid; max-height: 240px; overflow-y: auto; }
}
@media (max-width: 900px) {
  #app.reader-app:has(.reader-notebook) { --reader-side-space: 0px; }
  .reader-notebook { position: relative; inset: auto; width: 100%; max-width: 720px; margin: 32px auto 0; padding: 0 0 24px; border-left: 0; border-top: 1px solid var(--reader-line); scroll-margin-top: 24px; }
  .reader-notebook .notebook-highlights { overflow: visible; }
}
@media (max-width: 767px) {
  #app.reader-app > .detail-shell { padding: calc(env(safe-area-inset-top) + 72px) 20px calc(104px + env(safe-area-inset-bottom)); }
  .reader-tool-rail { position: fixed; z-index: 80; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; width: max-content; max-width: calc(100vw - 24px); margin: 0; transform: translateX(-50%); }
  .reader-tool-stack { flex-wrap: nowrap; gap: 0; width: auto; padding: 6px; }
  .reader-tool-button { width: clamp(36px, 11vw, 44px); height: 44px; }
  .reader-tool-rail .tool-tooltip { top: auto; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); }
  .reader-prose p { scroll-margin-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .reader-highlight.will-reveal, .reader-highlight.is-revealed { background-size: 100% 100%; transition: none; }
}

/* Tooltip content stays in the trigger as a template; only the top-layer copy paints. */
.has-tool-tooltip .tool-tooltip { display: none !important; }
.tool-tooltip.floating-tool-tooltip {
  position: fixed;
  inset: auto;
  display: flex;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: 0;
  border: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
  transform: none;
  z-index: 1000;
}
.floating-tool-tooltip::before, .floating-tool-tooltip::after { display: none; }
.floating-tool-tooltip kbd { flex-shrink: 0; }
.reader-settings-panel { max-height: calc(100dvh - 24px); overflow-y: auto; }
.source-confirm-dialog { max-height: calc(100dvh - 48px); overflow-y: auto; }

.search-agent-scope-menu, .search-agent-plus-menu {
  position: fixed;
  right: auto;
  bottom: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-agent-scope-menu, .search-agent-plus-menu { margin: 0; }

/* Home annotation fixes: readable bubbles and contained mobile accordion rails. */
.home-keyword-cloud .home-keyword-bubble { height: 12cqw; padding: 0 0.6cqw; font-size: clamp(12px, 4cqw, 36px); line-height: 1.5; gap: 0.5cqw; }
.home-keyword-cloud .home-keyword-bubble:is(:hover, :focus-visible) { background: #000; border-color: #000; color: #fff; }
.home-keyword-cloud .home-keyword-bubble:is(:hover, :focus-visible) small { color: #fff; }
@media (max-width: 767px) {
  .home-page .topic-accordion { height: calc(var(--home-card-height, 420px) + (var(--accordion-visible-count, 4) - 1) * 64px); }
}

/* Home category shelves: Matter cards and compact five-minute reads. */
.home-shelf:not(.home-shelf--top-picks) .topic-strip { grid-auto-columns: min(325px, 80%); gap: 24px; align-items: stretch; }
.home-shelf:not(.home-shelf--top-picks):not(.home-shelf--quick-five) .topic-card { height: auto; min-height: 0; aspect-ratio: 0.76; border: 0; box-shadow: none; }
.home-shelf:not(.home-shelf--top-picks):not(.home-shelf--quick-five) .topic-card--no-image { border: 0; }
.home-shelf:not(.home-shelf--top-picks):not(.home-shelf--quick-five) .topic-card--no-image .topic-card-body { position: absolute; inset: 0; justify-content: flex-end; min-height: 0; padding: 0 20px 20px; }
.home-page .home-shelf--quick-five .topic-strip { grid-auto-columns: calc((100% - 96px) / 5); }
.home-page .home-shelf--quick-five .topic-card--quick { aspect-ratio: auto; background: transparent; border: 0; box-shadow: none; border-radius: 16px; overflow: visible; transform: none; color: inherit; }
.topic-card--quick { --topic-quick-source-height: 20px; --topic-quick-title-height: 48px; --topic-quick-section-gap: 6px; }
.topic-card--quick::after { display: none; }
.topic-card--quick .topic-card-image { position: relative; width: 100%; height: auto; overflow: hidden; aspect-ratio: 1; border: 0; border-radius: 16px; transform: none; }
.topic-card--quick .topic-card-image--placeholder { background: var(--app-surface-soft, var(--surface-soft)); }
.home-shelf--quick-five .topic-card--quick .topic-card-body { position: static; display: flex; flex-direction: column; min-height: 0; padding: 12px 0 0; color: inherit; }
.topic-card--quick .topic-source-line { flex: 0 0 var(--topic-quick-source-height); height: var(--topic-quick-source-height); min-height: var(--topic-quick-source-height); margin: 0; color: var(--app-text-muted, var(--text-muted)); font-size: 14px; line-height: var(--topic-quick-source-height); }
.topic-card--quick .topic-source-line .channel-inline { display: none; }
.topic-card--quick .topic-card-body .topic-card-title { flex: 0 0 var(--topic-quick-title-height); height: var(--topic-quick-title-height); margin: var(--topic-quick-section-gap) 0 0; color: inherit; font-size: 17px; line-height: 1.4; -webkit-line-clamp: 2; }
.topic-card--quick .topic-card-body .topic-card-summary { display: none; }
.home-shelf .topic-card-hit:focus-visible { outline: 2px solid var(--app-fg, var(--black)); outline-offset: -3px; border-radius: inherit; }
.topic-card--no-image .topic-card-hit:focus-visible { outline-color: var(--black); }
@media (max-width: 1100px) {
  .home-page .home-shelf--quick-five .topic-strip { grid-auto-columns: calc((100% - 48px) / 3); }
}
@media (max-width: 767px) {
  .home-shelf:not(.home-shelf--top-picks) .topic-strip { grid-auto-columns: min(325px, 86%); gap: 16px; }
  .home-page .home-shelf--quick-five .topic-strip { grid-auto-columns: calc((100% - 16px) / 2); }
  .home-shelf .topic-actions { opacity: 1; visibility: visible; transform: none; }
  .home-shelf .topic-icon-button { width: 44px; height: 44px; }
}
.home-page .home-shelf--quick-five .topic-card--quick .topic-card-body { position: static; padding: 12px 0 0; }
.home-shelf .topic-card-image[hidden] { display: none; }

.home-shelf .topic-control { position: absolute; top: 45%; width: 44px; height: 44px; }
.home-shelf .topic-control-prev { left: 8px; right: auto; }
.home-shelf .topic-control-next { right: 8px; left: auto; }

/* Carry each cover's own colors into the text surface without cross-origin pixel reads. */
.home-shelf:not(.home-shelf--top-picks):not(.home-shelf--quick-five) .topic-card-image { border: 0; transform: scale(1.04); transform-origin: center center; }
.home-shelf:not(.home-shelf--top-picks):not(.home-shelf--quick-five) .topic-card { overflow: hidden; }
.topic-cover-wash { position: absolute; inset: -15%; width: 130%; height: 130%; object-fit: cover; filter: blur(36px) saturate(1.15) brightness(.48); pointer-events: none; mask-image: linear-gradient(to bottom, transparent 20%, #000 66%); }
.topic-card--matter::after { background: linear-gradient(to top, rgba(0, 0, 0, .18), transparent 65%); }
.topic-card--no-image .topic-cover-wash { display: none; }

/* Settings workspace: reuse the shared shell and semantic theme tokens. */
.settings-workspace { display: grid; grid-template-columns: 176px minmax(0, 640px); gap: 40px; padding: 8px 40px 40px; }
.settings-section-nav { min-width: 0; }
.settings-nav-group + .settings-nav-group { margin-top: 28px; }
.settings-nav-group > p { margin: 0 0 8px; padding: 0 12px; color: var(--text-muted); font-size: 12px; }
.settings-nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 8px; background: transparent; color: var(--text-muted); text-align: left; font-size: 14px; line-height: 1.4; }
.settings-nav-item .icon { width: 20px; height: 20px; flex-shrink: 0; }
.settings-nav-item[aria-current="page"] { background: var(--surface-soft); color: var(--app-fg, var(--black)); font-weight: 600; }
.settings-nav-item:hover { background: var(--surface-soft); color: var(--app-fg, var(--black)); }
.settings-nav-item:focus-visible, .settings-choice button:focus-visible, .settings-unavailable:focus-visible { outline: 2px solid var(--app-fg, var(--black)); outline-offset: 3px; }
.settings-unread { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--black); }
.settings-detail { min-width: 0; }
.settings-detail > h2:first-child { margin: 0 0 24px; padding: 5px 0 20px; border-bottom: 1px solid var(--hairline); font-size: 20px; font-weight: 600; line-height: 1.4; }
.settings-detail-subheading { margin: 30px 0 8px; color: var(--text-muted); font-size: 12px; font-weight: 500; }
.settings-detail > h2:first-child + .settings-detail-subheading { margin-top: 0; }
.settings-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.settings-row-copy { min-width: 0; }
.settings-row-copy h3 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.5; }
.settings-row-copy p { margin: 5px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.settings-row-control { flex-shrink: 0; max-width: 55%; }
.settings-readonly { display: block; overflow-wrap: anywhere; color: var(--text-muted); font-size: 13px; }
.settings-choice { display: inline-flex; padding: 3px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); }
.settings-choice button { min-height: 38px; padding: 8px 14px; border-radius: var(--radius-pill); background: transparent; color: var(--text-muted); font-size: 13px; }
.settings-choice button[aria-pressed="true"] { background: var(--black); color: var(--white); }
.settings-row-control .outline-pill { min-height: 44px; font-size: 13px; white-space: nowrap; }
.settings-unavailable { position: relative; display: inline-flex; border-radius: var(--radius-pill); cursor: not-allowed; }
.settings-unavailable button { pointer-events: none; }
.settings-unavailable .tool-tooltip { max-width: min(300px, 75vw); white-space: normal; }
.settings-detail-footer { margin-top: 32px; }
.settings-detail .settings-notification-wrap .notification-panel { max-width: none; }
.settings-detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 16px; }
.settings-save-status { margin: 0 0 12px; color: var(--success, #16794c); font-size: 13px; }
.settings-detail-back { margin: -12px 0 16px; }
.settings-text-input { width: min(100%, 320px); min-height: 42px; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--app-bg, var(--white)); color: var(--app-fg, var(--black)); font: inherit; }
.settings-inline-field { flex: 1 1 180px; min-width: 0; }
.settings-inline-field input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--app-bg, var(--white)); color: var(--app-fg, var(--black)); font: inherit; }
.settings-switch { min-height: 38px; padding: 8px 14px; border: 1px solid var(--hairline); border-radius: var(--radius-pill); background: transparent; color: var(--text-muted); font-size: 13px; }
.settings-switch[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--white); }
.content-organization-list { border-top: 1px solid var(--hairline); }
.content-organization-row, .content-organization-topic-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.content-organization-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.content-organization-copy strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.content-organization-copy span { color: var(--text-muted); font-size: 12px; }
.content-organization-drag { width: 20px; color: var(--text-muted); font-size: 20px; line-height: 1; text-align: center; }
.content-organization-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.content-organization-actions .text-button { min-width: 24px; padding: 4px; }
.content-organization-actions .text-button:disabled { opacity: .35; cursor: not-allowed; }
.content-organization-topic-list { margin-bottom: 16px; border-top: 1px solid var(--hairline); }
.content-organization-topic-row .text-button { flex: 0 0 auto; }
@media (max-width: 767px) {
  .settings-detail-toolbar { align-items: flex-start; flex-direction: column; }
  .content-organization-topic-row { flex-wrap: wrap; }
  .content-organization-topic-row .settings-switch { margin-left: 32px; }
}
@media (max-width: 1100px) {
  .settings-workspace { grid-template-columns: 160px minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 767px) {
  .settings-workspace { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 8px 16px 32px; }
  .settings-section-nav { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
  .settings-nav-group, .settings-nav-group + .settings-nav-group { display: contents; }
  .settings-nav-group > p { display: none; }
  .settings-nav-item { width: auto; padding: 10px; }
  .settings-detail-row { flex-wrap: wrap; gap: 14px; }
  .settings-row-control { max-width: 100%; }
  .settings-row-copy { flex: 1 1 150px; }
  .settings-detail > h2:first-child { margin-bottom: 20px; }
}

.settings-page .library-heading { background: var(--app-bg, var(--white)); color: var(--app-fg, var(--black)); }
.settings-page .library-heading .hero-copy h1, .settings-page .page-heading-back { color: var(--app-fg, var(--black)); }
.settings-row-control .outline-pill, .settings-detail-footer .outline-pill { background: transparent; border: 1px solid var(--hairline); color: var(--app-fg, var(--black)); }
.settings-row-control .outline-pill:disabled { opacity: .45; }
.settings-row-control .outline-pill:not(:disabled):hover { background: var(--surface-soft); }
.settings-field-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(100%, 240px); }
.settings-field-error { margin: 0; color: var(--danger, #b42318); font-size: 12px; text-align: right; }
@media (min-width: 1024px) {
  #app:has(.settings-page) > .topbar { display: none; }
}

.topic-strip:focus-visible,
.topic-accordion-panel:focus-visible {
  outline: 2px solid var(--app-fg, var(--black));
  outline-offset: 2px;
}

/* Home: featured accordion in the hero, followed by section filters. */
.home-page .home-hero { height: auto; align-items: stretch; }
.home-page .home-hero > .home-intro-card,
.home-page .home-hero > .home-featured-card { height: auto; min-height: var(--home-card-height, 420px); }
.home-page .home-intro-content { inset: 28px clamp(24px, 2.7vw, 48px); }
.home-page .home-intro-copy h1:has(.home-title-wordmark) { font-size: clamp(48px, 17cqw, 72px); }
.home-page .home-intro-copy p { margin-top: 18px; font-size: 24px; line-height: 1.5; color: #fff; }
.home-page .home-intro-bottom { flex: 0 1 auto; padding-top: 12px; }
.home-page .home-keyword-cloud .home-keyword-bubble { padding: 9px 5px; font-size: clamp(11px, 3.5cqw, 16px); }
.home-page .home-featured-card { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.home-featured-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; }
.home-featured-heading h2 { margin: 0; color: var(--black); font-size: 20px; line-height: 28px; font-weight: 650; }
.home-featured-more { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.home-featured-more .icon { width: 18px; height: 18px; }
.home-featured-card .topic-carousel--accordion { flex: 1; min-height: 0; }
@media (min-width: 768px) {
  .home-featured-card .topic-accordion { height: calc(var(--accordion-active-width, 325px) / 0.76); min-height: 0; }
}
.home-featured-state { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 0; padding: 20px; text-align: center; color: var(--black); }
.home-featured-state p { margin: 0; font-size: 15px; line-height: 1.5; }
.home-featured-state .text-button { min-height: 40px; padding: 8px 16px; }
.home-pill-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; width: fit-content; max-width: calc(100% - var(--home-page-inset-x) * 2); margin: 32px var(--home-page-inset-x) 0; padding: 5px; border-radius: 28px; background: #000; }
.home-pill { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px; background: #fff; color: #000; font-size: 14px; font-weight: 600; line-height: 24px; white-space: nowrap; cursor: pointer; }
.home-pill-circle { position: absolute; z-index: -1; left: -5%; top: 100%; width: 110%; aspect-ratio: 1; border-radius: 50%; background: #000; transform: translateY(0) scale(.6); transition: transform 450ms cubic-bezier(.16,1,.3,1); }
.home-pill-label { transition: transform 350ms cubic-bezier(.16,1,.3,1), opacity 200ms; }
.home-pill-hover { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; transform: translateY(110%); transition: transform 350ms cubic-bezier(.16,1,.3,1); }
.home-pill:hover .home-pill-circle,.home-pill:focus-visible .home-pill-circle { transform: translateY(-55%) scale(1.7); }
.home-pill:hover .home-pill-label,.home-pill:focus-visible .home-pill-label { transform: translateY(-150%); opacity: 0; }
.home-pill:hover .home-pill-hover,.home-pill:focus-visible .home-pill-hover { transform: translateY(0); }
.home-pill[aria-pressed="true"] { background: #000; color: #fff; }
.home-pill:focus-visible { outline: 3px solid #716bee; outline-offset: 3px; }
#home-shelves > .home-shelf:first-child { margin-top: 28px; }
@media (max-width: 767px) {
  .home-page .home-hero > .home-intro-card,
  .home-page .home-hero > .home-featured-card { height: max(390px, min(520px, calc(100svh - 210px))); }
  .home-page .home-featured-card { padding: 16px; }
  .home-pill-nav { gap: 4px; margin-top: 24px; border-radius: 22px; }
  .home-pill { flex: 1 0 auto; padding: 8px 13px; font-size: 13px; }
  .home-featured-card .topic-accordion { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-pill-circle,.home-pill-label,.home-pill-hover { transition: none; }
}
.home-featured-more .icon { transform: rotate(180deg); }
.home-featured-card .topic-carousel--accordion { min-width: 0; }

/* Full-width section navigation and shared featured-card proportions. */
.home-pill-nav { width: calc(100% - var(--home-page-inset-x) * 2); max-width: none; flex-wrap: nowrap; justify-content: safe center; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scroll-padding-inline: 10px; }
.home-pill-nav .home-pill { flex: 0 0 auto; }
.home-page .home-featured-card .topic-accordion { height: calc(var(--accordion-active-width, 325px) / .76); min-height: 0; }
.home-page .home-hero > .home-featured-card { height: auto; min-height: calc(var(--home-reference-width, 325px) / .76 + 88px); }
.home-page .home-hero > .home-intro-card { height: auto; min-height: 0; }
.library-header-actions { flex-wrap: wrap; }
.library-search-field { flex: 1 1 220px; min-width: 0; }
@media (max-width: 767px) {
  .home-page .home-hero > .home-intro-card { min-height: 360px; }
  .home-page .home-featured-card .topic-accordion { display: flex; flex-direction: row; gap: 10px; overflow-x: auto; width: 100%; height: calc(var(--accordion-active-width, 260px) / .76); }
  .home-page .home-featured-card .topic-accordion-panel,
  .home-page .home-featured-card .topic-accordion-panel.is-active { position: relative; inset: auto; flex: 0 0 var(--accordion-active-width, 260px); width: var(--accordion-active-width, 260px); height: 100%; transform: none; clip-path: none; }
  .home-page .home-featured-card .topic-accordion-body { opacity: 1; transform: none; }
  .home-page .home-hero > .home-featured-card { min-height: 380px; }
  .library-header-actions { width: 100%; gap: 8px; }
  .library-header-actions .library-search-field { flex-basis: 100%; width: 100%; }
}

@media (max-width: 767px) { .library-header-actions .library-search-field { max-width: none; } }
@media (max-width: 767px) {
  .home-page .home-featured-card .topic-accordion { scrollbar-width: none; }
  .home-page .home-featured-card .topic-accordion::-webkit-scrollbar { display: none; }
  .home-page .home-featured-card .topic-accordion-overlay { display: none; }
  .home-page .home-featured-card .topic-accordion-body { color: #fff; }
}
@media (max-width: 767px) {
  .home-page .home-featured-card .topic-accordion-panel { transition: none; }
}
