/* Staff app layout. Colours and type come from brand/tokens.css (served as /static/brand/tokens.css).
   Fonts are self-hosted (static/fonts, SIL OFL); nothing is loaded from Google Fonts. */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.e7198b2dcb57.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-ext-400-normal.17898728c63b.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.9e606da1cbeb.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-ext-600-normal.e2a7d38baea7.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.1c0792ac34ef.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-ext-700-normal.7b0c49b295bd.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-700-normal.5f860de71c07.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-ext-700-normal.6b897cc95b7a.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("../fonts/hind-latin-400-normal.4c5bc71b3cf6.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("../fonts/hind-latin-ext-400-normal.2a0bff8b7eb5.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("../fonts/hind-latin-600-normal.e9224cf8a465.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("../fonts/hind-latin-ext-600-normal.875fea80cfb8.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 700; font-display: swap; src: url("../fonts/hind-latin-700-normal.376d4202f030.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 700; font-display: swap; src: url("../fonts/hind-latin-ext-700-normal.e20e045d0f41.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--vae-bg); color: var(--vae-text); font: 16px/1.5 var(--vae-font-body); }
h1, h2, h3 { font-family: var(--vae-font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-family: var(--vae-font-subheading); font-size: 1.05rem; }
a { color: var(--vae-primary); }
/* Skip link (audit UX-23): hidden until focused, then the first thing a keyboard reaches. */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--vae-bg); color: var(--vae-primary); padding: 8px 14px; border: 2px solid var(--vae-primary); }
.skip-link:focus { top: 8px; }
.main:focus { outline: none; }
img { max-width: 100%; height: auto; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--vae-nav-bg); color: var(--vae-nav-text); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.sidebar a { color: var(--vae-nav-text); text-decoration: none; }
.sidebar .brand img { width: 100%; max-width: 190px; display: block; }
.sidebar .org { font-family: var(--vae-font-heading); font-weight: 700; font-size: 1.05rem; word-break: break-word; }
.sidebar .state { display: inline-block; margin-top: 4px; font-size: .78rem; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.15); }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar nav .module { font-family: var(--vae-font-subheading); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; margin: 10px 0 4px; }
.sidebar nav .module small { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.sidebar nav a { display: block; padding: 8px 10px; border-radius: 6px; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: rgba(255,255,255,.14); }
.sidebar .me { margin-top: auto; font-size: .9rem; display: grid; gap: 6px; }
.sidebar .language-switch { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.main { padding: 28px 32px; min-width: 0; }
.topbar > * { min-width: 0; }
.topbar h1 { overflow-wrap: anywhere; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.card { overflow-wrap: anywhere; background: var(--vae-surface); border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.06); margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.muted { color: var(--vae-text-muted); }
.notice { border-left: 4px solid var(--vae-attention); padding: 6px 10px; margin: 10px 0; }
.notice p { margin: 0 0 6px; }
.needs-you { background: var(--vae-attention); color: var(--vae-on-attention); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
/* grey text is unreadable on the attention colour (audit contrast): keep it the box's own colour */
.needs-you .muted { color: inherit; }
.banner { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; background: var(--vae-surface-muted); }
.learning-notice form { display: inline-block; margin: 0 8px 8px 0; }
.learning-notice p { margin: 0 0 8px; }
.banner.attention { background: var(--vae-attention); color: var(--vae-on-attention); }
.error { color: #a40000; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: var(--vae-surface); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--vae-surface-muted); vertical-align: top; }
th { font-family: var(--vae-font-subheading); font-size: .85rem; color: var(--vae-text-muted); }
.table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

form .field { display: grid; gap: 4px; margin-bottom: 12px; }
label { font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; color: #212121; width: 100%; min-height: 40px; }
button, .button { font-family: var(--vae-font-heading); font-weight: 600; font-size: .95rem; border: 0; border-radius: 6px; padding: 10px 16px; min-height: 40px; cursor: pointer; background: var(--vae-primary); color: var(--vae-on-primary); text-decoration: none; display: inline-block; }
button.secondary, .button.secondary { background: var(--vae-surface-muted); color: var(--vae-text); }
button.link { background: none; color: inherit; padding: 0; min-height: 0; font: inherit; text-decoration: underline; }

.auth { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.auth .logo { width: 260px; max-width: 100%; display: block; margin: 0 auto 24px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: 12px 16px; gap: 10px; }
  .sidebar .brand img { max-width: 150px; }
  .sidebar nav ul { grid-auto-flow: row; }
  .main { padding: 18px 16px; }
  /* Short pages: the header takes its own height, no empty blue band under "Menu" (audit UX-22) */
  .layout { min-height: 0; grid-template-rows: auto 1fr; }
  .layout, .sidebar { align-content: start; }
  .sidebar .me { margin-top: 0; }
  .sidebar nav a { padding: 12px 10px; }
}

/* Headings after a table or a card do not touch it (audit UX-22) */
.table-wrap + h2, .table-wrap + h3, table + h2, table + h3, .card + h2, .card + h3, form + h2, form + h3 { margin-top: 1.4em; }

/* Phone tap targets: 44 px, with room between stacked ones (audit UX-16) */
@media (max-width: 640px) {
  button, .button, summary, button.link, select, input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
  button.link { padding: 10px 6px; }
  label.check { min-height: 44px; margin-right: 8px; }
  label.check input, input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
  details.member-access > summary, details.fold-on-phone > summary { display: inline-flex; align-items: center; }
  .sidebar .me > * { min-height: 44px; display: flex; align-items: center; }
  .sidebar .me { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 0; }  /* the person's links in rows, not one tall column (lane s5) */
  .sidebar .me > span:first-child { flex: 1 0 100%; }
  .sidebar a.brand, .sidebar .brand a { display: flex; align-items: center; min-height: 44px; }
  a.button { min-width: 44px; text-align: center; }
  .main td a, .main li a, .main dd a, .main .card > a:not(.button), .main > a, .main .topbar a, a.phone, .pager a, .call-head a, a.tap {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
  .voice-bar button.voice-mic { min-height: 44px; min-width: 44px; }
  label.tick-phone { min-width: 44px; justify-content: center; } /* a tick box alone before a link (Ravens planner) */
  .inline-form, .button-row { gap: 10px; }
}

/* Screens: filters, timelines, call list, small forms */
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 14px; }
/* a tick box on its own in a table row: the whole 44 px square takes the tap */
label.tick { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0; cursor: pointer; }
label.check input, input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.card.narrow { max-width: 560px; }
ul.hints { font-size: .875em; padding-left: 1.2em; }
.members li { margin-bottom: 6px; overflow-wrap: anywhere; }
details.member-access > summary { cursor: pointer; display: inline-block; text-decoration: underline; }
details.member-access[open] { margin: 6px 0 10px; }
details.member-access form { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
/* A tick box in a search row keeps its own size and its label on one line (round 4, A4: "Archived" wrapped one
   letter per line on a phone because the box took the text field's share of the row). */
.inline-form input[type="checkbox"], .inline-form input[type="radio"] { flex: 0 0 auto; }
.inline-form label.check { flex: 0 0 auto; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.timeline li { border-left: 3px solid var(--vae-surface-muted); padding-left: 10px; overflow-wrap: anywhere; }
/* An undone entry stays at full contrast (audit UX-14): a dashed rule and a struck title mark it, the reason is plain text. */
.timeline li.undone { border-left-style: dashed; }
.timeline li.undone > strong { text-decoration: line-through; }
.card.call .call-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.card.call .phone { font-size: 1.1rem; font-weight: 600; }
/* break-word, not anywhere: `anywhere` lowers the min-content width, so an auto-layout table squeezed short columns
   below the width of a word and broke it letter by letter (audit UX-8). A cell too long for the screen scrolls in .table-wrap. */
td, th { overflow-wrap: break-word; }
/* Control → Nightly counts: numbers and their headings never break inside a word (the table name wraps instead). */
.counts th, .counts td.n { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 720px) { .counts td.n { white-space: normal; } }
code { overflow-wrap: anywhere; }
/* The journal (UX-7): the date on one line on wide screens, changes as a tight list. */
@media (min-width: 641px) { table.journal td.nowrap { white-space: nowrap; } }
table.journal ul.changes { margin: 0; padding-left: 1.1em; }

@media (max-width: 640px) {
  table.stack-on-phone thead { display: none; }
  table.stack-on-phone, table.stack-on-phone tbody, table.stack-on-phone tr, table.stack-on-phone td { display: block; width: 100%; }
  table.stack-on-phone tr { border-bottom: 1px solid var(--vae-surface-muted); padding: 8px 0; }
  table.stack-on-phone td { border: 0; padding: 3px 10px; }
  table.stack-on-phone td[data-label]::before { content: attr(data-label) ": "; color: var(--vae-text-muted); font-size: .85rem; }
  .outbox-actions form { display: inline-block; margin: 6px 6px 0 0; }
  .grid.wide { grid-template-columns: 1fr; }
}

/* The main menu: always shown on wide screens, folded behind "Menu" on phones */
details.menu > summary { list-style: none; cursor: pointer; font-family: var(--vae-font-heading); font-weight: 600; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.14); display: none; }
details.menu > summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) {
  details.menu > summary { display: inline-block; }
  details.menu > summary::after { content: " ▾"; }
  details.menu[open] > summary::after { content: " ▴"; }
  details.menu nav { margin-top: 8px; }
}

/* The Desk: report button and panel */
.report-button { position: fixed; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 20; }
dialog#desk-report { border: none; border-radius: 10px; padding: 20px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
dialog#desk-report::backdrop { background: rgba(0,0,0,.35); }
/* Send and Cancel stay in reach while the panel scrolls */
dialog#desk-report .button-row { position: sticky; bottom: -20px; background: #fff; padding: 12px 0 20px; margin-bottom: -20px; border-top: 1px solid rgba(0,0,0,.08); }
.desk-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Room at the end of every page so the round button never covers the last line or button */
body.has-report .main { padding-bottom: 88px; }
.desk-ask { margin-top: 18px; }
.desk-shot { display: block; max-width: 100%; max-height: 220px; margin: 6px 0; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; }
.desk-batches { padding-left: 18px; }
.desk-batches li { margin: 6px 0; }
.desk-batches .inline-form { display: inline-flex; margin: 0 0 0 8px; }
/* A question's proposed answers: buttons that fill its answer box (long options wrap, never wider than the card) */
.desk-proposed .label { font-weight: 600; font-size: .92rem; }
.desk-options button { max-width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }

/* The outbox preview: the exact recipient and the whole text, line breaks kept */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.facts dt { font-weight: 600; color: var(--vae-text-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.outbox-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.outbox-html { width: 100%; min-height: 24rem; border: 1px solid var(--line, #ccc); background: #fff; }
.outbox-files { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.outbox-address { overflow-wrap: anywhere; }
.outbox-list th { overflow-wrap: normal; white-space: nowrap; }
.outbox-list .outbox-actions .button { white-space: nowrap; }
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}

/* A block shown on wide screens and folded behind its summary on phones (Kin's lead filters) */
details.fold-on-phone > summary { display: none; cursor: pointer; font-family: var(--vae-font-heading); font-weight: 600; margin-bottom: 8px; }
@media (max-width: 640px) {
  details.fold-on-phone > summary { display: list-item; }
}

/* Imported data (the landing zone): a record as imported, wrapped so nothing scrolls sideways on a phone */
pre.json { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; margin: 0 0 12px; padding: 12px 14px; background: var(--vae-surface-muted); border-radius: 8px; font-size: .85rem; line-height: 1.45; }
.tag { display: inline-block; font-size: .78rem; padding: 0 8px; border-radius: 999px; background: var(--vae-surface-muted); color: var(--vae-text); white-space: nowrap; }
.landing-kinds th, .landing-records th, .landing-files th { overflow-wrap: normal; }
.landing-kinds td.nowrap, .landing-records td.nowrap, .landing-files td.nowrap, .landing-runs td.nowrap { white-space: nowrap; overflow-wrap: normal; }

/* A component's brand on its own pages (docs/names.md): its accent only on the icon and a thin rule, inside the org's theme */
.component-header { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 0 0 10px; border-bottom: 2px solid var(--component-accent, var(--vae-primary)); }
.component-icon { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--component-accent, var(--vae-primary)); color: #fff; font-family: var(--vae-font-heading); font-weight: 700; font-size: .95rem; }
.component-brand { font-family: var(--vae-font-heading); font-weight: 700; font-size: 1.05rem; }
.component-origin { display: block; overflow-wrap: anywhere; }
.module-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.module-search input { width: 14rem; max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand kits (apps/core/branding.py): an organisation's published kit sets the tokens above in base.html.
   Its identity colour is a thin line only; the small "Runs on Valhalla" mark closes the menu. */
.sidebar.branded { border-top: 4px solid var(--brand-identity); }
.sidebar .org-brand img { max-height: 64px; width: auto; max-width: 190px; object-fit: contain; }
.sidebar .org-brand.chip-light img { background: #ffffff; padding: 6px 8px; border-radius: 6px; }
.sidebar .org-brand.chip-dark img { background: #212121; padding: 6px 8px; border-radius: 6px; }
.sidebar .runs-on { display: flex; align-items: center; gap: 6px; font-size: .75rem; opacity: .75; }
.sidebar .runs-on img { width: 16px; height: 16px; }
.brand-preview { border: 1px solid var(--vae-surface-muted); border-radius: 10px; overflow: hidden; display: grid; grid-template-columns: 150px minmax(0, 1fr); background: var(--vae-bg); color: var(--vae-text); font-family: var(--vae-font-body); }
.brand-preview .p-nav { background: var(--vae-nav-bg); color: var(--vae-nav-text); padding: 12px; border-top: 4px solid var(--brand-identity); display: grid; gap: 8px; align-content: start; font-size: .85rem; }
.brand-preview .p-nav img { max-width: 100%; max-height: 48px; width: auto; object-fit: contain; }
.brand-preview .p-nav img.chip-light { background: #ffffff; padding: 4px 6px; border-radius: 6px; }
.brand-preview .p-nav img.chip-dark { background: #212121; padding: 4px 6px; border-radius: 6px; }
.brand-preview .p-main { padding: 14px; min-width: 0; }
.brand-preview h3 { font-family: var(--vae-font-heading); margin: 0 0 8px; }
.brand-preview .p-card { background: var(--vae-surface); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.brand-preview .p-card a { color: var(--vae-primary); }
.brand-preview .p-button { display: inline-block; background: var(--vae-primary); color: var(--vae-on-primary); border-radius: 6px; padding: 6px 12px; font-family: var(--vae-font-heading); font-weight: 700; }
.brand-preview .p-attention { display: inline-block; background: var(--vae-attention); color: var(--vae-on-attention); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.brand-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 14px; }
.brand-colours input[type="color"] { width: 64px; height: 36px; padding: 2px; }
@media (max-width: 860px) { .brand-preview { grid-template-columns: 1fr; } }

/* Voice (docs/speech.md): the 🎤 button under a text field, added by static/js/voice.js only where Voice is on. */
.voice-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.voice-bar .voice-mic { min-height: 36px; padding: 4px 12px; font-size: .9rem; }
.voice-bar .voice-mic[aria-pressed="true"] { background: var(--vae-attention); color: var(--vae-on-attention); }
.voice-bar .voice-status { font-size: .85rem; color: var(--vae-text-muted); min-width: 0; overflow-wrap: anywhere; }

/* Control → Monitoring: one plain state per item; red only past its threshold. */
.state { display: inline-block; border-radius: 6px; padding: 2px 8px; font-weight: 600; white-space: nowrap; background: var(--vae-surface-muted); }
.state-red { background: #a40000; color: #fff; }
.state-off, .state-waiting { background: none; color: var(--vae-text-muted); }

/* The App (gate): the client's own shell, in the organisation's brand (apps/gate/templates/gate/shell.html). */
.gate { min-height: 100vh; display: flex; flex-direction: column; }
.gate-bar { background: var(--vae-nav-bg); color: var(--vae-nav-text); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 24px; }
.gate-bar a, .gate-bar button.link { color: var(--vae-nav-text); }
.gate-brand { font-family: var(--vae-font-heading); font-weight: 700; font-size: 1.1rem; text-decoration: none; overflow-wrap: anywhere; }
.gate-brand img { max-height: 48px; max-width: 200px; width: auto; display: block; object-fit: contain; }
.gate-appname { font-size: 0.85rem; opacity: 0.85; margin-right: auto; }
.gate-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.gate-nav a { text-decoration: none; padding: 6px 0; }
.gate-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.gate-nav button.link { text-decoration: none; }
.gate-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px; min-width: 0; }
.gate-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 24px; font-size: .85rem; color: var(--vae-text-muted); }
.gate-foot .language-switch { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.gate-runs-on { display: inline-flex; align-items: center; gap: 6px; }
.gate-people { padding-left: 18px; }
.gate-password code { font-size: 1.3rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .gate-bar { padding: 10px 16px; } .gate-foot { padding: 10px 16px; } }
.notify-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); align-items: end; }
/* The App's school pages (apps/gate/templates/gate/school*.html). */
.gate-tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 16px; }
.gate-tabs a { text-decoration: none; padding: 4px 0; }
.gate-tabs a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; font-weight: 600; }
.gate-items { list-style: none; padding: 0; margin: 0; }
.gate-items time { display: block; font-size: .9rem; color: var(--vae-text-muted); }

/* Ring icons and logo tiles (round 4, D-05; docs/round4/11-look.md). The drawing is inline SVG; these only place it. */
.ring-icon { display: block; flex: none; border-radius: 50%; }
.logo-tile { display: inline-flex; flex: none; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 50%; background: #ffffff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14); font-weight: 600; }
.logo-tile img { width: 68%; height: 68%; object-fit: contain; }
.logo-tile-initial { font-size: 0.95em; line-height: 1; }

/* Settings › Connections (round 4, D-30): cards with a logo tile, a state pill and one button */
.conn-group { margin: 0 0 28px; }
.conn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-top: 12px; align-items: start; }
.conn-card { display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.conn-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.conn-title { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.conn-pill { flex: none; padding: 2px 10px; border-radius: 12px; font-size: 0.8rem; background: #f4f4f5; color: #3f3f46; white-space: nowrap; }
.conn-pill-ok { background: #dcfce7; color: #14532d; }
.conn-pill-attention { background: #fef3c7; color: #78350f; }
.conn-pill-expiring { background: #ffedd5; color: #7c2d12; }
.conn-card p { margin: 0; overflow-wrap: anywhere; }
.conn-note { padding: 6px 10px; border-radius: 8px; background: #fef3c7; color: #78350f; }
.conn-manage > summary, .conn-ask > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.conn-ask form, .conn-manage form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.conn-found { margin: 4px 0; padding-left: 18px; }
.conn-found span { color: #52525b; }
.conn-open { display: inline-flex; align-items: center; min-height: 44px; }
.conn-steps { margin: 6px 0; padding-left: 22px; }
.conn-key-field { width: 100%; min-height: 48px; font-size: 1.05rem; }
.conn-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.conn-feed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
/* Control › AI usage (round 4, D-35) */
.ai-bar { width: 100%; height: 14px; }
.ai-pool.is-warn .ai-bar { accent-color: #b45309; }
.ai-pool.is-out .ai-bar { accent-color: #a40000; }
.ai-line { font-weight: 600; padding: 6px 10px; border-radius: 6px; }
.ai-line-amber { background: #fef3c7; color: #7c2d12; }
.ai-line-red { background: #a40000; color: #fff; }
.ai-pool-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ai-pool-form input { max-width: 140px; }
.ai-rows { display: grid; gap: 8px; }
.ai-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(80px, 2fr) minmax(90px, auto); align-items: center; gap: 12px; }
.ai-row progress { width: 100%; }
.ai-row > span:first-child { overflow-wrap: anywhere; }
.ai-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ai-option { border: 1px solid var(--vae-border, #ddd); border-radius: 10px; padding: 12px 14px; }
.ai-option.is-chosen { border-color: var(--vae-primary); }
.ai-option form { display: inline; margin: 0; }
/* Settings › People (round 4, D-34) */
.team-list { display: grid; gap: 10px; margin: 0 0 24px; }
.team-person { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; }
.team-who { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.team-off { opacity: .6; }
.team-revoke { margin: 0; }
.team-body { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: var(--vae-bg, #f6f6f6); padding: 12px; border-radius: 8px; }
.team-invite textarea { width: 100%; }
/* Settings › Security: devices and People (round 5, D-05b) */
.sec-devices { margin-top: 16px; }
.sec-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.sec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--vae-border, #ddd); }
.sec-people-list .sec-row { padding: 12px 16px; border-bottom: 0; }
.sec-who { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.sec-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.sec-form select { min-height: 44px; max-width: 100%; }
/* Round 5 (D-05c): one member's page */
.team-member-name, .team-member-email { overflow-wrap: anywhere; }
.team-member-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.team-member-row select { flex: 1 1 180px; min-width: 0; }
.team-member-off-form { margin-top: 16px; border-top: 1px solid var(--vae-border, #ddd); padding-top: 12px; }
.team-member-off-form label.check { white-space: normal; overflow-wrap: anywhere; }
.team-sign-in-list { margin: 0; padding-left: 18px; columns: 2 220px; }
/* Round 6 (P2): the manager's access page */
.access-edit { flex: 1 1 100%; }
.access-form { display: grid; gap: 8px; max-width: 640px; }
.access-form label.check { white-space: normal; margin-right: 0; }
.access-group { border: 1px solid var(--vae-border, #ddd); border-radius: 8px; padding: 6px 12px 10px; margin: 0; min-width: 0; display: grid; gap: 2px; }
.access-group legend { font-weight: 600; padding: 0 6px; }
.access-open input[type="email"], .access-open input[type="date"] { max-width: 100%; }
.access-open form { display: grid; gap: 8px; max-width: 480px; }
/* Control › Connections (round 4, D-36) */
.ctl-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
.ctl-chip { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 10px; background: var(--vae-surface); text-decoration: none; color: inherit; border: 1px solid var(--vae-border, #ddd); min-height: 44px; }
.ctl-chip.is-chosen { border-color: var(--vae-primary); box-shadow: 0 0 0 1px var(--vae-primary); }
.ctl-chip.has-attention small { color: #9a3412; }
.ctl-conn { padding: 12px 16px; margin: 0 0 10px; }
.ctl-conn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.ctl-conn-head > a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }  /* a ticket's reference is a tap target on a phone */
.ctl-technical { margin: 6px 0; overflow-wrap: anywhere; }
.ctl-technical code { font-size: .82rem; white-space: normal; }
.ctl-conn-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.ctl-inline { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.ai-rows + h3, .ai-options + div { margin-top: 20px; }
/* Control › Crew (round 5, M2-02): the profiles and an organisation's crew */
.crew-head { display: flex; align-items: center; gap: 14px; }
.crew-head h2 { margin: 0; }
.crew-dept { margin: 2px 0 0; }
.crew-portrait { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.crew-portrait-sm { width: 32px; height: 32px; vertical-align: middle; }
.crew-text { max-width: 70ch; }
.crew-form textarea { width: 100%; max-width: 70ch; }
.crew-form select { width: auto; min-width: 160px; max-width: 100%; }
.crew-name { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crew-on { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.crew-actions { overflow-wrap: anywhere; }
/* Control › Nightly review (round 4, D-37) */
.review-card { margin: 0 0 10px; padding: 12px 16px; }
.review-card .ctl-conn-head, .review-card .state { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.review-lines { margin: 8px 0 0; padding-left: 18px; }
.review-lines code { font-size: .82rem; white-space: normal; overflow-wrap: anywhere; }

/* A page in a window's frame (round 5, flag ui.windows; apps/core/frames.py): the page alone, no sidebar or shell;
   the window around it is the desktop's. Only the app's own pages to move between. */
body.framed .layout { display: block; min-height: 0; }
body.framed .main { padding: 18px 22px; }
.frame-module-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; padding: 0 0 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
.frame-module-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.frame-module-nav a[aria-current="page"] { font-weight: 700; }
@media (max-width: 640px) { body.framed .main { padding: 12px 14px; } }
/* Settings -> Notifications, round 5 (notify.r5_prefs): one row per notification, its ticks beside each other */
.notify-ticks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: .5rem 1.5rem; }
.notify-ticks fieldset.ticks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.notify-ticks fieldset.ticks legend { padding: 0; font-weight: 600; width: 100%; }
.notify-ticks label.tick { justify-content: flex-start; gap: .35rem; }
/* Odin's ring inside a window's frame (round 5, M2-10; static/js/frame.js): the round 4 ring, breathing gently. */
body.framed .odin-mark { outline: 3px solid var(--vae-primary); outline-offset: 2px; border-radius: 10px; animation: frame-ring 1.4s ease-in-out infinite; }
@keyframes frame-ring { 50% { outline-offset: 5px; } }
@media (prefers-reduced-motion: reduce) { body.framed .odin-mark { animation: none; } }

/* Coming soon (round 5 completion pass): a feature whose screen exists but does not work yet.
   <section class="coming-soon"> …the screen's sample content… {% include "core/_coming_soon.html" with what=… %} </section> */
.coming-soon { position: relative; min-height: 9rem; }
.coming-soon > :not(.coming-soon-note) { filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; }
.coming-soon-note { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: min(26rem, calc(100% - 2rem)); padding: 1rem 1.25rem; background: var(--surface, #fff); color: var(--text, #1a1a1a); border: 1px solid var(--border, #d0d0d0); box-shadow: 0 6px 24px rgba(0, 0, 0, .12); border-radius: .75rem; text-align: center; z-index: 2; }
.coming-soon-tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--accent, #3b5bdb); color: var(--on-accent, #fff); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.coming-soon-title { display: block; margin-top: .5rem; }
.coming-soon-what { margin: .4rem 0 0; font-size: .95rem; }

/* Settings (round 5 completion pass, lane s5): rows like a phone's settings; no fixed widths. */
.settings-rows { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.settings-rows > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border, #e2e2e2); }
.settings-rows > li:last-child { border-bottom: 0; }
.settings-row-link { display: flex; flex: 1 1 100%; align-items: center; justify-content: space-between; gap: .75rem; color: inherit; text-decoration: none; }
.settings-row-title { font-weight: 600; }
.settings-row-go { opacity: .5; font-size: 1.25rem; }
.settings-row-value, .settings-row-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.settings-row-form { flex: 1 1 100%; justify-content: space-between; }
.settings-ask { margin-top: 1rem; }
.plan-facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .5rem 1rem; margin: 0; }
.plan-facts dt { font-weight: 600; }
.plan-facts dd { margin: 0; }
@media (max-width: 520px) { .plan-facts { grid-template-columns: 1fr; } }

/* Control's flags page (lane s5) */
.flag-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.flag-list > li { padding: .35rem 0; border-bottom: 1px solid var(--border, #e2e2e2); }
.flag-list > li:last-child { border-bottom: 0; }
ol.flag-list { list-style: decimal; padding-left: 1.75rem; }
.flag-list input[type=checkbox] { width: auto; min-height: 0; }
.flag-on { color: var(--ok, #2b7a3d); font-size: .8rem; font-weight: 600; }
.flag-group > summary { cursor: pointer; }
.flag-save { position: sticky; bottom: 0; padding: .5rem 0; background: var(--bg, #fff); }
.golive-list { list-style: none; margin: 0; padding: 0; }
.golive-list > li { padding: .35rem 0; border-bottom: 1px solid var(--border, #e2e2e2); }
.golive-list > li:last-child { border-bottom: 0; }
.settings-head-link { color: inherit; text-decoration: none; }
.settings-head-link::after { content: " ›"; opacity: .5; }
.welcome-card { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin: .5rem 1rem; padding: .5rem 1rem; border-radius: 14px; }
/* On a wide screen the desktop is a free canvas with icons and widgets: the card floats, centred under the menu bar, clear of them. */
@media (min-width: 861px) { .welcome-card { position: fixed; top: 44px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem); margin: 0; z-index: 30; box-shadow: 0 6px 24px rgba(0, 0, 0, .12); } }
.welcome-card[hidden] { display: none; }

/* The report panel's annotation step (lane s5, M5-01): the screenshot fills the screen, a small toolbar at the top centre. */
.desk-annotate { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; padding: 0; border: 0; background: rgba(15, 15, 20, .94); color: #fff; }
.desk-annotate::backdrop { background: rgba(0, 0, 0, .6); }
.desk-annotate-bar { position: sticky; top: 8px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; width: fit-content; max-width: calc(100% - 16px); margin: 8px auto 0; padding: .4rem .6rem; border-radius: 14px; background: rgba(255, 255, 255, .95); }
.desk-annotate-bar button { min-height: 40px; }
.desk-annotate-bar button[aria-pressed="true"] { outline: 2px solid var(--accent, #3b5bdb); }
.desk-annotate-hint { text-align: center; margin: .25rem 1rem; color: #ddd; }
.desk-annotate-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.desk-annotate-canvas { display: block; max-width: 100%; max-height: calc(100vh - 110px); height: auto; touch-action: none; cursor: crosshair; background: #fff; }
.desk-annotate-input { position: absolute; width: 150px; }

/* Marketing Machine's figures (round 6, lane r6/mm-camp): the tiles over a campaigns list, the campaign cards with their
   little spend chart, and Today. Tokens only; every grid collapses to one column on a phone. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.tile { background: var(--vae-surface); border-radius: 10px; padding: 12px 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); min-width: 0; overflow-wrap: anywhere; }
.tile .v { font-family: var(--vae-font-heading); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.tile .v small { font-size: .8rem; font-weight: 600; color: var(--vae-text-muted); }
.tile .d { color: var(--vae-text-muted); font-size: .85rem; margin-top: 2px; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: #1b6e3a; }
.delta.down { color: #a40000; }
.ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cc { display: flex; flex-direction: column; gap: 8px; background: var(--vae-surface); border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); color: inherit; text-decoration: none; min-width: 0; border-left: 4px solid var(--vae-surface-muted); }
.cc.live { border-left-color: #1b6e3a; }
.cc.gone { opacity: .65; }
.cc:hover, .cc:focus-visible { box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.cc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cc-name { overflow-wrap: anywhere; }
.cc-m { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cc-m .k { display: block; font-size: .72rem; color: var(--vae-text-muted); }
.cc-m .v { display: block; font-weight: 600; overflow-wrap: anywhere; }
.cc-spark { display: block; line-height: 0; }
.spark { display: block; width: 100%; height: auto; max-height: 64px; }
.spark polygon { fill: var(--vae-surface-muted); stroke: none; }
.spark polyline, .spark line { fill: none; stroke: var(--vae-primary); stroke-width: 1.6; }
.state-live { background: #1b6e3a; color: #fff; }
.seg { display: inline-flex; gap: 4px; margin-left: auto; }
h2.grp { font-size: 1.05rem; margin: 16px 0 8px; }
.small { font-size: .85rem; }
/* Today (apps/ravens/templates/ravens/today.html) */
.today-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.todo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.todo-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-radius: 8px; background: var(--vae-surface-muted); border-left: 4px solid transparent; }
.todo-item.bad { border-left-color: #a40000; }
.todo-item.deadline { border-left-color: #b26a00; }
.todo-item.waiting { border-left-color: #1b5fb4; }
.todo-item .txt { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.today-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.today-posts li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.today-posts .when { font-weight: 700; min-width: 3.2rem; }
progress.limit { width: 100%; height: 10px; }
@media (max-width: 860px) { .today-cols { grid-template-columns: 1fr; } .cc-m { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seg { margin-left: 0; } }

/* The 📞 call bar (round 7 package 4; Synergia Nexus v0.62.0): next to the 🐞 button, on every staff page while the
   live line is on. */
.phb { position: fixed; right: 72px; bottom: 16px; z-index: 21; }
body.shell .phb { bottom: 104px; }
.ph-btn { height: 48px; min-width: 48px; border-radius: 24px; padding: 0 .8rem; font-size: 1.3rem; box-shadow: 0 2px 8px rgba(0,0,0,.2); display: inline-flex; align-items: center; gap: .4rem; }
.ph-t { font-size: .9rem; font-variant-numeric: tabular-nums; }
.phb-ring .ph-btn { animation: phb-pulse 1s ease-in-out infinite; }
.phb-talk .ph-btn { background: var(--ok, #1f7a3a); color: #fff; }
.phb-on .ph-btn { outline: 2px solid var(--ok, #1f7a3a); outline-offset: 2px; }
.ph-drop { position: absolute; right: 0; bottom: 56px; width: min(22rem, calc(100vw - 2rem)); margin: 0; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.ph-drop .phd-wide { width: 100%; }
.ph-drop .phd-dial { display: flex; gap: .4rem; margin: .6rem 0; }
.ph-drop .phd-dial input { flex: 1; min-width: 0; }
.ph-drop .phd-timer { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.ph-drop .phd-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; margin-top: .5rem; }
.ph-drop .dev-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #999; margin-right: .3rem; }
.ph-drop .dev-dot.on { background: var(--ok, #1f7a3a); }
@keyframes phb-pulse { 50% { transform: scale(1.08); } }
@media (max-width: 760px) { body.shell .phb { bottom: calc(var(--tabs-h, 56px) + 12px); right: 76px; } }
@media (prefers-reduced-motion: reduce) { .phb-ring .ph-btn { animation: none; } }
