/* A source-first workspace: typography and layout, without decorative artwork. */
.app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; grid-template-rows: minmax(0, 1fr) auto; gap: 0 26px; min-height: 0; min-width: 0; width: 100%; max-width: 1760px; margin-inline: auto; padding: 18px 30px 0; }
.workspace:focus { outline: none; }
.thread { grid-column: 1; grid-row: 1; min-height: 0; min-width: 0; overflow-y: auto; padding: 4px 12px 18px; display: flex; flex-direction: column; gap: 22px; scrollbar-width: thin; scroll-padding-block: 24px; }
.welcome { max-width: 980px; width: 100%; margin: 0 auto; padding-block: 4px; }
.folio-line { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.folio-line .eyebrow { margin: 0; font-family: var(--serif); font-variant-caps: all-small-caps; font-size: 13px; letter-spacing: .16em; font-weight: 700; color: var(--accent); }
.folio-line .eyebrow::before { content: '❦ '; color: var(--gold); font-size: 11px; }
.folio-note { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 13px; white-space: nowrap; }
.welcome-copy { margin-block: 14px; }
.welcome h1 { font: 700 clamp(32px, 3.2vw, 44px)/1.15 var(--serif); letter-spacing: -.02em; margin: 0 0 12px; color: var(--text); }
.welcome h1 em { color: var(--accent); font-style: italic; }
.welcome-copy > p { max-width: 66ch; color: var(--muted); font: 400 17px/1.65 var(--serif); margin: 0; text-wrap: pretty; }
.reading-path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-block: 16px; }
.reading-path a { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 38px; color: var(--accent); font-family: var(--serif); font-size: 15px; font-weight: 650; text-decoration: none; padding: 6px 2px; border-bottom: 1px dashed transparent; transition: border-color .15s, color .15s; }
.reading-path a:not(.ask-jump):hover { border-bottom-color: var(--accent); text-decoration: none; }
.reading-path .ask-jump { padding: 8px 16px; border: 1px solid #58101a; border-radius: 8px; background: linear-gradient(180deg, var(--accent) 0%, #681420 100%); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 6px rgba(104,20,32,0.3); letter-spacing: .02em; }
.reading-path .ask-jump:hover { background: linear-gradient(180deg, #992132 0%, #751825 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 10px rgba(104,20,32,0.4); }
.script-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-accent); margin-block: 18px; box-shadow: inset 0 1px 3px rgba(35,24,21,0.03); }
.script-band > div { display: flex; gap: 12px; align-items: flex-start; }
.step-number { font-family: var(--serif); font-size: 14px; font-weight: 700; color: var(--accent); padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); font-variant-numeric: tabular-nums; box-shadow: 0 1px 2px rgba(35,24,21,0.05); }
.script-band strong { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--text); }
.script-band small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.question-index { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 14px 18px; box-shadow: var(--shadow); }
.suggestions-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 36px; padding-block: 4px; font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--text); cursor: pointer; list-style: none; }
.suggestions-heading::-webkit-details-marker { display: none; }
.suggestions-heading::after { content: '✦'; font-size: 13px; font-weight: 400; color: var(--gold); margin-left: auto; transition: transform .2s ease; }
.question-index[open] > .suggestions-heading::after { transform: rotate(45deg); color: var(--accent); }
.suggestions-hint { color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 400; margin-left: auto; }
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.chip { display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 8px; background: var(--panel-accent); color: var(--muted); font: 400 13px/1.55 var(--sans); box-shadow: 0 1px 3px rgba(35,24,21,0.04); transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); border-top-color: var(--accent); background: var(--panel); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(35,24,21,0.08); color: var(--text); }
.chip-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-family: var(--serif); font-size: 15px; font-weight: 700; }
.chip-heading > span { color: var(--accent); font-size: 15px; transition: transform .15s ease; }
.chip:hover .chip-heading > span { transform: translate(2px, -2px); }
.welcome-note { margin: 14px 0 0; max-width: 76ch; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.7; }

