/* Rounds Sheet (2026-09-01) — rs-* prefix. Screen chrome inherits .pn-page from
 * progress-oneshot.css; the sheet is a white paper block that prints as the
 * roster the hospitalist carries. Print rules hide all chrome. */

.rs-page { overflow-y: auto; }
.rs-title { margin-left: 14px; font-weight: 600; letter-spacing: .02em; }
.rs-date  { margin-left: 10px; opacity: .7; font-size: .9em; }
.rs-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.rs-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .9em; opacity: .85; cursor: pointer; }
.rs-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.rs-btn[disabled] { opacity: .5; cursor: default; }
.rs-btn-primary { font-weight: 600; }
.rs-status { padding: 6px 24px; font-size: .9em; min-height: 1.6em; opacity: .8; }

/* The paper. Borrowed from paper rounding tools: one boxed row per patient, tiny
 * captions naming each cell, a dedicated write-in zone on the right, alternate rows
 * lightly shaded. Kept to three cells so the read zone stays a read zone. */
.rs-paper {
    background: #fff; color: #1a1a1a;
    max-width: 8.5in; margin: 12px auto 40px; padding: .45in .5in;
    box-shadow: 0 2px 14px rgba(0,0,0,.35);
    font-family: "DM Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 9.5pt; line-height: 1.3;
    font-feature-settings: "tnum" 1;
}
.rs-empty { color: #666; padding: 1in 0; text-align: center; }
.rs-sheet-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 4px; margin-bottom: 6px; }
.rs-sheet-title { font-weight: 600; font-size: 12pt; letter-spacing: .01em; }
.rs-sheet-meta { font-size: 8pt; color: #777; letter-spacing: .03em; text-transform: uppercase; }

.rs-block {
    display: grid; grid-template-columns: 1.25in 1fr 2in;
    border: 1px solid #bdbdbd; border-top-width: 0;
    break-inside: avoid; page-break-inside: avoid;
}
.rs-block:first-of-type { border-top-width: 1px; }
.rs-block:nth-of-type(even) { background: #f5f5f5; }
.rs-cell { padding: 4px 7px 5px; min-width: 0; }
.rs-cell + .rs-cell { border-left: 1px solid #dcdcdc; }
.rs-cap { font-size: 6.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #8a8a8a; line-height: 1.4; }
.rs-cap + .rs-cap, .rs-probs + .rs-cap, .rs-hook + .rs-cap { margin-top: 4px; }
.rs-read .rs-hook-l1 { margin-top: 1px; }

.rs-room { font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12.5pt; font-weight: 700; line-height: 1.15; }
.rs-name { font-weight: 600; font-size: 10.5pt; line-height: 1.2; margin-top: 1px; }
.rs-meta { font-size: 8pt; color: #666; letter-spacing: .02em; margin-top: 1px; }
.rs-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.rs-flag { font-size: 6.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #444; padding: 0 4px; border: 1px solid #999; border-radius: 2px; line-height: 1.5; }
.rs-flag-crit { color: #000; border-color: #000; }

.rs-hook { margin: 0; }
.rs-hook-l1 { font-weight: 500; color: #111; font-size: 9pt; }
.rs-hook-l2 { font-weight: 400; color: #444; font-size: 8.5pt; }
.rs-hook[contenteditable="true"]:hover { background: #ededed; cursor: text; }
.rs-hook[contenteditable="true"]:focus { outline: 1px dashed #666; background: #fffbe6; }
.rs-block.rs-save-failed { outline: 2px solid #c00; outline-offset: -2px; }
.rs-hook-missing { color: #999; font-style: italic; font-weight: 400; }
.rs-hook-stale::after { content: " (old)"; color: #999; font-size: 7.5pt; font-style: italic; }

.rs-probs { font-size: 8.5pt; color: #666; }
.rs-write .rs-blank { height: 1.05em; border-bottom: 1px dotted #b5b5b5; }
.rs-write .rs-blank + .rs-blank { margin-top: 4px; }

@media print {
    @page { margin: .4in .45in; }
    html, body, .pn-page { background: #fff !important; color: #111 !important; }
    /* The inherited viewport shell clips later patients instead of paginating. */
    html, body.rs-page { height: auto; min-height: 0; overflow: visible; }
    body.rs-page { display: block; }
    .pn-page::before, .rs-chrome, .pn-header, .rs-status { display: none !important; }
    .rs-paper { max-width: none; margin: 0; padding: 0; box-shadow: none; font-size: 9pt; line-height: 1.28; }
    .rs-block:nth-of-type(even) { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .rs-hook[contenteditable="true"] { outline: none; background: transparent; }
    .rs-hook-missing { display: block; font-size: 0; }
    .rs-hook-missing::before { content: "(no summary)"; font-size: 9pt; color: #666; font-style: italic; }
    .rs-hook[contenteditable="true"]:hover { background: transparent; }
    a { color: inherit; text-decoration: none; }
}
