/* Patient explainer additions on top of styles.css */
:root { --sheet-size: 19px; }
.ticker-text { animation-duration: 28s; }
.ticker.slow .ticker-text { animation-duration: 120s; }
.results { display: flex; flex-direction: column; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--surface); }
.result { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-top: 1px solid var(--rule); cursor: pointer; }
.result:first-child { border-top: 0; }
.result:hover { background: var(--sunk); }
.result:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.rname { font-family: var(--f-display); font-stretch: 70%; font-weight: 900; font-size: var(--step-2); text-transform: uppercase; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; position: sticky; top: 0; background: var(--bg); padding-block: 10px; z-index: 4; }
.sizer { display: inline-flex; gap: 4px; margin-left: auto; }

.sheet-doc { font-size: var(--sheet-size); line-height: 1.5; display: flex; flex-direction: column; gap: 18px; max-width: 46em; }
.sheet-doc .drug { font-size: 2.6em; line-height: 0.95; font-stretch: 68%; font-weight: 900; }
.sheet-doc .aka { margin: -10px 0 0; color: var(--muted); font-size: 1.1em; }
.scard { background: var(--surface); border: 2px solid var(--ink); }
.scard header { padding: 10px 14px 8px; border-bottom: 5px solid var(--ink); }
.scard header h3 { font-size: 1.05em; text-transform: uppercase; font-stretch: 78%; font-weight: 900; }
.scard header p { margin: 2px 0 0; color: var(--muted); font-size: 0.85em; }
.scard.red { border-color: var(--danger); } .scard.red header { border-bottom-color: var(--danger); }
.scard.amber { border-color: var(--amber); } .scard.amber header { border-bottom-color: var(--amber); }
.sbody { padding: 12px 16px 14px; }
.sbody h4 { font-family: var(--f-body); font-weight: 800; font-size: 1em; margin: 12px 0 2px; }
.sbody h4:first-child { margin-top: 0; }
.sbody p { margin: 6px 0; }
.sbody ul { margin: 6px 0; padding-left: 1.2em; }
.sbody li { margin: 5px 0; }
.sbody li::marker { color: var(--amber); }
.sbody ul.big > li { font-size: 1.15em; }
.sbody ul ul { margin-top: 4px; }
.sbody .chip { font-size: 0.7em; vertical-align: middle; }
.sfoot { font-size: 0.8em; }
.sfoot p { margin: 4px 0; }

#present { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; }
#present .ptools { position: sticky; top: 0; display: flex; gap: 8px; align-items: center; padding: 12px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); border-bottom: 1px solid var(--rule); }
#present .pinner { padding: 20px max(16px, env(safe-area-inset-left, 0px)) 60px; display: flex; justify-content: center; }
#present .sheet-doc { font-size: calc(var(--sheet-size) * 1.2); }

@media print {
  .toolbar, .back, #present { display: none !important; }
  .sheet-doc { font-size: 12pt; max-width: none; }
  .scard { break-inside: avoid-page; }
}

#scanner { position: fixed; inset: 0; z-index: 31; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
#scanner[hidden] { display: none; }
.scanbox { width: min(560px, 100%); }
.scanbox video { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 4/3; object-fit: cover; }

/* ringer 2026-12-01: safety notice + pill confidence (text label carries meaning, not color alone) */
.notice.safety { border-left: 4px solid var(--amber, #b7791f); }
.chip.conf-high { background: #e6f4ea; color: #0b5d1e; border-color: #0b5d1e; }
.chip.conf-medium { background: #fff4d6; color: #6b4a00; border-color: #6b4a00; }
.chip.conf-low { background: #fde8e8; color: #8a1c1c; border-color: #8a1c1c; }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none !important; } }