/* Conversation text stays readable, including original-script quotations. */
.msg { max-width: 980px; padding: 24px 28px; border-radius: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.msg.user { max-width: min(88%, 980px); margin-inline-end: max(0px, calc((100% - 980px) / 2)); background: var(--user); align-self: flex-end; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-bottom-right-radius: 4px; box-shadow: var(--shadow); }
.msg.user::before { content: 'TWOJE PYTANIE DO TEKSTU'; display: block; color: var(--muted); font: 700 11px/1.5 var(--serif); font-variant-caps: all-small-caps; letter-spacing: .14em; margin-bottom: 8px; }
.msg.user .ctx { color: var(--muted); font-size: 13px; margin-top: 8px; font-style: italic; }
.msg.bot { width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); align-self: center; box-shadow: var(--shadow); position: relative; }
.msg.bot::before { content: 'SCRIPTURA · LEKTURA ZE ŹRÓDEŁ'; display: block; font: 700 11px/1.5 var(--serif); font-variant-caps: all-small-caps; letter-spacing: .14em; color: var(--accent); margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.msg.bot.refused { border-left: 4px solid var(--warn); background: var(--warn-soft); }
.answer { white-space: pre-wrap; font: 400 18px/1.85 var(--sans); color: var(--text); }
.answer .ref { padding: 2px 7px; font: 700 .85em/1.5 var(--serif); border: 1px solid var(--line); border-radius: 5px; background: var(--accent-soft); color: var(--accent); box-shadow: 0 1px 2px rgba(35,24,21,0.06); }
.answer .sig { border-bottom: 1px dotted var(--accent); font-weight: 600; cursor: pointer; }
.cursor::after { content: '▍'; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; font-family: var(--serif); }
.meta b { color: var(--text); font-weight: 700; }
.badge { display: inline-block; border-radius: 6px; font-size: 12px; line-height: 1.5; padding: 3px 8px; font-weight: 600; font-family: var(--sans); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-soft); }
.badge.cur { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-soft); }
.badge.warn { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-soft); }
.show-sources[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.sources-panel { grid-column: 2; grid-row: 1 / 3; min-height: 0; min-width: 0; margin-bottom: 24px; border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--panel); overflow-y: auto; padding: 24px; display: flex; flex-direction: column; scrollbar-width: thin; box-shadow: var(--shadow); }
.margin-label { margin-bottom: 14px; color: var(--accent); font: 700 11px/1.4 var(--serif); font-variant-caps: all-small-caps; letter-spacing: .14em; }
.aside-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.sources-panel h2 { font: 700 22px/1.25 var(--serif); margin: 0; letter-spacing: -.015em; color: var(--text); }
.sources-panel h3 { color: var(--text); font: 700 14px/1.5 var(--serif); letter-spacing: .02em; margin: 20px 0 10px; }
.source-count { min-width: 30px; padding: 3px 8px; text-align: center; border-radius: 6px; background: var(--gold-soft); border: 1px solid var(--gold); color: var(--accent); font-family: var(--serif); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 2px rgba(35,24,21,0.05); }
.aside-sub { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 12px 0 18px; }
.empty { padding: 28px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.8; text-align: center; }
.empty h3 { color: var(--text); font: 700 19px/1.4 var(--serif); margin: 0 0 10px; }
.empty h3::before { content: '❦ '; color: var(--gold); display: block; font-size: 16px; margin-bottom: 6px; }
.empty p { margin: 0; }
.src { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-accent); padding: 16px; margin-block: 12px; overflow-wrap: anywhere; box-shadow: 0 1px 3px rgba(35,24,21,0.04); transition: border-color .15s; }
.src.hit { border-left: 3px solid var(--accent); background: var(--panel); }
.src .n { display: inline-block; min-width: 28px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); border: 1px solid var(--accent-soft); color: var(--accent); text-align: center; font-family: var(--serif); font-weight: 700; margin-right: 6px; font-size: 13px; }
.src .t { font: 700 15px/1.45 var(--serif); color: var(--text); }
.src .s { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 10px; }
.src .sig { font-size: 12px; margin-top: 8px; }
.src .sig span { display: inline-block; margin: 0 4px 4px 0; padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); }
.src details { margin-top: 8px; }
.src summary { cursor: pointer; min-height: 40px; font-family: var(--serif); font-size: 14px; font-weight: 650; color: var(--accent); padding-block: 8px; }
.src blockquote { margin: 10px 0 0; padding: 10px 14px; border-left: 2px solid var(--gold); background: var(--panel); font: 400 15px/1.75 var(--serif); font-style: italic; color: var(--text); white-space: pre-wrap; border-radius: 0 6px 6px 0; }
.src blockquote mark { background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); color: var(--text); font-style: normal; padding: 0 2px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.src blockquote mark.altered { background: var(--warn-soft); box-shadow: inset 0 -2px 0 var(--warn); }
.verse { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.verse .r { color: var(--accent); font-family: var(--serif); font-weight: 700; }
.work-notes { font-size: .72rem; color: var(--muted); margin: 4px 0 8px; line-height: 1.4; }
.verse a.il-link { font-size: .75rem; color: var(--accent); margin-left: .4rem; text-decoration: none; }
.verse .w { color: var(--muted); font-size: 12px; margin-left: 6px; }
.verse .x { font: 400 16px/1.8 var(--serif); margin-top: 6px; color: var(--text); }
.verse .x.rtl { direction: rtl; text-align: right; font-family: 'SBL Hebrew', 'Ezra SIL', 'Noto Serif Hebrew', serif; font-size: 21px; }
.source-note { margin-top: auto; padding-top: 24px; color: var(--muted); font-size: 13px; }
.source-note strong { color: var(--text); font-family: var(--serif); font-weight: 700; }
.source-note p { margin: 8px 0 0; line-height: 1.75; }
.legal-note { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.legal-note a { color: var(--accent); }
.guest-note { margin: 24px 0 0; padding: 16px; border-radius: 8px; background: var(--gold-soft); border: 1px solid var(--gold); color: var(--accent); font-size: 13px; line-height: 1.75; font-family: var(--serif); }
details.grp { margin: 12px 0 4px; }
details.grp > summary { cursor: pointer; list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 44px; padding-block: 10px; border-bottom: 1px solid var(--line); font: 700 14px/1.5 var(--serif); color: var(--text); }
details.grp > summary::-webkit-details-marker { display: none; }
details.grp > summary::before { content: '▸'; color: var(--accent); font-size: 12px; transition: transform .15s; }
details.grp[open] > summary::before { transform: rotate(90deg); }
details.grp > summary .gc { background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 5px; font-size: 12px; }
details.grp > summary .muted { font-weight: 400; font-size: 12px; font-family: var(--sans); }
.export { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.export button { margin: 6px 0 0 6px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--accent); font: 700 13px var(--serif); }

/* Keep every filter visible without letting the composer crowd out examples. */
#form { grid-column: 1; grid-row: 2; min-width: 0; padding: 8px 12px 18px; }
.composer { max-width: 980px; margin-inline: auto; padding: 16px 20px; border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-lg); transition: border-color .18s, box-shadow .18s; }
.composer:focus-within { border-color: var(--gold); border-top-color: var(--accent); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow-lg); }
.composer-label { display: block; font: 700 14px/1.4 var(--serif); color: var(--text); letter-spacing: .02em; margin-bottom: 8px; }
.inputs { display: flex; align-items: center; gap: 14px; }
#q { flex: 1; min-width: 0; min-height: 48px; max-height: 180px; padding: 8px 0; background: transparent; border: 0; resize: vertical; font: 400 17px/1.6 var(--serif); color: var(--text); }
#q:focus { outline: none; }
#q::placeholder { color: var(--muted); opacity: 0.85; font-style: italic; }
button { font: inherit; cursor: pointer; transition: background-color .18s, border-color .18s, box-shadow .18s; }
#ask { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 12px; background: linear-gradient(180deg, var(--accent) 0%, #681420 100%); color: var(--on-accent); border: 1px solid #58101a; padding: 10px 20px; min-height: 46px; font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: .02em; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 3px 8px rgba(104,20,32,0.35); }
#ask > span:last-child { font-size: 18px; }
#ask:not(:disabled):hover { background: linear-gradient(180deg, #992132 0%, #751825 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 12px rgba(104,20,32,0.45); transform: translateY(-1px); }
#ask:disabled { opacity: .6; cursor: wait; transform: none; }
button.ghost { min-height: 44px; padding: 10px 14px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 13px; }
.composer-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.mode-options { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; min-width: 0; padding: 0; margin: 0; }
.mode-options legend { float: left; color: var(--muted); font-family: var(--serif); font-variant-caps: all-small-caps; letter-spacing: .06em; font-size: 12px; line-height: 34px; padding: 0; margin: 0 10px 0 0; }
.mode-options label { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-accent); color: var(--text); font-family: var(--serif); font-size: 14px; cursor: pointer; transition: all .15s ease; }
.mode-options label:has(input:checked) { background: var(--gold-soft); border-color: var(--gold); color: var(--accent); font-weight: 700; box-shadow: inset 0 1px 2px rgba(35,24,21,0.05); }
input[type=radio], input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; margin: 0; }
.context-options { flex: 1 1 100%; min-width: 0; border-top: 1px solid var(--line); margin-top: 6px; }
.context-options > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding-block: 6px; cursor: pointer; list-style: none; color: var(--text); font-family: var(--serif); font-size: 14px; font-weight: 700; }
.context-options > summary::-webkit-details-marker { display: none; }
.context-options > summary::after { content: '✦'; font-size: 12px; font-weight: 400; color: var(--gold); transition: transform .2s ease; }
.context-options[open] > summary::after { transform: rotate(45deg); color: var(--accent); }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(180px, 1.3fr); gap: 8px 12px; padding-bottom: 2px; }
.opts > label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-family: var(--serif); color: var(--muted); }
.opts .row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.opts .row label { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; color: var(--text); font-size: 13px; font-family: var(--serif); }
.composer-settings > .personal-filter { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-height: 34px; font-size: 13px; font-family: var(--serif); color: var(--text); }
.works-options { min-width: 0; border: 0; padding: 0; margin: 0; }
.works-options legend { color: var(--muted); font-size: 12px; font-family: var(--serif); margin-bottom: 4px; padding: 0; }
.opts select { min-height: 38px; width: 100%; min-width: 0; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--text); font: 400 15px/1.4 var(--sans); }
.token-field input { min-height: 44px; width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); }
.composer-footer { max-width: 980px; margin: 8px auto 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-family: var(--serif); font-size: 13px; font-style: italic; }
.shortcut { white-space: nowrap; font-family: var(--mono); font-size: 11px; font-style: normal; background: var(--panel-accent); padding: 2px 7px; border: 1px solid var(--line); border-radius: 4px; }
details.raw { margin-top: 16px; }
details.raw summary { min-height: 36px; cursor: pointer; color: var(--muted); font-size: 13px; padding-block: 6px; }
pre { max-width: 100%; font: 13px/1.6 var(--mono); background: var(--panel-accent); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; }
.err { color: var(--warn); }
.access { position: relative; font-size: 14px; }
.access summary { list-style: none; }
.access summary::-webkit-details-marker { display: none; }
.access .menu, .access .token-field { position: absolute; z-index: 10; top: calc(100% + 10px); right: 0; width: min(320px, calc(100vw - 24px)); max-height: 60dvh; overflow-y: auto; padding: 16px; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg); }
.access .menu a { display: block; min-height: 44px; padding: 10px; color: var(--text); text-decoration: none; font-size: 14px; overflow-wrap: anywhere; border-radius: 6px; }
.access .menu .m { color: var(--muted); font-size: 12px; margin-top: 4px; }
.token-field input { margin-top: 10px; font-size: 16px; }
@media (hover: hover) {
  .chip:hover { border-color: var(--line-strong); background: var(--panel); }
  .reading-path a:not(.ask-jump):hover { text-decoration: underline; }
  button.ghost:hover, .access .menu a:hover { background: var(--accent-soft); color: var(--accent); }
}
@media (min-width: 1101px) and (min-height: 821px) { #form { max-height: 40dvh; overflow-y: auto; scrollbar-width: thin; } }
@media (min-width: 901px) { .welcome h1 br { display: none; } }
/* Document scrolling avoids a tiny greeting area when filters are expanded. */
@media (max-width: 1100px), (max-height: 820px) {
  .app { height: auto; min-height: 100dvh; grid-template-rows: auto auto; }
  .workspace { grid-template-rows: auto auto; }
  .thread { overflow: visible; }
  .welcome { margin-block: 0; }
  .sources-panel { align-self: start; position: sticky; top: 24px; max-height: calc(100dvh - 48px); }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 0 18px; padding-inline: 20px; }
  .sources-panel { padding: 20px; }
  .sources-panel h2 { font-size: 20px; }
  .script-band small { margin-top: 0; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; gap: 0; padding: 16px 20px 0; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sources-panel { grid-column: 1; grid-row: 3; position: static; max-height: none; margin: 12px 0 24px; }
  .thread { padding-inline: 4px; }
  #form { padding-inline: 4px; }
  .source-note { margin-top: 20px; }
  .empty { padding-block: 22px; }
}
@media (max-width: 720px) {
  .topbar .access { position: static; }
  .topbar .access .menu, .topbar .access .token-field { left: 12px; right: 12px; width: auto; top: calc(100% + 8px); }
}
@media (max-width: 600px) {
  .workspace { padding: 16px 16px 0; }
  .thread { padding: 0 0 16px; }
  .folio-note { display: none; }
  .welcome-copy { margin-block: 12px; }
  .welcome h1 { font-size: clamp(30px, 8vw, 36px); }
  .welcome-copy > p { font-size: 16px; }
  .reading-path { gap: 8px 16px; }
  .reading-path a { min-height: 44px; }
  .reading-path .ask-jump { flex-basis: 100%; justify-content: space-between; }
  .script-band { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .script-band small { margin-top: 0; }
  .script-band strong { font-size: 16px; }
  .suggestions-heading { font-size: 17px; }
  .suggestions-hint { display: none; }
  .chips { grid-template-columns: minmax(0, 1fr); }
  .chip { padding: 12px; }
  .msg { padding: 20px 16px; }
  .msg.user { max-width: 96%; }
  .answer { font-size: 17px; }
  #form { padding: 8px 0 16px; }
  .composer { padding: 14px; }
  .inputs { flex-direction: column; align-items: stretch; gap: 10px; }
  #q { min-height: 64px; }
  #ask { align-self: stretch; }
  .opts > label[for=author], .works-options { grid-column: 1 / -1; }
  .opts select { min-height: 44px; padding-block: 8px; }
  .mode-options { gap: 6px; }
  .mode-options legend { float: none; line-height: 1.5; margin-bottom: 4px; }
  .mode-options label { min-height: 44px; font-size: 13px; }
  .context-options > summary { min-height: 44px; }
  .opts .row label { min-height: 32px; }
  .sources-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { .cursor::after { animation: none; } }
@media (forced-colors: active) { .mode-options label:has(input:checked), .answer .ref { border-color: Highlight; } }
