.bibliography-main { padding-top: 52px; padding-bottom: 84px; }
:root[data-page='bibliography'] { --shadow-lg: 0 18px 40px -24px #0003; }
:root[data-page='bibliography'][data-theme='dark'] { --shadow-lg: 0 18px 40px -24px #000c; }
[data-page='bibliography'] .preferences-hint { font-size: 14px; }
.bibliography-intro { max-width: 760px; margin-bottom: 42px; }
.bibliography-intro h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 750; line-height: 1.14; letter-spacing: -.035em; margin-bottom: 18px; }
.bibliography-intro > p { font-size: 16px; max-width: 66ch; color: var(--text); }
.bibliography-intro .local-note { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.citation-workspace { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.source-editor { padding-right: 36px; border-right: 1px solid var(--border); }
#source-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.citation-workspace h2 { font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; margin-bottom: 24px; }
.cite-field { display: grid; gap: 8px; margin-bottom: 22px; font-size: 14px; font-weight: 650; color: var(--heading); }
.cite-field input:not([type='checkbox']), .cite-field textarea, .cite-field select, .style-picker select { width: 100%; min-height: 46px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); padding: 10px 12px; font: 400 16px/1.5 var(--font); color: var(--text); caret-color: var(--primary); }
.cite-field textarea { resize: vertical; min-height: 96px; }
.cite-field input::placeholder, .cite-field textarea::placeholder { color: var(--muted); opacity: 1; }
.cite-field input:disabled, .cite-field textarea:disabled { opacity: .65; background: var(--surface-2); }
.cite-field [aria-invalid='true'] { border-color: var(--err); }
.field-hint { color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.6; margin: 0; }
.check-label { display: flex; align-items: center; gap: 9px; min-height: 36px; font-size: 14px; color: var(--text); font-weight: 400; cursor: pointer; }
.check-label input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.field-error { color: var(--err); font-size: 14px; font-weight: 500; }
.form-status { color: var(--primary); font-size: 14px; margin: 14px 0 0; }
.form-status[data-error='true'] { color: var(--err); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.source-details { font-size: 14px; margin: -4px 0 24px; }
.source-details summary { color: var(--primary); cursor: pointer; min-height: 40px; padding-block: 8px; }
.source-details[open] summary { margin-bottom: 14px; }
.editor-note { font-size: 14px; color: var(--muted); line-height: 1.7; }
.editor-actions, .result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bibliography-main .btn { font-size: 14px; min-height: 46px; border-radius: 8px; padding: 11px 18px; white-space: normal; box-shadow: none; }
.results-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.results-heading h2 { margin: 0; }
.style-picker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.style-picker select { width: 110px; font-weight: 650; }
.reference-paper { padding: 36px; background: var(--surface); border-radius: 12px; min-height: 300px; overflow-wrap: anywhere; }
.reference-empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 228px; max-width: 45ch; }
.reference-empty h3 { font-size: 22px; margin-bottom: 12px; }
.reference-empty p { color: var(--muted); font-size: 15px; line-height: 1.8; }
#paper-title { text-align: center; font: 700 20px/1.5 'Times New Roman', serif; margin: 0 0 28px; }
#bibliography-output { font: 18px/2 'Times New Roman', serif; color: var(--text); }
#bibliography-output .csl-entry { padding-left: 1.27cm; text-indent: -1.27cm; margin-bottom: 18px; }
#bibliography-output[data-style='ieee'] { line-height: 1.6; }
#bibliography-output[data-style='ieee'] .csl-entry { display: flex; gap: 12px; padding: 0; text-indent: 0; }
.csl-left-margin { flex: none; min-width: 2ch; }
.csl-right-inline { min-width: 0; }
.cite-italic { font-style: italic; }
.cite-bold { font-weight: 700; }
.cite-smallcaps { font-variant: small-caps; }
.result-note { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 16px 0 22px; }
.citation-status { min-height: 26px; font-size: 14px; color: var(--primary); margin: 14px 0 0; }
.citation-status[data-error='true'] { color: var(--err); }
.example-notice, .clear-confirm { padding: 18px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 8px; font-size: 14px; margin-top: 16px; }
.example-notice p, .clear-confirm p { margin-bottom: 0; }
.clear-confirm > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.saved-sources { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.source-count { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-row { padding-block: 24px; border-bottom: 1px solid var(--border); }
.source-row h3 { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 6px; }
.source-meta { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; margin-bottom: 10px; }
.source-controls { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.text-button { border: 0; background: none; color: var(--primary); text-decoration: underline; text-underline-offset: 4px; font: 600 14px/1.5 var(--font); cursor: pointer; min-height: 44px; padding: 8px 0; }
.text-button:hover { color: var(--primary-hover); text-decoration-thickness: 2px; }
.text-button[data-action='delete'] { color: var(--muted); }
.citation-inline { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.source-warning { color: var(--warn); font-size: 14px; margin: 8px 0 0; }
.citation-help { padding-top: 30px; margin-top: 32px; border-top: 1px solid var(--border); }
.citation-help h2 { font-size: 18px; margin-bottom: 12px; }
.citation-help p, .citation-help a { font-size: 14px; line-height: 1.8; }
.citation-footer { display: flex; gap: 18px 32px; flex-wrap: wrap; align-items: center; }
.citation-footer > p { margin: 0; color: var(--muted); font-size: 14px; }
.citation-footer .citation-attribution { width: 100%; }
.citation-footer details { width: 100%; color: var(--muted); font-size: 14px; }
.citation-footer summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.citation-footer details p { margin: 8px 0; }
.bibliography-main ::selection { color: var(--primary-ink); background: var(--primary); }
.bibliography-main :focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
@media (max-width: 1100px) { .citation-workspace { gap: 32px; } .source-editor { padding-right: 24px; } .reference-paper { padding: 24px; } .results-heading { flex-wrap: wrap; gap: 12px; } }
@media (max-width: 760px) { .bibliography-main { padding-top: 32px; } .citation-workspace { grid-template-columns: 1fr; gap: 40px; } .source-editor { padding-right: 0; border-right: 0; } .bibliography-intro { margin-bottom: 32px; } .citation-results { border-top: 1px solid var(--border); padding-top: 28px; } .reference-paper { padding: 26px 20px; } #bibliography-output { font-size: 17px; } .result-actions > .btn { flex: 1 1 180px; } }
@media (prefers-reduced-motion: no-preference) { .source-row { animation: source-appear 180ms cubic-bezier(.16,1,.3,1); } @keyframes source-appear { from { background-color: var(--primary-soft); } to { background-color: transparent; } } }
