/*
 * The shared pieces every page is built from, public site and staff console alike. A screen uses these
 * instead of styling its own box, so the whole site looks like one thing. The HTML for most of them
 * comes from site/js/components.js (card, emptyState, sectionHead, field, dropZone): build with those,
 * and if nothing fits, add a general piece here rather than a page-only style.
 * Colours are theme.css tokens, so every piece works in light and dark.
 *
 *   .section-head   a heading with a quiet note or actions on the right (alias: .strip, .when)
 *   .card           a surface: card colour, a thin line, rounded; .card.row puts an icon, words and
 *                   actions in one row that stacks on a phone
 *   .ico-badge      the yellow rounded square with an icon, the site's picture for "this is about X"
 *   .empty-state    a card saying there is nothing here yet, with what to do about it
 *   .field          a label, its input and a grey help line; every input is the same height
 *   .group          a titled box of choices inside a form (kinds, controls)
 *   .drop           the drop box for a file, with its own button (never the browser's file picker)
 *   .btn            44 px buttons: .primary (blue: a form's action), .sun (yellow: the main thing to
 *                   do on a page), .big, .block (full width), .small (32 px, for rows of tools)
 *   .pill           a short status label, as wide as its words
 */

/* Section heading: one per section, the same size everywhere. */
.section-head,.strip{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.section-head h1,.strip h1{font-size:34px}
.section-head h2,.strip h2{font-size:26px}
.section-head .acts,.strip .acts{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.note,.when{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-weight:600}

/* Surfaces. */
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:22px}
.card.row{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.card.row .words{flex:1 1 240px;display:grid;gap:4px;min-width:0}
.card.row .words h3{font-size:22px}
.card.row .acts{display:flex;gap:10px;flex-wrap:wrap}
@media (max-width:700px){
  .card.row .acts{width:100%}
  .card.row .acts .btn{flex:1;justify-content:center}
}
.ico-badge{width:52px;height:52px;border-radius:16px;background:var(--sun);color:#14161f;display:grid;place-items:center;flex:none}
.ico-badge svg.i{width:28px;height:28px}

/* Nothing here yet: a picture, a line, and what to do. */
.empty-state{display:grid;justify-items:center;text-align:center;gap:10px;padding:40px 24px;max-width:560px;margin:8px auto 0}
.empty-state h2{font-size:24px}
.empty-state p{color:var(--muted);max-width:42ch}
.empty-state .acts{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:6px}

/* Form fields: one height, one look. */
.field{display:grid;gap:6px;font-weight:700;font-size:15px;min-width:0}
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{font:400 16px var(--body);color:var(--ink);background:var(--paper);border:1.5px solid var(--line);
  border-radius:12px;padding:0 12px;height:44px;width:100%}
.field textarea{height:auto;min-height:88px;padding:10px 12px;line-height:1.45;resize:vertical}
.field small{font-weight:400;font-size:13px;color:var(--muted)}
.card .field input:not([type=checkbox]),.card .field select,.card .field textarea{background:var(--paper)}
.group{border:1px solid var(--line);border-radius:14px;padding:12px 14px 14px;margin:0;min-width:0}
.group legend{font-weight:700;font-size:15px;padding:0 6px}

/* A file to send: a big box that is its own button; the real file input is hidden inside it. */
.drop{display:grid;justify-items:center;gap:6px;text-align:center;padding:26px 16px;border:2px dashed var(--line);border-radius:18px;background:var(--card);cursor:pointer;color:var(--ink)}
.drop:hover,.drop.over{border-color:var(--blue)}
.drop.chosen{border-style:solid;border-color:var(--tidy)}
.drop:focus-within{outline:3px solid var(--sun);outline-offset:2px}
.drop b{font-size:16px}
.drop small{font-weight:400;font-size:14px;color:var(--muted)}
.drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}

/* Buttons, by size. */
.btn{height:44px;padding:0 20px;justify-content:center;white-space:nowrap}
.btn.big{height:52px;padding:0 26px}
.btn.block{width:100%}
.btn.small,button.sm{height:32px;padding:0 12px;font:600 13px var(--body);border-width:1.5px;border-color:var(--line);gap:5px}
.btn.small svg.i,button.sm svg.i{width:15px;height:15px}
button:disabled,.btn[aria-disabled="true"]{opacity:.55;cursor:not-allowed}

/* Status pills: as wide as their words, never stretched. */
.pill{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;width:auto;white-space:nowrap;font:600 13px var(--body);padding:5px 12px;border-radius:999px;
  background:var(--t,var(--c,var(--solid)));color:var(--on-t,#fff)}
.pill.big{font-size:14px;padding:7px 14px}
.qrow .pill,.rhead .pill,.subhead .pill{justify-self:start;align-self:center}
/* On a dark page a solid pastel pill glares: there it is a tint of its colour, with the colour as text. */
:root[data-theme="dark"] .pill[class*="st-"]{background:color-mix(in srgb,var(--t) 20%,var(--card));color:var(--t);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--t) 40%,transparent)}
