/*
 * 拾页 reader. One stylesheet for both the standalone CLI server and the
 * hosted /n2/ page. Hosted pages load the site's shared styles.css first; the
 * --n2-* tokens follow its palette and fall back to the same values when the
 * standalone server serves this file alone. Rules are scoped under body.n2 so
 * the site's element defaults (button, input, form, section, main, p) cannot
 * override reader controls.
 */
.n2 {
  --n2-bg: var(--bg, #f1f2f6);
  --n2-surface: var(--surface, #ffffff);
  --n2-raised: var(--surface-raised, #f7f8fc);
  --n2-border: var(--border, #cbd5e1);
  --n2-border-strong: var(--border-strong, #94a3b8);
  --n2-accent: var(--accent, #1d4ed8);
  --n2-accent-soft: var(--accent-soft, rgba(29, 78, 216, 0.12));
  --n2-accent-strong: var(--accent-strong, #1e40af);
  --n2-text: var(--text, #1e293b);
  --n2-muted: var(--muted, #475569);
  --n2-card-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  --n2-float-shadow: var(--shadow, 0 6px 18px rgba(15, 23, 42, 0.12));
  --n2-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --n2-serif: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
  --n2-ink: #273142;
  --n2-review: #92400e;
  --n2-review-line: #d97706;
  --n2-review-soft: #fef3c7;
  --n2-review-wash: #fffbeb;
  --n2-ok: #166534;
  --n2-ok-dot: #16a34a;
  --n2-ok-soft: #dcfce7;
  --n2-danger: #b91c1c;
  --n2-danger-line: #fca5a5;
  --n2-danger-soft: #fee2e2;
  --n2-pending: #64748b;
  --n2-pending-soft: #e2e8f0;
  --n2-pane-x: clamp(1rem, 4vw, 3rem);
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--n2-text);
  background: var(--n2-bg);
  font-family: var(--n2-ui);
  line-height: 1.5;
  font-synthesis: none;
  overflow-anchor: none;
}
.n2 *, .n2 *::before, .n2 *::after { box-sizing: border-box; }

/* Element baselines inside the reader; class rules below refine them. */
.app-shell :where(p, h1, h2) { margin: 0; }
.app-shell :where(form, section) { display: block; flex-direction: row; gap: normal; }
.app-shell :where(input, select, textarea) {
  width: auto;
  max-width: 100%;
  padding: 0.35rem 0.6rem;
  color: var(--n2-text);
  background: var(--n2-raised);
  border: 1px solid var(--n2-border);
  border-radius: 0;
  font: inherit;
}
.app-shell :where(textarea) { min-height: 0; resize: vertical; }
.app-shell :where(a) { color: var(--n2-accent); text-decoration: none; }
.app-shell :where(a):hover { text-decoration: underline; }
.app-shell summary { cursor: pointer; }
/* Matches the site's button:hover specificity and wins by order. */
.app-shell button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  cursor: pointer;
  transform: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.app-shell button:disabled { cursor: not-allowed; opacity: 0.5; }
.n2 .app-shell :focus-visible { outline: 2px solid var(--n2-accent); outline-offset: 2px; }
.n2 .is-hidden { display: none !important; }
.n2 .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.n2 .skip-link {
  position: fixed;
  z-index: 2100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.6rem 0.9rem;
  color: var(--n2-accent);
  background: var(--n2-surface);
  border: 1px solid var(--n2-border);
  box-shadow: var(--n2-card-shadow);
  transform: translateY(-160%);
}
.n2 .skip-link:focus { transform: translateY(0); }

/* Shell */
.n2 .app-shell { min-height: 100vh; display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.n2 .sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--n2-surface);
  border-right: 1px solid var(--n2-border);
}
.n2 .brand { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--n2-border); }
.n2 .brand-mark { flex: none; display: grid; width: 2.25rem; height: 2.25rem; place-items: center; color: #fff; background: var(--n2-accent); font: 600 1.05rem/1 var(--n2-serif); }
.n2 .brand strong, .n2 .brand small { display: block; }
.n2 .brand strong { font-size: 1rem; letter-spacing: 0.06em; }
.n2 .brand small { margin-top: 0.1rem; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .library-section { display: flex; flex-direction: column; min-height: 120px; max-height: 34vh; padding: 0.85rem 0.75rem 0.5rem; }
.n2 .chapter-section { display: flex; flex: 1; flex-direction: column; min-height: 150px; padding: 0.85rem 0.75rem 0.5rem; border-top: 1px solid var(--n2-border); }
.n2 .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 0.5rem 0.5rem; }
.n2 .section-heading h2 { color: var(--n2-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }
.n2 .icon-button { display: grid; width: 2rem; height: 2rem; place-items: center; color: var(--n2-muted); font-size: 1.15rem; line-height: 1; }
.n2 .icon-button:hover:not(:disabled) { color: var(--n2-accent); background: var(--n2-accent-soft); }
.n2 .count { color: var(--n2-muted); font-size: 0.75rem; }
.n2 .book-list, .n2 .chapter-list { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--n2-border) transparent; }

/* Shelf */
.n2 .book-card { display: block; width: 100%; padding: 0.5rem 0.6rem 0.6rem; margin: 0 0 0.35rem; text-align: left; background: transparent; border: 1px solid transparent; cursor: pointer; }
.n2 .book-card:hover { background: var(--n2-raised); border-color: var(--n2-border); }
.n2 .book-card.active { background: var(--n2-accent-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--n2-accent); }
.n2 .book-card-open { display: block; width: 100%; padding: 0.1rem 0; color: inherit; text-align: left; background: transparent; }
.n2 .book-card-open:hover { background: transparent; }
.n2 .book-card-open:hover .book-arrow, .n2 .book-card.active .book-arrow { color: var(--n2-accent); }
.n2 .book-card-title { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.n2 .book-card-title strong { overflow: hidden; font-size: 0.9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.n2 .book-card.active .book-card-title strong { color: var(--n2-accent-strong); }
.n2 .book-arrow { color: var(--n2-border-strong); font-size: 1.1rem; }
.n2 .book-author { display: block; margin-top: 0.2rem; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .book-stats { display: flex; flex-wrap: wrap; gap: 0.2rem 0.55rem; margin-top: 0.4rem; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.4; }
.n2 .stat-characters { color: var(--n2-text); font-weight: 600; }
.n2 .stat-unknown, .n2 .stat-checking { color: var(--n2-pending); font-weight: 400; }
.n2 .stat-review { color: var(--n2-review); }
.n2 .stat-passed, .n2 .stat-prepared, .n2 .stat-reviewed { color: var(--n2-ok); }
.n2 .stat-missing { color: var(--n2-danger); }
.n2 .stat-access { padding: 0 0.35rem; color: var(--n2-muted); background: var(--n2-raised); border: 1px solid var(--n2-border); font-weight: 600; }
.n2 .stat-access-write { color: var(--n2-accent-strong); background: var(--n2-accent-soft); border-color: transparent; }
.n2 .missing-chapter-action { padding: 0; color: var(--n2-danger); background: transparent; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.n2 .missing-chapter-action:hover { color: #7f1d1d; background: transparent; }
.n2 .shelf-empty { display: grid; gap: 0.5rem; padding: 0.5rem; color: var(--n2-muted); font-size: 0.8rem; line-height: 1.6; }
.n2 .shelf-empty strong { color: var(--n2-text); font-size: 0.85rem; }
.n2 .shelf-empty-links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; }
.n2 .shelf-empty-links a { font-weight: 600; }

/* Chapter navigation */
.n2 .chapter-section-actions { display: flex; align-items: center; gap: 0.5rem; }
.n2 .missing-filter { padding: 0.15rem 0.4rem; color: var(--n2-danger); background: var(--n2-danger-soft); border: 1px solid var(--n2-danger-line); font-size: 0.7rem; line-height: 1.3; white-space: nowrap; }
.n2 .missing-filter:hover { background: #fecaca; }
.n2 .chapter-search-label { display: block; padding: 0 0.25rem 0.5rem; }
.n2 .chapter-search-label input { width: 100%; height: 2.25rem; font-size: 0.8rem; }
.n2 .chapter-locate { display: flex; flex: none; gap: 0.3rem; padding: 0 0.25rem 0.45rem; font-size: 0.75rem; }
.n2 .chapter-locate select, .n2 .chapter-locate input { min-width: 0; height: 2rem; padding: 0 0.45rem; }
.n2 .chapter-locate select { width: 4.25rem; }
.n2 .chapter-locate input { flex: 1; width: 4rem; }
.n2 .chapter-locate-status { flex: none; margin: 0 0.4rem 0.45rem; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.5; }
.n2 .chapter-list { padding: 0 0.2rem 0.25rem; }
.n2 .stack-heading { padding: 0.75rem 0.45rem 0.3rem; color: var(--n2-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; }
.n2 .chapter-item { display: flex; align-items: flex-start; gap: 0.55rem; width: 100%; padding: 0.45rem 0.5rem; margin-bottom: 1px; text-align: left; background: transparent; }
.n2 .chapter-item:hover { background: var(--n2-accent-soft); }
.n2 .chapter-item:hover .chapter-item-title { color: var(--n2-accent); }
.n2 .chapter-item.active { background: var(--n2-accent-soft); box-shadow: inset 3px 0 0 var(--n2-accent); }
.n2 .chapter-item.active .chapter-item-title { color: var(--n2-accent-strong); font-weight: 600; }
.n2 .chapter-item.located { outline: 2px solid var(--n2-accent); outline-offset: -2px; }
.n2 .chapter-dot { flex: none; width: 8px; height: 8px; margin-top: 0.35rem; border-radius: 50%; background: var(--n2-border-strong); }
.n2 .chapter-dot.status-passed_checks { background: var(--n2-ok-dot); }
.n2 .chapter-dot.status-needs_human { background: var(--n2-review-line); box-shadow: 0 0 0 3px var(--n2-review-soft); }
.n2 .chapter-dot.status-reviewed { background: var(--n2-ok); }
.n2 .chapter-dot.status-missing { background: var(--n2-danger); }
.n2 .chapter-dot.status-checking { background: var(--n2-pending); box-shadow: 0 0 0 3px var(--n2-pending-soft); }
.n2 .chapter-item-body { display: block; flex: 1; min-width: 0; }
.n2 .chapter-item-number { display: block; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.35; }
.n2 .chapter-item-title { display: block; overflow: hidden; color: var(--n2-text); font-size: 0.85rem; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.n2 .chapter-item-meta { display: block; margin-top: 0.1rem; color: var(--n2-muted); font-size: 0.72rem; line-height: 1.45; }
.n2 .issue-count { display: grid; flex: none; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem; place-items: center; color: var(--n2-review); background: var(--n2-review-soft); font-size: 0.7rem; font-weight: 600; }
.n2 .sidebar-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; padding: 0.75rem 1rem; color: var(--n2-muted); border-top: 1px solid var(--n2-border); font-size: 0.7rem; }
.n2 .legend-dot { width: 7px; height: 7px; margin-left: 0.25rem; border-radius: 50%; }
.n2 .dot-passed { background: var(--n2-ok-dot); }
.n2 .dot-review { background: var(--n2-review-line); }
.n2 .dot-reviewed { background: var(--n2-ok); }

/* Shared control styles */
.n2 :is(.action-accept, .action-save-edit, .primary-button, .action-patch-here, .next-review-button,
  .action-select, .action-edit-toggle, .content-search-submit, .chapter-locate-submit, .quiet-button, .action-restore,
  .action-restore-fragment, .more-chapters, .action-patch-everywhere, .duplicate-check-button,
  .action-skip, .action-remove, .action-remove-fragment, .source-draft) {
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--n2-ui);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
}
.n2 :is(.action-accept, .action-save-edit, .primary-button, .action-patch-here, .next-review-button) {
  color: #fff;
  background: var(--n2-accent);
  border-color: var(--n2-accent);
}
.n2 :is(.action-accept, .action-save-edit, .primary-button, .action-patch-here, .next-review-button):hover:not(:disabled) {
  background: var(--n2-accent-strong);
  border-color: var(--n2-accent-strong);
}
.n2 :is(.action-select, .action-edit-toggle, .content-search-submit, .chapter-locate-submit, .quiet-button, .action-restore,
  .action-restore-fragment, .more-chapters, .action-patch-everywhere, .duplicate-check-button) {
  color: var(--n2-accent);
  background: var(--n2-surface);
  border-color: var(--n2-accent);
}
.n2 :is(.action-select, .action-edit-toggle, .content-search-submit, .chapter-locate-submit, .quiet-button, .action-restore,
  .action-restore-fragment, .more-chapters, .action-patch-everywhere, .duplicate-check-button):hover:not(:disabled) {
  background: var(--n2-accent-soft);
}
.n2 .action-skip { color: var(--n2-muted); background: transparent; }
.n2 .action-skip:hover:not(:disabled) { color: var(--n2-text); background: var(--n2-raised); border-color: var(--n2-border); }
.n2 :is(.action-remove, .action-remove-fragment) { color: var(--n2-danger); background: var(--n2-danger-soft); border-color: var(--n2-danger-line); }
.n2 :is(.action-remove, .action-remove-fragment):hover:not(:disabled) { color: #7f1d1d; background: #fecaca; }
.n2 .action-remove.selected { color: #fff; background: var(--n2-danger); border-color: var(--n2-danger); }
.n2 .action-remove.selected:hover:not(:disabled) { color: #fff; background: #991b1b; }

/* Main pane and toolbar */
.n2 .main-pane {
  display: block;
  max-width: none;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding: 0 var(--n2-pane-x) 6rem;
  background: var(--n2-bg);
}
.n2 .topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  min-height: 3.6rem;
  margin: 0 calc(var(--n2-pane-x) * -1);
  padding: 0.4rem var(--n2-pane-x);
  background: color-mix(in srgb, var(--n2-surface) 94%, transparent);
  border-bottom: 1px solid var(--n2-border);
  box-shadow: var(--n2-card-shadow);
  backdrop-filter: blur(10px);
}
/* Hosted pages place the site's floating menu (top right) before the shell. */
.n2 .floating-nav ~ .app-shell .topbar { padding-right: calc(var(--n2-pane-x) + 3.75rem); }
.n2 .crumbs { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--n2-muted); font-size: 0.8rem; }
.n2 .crumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n2 .crumbs span:last-child { color: var(--n2-text); font-weight: 600; }
.n2 .header-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.4rem 0.6rem; min-width: 0; padding: 0.25rem 0; }
.n2 .header-progress { display: grid; flex: none; gap: 0.15rem; min-width: 205px; color: var(--n2-muted); font-size: 0.65rem; line-height: 1.35; }
.n2 .header-progress-row { display: grid; grid-template-columns: 2rem minmax(54px, 1fr) auto; align-items: center; gap: 0.4rem; white-space: nowrap; }
.n2 .header-progress-row progress { width: 100%; height: 6px; accent-color: var(--n2-accent); }
.n2 .header-progress-row progress.is-hidden { display: none; }
.n2 .next-review-button { flex: none; white-space: nowrap; }
.n2 .review-target, .n2 .search-target { box-shadow: inset 0 0 0 1px var(--n2-review-line); }
.n2 .content-search { position: relative; display: flex; flex: 1 1 220px; gap: 0.3rem; min-width: 160px; max-width: 340px; font-size: 0.8rem; }
.n2 .content-search input { width: 100%; min-width: 0; height: 2.25rem; }
.n2 .content-search-submit { flex: none; min-height: 2.25rem; white-space: nowrap; }
.n2 .content-search-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 8;
  width: min(500px, calc(100vw - 2.5rem));
  max-height: min(65vh, 560px);
  overflow-y: auto;
  color: var(--n2-text);
  background: var(--n2-surface);
  border: 1px solid var(--n2-border);
  box-shadow: var(--n2-float-shadow);
}
.n2 .content-search-status { padding: 0.6rem 0.75rem; color: var(--n2-muted); border-bottom: 1px solid var(--n2-border); }
.n2 .content-search-result { display: block; width: 100%; padding: 0.65rem 0.75rem; color: inherit; text-align: left; background: transparent; border-bottom: 1px solid var(--n2-border); }
.n2 .content-search-result:hover, .n2 .content-search-result:focus-visible { background: var(--n2-accent-soft); outline: 2px solid var(--n2-accent); outline-offset: -2px; }
.n2 .content-search-title { display: block; margin-bottom: 0.3rem; color: var(--n2-accent-strong); font-size: 0.8rem; font-weight: 600; line-height: 1.5; }
.n2 .content-search-match-kind { display: inline-block; margin-left: 0.25rem; padding: 0 0.3rem; color: var(--n2-muted); background: var(--n2-raised); border: 1px solid var(--n2-border); font-size: 0.7rem; font-weight: 500; }
.n2 .content-search-excerpt { display: block; color: var(--n2-ink); font: 0.9rem/1.75 var(--n2-serif); overflow-wrap: anywhere; }
.n2 .content-search-excerpt mark { padding: 0 1px; color: inherit; background: #fde68a; }
.n2 .duplicate-check-status { max-width: 340px; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.4; text-align: right; }
.n2 .duplicate-check-button { white-space: nowrap; }
.n2 .export-link { flex: none; font-size: 0.8rem; font-weight: 600; }
.n2 .export-link span { padding-left: 0.2rem; }
.n2 .error-banner {
  position: sticky;
  top: calc(var(--reader-header-height, 58px) + 0.5rem);
  z-index: 6;
  width: min(100%, 850px);
  padding: 0.75rem 1rem;
  margin: 0.75rem auto;
  color: var(--n2-danger);
  background: var(--n2-danger-soft);
  border: 1px solid var(--n2-danger-line);
  font-size: 0.85rem;
  line-height: 1.6;
}
.n2 .loading-status {
  position: fixed;
  top: calc(var(--reader-header-height, 58px) + 0.5rem);
  left: 50%;
  z-index: 7;
  width: fit-content;
  max-width: calc(100vw - 2rem);
  padding: 0.35rem 0.7rem;
  color: var(--n2-review);
  background: var(--n2-review-wash);
  border: 1px solid #fcd34d;
  box-shadow: var(--n2-card-shadow);
  font-size: 0.75rem;
  line-height: 1.5;
  transform: translateX(-50%);
}

/* Welcome */
.n2 .welcome-card {
  max-width: 600px;
  margin: 10vh auto 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--n2-surface);
  border: 1px solid var(--n2-border);
  box-shadow: var(--n2-card-shadow);
}
.n2 .welcome-ornament { color: var(--n2-border); font-family: Georgia, var(--n2-serif); font-size: 72px; line-height: 0.8; }
.n2 .eyebrow { margin: 0.6rem 0; color: var(--n2-accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; }
.n2 .welcome-card h1 { margin: 1.25rem 0 1rem; color: var(--n2-text); font-family: var(--n2-serif); font-size: clamp(30px, 4vw, 42px); font-weight: 500; line-height: 1.35; letter-spacing: 0.06em; }
.n2 .welcome-card p:last-child { max-width: 400px; margin: auto; color: var(--n2-muted); font-size: 0.85rem; line-height: 1.9; }
.n2 .muted { padding: 0.5rem; color: var(--n2-muted); font-size: 0.8rem; line-height: 1.7; }

/* Continuous reading stream */
.n2 .chapter-stream { width: min(100%, 850px); margin: 1.25rem auto 0; }
.n2 .chapter-card {
  padding: 0 clamp(1rem, 4vw, 3rem) 1.5rem;
  margin-bottom: 1rem;
  background: var(--n2-surface);
  border: 1px solid var(--n2-border);
  box-shadow: var(--n2-card-shadow);
}
.n2 .chapter-heading { padding: 2rem 0 1.25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--n2-border); }
.n2 .chapter-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.n2 :is(.stack-pill, .status-pill, .chapter-number-pill) { display: inline-flex; align-items: center; min-height: 1.6rem; padding: 0.2rem 0.6rem; font-size: 0.75rem; font-weight: 600; }
.n2 .stack-pill { color: var(--n2-accent-strong); background: var(--n2-accent-soft); }
.n2 .chapter-number-pill { color: var(--n2-muted); background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .status-pill { color: var(--n2-muted); background: var(--n2-raised); }
.n2 .status-pill.status-passed_checks, .n2 .status-pill.status-reviewed { color: var(--n2-ok); background: var(--n2-ok-soft); }
.n2 .status-pill.status-needs_human { color: var(--n2-review); background: var(--n2-review-soft); }
.n2 .status-pill.status-missing { color: var(--n2-danger); background: var(--n2-danger-soft); }
.n2 .status-pill.status-checking { color: var(--n2-pending); background: var(--n2-pending-soft); }
.n2 .chapter-title { margin: 1rem 0 0.5rem; color: var(--n2-text); font-family: Cambria, Georgia, var(--n2-serif); font-size: clamp(26px, 3vw, 36px); font-weight: 500; line-height: 1.45; letter-spacing: 0.035em; }
.n2 .chapter-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.85rem; color: var(--n2-muted); font-size: 0.8rem; }
.n2 .chapter-meta span + span::before { content: '·'; margin-right: 0.85rem; color: var(--n2-border-strong); }
.n2 .reading-text { padding: 0.2rem 0 1rem; }
.n2 .passage { position: relative; padding: 0.55rem 0.75rem 0.7rem 1rem; margin: 0 -0.75rem; border-left: 2px solid transparent; }
.n2 .passage-needs-review { background: var(--n2-review-wash); border-left-color: var(--n2-review-line); }
.n2 .passage-text { margin: 0; color: var(--n2-ink); font-family: var(--n2-serif); font-size: 18px; font-weight: 400; line-height: 2.15; letter-spacing: 0.025em; white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .passage-text:focus-visible { outline-offset: 4px; }
.n2 .passage-needs-review .passage-text { padding: 1px 0; }
.n2 .passage-opener {
  position: absolute;
  z-index: 1;
  top: 0.5rem;
  left: 0;
  width: 14px;
  min-height: 22px;
  padding: 0;
  color: var(--n2-muted);
  background: var(--n2-surface);
  border: 1px solid var(--n2-border);
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
}
.n2 .passage:hover .passage-opener, .n2 .passage:focus-within .passage-opener, .n2 .passage.edit-control-revealed .passage-opener, .n2 .passage-opener[aria-expanded="true"] { opacity: 1; }
.n2 .passage-opener:hover { color: var(--n2-accent); background: var(--n2-accent-soft); border-color: var(--n2-accent); }
.n2 .passage, .n2 .chapter-card { scroll-margin-top: calc(var(--reader-header-height, 79px) + 16px); }
.n2 .checking-note { padding: 0.45rem 0.6rem; margin: 0.4rem 0; color: var(--n2-pending); background: var(--n2-raised); border-left: 2px solid var(--n2-border-strong); font-size: 0.75rem; line-height: 1.55; }
.n2 .missing-message { padding: 1.4rem; margin: 0.5rem 0; color: var(--n2-danger); background: var(--n2-danger-soft); border: 1px solid var(--n2-danger-line); font-size: 1rem; text-align: center; }
.n2 .removed-empty-note { padding: 0.9rem; margin: 0.5rem 0; color: var(--n2-review); background: var(--n2-review-wash); border: 1px solid var(--n2-review-soft); font-size: 0.8rem; line-height: 1.7; }
.n2 .decision-saving { display: inline-block; padding: 0.05rem 0.4rem; margin: 0 0 0.3rem; color: var(--n2-muted); background: var(--n2-raised); border: 1px solid var(--n2-border); font-size: 0.7rem; line-height: 1.6; }
.n2 .decision-recovery { padding: 0.5rem 0.65rem; margin: 0.3rem 0 0.55rem; color: var(--n2-review); background: var(--n2-review-wash); border-left: 2px solid var(--n2-review-line); font-size: 0.75rem; line-height: 1.6; }
.n2 .decision-recovery p { margin: 0 0 0.35rem; }
.n2 .decision-recovery-text { display: block; width: 100%; min-height: 64px; margin: 0.25rem 0 0.4rem; color: var(--n2-ink); background: var(--n2-surface); font: 0.9rem/1.7 var(--n2-serif); }
.n2 .refresh-note { padding: 0.2rem 0.5rem; color: var(--n2-review); }

/* Source colours number the versions in vertical diffs. */
.n2 .source-color-1 { --source-color: #2563eb; color: #2563eb; }
.n2 .source-color-2 { --source-color: #a16207; color: #a16207; }
.n2 .source-color-3 { --source-color: #7c3aed; color: #7c3aed; }
.n2 .source-color-4 { --source-color: #0f766e; color: #0f766e; }
.n2 .source-color-5 { --source-color: #be123c; color: #be123c; }
.n2 .absence-mark { display: inline-block; min-width: 1em; padding: 0 3px; color: var(--source-color, var(--n2-muted)); background: var(--n2-surface); border: 1px solid color-mix(in srgb, var(--source-color, var(--n2-muted)) 40%, white); font: 700 0.72em/1.35 var(--n2-ui); text-align: center; vertical-align: 0.12em; }
.n2 .comparison-key { display: inline-flex; align-items: center; gap: 4px; min-height: 21px; padding: 2px 6px; color: var(--source-color, var(--n2-muted)); background: color-mix(in srgb, var(--source-color, #64748b) 8%, white); border: 1px solid color-mix(in srgb, var(--source-color, #64748b) 28%, white); font: 600 11px/1.25 var(--n2-ui); }
.n2 .current-key { --source-color: #475569; color: var(--n2-muted); background: var(--n2-raised); border-color: var(--n2-border); }

/* Stacked vertical diff: each differing span lists its versions as a column. */
.n2 .full-comparison { margin: 0.3rem 0 0.55rem; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .shared-comparison-text { white-space: pre-wrap; }
.n2 .full-comparison-segment { position: relative; display: inline-grid; max-width: 100%; padding: 3px 5px; margin: 2px; vertical-align: middle; background: var(--n2-raised); border: 1px solid var(--n2-border); white-space: normal; }
.n2 .full-difference-header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-column: 1 / -1; align-items: center; gap: 4px; }
.n2 .full-difference-label { padding: 0 3px; color: var(--n2-muted); font: 10px/1.3 var(--n2-ui); }
.n2 .full-comparison-option { display: flex; align-items: flex-start; gap: 6px; width: fit-content; max-width: 100%; min-height: 27px; padding: 3px 5px; color: var(--n2-ink); text-align: left; background: transparent; border: 1px solid transparent; font: 15px/1.65 var(--n2-serif); overflow-wrap: anywhere; }
.n2 .full-comparison-option:hover { background: var(--n2-surface); border-color: var(--n2-border); }
.n2 .full-comparison-option.selected { background: var(--n2-surface); border-color: var(--n2-accent); box-shadow: inset 0 0 0 1px var(--n2-accent-soft); }
.n2 .full-comparison-option.is-static { cursor: default; }
.n2 .full-comparison-option.is-static:not(.selected):hover { background: transparent; border-color: transparent; }
.n2 .full-comparison-option .comparison-key { flex: none; margin-top: 2px; }
.n2 .comparison-option-text { min-width: 0; }
.n2 .version-index, .n2 .history-heading .version-index { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 22px; min-height: 22px; padding: 0; color: var(--source-color, var(--n2-muted)); background: transparent; border: 0; font: 500 18px/1.15 var(--n2-ui); }
.n2 .full-comparison-option .version-index { margin-top: 1px; }
.n2 .whole-absence-choice { margin-top: 0.55rem; }
.n2 .whole-absence-option { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px; background: var(--n2-raised); border: 1px solid var(--n2-border); font-size: 0.75rem; line-height: 1.5; }
.n2 .whole-absence-option:hover { background: var(--n2-surface); }
.n2 .whole-absence-option.selected { background: var(--n2-surface); border-color: var(--n2-accent); box-shadow: inset 0 0 0 1px var(--n2-accent-soft); }
.n2 .whole-absence-option.is-static { display: inline-flex; cursor: default; }

/* Patch range / split tools inside a diff header */
.n2 :is(.patch-range-tools, .patch-split-tools) { display: block; margin: 0; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.5; }
.n2 :is(.patch-range-tools, .patch-split-tools) > summary { width: fit-content; padding: 1px 5px; color: var(--n2-accent); background: var(--n2-surface); border: 1px solid var(--n2-border); font-size: 10px; line-height: 1.35; }
.n2 :is(.patch-range-tools, .patch-split-tools) > summary:hover { background: var(--n2-accent-soft); }
.n2 :is(.patch-range-tools, .patch-split-tools)[open] { grid-column: 1 / -1; }
.n2 .patch-range-body { width: min(480px, calc(100vw - 64px)); max-width: 100%; padding: 7px 8px; margin: 4px 0 2px; background: var(--n2-surface); border: 1px solid var(--n2-border); }
.n2 .patch-split-body { display: grid; gap: 6px; width: min(520px, calc(100vw - 64px)); max-width: 100%; padding: 7px 8px; margin: 4px 0 2px; background: var(--n2-surface); border: 1px solid var(--n2-border); }
.n2 .patch-range-note { margin: 0 0 5px; color: var(--n2-muted); font-size: 11px; }
.n2 .patch-range-pairs { display: grid; gap: 2px; margin: 4px 0 7px; }
.n2 .patch-range-pair { color: var(--n2-ink); font: 13px/1.7 var(--n2-serif); overflow-wrap: anywhere; }
.n2 .patch-range-pair-source { display: inline-block; min-width: 105px; margin-right: 4px; color: var(--n2-muted); font: 10px/1.5 var(--n2-ui); }
.n2 .patch-range-controls { display: flex; flex-wrap: wrap; gap: 5px; }
.n2 .patch-range-button { min-height: 28px; padding: 4px 7px; color: var(--n2-accent); background: var(--n2-surface); border: 1px solid var(--n2-border); font-size: 11px; line-height: 1.3; }
.n2 .patch-range-button:hover:not(:disabled) { background: var(--n2-accent-soft); border-color: var(--n2-accent); }
.n2 .patch-range-button:disabled { opacity: 0.45; }
.n2 .patch-range-reset { margin-left: 3px; color: var(--n2-muted); }
.n2 .patch-split-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 2px 7px; }
.n2 .patch-split-label { color: var(--n2-muted); font-size: 11px; line-height: 1.35; }
.n2 .patch-split-select { width: 100%; min-height: 28px; padding: 3px 5px; font-size: 12px; line-height: 1.4; }
.n2 .patch-split-preview { grid-column: 2; color: var(--n2-ink); font: 13px/1.5 var(--n2-serif); overflow-wrap: anywhere; }

/* Selected patches */
.n2 .selected-patch-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0.5rem 0.6rem; margin: 0.3rem 0 0.45rem; background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .selected-patch-note { flex: 1 1 100%; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.5; }
.n2 .selected-patch-pairs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; }
.n2 .selected-patch-pairs .patch-range-note { margin: 0; }
.n2 .selected-patch-pair { padding: 2px 5px; color: var(--n2-ink); background: var(--n2-surface); border: 1px solid var(--n2-border); font: 12px/1.5 var(--n2-serif); overflow-wrap: anywhere; }
.n2 .patch-everywhere-note { flex: 1 1 100%; color: var(--n2-muted); font-size: 10px; line-height: 1.5; }
.n2 .selected-draft-preview { flex: 1 1 100%; color: var(--n2-muted); font-size: 0.7rem; line-height: 1.5; }
.n2 .selected-draft-preview > summary { width: fit-content; color: var(--n2-accent); }
.n2 .selected-draft-text { padding: 0.45rem 0.6rem; margin: 0.3rem 0 0; color: var(--n2-ink); background: var(--n2-surface); border: 1px solid var(--n2-border); font: 15px/1.8 var(--n2-serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .source-draft { color: var(--source-color, var(--n2-accent)); background: color-mix(in srgb, var(--source-color, #1d4ed8) 9%, white); border-color: color-mix(in srgb, var(--source-color, #1d4ed8) 35%, white); }
.n2 .source-draft:hover:not(:disabled) { background: color-mix(in srgb, var(--source-color, #1d4ed8) 16%, white); }
.n2 .mixed-draft { --source-color: var(--n2-accent); }
.n2 .source-draft-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.3rem 0 0.55rem; }
.n2 .draft-control-title { color: var(--n2-muted); font-size: 0.75rem; line-height: 1.5; }

/* Review tools */
.n2 .inline-review { padding: 0.3rem 0 0.1rem; }
.n2 .visible-current-accept { min-height: 2.1rem; margin: 0.2rem 0 0.45rem; }
.n2 .review-tools { padding-top: 0.25rem; }
.n2 .review-tools > summary { width: fit-content; padding: 0.35rem 0; color: var(--n2-accent); font-size: 0.8rem; font-weight: 600; }
.n2 .quiet-tools { padding: 0; border: 0; }
.n2 .quiet-tools:not([open]) > summary { display: none; }
.n2 .quiet-tools[open] { padding-top: 0.45rem; }
.n2 .manual-tools { padding: 0.5rem 0 0.25rem; }
.n2 .issue-list { display: flex; flex-direction: column; gap: 0.3rem; margin: 0 0 0.6rem; padding: 0; list-style: none; }
.n2 .issue-list li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; padding-left: 0.8rem; color: var(--n2-review); font-size: 0.75rem; line-height: 1.65; }
.n2 .issue-list li::before { position: absolute; left: 1px; content: '•'; color: var(--n2-review-line); }
.n2 .issue-target { padding: 1px 6px; color: var(--n2-accent); background: var(--n2-surface); border: 1px solid var(--n2-border); font-size: 0.75rem; line-height: 1.5; text-align: left; }
.n2 .issue-target:hover { background: var(--n2-accent-soft); border-color: var(--n2-accent); }
.n2 .inline-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.5rem 0; }
.n2 .inline-actions button, .n2 .action-save-edit { min-height: 2.25rem; padding: 0.45rem 0.8rem; }
.n2 .remove-explanation { margin: 0.1rem 0 0.3rem; color: var(--n2-muted); font-size: 0.75rem; line-height: 1.6; }
.n2 .edit-form { max-width: 760px; padding: 0.75rem; margin: 0.5rem 0; background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .edit-label { display: block; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .edit-area { display: block; width: 100%; min-height: 105px; padding: 0.55rem 0.65rem; margin: 0.35rem 0 0.55rem; color: var(--n2-ink); background: var(--n2-surface); font: 16px/1.8 var(--n2-serif); }

/* Fragment removal */
.n2 .fragment-tools { max-width: 760px; padding: 0.5rem 0; margin: 0.5rem 0; border-top: 1px solid var(--n2-border); font-size: 0.8rem; line-height: 1.6; }
.n2 .fragment-tools > summary { width: fit-content; padding: 0.35rem 0; color: var(--n2-accent); font-weight: 600; }
.n2 .fragment-form { display: grid; gap: 0.5rem; padding: 0.6rem; background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .fragment-label { display: grid; gap: 0.25rem; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .fragment-source, .n2 .fragment-text { width: 100%; min-height: 35px; padding: 0.45rem 0.55rem; color: var(--n2-ink); background: var(--n2-surface); font-size: 0.85rem; line-height: 1.6; }
.n2 .fragment-occurrence { width: 100%; }
.n2 .fragment-text { min-height: 62px; font-family: var(--n2-serif); }
.n2 .fragment-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.n2 .fragment-preview { padding: 0.6rem; background: var(--n2-surface); border-left: 3px solid var(--n2-border-strong); }
.n2 .fragment-preview-text { margin: 0.3rem 0; color: var(--n2-ink); font: 15px/1.8 var(--n2-serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .fragment-context-note { margin: 0.3rem 0 0; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .action-restore-fragment { margin: 0.3rem 0.3rem 0 0; }

/* Removed paragraphs */
.n2 .removed-groups { padding: 0.85rem 0 0.5rem; margin: 0.75rem 0 0.25rem; border-top: 1px solid var(--n2-border); }
.n2 .removed-groups > summary { width: fit-content; padding: 0.45rem 0; color: var(--n2-accent); font-size: 0.8rem; font-weight: 600; }
.n2 .removed-explanation { max-width: 760px; margin: 0.25rem 0 0.6rem; color: var(--n2-muted); font-size: 0.75rem; line-height: 1.65; }
.n2 .removed-entry { padding: 0.75rem 0.9rem; margin: 0.5rem 0; background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .removal-kind { display: inline-block; padding: 0.15rem 0.5rem; margin-bottom: 0.45rem; color: var(--n2-muted); background: var(--n2-surface); border: 1px solid var(--n2-border); font-size: 0.7rem; font-weight: 600; }
.n2 .removed-text { color: var(--n2-ink); font: 15px/1.9 var(--n2-serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .removed-reason { margin: 0.45rem 0 0.55rem; color: var(--n2-review); font-size: 0.75rem; line-height: 1.5; }
.n2 .removed-sources { margin-top: 0.5rem; border-top: 1px solid var(--n2-border); }
.n2 .removed-sources > summary { width: fit-content; padding: 0.5rem 0 0.1rem; color: var(--n2-muted); font-size: 0.75rem; }

/* Sources and history */
.n2 .source-history { margin-top: 0.55rem; border-top: 1px solid var(--n2-border); }
.n2 .source-history summary { width: fit-content; padding: 0.5rem 0.1rem; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .source-history summary:hover { color: var(--n2-accent); }
.n2 .history-entry { padding: 0.6rem 0.75rem; margin: 0.45rem 0; background: var(--n2-raised); border: 1px solid var(--n2-border); }
.n2 .history-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.55rem; color: var(--n2-text); font-size: 0.75rem; }
.n2 .history-heading span { color: var(--n2-muted); }
.n2 .history-text { margin: 0.5rem 0 0; color: var(--n2-ink); font: 14px/1.9 var(--n2-serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.n2 .source-link { font-size: 0.75rem; }

/* Structure (writers only) */
.n2 .structure-panel { padding: 0.9rem 0 0.5rem; margin-top: 0.9rem; border-top: 1px solid var(--n2-border); }
.n2 .structure-panel > summary { width: fit-content; color: var(--n2-muted); font-size: 0.75rem; }
.n2 .structure-panel > summary:hover { color: var(--n2-accent); }
.n2 .structure-form { display: grid; grid-template-columns: 2fr 1fr 0.7fr auto; align-items: end; gap: 0.55rem; padding: 0.8rem 0; }
.n2 .structure-form label, .n2 .boundary-tools label { color: var(--n2-muted); font-size: 0.75rem; }
.n2 .structure-form input, .n2 .boundary-tools input, .n2 .boundary-tools select { display: block; width: 100%; min-width: 0; height: 2.25rem; margin-top: 0.3rem; font-size: 0.8rem; }
.n2 .structure-form .primary-button { min-height: 2.25rem; }
.n2 .boundary-tools { display: grid; grid-template-columns: 1.15fr 1fr auto 1.2fr 1.2fr auto; align-items: end; gap: 0.5rem; padding: 0.8rem 0 0.25rem; border-top: 1px solid var(--n2-border); }
.n2 .boundary-tools label { align-self: end; }
.n2 .boundary-tools .quiet-button { min-height: 2.25rem; }

/* Draft recovery */
.n2 .draft-recovery { padding: 1rem; margin: 0.9rem 0; background: var(--n2-review-wash); border: 1px solid #fcd34d; }
.n2 .draft-recovery h2 { margin: 0 0 0.45rem; color: var(--n2-review); font-size: 1rem; }
.n2 .draft-recovery p { margin: 0 0 0.5rem; color: var(--n2-text); font-size: 0.8rem; line-height: 1.7; }
.n2 .draft-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Toast: same element, class, and look as the site's shared toast. */
.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 4000;
  max-width: calc(100vw - 3rem);
  padding: 0.85rem 1rem;
  color: var(--text, #1e293b);
  background: var(--surface-raised, #f7f8fc);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .n2 .app-shell { grid-template-columns: 255px minmax(0, 1fr); }
  .n2 .topbar { flex-wrap: wrap; }
  .n2 .content-search { max-width: none; }
  .n2 .header-tools { flex: 1 1 100%; }
  .n2 .structure-form { grid-template-columns: 1fr 1fr; }
  .n2 .structure-form label:first-child { grid-column: span 2; }
  .n2 .boundary-tools { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 760px) {
  .n2 { --n2-pane-x: 1rem; }
  .n2 .app-shell { display: flex; flex-direction: column; }
  .n2 .sidebar { position: relative; height: auto; max-height: 47vh; border-right: 0; border-bottom: 1px solid var(--n2-border); }
  .n2 .brand { padding: 0.6rem 1rem; }
  .n2 .floating-nav ~ .app-shell .brand { padding-right: 4.25rem; }
  .n2 .brand-mark { width: 2rem; height: 2rem; font-size: 0.95rem; }
  .n2 .library-section { min-height: 74px; max-height: 17vh; padding: 0.5rem 0.6rem 0.3rem; }
  .n2 .section-heading { padding-bottom: 0.35rem; }
  .n2 .book-card { display: inline-block; width: min(230px, 78vw); padding: 0.45rem 0.55rem; margin: 0 0.3rem 0.25rem 0; vertical-align: top; border-color: var(--n2-border); }
  .n2 .book-card-open { min-height: 40px; }
  .n2 .book-stats { gap: 0.2rem 0.45rem; margin-top: 0.25rem; }
  .n2 .chapter-section { min-height: 115px; padding: 0.5rem 0.6rem 0.25rem; }
  .n2 .chapter-search-label { padding-bottom: 0.35rem; }
  .n2 .chapter-list { display: flex; gap: 0.3rem; overflow-x: auto; overflow-y: hidden; padding-bottom: 0.45rem; }
  .n2 .stack-heading { display: none; }
  .n2 .chapter-item { flex: 0 0 185px; width: 185px; min-height: 55px; padding: 0.4rem 0.5rem; background: var(--n2-raised); border: 1px solid var(--n2-border); }
  .n2 .chapter-item-title { font-size: 0.75rem; }
  .n2 .chapter-item-meta { font-size: 0.7rem; line-height: 1.3; }
  .n2 .sidebar-footer { display: none; }
  .n2 .main-pane { min-height: 60vh; padding-bottom: 4rem; }
  .n2 .topbar { align-content: center; gap: 0.25rem 0.5rem; min-height: 4.5rem; }
  .n2 .crumbs { width: 100%; gap: 0.45rem; font-size: 0.7rem; }
  .n2 .content-search { flex-basis: 100%; width: 100%; }
  .n2 .content-search-panel { width: 100%; }
  .n2 .header-tools { justify-content: space-between; gap: 0.4rem; width: 100%; }
  .n2 .header-progress { flex: 1 1 180px; min-width: min(205px, 100%); }
  .n2 .header-progress-row { gap: 0.25rem; }
  .n2 .duplicate-check-status { flex: 1; max-width: none; font-size: 0.65rem; text-align: left; }
  .n2 .export-link { font-size: 0.7rem; }
  .n2 .chapter-stream { margin-top: 0.75rem; }
  .n2 .chapter-card { padding: 0 1rem 1rem; margin-bottom: 0.75rem; }
  .n2 .chapter-heading { padding: 1.5rem 0 1rem; }
  .n2 .chapter-title { margin-top: 0.8rem; font-size: clamp(26px, 7vw, 32px); }
  .n2 .passage { padding: 0.5rem 0.5rem 0.7rem 0.65rem; margin: 0 -0.45rem; }
  .n2 .passage-opener { left: -5px; }
  .n2 .passage-text { font-size: 17px; line-height: 2.08; }
  .n2 .inline-review { padding-top: 0.55rem; }
  .n2 .inline-actions button { min-height: 2.4rem; }
  .n2 .welcome-card { margin-top: 5vh; padding: 2rem 1rem; }
  .n2 .structure-form { grid-template-columns: 1fr 1fr; }
  .n2 .structure-form label:first-child { grid-column: 1 / -1; }
  .n2 .boundary-tools { grid-template-columns: 1fr 1fr; }
  .toast { right: 0.75rem; bottom: 0.75rem; left: 0.75rem; max-width: none; text-align: center; }
}

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