/* courier.css -- what Courier needs beyond Groundskeeper's stylesheet (WEB_UI_STANDARD C.1).
   Loaded AFTER css/style.css and css/settings.css, which are verbatim copies of Groundskeeper's and are kept
   identical by tools/check_stylesheet_identity.py: never edit those. Everything here reads Groundskeeper's
   tokens (var(--...)), so all four themes work and no colour is written twice. A rule Groundskeeper's sheet
   already has is not repeated here -- Courier uses its class instead. */

[hidden] { display: none !important; }
.skip { position: fixed; top: -100px; left: 10px; z-index: 300; background: var(--card); padding: 0.75rem; }
.skip:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }

/* --- Sign-in: Groundskeeper's login card (its login.html carries these rules inline, which Courier's
   Content-Security-Policy would block), centred on the page background. --- */
.login-shell { flex: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 2rem 2.25rem 1.875rem; width: 360px; max-width: calc(100vw - 2rem); box-shadow: 0 4px 32px rgba(0,0,0,0.06); }
.login-brand { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 1.75rem; }
.login-brand-icon { width: 2rem; height: 2rem; background: url('/static/favicon.svg') center/contain no-repeat; font-size: 0; color: transparent; flex-shrink: 0; }
.login-brand-name { font-size: 1.125rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.login-brand-sub { font-size: 0.72rem; color: var(--text-muted); font-family: 'IBM Plex Mono', monospace; margin-top: 0.1rem; }
.login-heading { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.login-sub { font-size: 0.775rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.5; }
.login-card label { font-size: 0.775rem; margin-bottom: 0.35rem; margin-top: 0.875rem; display: block; }
.login-card label:first-of-type { margin-top: 0; }
.login-card input[type=text], .login-card input[type=password] { padding: 0.5rem 0.75rem; font-size: 0.875rem; background: var(--bg); margin-bottom: 0; }
.login-btn { width: 100%; margin-top: 1.25rem; padding: 0.6rem 1rem; background: var(--accent); color: white; border: none; border-radius: 6px; font-size: 0.875rem; font-weight: 500; font-family: 'IBM Plex Sans', sans-serif; cursor: pointer; transition: opacity 0.15s; }
.login-btn:hover { opacity: 0.88; }
.login-btn:disabled { opacity: 0.5; cursor: default; }
.login-error { margin-top: 0.875rem; font-size: 0.775rem; color: var(--red); line-height: 1.5; }
.login-error:empty { display: none; }
.login-footer { margin-top: 1.375rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.7rem; color: var(--text-muted); font-family: 'IBM Plex Mono', monospace; text-align: center; }

/* --- Frame: Groundskeeper's body is a flex row of sidebar and .main-wrap; here both sit inside #shell, which
   must be that row (and the sign-in screen is the body's only other child). --- */
#shell { flex: 1; min-width: 0; display: flex; }
/* The two bottom buttons are Groundskeeper's .sidebar-toggle; the second is the quieter sign-out. --- */
.sidebar-signout { margin-top: 0.25rem; opacity: 0.7; }
.sidebar-signout:hover { opacity: 1; }

/* --- Deploy the RSJ Agent (Endpoints): Groundskeeper's Agent Settings card has these two rules inline, which Courier's
   Content-Security-Policy would block. --- */
.deploy-steps { font-size: 0.8rem; color: var(--text-soft); line-height: 1.7; margin: 0 0 1rem 1.1rem; padding: 0; }
.deploy-steps li { margin-bottom: 0.25rem; }

/* --- Running text. Groundskeeper's reset leaves paragraphs margin-less; these give prose a rhythm. --- */
.muted { color: var(--text-soft); font-size: 0.8rem; line-height: 1.55; }
.hint { color: var(--text-muted); font-size: 0.75rem; line-height: 1.5; margin: 0.4rem 0 0.875rem; }
input + .hint, select + .hint, textarea + .hint { margin-top: -0.5rem; }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 0.85em; }
.eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.25rem; }
.card p, .settings-card p, main > p, dialog p { font-size: 0.85rem; line-height: 1.55; margin-bottom: 0.75rem; }
.card p.muted, .settings-card p.muted, dialog p.muted { font-size: 0.8rem; }
.card p.hint, .settings-card p.hint, dialog p.hint { font-size: 0.75rem; margin-bottom: 0.875rem; }
.tab-pane > p.muted { margin-bottom: 1rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
.message-body { white-space: pre-wrap; overflow-wrap: anywhere; font-family: 'IBM Plex Sans', sans-serif; }
pre.message-body { font-size: 0.8rem; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 0.875rem; }
pre.message-body:empty { display: none; }

/* --- Messages: the safety notice, status and error lines (Groundskeeper's ok / fail message colours). --- */
.notice-bar { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.8rem; line-height: 1.5; margin-bottom: 1rem; }
.result-msg.ok, .result-msg.fail { display: block; }
.result-msg:empty { display: none !important; }
main > .result-msg { margin-bottom: 1rem; }
.btn-row .result-msg { flex: 1 1 auto; margin: 0; }
.dialog-actions { justify-content: flex-end; margin-top: 1rem; }
a.btn { display: inline-block; text-decoration: none; }
article.card > .btn { margin-top: 0.75rem; }
button.btn { line-height: inherit; }
.card.empty { text-align: center; padding: 3rem 1.25rem; }
.card.empty p { margin-bottom: 0; }

/* --- Settings: the tab strip's tabs are links (each has its own address); Groundskeeper's are buttons. --- */
a.tab-btn { text-decoration: none; display: inline-block; }
select.narrow { max-width: 320px; }
.role-desc-grid { grid-template-columns: repeat(2, 1fr); }
.role-sender { background: var(--success-bg); color: var(--success-text); }
.user-table select { width: auto; margin-bottom: 0; font-size: 0.8rem; padding: 0.3rem 0.5rem; }
.user-table td .user-action-btns { flex-wrap: wrap; }
.settings-card .user-table:last-child { margin-bottom: 0; }
.check { display: flex; font-weight: 400; color: var(--text); margin: 0.4rem 0; cursor: pointer; }
.check input { width: auto; margin: 0 0.35rem 0 0; }

/* --- New notice: the form, the recipients picker and the preview dialog. --- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.recipients legend { font-size: 0.8rem; font-weight: 500; color: var(--text-soft); margin-bottom: 0.3rem; padding: 0; }
.mode-row { display: flex; gap: 1.5rem; margin: 0.25rem 0 0.875rem; }
.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.5rem; }
.toolbar input { flex: 1 1 200px; width: auto; margin-bottom: 0; }
.pc-list { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 6px; padding: 0.25rem 0.75rem; background: var(--bg); margin-bottom: 0.5rem; }
.pc-row { align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pc-row .mono { color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.25rem 0 0.875rem; }
.chips .hint { margin: 0; }
.chip { padding: 0.25rem 0.75rem; border-radius: 14px; border: 1px solid var(--border); background: transparent; font-family: 'IBM Plex Mono', monospace; font-size: 0.75rem; color: var(--text-soft); cursor: pointer; }
.chip:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.char-count { text-align: right; }
.message-preview { border: 1px solid var(--border); border-top: 3px solid var(--accent); padding: 1rem 1.25rem; margin: 0 0 0.875rem; border-radius: 6px; background: var(--bg); }
.message-preview h3 { font-size: 1rem; margin: 0.25rem 0 0.5rem; overflow-wrap: anywhere; }
.notice-bar p { margin: 0.25rem 0 0; }
.notice-bar a { color: inherit; text-decoration: underline; }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; width: min(560px, 94vw); max-height: 90vh; overflow: auto; margin: auto; }
dialog::backdrop { background: rgba(15,23,42,0.45); }
dialog h2 { font-size: 0.95rem; font-weight: 600; color: var(--heading-accent); margin-bottom: 0.5rem; }
dialog.modal { padding: 0; border: 0; background: transparent; max-height: none; overflow: visible; }
dialog.modal .connector-modal-box { max-width: none; }
.dialog-error { flex: 1 1 auto; margin: 0; }

/* --- History and Results: Groundskeeper's table, and the six counts. --- */
/* A wide table (and the Settings tab strip) scrolls inside its own box at phone width (lab walk 2026-10-20). The shadows at the two
   edges show only while there is more to scroll to on that side: the 'local' pair moves with the content and covers them at the ends. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background-image: linear-gradient(to right, var(--card) 30%, transparent), linear-gradient(to left, var(--card) 30%, transparent), linear-gradient(to right, color-mix(in srgb, var(--text) 22%, transparent), transparent), linear-gradient(to left, color-mix(in srgb, var(--text) 22%, transparent), transparent); background-position: left, right, left, right; background-size: 2rem 100%, 2rem 100%, 0.6rem 100%, 0.6rem 100%; background-repeat: no-repeat; background-attachment: local, local, scroll, scroll; }
.tabs { background-image: linear-gradient(to right, var(--bg) 30%, transparent), linear-gradient(to left, var(--bg) 30%, transparent), linear-gradient(to right, color-mix(in srgb, var(--text) 22%, transparent), transparent), linear-gradient(to left, color-mix(in srgb, var(--text) 22%, transparent), transparent); background-position: left, right, left, right; background-size: 2rem 100%, 2rem 100%, 0.6rem 100%, 0.6rem 100%; background-repeat: no-repeat; background-attachment: local, local, scroll, scroll; }
.table-wrap > table { min-width: 34rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 0.5rem 0.75rem; font-weight: 500; font-size: 0.8rem; color: var(--text-soft); border-bottom: 1px solid var(--border); background: var(--bg); white-space: nowrap; }
.data-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.825rem; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr.clickable { cursor: pointer; transition: background 0.1s; }
.data-table tbody tr.clickable:hover { background: var(--bg); }
.data-table a { color: var(--accent); font-weight: 500; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }
.card .data-table td p.hint { margin: 0.25rem 0 0; }
.delivery-state { text-transform: none; white-space: nowrap; }
.status-grid.counts { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.status-card .stat-number { font-family: 'IBM Plex Mono', monospace; font-size: 1.75rem; font-weight: 600; color: var(--text); line-height: 1.1; margin: 0.25rem 0 0.4rem; }
.status-card .hint { margin: 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- School branding (COURIER-03): the preview's header and the Branding tab's picture. The top-bar chip is Groundskeeper's
   own .brand-chip. The preview uses its own class names so a phone's rule that hides the chip's name does not hide it here. --- */
.preview-brand { display: flex; align-items: center; gap: 0.75rem; margin: 0.25rem 0 0.75rem; }
.preview-brand-logo { height: 40px; max-width: 160px; object-fit: contain; display: block; }
.preview-brand-name { font-weight: 600; overflow-wrap: anywhere; }
.branding-current { display: inline-flex; align-items: center; min-height: 3rem; margin-bottom: 0.75rem; padding: 0.4rem 0.75rem; border: 1px dashed var(--border); border-radius: 6px; font-size: 0.75rem; color: var(--text-muted); }
.branding-current-logo { max-height: 56px; max-width: 240px; object-fit: contain; display: block; }

/* --- Appearance (after Groundskeeper's Theme and School colour cards). The picture cards' colours are not inline styles
   (the Content-Security-Policy allows none); their colours are set from look.js. --- */
.theme-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#appearance-result { display: block; margin-top: 0.75rem; }
.colour-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.colour-row input[type="color"] { width: 48px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: transparent; }
.colour-row input.colour-hex { width: 110px; font-family: 'IBM Plex Mono', monospace; }
.colour-preview { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.colour-swatch { width: 18px; height: 18px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); background: var(--accent); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-chip-coloured { border-left: 3px solid var(--accent); }   /* the school's colour edges the chip, as in Groundskeeper */
.device-bar input, .device-bar select { width: auto; flex: 1 1 14rem; margin: 0; }
/* Templates with blanks (BULLETIN-TEMPLATES-01): the sender's finished-notice panel and the administrator's blank rows */
.finished-notice { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.875rem; overflow-wrap: anywhere; }
.finished-notice.fail { color: var(--danger-text); }
.blank-row { border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.75rem; }
/* Rich notices (RICH-NOTICES-01): the toolbar over the message box, and the preview drawn to match the computers. Sizes and fonts are the fixed lists only. */
.rich-buttons { display: flex; gap: 0.25rem; margin-bottom: 0.4rem; } .rich-button { min-width: 2.25rem; padding: 0.25rem 0.5rem; font-family: 'IBM Plex Mono', monospace; }
.rich-button-bold { font-weight: 700; } .rich-button-italic { font-style: italic; } .rich-menu, .rich-more { margin: 0.25rem 0 0.5rem; }
.rich-body { overflow-wrap: anywhere; } .rich-body p, .rich-body ul, .rich-body ol { margin: 0 0 0.5rem; } .rich-heading { font-size: 1.15em; margin: 0 0 0.5rem; }
.rich-callout { background: var(--warn-bg); color: var(--warn-text); border-left: 4px solid var(--amber); padding: 0.35rem 0.6rem; }
.rich-address { font-family: 'IBM Plex Mono', monospace; background: var(--panel-bg); padding: 0 0.2rem; }
.rich-size-large { font-size: 1.4em; } .rich-size-xlarge { font-size: 2em; }
.rich-font-segoe-ui { font-family: 'Segoe UI', sans-serif; } .rich-font-arial { font-family: Arial, sans-serif; } .rich-font-verdana { font-family: Verdana, sans-serif; }
.rich-font-tahoma { font-family: Tahoma, sans-serif; } .rich-font-georgia { font-family: Georgia, serif; } .rich-font-trebuchet-ms { font-family: 'Trebuchet MS', sans-serif; }
/* Two-factor sign-in card (Groundskeeper has these inline); the QR code is white in every theme, or a phone cannot read it */
.tf-setup { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.tf-qr { width: 180px; height: 180px; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 6px; }
.tf-codes { columns: 2; margin: 0 0 0.75rem 1.25rem; }
