/* Paper-KB workbench: reading content first, navigation and controls kept quiet. */
html { font: 14px/1.65 var(--font-body); }
body { -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, a, input, select, textarea { touch-action: manipulation; }
.icon { width: 19px; height: 19px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.app-shell { min-height: 100dvh; }
.desktop-sidebar { width: 224px; position: fixed; inset: 0 auto 0 0; z-index: 30; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; overscroll-behavior: contain; }
.sidebar-content { display: flex; flex-direction: column; min-height: 100%; padding: 29px 16px 18px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 29px; color: var(--ink); font-size: 19px; font-weight: 750; letter-spacing: -.6px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 1px; }
.brand-symbol { display: grid; place-items: center; width: 35px; height: 39px; border-radius: 5px 10px 10px 5px; background: var(--accent); color: var(--color-primary-content); }
.brand-symbol .icon { width: 23px; height: 23px; }
.sidebar-navigation { display: block; width: 100%; }
.nav-group + .nav-group { margin-top: 23px; }
.nav-group-label { margin: 0 12px 7px; color: var(--muted); font-size: 11px; font-weight: 550; }
.sidebar-navigation .ui-menu { width: 100%; gap: 4px; padding: 0; font-size: 13px; }
.sidebar-navigation .ui-menu a { display: flex; align-items: center; min-height: 39px; gap: 12px; border-radius: 6px; padding: 8px 12px; color: var(--ink-soft); transition: none; }
.sidebar-navigation .ui-menu a:hover { background: var(--surface-muted); text-decoration: none; }
.sidebar-navigation .ui-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.sidebar-navigation .icon { width: 17px; height: 17px; }
.nav-count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.sidebar-footer { margin-top: auto; padding: 38px 11px 0; color: var(--muted); font-size: 10px; }
.library-mark { display: flex; align-items: center; gap: 5px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.library-mark .icon { width: 13px; height: 13px; }
.sidebar-footer > a { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; color: var(--muted); font-size: 11px; }
.sidebar-footer > a .icon { width: 13px; height: 13px; }
.workbench { margin-left: 224px; min-width: 0; }
.workbench-header { position: sticky; top: 0; z-index: 20; height: 65px; display: flex; align-items: center; gap: 14px; padding: 0 35px; border-bottom: 1px solid var(--line); background: var(--surface); }
.breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 12px; color: var(--muted); min-width: 0; white-space: nowrap; }
.breadcrumb .icon { width: 11px; height: 11px; color: var(--border-strong); }
.breadcrumb span:last-child { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-search.ui-btn { padding: 0 8px; gap: 9px; font-size: 12px; font-weight: 450; color: var(--muted); }
.header-search kbd { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; margin-left: 10px; color: var(--muted); font: 10px/1.8 var(--font-body); }
.ui-btn { font-weight: 550; text-decoration: none; box-shadow: none; }
.ui-btn:hover { text-decoration: none; }
.ui-btn .icon { width: 15px; height: 15px; }
.theme-toggle.ui-btn { width: 34px; min-height: 34px; height: 34px; color: var(--muted); }
.theme-toggle .icon { width: 18px; height: 18px; }
.mobile-menu-trigger.ui-btn { display: none; }
.mobile-menu { max-height: 100dvh; height: 100dvh; max-width: min(300px, 88vw); width: 300px; padding: 0; margin: 0; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.mobile-menu::backdrop { background: rgb(18 28 47 / 35%); }
.mobile-menu .sidebar-content { padding-top: 32px; }
.mobile-menu-close { position: absolute; right: 9px; top: 6px; width: 28px; height: 28px; min-height: 28px; }
main { position: relative; width: min(100%, var(--max-content)); min-height: calc(100dvh - 120px); padding: 34px 36px 60px; margin: 0 auto; }
.workbench-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 17px 36px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); }
.lab-toggle { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.view { animation: none; min-width: 0; }
.view-heading { margin-bottom: 26px; padding-right: 80px; }
.view-heading h1, .view > h1 { font-size: 27px; font-weight: 700; letter-spacing: -.9px; line-height: 1.35; }
.view-heading .eyebrow { margin: 0 0 8px; font-size: 11px; color: var(--muted); font-weight: 450; text-transform: none; letter-spacing: 0; }
.lede { font-size: 12px; margin-top: 8px; line-height: 1.8; max-width: 75ch; }
h2 { font-size: 17px; line-height: 1.5; letter-spacing: -.3px; }
h3 { font-size: 14px; line-height: 1.5; }
.view-guide { position: absolute; right: 36px; top: 40px; max-width: min(75ch, calc(100% - 72px)); z-index: 5; font-size: 11px; color: var(--muted); }
.view-guide > summary { cursor: pointer; text-align: right; }
.view-guide[open] { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-md); }
.view-parity-help { margin: 12px 0 0; line-height: 1.9; }
.empty-state { padding: 28px; border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--muted); }
.tag { background: var(--surface-muted); border-color: transparent; border-radius: 4px; padding: 2px 6px; }
.tag.distilled { border-color: transparent; background: var(--accent-soft); }
.ui-select, .ui-input, .ui-textarea { width: 100%; }
.tabs { gap: 0; margin-bottom: 24px; overflow-x: auto; flex-wrap: nowrap; }
.tab { white-space: nowrap; font-size: 12px; padding: 0 16px; }
.tab.is-active { color: var(--accent-strong); font-weight: 650; }
.search-controls > input[type="search"] { min-height: 48px; border-radius: 9px; padding: 12px 16px; background: var(--surface); font-size: 14px; box-shadow: var(--shadow-sm); }
.search-controls .chips button { min-height: 29px; padding: 4px 10px; font-size: 11px; border-radius: 5px; }
.chips button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.search-hit { margin: 10px 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
.hit-title { font-size: 16px; font-weight: 650; line-height: 1.55; }
.hit-title > a { color: var(--ink); }
.hit-title > a:hover { color: var(--accent); }
.hit-meta { font-size: 11px; margin: 7px 0 12px; }
.search-hit .actions { margin-top: 18px; }
.library-status { font-size: 11px; }
.search-start { display: flex; align-items: center; flex-direction: column; padding: 64px 20px 45px; text-align: center; }
.search-start-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); }
.search-start-icon .icon { width: 22px; height: 22px; }
.search-start h2 { font-size: 19px; font-weight: 600; }
.search-start p { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.search-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.search-suggestions .ui-btn { font-size: 11px; border-color: var(--line); background: var(--surface); color: var(--ink-soft); }
.search-start > a { margin-top: 25px; font-size: 11px; color: var(--muted); }
.actions a, .actions button { border-color: var(--line); min-height: 29px; padding: 4px 8px; font-size: 11px; }
.paper-note-action { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.paper-note-action select { width: auto; min-height: 29px; padding: 4px 24px 4px 8px; font-size: 11px; }
.paper-view > .actions { margin: 18px 0; gap: 7px; }
.hit { padding: 16px 18px; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.hit-t { font-size: 13px; font-weight: 600; }
.hit-m { color: var(--muted); font-size: 11px; margin: 6px 0; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.feedback-group { margin-left: auto; }
.note { padding: 12px 14px; border-left-width: 2px; font-size: 12px; line-height: 1.8; }
.kpis { gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 30px; overflow: hidden; }
.kpi { padding: 20px 22px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .v { font-size: 25px; font-weight: 600; letter-spacing: -.6px; }
.kpi .l { margin-top: 3px; font-size: 11px; }
.learning-panel { background: var(--surface); padding: 22px; border: 1px solid var(--line); border-radius: 10px; }
.learning-view > h2, .workspace-view > h2 { margin-top: 28px; }
.feature-row { min-height: 0; box-shadow: none; padding: 20px; }
.feature-row p { font-size: 12px; }
.feature-grid { gap: 14px; }
.feature-group { margin: 34px 0; }
.feature-controls { margin-bottom: 24px; padding: 18px; }
.conference-plate { padding: 13px; background: var(--surface); }
.conference-plate .conf-name { font-size: 14px; }
.conference-shelf { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.source-card { box-shadow: none; }
.data th, .data td { border-color: var(--line); padding: 10px 12px; }
.data th { font-size: 11px; font-weight: 600; }
.paper-view h1 { font-size: 26px; max-width: 65ch; line-height: 1.4; }
.markdown-reader { font-size: 14px; line-height: 1.85; }
.markdown-reader p, .markdown-reader li { max-width: 80ch; }
.paper-tab-panel { padding-top: 22px; }

/* Recommendation desk: the selected paper list and a quieter reading rail. */
.daily-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-right: 0; }
.daily-heading .heading-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--accent); }
.daily-heading .heading-icon .icon { width: 21px; height: 21px; }
.digest-sources { display: flex; flex-wrap: nowrap; gap: 25px; overflow-x: auto; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.digest-sources > a { display: inline-flex; align-items: center; gap: 7px; min-height: 43px; padding: 5px 1px 12px; border-bottom: 2px solid transparent; font-size: 12px; color: var(--muted); white-space: nowrap; }
.digest-sources > a:hover { text-decoration: none; color: var(--ink); }
.digest-sources > a[aria-current="page"] { border-color: var(--accent); color: var(--accent-strong); }
.digest-sources .icon { width: 15px; height: 15px; }
.source-report-count { border-radius: 4px; padding: 0 5px; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.digest-controls { margin-bottom: 24px; gap: 10px; }
.digest-controls label { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 450; }
.digest-controls .ui-select { width: 147px; min-height: 33px; height: 33px; font-size: 11px; }
.digest-controls .ui-btn { min-height: 32px; height: 32px; font-size: 11px; padding: 0 11px; }
.digest-controls > a { margin-left: auto; font-size: 11px; color: var(--muted); }
.digest-report-heading { align-items: center; margin-bottom: 18px; }
.digest-report-state { margin: 0 0 14px; padding: 9px 11px; border-left: 3px solid var(--accent); background: var(--surface-muted); color: var(--muted); font-size: 11px; line-height: 1.5; }
.digest-report-state.is-failed { border-color: var(--danger); color: var(--danger); }
.digest-report-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 600; }
.digest-report-heading .ui-badge { color: var(--muted); font-size: 10px; font-weight: 450; padding: 2px 7px; height: 21px; border-color: var(--line); }
.digest-report-heading > a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; }
.digest-report-heading .icon { width: 12px; height: 12px; }
.digest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 25px; align-items: start; }
.digest-list-column { min-width: 0; }
.digest-group { margin-bottom: 27px; }
.digest-group-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 12px; color: var(--ink-soft); }
.digest-group-heading > span { font-size: 10px; color: var(--muted); font-weight: 450; }
.digest-papers ul { display: grid; gap: 11px; margin: 0; }
.digest-papers li { position: relative; padding: 19px 21px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow-wrap: anywhere; }
.digest-papers li:hover { border-color: var(--border-strong); }
.digest-group-featured li { border-left: 3px solid var(--accent); padding-left: 19px; }
.digest-paper-section { display: inline-block; width: fit-content; padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); font-size: 9px; }
.digest-paper-title { margin: 8px 0 9px; color: var(--ink); font-size: 16px; line-height: 1.55; letter-spacing: -.2px; font-weight: 650; }
.digest-paper-title:hover { color: var(--accent); }
.digest-paper-excerpt { margin: 0 0 13px; font-size: 12px; color: var(--muted); line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.digest-recommendation-reason { margin-bottom: 13px; color: var(--ink-soft); font-size: 12px; line-height: 1.85; }
.digest-recommendation-reason p { margin: 0 0 6px; }
.digest-recommendation-reason strong { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.digest-score-basis { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.digest-score-basis summary { cursor: pointer; width: fit-content; }
.digest-score-basis p { line-height: 1.8; }
.digest-score-basis dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 14px; margin: 8px 0; }
.digest-score-basis dl > div { display: flex; justify-content: space-between; gap: 5px; }
.digest-score-basis dd { margin: 0; font-variant-numeric: tabular-nums; }
.personal-pattern-notes, .personal-pattern-notebook { margin: 26px 0; padding: 22px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.personal-pattern-notes > h2, .personal-pattern-notebook > h2 { font-size: 18px; margin: 0 0 10px; }
.personal-pattern-notes > details > summary { cursor: pointer; padding: 10px 0; }
.personal-pattern-form { max-width: 820px; margin: 12px 0; }
.personal-pattern-form fieldset { min-width: 0; padding: 0; border: 0; }
.personal-pattern-form label, .personal-pattern-notebook form label { display: grid; gap: 7px; margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; }
.personal-pattern-form textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 11px; resize: vertical; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; line-height: 1.8; }
.personal-pattern-form .ui-input { font-weight: 400; }
.personal-pattern-source { padding: 16px; margin: 18px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.personal-pattern-source h3 { margin: 0 0 12px; font-size: 14px; }
.personal-pattern-excerpt { margin: 12px 0; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.personal-pattern-excerpt summary, .personal-pattern-selected summary, .personal-pattern-history > summary { cursor: pointer; }
.personal-pattern-excerpt blockquote { white-space: pre-wrap; margin: 12px 0; padding-left: 12px; border-left: 2px solid var(--line); font-size: 13px; line-height: 1.9; }
.personal-pattern-selected { margin-top: 16px; }
.personal-pattern-note { padding: 20px 0; border-bottom: 1px solid var(--line); max-width: 900px; }
.personal-pattern-note h3 { font-size: 16px; margin: 0 0 8px; }
.personal-pattern-note dl { margin: 14px 0; }
.personal-pattern-note dl > div { margin-bottom: 12px; }
.personal-pattern-note dt { font-size: 11px; color: var(--muted); }
.personal-pattern-note dd { white-space: pre-wrap; margin: 4px 0 0; font-size: 13px; line-height: 1.85; }
.synthesis-progress { border-left: 2px solid var(--line); padding-left: 14px; margin: 18px 0; overflow-wrap: anywhere; }
.synthesis-progress h5 { font-size: 14px; margin: 0 0 8px; }
.synthesis-progress .synthesis-outcomes { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 12px 0; }
.synthesis-progress .synthesis-outcomes > div { margin: 0; }
.synthesis-progress .synthesis-outcomes dd { font-size: 18px; font-variant-numeric: tabular-nums; }
.personal-pattern-notebook form { max-width: 600px; }
.personal-pattern-notebook > h2 { scroll-margin-top: 88px; }
.personal-pattern-notebook-wrap { margin: 18px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.personal-pattern-notebook-wrap > summary { cursor: pointer; color: var(--ink-soft); font-size: 14px; }
.personal-pattern-notebook-wrap .personal-pattern-notebook { border: 0; margin: 14px 0 0; padding: 10px 0; }
.pattern-learning-path { max-width: 900px; margin: 18px 0 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-muted); }
.pattern-learning-path h3 { margin: 0 0 11px; font-size: 14px; }
.pattern-learning-path ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: learning-step; }
.pattern-learning-path li { display: grid; grid-template-columns: minmax(120px, .55fr) minmax(0, 1.4fr) auto; align-items: baseline; gap: 7px 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); counter-increment: learning-step; }
.pattern-learning-path li::before { content: counter(learning-step); display: grid; place-items: center; width: 19px; height: 19px; grid-row: span 2; border-radius: 50%; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.pattern-learning-path li strong { grid-column: 2; color: var(--ink-soft); font-size: 11px; }
.pattern-learning-path li span { grid-column: 2; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pattern-learning-path li a { grid-column: 3; grid-row: 1 / span 2; font-size: 10px; white-space: nowrap; }
.pattern-learning-path li.is-done { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pattern-learning-path li.is-done::before { background: var(--accent-soft); color: var(--accent-strong); }
.pattern-learning-path li.is-done strong { color: var(--accent-strong); }
.digest-paper-links { gap: 13px; font-size: 10px; }
.digest-paper-links > a { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-soft); }
.digest-paper-links .icon { width: 12px; height: 12px; }
.digest-paper-links > .muted { font-size: 10px; }
.digest-ingest { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 2px; font-size: 11px; }
.digest-ingest a { color: var(--accent); }
.digest-ingest-unavailable { margin-top: 10px; }
.digest-provenance { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.digest-paper-artifacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.digest-paper-artifacts a { color: inherit; }
.digest-reading-outcome { margin: 7px 0 0; color: var(--accent-strong); font-size: 10px; line-height: 1.5; }
.digest-reading-outcome strong { margin-right: 5px; font-weight: 600; }
.digest-feedback { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.digest-feedback .digest-topic-label { margin: 0 0 8px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.digest-feedback .digest-paper-links { gap: 5px; }
.digest-feedback .ui-btn { min-height: 29px; height: 29px; padding: 0 7px; border: 1px solid transparent; font-size: 11px; font-weight: 450; color: var(--muted); background: var(--surface); }
.digest-feedback .ui-btn:hover { background: var(--surface-muted); color: var(--ink); }
.digest-feedback .ui-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.digest-feedback .ui-btn .icon { width: 12px; height: 12px; }
.digest-feedback .digest-feedback-result { font-size: 10px; margin: 6px 0 0; color: var(--accent-strong); }
.digest-preference-effect { margin: 8px 0 0; padding: 7px 9px; border-left: 2px solid var(--accent); color: var(--muted); background: var(--surface-muted); font-size: 10px; line-height: 1.6; }
.digest-preference-effect strong { color: var(--accent-strong); font-weight: 600; }
.digest-preference-review { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.digest-preference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.digest-preference-heading h2 { margin: 0 0 4px; font-size: 15px; }
.digest-preference-heading p { margin: 0; font-size: 11px; line-height: 1.7; }
.digest-preference-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.preference-weight { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; }
.preference-weight.is-positive { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.preference-weight.is-negative { color: var(--danger, #a34b4b); }
.digest-preference-history { margin-top: 13px; font-size: 11px; }
.digest-preference-history summary { cursor: pointer; color: var(--ink-soft); }
.digest-preference-history ul { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 17px; color: var(--muted); line-height: 1.6; }
.digest-preference-history a { color: var(--ink-soft); }
.preference-links { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; margin-left: 8px; }
.preference-action { color: var(--accent-strong); }
.preference-outcome { display: inline-block; margin-left: 4px; color: var(--ink-soft); }
.digest-learning-status { display: grid; gap: 11px; margin-top: 13px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(145deg, var(--surface-muted), color-mix(in srgb, var(--surface-muted) 72%, var(--surface))); color: var(--muted); font-size: 10px; line-height: 1.65; }
.digest-learning-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; padding-bottom: 1px; }
.digest-learning-head strong { color: var(--ink-soft); font-size: 12px; font-weight: 700; letter-spacing: -.1px; }
.digest-learning-head span { color: var(--muted); }
.digest-learning-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.digest-learning-metrics span { display: flex; align-items: flex-start; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--surface) 92%, var(--surface-muted)); overflow-wrap: anywhere; }
.digest-learning-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
.digest-learning-next a { display: grid; gap: 2px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink-soft); text-decoration: none; }
.digest-learning-next a:hover { border-color: var(--accent); background: var(--accent-soft); }
.digest-learning-next strong { color: var(--accent-strong); font-size: 11px; font-weight: 650; }
.digest-learning-next span { overflow-wrap: anywhere; }
.digest-learning-next em { color: var(--muted); font-size: 10px; font-style: normal; }
@media (max-width: 900px) { .digest-learning-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .digest-learning-metrics { grid-template-columns: 1fr; } .digest-learning-status { padding: 10px; } }
@media (max-width: 600px) { .digest-learning-next { grid-template-columns: 1fr; } }
.digest-excluded { margin: 25px 0; border: 1px dashed var(--border-strong); border-radius: 9px; padding: 14px; }
.digest-excluded > summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.digest-excluded[open] > summary { margin-bottom: 15px; }
.digest-rail { position: sticky; top: 91px; min-width: 0; }
.digest-rail-section { padding: 0 0 21px; margin-bottom: 23px; border-bottom: 1px solid var(--line); }
.digest-rail h3 { font-size: 12px; font-weight: 650; margin: 0 0 13px; }
.digest-rail p { font-size: 11px; color: var(--muted); line-height: 1.9; margin: 8px 0; }
.reading-guide { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; }
.reading-guide .icon { color: var(--muted); width: 16px; height: 16px; margin-top: 2px; }
.reading-guide strong { display: block; font-size: 11px; font-weight: 550; color: var(--ink-soft); }
.reading-guide span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); line-height: 1.7; }
.digest-rail .ui-btn { font-size: 11px; height: 34px; min-height: 34px; width: 100%; margin-top: 13px; }
.digest-rail .topic-chip { display: inline-block; padding: 3px 7px; margin: 2px 3px 4px 0; border: 1px solid var(--line); border-radius: 5px; font-size: 10px; color: var(--ink-soft); background: var(--surface); }
.digest-report-button.ui-btn { margin: 5px 0 20px; width: 100%; font-size: 11px; }
.digest-messages { padding: 0; }
.digest-messages > p { font-size: 11px; margin: 0 0 18px; }
.digest-messages details { margin-bottom: 9px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.digest-messages summary { padding: 13px 16px; font-size: 12px; }
.digest-messages time { float: right; margin-left: 10px; font-size: 10px; line-height: 2; }
.digest-messages .tag { font-size: 9px; color: var(--color-accent); }
.digest-messages .markdown-reader { padding: 6px 20px 20px; max-width: 100%; }

@media (min-width: 1600px) { main { padding-top: 42px; } .digest-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 36px; } }
@media (max-width: 1240px) { .digest-layout { grid-template-columns: minmax(0, 1fr); } .digest-rail { display: none; } }
@media (max-width: 1000px) {
  .desktop-sidebar { display: none; }
  .workbench { margin-left: 0; }
  .mobile-menu-trigger.ui-btn { display: inline-flex; width: 32px; height: 32px; min-height: 32px; }
  .workbench-header { padding: 0 22px; height: 59px; }
  .mobile-menu-trigger .icon { width: 20px; height: 20px; }
  main { padding: 28px 24px 48px; }
  .view-guide { right: 24px; top: 34px; }
  .sidebar-navigation { display: block; }
  .sidebar-navigation .ui-menu { display: block; }
  .sidebar-navigation .ui-menu li + li { margin-top: 4px; }
  .brand { width: auto; }
}
@media (max-width: 600px) {
  html { font-size: 14px; }
  .workbench-header { padding: 0 13px; height: 55px; gap: 8px; }
  .header-actions { gap: 4px; }
  .header-search kbd, .header-search > span { display: none; }
  .header-search.ui-btn { width: 32px; min-height: 32px; height: 32px; padding: 0; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb > span:first-child { display: none; }
  .breadcrumb > .icon { display: none; }
  main { padding: 25px 16px 36px; }
  .view-heading { padding-right: 60px; margin-bottom: 21px; }
  .view-heading h1, .view > h1 { font-size: 24px; }
  .view-guide { right: 16px; top: 31px; max-width: calc(100% - 32px); }
  .lede { font-size: 11px; line-height: 1.8; }
  .daily-heading { padding-right: 0; }
  .daily-heading .heading-icon { width: 36px; height: 36px; border-radius: 9px; }
  .digest-sources { width: 100%; gap: 19px; }
  .digest-sources > a { font-size: 11px; gap: 5px; min-height: 42px; }
  .digest-sources .icon { display: none; }
  .digest-controls { gap: 8px; }
  .digest-controls > a { display: none; }
  .digest-controls label { gap: 7px; }
  .digest-controls .ui-select { width: 132px; }
  .digest-report-heading { gap: 8px; }
  .digest-report-heading h2 { font-size: 12px; gap: 6px; }
  .digest-report-heading > a { font-size: 10px; }
  .digest-papers li { padding: 16px 15px 12px; }
  .digest-group-featured li { padding-left: 13px; }
  .digest-paper-title { font-size: 15px; }
  .digest-feedback .ui-btn { min-height: 40px; height: 40px; font-size: 11px; padding: 0 6px; }
  .digest-messages time { display: block; float: none; margin: 5px 0 0 14px; }
  .workbench-footer { padding: 15px 16px; }
  .search-hit { padding: 18px 16px; }
  .hit-title { font-size: 15px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 16px; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi .v { font-size: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feedback-group { margin-left: 0; }
}
.reading-view { max-width: 960px; }
.study-brief { margin: 0 0 28px; padding: 20px 0; border-block: 1px solid var(--line); }
.study-brief-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 8px; }
.study-brief-heading h2 { margin: 0; }
.study-brief-heading .muted { font-size: 11px; }
.study-brief > p { font-size: 13px; max-width: 75ch; }
.study-brief-items { list-style: none; padding: 0; margin: 12px 0; }
.study-brief-items > li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.study-brief-items > li:last-child { border-bottom: 0; }
.study-task-kind { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.study-task-title { font-weight: 600; overflow-wrap: anywhere; }
.study-task-question { font-size: 13px; margin: 6px 0; overflow-wrap: anywhere; }
.study-task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.study-brief-items .muted { font-size: 12px; margin: 5px 0 0; }
.study-brief-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 12px; }
.study-review-reminders { border-left: 2px solid var(--accent); padding-left: 14px; }
@media (max-width: 600px) {
  .study-brief-items > li { align-items: start; flex-direction: column; gap: 10px; }
  .study-task-actions { justify-content: flex-start; }
  .study-brief-items .ui-btn { min-height: 44px; }
}
.reading-view > section { margin: 32px 0; }
.learning-paper-evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0; font-size: 12px; }
.learning-paper-evidence .muted { margin: 0; }
.reading-view h2 { display: flex; align-items: center; gap: 10px; }
.today-lines h2 { margin: 22px 0 8px; font-size: 15px; }
.today-list { list-style: none; padding: 0; margin: 0; }
.today-list li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); }
.today-list li:last-child { border-bottom: 0; }
.today-list .muted { font-size: 12px; }
.reading-items { list-style: none; padding: 0; margin: 12px 0; }
.reading-items > li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.reading-title { font-size: 16px; line-height: 1.6; font-weight: 600; overflow-wrap: anywhere; }
.reading-items .muted { margin: 6px 0; font-size: 13px; }
.reading-actions, .queue-button, .continue-reading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.reading-actions { margin-top: 10px; }
.queue-button { display: inline-flex; font-size: 13px; }
.continue-reading { padding: 12px 0 22px; font-size: 14px; overflow-wrap: anywhere; }
.reading-position-status { font-size: 12px; color: var(--muted); min-height: 18px; margin: 0 0 8px; }
.digest-feedback .digest-topic-label { font-size: 12px; }
.digest-feedback .ui-btn { font-size: 12px; }
/* Research reports are reading documents, with their own type scale and wide tables. */
.research-outputs .markdown-reader {
  min-width: 0;
  line-height: 1.85;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.research-outputs .markdown-reader h1 {
  font-size: 1.6rem;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -.3px;
  margin: 0 0 1.25rem;
}
.research-outputs .markdown-reader h2 { font-size: 1.2rem; margin: 1.8rem 0 .8rem; }
.research-outputs .markdown-reader h3 { font-size: 1.05rem; margin: 1.4rem 0 .6rem; }
.research-outputs .markdown-reader p { margin: .85rem 0; }
.research-outputs .markdown-reader ul { list-style: disc; padding-left: 1.5rem; }
.research-outputs .markdown-reader ol { list-style: decimal; padding-left: 1.5rem; }
.research-outputs .markdown-reader li { margin: .4rem 0; }
.research-outputs .markdown-reader table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .93rem;
}
.research-outputs .markdown-reader :is(th, td) {
  min-width: 8rem;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.research-outputs .markdown-reader th { background: var(--surface-muted); font-weight: 600; }
.research-outputs .deepread-output b { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .reading-actions .ui-btn, .queue-button .ui-btn { min-height: 44px; }
  .continue-reading > a + a { width: 100%; }
}
.pattern-search, .pattern-inputs { display: flex; gap: 12px; flex-wrap: wrap; }
.pattern-search { margin: 18px 0; }
.pattern-search input { flex: 1 1 240px; min-width: 0; }
.pattern-entry { padding: 24px 0; border-top: 1px solid var(--line); }
.pattern-entry h3 { font-size: 20px; margin: 0 0 8px; }
.pattern-entry > p, .pattern-entry > ol { max-width: 76ch; }
.pattern-entry ol { list-style: decimal; padding-left: 1.5em; }
.pattern-entry ul { list-style: disc; padding-left: 1.5em; }
.pattern-entry li + li { margin-top: 6px; }
.pattern-status { color: var(--muted); font-size: 13px; }
.pattern-case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 16px; min-width: 0; }
.pattern-case-links .ui-btn { min-height: 40px; height: auto; max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.paper-patterns { margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--line); max-width: 76ch; min-width: 0; }
.paper-patterns h2 { margin: 0 0 12px; font-size: 20px; }
.paper-pattern-entry { padding-left: 16px; margin-block: 20px; border-left: 3px solid var(--accent-soft); min-width: 0; }
.paper-pattern-entry h3 { font-size: 17px; margin: 0 0 8px; }
.paper-pattern-entry p { overflow-wrap: anywhere; }
.paper-pattern-entry ul { list-style: disc; padding-left: 1.5em; }
.paper-pattern-entry details { margin-block: 12px; }
.paper-pattern-entry summary { cursor: pointer; font-weight: 600; }
.pattern-entry details { margin: 14px 0; }
.pattern-entry summary { cursor: pointer; font-weight: 600; }
.pattern-entry h4 { margin: 18px 0 8px; font-size: 15px; }
.pattern-evidence blockquote { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--line); font-size: 13px; }
.pattern-plan dt { font-weight: 600; margin-top: 12px; }
.pattern-plan dd { margin: 4px 0 0; }
.pattern-calculator { margin-top: 20px; padding: 16px; background: var(--surface-2, var(--bg)); border: 1px solid var(--line); border-radius: 8px; }
.pattern-inputs { margin: 12px 0; }
.pattern-inputs label { flex: 1 1 180px; min-width: 0; }
.pattern-inputs input, .pattern-use input, .pattern-use textarea, .pattern-use select { display: block; width: 100%; margin-top: 6px; min-width: 0; }
.pattern-use fieldset { border: 0; padding: 0; margin: 12px 0; min-width: 0; }
.switching-comparison { margin-top: 16px; max-width: 76ch; }
.switching-comparison > summary { cursor: pointer; font-weight: 600; }
.switching-comparison fieldset { min-width: 0; border: 0; padding: 0; margin: 16px 0; }
.switching-comparison .switching-phase { border-top: 1px solid var(--line); padding-top: 8px; }
.switching-phase legend { font-weight: 600; padding-right: 12px; }
.switching-comparison p { overflow-wrap: anywhere; }
.switching-comparison-result { margin-top: 20px; }
.switching-comparison table { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.switching-comparison caption { text-align: left; margin-bottom: 8px; }
.switching-comparison th, .switching-comparison td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.switching-comparison td, .switching-comparison thead th:last-child { text-align: right; }
.pattern-use form { max-width: 650px; margin-top: 14px; }
.pattern-use label { display: block; margin: 12px 0; }
.direction-picker, .direction-tabs, .direction-section-heading, .direction-export-links, .followed-directions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.direction-picker { padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
.direction-picker a { padding: 7px 10px; color: var(--ink-soft); border-radius: 6px; }
.direction-picker a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); font-weight: 650; }
.direction-goal { padding: 24px 0; }
.topic-coverage { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0; font-size: 13px; }
.topic-scope-source, .topic-field-source { font-family: ui-monospace, SFMono-Regular, monospace; }
.topic-field, .topic-pending, .topic-plan { margin-top: 16px; }
.topic-reading { margin-bottom: 28px; }
.topic-pending ul { padding-left: 18px; }
.topic-field h3, .topic-field h4 { margin: 14px 0 4px; }
.topic-field p { max-width: 76ch; }
.direction-goal > p, .direction-methods > p, .direction-frontier > p { max-width: 76ch; }
.direction-editor { margin: 12px 0; }
.direction-editor summary, .directions-view summary { cursor: pointer; }
.directions-view form { max-width: 760px; }
.directions-view form label { display: block; margin: 14px 0; }
.directions-view :is(input,select,textarea) { display: block; width: 100%; margin-top: 5px; min-width: 0; }
.directions-view .direction-checkbox { display: flex; align-items: center; gap: 8px; }
.direction-checkbox input { width: auto; margin: 0; }
.direction-tabs { padding: 12px 0; border-block: 1px solid var(--line); margin-bottom: 24px; }
.direction-methods, .direction-frontier { padding-bottom: 28px; }
.direction-paper { margin: 16px 0; padding: 12px 0 12px 16px; border-left: 2px solid var(--line); }
.direction-paper-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }
.direction-section-heading { justify-content: space-between; margin-top: 28px; }
.direction-update { padding: 18px 0; border-bottom: 1px solid var(--line); }
.direction-update h3 { font-size: 15px; }
.direction-update p { max-width: 80ch; }
.direction-source-status { font-size: 12px; overflow-wrap: anywhere; }
.direction-method-table { width: 100%; overflow-x: auto; margin: 16px 0; }
.direction-method-table table { min-width: 820px; width: 100%; border-collapse: collapse; table-layout: fixed; }
.direction-method-table :is(td,th) { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.direction-method-table td p + p { margin-top: 10px; }
.direction-checkin { padding: 14px 0; border-bottom: 1px solid var(--line); }
.direction-answer { white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0; }
.evidence-quote { min-width: 0; margin: 16px 0; }
.evidence-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.evidence-original { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.evidence-page { margin: 16px 0 0; }
.evidence-page figcaption { margin-bottom: 8px; font-size: 13px; overflow-wrap: anywhere; }
.evidence-page img { display: block; width: 100%; height: auto; background: #fff; }
.evidence-page-choice { display: inline-block; margin: 4px 12px 4px 0; }
.permutation-lab { margin: 16px 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.pattern-practice { margin-block: 20px; padding-block: 18px; border-block: 1px solid var(--line); min-width: 0; }
.pattern-practice > summary { font-weight: 600; margin-bottom: 10px; }
.pattern-practice p { max-width: 76ch; }
.pattern-practice-picker, .pattern-practice-reason, .pattern-practice-numbers > label { display: grid; gap: 6px; margin-block: 14px; min-width: 0; }
.pattern-practice select { max-width: 100%; width: 100%; }
.pattern-practice h3 { font-size: 17px; font-weight: 600; margin-top: 22px; }
.pattern-practice-facts { padding-left: 16px; border-left: 3px solid var(--line); }
.pattern-practice fieldset { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.pattern-practice legend { font-weight: 600; margin-bottom: 12px; }
.pattern-practice-choice { display: flex; align-items: flex-start; gap: 10px; padding-block: 8px; line-height: 1.65; }
.pattern-practice-choice input { flex: 0 0 auto; width: 14px; height: 14px; min-height: 0; padding: 0; margin: 4px 0 0; }
.pattern-practice-choice span { min-width: 0; overflow-wrap: anywhere; }
.pattern-practice-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 16px; font-variant-numeric: tabular-nums; }
.pattern-practice textarea { width: 100%; min-height: 104px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; line-height: 1.65; resize: vertical; }
.pattern-practice-result { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.pattern-practice-result details { margin-block: 16px; }
.pattern-practice-written { white-space: pre-wrap; }
.pattern-practice-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pattern-reading { margin-block: 18px; padding-block: 12px; border-top: 1px solid var(--line); min-width: 0; }
.pattern-reading-plan { max-width: 76ch; }
.pattern-reading-paper { margin-block: 18px; padding-left: 14px; border-left: 3px solid var(--accent-soft); min-width: 0; }
.pattern-reading-paper h4 { font-size: 15px; margin-block: 12px; }
.pattern-reading p, .pattern-reading h4, .reading-task-reason { overflow-wrap: anywhere; white-space: pre-wrap; }
.pattern-reading .ui-btn { max-width: 100%; height: auto; min-height: 40px; white-space: normal; }
.reading-task-reason { color: var(--ink-soft); max-width: 76ch; margin-block: 12px 0; }
.reading-checkpoint { max-width: 76ch; margin-block: 18px; padding-block: 14px; border-top: 1px solid var(--line); min-width: 0; }
.reading-checkpoint > summary { font-weight: 600; cursor: pointer; }
.reading-checkpoint fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.reading-checkpoint form label, .reading-checkpoint-draft label { display: grid; gap: 6px; margin-block: 14px; min-width: 0; }
.reading-checkpoint textarea, .reading-checkpoint select { width: 100%; max-width: 100%; min-width: 0; }
.reading-checkpoint textarea { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit; }
.reading-checkpoint .reading-checkpoint-complete { display: flex; align-items: flex-start; gap: 10px; }
.reading-checkpoint-complete input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; }
.reading-checkpoint .ui-btn { max-width: 100%; height: auto; min-height: 40px; white-space: normal; }
.reading-checkpoint p, .pattern-reader-notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-checkpoint-history article, .pattern-reader-notes article { border-left: 3px solid var(--accent-soft); padding-left: 14px; margin-block: 18px; }
.pattern-task-checks { max-width: 76ch; margin-block: 20px; min-width: 0; }
.pattern-derivation { margin-block: 18px; min-width: 0; container-type: inline-size; }
.pattern-derivation > summary { cursor: pointer; font-weight: 600; }
.derivation-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 14px; }
.derivation-table caption { text-align: left; margin-bottom: 10px; font-weight: 600; }
.derivation-table th, .derivation-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.derivation-table th { font-size: 12px; color: var(--muted); }
.derivation-table th:first-child { width: 40%; }
.derivation-table th:nth-child(2) { width: 28%; }
.derivation-table p { margin: 0 0 10px; }
.derivation-kind { color: var(--muted); font-size: 12px; }
.derivation-sources { padding-left: 18px; margin: 0 0 12px; }
.derivation-evidence { margin-block: 10px; min-width: 0; }
.derivation-evidence > summary { cursor: pointer; overflow-wrap: anywhere; }
.pattern-derivation .evidence-actions { flex-wrap: wrap; }
.derivation-direct { border-block: 1px solid var(--line); padding-block: 12px; }
@container (max-width: 720px) {
  .derivation-table, .derivation-table tbody, .derivation-table tr, .derivation-table td { display: block; width: 100%; }
  .derivation-table caption { display: block; width: 100%; }
  .derivation-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .derivation-table tr { padding-block: 14px; border-top: 1px solid var(--line); }
  .derivation-table td { border: 0; padding: 8px 0; }
  .derivation-table td::before { content: attr(data-label); display: block; font-weight: 600; margin-bottom: 8px; }
}
@media (max-width: 800px) {
  .derivation-table, .derivation-table tbody, .derivation-table tr, .derivation-table td { display: block; width: 100%; }
  .derivation-table caption { display: block; width: 100%; }
  .derivation-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .derivation-table tr { padding-block: 14px; border-top: 1px solid var(--line); }
  .derivation-table td { border: 0; padding: 8px 0; }
  .derivation-table td::before { content: attr(data-label); display: block; font-weight: 600; margin-bottom: 8px; }
}
.pattern-task-checks summary { cursor: pointer; }
.pattern-task-checks > summary { font-weight: 600; }
.pattern-task-checks fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pattern-task-checks label { display: grid; gap: 6px; margin-block: 14px; min-width: 0; }
.pattern-task-checks textarea, .pattern-task-checks select { width: 100%; min-width: 0; max-width: 100%; }
.pattern-task-checks textarea, .pattern-use textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; }
.pattern-use p, .pattern-history p { overflow-wrap: anywhere; white-space: pre-wrap; }
.pattern-task-checks .task-check-note { display: flex; align-items: flex-start; gap: 10px; }
.task-check-note input { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 4px; }
.task-check-note small { display: block; font-weight: normal; }
.task-check-plan, .task-check-entry { margin-block: 18px; padding-block: 14px; border-top: 1px solid var(--line); }
.pattern-task-checks p, .pattern-task-checks summary, .task-check-note span { overflow-wrap: anywhere; white-space: pre-wrap; }
.pattern-task-checks .ui-btn { white-space: normal; height: auto; min-height: 40px; max-width: 100%; }
.task-check-result { margin-top: 18px; }
.pattern-task-checks .task-review-toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.task-review-toggle input { flex: 0 0 auto; width: 16px; height: 16px; min-height: 16px; padding: 0; margin: 0; }
.task-review-reasons { display: block; color: var(--muted); margin-top: 4px; font-weight: normal; }
.task-check-observation { border-left: 3px solid var(--accent-soft); padding-left: 14px; }
.pattern-task-checks .task-experiment-toggle { display: flex; align-items: flex-start; gap: 10px; }
.task-experiment-toggle input { flex: 0 0 auto; width: 16px; height: 16px; min-height: 16px; padding: 0; margin-top: 4px; }
.pattern-task-checks .task-experiment-fields { margin-block: 16px; padding: 14px 0; border-block: 1px solid var(--line); }
.task-experiment-fields legend { font-weight: 600; }
.task-experiment-fields small { font-weight: 400; }
.task-experiment-metric { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.task-experiment-metric input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.task-experiment-saved, .task-experiment-alignment { margin-block: 18px; padding-block: 12px; border-block: 1px solid var(--line); }
.task-experiment-saved dt { font-weight: 600; margin-top: 10px; }
.task-experiment-saved dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-experiment-changed { border-left: 3px solid var(--accent); padding-left: 12px; }
@media (max-width: 640px) { .task-experiment-metric { grid-template-columns: 1fr; gap: 0; } }
.pattern-task-checks .task-metric-toggle { display: flex; align-items: flex-start; gap: 10px; }
.task-metric-toggle input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; }
.task-metric-fields input:not([type="checkbox"]) { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.task-metric-fields legend { font-weight: 600; }
.task-metric-result { margin-block: 20px; padding-block: 12px; border-top: 1px solid var(--line); }
.task-metric-result dd, .task-metric-result h4 { overflow-wrap: anywhere; }
.task-metric-result table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-block: 12px; font-variant-numeric: tabular-nums; }
.task-metric-result th, .task-metric-result td { width: 33.333%; padding: 8px; border-bottom: 1px solid var(--line); text-align: left; overflow-wrap: anywhere; }
.task-metric-basis { display: grid; grid-template-columns: minmax(0, 7em) minmax(0, 1fr); gap: 8px 12px; }
.task-metric-basis dt { font-weight: 600; }
.task-metric-basis dd { margin: 0; }
.learning-evaluation-audit { max-width: 76ch; margin-block: 18px; padding-block: 14px; border-top: 1px solid var(--line); }
.learning-evaluation-audit summary { cursor: pointer; font-weight: 600; }
.learning-evaluation-audit p { overflow-wrap: anywhere; }
.pattern-practice .ui-btn { min-height: 40px; height: auto; white-space: normal; }
.permutation-lab > summary { font-weight: 600; }
.permutation-lab form { display: grid; gap: 12px; }
.permutation-lab form > .ui-btn { justify-self: start; }
.permutation-lab label { display: grid; gap: 6px; min-width: 0; }
.permutation-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.permutation-lab input, .permutation-lab select { width: 100%; min-width: 0; }
.permutation-lab input { font-variant-numeric: tabular-nums; }
.permutation-result { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.permutation-result h3 { font-weight: 600; }
.permutation-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px 16px; font-variant-numeric: tabular-nums; }
.permutation-results dt { color: var(--muted); }
.permutation-results dd { margin: 0; }
.permutation-trace { margin-top: 12px; min-width: 0; }
.permutation-table { max-width: 100%; overflow-x: auto; }
.permutation-table table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.permutation-table th, .permutation-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); }
.permutation-table th:first-child, .permutation-table td:first-child { text-align: left; }
.permutation-table caption { text-align: left; white-space: normal; padding: 12px 0 4px; }
.permutation-sources { margin-bottom: 0; }
.exercise-journal { min-width: 0; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.exercise-reflection h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.exercise-reflection textarea { width: 100%; min-width: 0; min-height: 104px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
  font: inherit; line-height: 1.65; resize: vertical; }
.exercise-reflection-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.exercise-reflection-actions label { flex: 0 1 200px; }
.exercise-reflection-actions .ui-btn { min-height: 40px; height: auto; white-space: normal; }
.exercise-history { margin-top: 16px; }
.exercise-history-entry { padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.exercise-history-entry h4 { font-size: 13px; font-weight: 600; }
.exercise-history-entry p { margin-block: 8px; }
.exercise-reflection-text { white-space: pre-wrap; }
.study-exercise-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; border-top: 1px solid var(--line); }
.study-exercise-review h3 { margin: 0; font-size: 15px; font-weight: 600; }
.study-pattern-tasks { margin-block: 18px; padding-block: 16px 0; border-top: 1px solid var(--line); }
.study-pattern-tasks h3 { margin: 0; font-size: 15px; }
.study-pattern-tasks > p { max-width: 75ch; font-size: 12px; }
.study-pattern-tasks .study-task-question { max-width: 70ch; overflow-wrap: anywhere; }
.task-check-selected { scroll-margin-top: 88px; border-inline-start: 3px solid var(--accent); padding-inline-start: 12px; }
.task-selected-label { display: inline; margin-inline-end: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.study-exercise-review p { max-width: 70ch; margin-block: 6px; font-size: 12px; }
@media (max-width: 480px) {
  .permutation-results { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .permutation-results dd { margin-bottom: 12px; }
}
.direction-agent-output { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.direction-agent-output pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.direction-agent-output .markdown-reader h1 { font-size: 23px; }
.direction-agent-output .markdown-reader h2 { margin-top: 26px; }
.direction-export-links { margin: 16px 0; }
.direction-run-history { margin: 24px 0; padding-block: 16px; border-block: 1px solid var(--line); }
.direction-paper-picker { border: 0; margin: 18px 0; padding: 0; min-width: 0; }
.direction-paper-picker legend { font-weight: 600; }
.direction-selection-paper { padding: 14px 0; border-top: 1px solid var(--line); }
.direction-selection-paper p { margin: 5px 0; }
.directions-view .direction-paper-checkbox { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); }
.direction-paper-checkbox input { width: auto; flex: 0 0 auto; margin-top: 5px; }
.direction-paper-checkbox span { min-width: 0; overflow-wrap: anywhere; }
.direction-selection-list { margin-top: 14px; }
.direction-no-matches { margin: 12px 0; color: var(--ink-soft); }
.frontier-comparison { margin-top: 18px; padding: 16px 0; border-block: 1px solid var(--line); }
.frontier-comparison p + p { margin-top: 8px; }
.frontier-comparison button { margin-top: 12px; }
.frontier-filters { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; margin: 18px 0 10px; }
.frontier-change { color: var(--accent-strong); font-size: 12px; margin-bottom: 7px; }
.frontier-field-changes { margin-top: 10px; }
.frontier-field-changes > div { padding-block: 12px; border-bottom: 1px solid var(--line); }
.frontier-decision { margin-top: 14px; }
.frontier-decision > p { margin-bottom: 10px; }
.frontier-absent { margin-top: 18px; }
.frontier-screening { margin-block: 10px; }
.frontier-screening details > p { margin-top: 10px; max-width: 80ch; }
.frontier-relevance { color: var(--ink); font-size: 12px; }
.frontier-metadata-quote { margin: 12px 0; padding: 8px 14px; border-left: 2px solid var(--line); color: var(--ink-soft); overflow-wrap: anywhere; }
.direction-run-history li { margin: 16px 0; overflow-wrap: anywhere; }
.direction-run-history a[aria-current="page"] { color: var(--accent-strong); font-weight: 650; }
.direction-history-pages { display: flex; flex-wrap: wrap; gap: 10px; }
.candidate-application { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.candidate-observations { margin-top: 14px; }
.candidate-observations > div { padding: 12px 0; }
.followed-directions { padding: 12px 0 24px; font-size: 12px; }
@media (max-width: 600px) {
  .direction-picker { gap: 5px; }
  .direction-picker a { padding: 7px; font-size: 12px; }
  .directions-view .ui-btn { min-height: 40px; }
}

/* Cross-paper synthesis keeps original interpretations beside the new hypothesis. */
.pattern-synthesis { margin: 18px 0 26px; padding: 18px 0; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.pattern-synthesis > h3 { scroll-margin-top: 88px; font-size: 17px; margin: 0 0 10px; }
.synthesis-selection { border: 1px solid var(--line); border-radius: 6px; margin: 16px 0; padding: 12px; min-width: 0; }
.synthesis-selection legend { font-size: 12px; color: var(--muted); }
.synthesis-selection-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; }
.synthesis-selection-item span { min-width: 0; }
.synthesis-selection-item button { flex-shrink: 0; }
.synthesis-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 18px 0; }
.synthesis-evidence-grid > article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.synthesis-evidence-grid h4 { margin: 0 0 10px; font-size: 14px; }
.synthesis-evidence-grid dt { font-size: 11px; color: var(--muted); margin-top: 12px; }
.synthesis-evidence-grid dd { margin: 4px 0; white-space: pre-wrap; font-size: 13px; line-height: 1.8; }
.pattern-synthesis details > summary { cursor: pointer; padding: 6px 0; }
.pattern-synthesis .personal-pattern-form { max-width: 820px; }
.personal-pattern-notebook .pattern-synthesis form { max-width: 820px; }
@media (max-width: 640px) { .synthesis-evidence-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .pattern-learning-path li { grid-template-columns: 22px minmax(0, 1fr); }
  .pattern-learning-path li strong, .pattern-learning-path li span { grid-column: 2; }
  .pattern-learning-path li a { grid-column: 2; grid-row: auto; justify-self: start; white-space: normal; }
  .pattern-learning-path li::before { grid-row: span 3; }
}

.synthesis-task-checks { margin: 18px 0 26px; padding: 18px 0; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.synthesis-task-checks > h2 { font-size: 18px; scroll-margin-top: 88px; }
.synthesis-task-checks .task-check-plan > summary { cursor: pointer; }
.synthesis-task-checks .synthesis-task-basis { margin: 14px 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.synthesis-task-basis summary { cursor: pointer; }
.synthesis-task-basis dl > div { margin-bottom: 12px; }
.synthesis-task-basis dt { font-size: 11px; color: var(--muted); }
.synthesis-task-basis dd { white-space: pre-wrap; margin: 4px 0; font-size: 13px; line-height: 1.8; }

.synthesis-task-checks textarea, .synthesis-task-checks input, .synthesis-task-checks select { font-weight: 400; }

/* Comparison follows the same question across papers, with readable text at every width. */
.borrow-comparison { margin-block: 20px 28px; padding-block: 20px; border-block: 1px solid var(--line); }
.borrow-comparison h2, .borrow-comparison h3 { scroll-margin-top: 90px; }
.borrow-comparison h2 { font-size: 18px; font-weight: 650; }
.borrow-comparison h3 { font-size: 16px; font-weight: 650; }
.borrow-comparison p { max-width: 80ch; overflow-wrap: anywhere; }
.borrow-selected { padding: 0; margin-block: 10px 16px; list-style: none; }
.borrow-selected li { display: flex; align-items: baseline; gap: 10px; }
.borrow-selected li > a { min-width: 0; overflow-wrap: anywhere; }
.borrow-selected button { flex-shrink: 0; }
.borrow-select-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 12px; }
.borrow-comparison-result { margin-top: 24px; }
.borrow-axis { margin-block: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.borrow-axis h4 { margin-bottom: 10px; font-size: 14px; font-weight: 650; }
.borrow-axis-papers { display: grid; grid-template-columns: repeat(var(--compare-columns), minmax(0, 1fr)); gap: 20px 28px; }
.borrow-axis-papers article { min-width: 0; border-left: 2px solid var(--line); padding-left: 14px; }
.borrow-axis-papers h5 { font-size: 12px; margin-bottom: 6px; }
.borrow-axis-papers p { white-space: pre-wrap; }
@media (max-width: 640px) {
  .borrow-axis-papers { grid-template-columns: minmax(0, 1fr); }
  .borrow-selected li { align-items: flex-start; }
}

.mechanism-stage-review { margin-block: 18px; min-width: 0; }
.mechanism-stage-review h4 { font-size: 14px; font-weight: 650; }
.mechanism-stage-review h5 { font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.mechanism-stage-review ol { padding-left: 22px; }
.mechanism-stage-review li { margin-block: 16px; }
.mechanism-stage-review p, .mechanism-review-blocked, .mechanism-review-unchecked { overflow-wrap: anywhere; }
.mechanism-stage-review details { margin-top: 8px; }
.mechanism-stage-review summary, .borrow-stage-checks > summary { cursor: pointer; }
.borrow-stage-checks { margin-block: 18px; padding-block: 14px; border-block: 1px solid var(--line); }
.borrow-stage-checks > summary { font-weight: 650; }
.borrow-stage-papers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; margin-top: 16px; }
.borrow-stage-papers > article { min-width: 0; }
@media (max-width: 640px) { .borrow-stage-papers { grid-template-columns: minmax(0,1fr); } }
/* The functional map follows the sequence of a real reading and research task. */
.learning-journey { margin: 1.75rem 0; padding: 0 0 0 1.8rem; max-width: 76ch; list-style: decimal; }
.learning-journey > li { padding: 0 0 1.25rem .6rem; }
.learning-journey > li::marker { color: var(--accent); font-weight: 700; }
.learning-journey h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.learning-journey p { margin: 0 0 .5rem; color: var(--ink-soft); }
.journey-links { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; }
.agent-handoff-guide { border-left: 3px solid var(--accent); padding: .4rem 1rem; margin: 0 0 2rem; max-width: 78ch; }
.agent-handoff-guide h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.agent-handoff-guide p { color: var(--ink-soft); }
.features-view .feature-row details { margin: .5rem 0; }
.features-view .feature-row details summary { color: var(--muted); cursor: pointer; }
.sources-view .grid-wrap, .pipeline-view .grid-wrap { position: relative; min-width: 0; max-width: 100%; overflow-x: auto; }
.sources-view .source-card { min-width: 0; }
.sources-view .grid-wrap table, .pipeline-view .grid-wrap table { min-width: 700px; }
.sources-view .data code, .pipeline-view .data code { overflow-wrap: normal; word-break: normal; }
