/* Literature finder page: the steps, the topic form, the free preview with the choice of size, and the unlocked list.
   Colours come from site.css (blue for actions, navy for headings, orange for the one button that unlocks). */
.lf .page-head { padding-block: 36px 18px; }
.lf .page-head .lead a { font-weight: 600; margin-left: 6px; }
.lf-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lf-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted); font-weight: 600; font-size: 14.5px; }
.lf-steps b { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--line); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.lf-steps li.on { border-color: var(--accent); background: var(--accent-soft); color: var(--navy); }
.lf-steps li.on b { background: var(--accent); color: #fff; }
.lf-steps li.done { color: var(--ink-2); }
.lf-steps li.done b { background: var(--good); color: #fff; font-size: 0; }
.lf-steps li.done b::before { content: "✓"; font-size: 13px; }

.lf-form { margin-bottom: 22px; }
.lf-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 112px 112px auto; gap: 14px; align-items: end; }
.lf-fields .btn { white-space: nowrap; }
.lf-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.lf-hint a { font-weight: 600; }

.lf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; padding-bottom: 64px; }
.lf-grid[hidden] { display: none; }
.lf-side { display: grid; gap: 18px; }
.lf-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; box-shadow: var(--shadow); display: grid; gap: 12px; align-content: start; min-width: 0; }
.lf-card h2, .lf-sign h2 { margin: 0; font-size: 20px; line-height: 1.25; color: var(--navy); font-family: var(--f-ui); font-weight: 700; letter-spacing: -0.01em; }
.lf-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.lf-ticks li { position: relative; padding-left: 26px; }
.lf-ticks li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--good); font-weight: 700; }
.lf-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; }
.lf-links a { font-weight: 600; }
.lf-sign { background: var(--navy); color: #fff; border-radius: 14px; padding: 22px 24px; display: grid; gap: 12px; }
.lf-sign[hidden] { display: none; }
.lf-sign h2 { color: #fff; }
.lf-sign p { margin: 0; color: #DCE4FA; font-size: 15px; }
.btn.lf-orange { background: var(--orange); border-color: var(--orange); color: #1A1D2E; font-weight: 700; width: 100%; justify-content: center; box-shadow: none; }
.btn.lf-orange:hover { filter: brightness(1.05); }
.btn.lf-orange:disabled { opacity: .6; cursor: default; }

.lf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.lf-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.lf-stat b { display: block; font-size: 24px; line-height: 1.2; color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.lf-stat span { font-size: 13px; color: var(--ink-2); }
.lf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: lf; }
.lf-list li { counter-increment: lf; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; }
.lf-list .t { margin: 0; font-weight: 650; color: var(--ink); line-height: 1.4; overflow-wrap: anywhere; }
.lf-list .t::before { content: counter(lf) ". "; color: var(--muted); font-weight: 600; }
.lf-list .m { margin: 0; grid-column: 1; font-size: 14px; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.lf-list a { grid-row: 1; grid-column: 2; font-size: 14px; font-weight: 600; white-space: nowrap; }
.lf-lock { margin: 0; border: 2px dashed var(--orange); background: var(--warn-soft); border-radius: 12px; padding: 14px 16px; text-align: center; font-weight: 700; color: var(--warn); line-height: 1.4; }

.lf-opts { display: grid; gap: 10px; }
.lf-opt { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 2px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; cursor: pointer; background: var(--surface); }
.lf-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lf-opt .rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); box-sizing: border-box; }
.lf-opt .n { font-weight: 700; color: var(--ink); line-height: 1.3; }
.lf-opt .p { text-align: right; font-weight: 800; color: var(--navy); line-height: 1.25; white-space: nowrap; }
.lf-opt .p small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
.lf-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.lf-opt.on .rad { border: 6px solid var(--accent); }
.lf-opt:focus-within { outline: 3px solid rgba(31, 91, 216, .35); outline-offset: 2px; }
.lf-opt.off { cursor: default; opacity: .55; }
.lf-opt.off .p { font-weight: 600; color: var(--ink-2); white-space: normal; font-size: 13px; }
.lf-opt.have .p { color: var(--good); }
.lf-bal { margin: 0; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.lf-bars { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; font-size: 13.5px; color: var(--ink-2); }
.lf-bars i { display: block; height: 10px; border-radius: 5px; background: var(--accent); min-width: 4px; }

.lf-more { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14.5px; }
.lf-more[hidden] { display: none; }
.lf-more-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-chips:empty { display: none; }
.lf-chip { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); background: var(--surface); cursor: pointer; }
.lf-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.lit-meta .chip.pre { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

@media (max-width: 1100px) { .lf-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lf-topic, .lf-any { grid-column: 1 / -1; } .lf-fields .btn { grid-column: 1 / -1; justify-content: center; } }
@media (max-width: 900px) { .lf-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .lf-card, .lf-sign { padding: 16px; } .lf-steps li { font-size: 13px; padding: 6px 10px 6px 6px; } .lf-list li { grid-template-columns: minmax(0, 1fr); } .lf-list a { grid-row: auto; grid-column: 1; } .lf-stat b { font-size: 21px; } }

/* the bar above the list holds the size, the filters and the downloads: it stays in the page (it does not float over the papers) */
.lf .lit-head { position: static; }
/* short lines in narrow boxes read better left-aligned, with no gaps between words and no broken words */
.lf-list .t, .lf-list .m, .lf-hint, .lf-bal, .lf-lock, .lf-ticks li, .lf-sign p, .lf-more, .lf .page-head .lead { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
.lf-lock { text-align: center; }
/* on a narrow screen the long "Get … papers" button wraps instead of pushing the bar wider than the page */
.lf .lit-head > * { min-width: 0; }
.lf-more-btns .btn { max-width: 100%; white-space: normal; height: auto; min-height: 44px; padding-block: 8px; text-align: left; line-height: 1.3; }
.lf #litCount, .lf .lit-hint, .lf .note-box { text-align: left; hyphens: manual; -webkit-hyphens: manual; }
