:root, body.theme-kestrel { --bg: #faf8f5; --surface: #ffffff; --surface-alt: #f3efe8; --ink: #1c2421; --muted: #57605c; --brand: #16302b; --brand-2: #3b6e5c; --accent: #b85032; --border: #e5e0d8; --ok-bg: #dcfce7; --ok-ink: #166534; --warn-bg: #fef3c7; --warn-ink: #854d0e; --alert-bg: #fee2e2; --alert-ink: #991b1b; --focus: #1d4ed8; --radius: 12px; --font-head: Georgia, "Times New Roman", serif; --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body.theme-vanguard { --bg: #f1f5f9; --surface-alt: #e2e8f0; --ink: #0f172a; --muted: #475569; --brand: #0f2942; --brand-2: #1d4ed8; --accent: #b91c1c; --border: #cbd5e1; --radius: 8px; --font-head: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body.theme-hearth { --bg: #fbf9f5; --surface-alt: #f4efe6; --ink: #241e2c; --muted: #5c5368; --brand: #1b4332; --brand-2: #0e7490; --accent: #c27803; --border: #e7dfd3; --radius: 18px; --font-head: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* Configuration Studio styles. All colour, radius and type come from the shared design tokens
   (design/tokens/design-tokens.json). Token names follow Gemini's concepts; theme classes switch them. */
/* Token values are generated from design/tokens/design-tokens.json at build time. */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.5; font-size: 15px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--brand); margin: 0 0 8px; line-height: 1.25; }
h2 { font-size: 1.3rem; } h3 { font-size: 1.02rem; }
p { margin: 4px 0 10px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.title { margin: 0; font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--brand); }
.sub { font-size: .85rem; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.layout { display: grid; grid-template-columns: 200px 1fr; min-height: calc(100vh - 64px); }
.sidenav { background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; }
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: calc(var(--radius) * .6); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.sidenav button:hover { background: var(--surface-alt); }
.sidenav button.active { background: var(--brand); color: #fff; }
main { padding: 18px 22px; outline: none; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.btn, button.chip { border: 1px solid var(--border); background: var(--surface); color: var(--ink); padding: 7px 12px; border-radius: calc(var(--radius) * .65); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn:hover:not(:disabled):not(.primary) { background: var(--surface-alt); }
.btn.primary:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); color: #fff; } /* white text stays readable on hover */
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.danger { color: var(--alert-ink); border-color: var(--alert-ink); }
.btn.small { padding: 3px 8px; font-size: .8rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-pressed="true"] { background: var(--brand-2); color: #fff; }
.linklike { border: 0; background: none; color: var(--brand-2); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--muted); border-radius: calc(var(--radius) * .5); padding: 6px 9px; max-width: 100%; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-alt); color: var(--muted); }
label { font-weight: 600; font-size: .88rem; display: inline-block; margin-top: 8px; }
aside label, .props label, .dialog label { display: block; }
.props input, .props textarea, .props select, .dialog input, .dialog select, .dialog textarea { width: 100%; }
fieldset { border: 1px solid var(--border); border-radius: calc(var(--radius) * .6); margin: 10px 0; padding: 6px 10px 10px; }
legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-alt); color: var(--ink); vertical-align: middle; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); } .pill.warn { background: var(--warn-bg); color: var(--warn-ink); } .pill.alert { background: var(--alert-bg); color: var(--alert-ink); }
.lock { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-alt); color: var(--ink); border: 1px solid var(--border); }
.lock-safeguarding { background: var(--alert-bg); color: var(--alert-ink); }
.lock-regulatory { background: var(--warn-bg); color: var(--warn-ink); }
.help, .muted { color: var(--muted); font-size: .86rem; }
.why { color: var(--muted); font-size: .8rem; margin: 2px 0 6px; }
.req { color: var(--alert-ink); font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.spacer { flex: 1; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.builder { display: grid; grid-template-columns: 180px minmax(260px, 1fr) 320px; gap: 14px; align-items: start; }
.palette { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.palette-item { text-align: left; cursor: grab; }
.sortable { list-style: none; padding: 0; margin: 0; min-height: 60px; border-radius: calc(var(--radius) * .6); }
.sortable.drop-target { outline: 2px dashed var(--brand-2); outline-offset: 4px; }
.sortable-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 3px solid transparent; }
.sortable-item.drop-before { border-top-color: var(--brand-2); }
.sortable-item.dragging { opacity: .4; }
.sortable-body { flex: 1; min-width: 0; }
.grip { color: var(--muted); cursor: grab; width: 14px; user-select: none; }
.fixed .grip { cursor: default; }
.move { display: flex; gap: 2px; } .move .btn { padding: 2px 7px; }
.field-card { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: calc(var(--radius) * .7); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.field-card:hover { border-color: var(--brand-2); }
.field-card.selected { border: 2px solid var(--brand); background: var(--surface-alt); }
.field-card.is-hidden { border-style: dashed; background: var(--surface-alt); }
.fc-label { font-weight: 700; } .fc-meta { font-size: .8rem; color: var(--muted); }
.props { position: sticky; top: 10px; }
.toggle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.toggle-row label { margin: 0; }
.switch { width: 44px; height: 24px; border-radius: 999px; border: 1px solid var(--muted); background: var(--surface-alt); position: relative; cursor: pointer; padding: 0; }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: left .15s; }
.switch[aria-checked="true"] { background: var(--brand-2); border-color: var(--brand-2); }
.switch[aria-checked="true"] .knob { left: 22px; background: #fff; }
.switch:disabled { opacity: .6; cursor: not-allowed; }
.mini { display: inline-block; margin-right: 8px; } .mini input { width: 110px; }
.opts { list-style: none; padding: 0; margin: 0 0 6px; } .opts li { display: flex; gap: 6px; margin-bottom: 4px; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.retired { margin-top: 10px; color: var(--muted); }
.issues { list-style: none; padding: 0; margin: 0; } .issues li { padding: 6px 8px; border-left: 4px solid var(--warn-ink); background: var(--warn-bg); margin-bottom: 6px; border-radius: 4px; font-size: .88rem; }
.issues li.error { border-left-color: var(--alert-ink); background: var(--alert-bg); }
.sev { font-weight: 700; } .code { color: var(--muted); font-size: .75rem; }
.ok-text { color: var(--ok-ink); font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.preview-wrap { display: grid; grid-template-columns: minmax(280px, 640px) 1fr; gap: 14px; align-items: start; }
.pv-field { margin-bottom: 14px; } .pv-field input, .pv-field textarea, .pv-field select { width: 100%; }
.pv-field .lbl { font-weight: 600; font-size: .88rem; }
.pv-field.has-error { border-left: 4px solid var(--alert-ink); padding-left: 10px; }
.err { color: var(--alert-ink); font-weight: 600; font-size: .86rem; }
.err-summary { border: 3px solid var(--alert-ink); padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.err-summary a { color: var(--alert-ink); }
.yesno { display: flex; gap: 16px; } .yesno label { font-weight: 400; margin: 4px 0; }
.trace li.fail { color: var(--alert-ink); } .trace { font-size: .88rem; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .88rem; }
.table caption { text-align: left; color: var(--muted); padding: 6px 0; font-size: .85rem; }
.table th, .table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table.compact td, .table.compact th { padding: 3px 6px; }
.bar { display: inline-block; height: 8px; width: var(--w); min-width: 2px; background: var(--brand-2); border-radius: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.module.off { border-style: dashed; background: var(--surface-alt); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tile .big { font-size: 2rem; font-weight: 700; color: var(--brand); margin: 0; font-variant-numeric: tabular-nums; }
.alert-text { color: var(--alert-ink) !important; }
.tile ul { padding-left: 18px; font-size: .85rem; margin: 4px 0; }
.nav-edit input { width: 180px; } .roles { font-size: .82rem; } .roles label { font-weight: 400; margin-right: 10px; display: inline; }
.nav-preview { background: var(--brand); border-radius: var(--radius); padding: 10px; margin-top: 10px; }
.nav-preview ul { list-style: none; margin: 0; padding: 0; } .nav-preview li { color: #fff; padding: 6px 10px; border-radius: 6px; font-weight: 600; }
.auto { display: grid; grid-template-columns: 260px 1fr; gap: 14px; align-items: start; }
.wf-list { list-style: none; padding: 0; } .wf-list button { width: 100%; text-align: left; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 6px; font: inherit; cursor: pointer; color: var(--ink); }
.wf-list button.active { border: 2px solid var(--brand); background: var(--surface-alt); }
.title-input { font-size: 1.05rem; font-weight: 700; min-width: 260px; }
.flow { display: flex; flex-direction: column; gap: 0; align-items: flex-start; margin: 10px 0; }
.flow-node { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-radius: calc(var(--radius) * .7); border: 1px solid var(--border); background: var(--surface-alt); position: relative; margin-bottom: 18px; }
.flow-node::after { content: ""; position: absolute; left: 24px; bottom: -18px; width: 2px; height: 16px; background: var(--muted); }
.flow-node.trigger { border-left: 5px solid var(--brand); } .flow-node.condition { border-left: 5px solid var(--warn-ink); } .flow-node.action { border-left: 5px solid var(--ok-ink); }
.node-kind { font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; color: var(--muted); }
.dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; max-width: 560px; width: 92vw; background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: rgba(0, 0, 0, .35); }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.block { border-left: 4px solid var(--alert-ink); background: var(--alert-bg); padding: 6px 10px; border-radius: 4px; }
.status { position: fixed; bottom: 14px; right: 14px; background: var(--brand); color: #fff; padding: 10px 14px; border-radius: 8px; max-width: 420px; font-weight: 600; }
.status:empty { display: none; } .status.error { background: var(--alert-ink); } .status.ok { background: var(--ok-ink); }
.code-block { font-size: .75rem; max-height: 260px; overflow: auto; background: var(--surface-alt); padding: 8px; border-radius: 6px; }
.check { display: block; font-weight: 400; margin: 2px 0; }
.result ul { font-size: .88rem; } .result li.error { color: var(--alert-ink); }
@media (max-width: 1100px) { .builder { grid-template-columns: 1fr; } .palette { position: static; flex-direction: row; flex-wrap: wrap; } .props { position: static; } .two, .preview-wrap, .auto { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .layout { grid-template-columns: 1fr; } .sidenav ul { display: flex; flex-wrap: wrap; gap: 4px; } .sidenav button { width: auto; } }
main:focus-visible { outline: none; }

/* Application additions on top of the shared design tokens and studio styles. */
.loading { padding: 24px; }
.banner { background: var(--alert-bg, #fff4e5); color: var(--alert-ink, #7a3e00); border-bottom: 1px solid var(--border); padding: 6px 20px; font-size: .82rem; }
.banner strong { font-weight: 700; }
.signin { max-width: 560px; margin: 48px auto; }
.people { display: grid; gap: 10px; margin-top: 12px; }
.person { text-align: left; display: block; width: 100%; padding: 12px 14px; }
.person small { display: block; color: var(--muted); font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; font: inherit; color: var(--ink); }
.tile .num { display: block; font-size: 1.9rem; font-weight: 700; font-family: var(--font-head); color: var(--brand); }
.tile.alert .num { color: var(--alert-ink); }
.tile:hover { background: var(--surface-alt); }
table.list { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.list th, table.list td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.list th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.form-grid .q { margin-bottom: 12px; }
.form-grid .q > label { display: block; }
.form-grid input[type=text], .form-grid input[type=number], .form-grid input[type=date], .form-grid textarea, .form-grid select { width: 100%; max-width: 640px; }
.form-grid textarea { min-height: 84px; }
.help { color: var(--muted); font-size: .82rem; margin: 2px 0 4px; }
.err { color: var(--alert-ink); font-weight: 600; font-size: .85rem; }
.q.has-err input, .q.has-err textarea, .q.has-err select { border-color: var(--alert-ink); border-width: 2px; }
.errsum { border: 2px solid var(--alert-ink); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.errsum:focus { outline: 3px solid var(--focus); }
dl.rec { display: grid; grid-template-columns: minmax(160px, 260px) 1fr; gap: 6px 14px; }
dl.rec dt { font-weight: 700; color: var(--muted); }
dl.rec dd { margin: 0; white-space: pre-wrap; }
.restricted { font-style: italic; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 3px solid var(--brand-2); padding: 4px 0 10px 12px; margin-left: 4px; }
.timeline .meta { font-size: .8rem; color: var(--muted); }
.notice { background: var(--surface-alt); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.sim { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--alert-ink); }
.who { font-size: .85rem; text-align: right; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form label { display: block; margin-top: 0; }
.muted { color: var(--muted); }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } .sidenav ul { display: flex; flex-wrap: wrap; gap: 4px; } .sidenav button { width: auto; } dl.rec { grid-template-columns: 1fr; } }
#status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.radio { display: inline-block; margin-right: 14px; font-weight: 400; }
.card textarea#note { width: 100%; }

/* Rota (O-13) */
.rota .shift { padding: .25rem .4rem; margin: .15rem 0; border-left: 4px solid var(--border, #c9c2b6); }
.rota .shift.mine { border-left-color: var(--ok, #2f6b3f); font-weight: 600; }
.rota .shift.cancelled { text-decoration: line-through; opacity: .8; }
.rota .shift.draft { border-left-style: dashed; background: var(--surface-2, #f6f3ee); }
.rota .shift.open { border-left-color: var(--alert, #a3361f); }

/* Young person's portal: large touch targets, generous spacing, plain layout. */
.portal main { max-width: 46rem; margin: 0 auto; padding: 1rem; }
.portal .btn { min-height: 48px; font-size: 1.05rem; padding: .6rem 1rem; }
.portal .pfield { margin: .6rem 0; }
.portal .pfield textarea, .portal .pfield input[type=text], .portal .pfield select { width: 100%; min-height: 44px; font-size: 1rem; }
.portal .moods, .portal .plan { border: 1px solid var(--border, #c9c2b6); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0; }
.portal .mood { display: inline-flex; align-items: center; min-height: 44px; margin: .2rem .8rem .2rem 0; font-size: 1.05rem; }
.portal input[type=radio], .portal input[type=checkbox] { width: 1.3rem; height: 1.3rem; }
.plist { padding-left: 1.1rem; } .plist > li { margin: .45rem 0; }
.reply { margin: .25rem 0 0 .8rem; padding-left: .5rem; border-left: 3px solid var(--ok, #2f6b3f); }
.portal .crisis { border: 3px solid var(--alert, #a3361f); border-radius: 8px; padding: .6rem 1rem; margin: .8rem 0; background: var(--surface, #fff); }
.portal .crisis h3 { margin-top: 0; }
.btn.listen { margin-left: .4rem; }
dialog#quick_edit { max-width: 34rem; width: 92vw; border: 1px solid var(--border, #c9c2b6); border-radius: 10px; padding: 1rem 1.2rem; }
dialog#quick_edit::backdrop { background: rgba(0,0,0,.35); }
fieldset.homes { border: 1px solid var(--border, #c9c2b6); border-radius: 8px; padding: .4rem .8rem; }
label.chk { display: inline-flex; align-items: center; min-height: 40px; margin-right: 1rem; }
.profile-head { display: flex; gap: 1rem; align-items: center; margin-bottom: .6rem; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2, #ece6dc); color: var(--text, #1f1d1a); font-weight: 700; object-fit: cover; vertical-align: middle; }
.avatar.big { width: 72px; height: 72px; font-size: 1.5rem; } .avatar.small { width: 32px; height: 32px; font-size: .85rem; }
.slogan { font-style: italic; margin: .2rem 0 0; }
ul.team { list-style: none; padding: 0; } ul.team li { margin: .4rem 0; }
/* Statistics (O-08): single-series bars, 4px rounded data end, 2px gaps, recessive axis. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.stat { border: 1px solid var(--border, #c9c2b6); border-radius: 8px; padding: .6rem .8rem; }
.stat-num { font-size: 1.6rem; font-weight: 700; } .stat-label { font-size: .95rem; }
figure.chart { margin: 0 0 1rem; } figure.chart figcaption { font-weight: 600; margin-bottom: .4rem; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 190px; border-bottom: 1px solid var(--border, #c9c2b6); padding: 0 .2rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 2rem; height: 100%; }
.bar { width: 60%; max-width: 3rem; background: #257de0; border-radius: 4px 4px 0 0; }
.bar-col:hover .bar { outline: 2px solid var(--text, #1f1d1a); outline-offset: 1px; }
.bar-val { font-size: .85rem; min-height: 1.1rem; } .bar-x { font-size: .8rem; color: var(--muted, #5f5a52); margin-top: .25rem; white-space: nowrap; }

/* Visual consolidation (owner O-02: plain, common, easy-to-read fonts; GEMINI-010 review pending). */
h1, h2, h3, h4, .title, .tile .num { font-family: var(--font-body); letter-spacing: -0.01em; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.1rem; }
a { color: var(--brand-2, #1d4ed8); text-underline-offset: 2px; }
.nav-group + .nav-group { margin-top: .8rem; }
.nav-head { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .2rem .75rem .3rem; font-weight: 700; }
.menu-toggle { display: none; }
.sidenav .menu-toggle { border: 1px solid var(--border); background: var(--surface); padding: .7rem 1rem; font-weight: 700; }
.tiles.small .tile { padding: .6rem .8rem; } .tiles.small .tile .num { font-size: 1.3rem; }
.all-clear { padding: .6rem .8rem; border-radius: var(--radius, 10px); background: var(--surface, #fff); border: 1px solid var(--border); }
.all-clear-list { margin-top: -.2rem; }
@media (max-width: 760px) {
  .menu-toggle { display: block; width: 100%; text-align: left; }
  .sidenav #nav_groups { display: none; }
  .sidenav.open #nav_groups { display: block; }
  .sidenav ul { display: block; } .sidenav button { width: 100%; }
  table.list th, table.list td { padding: .35rem .3rem; font-size: .85rem; overflow-wrap: anywhere; } /* wrap, never scroll sideways */
}

/* Round 2 (GEMINI-010). */
html { font-size: 16px; } body { font-size: 1rem; } input, select, textarea { font-size: 1rem; } /* 16px: no zoom-on-focus on phones */
.tile.warn .num { color: #8a4b06; }
.nav-badge { display: inline-block; margin-left: .45rem; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: #b42318; color: #fff; font-size: .75rem; line-height: 1.4rem; text-align: center; font-variant-numeric: tabular-nums; }
.zero-pills { list-style: none; padding: 0; margin: .3rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.zero-pill { border: 1px solid var(--border); background: #eef2f0; color: #3d4f4a; border-radius: 999px; padding: .3rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }
/* The young person's space has its own calmer look (never the staff shell). */
.portal { --brand: #234e52; --brand-2: #2c6268; background: #faf9f6; }
.portal .card { border-radius: 14px; padding: 20px; }
.portal .btn.primary { background: #234e52; border-color: #234e52; }
.portal .btn.primary:hover:not(:disabled) { background: #2c6268; border-color: #2c6268; }
.portal main { max-width: 40rem; }
.small-note { font-size: .8rem; max-width: 22rem; } .preview-form { border: 2px dashed var(--border); border-radius: var(--radius); padding: .8rem; margin-top: .5rem; }
.card.triage { border-left: 5px solid #b42318; } .num-tab { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Phones: bottom tab bar (GEMINI-010). */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar button { min-height: 52px; border: 0; background: none; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); border-radius: 8px; }
  .tabbar button.active, .tabbar button[aria-expanded="true"] { background: var(--brand); color: #fff; }
  main#main { padding-bottom: 84px; }
  .sidenav { border: 0; padding: 0; }
  .sidenav.open #nav_groups { position: fixed; left: 0; right: 0; bottom: 64px; max-height: 70vh; overflow-y: auto; z-index: 19; background: var(--surface); border-top: 1px solid var(--border); padding: 8px; box-shadow: 0 -6px 20px rgba(0,0,0,.12); }
}
/* Guided testing (O-15): one check per screen. */
.qg { max-width: 720px; }
.qg progress { width: 100%; height: 10px; accent-color: var(--brand); margin: 4px 0 12px; }
.qg-list { padding-left: 1.3rem; line-height: 1.55; }
.qg-list li { margin-bottom: 10px; }
.qg-answers { display: grid; gap: 6px; border: 0; padding: 0; margin: 12px 0; }
.qg-answers legend { font-weight: 700; margin-bottom: 6px; }
label.chk.qg-answer { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; margin: 0; background: var(--surface); }
label.chk.qg-answer:has(input:checked) { border-color: var(--brand); background: var(--surface-alt); }
.qg textarea { width: 100%; }
.qg-areas { display: flex; flex-wrap: wrap; border: 0; padding: 0; }
.banner-test { background: #fde8e8; color: #7a1010; font-size: .9rem; padding: 8px 20px; }
.banner .build { opacity: .8; font-size: .78rem; }
/* Guided tours: choose one role (ChatGPT beta direction, GEMINI-011). */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 12px 0; }
.tour-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; }
.tour-card h4 { margin: 0 0 6px; }
.tour-card p { margin: 0 0 8px; }
.tour-card .btn { margin-top: auto; align-self: flex-start; }
.qg-tags, .qg-ease { display: grid; gap: 6px; border: 0; padding: 0; margin: 12px 0; }
.qg-tags legend, .qg-ease legend { font-weight: 700; margin-bottom: 6px; }
.qg-tags[hidden] { display: none; }
.qg-scenario { border-left: 4px solid var(--brand); }
.qg-icon { display: inline-block; width: 1.6em; text-align: center; }
.qg-tags label.chk { padding: 2px 0; }
/* Central feedback desk (testing coordinator) */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; align-items: end; }
.filters select, .filters input { width: 100%; box-sizing: border-box; }
.fb-item q { font-style: italic; }
main.coordinator { max-width: 70rem; margin: 0 auto; padding: 1rem; }
