/* Scholar workspace: source-first reading, shared by desktop and native clients. */
:root {
  --bg: #151410;
  --card: #201f1a;
  --card-strong: #25231c;
  --ink: #f2eee4;
  --muted: #b6b0a4;
  --gold: #d7b76c;
  --blue: #adc5d0;
  --line: #ffffff18;
  --surface-nav: #1b1a16;
  --quote-ink: #e4ded2;
  --focus: #e9c77a;
  --on-accent: #17140c;
  --radius: 16px;
  font-size: 100%;
}
body { line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, summary, a, input, select, textarea { touch-action: manipulation; }
:where(button, summary, a, input, select, textarea):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
button, summary { min-height: 44px; }
.app-screen :is(button, input, select) { font-size: .875rem; min-height: 44px; }
.app-screen textarea { font-size: 1rem; line-height: 1.6; }
.app-screen :is(.project-status, .team-tier-badge, .team-project-meta, .guided-plan-status, .personal-source-status, .saved-section-heading > span) { font-size: .8125rem; }
.shell { max-width: 820px; padding-inline: clamp(16px, 4vw, 32px); }
.app-header { grid-template-columns: 1fr auto auto; gap: 12px; min-height: 52px; margin-bottom: 24px; }
.app-brand { font-size: 1.125rem; }
.app-screen-title { display: none; }
.app-credit-chip { font-size: .75rem; letter-spacing: .02em; border: 0; background: none; padding: 0; }
.account-settings-button { color: var(--muted); border: 1px solid var(--line); background: transparent; border-radius: 10px; padding: 8px 12px; font-size: .875rem; }
.desktop-landing-links { display: flex; align-items: center; gap: 12px; }
.desktop-reader-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--gold); font-size: .8125rem; text-decoration: none; white-space: nowrap; }
.desktop-reader-link:hover { background: var(--card-strong); }
body.reader-entry-available.desktop-session .app-header { grid-template-columns: 1fr auto auto auto; }
body.reader-entry-available .desktop-landing-masthead { flex-wrap: wrap; }
.eyebrow, .section-label { font-size: .75rem; letter-spacing: .1em; }
.hero { padding: 0 0 28px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.hero-shine, .daily-feature-glow { display: none; }
.hero h1, .screen-intro h1 { font: 500 clamp(2rem, 5vw, 2.75rem)/1.12 'Iowan Old Style', Baskerville, Georgia, serif; letter-spacing: -.035em; }
.hero h1 { margin-bottom: 24px; }
.hero-action { margin-top: 12px; padding: 4px 0; border: 0; background: none; font-size: .875rem; font-weight: 500; }
.home-search-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .875rem; }
.home-search-form input, .search-box input { font-size: 1rem; }
.search-box { padding: 8px 9px 8px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: none; }
.search-box:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-box input { min-height: 44px; }
.search-box button { width: 44px; height: 44px; border-radius: 10px; font-size: 1.5rem; }
.home-section { margin-top: 28px; }
.section-heading { gap: 16px; align-items: center; }
.section-heading h2 { font: 500 1.4rem/1.2 'Iowan Old Style', Georgia, serif; margin: 0; }
.section-heading > button { font-size: .875rem; font-weight: 500; }
.home-project-list { display: grid; gap: 8px; }
.home-project-list button { display: grid; gap: 5px; padding: 16px; text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.home-project-list button, .project-navigation, #active-project-panel { min-width: 0; }
.home-project-list strong { font-weight: 600; overflow-wrap: anywhere; }
.home-project-list small { font-size: .8125rem; color: var(--muted); }
.continue-plan-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.continue-plan-copy > small, .continue-plan-copy > span { font-size: .8125rem; }
.continue-plan-copy strong { font-size: 1rem; }
.recent-home .eyebrow { display: none; }
#recent-research-list button { border-radius: 12px; padding: 14px 36px 14px 16px; }
#recent-research-list strong { font-size: .9375rem; font-weight: 550; }
#recent-research-list small, .recent-empty { font-size: .8125rem; }
.daily-feature { margin-top: 30px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.daily-feature h2 { font: 500 1.625rem/1.2 'Iowan Old Style', Georgia, serif; color: var(--ink); }
.daily-feature blockquote { font: 1.125rem/1.65 'Iowan Old Style', Georgia, serif; color: var(--quote-ink); }
.daily-feature-heading > span { display: none; }
.daily-feature-context { font-size: .875rem; line-height: 1.6; }
.daily-feature-citation { margin-left: 0; font-size: .8125rem; font-weight: 500; }
.daily-feature-actions { flex-wrap: wrap; }
.daily-feature-actions button { font-size: .875rem; font-weight: 600; background: none; }
.daily-feature-actions button + button { color: var(--muted); }
.password-box button, .desktop-access-body button,
.personal-source-upload > button, .personal-source-search button,
.team-upgrade-dismiss, .team-invitation-actions button.primary,
.team-create-form button, .team-invite-form button, .team-add-project-form button,
.team-project-notebook > button, .team-comment-form button,
.new-project-form button, .project-actions button:not(.destructive),
.active-project-heading > button[aria-pressed="true"],
.source-annotation-actions button, .project-picker-new button,
.search-box button, .plan-save-button, #guided-plan-continue { color: var(--on-accent); }
.home-actions { margin-top: 24px; }
.home-actions strong { font-size: .9375rem; }
.home-actions small { font-size: .8125rem; }
.dossier-grid { gap: 10px; }
.dossier-grid button { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 18px; }
.dossier-grid strong { font-size: 1.125rem; font-weight: 500; }
.dossier-grid small { font-size: .8125rem; line-height: 1.5; }
.screen-intro { margin-bottom: 24px; }
.screen-intro p { font-size: 1rem; line-height: 1.6; }
.search-section > label { font-size: .875rem; }
.mode-selector { padding: 4px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; gap: 4px; }
.mode-selector button { min-height: 44px; padding: 10px 12px; font-size: .875rem; font-weight: 500; border-radius: 8px; }
.mode-selector button.active { background: var(--card-strong); color: var(--gold); box-shadow: none; }
.mode-help { font-size: .8125rem; line-height: 1.5; }
.suggestions button { min-height: 40px; font-size: .8125rem; }
.results { margin-top: 28px; }
.result-heading { align-items: start; gap: 20px; margin-bottom: 16px; }
.result-heading h2 { font: 500 clamp(1.6rem, 3vw, 2.1rem)/1.2 'Iowan Old Style', Georgia, serif; overflow-wrap: anywhere; }
.result-heading > span { flex-shrink: 0; font-size: .8125rem; padding-top: 8px; }
.result-toolbar { display: flex; align-items: start; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.result-toolbar > button, .research-tools > summary { min-height: 44px; padding: 10px 14px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font-size: .875rem; font-weight: 500; }
.result-toolbar .copy-all-quotes-button { width: auto; display: inline-flex; gap: 8px; }
.result-toolbar .copy-all-quotes-button strong { font-size: .875rem; font-weight: 500; }
.result-toolbar .copy-all-quotes-button small { display: none; }
.research-tools { flex: 1; min-width: min(100%, 190px); }
.research-tools > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.research-tools > summary::after { content: '+'; color: var(--gold); font-size: 1.125rem; }
.research-tools[open] > summary::after { content: '−'; }
.research-tools > summary::-webkit-details-marker { display: none; }
.research-tools-body { margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.research-tools-body > button { margin-top: 8px; box-shadow: none; }
.research-tools-body > button:first-child { margin-top: 0; }
.research-tools-body > button span, .research-tools-body > button strong { font-size: .9375rem; }
.research-tools-body > button small { font-size: .8125rem; line-height: 1.5; }
.research-console { margin: 0 0 16px; padding: 0; border: 0; background: none; }
.view-selector { display: flex; gap: 4px; overflow-x: auto; background: none; border: 0; padding: 0; }
.view-selector button { flex: 0 0 auto; padding: 10px 12px; font-size: .875rem; font-weight: 500; min-height: 44px; }
.filter-panel { margin-top: 8px; }
.filter-panel summary, .citation-studio summary, .reading-plan summary { display: flex; align-items: center; font-size: .875rem; font-weight: 600; }
.filter-grid label, .citation-studio-controls label, .reading-plan > p { font-size: .875rem; }
.filter-grid select, .filter-grid button, .citation-studio-controls select, .citation-studio-controls button, .reading-plan-options button { min-height: 44px; font-size: .875rem; }
.coverage-strip { margin-top: 12px; }
.coverage-chip { font-size: .75rem; }
.section-label { margin: 28px 0 12px; color: var(--muted); }
.result-card { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); background: var(--card); border-radius: 14px; margin-bottom: 14px; }
.result-card.anchor { border-color: var(--line); background: var(--card); box-shadow: inset 3px 0 var(--gold); }
.result-card > strong { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.result-card .meta { margin-top: 7px; color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.result-card > p:not(.source-rights-notice) { margin-top: 20px; color: var(--quote-ink); font: 1.1875rem/1.65 'Iowan Old Style', Baskerville, Georgia, serif; overflow-wrap: anywhere; }
.result-card .source-rights-notice { font-size: .75rem; line-height: 1.6; color: var(--muted); }
.card-actions { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); gap: 4px; }
.card-secondary-actions { width: 100%; justify-content: start; gap: 4px 12px; margin: 0; }
.result-card .open, .copy-button, .citation-button, .project-save-button, .compare-button, .feedback-button, .share-button { min-height: 44px; padding: 10px 0; font: 500 .875rem/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; white-space: normal; text-align: left; }
.result-card span.open { display: none; }
.card-more { margin-left: auto; position: relative; }
.card-more > summary { display: flex; align-items: center; gap: 8px; padding: 10px 8px; font-size: .875rem; color: var(--muted); cursor: pointer; list-style: none; }
.card-more > summary::-webkit-details-marker { display: none; }
.card-more-actions { display: grid; gap: 4px; min-width: 170px; }
.card-more-actions button { padding: 8px 12px; }
.source-context, .translation-control { padding: 0; margin-top: 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.source-context > summary, .translation-control > summary { min-height: 48px; padding: 12px 0; color: var(--gold); font-size: .875rem; line-height: 1.5; font-weight: 500; }
.translation-control > summary { color: var(--muted); }
.source-context-body { min-width: 0; }
.source-context-segment { min-width: 0; padding: 18px; background: transparent; border: 0; border-left: 2px solid var(--line); border-radius: 0; }
.source-context-segment.current { border-left-color: var(--gold); background: var(--card-strong); }
.source-context-segment strong { color: var(--muted); font-size: .75rem; letter-spacing: .04em; }
.source-context-segment p { color: var(--quote-ink); font: 1.125rem/1.75 'Iowan Old Style', Georgia, serif; overflow-wrap: anywhere; }
.source-context-status, .translation-status { color: var(--muted); font-size: .875rem; }
.translation-select { font-size: .875rem; }
.sidebar-brand { display: none; }
.app-nav { background: var(--surface-nav); border-color: var(--line); box-shadow: 0 8px 30px #0002; border-radius: 18px; }
.app-nav button small { font-size: .75rem; font-weight: 500; }
.app-nav button { min-height: 54px; }
.settings-screen { max-width: 680px; }
.settings-screen .account-card { margin-bottom: 24px; }
.settings-screen .account-tier { font-size: 1.125rem; }
.settings-screen .desktop-access-card { margin-bottom: 12px; }
.settings-screen summary strong, .settings-screen button { font-size: .9375rem; }
.settings-screen summary small, .settings-screen p { font-size: .875rem; }
.settings-screen input { font-size: 1rem; min-height: 44px; }
.desktop-logout { font-size: .875rem; text-align: left; }
.source-context-panel { display: none; }
.home-search-form input { width: 100%; }
.has-results .search-screen > .screen-intro, .has-results .search-screen .suggestions { display: none; }
.has-results .search-section { margin-top: 0; }
.projects-card { margin-top: 24px; padding: 0; border: 0; background: none; }
.projects-card > summary { padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.projects-summary-copy strong { font-size: 1rem; }
.projects-summary-copy small { font-size: .8125rem; }
.projects-body { padding: 20px 0 0; }
.project-list-heading { display: none; }
.project-list-row { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--card); }
.project-list-row.selected { border-color: var(--gold); background: var(--card-strong); }
.project-list-copy strong { font-size: 1rem; font-weight: 600; }
.project-list-copy small { font-size: .8125rem; line-height: 1.5; }
.new-project-form { margin: 12px 0 28px; }
.new-project-form input { min-width: 0; min-height: 44px; font-size: 1rem; }
.new-project-form button { font-size: .875rem; }
.active-project-heading { margin: 0 0 16px; align-items: start; gap: 20px; }
.active-project-heading h2 { font: 500 1.8rem/1.2 'Iowan Old Style', Georgia, serif; }
.active-project-heading small { font-size: .8125rem; line-height: 1.5; }
#toggle-project-reorder { min-height: 44px; font-size: .875rem; }
.project-view-tabs { display: flex; padding: 0; gap: 20px; border: 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }
.project-view-tabs button { flex: 0 0 auto; padding: 12px 4px; border-radius: 0; min-height: 48px; font-size: .9375rem; font-weight: 500; }
.project-view-tabs button.active { background: none; color: var(--gold); box-shadow: inset 0 -2px var(--gold); }
.project-source-list { margin-top: 20px; }
.project-note-toolbar button, .project-actions button, .project-annotation-editor button, .project-source-controls button { min-height: 44px; font-size: .875rem; }
.project-notes-pane { padding: 24px 0; background: none; border: 0; }
.project-notes-pane textarea { min-height: 280px; font: 1.0625rem/1.75 'Iowan Old Style', Georgia, serif; color: var(--ink); background: var(--card); padding: 20px; }
.project-annotation-list textarea { font-size: 1rem; }
.project-notes-pane small, .project-status, .project-annotation-count { font-size: .8125rem; }
.project-actions { justify-content: start; gap: 20px; padding-top: 12px; }
.project-actions .destructive { margin-left: auto; }
.saved-reading-plans, .personal-sources, .team-workspaces { margin-top: 36px; border-color: var(--line); background: var(--card); border-radius: 14px; }
.team-workspaces-intro, .personal-sources-intro { font-size: .9375rem; line-height: 1.6; }
.team-upgrade-card strong { font-size: 1rem; }
.team-upgrade-card small { font-size: .875rem; line-height: 1.5; }
.team-upgrade-action { font-size: .875rem; }
/* Keep the Projects support panels readable at phone widths and large text sizes. */
.projects-screen :is(.saved-reading-plans, .personal-sources, .team-workspaces) {
  min-width: 0;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  gap: 16px;
}
.projects-screen .saved-reading-plans { display: grid; }
.projects-screen .saved-section-heading { margin: 0; }
.projects-screen :is(.saved-section-heading, .personal-sources-heading, .team-workspaces-heading) > div { min-width: 0; }
.projects-screen :is(.saved-section-heading, .personal-sources-heading, .team-workspaces-heading) h2 {
  font: 500 1.5rem/1.2 'Iowan Old Style', Baskerville, Georgia, serif;
  overflow-wrap: anywhere;
}
.projects-screen span.team-tier-badge {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 5px 9px;
  font-size: .6875rem;
  line-height: 1.4;
}
.projects-screen .team-upgrade-card > span:nth-child(2) { min-width: 0; }
.projects-screen .project-status:empty { min-height: 0; margin: 0; }
@media (max-width: 600px) {
  .projects-screen :is(.saved-section-heading, .personal-sources-heading, .team-workspaces-heading) {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .projects-screen :is(.saved-section-heading, .personal-sources-heading, .team-workspaces-heading) > div { width: 100%; }
  .projects-screen .team-upgrade-card {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
  }
  .projects-screen .team-upgrade-action {
    grid-column: 2;
    justify-self: start;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
  }
  .projects-screen .team-upgrade-action::after { content: ' →'; }
}
.saved-reading-plan small, .saved-article-row small { font-size: .8125rem; }
.guided-plan-header p, .guided-plan-reading p, .research-article p { font-size: 1rem; line-height: 1.7; }
/* Modal surfaces must follow the same theme as their foreground tokens. */
.project-picker-sheet, .team-upgrade-sheet {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}
.project-picker-header h2 { font: 500 1.75rem/1.2 'Iowan Old Style', Georgia, serif; }
.project-picker-header p, .project-picker-status { font-size: .875rem; }
.project-picker-list button { min-height: 56px; }
.project-picker-choice {
  grid-template-columns: minmax(0, 1fr) auto;
  color: var(--ink);
  background: var(--card-strong);
  border-color: var(--line);
}
.project-picker-choice > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.project-picker-choice.saved { border-color: var(--gold); background: var(--card-strong); }
.project-picker-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--card-strong);
  border-color: var(--line);
}
.project-picker-empty, .project-picker-new, .team-upgrade-sheet .team-upgrade-version-note { border-color: var(--line); }
.project-picker-new input { color: var(--ink); background: var(--bg); border-color: var(--line); font-size: 1rem; }
.project-picker-new input::placeholder { color: var(--muted); opacity: 1; }
.project-picker-new button { font-size: .875rem; }

/* Group sharing is a focused flow; it never replaces the personal project. */
body.group-share-open { overflow: hidden; }
.project-group-share-entry { width: 100%; min-height: 46px; margin: 0 0 16px; padding: 12px 16px; border: 0; border-radius: 12px; background: var(--gold); color: var(--on-accent); font-weight: 650; }
.group-share-modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 24px; }
.group-share-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgb(0 0 0 / .65); backdrop-filter: blur(5px); }
.group-share-sheet { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 24px 80px rgb(0 0 0 / .35); }
.group-share-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.group-share-header h2 { margin: 4px 0 0; font: 500 1.8rem/1.18 'Iowan Old Style', Georgia, serif; }
.group-share-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 26px; }
.group-share-sheet p { font-size: .95rem; line-height: 1.5; overflow-wrap: anywhere; }
.group-share-sheet #group-share-description, .group-share-hint { color: var(--muted); }
.group-share-project { font-weight: 650; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.group-share-access-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.group-share-form { display: grid; gap: 10px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.group-share-form label, .group-share-form h3 { font-size: .95rem; font-weight: 650; margin: 0; }
.group-share-form .group-share-hint { font-size: .85rem; margin: 0 0 4px; }
.group-share-form input, .group-share-form select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--bg, #12110e); font: inherit; font-size: 16px; }
.group-share-sheet button:not(.group-share-close), .team-access-retry { min-height: 44px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--gold); color: var(--on-accent); font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; }
.group-share-sheet button:disabled { opacity: .55; cursor: wait; }
.group-share-sheet :is(button, input, select):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
#group-share-status:empty, #group-share-invite-status:empty { display: none; }
@media (max-width: 600px) {
  .group-share-modal { padding: 12px; }
  .group-share-sheet { padding: 20px; max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)); border-radius: 20px; }
  .group-share-header h2 { font-size: 1.55rem; }
  .group-share-access-actions button { width: 100%; }
}
.context-dock-placeholder { display: block; width: 100%; padding: 12px 0; margin-top: 16px; text-align: left; color: var(--gold); background: none; border: 0; border-top: 1px solid var(--line); font-size: .875rem; }
.result-card.context-selected { border-color: var(--gold); }
@media (min-width: 1000px) {
  body.desktop-session .shell { width: auto; max-width: 1120px; margin: 0 auto 0 220px; padding: 28px 40px 60px; }
  body.desktop-session .app-nav { inset: 0 auto 0 0; width: 220px; margin: 0; padding: 38px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  body.desktop-session .sidebar-brand { display: flex; flex-direction: column; align-items: start; padding: 0 14px 36px; color: var(--ink); font: 500 1.5rem/1.1 'Iowan Old Style', Georgia, serif; }
  .sidebar-brand strong { color: var(--muted); font: 500 .75rem/1.5 -apple-system, sans-serif; text-transform: uppercase; letter-spacing: .17em; margin-top: 7px; }
  body.desktop-session .app-nav button { display: flex; justify-content: start; padding: 12px 16px; min-height: 48px; gap: 14px; border-radius: 10px; }
  body.desktop-session .app-nav button small { font-size: .9375rem; }
  body.desktop-session .app-nav button.active { background: var(--card-strong); color: var(--gold); }
  body.desktop-session .app-header { margin-bottom: 32px; }
  body.desktop-session .app-brand { visibility: hidden; }
  body.desktop-session .hero { padding: 0 0 28px; }
  body.desktop-session .hero h1 { font-size: 2.75rem; }
  .home-project-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-screen .dossier-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.desktop-session .projects-body { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.8fr); gap: 28px; align-items: start; }
  body.desktop-session .project-navigation { position: sticky; top: 24px; }
  body.desktop-session #project-status { grid-column: 1 / -1; }
  body.desktop-session .active-project-heading { flex-wrap: wrap; }
  body.desktop-session .project-list-icon, body.desktop-session .project-list-chevron { display: none; }
  body.desktop-session .project-list-row { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1280px) {
  body.desktop-session.context-panel-open .shell { margin-right: 420px; }
  body.desktop-session .source-context-panel { display: flex; flex-direction: column; position: fixed; z-index: 50; inset: 0 0 0 auto; width: 400px; padding: 24px; border-left: 1px solid var(--line); background: var(--card); box-shadow: -8px 0 32px #0001; }
  .source-context-panel > header { display: flex; align-items: start; gap: 12px; padding-bottom: 20px; }
  .source-context-panel h2 { font: 500 1.375rem/1.35 'Iowan Old Style', Georgia, serif; margin: 0; overflow-wrap: anywhere; }
  #context-panel-close { flex-shrink: 0; margin-left: auto; width: 44px; height: 44px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 50%; font-size: 1.5rem; }
  #context-panel-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding-right: 4px; }
  #context-panel-body > details { margin: 0; border: 0; }
  #context-panel-body > details > summary { display: none; }
  #context-panel-body .source-context-body { margin: 0; }
  body.context-panel-open .projects-body { grid-template-columns: 1fr; }
  body.context-panel-open .project-navigation { position: static; }
}
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --bg: #f7f5ef; --card: #fffefa; --card-strong: #eeeadf; --ink: #282720; --muted: #676457; --gold: #806320; --blue: #385d6c; --line: #39352425; --surface-nav: #efede5; --quote-ink: #36342b; --focus: #806320; --on-accent: #ffffff; }
  .hero { background: none; box-shadow: none; }
  .daily-feature { background: var(--card); }
  .daily-feature h2 { color: var(--ink); }
}
@media (max-width: 420px) {
  .app-header { gap: 8px; }
  .app-credit-chip { max-width: 90px; text-align: right; }
  .home-actions { grid-template-columns: 1fr; }
  .result-heading { display: block; }
  .result-heading > span { display: block; }
  .card-more { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
.account-deletion-card {
  margin-top: 24px; padding: 24px; border: 1px solid var(--line, #45463f);
  border-radius: 18px; background: var(--card); color: var(--ink);
}
.account-deletion-card h2 { margin: 0 0 8px; font-size: 1.15rem; }
.account-deletion-card p { color: var(--muted); line-height: 1.6; }
.account-deletion-card a {
  display: inline-flex; align-items: center; min-height: 44px;
  gap: 12px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px;
}
.account-deletion-card a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.account-deletion-card .account-deletion-note { margin-bottom: 0; font-size: .85rem; }
/* The connected notebook is isolated from device-local projects. */
.cloud-workspace-status-card { padding: 16px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.cloud-workspace-status-card p { margin: 8px 0; line-height: 1.5; }
.cloud-workspace-status-card .project-actions { flex-wrap: wrap; }

/* A comparison collection is not part of the Catholic source-record schema. */
.comparative-topic { margin: 4px 0 32px; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 16px; background: var(--card); min-width: 0; }
.comparative-topic :is(h2, h3, h4, p, summary, blockquote) { overflow-wrap: anywhere; }
.comparative-kicker, .comparative-source-label { margin: 0 0 10px; color: var(--blue); font-size: .75rem; font-weight: 650; letter-spacing: .07em; }
.comparative-title { margin: 0 0 14px; font: 500 clamp(1.5rem, 4vw, 2rem)/1.2 'Iowan Old Style', Georgia, serif; }
.comparative-boundary { font-size: .9375rem; line-height: 1.65; color: var(--ink); }
.comparative-editorial-label { margin: 20px 0 5px; color: var(--muted); font: 600 .8125rem/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.comparative-editorial { margin: 0 0 16px; color: var(--muted); font-size: .9375rem; line-height: 1.65; white-space: pre-wrap; }
.comparative-edition { margin: 20px 0 16px; border-block: 1px solid var(--line); padding: 4px 0; }
.comparative-edition summary { display: flex; align-items: center; padding: 8px 0; color: var(--muted); font-size: .8125rem; cursor: pointer; }
.comparative-edition p { color: var(--muted); font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; }
.comparative-digest { font-family: ui-monospace, monospace; word-break: break-word; }
.comparative-tools-note { margin: 16px 0 24px; padding: 12px 14px; border-left: 2px solid var(--blue); background: var(--card-strong); color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.comparative-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.comparative-section > h3 { margin: 0 0 12px; font: 500 1.375rem/1.3 'Iowan Old Style', Georgia, serif; }
.comparative-section > .comparative-editorial-label { margin-top: 12px; }
.comparative-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 20px; }
.comparative-pair > div { min-width: 0; }
.comparative-quote { margin: 0 0 20px; padding: 18px; background: var(--card-strong); border-radius: 12px; border-left: 2px solid var(--blue); }
.comparative-quote:last-child { margin-bottom: 0; }
.comparative-quote h4 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.comparative-quote blockquote { margin: 0; white-space: pre-wrap; color: var(--quote-ink); font: 1.125rem/1.7 'Iowan Old Style', Baskerville, Georgia, serif; }
.comparative-translation-label { margin: 14px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.comparative-copy { margin-top: 10px; padding: 9px 0; min-height: 44px; max-width: 100%; border: 0; background: transparent; color: var(--blue); font: 500 .875rem/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-align: left; white-space: normal; cursor: pointer; }
.comparative-copy:disabled { color: var(--muted); cursor: default; }
.quran-reference-card { margin: 16px 0; min-width: 0; }
.quran-reference-card :is(h3, p, blockquote, summary, button) { overflow-wrap: anywhere; }
.quran-reference-card h3 { margin: 0 0 14px; color: var(--ink); font-size: 1.125rem; line-height: 1.45; }
.quran-reference-context { margin-top: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.quran-reference-context summary { min-height: 44px; display: flex; align-items: center; color: var(--gold); cursor: pointer; font-size: .875rem; }
.quran-reference-context p { white-space: pre-wrap; font: 1rem/1.7 'Iowan Old Style', Baskerville, Georgia, serif; color: var(--quote-ink); }
.quran-reference-context .quran-context-reference { color: var(--muted); font: .8125rem/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.quran-context-requested { padding-left: 14px; border-left: 2px solid var(--gold); }
.quran-reference-card :is(summary, button):focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.comparative-bible-passage { margin-bottom: 14px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; }
.comparative-bible-passage summary { padding: 6px 0; color: var(--gold); font-size: .875rem; font-weight: 600; cursor: pointer; }
.comparative-bible-passage p { margin: 10px 0; white-space: pre-wrap; color: var(--quote-ink); font: 1rem/1.7 'Iowan Old Style', Baskerville, Georgia, serif; }
@media (min-width: 760px) {
  .comparative-pair { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

/* Reviewed excerpts are a separate read/copy collection, not indexed cards. */
.curated-topic { margin: 4px 0 36px; min-width: 0; }
.curated-topic :is(h2, h3, h4, p, blockquote, a, button, summary) { overflow-wrap: anywhere; }
.curated-kicker { margin: 0 0 10px; color: var(--blue); font-size: .75rem; font-weight: 650; letter-spacing: .07em; }
.curated-title { margin: 0 0 14px; font: 500 clamp(1.5rem, 4vw, 2rem)/1.2 'Iowan Old Style', Georgia, serif; }
.curated-scope { margin: 18px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.curated-tools-note { margin: 16px 0 24px; padding: 14px 16px; border-left: 2px solid var(--blue); background: var(--card-strong); color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.curated-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); min-width: 0; }
.curated-section-title { margin: 0 0 16px; font: 500 1.375rem/1.3 'Iowan Old Style', Georgia, serif; }
.curated-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.curated-card { min-width: 0; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.curated-card-current { box-shadow: inset 3px 0 var(--gold); }
.curated-status { margin: 0 0 10px; color: var(--blue); font-size: .75rem; line-height: 1.5; font-weight: 650; }
.curated-card-current .curated-status { color: var(--gold); }
.curated-card-title { margin: 0; color: var(--ink); font-size: 1.0625rem; line-height: 1.45; font-weight: 600; }
.curated-citation { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; }
.curated-quote-label { margin: 20px 0 8px; color: var(--muted); font-size: .75rem; font-weight: 600; }
.curated-quote { margin: 0; padding: 0 0 0 15px; border-left: 2px solid var(--line); color: var(--quote-ink); font: 1.1875rem/1.7 'Iowan Old Style', Baskerville, Georgia, serif; white-space: pre-wrap; }
.curated-actions { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.curated-source-link, .curated-copy { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 10px 0; border: 0; background: transparent; color: var(--blue); font: 500 .875rem/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-align: left; white-space: normal; text-decoration: none; cursor: pointer; }
.curated-source-link:hover, .curated-copy:hover { text-decoration: underline; }
.curated-source-link:focus-visible, .curated-copy:focus-visible, .curated-revision summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 3px; }
.curated-copy:disabled { color: var(--muted); cursor: default; }
.curated-source-context { margin-top: 20px; }
.curated-source-context summary { min-height: 44px; }
.curated-source-context .source-context-status { white-space: pre-wrap; }
.curated-source-context .source-context-segment p { white-space: pre-wrap; }
.curated-context-attribution { margin: 0 0 16px; color: var(--muted); font-size: .8125rem; line-height: 1.6; white-space: pre-wrap; }
.curated-source-handoff { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-strong); }
.curated-source-instructions, .curated-source-status { margin: 0 0 12px; color: var(--muted); font-size: .8125rem; line-height: 1.65; }
.curated-source-address { margin: 0 0 12px; color: var(--ink); font: .8125rem/1.65 ui-monospace, monospace; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.curated-source-handoff .curated-copy { display: flex; }
.curated-revision { margin: 22px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.curated-revision summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.curated-revision p { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
@media (min-width: 960px) {
  .curated-section-scripture .curated-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
