:root {
  --ink: #17211d; --muted: #64716b; --paper: #f5f2e9; --surface: #fffdf7;
  --forest: #174d3a; --forest-light: #d9ebe2; --gold: #df9f38; --line: #dcd9ce;
  --shadow: 0 16px 40px rgba(34, 48, 41, .09); --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
a { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; }
.site-header { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; height: 76px; padding: 0 max(5vw,24px); border-bottom: 1px solid rgba(23,77,58,.14); }
.brand { display: flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-size: 1.45rem; text-decoration: none; letter-spacing: -.03em; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: var(--forest); }
.header-note, .meta { color: var(--muted); font-size: .82rem; }.header-note { justify-self: end; }
.site-nav { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255,253,247,.68); border: 1px solid var(--line); border-radius: 10px; }.site-nav a { padding: 7px 14px; color: var(--muted); border-radius: 7px; text-decoration: none; font-size: .78rem; font-weight: 800; }.site-nav a:hover { color: var(--forest); background: var(--forest-light); }.site-nav a.is-active { color: white; background: var(--forest); }
.main { min-height: calc(100vh - 76px); }
.page { width: min(1180px, 90vw); margin: auto; }
.hero { padding: 88px 0 72px; position: relative; }
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: 4%; top: 25px; border-radius: 50%; background: radial-gradient(circle, rgba(223,159,56,.2), transparent 68%); pointer-events: none; }
.eyebrow { margin: 0 0 12px; color: var(--forest); text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 800; }
.hero h1 { position: relative; max-width: 740px; margin: 0; font: 500 clamp(3rem, 7vw, 6.2rem)/.93 Georgia, serif; letter-spacing: -.055em; }
.hero h1 em { color: var(--forest); font-weight: inherit; }
.hero__lede { max-width: 620px; margin: 28px 0 35px; color: var(--muted); font-size: 1.1rem; line-height: 1.7; }
.create-form { position: relative; display: flex; gap: 12px; max-width: 730px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: 5px; }.field--grow { flex: 1; }
.field label, .paper-card__actions label { color: var(--muted); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 11px; cursor: pointer; font-weight: 750; }
.button--primary { color: white; background: var(--forest); }.button:hover { filter: brightness(1.08); }.button:disabled { opacity: .55; cursor: wait; }
.reviews-section { padding-bottom: 80px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 20px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font: 500 1.8rem Georgia, serif; }.count { min-width: 30px; padding: 5px 9px; border-radius: 20px; text-align: center; background: var(--forest-light); color: var(--forest); font-weight: 800; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.review-card { display: flex; align-items: center; gap: 16px; padding: 22px; background: rgba(255,253,247,.68); border: 1px solid var(--line); border-radius: 14px; transition: .2s ease; }
.review-card:hover { transform: translateY(-3px); background: var(--surface); box-shadow: var(--shadow); }
.review-card__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: 12px; color: var(--forest); background: var(--forest-light); }
.review-card__body { min-width: 0; flex: 1; text-decoration: none; }.review-card h3 { margin: 0; font-size: 1rem; }.review-card p { margin: 5px 0 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-card__controls { display: flex; align-items: center; gap: 4px; }.review-card__arrow { display: grid; padding: 8px; color: var(--muted); }.review-card__arrow svg { width: 17px; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }.icon-button:hover { background: #eeeae0; }.icon-button--danger { color: #9b332b; }.icon-button--danger:hover, .icon-button--danger:focus-visible { color: #7f241e; background: #f4dedb; outline: 2px solid rgba(155,51,43,.22); outline-offset: 2px; }
.button--secondary { color: var(--ink); background: #ece9df; }.button--danger { color: white; background: #9b332b; }
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 80px rgba(23,33,29,.25); }.confirm-dialog::backdrop { background: rgba(15,28,22,.48); backdrop-filter: blur(3px); }.confirm-dialog form { padding: 32px; }.confirm-dialog__icon { display: grid; place-items: center; width: 48px; height: 48px; color: #8c3028; background: #f4dedb; border-radius: 50%; }.confirm-dialog h2 { margin: 18px 0 8px; font: 500 1.75rem Georgia, serif; }.confirm-dialog p { margin: 0; color: var(--muted); line-height: 1.55; }.confirm-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.screening-dialog { width: min(860px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 90px rgba(15,28,22,.3); }.screening-dialog::backdrop { background: rgba(15,28,22,.56); backdrop-filter: blur(4px); }.screening-sheet { display: grid; grid-template-rows: auto minmax(0,1fr) auto; max-height: min(820px, calc(100vh - 32px)); }.screening-sheet__header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 22px 28px; border-bottom: 1px solid var(--line); }.screening-sheet__header .eyebrow { margin-bottom: 5px; }.screening-sheet__header strong { color: var(--muted); font-size: .8rem; }.screening-sheet__close { width: 34px; height: 34px; border: 0; border-radius: 50%; color: var(--muted); background: #eeeae0; cursor: pointer; font-size: 1.4rem; line-height: 1; }.screening-sheet__body { overflow-y: auto; padding: 34px 40px; }.screening-sheet__body h2 { margin: 12px 0 10px; font: 600 clamp(1.6rem,3vw,2.4rem)/1.18 Georgia, serif; }.screening-sheet__body h2 a { text-decoration: none; }.screening-sheet__body h2 a:hover { color: var(--forest); text-decoration: underline; }.screening-sheet__abstract { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }.screening-sheet__abstract h3 { margin: 0 0 10px; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }.screening-sheet__abstract p { margin: 0; color: #495650; line-height: 1.75; }.screening-decisions { padding: 20px 28px 24px; border-top: 1px solid var(--line); background: #f5f2e9; }.screening-decisions > p { margin: 0 0 12px; color: var(--muted); font-size: .76rem; font-weight: 700; }.screening-decisions__primary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.screening-decisions__secondary { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }.decision-button { min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; font-weight: 800; }.decision-button--small { min-height: 30px; padding: 4px 12px; border-radius: 7px; font-size: .71rem; }.decision-button--skip { color: var(--muted); }.decision-button--on-topic { color: #245184; }.decision-button--relevant { color: #17603f; }.decision-button--suggested { color: #7c5313; }.decision-button--exclude { color: #8c3028; }.decision-button:hover { border-color: currentColor; background: white; }.decision-button:disabled { opacity: .5; cursor: wait; }.screening-complete { padding: 54px 40px; text-align: center; }.screening-complete__icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 50%; color: #17603f; background: #d9f0e3; }.screening-complete h2 { margin: 0; font: 500 2rem Georgia, serif; }.screening-complete > p:not(.eyebrow) { margin: 10px auto 26px; color: var(--muted); }
.empty-state { padding: 52px 24px; text-align: center; border: 1px dashed #c5c8be; border-radius: var(--radius); }
.empty-state__icon { display: grid; place-items: center; width: 52px; height: 52px; margin: auto; border-radius: 50%; color: var(--forest); background: var(--forest-light); }.empty-state h2 { margin: 14px 0 5px; }.empty-state p { margin: 0; color: var(--muted); }
.workspace { display: grid; grid-template-columns: minmax(350px, 28vw) minmax(0, 1fr); width: 100%; max-width: 100%; height: calc(100vh - 76px); min-height: 0; overflow: hidden; }
.sidebar { min-width: 0; min-height: 0; overflow-y: auto; padding: 42px 32px 40px max(4vw, 28px); border-right: 1px solid var(--line); background: rgba(255,253,247,.38); }
.back-link { display: block; margin-bottom: 52px; color: var(--muted); font-size: .85rem; text-decoration: none; }.sidebar h1 { margin: 0 0 18px; font: 500 2.2rem/1.05 Georgia, serif; }.review-description label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.review-description textarea { display: block; width: 100%; min-height: 112px; padding: 10px 11px; resize: vertical; color: var(--ink); background: rgba(255,253,247,.7); border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: .82rem; line-height: 1.5; }.review-description textarea:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.13); }.review-description textarea:disabled { opacity: .65; }.review-description p { margin: 7px 2px 0; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 34px; }.stat { min-width: 0; padding: 12px 3px; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }.stat strong, .stat span { display: block; }.stat strong { font: 500 1.35rem Georgia, serif; }.stat span { margin-top: 3px; color: var(--muted); font-size: .58rem; text-transform: uppercase; text-overflow: ellipsis; overflow: hidden; }
.search-history { margin-top: 38px; padding-top: 25px; border-top: 1px solid var(--line); }.search-history__heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.search-history h2 { margin: 0; font: 500 1.15rem Georgia, serif; }.search-history .count { min-width: 25px; padding: 3px 7px; font-size: .72rem; }.search-history__list { display: grid; gap: 7px; margin-top: 14px; }.search-history__empty { color: var(--muted); font-size: .8rem; }.visibility-option { display: grid; grid-template-columns: 17px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px; border-radius: 9px; cursor: pointer; }.visibility-option:hover { background: rgba(23,77,58,.06); }.visibility-option input { position: absolute; opacity: 0; pointer-events: none; }.visibility-option__control { width: 16px; height: 16px; border: 1.5px solid #9ba49e; border-radius: 4px; }.visibility-option input:checked + .visibility-option__control { border-color: var(--forest); background: var(--forest); box-shadow: inset 0 0 0 3px var(--surface); }.visibility-option input:focus-visible + .visibility-option__control { outline: 2px solid var(--gold); outline-offset: 2px; }.visibility-option__query { overflow: hidden; color: var(--muted); font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; }.visibility-option b { color: var(--forest); font-size: .7rem; }
.workspace__content { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 38px max(5vw, 38px) 0; }
.workspace-view-scroll { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; padding-right: 5px; }
.workspace-view-scroll--initial-library, .workspace-view-scroll--final-library { overflow-y: hidden; padding-right: 0; }
.workspace-view-scroll--initial-library .paper-list, .workspace-view-scroll--final-library .paper-list { flex: 1 1 auto; }
.workspace-view-scroll--graph { overflow: hidden; padding-right: 0; }
.graph-heading-tools { display: grid; justify-items: end; gap: 10px; }
.graph-strategy { display: flex; align-items: center; gap: 9px; }
.graph-strategy > span { color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.graph-strategy select { min-width: 175px; padding: 7px 9px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .75rem; }
.graph-strategy select:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }
.graph-edge, .graph-node circle, .graph-node text { vector-effect: non-scaling-stroke; }
.graph-edge { transition: opacity .12s ease, stroke .12s ease, stroke-width .12s ease; }.graph-edge.is-highlighted { stroke: var(--forest); stroke-width: 3; opacity: 1; }.graph-edge.is-dimmed { opacity: .1; }.graph-node text { transition: fill .12s ease, stroke-width .12s ease; }.graph-node.is-hovered text { fill: var(--forest); stroke-width: 6px; font-weight: 900; }.graph-node.is-hovered circle { stroke: var(--gold); }
.search-history__item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px; }
.search-history__item--failed { border: 1px solid #d9a6a1; border-radius: 10px; background: #fbebe9; box-shadow: inset 3px 0 0 #9b332b; }
.search-history__item--failed .visibility-option__query { color: #7f241e; font-weight: 700; }
.search-history__item--failed .search-history__action { color: #8c3028; }
.search-history__item--failed .search-history__action:hover, .search-history__item--failed .search-history__action:focus-visible { background: #f4d6d2; outline: 2px solid rgba(155,51,43,.16); }
.search-history__failure { padding: 3px 6px; color: #fff; background: #9b332b; border-radius: 999px; font-size: .58rem; font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: .04em; }
.search-history__actions { display: flex; align-items: center; gap: 1px; }
.search-history__action { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.search-history__action svg { width: 15px; height: 15px; }
.search-history__extend { color: var(--forest); background: rgba(217,235,226,.55); }
.search-history__extend:hover, .search-history__extend:focus-visible { background: var(--forest-light); outline: 2px solid rgba(23,77,58,.16); outline-offset: 1px; }
.search-history__extend:disabled { color: #a9afa9; cursor: default; opacity: .45; }
.search-history__extend.is-loading svg { animation: spin .7s linear infinite; }
.search-history__delete { color: #9b332b; }
.search-history__delete svg { width: 15px; height: 15px; }
.search-history__delete:hover, .search-history__delete:focus-visible { color: #7f241e; background: #f4dedb; outline: 2px solid rgba(155,51,43,.18); outline-offset: 1px; }
.search-panel { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); align-items: end; gap: clamp(24px,4vw,50px); padding: 30px; color: white; background: var(--forest); border-radius: var(--radius); box-shadow: var(--shadow); }.search-panel > * { min-width: 0; }.search-panel .eyebrow { color: #a9d5c1; }.search-panel h2 { margin: 0; font: 500 2rem Georgia, serif; }.search-panel p:last-child { margin: 9px 0 0; color: #c6d8d0; line-height: 1.45; }
.search-form { display: flex; min-width: 0; padding: 8px; border-radius: 13px; background: white; }.search-input { display: flex; align-items: center; min-width: 0; gap: 10px; flex: 1; padding: 0 10px; color: var(--muted); }.search-input input { min-width: 0; color: var(--ink); }
.search-panel--expanded { display: block; padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); }.openalex-search { min-width: 0; }.openalex-search__intro { padding: 28px 30px; color: white; background: var(--forest); }.openalex-search__intro .eyebrow { color: #a9d5c1; }.openalex-search__intro h2 { color: white; }.openalex-search__intro p:last-child { max-width: 680px; margin: 8px 0 0; color: #c6d8d0; }.boolean-builder { padding: 26px 30px 28px; }.boolean-builder__heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }.boolean-builder__heading h3 { margin: 0; font: 600 1.2rem Georgia, serif; }.boolean-builder__heading p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }.boolean-builder__heading > span { padding: 5px 8px; border-radius: 6px; color: var(--forest); background: var(--forest-light); font-size: .65rem; font-weight: 900; letter-spacing: .08em; }.concept-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }.concept-group { display: grid; min-width: 0; gap: 6px; }.concept-group > span, .query-editor__heading > label, .filter-field > span { color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }.concept-group textarea, .boolean-query { width: 100%; resize: vertical; color: var(--ink); background: #faf8f1; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: .78rem; line-height: 1.5; }.concept-group textarea { min-height: 92px; padding: 9px 10px; }.concept-group textarea:focus, .boolean-query:focus, .filter-field input:focus, .filter-field select:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }.query-editor { margin-top: 18px; }.query-editor__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }.query-tools { display: flex; flex-wrap: wrap; gap: 4px; }.query-tools button { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--forest); background: white; cursor: pointer; font-size: .64rem; font-weight: 800; }.boolean-query { min-height: 126px; padding: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }.query-preview-wrap { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; margin-top: 8px; color: var(--muted); font-size: .68rem; }.query-preview-wrap strong { color: var(--forest); }.query-preview { margin: 0 !important; overflow-wrap: anywhere; color: var(--muted) !important; }.search-filters { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8f5ec; }.search-filters summary { display: flex; align-items: center; gap: 8px; padding: 14px 30px; color: var(--forest); cursor: pointer; font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; }.search-filters summary svg { width: 16px; }.search-filters__grid { display: grid; grid-template-columns: repeat(5,minmax(100px,1fr)); gap: 10px; padding: 0 30px 18px; }.filter-field { display: grid; min-width: 0; gap: 6px; }.filter-field input, .filter-field select { width: 100%; min-width: 0; height: 36px; padding: 6px 8px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: .74rem; }.filter-checks { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3,max-content); gap: 16px; padding-top: 3px; }.filter-check { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; cursor: pointer; }.filter-check input { width: 15px; height: 15px; accent-color: var(--forest); }.filter-note { padding: 0 30px 16px; margin: 0 !important; color: var(--muted) !important; font-size: .68rem; }.openalex-search__submit { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 30px; }.openalex-search__submit > span { color: var(--muted); font-size: .72rem; }
.boolean-search-layout { display: grid; grid-template-columns: minmax(0,2fr) minmax(190px,.75fr); align-items: stretch; gap: 16px; }.boolean-search-layout .query-editor { display: grid; min-width: 0; margin: 0; gap: 7px; }.query-editor > span, .filter-field > span { color: var(--muted); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }.boolean-search-layout .boolean-query { min-height: 260px; }.boolean-cheat-sheet { min-width: 0; padding: 15px; border: 1px solid #cbdcd3; border-radius: 10px; background: #edf5f1; }.boolean-cheat-sheet h3 { margin: 0 0 12px; color: var(--forest); font: 600 1rem Georgia, serif; }.boolean-cheat-sheet > div { display: grid; gap: 3px; margin-top: 9px; }.boolean-cheat-sheet strong { color: var(--muted); font-size: .61rem; text-transform: uppercase; letter-spacing: .06em; }.boolean-cheat-sheet code { overflow-wrap: anywhere; color: var(--ink); font-size: .67rem; line-height: 1.35; }.boolean-cheat-sheet p { margin: 13px 0 0 !important; color: var(--muted) !important; font-size: .65rem; line-height: 1.4 !important; }
.view-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,253,247,.72); }.view-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 700; }.view-tabs button.is-active { color: white; background: var(--forest); }.view-tabs svg { width: 16px; }.discovery-view { margin-top: 30px; }
.papers-section { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 50px 0 0; }.section-heading--papers { flex: 0 0 auto; align-items: end; }.section-heading--papers h2 { font-size: 2.2rem; }
.screening-filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-width: 0; gap: 14px; margin: -2px 0 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,247,.62); }.screening-filters__main { display: flex; align-items: center; flex: 1 1 440px; min-width: 0; gap: 14px; }.screening-filters__label { flex: 0 0 auto; color: var(--muted); font-size: .69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.screening-filters__options { display: flex; flex-wrap: wrap; min-width: 0; gap: 7px; }.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: .72rem; font-weight: 700; }.filter-chip input { position: absolute; opacity: 0; pointer-events: none; }.filter-chip:has(input:not(:checked)) { opacity: .42; background: transparent; }.filter-chip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }.filter-chip b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; color: var(--ink); background: #ece9df; font-size: .65rem; }.filter-chip--on-topic:has(input:checked) { color: #245184; border-color: #9ebbd5; }.filter-chip--relevant:has(input:checked) { color: #17603f; border-color: #9ac6ac; }.filter-chip--suggested:has(input:checked) { color: #7c5313; border-color: #d9bd79; }.filter-chip--exclude:has(input:checked) { color: #8c3028; border-color: #d9aaa5; }.screening-filters__actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; gap: 7px; }.screening-queue-button, .llm-batch-button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; gap: 7px; min-height: 34px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 800; }.screening-queue-button { border: 0; color: white; background: var(--forest); }.llm-batch-button { max-width: min(230px,100%); border: 1px solid var(--forest); color: var(--forest); background: white; overflow-wrap: anywhere; }.screening-queue-button svg { width: 15px; }.screening-queue-button:disabled, .llm-batch-button:disabled { opacity: .45; cursor: default; }.llm-card-result { font-weight: 900; }.llm-card-result--yes { color: #17603f; }.llm-card-result--no { color: #8c3028; }.llm-card-result--not-enough-info { color: #7c5313; }
.filter-chip--no-abstract:has(input:checked) { color: #7c5313; border-color: #d9bd79; }
.screening-filters__topics { position: relative; flex: 1 0 100%; min-width: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.topic-filter { position: relative; width: max-content; max-width: 100%; }
.topic-filter > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 10px; color: var(--forest); background: var(--surface); border: 1px solid #9fbbb0; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 800; list-style: none; }
.topic-filter > summary::-webkit-details-marker { display: none; }.topic-filter > summary svg { width: 15px; height: 15px; }.topic-filter > summary b { padding: 2px 6px; color: var(--ink); background: #ece9df; border-radius: 10px; font-size: .62rem; }
.topic-filter[open] > summary { color: white; background: var(--forest); }.topic-filter[open] > summary b { color: var(--forest); background: white; }
.topic-filter__panel { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; display: grid; width: min(680px, calc(72vw - 80px)); max-height: min(520px, calc(100vh - 210px)); padding: 16px; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 48px rgba(23,33,29,.24); }
.topic-filter__heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }.topic-filter__heading h3 { margin: 0; font: 600 1.05rem Georgia, serif; }.topic-filter__heading p { max-width: 490px; margin: 4px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.4; }.topic-filter__heading button { flex: 0 0 auto; padding: 4px 7px; color: #8c3028; background: transparent; border: 0; cursor: pointer; font-size: .67rem; font-weight: 800; }
.topic-filter__search { width: 100%; height: 36px; margin-top: 13px; padding: 7px 10px; color: var(--ink); background: #faf8f1; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .75rem; }.topic-filter__search:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }
.topic-filter__legend { display: flex; gap: 14px; margin: 10px 0 7px; color: var(--muted); font-size: .63rem; font-weight: 800; }.topic-filter__legend span { display: inline-flex; align-items: center; gap: 4px; }.topic-filter__legend i { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-style: normal; }.topic-filter__include-mark { color: #17603f; background: #d9f0e3; }.topic-filter__exclude-mark { color: #8c3028; background: #f4dedb; }
.topic-filter__list { min-height: 0; max-height: clamp(160px,38vh,340px); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line); }.topic-filter__option { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #ebe8df; }.topic-filter__option[hidden] { display: none; }
.topic-filter__name { display: grid; min-width: 0; gap: 2px; }.topic-filter__name strong { overflow: hidden; font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; }.topic-filter__name span { overflow: hidden; color: var(--muted); font-size: .61rem; white-space: nowrap; text-overflow: ellipsis; }.topic-filter__name b { color: var(--forest); font-size: .6rem; font-weight: 800; }
.topic-filter__choices { display: flex; gap: 5px; }.topic-filter__choices button { display: inline-flex; align-items: center; gap: 4px; min-height: 29px; padding: 5px 7px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: .65rem; font-weight: 900; }.topic-filter__choices button:first-child.is-active { color: #17603f; background: #d9f0e3; border-color: #8fbea3; }.topic-filter__choices button:last-child.is-active { color: #8c3028; background: #f4dedb; border-color: #d2a19c; }.topic-filter__choices button:hover { border-color: currentColor; }
.topic-filter__empty { margin: 24px 0; color: var(--muted); text-align: center; font-size: .75rem; }.topic-filter__empty[hidden] { display: none; }
.paper-list { display: grid; min-width: 0; min-height: 0; gap: 12px; overflow-y: auto; scrollbar-gutter: stable; padding: 0 5px 38px 0; }.paper-card { display: grid; grid-template-columns: minmax(0,1fr) 155px; min-width: 0; gap: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }.paper-card__main { min-width: 0; }.paper-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }.paper-card h3 { margin: 9px 0 7px; overflow-wrap: anywhere; font: 600 1.2rem/1.35 Georgia, serif; }.paper-card h3 a { text-decoration: none; }.paper-card h3 a:hover { color: var(--forest); text-decoration: underline; }.authors { margin: 0; overflow-wrap: anywhere; color: var(--forest); font-size: .82rem; }.paper-topics { display: flex; flex-wrap: wrap; min-width: 0; gap: 6px; margin-top: 12px; }.paper-topics span { max-width: 100%; padding: 4px 8px; overflow: hidden; border: 1px solid #cbdcd3; border-radius: 20px; color: var(--forest); background: #edf5f1; font-size: .69rem; white-space: nowrap; text-overflow: ellipsis; }.paper-llm-result { display: flex; align-items: center; justify-content: space-between; max-width: 100%; gap: 8px; padding: 7px 9px; border-radius: 8px; font-size: .72rem; overflow-wrap: anywhere; }.paper-llm-result strong { font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; }.paper-llm-result span { font-weight: 900; }.paper-llm-result--yes { color: #17603f; background: #d9f0e3; }.paper-llm-result--no { color: #8c3028; background: #f4dedb; }.paper-llm-result--not-enough-info { color: #7c5313; background: #f5e7c8; }.abstract { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 14px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.paper-card__actions { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 16px; padding-left: 20px; border-left: 1px solid var(--line); }.paper-card__actions label { display: grid; gap: 7px; }.paper-card select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.paper-card__action-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.paper-settings-button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; }.paper-settings-button:hover, .paper-settings-button:focus-visible { color: var(--forest); background: var(--forest-light); outline: 2px solid rgba(23,77,58,.16); outline-offset: 1px; }.paper-settings-button svg { width: 18px; height: 18px; }
.screening-sheet__tools { display: flex; align-items: center; gap: 7px; }
.paper-edit-form__header h2 a { color: inherit; text-decoration: none; }.paper-edit-form__header h2 a:hover, .paper-edit-form__header h2 a:focus-visible { color: var(--forest); text-decoration: underline; }
.paper-edit-dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 28px 90px rgba(15,28,22,.3); }.paper-edit-dialog::backdrop { background: rgba(15,28,22,.58); backdrop-filter: blur(4px); }.paper-edit-form { display: grid; grid-template-rows: auto minmax(0,1fr) auto; max-height: calc(100vh - 32px); }.paper-edit-form__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 28px; border-bottom: 1px solid var(--line); }.paper-edit-form__header h2 { max-width: 610px; margin: 0; overflow-wrap: anywhere; font: 600 1.35rem/1.3 Georgia, serif; }.paper-edit-form__body { display: grid; gap: 22px; min-height: 0; overflow-y: auto; padding: 25px 28px; }.paper-edit-form__note { margin: 0; padding: 10px 12px; color: var(--muted); background: #f5f2e9; border-radius: 8px; font-size: .75rem; line-height: 1.45; }.paper-edit-field { display: grid; gap: 8px; }.paper-edit-field > span, .paper-edit-pdf h3 { color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }.paper-edit-field textarea { width: 100%; min-height: 250px; padding: 13px; resize: vertical; color: var(--ink); background: #faf8f1; border: 1px solid var(--line); border-radius: 9px; font: inherit; line-height: 1.6; }.paper-edit-field textarea:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }.paper-edit-pdf { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }.paper-edit-pdf h3, .paper-edit-pdf p { margin: 0; }.paper-edit-pdf p { margin-top: 4px; overflow-wrap: anywhere; color: var(--muted); font-size: .72rem; }.paper-edit-pdf__choose { display: flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 9px; color: var(--forest); background: white; border: 1px solid var(--forest); border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 800; white-space: nowrap; }.paper-edit-pdf__choose:hover { background: var(--forest-light); }.paper-edit-pdf__choose.is-selected { color: white; background: var(--forest); }.paper-edit-pdf__choose input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }.paper-edit-form__actions { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 28px; border-top: 1px solid var(--line); background: #f5f2e9; }
.paper-card__meta .meta-open-access { color: #17603f; font-weight: 800; }
.paper-card__meta .paper-origin { color: var(--forest); font-weight: 800; }
.paper-card__meta .meta-tei-statistics { color: #245184; font-weight: 800; }
.cleaned-tei-controls { display: grid; min-width: 0; gap: 5px; }
.cleaned-tei-controls--history { display: flex; align-items: stretch; gap: 0; }
.cleaned-tei-controls--history > * { border-radius: 0; }
.cleaned-tei-controls--history > :first-child { border-radius: 8px 0 0 8px; }
.cleaned-tei-controls--history > :last-child { margin-left: -1px; border-radius: 0 8px 8px 0; }
.cleaned-tei-history-button { cursor: pointer; font: inherit; }
.cleaning-pipeline-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 0; gap: 5px; color: #7b847f; font-size: .6rem; line-height: 1.25; }
.cleaning-pipeline-mark__dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: #89938e; }
.cleaning-pipeline-mark--ollama .cleaning-pipeline-mark__dot { background: #4d8068; }
.cleaning-pipeline-mark--openai .cleaning-pipeline-mark__dot { background: #6576a4; }
.cleaning-history-dialog { width: min(980px,calc(100vw - 32px)); height: min(850px,calc(100vh - 32px)); padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 28px 90px rgba(15,28,22,.32); }
.cleaning-history-dialog::backdrop { background: rgba(15,28,22,.56); backdrop-filter: blur(4px); }
.cleaning-history { display: grid; grid-template-rows: auto minmax(0,1fr); height: 100%; }
.cleaning-history__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.cleaning-history__header .eyebrow { margin-bottom: 5px; }
.cleaning-history__header h2 { max-width: 780px; margin: 0; overflow: hidden; font: 600 1.35rem/1.25 Georgia,serif; text-overflow: ellipsis; white-space: nowrap; }
.cleaning-history__body { min-height: 0; overflow-y: auto; padding: 22px 24px 45px; }
.cleaning-history__summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.cleaning-history__summary span, .cleaning-history__summary a { padding: 6px 9px; color: var(--forest); background: var(--forest-light); border-radius: 7px; font-size: .7rem; font-weight: 800; text-decoration: none; }
.cleaning-history__summary a { margin-left: auto; color: #245184; background: #e5eff8; }
.cleaning-history__warnings { margin-bottom: 18px; padding: 13px 16px; color: #734b0c; background: #fff1d6; border: 1px solid #e7c986; border-radius: 9px; font-size: .76rem; }
.cleaning-history__warnings ul { margin: 7px 0 0; padding-left: 20px; }
.cleaning-history__entries { display: grid; gap: 8px; }
.cleaning-history-entry { background: white; border: 1px solid var(--line); border-left: 4px solid #89938e; border-radius: 9px; }
.cleaning-history-entry--accepted { border-left-color: #2d7b50; }
.cleaning-history-entry--partially-accepted { border-left-color: #b77a19; }
.cleaning-history-entry--invalid-response { border-left-color: #a63c34; }
.cleaning-history-entry--rejected { border-left-color: #a63c34; }
.cleaning-history-entry--no-edits { border-left-color: #58718d; }
.cleaning-history-entry summary { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; font-size: .72rem; }
.cleaning-history-entry summary > span:last-child { color: var(--muted); }
.cleaning-history-entry__status { text-transform: uppercase; font-size: .62rem; font-weight: 900; letter-spacing: .06em; }
.cleaning-history-entry__error { margin: 0 13px 10px; padding: 9px 10px; color: #862f29; background: #f8e3e0; border-radius: 6px; font-size: .72rem; }
.cleaning-history-entry__elements { margin: 0; padding: 8px 13px; overflow-wrap: anywhere; color: var(--muted); border-top: 1px solid var(--line); font: .66rem/1.5 Consolas,monospace; }
.cleaning-history-response { padding: 12px 13px; border-top: 1px solid var(--line); }.cleaning-history-response h4 { margin: 0 0 7px; font-size: .76rem; }.cleaning-history-response pre { max-height: 300px; margin: 0; padding: 10px; overflow: auto; color: #dce7f1; background: #24252b; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.5 Consolas,monospace; }
.cleaning-history-edit { padding: 12px 13px; border-top: 1px solid var(--line); }
.cleaning-history-edit h4 { margin: 0 0 9px; font-size: .76rem; }
.cleaning-history-edit label { display: block; margin-top: 8px; color: var(--muted); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cleaning-history-edit pre { max-height: 220px; margin: 4px 0 0; padding: 9px 10px; overflow: auto; color: #dce7f1; background: #24252b; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.5 Consolas,monospace; text-transform: none; letter-spacing: 0; }
.cleaning-history-edit > p { margin: 7px 0 0; color: var(--muted); font-size: .68rem; }
.cleaning-history-edit__result { padding: 6px 8px; border-radius: 6px; font-weight: 800; }.cleaning-history-edit--accepted .cleaning-history-edit__result { color: #236841; background: #e4f2e9; }.cleaning-history-edit--rejected .cleaning-history-edit__result { color: #862f29; background: #f8e3e0; }
.cleaning-failed-runs { display: grid; gap: 12px; }.cleaning-failed-run { padding: 0 14px 14px; background: #fff; border: 1px solid #d9a6a1; border-radius: 10px; }.cleaning-failed-run > summary { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; color: #862f29; cursor: pointer; font-size: .76rem; }.cleaning-failed-run > summary span { color: var(--muted); font-size: .68rem; }.cleaning-failed-run > .cleaning-history__entries { margin-top: 12px; }
.cleaning-history__empty, .cleaning-history__error { color: var(--muted); text-align: center; }
.paper-pdf { display: grid; gap: 6px; }.paper-pdf--available { grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: 0; overflow: hidden; border: 1px solid var(--forest); border-radius: 8px; }.paper-pdf__open, .paper-pdf__upload { display: flex !important; align-items: center; justify-content: center; min-height: 32px; padding: 6px 7px; border-radius: 8px; text-align: center; font-size: .68rem; font-weight: 800; white-space: nowrap; cursor: pointer; }.paper-pdf__open { color: white; background: var(--forest); text-decoration: none; }.paper-pdf__upload { color: var(--forest) !important; background: white; border: 1px solid var(--forest); text-transform: none !important; letter-spacing: normal !important; }.paper-pdf--available .paper-pdf__open, .paper-pdf--available .paper-pdf__upload { border: 0; border-radius: 0; }.paper-pdf--available .paper-pdf__upload { border-left: 1px solid var(--forest); }.paper-pdf__upload:hover { background: var(--forest-light); }.paper-pdf__upload.is-uploading { opacity: .55; cursor: wait; pointer-events: none; }.paper-pdf__upload.is-uploading::after { content: "…"; }.paper-pdf__upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tei-acquire-button { min-height: 32px; padding: 6px 8px; color: #245184; background: #eef5fb; border: 1px solid #9ebbd5; border-radius: 8px; cursor: pointer; font-size: .68rem; font-weight: 800; }.tei-acquire-button:hover:not(:disabled) { background: #dce9f5; }.tei-acquire-button:disabled { opacity: .62; cursor: default; }
.status { align-self: start; padding: 5px 8px; border-radius: 6px; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }.status--unscreened { color: #6c685d; background: #ece9df; }.status--relevant { color: #17603f; background: #d9f0e3; }.status--exclude { color: #8c3028; background: #f4dedb; }.status--on-topic { color: #245184; background: #dce9f5; }.status--suggested { color: #7c5313; background: #f5e7c8; }
.graph-section { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 50px 0 0; }.graph-section > .section-heading { flex: 0 0 auto; }.graph-legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .75rem; }.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }.graph-dot { width: 9px; height: 9px; border-radius: 50%; }.graph-dot--on-topic { background: #4e83b5; }.graph-dot--relevant { background: #2f8a5c; }.graph-dot--suggested { background: var(--gold); }.graph-canvas { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background-color: var(--surface); background-image: radial-gradient(#d6d8d0 1px, transparent 1px); background-size: 22px 22px; box-shadow: inset 0 0 45px rgba(23,33,29,.04); }.graph-canvas svg { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; user-select: none; }.graph-canvas svg.is-panning { cursor: grabbing; }.graph-controls { position: absolute; top: 12px; right: 12px; display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,253,247,.92); box-shadow: 0 4px 14px rgba(23,33,29,.12); }.graph-controls button { min-width: 34px; height: 34px; padding: 0 9px; border: 0; border-right: 1px solid var(--line); color: var(--forest); background: transparent; cursor: pointer; font-weight: 800; }.graph-controls button:last-child { border-right: 0; }.graph-controls button:hover { background: var(--forest-light); }.graph-help { position: absolute; left: 12px; bottom: 10px; padding: 5px 8px; border-radius: 6px; color: var(--muted); background: rgba(255,253,247,.88); font-size: .68rem; pointer-events: none; }.graph-edge { stroke: #abb5af; stroke-width: 1.5; opacity: .65; }.graph-node circle { stroke: white; stroke-width: 4; filter: drop-shadow(0 4px 5px rgba(23,33,29,.18)); }.graph-node--on-topic circle { fill: #4e83b5; }.graph-node--relevant circle { fill: #2f8a5c; }.graph-node--suggested circle { fill: var(--gold); }.graph-node text { fill: var(--ink); font-size: 12px; text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.spinner { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 60vh; color: var(--muted); }.spinner span { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--forest); border-radius: 50%; animation: spin .7s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.toasts { position: fixed; right: 24px; bottom: 24px; display: grid; gap: 8px; z-index: 10; }.toast { max-width: 380px; padding: 14px 18px; color: white; border-radius: 10px; box-shadow: var(--shadow); }.toast--error { background: #8c3028; }
@media (max-width: 1100px) { .workspace { display: flex; flex-direction: column; }.sidebar { flex: 0 1 36vh; max-height: 36vh; border-right: 0; border-bottom: 1px solid var(--line); }.workspace__content { flex: 1 1 auto; }.back-link { margin-bottom: 30px; }.search-panel { grid-template-columns: 1fr; gap: 25px; }.header-note { display: none; }.topic-filter__panel { width: min(680px, calc(100vw - max(10vw,76px) - 10px)); } }
@media (max-width: 760px) { .boolean-search-layout { grid-template-columns: 1fr; }.boolean-search-layout .boolean-query { min-height: 220px; }.search-filters__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.filter-checks { grid-template-columns: 1fr; gap: 8px; } }
@media (max-width: 600px) { .hero { padding-top: 58px; }.create-form, .search-form { flex-direction: column; }.create-form .button { width: 100%; }.workspace__content { padding: 20px 18px 0; }.search-panel:not(.search-panel--expanded) { padding: 24px 18px; }.openalex-search__intro, .boolean-builder { padding: 22px 18px; }.search-filters summary, .openalex-search__submit { padding-inline: 18px; }.search-filters__grid { padding-inline: 18px; }.filter-note { padding-inline: 18px; }.openalex-search__submit { align-items: flex-start; flex-direction: column; }.openalex-search__submit .button { width: 100%; }.paper-card { grid-template-columns: 1fr; }.paper-card__actions { padding: 18px 0 0; border: 0; border-top: 1px solid var(--line); }.section-heading--papers { align-items: start; flex-direction: column; }.review-grid { grid-template-columns: 1fr; }.screening-filters, .screening-filters__main { align-items: flex-start; flex-direction: column; }.screening-filters__actions { width: 100%; flex-direction: column; }.screening-queue-button, .llm-batch-button { width: 100%; max-width: none; }.topic-filter__panel { width: calc(100vw - 64px); }.topic-filter__option { grid-template-columns: 1fr; }.topic-filter__choices button { flex: 1; justify-content: center; }.screening-sheet__body { padding: 25px 22px; }.screening-decisions__secondary { flex-wrap: wrap; } }
@media (max-width: 600px) { .paper-edit-form__header, .paper-edit-form__body, .paper-edit-form__actions { padding-inline: 18px; }.paper-edit-pdf { grid-template-columns: 1fr; }.paper-edit-pdf .paper-pdf__open, .paper-edit-pdf__choose { width: 100%; } }
.graph-node text, .graph-node.is-hovered text { stroke: var(--surface); stroke-width: 1px; paint-order: stroke; }
.review-workspace { display: flex; flex-direction: column; height: calc(100vh - 76px); min-height: 0; overflow: hidden; }
.review-navigation { display: flex; flex: 0 0 auto; align-items: center; gap: 22px; min-width: 0; padding: 10px max(3vw,24px); border-bottom: 1px solid var(--line); background: rgba(255,253,247,.72); overflow-x: auto; }
.review-navigation__back { flex: 0 0 auto; padding: 9px 11px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .8rem; font-weight: 750; }.review-navigation__back:hover { color: var(--forest); background: var(--forest-light); }
.review-navigation .view-tabs { flex: 0 0 auto; }
.review-workspace > .workspace { flex: 1 1 auto; height: auto; }
.active-review-sidebar { padding-top: 34px; }
.review-workspace .workspace__content { padding-top: 30px; }
.review-workspace .discovery-view { margin-top: 0; }
.graph-workspace { display: grid; grid-template-columns: minmax(190px,240px) minmax(0,1fr) minmax(190px,240px); flex: 1 1 auto; min-width: 0; min-height: 0; overflow: hidden; }
.graph-workspace .graph-section { min-width: 0; padding: 28px 24px 0; }
.graph-sidebar { min-width: 0; min-height: 0; overflow-y: auto; padding: 28px 18px; background: rgba(255,253,247,.42); }.graph-sidebar--citations { border-right: 1px solid var(--line); }.graph-sidebar--cited-by { border-left: 1px solid var(--line); }
.graph-relations > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }.graph-relations > header .eyebrow { margin: 0; }.graph-relations__content { min-width: 0; }.graph-relations__focus { margin: 16px 0 12px; overflow: hidden; color: var(--forest); font: 600 .9rem/1.35 Georgia,serif; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }.graph-relations__list { display: grid; gap: 7px; }.graph-relations__list button { min-width: 0; padding: 10px; text-align: left; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }.graph-relations__list button:hover, .graph-relations__list button:focus-visible { border-color: #9ac6ac; background: var(--forest-light); outline: none; }.graph-relations__list strong, .graph-relations__list span { display: block; }.graph-relations__list strong { overflow: hidden; font-size: .73rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }.graph-relations__list span { margin-top: 6px; color: var(--muted); font-size: .62rem; text-transform: uppercase; }.graph-relations__empty { margin: 18px 2px; color: var(--muted); font-size: .75rem; line-height: 1.5; }
.graph-node { cursor: pointer; }.graph-node:focus { outline: none; }.graph-node.is-selected circle { stroke: var(--forest); stroke-width: 6; }.graph-node.is-selected text { fill: var(--forest); font-weight: 900; }
@media (max-width: 1100px) { .graph-workspace { grid-template-columns: minmax(160px,200px) minmax(280px,1fr) minmax(160px,200px); }.graph-sidebar { padding-inline: 13px; } }
@media (max-width: 600px) { .review-navigation { gap: 8px; padding-inline: 10px; }.graph-workspace { grid-template-columns: 150px minmax(260px,1fr) 150px; }.graph-workspace .graph-section { padding-inline: 12px; }.graph-sidebar { padding: 20px 10px; } }

.graph-selection { position: absolute; z-index: 4; right: 18px; bottom: 18px; left: 18px; max-height: 46%; pointer-events: none; }
.graph-selection:empty { display: none; }
.graph-selection:not(:empty) ~ .graph-help { display: none; }
.graph-paper-overlay { position: relative; max-width: 900px; margin: 0 auto; pointer-events: auto; }
.graph-paper-overlay > .paper-card { max-height: 100%; overflow-y: auto; border-color: #aabdb4; box-shadow: 0 16px 42px rgba(23,33,29,.24); }
.graph-paper-overlay__close { position: absolute; z-index: 2; top: -11px; right: -11px; display: grid; place-items: center; width: 29px; height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); box-shadow: 0 3px 10px rgba(23,33,29,.16); cursor: pointer; font-size: 1.2rem; line-height: 1; }
.graph-paper-overlay__close:hover { color: var(--forest); }

.search-history-menu { position: relative; }
.search-history-menu > summary { color: var(--muted); list-style: none; }
.search-history-menu > summary::-webkit-details-marker { display: none; }
.search-history-menu > summary:hover, .search-history-menu[open] > summary { color: var(--forest); background: var(--forest-light); }
.search-history-menu__items { position: absolute; z-index: 12; top: calc(100% + 4px); right: 0; display: grid; width: 190px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 32px rgba(23,33,29,.2); }
.search-history-menu__item { display: flex; align-items: center; min-width: 0; gap: 9px; padding: 9px 10px; color: var(--ink); background: transparent; border: 0; border-radius: 7px; cursor: pointer; text-align: left; font: inherit; font-size: .75rem; }
.search-history-menu__item:hover, .search-history-menu__item:focus-visible { background: var(--forest-light); outline: none; }
.search-history-menu__item:disabled { color: #a9afa9; cursor: default; background: transparent; }
.search-history-menu__item svg { flex: 0 0 auto; width: 15px; height: 15px; }
.search-history-menu__item--danger { color: #8c3028; }
.search-history-menu__item--danger:hover, .search-history-menu__item--danger:focus-visible { background: #f4dedb; }
.search-history-menu__item.is-loading svg { animation: spin .7s linear infinite; }

.request-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 28px 90px rgba(15,28,22,.3); }
.request-dialog::backdrop { background: rgba(15,28,22,.56); backdrop-filter: blur(4px); }
.request-dialog__sheet { display: grid; grid-template-rows: auto minmax(0,1fr); max-height: calc(100vh - 32px); }
.request-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.request-dialog__header h2 { margin: 2px 0 0; font: 600 1.45rem Georgia,serif; }
.request-dialog__body { min-height: 0; overflow-y: auto; padding: 25px 26px 30px; }
.request-status { display: inline-flex; padding: 5px 8px; border-radius: 6px; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.request-status--succeeded { color: #17603f; background: #d9f0e3; }
.request-status--failed { color: #8c3028; background: #f4dedb; }
.request-status--pending, .request-status--unknown { color: #7c5313; background: #f5e7c8; }
.request-dialog__summary { margin: 14px 0 20px; }
.request-dialog__summary strong { display: block; font-size: .9rem; }
.request-dialog__summary p { margin: 8px 0 0; padding: 10px 12px; overflow-wrap: anywhere; border-radius: 8px; color: var(--forest); background: #f1f3ec; font: 600 .85rem/1.45 ui-monospace,Consolas,monospace; }
.request-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.request-details > div { min-width: 0; padding: 11px 12px; background: var(--surface); }
.request-details dt { color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.request-details dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: .78rem; }
.request-error, .request-url { margin-top: 18px; }
.request-error h3, .request-url h3 { margin: 0 0 7px; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; }
.request-error pre, .request-url pre { max-height: 220px; margin: 0; padding: 12px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #dfaaa4; border-radius: 8px; color: #742b25; background: #fff7f5; font: .72rem/1.5 ui-monospace,Consolas,monospace; }
.request-url a { display: block; overflow-wrap: anywhere; color: var(--forest); font-size: .72rem; }
.filter-save-status { color: var(--forest); font-weight: 800; }

@media (max-width: 600px) { .request-details { grid-template-columns: 1fr; }.request-dialog__header, .request-dialog__body { padding-inline: 18px; } }

/* Irrelevant papers are on-topic but outside the review's inclusion scope. */
.decision-button--irrelevant { color: #6b557d; }
.filter-chip--irrelevant:has(input:checked) { color: #6b557d; border-color: #baa8c5; }
.status--irrelevant { color: #6b557d; background: #eee5f2; }
.graph-dot--irrelevant { background: #806990; }
.graph-node--irrelevant circle { fill: #806990; }

.llm-apply-button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 34px; padding: 6px 10px; color: #245184; background: #eef5fb; border: 1px solid #9ebbd5; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 800; }
.llm-apply-button:hover:not(:disabled) { background: #dce9f5; }.llm-apply-button:disabled { opacity: .45; cursor: default; }
.toast--success { background: #17603f; }
@media (max-width: 600px) { .llm-apply-button { width: 100%; } }

.pdf-batch-fetch-button { display: inline-flex; align-items: center; justify-content: center; min-width: 0; min-height: 34px; padding: 6px 10px; color: #17603f; background: #edf5f1; border: 1px solid #8fbea3; border-radius: 8px; cursor: pointer; font-size: .72rem; font-weight: 800; }
.pdf-batch-fetch-button:hover:not(:disabled) { background: #d9f0e3; }.pdf-batch-fetch-button:disabled { opacity: .45; cursor: default; }
@media (max-width: 600px) { .pdf-batch-fetch-button { width: 100%; } }

.paper-edit-pdf { grid-template-columns: minmax(0,1fr) auto; }
.paper-edit-pdf__actions { display: flex; align-items: stretch; gap: 7px; }
.paper-edit-pdf__view:empty { display: none; }
.paper-edit-pdf__auto { min-height: 32px; padding: 6px 9px; color: #245184; background: #eef5fb; border: 1px solid #9ebbd5; border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.paper-edit-pdf__auto:hover:not(:disabled) { background: #dce9f5; }.paper-edit-pdf__auto:disabled { opacity: .58; cursor: wait; }
.paper-edit-provider { display: grid; gap: 9px; padding: 14px; background: #faf8f1; border: 1px solid var(--line); border-radius: 10px; }
.paper-edit-provider select { width: min(100%, 320px); min-height: 38px; padding: 7px 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.paper-edit-provider select:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }
.paper-edit-provider__note { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.paper-edit-provider__note.is-online { padding: 9px 11px; color: #7a351c; background: #fff1e8; border: 1px solid #e8bba6; border-radius: 8px; }
.paper-edit-document__rerun { min-height: 32px; padding: 6px 9px; color: #704f19; background: #fff7df; border: 1px solid #d6b86e; border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.paper-edit-document__rerun:hover:not(:disabled) { background: #f7e8bc; }.paper-edit-document__rerun:disabled { opacity: .58; cursor: wait; }
.paper-edit-document__history { min-height: 32px; padding: 6px 9px; color: #862f29; background: #fdf0ee; border: 1px solid #d9a6a1; border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 800; white-space: nowrap; }.paper-edit-document__history:hover { background: #f8dfdc; }
@media (max-width: 600px) { .paper-edit-pdf__actions { display: grid; grid-template-columns: 1fr; }.paper-edit-pdf__auto, .paper-edit-document__rerun, .paper-edit-document__history { width: 100%; } }

.library-select-filter { display: inline-flex; align-items: center; gap: 6px; padding-left: 4px; color: var(--muted); font-size: .68rem; font-weight: 800; }
.library-select-filter > span { text-transform: uppercase; letter-spacing: .06em; }.library-select-filter select { min-height: 32px; padding: 5px 26px 5px 8px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .7rem; }.library-select-filter select:focus { border-color: var(--forest); outline: 2px solid rgba(23,77,58,.12); }

/* Authentication and workspace access */
.header-user { justify-self: end; display: flex; align-items: center; gap: 11px; min-width: 0; }
.header-user__account { display: grid; justify-items: end; min-width: 0; color: var(--ink); text-decoration: none; line-height: 1.15; }
.header-user__account strong { max-width: 180px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; }
.header-user__account span { color: var(--muted); font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.header-user__account:hover strong, .header-user__account.is-active strong { color: var(--forest); }
.header-user__logout { padding: 7px 9px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: .7rem; font-weight: 800; }
.header-user__logout:hover { color: #8c3028; background: #f4dedb; border-color: #e3bbb6; }

.auth-shell { display: grid; min-height: 100vh; padding: clamp(24px,6vw,72px); background:
  radial-gradient(circle at 15% 20%, rgba(217,235,226,.9), transparent 38%),
  radial-gradient(circle at 88% 78%, rgba(223,159,56,.2), transparent 32%), var(--paper); }
.auth-shell--loading { place-items: center; }
.auth-page { display: grid; grid-template-columns: minmax(280px,1fr) minmax(340px,470px); align-items: center; width: min(1060px,100%); margin: auto; gap: clamp(45px,8vw,110px); }
.auth-introduction { max-width: 570px; }
.auth-brand { width: max-content; margin-bottom: clamp(55px,9vh,100px); }
.auth-introduction h1 { max-width: 600px; margin: 0; font: 500 clamp(3.2rem,7vw,6.6rem)/.92 Georgia,serif; letter-spacing: -.055em; }
.auth-introduction > p:last-child { max-width: 540px; margin: 28px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.auth-card, .account-card, .access-panel, .invite-secret { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-card { padding: 8px 30px 30px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 0 -22px 26px; padding: 7px; border-bottom: 1px solid var(--line); }
.auth-tabs button { padding: 11px; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-weight: 800; }
.auth-tabs button:hover { color: var(--forest); background: #f0f3ed; }
.auth-tabs button.is-active { color: white; background: var(--forest); }
.auth-form { display: grid; gap: 17px; }
.auth-form .field { gap: 7px; }
.auth-form input, .auth-form select { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink); background: #faf8f1; border: 1px solid var(--line); border-radius: 9px; outline: none; }
.auth-form input:focus, .auth-form select:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23,77,58,.1); }
.field-help { color: var(--muted); font-size: .67rem; line-height: 1.4; }
.auth-submit { width: 100%; margin-top: 5px; }

.page-heading { padding: 64px 0 35px; border-bottom: 1px solid var(--line); }
.page-heading h1 { margin: 0; font: 500 clamp(2.5rem,5vw,4.7rem)/1 Georgia,serif; letter-spacing: -.04em; }
.page-heading > p:last-child { margin: 12px 0 0; color: var(--muted); }
.account-page { max-width: 760px; padding-bottom: 80px; }
.account-card { margin-top: 34px; padding: clamp(24px,5vw,42px); }
.account-card h2 { margin: 0; font: 500 1.8rem Georgia,serif; }
.account-card > p { margin: 8px 0 25px; color: var(--muted); line-height: 1.5; }

.access-page { padding-bottom: 80px; }
.access-grid { display: grid; grid-template-columns: minmax(260px,.65fr) minmax(480px,1.35fr); align-items: start; gap: 18px; margin-top: 34px; }
.access-panel { min-width: 0; padding: 25px; }
.access-panel--invites { margin-top: 18px; }
.access-list { display: grid; gap: 8px; }
.access-row { display: grid; grid-template-columns: minmax(220px,1fr) minmax(120px,.35fr) minmax(120px,.35fr); align-items: center; gap: 12px; padding: 14px; background: #faf8f1; border: 1px solid var(--line); border-radius: 11px; }
.access-row.is-disabled { opacity: .64; }
.access-row__identity { display: grid; min-width: 0; gap: 3px; }
.access-row__identity strong, .access-row__identity span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.access-row__identity strong { font-size: .86rem; }
.access-row__identity strong small { margin-left: 7px; padding: 2px 5px; color: var(--forest); background: var(--forest-light); border-radius: 999px; font-size: .55rem; text-transform: uppercase; }
.access-row__identity span, .access-row__identity small { color: var(--muted); font-size: .69rem; }
.access-row > label { display: grid; gap: 4px; color: var(--muted); font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.access-row select { width: 100%; min-height: 34px; padding: 5px 7px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 7px; font-size: .7rem; }
.invite-row { grid-template-columns: minmax(220px,1fr) minmax(200px,.7fr) auto; }
.invite-row__creator { color: var(--muted); font-size: .7rem; }
.invite-row .button { min-height: 34px; padding-inline: 12px; font-size: .7rem; }
.invite-row--revoked, .invite-row--expired { opacity: .62; }
.invite-secret { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(280px,1.2fr) auto; align-items: center; gap: 20px; margin-top: 28px; padding: 20px 24px; border-color: #98bea9; background: #f4faf6; }
.invite-secret p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }
.invite-secret code { min-width: 0; padding: 10px 12px; overflow-wrap: anywhere; color: var(--forest); background: white; border: 1px solid #b7d1c2; border-radius: 8px; font-size: .75rem; }
.access-empty { color: var(--muted); }
.legacy-review-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 18px 22px; color: #704f19; background: #fff7df; border: 1px solid #d6b86e; border-radius: 13px; }
.legacy-review-notice p { margin: 4px 0 0; color: #786744; font-size: .74rem; line-height: 1.45; }
.legacy-review-notice .button { flex: 0 0 auto; }

@media (max-width: 1000px) {
  .header-user__account { display: none; }
  .auth-page { grid-template-columns: 1fr; max-width: 560px; }
  .auth-introduction { text-align: center; }
  .auth-brand { margin: 0 auto 50px; }
  .auth-introduction h1 { font-size: clamp(3rem,12vw,5.2rem); }
  .auth-introduction > p:last-child { margin-inline: auto; }
  .access-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-header { grid-template-columns: auto minmax(0,1fr) auto; padding-inline: 12px; }
  .site-nav { justify-self: center; max-width: 100%; overflow-x: auto; }
  .site-nav a { padding-inline: 10px; }
  .header-user__logout { font-size: 0; }
  .header-user__logout::after { content: "Exit"; font-size: .68rem; }
  .auth-shell { padding: 24px 18px 42px; }
  .auth-introduction > p:last-child { font-size: .9rem; }
  .auth-card { padding-inline: 22px; }
  .invite-secret { grid-template-columns: 1fr; }
  .legacy-review-notice { align-items: stretch; flex-direction: column; }
  .access-row, .invite-row { grid-template-columns: 1fr; align-items: stretch; }
  .page-heading { padding-top: 42px; }
}
.library-select-filter--type select { max-width: 190px; }

.paper-database-page { padding: 55px 0 80px; }.paper-database-header { max-width: 900px; }.paper-database-header .back-link { margin-bottom: 36px; }.paper-database-header h1 { margin: 0; font: 500 clamp(2.8rem,6vw,5rem)/1 Georgia,serif; letter-spacing: -.045em; }.paper-database-header > p:not(.eyebrow) { max-width: 680px; margin: 18px 0 26px; color: var(--muted); line-height: 1.6; }
.database-search-form { display: flex; max-width: 850px; gap: 9px; padding: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }.database-search-input { display: flex; align-items: center; flex: 1; min-width: 0; gap: 9px; padding: 0 9px; color: var(--muted); }.database-search-input svg { flex: 0 0 auto; width: 18px; }.database-search-input input { min-width: 0; }
.paper-database-results { margin-top: 50px; }.paper-database-results > .section-heading { align-items: end; }.paper-database-result-actions { display: flex; align-items: center; gap: 10px; }.database-tei-batch-button { min-height: 34px; padding: 7px 11px; font-size: .72rem; white-space: nowrap; }.database-filter-summary { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }.database-paper-filters { margin-top: 4px; }.database-paper-list { display: grid; gap: 12px; transition: opacity .15s ease; }.paper-database-results.is-filtering .database-paper-list { opacity: .45; }.database-paper-card { grid-template-columns: minmax(0,1fr) 170px; }.database-paper-card__aside { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-left: 20px; border-left: 1px solid var(--line); }.database-paper-card__action-header { display: flex; align-items: center; gap: 7px; }.database-paper-card__reviews { flex: 1 1 auto; padding: 6px 8px; color: var(--forest); background: var(--forest-light); border-radius: 7px; text-align: center; font-size: .68rem; font-weight: 800; }.database-paper-card__action-header .paper-settings-button { flex: 0 0 30px; }.database-paper-card__source { padding: 7px 8px; color: var(--forest); border: 1px solid var(--forest); border-radius: 8px; text-align: center; text-decoration: none; font-size: .68rem; font-weight: 800; }.database-paper-card__source:hover { background: var(--forest-light); }
.database-document-batch-button { min-height: 34px; padding: 7px 11px; font-size: .72rem; white-space: nowrap; }
@media (max-width: 600px) { .database-search-form { flex-direction: column; }.database-search-form .button { width: 100%; }.database-search-input { min-height: 42px; }.paper-database-results > .section-heading { align-items: flex-start; flex-direction: column; }.paper-database-result-actions { width: 100%; }.database-tei-batch-button { flex: 1; }.database-paper-card { grid-template-columns: 1fr; }.database-paper-card__aside { padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); } }
@media (max-width: 600px) { .paper-database-result-actions { flex-wrap: wrap; }.database-document-batch-button { flex: 1 1 calc(50% - 5px); } }

/* The TEI reader is a self-contained document surface inspired by Firefox's PDF viewer. */
.tei-viewer { position: fixed; inset: 0; z-index: 1000; min-width: 320px; color: #1f2328; background: #52525e; overflow: hidden; }
.tei-viewer__frame { display: grid; grid-template-rows: 50px minmax(0,1fr); width: 100%; height: 100dvh; }
.tei-viewer__toolbar { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,2fr) minmax(180px,1fr); align-items: center; gap: 12px; min-width: 0; height: 50px; padding: 6px 10px; color: #f2f2f4; background: #2b2a33; border-bottom: 1px solid #18171d; box-shadow: 0 1px 6px rgba(0,0,0,.38); }
.tei-toolbar-group { display: flex; align-items: center; gap: 4px; min-width: 0; }
.tei-toolbar-group--right { justify-content: flex-end; }
.tei-toolbar-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 34px; height: 34px; padding: 0 10px; color: #f2f2f4; background: transparent; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.tei-toolbar-button:hover, .tei-toolbar-button:focus-visible { background: #4a4855; outline: none; }
.tei-toolbar-button:focus-visible { box-shadow: inset 0 0 0 2px #75baff; }
.tei-toolbar-button--icon { width: 34px; padding: 0; font-size: 1.15rem; }
.tei-toolbar-button--scale { width: 54px; padding: 0; color: #dedde3; font-size: .7rem; }
.tei-toolbar-button--split { padding-inline: 9px; }
.tei-toolbar-button--split.is-active, .tei-toolbar-button--compare.is-active { color: white; background: #075fbb; }
.tei-toolbar-button:disabled { opacity: .4; cursor: default; }
.tei-split-icon { font-size: 1rem; line-height: 1; transform: rotate(90deg); }
.tei-compare-icon { font-size: 1.05rem; line-height: 1; }
.tei-toolbar-button--raw { margin-left: 5px; padding-inline: 11px; border-left: 1px solid #5b5965; border-radius: 0 4px 4px 0; }
.tei-viewer__document-title { min-width: 0; text-align: center; line-height: 1.12; }
.tei-viewer__document-title strong, .tei-viewer__document-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tei-viewer__document-title strong { font-size: .76rem; }
.tei-viewer__document-title span { margin-top: 3px; color: #aaa8b2; font-size: .62rem; font-weight: 600; }
.tei-viewer__workspace { display: grid; grid-template-columns: 310px minmax(0,1fr); min-width: 0; min-height: 0; overflow: hidden; transition: grid-template-columns .16s ease; }
.tei-viewer__workspace[hidden] { display: none; }
.tei-viewer__workspace.is-sidebar-closed { grid-template-columns: 0 minmax(0,1fr); }
.tei-viewer__sidebar { min-width: 0; min-height: 0; overflow: hidden; color: #dedde3; background: #383740; border-right: 1px solid #1e1d24; box-shadow: 2px 0 7px rgba(0,0,0,.24); }
.is-sidebar-closed .tei-viewer__sidebar { visibility: hidden; }
.tei-sidebar-tabs { display: grid; grid-template-columns: 1fr 1fr; height: 43px; border-bottom: 1px solid #24232a; }
.tei-sidebar-tab { position: relative; padding: 0 8px; color: #bdbbc5; background: transparent; border: 0; cursor: pointer; font-size: .7rem; font-weight: 750; }
.tei-sidebar-tab:hover { color: white; background: rgba(255,255,255,.04); }
.tei-sidebar-tab.is-active { color: white; }
.tei-sidebar-tab.is-active::after { content: ""; position: absolute; right: 18px; bottom: 0; left: 18px; height: 2px; background: #45a1ff; }
.tei-sidebar__content { height: calc(100% - 43px); min-height: 0; overflow: hidden; }
.tei-sidebar__pane { height: 100%; overflow-y: auto; scrollbar-color: #73717d transparent; scrollbar-width: thin; }
.tei-sidebar__pane[hidden] { display: none; }
.tei-sidebar__empty { margin: 0; padding: 28px 22px; color: #aaa8b2; font-size: .76rem; line-height: 1.55; }
.tei-outline { display: grid; padding: 10px 0 28px; }
.tei-outline__entry { width: 100%; padding: 8px 14px 8px calc(15px + var(--outline-depth) * 15px); overflow: hidden; color: #dedde3; background: transparent; border: 0; border-left: 3px solid transparent; cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: .73rem; line-height: 1.25; }
.tei-outline__entry:hover, .tei-outline__entry:focus-visible { color: white; background: #4a4855; border-left-color: #45a1ff; outline: none; }
.tei-citation-search { position: sticky; z-index: 1; top: 0; display: block; width: calc(100% - 22px); height: 34px; margin: 11px; padding: 0 11px; color: white; background: #2b2a33; border: 1px solid #65636e; border-radius: 4px; outline: none; font-size: .73rem; }
.tei-citation-search:focus { border-color: #45a1ff; box-shadow: 0 0 0 1px #45a1ff; }
.tei-citation-list { padding: 0 8px 28px; }
.tei-citation { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 7px; padding: 10px 7px; border-left: 3px solid transparent; border-bottom: 1px solid #4a4855; cursor: pointer; }
.tei-citation:hover, .tei-citation:focus-visible { background: #42414b; outline: none; }
.tei-citation.is-selected { background: #454c58; border-left-color: #45a1ff; }
.tei-citation__number { color: #8fc7ff; font-size: .68rem; font-weight: 800; text-align: right; }
.tei-citation__content { display: grid; gap: 4px; min-width: 0; }
.tei-citation__content strong { color: #f0eff3; font-size: .7rem; line-height: 1.35; }
.tei-citation__content span, .tei-citation__content a { color: #aaa8b2; font-size: .64rem; line-height: 1.35; }
.tei-citation__content a { color: #8fc7ff; overflow-wrap: anywhere; }
.tei-viewer__reading-area { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; min-height: 0; overflow: hidden; }
.tei-viewer__reading-area.is-split { grid-template-columns: minmax(320px,1fr) minmax(320px,1fr); }
.tei-viewer__raw-pane, .tei-viewer__readable-pane { min-width: 0; min-height: 0; overflow: hidden; }
.tei-viewer__raw-pane { display: grid; grid-template-rows: 37px minmax(0,1fr); color: #e8e8ec; background: #1f1f24; border-right: 1px solid #17171b; }
.tei-viewer__raw-pane[hidden] { display: none; }
.tei-viewer__readable-pane { display: grid; grid-template-rows: minmax(0,1fr); }
.is-split .tei-viewer__readable-pane { grid-template-rows: 37px minmax(0,1fr); }
.tei-view-pane-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 0 13px; color: #dedde3; background: #323139; border-bottom: 1px solid #19191e; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.tei-view-pane-header strong { font-size: .69rem; }
.tei-view-pane-header span { overflow: hidden; color: #96949f; text-overflow: ellipsis; white-space: nowrap; font-size: .61rem; }
.tei-view-pane-header--readable { display: none; }
.is-split .tei-view-pane-header--readable { display: flex; }
.tei-xml-tree { min-width: 0; min-height: 0; height: 100%; padding: 12px 12px 50px; overflow: auto; color: #d9e1ea; background: #1f1f24; outline: none; scrollbar-color: #696773 #29282f; scrollbar-width: thin; font: 12px/1.55 Consolas, "Cascadia Mono", "Courier New", monospace; }
.tei-xml-tree__declaration { width: max-content; min-width: 100%; padding: 2px 5px 6px 20px; color: #8e9aa8; white-space: nowrap; }
.tei-xml-node { width: 100%; min-width: 0; }
.tei-xml-node__row { display: flex; align-items: flex-start; width: 100%; min-width: 0; min-height: 22px; padding: 2px 5px; border-radius: 3px; white-space: nowrap; }
.tei-xml-node__row:hover { background: #2c3037; }
.tei-xml-node__row--value { color: #d9e1ea; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-xml-node__row--closing { margin-left: -18px; }
.tei-xml-node__children { width: calc(100% - 18px); margin-left: 18px; border-left: 1px solid #363b43; }
.tei-xml-node__children[hidden] { display: none; }
.tei-xml-node__disclosure { display: grid; place-items: center; width: 16px; height: 18px; flex: 0 0 16px; margin: 0 3px 0 0; padding: 0; color: #aeb5bf; background: transparent; border: 0; border-radius: 3px; cursor: pointer; font: inherit; transition: transform .1s ease; }
.tei-xml-node__disclosure:hover, .tei-xml-node__disclosure:focus-visible { color: white; background: #454b55; outline: none; }
.tei-xml-node__disclosure.is-expanded { transform: rotate(90deg); }
.tei-xml-node__disclosure-spacer { width: 19px; flex: 0 0 19px; }
.tei-xml-token--punctuation { color: #9aa5b1; }
.tei-xml-token--tag { color: #62b7ff; }
.tei-xml-token--attribute { color: #c792ea; }
.tei-xml-token--value { color: #ecc48d; }
.tei-xml-token--text { min-width: 0; color: #d7dde5; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-xml-token--comment { min-width: 0; color: #78b477; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-xml-token--cdata { min-width: 0; color: #89ddff; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-xml-node__summary { margin-left: 8px; max-width: 440px; overflow: hidden; color: #7e8996; text-overflow: ellipsis; font-style: italic; }
.tei-xml-node[aria-expanded="true"] > .tei-xml-node__row > .tei-xml-node__summary { display: none; }
.tei-viewer__stage { min-width: 0; min-height: 0; overflow: auto; padding: 38px max(30px,5vw) 70px; background: #52525e; scrollbar-color: #898791 #3f3e48; scrollbar-width: thin; }
.is-split .tei-viewer__stage { padding-inline: 30px; }
.tei-page { --tei-scale: 1; width: calc(820px * var(--tei-scale)); min-height: calc(1060px * var(--tei-scale)); margin: 0 auto; padding: calc(76px * var(--tei-scale)) calc(82px * var(--tei-scale)) calc(96px * var(--tei-scale)); color: #202124; background: white; box-shadow: 0 2px 12px rgba(0,0,0,.5); font: calc(15px * var(--tei-scale))/1.72 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.tei-document-header { margin-bottom: calc(52px * var(--tei-scale)); padding-bottom: calc(25px * var(--tei-scale)); border-bottom: 1px solid #d8d9dc; }
.tei-document-header__type { margin: 0 0 9px; color: #65676d; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .66em; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.tei-document-header h1 { margin: 0; font-size: 2.08em; line-height: 1.18; letter-spacing: -.025em; }
.tei-document-header__authors { margin: 17px 0 0; color: #555960; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .79em; line-height: 1.5; }
.tei-document-section { margin: 0 0 1.4em; }
.tei-document-section .tei-document-section { margin-top: 1.5em; }
.tei-document-section h2, .tei-document-section h3, .tei-document-section h4, .tei-document-section h5, .tei-document-section h6 { scroll-margin-top: 22px; color: #202124; line-height: 1.25; }
.tei-document-section h2 { margin: 1.9em 0 .65em; font-size: 1.58em; }
.tei-document-section h3 { margin: 1.65em 0 .55em; font-size: 1.28em; }
.tei-document-section h4, .tei-document-section h5, .tei-document-section h6 { margin: 1.45em 0 .5em; font-size: 1.08em; }
.tei-document-section h2, .tei-document-section h3, .tei-document-section h4, .tei-document-section h5, .tei-document-section h6 { display: flex; align-items: baseline; gap: .42em; }
.tei-heading-number { flex: 0 0 auto; color: #656970; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .68em; font-weight: 750; letter-spacing: .01em; }
.tei-heading-title { min-width: 0; }
.tei-document-section h2:focus, .tei-document-section h3:focus, .tei-document-section h4:focus, .tei-document-section h5:focus, .tei-document-section h6:focus { outline: 2px solid #45a1ff; outline-offset: 5px; }
.tei-page p { margin: 0 0 1em; }
.tei-page ul, .tei-page ol { margin: .5em 0 1.2em; padding-left: 2em; }
.tei-page blockquote { margin: 1.2em 1.5em; padding-left: 1em; color: #4f5359; border-left: 3px solid #c9cbd0; }
.tei-inline-citation { display: inline; margin: 0 .08em; padding: 0 .12em; color: #075fbb; background: transparent; border: 0; border-radius: 2px; cursor: pointer; font: inherit; line-height: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tei-inline-citation:hover, .tei-inline-citation.is-selected { color: #003eaa; background: #d9ebff; outline: 1px solid #75baff; }
.tei-inline-formula, .tei-formula { font-family: "Cambria Math", Cambria, serif; }
.tei-formula { margin: 1.2em 0; padding: .75em 1em; overflow-x: auto; text-align: center; background: #f7f7f8; border: 1px solid #e2e3e5; }
.tei-note { margin: 1em 0; padding: .85em 1em; color: #52555a; background: #f6f6f7; border-left: 3px solid #9699a0; font-size: .86em; }
.tei-figure { margin: 1.5em 0; padding: 1em; color: #5c5f65; background: #f7f7f8; border: 1px solid #dcdee1; text-align: center; }
.tei-figure figcaption { margin-top: .7em; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .72em; line-height: 1.45; }
.tei-table-scroll { max-width: 100%; overflow-x: auto; }
.tei-table { width: 100%; border-collapse: collapse; text-align: left; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .72em; }
.tei-table th, .tei-table td { padding: .55em .7em; border: 1px solid #cfd1d5; vertical-align: top; }
.tei-table th { background: #eceef1; }
.tei-document-empty { padding: 50px 20px; color: #686b72; text-align: center; }
.tei-comparison { min-width: 0; min-height: 0; overflow: hidden; color: #e8e8ec; background: #1f1f24; }
.tei-comparison[hidden] { display: none; }
.tei-comparison__layout { display: grid; grid-template-rows: 56px minmax(0,1fr); width: 100%; height: 100%; min-width: 0; min-height: 0; }
.tei-comparison__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; padding: 8px 16px; background: #323139; border-bottom: 1px solid #19191e; }
.tei-comparison__header > div:first-child { display: grid; gap: 2px; min-width: 0; }
.tei-comparison__header strong { font-size: .72rem; }
.tei-comparison__header > div:first-child span { overflow: hidden; color: #aaa8b2; text-overflow: ellipsis; white-space: nowrap; font-size: .62rem; }
.tei-comparison__legend { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.tei-comparison__legend span { padding: 4px 7px; border: 1px solid transparent; border-radius: 3px; font-size: .61rem; font-weight: 750; white-space: nowrap; }
.tei-comparison__legend .is-changed { color: #f2c46d; background: rgba(171,118,18,.19); border-color: #785d28; }
.tei-comparison__legend .is-removed { color: #ffaaa3; background: rgba(185,54,46,.18); border-color: #773b38; }
.tei-comparison__legend .is-added { color: #8ee6ac; background: rgba(41,143,77,.18); border-color: #346b47; }
.tei-comparison__panes-scroll { min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-color: #696773 #29282f; scrollbar-width: thin; }
.tei-comparison__panes { display: grid; grid-template-columns: minmax(390px,1fr) minmax(330px,.82fr) minmax(390px,1fr); width: 100%; min-width: 1180px; height: 100%; min-height: 0; }
.tei-comparison__pane { display: grid; grid-template-rows: 39px minmax(0,1fr); min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #17171b; }
.tei-comparison__pane:last-child { border-right: 0; }
.tei-comparison__pane-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 6px 12px; color: #e8e8ec; background: #29282f; border-bottom: 1px solid #17171b; box-shadow: 0 2px 4px rgba(0,0,0,.22); }
.tei-comparison__pane-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; }
.tei-comparison__pane-heading strong { font-size: .69rem; white-space: nowrap; }
.tei-comparison__pane-heading span { overflow: hidden; color: #96949f; text-overflow: ellipsis; white-space: nowrap; font-size: .61rem; }
.tei-comparison__pane-heading a { color: #8fc7ff; font-size: .61rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.tei-comparison__pane-heading a:hover { text-decoration: underline; }
.tei-comparison__pane-scroll { min-width: 0; min-height: 0; overflow: auto; padding-bottom: 50px; scrollbar-color: #696773 #29282f; scrollbar-width: thin; font: 12px/1.55 Consolas, "Cascadia Mono", "Courier New", monospace; }
.tei-comparison__single-row { min-height: 25px; border-bottom: 1px solid #2d2c33; }
.tei-comparison__single-row.is-equal:hover .tei-comparison__cell { background-color: #2b2f35; }
.tei-comparison__cell { display: grid; grid-template-columns: 46px minmax(0,1fr); min-width: 0; color: #d7dde5; background: #1f1f24; }
.tei-comparison__cell.is-removed { color: #ffd7d4; background: #3b2527; }
.tei-comparison__cell.is-added { color: #c9f5d7; background: #203629; }
.tei-comparison__cell.is-empty { background: #25242a; background-image: repeating-linear-gradient(-45deg,transparent,transparent 5px,rgba(255,255,255,.018) 5px,rgba(255,255,255,.018) 10px); }
.tei-comparison__line { padding: 3px 8px 3px 4px; color: #74717d; background: rgba(0,0,0,.12); text-align: right; user-select: none; }
.tei-comparison__cell.is-removed .tei-comparison__line { color: #d48680; }
.tei-comparison__cell.is-added .tei-comparison__line { color: #70bb88; }
.tei-comparison__cell code { min-width: 0; padding: 3px 9px; color: inherit; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-comparison__markdown-line { display: grid; grid-template-columns: 46px minmax(0,1fr); min-height: 25px; color: #d7dde5; border-bottom: 1px solid #2d2c33; }
.tei-comparison__markdown-line:hover { background: #2b2f35; }
.tei-comparison__markdown-line > span { padding: 3px 8px 3px 4px; color: #74717d; background: rgba(0,0,0,.12); text-align: right; user-select: none; }
.tei-comparison__markdown-line code { min-width: 0; padding: 3px 9px; color: inherit; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.tei-comparison__markdown-line.is-heading code { color: #8fc7ff; font-weight: 750; }
.tei-comparison__markdown-missing { display: grid; place-content: center; justify-items: center; gap: 8px; min-height: 100%; padding: 30px; color: #d7dde5; text-align: center; font-family: Inter,ui-sans-serif,system-ui,sans-serif; }
.tei-comparison__markdown-missing span, .tei-comparison__markdown-missing small { max-width: 360px; color: #96949f; font-size: .68rem; line-height: 1.5; }
.tei-comparison__markdown-missing small { color: #777580; }
.tei-comparison__state { display: grid; place-content: center; justify-items: center; gap: 8px; width: 100%; height: 100%; padding: 28px; color: #e8e8ec; text-align: center; }
.tei-comparison__state > span:last-of-type { color: #aaa8b2; font-size: .72rem; }
.tei-comparison__state small { max-width: 480px; color: #8f8d97; line-height: 1.5; }
.tei-comparison__error-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 5px; color: white; background: #a83a34; border-radius: 50%; font-size: 1.1rem; font-weight: 800; }
.tei-viewer__loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 0; color: white; background: #52525e; font-size: .82rem; }
.tei-viewer__loading-title { grid-column: 2; overflow: hidden; color: #dedde3; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 700; }
.tei-viewer__spinner { width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.25); border-top-color: white; border-radius: 50%; animation: tei-viewer-spin .8s linear infinite; }
@keyframes tei-viewer-spin { to { transform: rotate(360deg); } }
.tei-viewer__frame--error { background: #52525e; }
.tei-viewer-error { align-self: center; width: min(510px,calc(100vw - 32px)); margin: auto; padding: 42px; background: white; border-radius: 6px; box-shadow: 0 4px 20px rgba(0,0,0,.4); text-align: center; }
.tei-viewer-error__mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 18px; color: white; background: #c23b32; border-radius: 50%; font-size: 1.45rem; font-weight: 800; }
.tei-viewer-error h1 { margin: 0 0 10px; font: 600 1.55rem/1.2 Georgia, serif; }
.tei-viewer-error p { margin: 0; color: #64676e; line-height: 1.55; }
.tei-viewer-error__actions { display: flex; justify-content: center; gap: 9px; margin-top: 26px; }
@media (max-width: 1100px) {
  .tei-toolbar-button--split > span:last-child, .tei-toolbar-button--compare > span:last-child { display: none; }
  .tei-toolbar-button--split, .tei-toolbar-button--compare { width: 34px; padding: 0; }
}
@media (max-width: 760px) {
  .tei-viewer__toolbar { grid-template-columns: auto minmax(0,1fr) auto; }
  .tei-toolbar-button--back span:last-child, .tei-toolbar-button--raw { display: none; }
  .tei-toolbar-button--split > span:last-child { display: none; }
  .tei-toolbar-button--split { width: 34px; padding: 0; }
  .tei-viewer__workspace { grid-template-columns: min(78vw,310px) minmax(0,1fr); }
  .tei-viewer__workspace:not(.is-sidebar-closed) .tei-viewer__stage { min-width: 100vw; }
  .tei-viewer__reading-area.is-split { grid-template-columns: minmax(280px,1fr) minmax(280px,1fr); overflow-x: auto; }
  .tei-viewer__stage { padding: 24px 18px 50px; }
  .tei-page { width: calc(720px * var(--tei-scale)); padding-inline: calc(55px * var(--tei-scale)); }
  .tei-comparison__layout { grid-template-rows: auto minmax(0,1fr); }
  .tei-comparison__header { align-items: flex-start; flex-direction: column; gap: 7px; }
  .tei-comparison__legend { justify-content: flex-start; }
}
@media print {
  .tei-viewer { position: static; overflow: visible; background: white; }
  .tei-viewer__frame { display: block; height: auto; }
  .tei-viewer__toolbar, .tei-viewer__sidebar, .tei-viewer__raw-pane, .tei-view-pane-header, .tei-comparison { display: none; }
  .tei-viewer__workspace { display: block; overflow: visible; }
  .tei-viewer__reading-area, .tei-viewer__reading-area.is-split, .tei-viewer__readable-pane { display: block; overflow: visible; }
  .tei-viewer__stage { overflow: visible; padding: 0; background: white; }
  .tei-page { width: auto; min-height: 0; padding: 0; box-shadow: none; }
}
@media (max-width: 480px) { .site-header { grid-template-columns: 40px minmax(0,1fr) 40px; padding-inline: 12px; }.brand > span:last-child { display: none; }.site-nav { justify-self: center; }.site-nav a { padding-inline: 11px; } }
