/* Accurate IT's design system for every page — management and station alike: the tokens of the
   customer's redesigned site (practitioner.digital/accurate-it), with amber and red added as status
   colours only. Spec: docs/superpowers/specs/2026-08-31-system-management-app-design.md, §11. */
/* Inter (text) and Archivo Narrow (headings, standing in for the design's Arial Narrow), Latin and
   Latin Extended, served from here (fonts/OFL-*.txt). A browser fetches a subset only when the page
   has a character in its range, as with Google Fonts. */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, 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: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, 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: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, 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: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-800.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/static/fonts/inter-4.1-latin-ext-800.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, 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: 'Archivo Narrow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/archivo-narrow-3.002-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Narrow'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/static/fonts/archivo-narrow-3.002-latin-ext-700.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
:root {
  --forest-950: #05241b; --forest-900: #073b2a; --forest-800: #0d5039;
  --botanical: #27784e; --action: #42b96f; --action-hover: #62d68e; --action-tint: #e6f5ec;
  --action-line: #b9e3c8; --action-soft: #a8dcbc;
  --mineral-50: #f4f7f5; --mineral-100: #edf2ef; --mineral-200: #d6e0da; --muted: #65736a;
  --ink: #10251d; --ink-2: #33463c; --line: #cbd8d0; --card: #fff;
  /* Status, outside the brand palette: attention and failure. */
  --amber: #f2a93b; --amber-ink: #9a5b00; --amber-tint: #fdf3e1; --amber-line: #ecd2a2;
  --danger: #b3261e; --danger-tint: #fbeceb; --danger-line: #efc2be;
  --heading: 'Archivo Narrow', 'Arial Narrow', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; color: var(--ink);
       background: var(--mineral-50); font-size: 15px; line-height: 1.55;
       min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--forest-800); text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; color: var(--forest-950); line-height: 1.05; }
h1 { font-size: 34px; margin: 0 0 16px; text-transform: uppercase; }
h2 { font-size: 21px; }
:focus-visible { outline: 3px solid var(--forest-800); outline-offset: 2px;
                 box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--action); }

/* ---- header: the forest utility strip, with the logo, over the white navigation bar (spec §11) ---- */
header.site { background: #fff; border-bottom: 1px solid var(--line); }
/* The design's container: 76rem of content inside up to 3rem of gutter. */
header.site .inner { max-width: 1312px; margin: 0 auto; padding: 0 48px; display: flex;
                     flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.utility { background: var(--forest-950); color: #fff; font-size: 13px; }
header.site .utility .inner { min-height: 64px; padding-top: 8px; padding-bottom: 8px; justify-content: flex-end; }
.utility .context { margin-right: auto; color: var(--mineral-200);
                    border-left: 1px solid rgba(255,255,255,.25); padding-left: 16px; }
.utility .context strong { color: #fff; }
.utility .context a, .utility .context .link-button { color: var(--action-hover); }
.utility .context form { display: inline; margin: 0; }
header.site .bar .inner { min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
/* The brand pushes the bell and the user to the right, unless the page's context follows it and
   does the pushing itself. */
.brand { display: flex; align-items: center; gap: 16px; margin-right: auto; text-decoration: none; color: #fff; }
.brand:has(+ .context) { margin-right: 0; }
.brand img { height: 36px; display: block; }
.brand .app { border-left: 1px solid rgba(255,255,255,.25); padding-left: 16px; font-weight: 700;
              font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
nav.main { margin-left: auto; }
nav.main ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 2px 16px; }
nav.main a { display: block; padding: 8px 0; color: var(--forest-900); text-decoration: none;
             font-size: 13.5px; font-weight: 700; }
nav.main a:hover, nav.main a.current { color: var(--forest-800); text-decoration: underline;
             text-decoration-color: var(--action); text-decoration-thickness: 2px; text-underline-offset: 8px; }
main { max-width: 1312px; width: 100%; margin: 0 auto; padding: 32px 48px 64px; flex: 1; }
footer.site { background: var(--forest-950); color: var(--mineral-200); font-size: 12.5px; }
footer.site .inner { max-width: 1312px; margin: 0 auto; padding: 14px 48px; }

/* ---- signed-in user ---- */
.user { position: relative; }
.user > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
                  padding: 4px 8px 4px 4px; border-radius: 2px; border: 1px solid transparent; }
.user > summary::-webkit-details-marker { display: none; }
.user > summary:hover, .user[open] > summary { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
          background: var(--action); color: var(--forest-950); font-weight: 800; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user .name { font-weight: 700; font-size: 14px; line-height: 1.2; color: #fff; }
.caret { width: 8px; height: 8px; border-right: 2px solid var(--mineral-200); border-bottom: 2px solid var(--mineral-200);
         transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.role-badge { position: relative; display: inline-block; font-size: 11px; font-weight: 700;
              letter-spacing: .08em; text-transform: uppercase; color: var(--action-hover);
              background: rgba(98,214,142,.12); border: 1px solid rgba(98,214,142,.4); border-radius: 2px;
              padding: 1px 8px; margin-top: 2px; }
.role-badge .tip { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
                   width: 280px; background: var(--ink); color: var(--mineral-100); text-transform: none;
                   letter-spacing: 0; font-weight: 400; font-size: 12.5px; line-height: 1.45;
                   padding: 10px 12px; border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.role-badge .tip b { color: #fff; }
.role-badge:hover .tip, .role-badge:focus .tip { display: block; }
.user[open] .role-badge .tip { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
        width: min(300px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line);
        border-radius: 2px; box-shadow: 0 1.25rem 3rem rgb(5 36 27 / 15%); color: var(--ink); }
.menu .ident { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.menu .ident .email { color: var(--muted); font-size: 13px; }
.menu h3 { margin: 0; padding: 12px 16px 4px; font-family: 'Inter', sans-serif; font-size: 11.5px;
           font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--botanical); }
.menu .roles { list-style: none; margin: 0; padding: 0 16px 12px; }
.menu .roles li { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.menu .roles li:last-child { border-bottom: 0; }
.menu .roles b { display: block; }
.menu .roles span { color: var(--ink-2); }
.menu form { border-top: 1px solid var(--line); margin: 0; }
.menu form button { width: 100%; text-align: left; background: none; border: 0; padding: 12px 16px;
                    font: inherit; font-weight: 600; color: var(--danger); cursor: pointer;
                    border-radius: 0; }
.menu form button:hover { background: var(--danger-tint); }

/* ---- buttons, forms, tables ---- */
/* The design's buttons: flat action green with forest text, almost square. */
button, .btn, a.button {
  font: inherit; font-weight: 800; font-size: 14px; padding: 9px 18px; border-radius: 2px;
  border: 1px solid transparent; cursor: pointer; color: var(--forest-950); text-decoration: none;
  display: inline-block; background: var(--action); transition: background-color .16s ease; }
button:hover, .btn:hover, a.button:hover { background: var(--action-hover); }
button:disabled, .btn:disabled { background: var(--mineral-200); color: var(--muted); cursor: default; }
button.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger-tint); }
.danger { color: var(--danger); }
.link-button { background: none; border: none; padding: 0; margin: 0; font: inherit; font-weight: 400;
               color: var(--forest-800); text-decoration: underline; cursor: pointer; }
.link-button:hover { background: none; }
label { display: block; margin-top: .6rem; }
input, select, textarea { width: 100%; max-width: 28rem; font: inherit; padding: 6px 8px;
                          border: 1px solid var(--line); border-radius: 2px; background: #fff; color: var(--ink); }
.actions { margin-top: 1rem; display: flex; gap: .8rem; align-items: center; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { text-align: left; padding: .55rem .8rem; border-bottom: 1px solid var(--mineral-100); }
thead th { border-bottom-color: var(--line); }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---- station screens (classes predating the branding) ---- */
.chip { display: inline-block; padding: .1rem .55rem; border-radius: 2px; background: var(--mineral-100);
        color: var(--ink-2); font-size: .85em; font-weight: 700; }
.chip.wiping, .chip.powerwash_pending, .chip.powerwash_running,
.chip.reenrollment_pending { background: var(--mineral-200); color: var(--forest-900); }
.chip.failed { background: var(--danger-tint); color: var(--danger); }
.chip.finalized { background: var(--action-tint); color: var(--botanical); }
.chip.active { background: var(--action-tint); color: var(--botanical); }
.chip.retired { background: var(--mineral-100); color: var(--muted); }
.chip.waiting { background: var(--amber-tint); color: var(--amber-ink); }
/* A device waiting longer than its sign-in page tries: pulses as that page does on the device. */
tr.waiting.needs-hand td { animation: waiting-needs-hand 1.4s linear infinite; }
@keyframes waiting-needs-hand { 0%, 100% { background: var(--amber-tint); } 50% { background: var(--action-tint); } }
@media (prefers-reduced-motion: reduce) { tr.waiting.needs-hand td { animation-duration: 4s; } }
.chip.log-warning { background: var(--amber-tint); color: var(--amber-ink); }
.chip.log-error, .chip.log-critical { background: var(--danger-tint); color: var(--danger); }
.log-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.log-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
table.log .log-message { white-space: pre-wrap; word-break: break-word; }
table.log pre { white-space: pre-wrap; font-size: 12px; margin: 6px 0 0; }
.chip.here { background: var(--action); color: var(--forest-950); margin-left: 4px; }
.banner.here { background: var(--action-tint); }
.unidentified { color: var(--amber-ink); font-style: italic; }
.identity-issue { color: var(--amber-ink); }
.nav-count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 2px; background: var(--amber); color: var(--forest-950); font-size: .8em; font-weight: 700; text-align: center; }
.banner { padding: .65rem .9rem; border: 1px solid transparent; border-radius: 2px; margin-bottom: 1rem; }
.banner.present { background: var(--amber-tint); border-color: var(--amber-line); color: var(--amber-ink); font-weight: 700; }
.banner.absent { background: var(--action-tint); border-color: var(--action-line); }
.banner.unknown { background: var(--mineral-100); }
/* A refusal or failure (`banner present danger`): red, never the attention amber above. */
.banner.danger { background: var(--danger-tint); border-color: var(--danger-line); color: var(--danger); font-weight: 700; }
/* Not an SD-card state: a prompt for something the technician has to type in. */
.banner.needs-entry { background: var(--amber-tint); border-color: var(--amber-line); border-left: .25rem solid var(--amber); }
.who { color: var(--muted); font-size: .9em; margin-top: -.4rem; }

@media (max-width: 640px) {
  .brand img { height: 28px; }
  .brand .app { font-size: 11px; }
  /* The page's context takes a line of its own under the brand. */
  .brand:has(+ .context) { margin-right: auto; }
  .utility .context { flex-basis: 100%; border-left: 0; padding-left: 0; }
  main, header.site .inner, footer.site .inner { padding-left: 16px; padding-right: 16px; }
  nav.main { margin-left: 0; }
  h1 { font-size: 28px; }
}

/* ---- Settings ---- */
.lede { color: var(--muted); margin: 0 0 22px; max-width: 70ch; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); margin-bottom: 20px; }
.card > h2 { font-size: 21px; margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card > h2 small { font-family: 'Inter', sans-serif; font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 4px 24px;
           padding: 16px 18px; border-bottom: 1px solid var(--line); }
.setting .name { font-weight: 600; }
.setting .impact { grid-column: 1; color: var(--ink-2); font-size: 13.5px; }
.setting .impact b { color: var(--ink); }
.setting .control { grid-row: 1 / span 3; grid-column: 2; align-self: center; justify-self: end; }
.setting .error { grid-column: 1; color: var(--danger); font-weight: 600; font-size: 13.5px; }
.setting.has-error { background: var(--danger-tint); }
.setting.master { background: var(--action-tint); }
.setting.changed { box-shadow: inset 4px 0 0 var(--amber); }
/* The whole row fades as one: recolouring its parts left bold text and the slider at full strength. */
fieldset:disabled .setting { opacity: .45; }
@media (max-width: 640px) {
  .setting { grid-template-columns: 1fr; }
  .setting .control { grid-row: auto; grid-column: 1; justify-self: start; }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.seg label { display: inline-block; margin: 0; padding: 6px 12px; font-size: 13px; cursor: pointer;
             border-left: 1px solid var(--line); user-select: none; white-space: nowrap; }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; width: auto; }
.seg label:has(input:checked) { background: var(--action); color: var(--forest-950); font-weight: 800; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--forest-800); outline-offset: -2px; }
.seg.stack { flex-direction: column; }
.seg.stack label { border-left: 0; border-top: 1px solid var(--line); white-space: normal; }
.seg.stack label:first-child { border-top: 0; }
fieldset:disabled .seg label { cursor: not-allowed; }
/* Working days: seven buttons are wider than the control column, so they take a line of their own. */
.setting:has(.seg.days) .control { grid-row: auto; grid-column: 1 / -1; justify-self: start; }
.seg.days label { padding: 6px 9px; }
.setting:has(.hours) { grid-template-columns: minmax(0, 1fr) auto; }
.hours { display: inline-flex; align-items: center; gap: 8px; }
.hours input { width: 9em; max-width: none; }
.slider { display: block; width: 220px; }
.slider input { width: 100%; max-width: none; padding: 0; border: 0; accent-color: var(--action); }
.slider .ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 4px; }
.num { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.num input { width: 80px; font-size: 14px; color: var(--ink); text-align: right; }
.card-foot { display: flex; align-items: center; gap: 14px; padding: 12px 18px; background: var(--mineral-50);
             border-top: 1px solid var(--line); }
.card-foot .pending { font-size: 13px; color: var(--amber-ink); font-weight: 600; }
.card-foot .saved { font-size: 13px; color: var(--botanical); font-weight: 600; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.history li:last-child { border-bottom: 0; }
.history .what { font-weight: 600; }
.history .fromto s { color: var(--muted); }
.history .fromto b { color: var(--botanical); }
.history .meta { color: var(--muted); font-size: 12px; }
.card .empty { padding: 12px 16px; margin: 0; color: var(--muted); font-size: 13px; }
.note { font-size: 12.5px; color: var(--muted); padding: 0 4px; }

/* Users, Stations and Agent tokens */
.card-body { padding: 14px 18px; }
.card.issued { border-color: var(--amber); }
.token-value { font-family: ui-monospace, monospace; max-width: 36rem; }
form.inline { display: inline; margin: 0; }
.table-scroll { overflow-x: auto; margin-bottom: 20px; }
.check input { width: auto; margin-right: 6px; }
tr.inactive td { color: var(--muted); }
td input:not([type="checkbox"]) { min-width: 6rem; max-width: 10rem; }
td input[type="checkbox"] { width: auto; }
input[type="radio"] { width: auto; }
td:has(> input[type="radio"]) { width: 1%; }
.card .table-scroll { margin-bottom: 0; }
.card table label { display: inline; margin: 0; cursor: pointer; }
.settings-layout > * { min-width: 0; }  /* let a wide table scroll inside its column instead of widening the page */
td code { white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form { margin: 0; }
.card-body label > input:not([type="checkbox"]) { display: block; margin-top: 6px; }
/* The station's forms: the label's text above its field, as on the management screens. */
.stacked label > :is(input:not([type="checkbox"]):not([type="radio"]), select) { display: block; margin-top: 6px; }
/* A labelled field with its explanation: label above, input, then the hint. */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; margin: 0 0 6px; font-weight: 600; }
.field .optional { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 4px; }
.field .hint { margin: 6px 0 0; max-width: 28rem; font-size: 13px; color: var(--muted); }
.field-pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.field-pair .field { margin-bottom: 0; }
/* Icon-only buttons; the words are in aria-label and in a tooltip (data-tip). */
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 2px; }
.icon-btn svg { display: block; }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.3;
  padding: 4px 8px; border-radius: 2px; white-space: nowrap; pointer-events: none; }
.steps { margin: 0 0 10px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
/* Signing keys: one card per key, showing only the next step in its lifecycle. */
.muted { color: var(--muted); }
button.secondary { background: #fff; color: var(--forest-900); border-color: var(--forest-900); }
button.secondary:hover { background: var(--mineral-50); }
.key-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
            padding: 14px 18px; border-bottom: 1px solid var(--line); }
.key-head h2 { font-size: 16px; margin: 0; }
.key-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.key-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px;
             margin: 0; padding: 14px 18px; font-size: 14px; }
.key-facts dt { color: var(--muted); font-size: 13px; }
.key-facts dd { margin: 0; overflow-wrap: anywhere; }
.fingerprint code { font-size: 12.5px; word-break: break-all; }
.key-next { border-top: 1px solid var(--line); background: var(--mineral-50); padding: 14px 18px; }
.key-next h3 { margin: 0 0 10px; font-size: 14px; }
.key-next p { margin: 4px 0 10px; font-size: 13.5px; color: var(--ink-2); }
.key-paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.key-path { background: #fff; border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; }
.key-path form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.key-path input[type="file"] { max-width: 100%; padding: 4px; font-size: 13px; }
.self-sign label { margin: 0; font-size: 13.5px; }
.self-sign input { width: 5rem; display: inline-block; margin: 0 4px; }
.key-card.retired { opacity: .75; }
.retired-keys summary { cursor: pointer; color: var(--muted); margin: 4px 0 12px; }
@media (max-width: 640px) { .key-paths { grid-template-columns: 1fr; } }
/* Compact table cells: a title line with a small grey line under it. */
.cell-title { font-weight: 600; }
.cell-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.cell-sub code { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num-col { text-align: center; }
.action-col { text-align: right; }

/* ---- wide pages (the dashboard fills the screen) ---- */
body.wide header.site .inner, body.wide main, body.wide footer.site .inner { max-width: none; }
body.wide main { padding: 22px 28px 48px; }
body.wide header.site .inner, body.wide footer.site .inner { padding-left: 28px; padding-right: 28px; }

/* ---- dashboard (spec §17) ---- */
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dashboard .live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dashboard .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--action);
         box-shadow: 0 0 0 4px rgba(66,185,111,.22); }
.dashboard .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.dashboard .v { font-family: var(--heading); font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--forest-950); }
.dashboard .s { font-size: 12px; color: var(--muted); }
.dashboard .ok { color: var(--botanical); }
.dashboard .bad { color: var(--danger); }
.dashboard .warn { color: var(--amber-ink); }
.dashboard .muted { color: var(--muted); }
.site-band { display: grid; grid-template-columns: repeat(6, auto) minmax(220px, 1fr); padding: 0; margin: 14px 0 18px; }
.site-band .fig { padding: 14px 22px; border-right: 1px solid var(--mineral-100); min-width: 0; }
.site-band .fig:last-child { border-right: 0; }
.dashboard .legend { float: right; text-transform: none; letter-spacing: 0; font-weight: 400; }
.dashboard .key { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 10px; }
.dashboard .key.wiped { background: var(--action); } .dashboard .key.failed { background: var(--danger); }
.hour-chart svg { width: 100%; height: 64px; display: block; margin-top: 6px; }
.hour-chart rect.wiped { fill: var(--action); } .hour-chart rect.failed { fill: var(--danger); }
.hour-chart .current rect { opacity: .45; }
.hour-labels { display: flex; font-size: 9.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-labels span { flex: 1; text-align: center; white-space: nowrap; }
.chart-empty { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

.bench-grid { display: grid; gap: 18px; }
.bench-grid.cols-1 { grid-template-columns: 1fr; }
.bench-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bench-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bench { padding: 0; overflow: hidden; border-top: 4px solid var(--line); }
.bench.online { border-top-color: var(--action); } .bench.idle { border-top-color: var(--action-soft); }
.bench.offline { border-top-color: var(--amber); }
.bench-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--mineral-100); }
.bench-head h2 { margin: 0; font-size: 22px; }
.bench-sub { color: var(--muted); font-size: 13px; }
.bench-state { margin-left: auto; text-align: right; font-size: 13.5px; }
.bench-state .seen { color: var(--muted); font-size: 12px; }
.dashboard .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; background: var(--mineral-200); }
.dashboard .dot.online { background: var(--action); box-shadow: 0 0 0 4px rgba(66,185,111,.2); }
.dashboard .dot.idle { background: var(--action-soft); } .dashboard .dot.offline { background: var(--amber); }
.bench-day { display: grid; grid-template-columns: repeat(4, auto) minmax(120px, 1fr); align-items: center;
             gap: 0 24px; padding: 12px 20px; background: var(--mineral-50); border-bottom: 1px solid var(--mineral-100); }
.bench-day .v { font-size: 24px; }
.bench-day .s { text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: 11px; }
.bench-chart .hour-chart svg { height: 40px; margin: 0; }
.bench-chart .chart-empty { display: none; }
table.devices { width: 100%; border-collapse: collapse; }
table.devices th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
                   text-align: left; font-weight: 600; padding: 8px 20px 6px; }
table.devices td { padding: 8px 20px; border-top: 1px solid var(--mineral-100); font-size: 13.5px; }
table.devices .on-bench { text-align: right; }
table.devices td.on-bench { white-space: nowrap; }
table.devices tr.failed td { background: var(--danger-tint); }
.dashboard .serial { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dashboard .track { display: inline-flex; align-items: center; vertical-align: middle; }
.dashboard .track i { width: 12px; height: 12px; border-radius: 50%; background: var(--mineral-200); display: inline-block; }
.dashboard .track b { width: 30px; height: 3px; background: var(--mineral-200); display: inline-block; }
.dashboard .track i.done, .dashboard .track b.done { background: var(--action); }
.dashboard .track i.current { background: #fff; border: 3px solid var(--action); box-shadow: 0 0 0 3px rgba(66,185,111,.18); }
.dashboard .track i.stopped { background: var(--danger); }
.step-name { margin-left: 10px; font-size: 12.5px; font-weight: 600; }
/* A narrow card (three across, two on a tablet, one on a phone) tightens itself: the step's
   name goes under its dots, and the day's figures sit above their chart. */
.bench { container-type: inline-size; }
@container (max-width: 560px) {
  .dashboard .track b { width: 18px; }
  table.devices th, table.devices td { padding-left: 14px; padding-right: 14px; }
  table.devices td.progress { white-space: normal; }
  .step-name { display: block; margin: 3px 0 0; white-space: normal; }
  .bench-day { grid-template-columns: repeat(4, auto); gap: 6px 14px; padding: 12px 14px; }
  .bench-day .v { font-size: 20px; }
  .bench-chart { grid-column: 1 / -1; }
}
.bench .empty { padding: 20px; text-align: center; color: var(--muted); margin: 0; }
.bench-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
              padding: 10px 20px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--mineral-100); }

@media (max-width: 1400px) { .site-band { grid-template-columns: repeat(3, 1fr); }
  .site-band .fig { border-bottom: 1px solid var(--mineral-100); } .site-band .fig.chart { grid-column: 1 / -1; } }
/* Laptop width: three cards across would be too narrow for their tables. */
@media (max-width: 1500px) { .bench-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .bench-grid.cols-2, .bench-grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .site-band { grid-template-columns: repeat(2, 1fr); }
  .bench-day { grid-template-columns: repeat(2, auto); gap: 8px 18px; }
  .bench-chart { grid-column: 1 / -1; }
  body.wide main { padding: 16px; }
  body.wide header.site .inner, body.wide footer.site .inner { padding-left: 16px; padding-right: 16px; }
}

/* ---- the bell (wiping certificate batches) ---- */
.bell { position: relative; }
.bell + .user { margin-left: 0; }
.bell > summary { list-style: none; cursor: pointer; position: relative; display: grid; place-items: center;
                  width: 38px; height: 38px; border-radius: 50%; border: 1px solid transparent; color: #fff; }
.bell > summary::-webkit-details-marker { display: none; }
.bell > summary:hover, .bell[open] > summary { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.bell svg { width: 20px; height: 20px; }
.bell-count { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
              border-radius: 2px; background: var(--action); color: var(--forest-950); font-size: 11px;
              font-weight: 700; line-height: 16px; text-align: center; }
.bell-count[hidden] { display: none; }
.bell-menu { width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; }
.bell-item { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.bell-title { font-weight: 600; }
.bell-detail { color: var(--muted); margin-top: 2px; }
.bell-item.failed .bell-detail { color: var(--danger); }
.bell-empty { padding: 10px 16px; margin: 0; color: var(--muted); font-size: 13.5px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px;
          max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--forest-950); color: #fff; padding: 12px 40px 12px 14px; border-radius: 2px;
         box-shadow: 0 8px 24px rgba(0,0,0,.25); position: relative; font-size: 14px; }
.toast a { color: var(--action-hover); font-weight: 700; }
.toast-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--mineral-200);
               font-size: 18px; cursor: pointer; }
.periods { border: 0; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.periods legend { font-weight: 600; margin-bottom: 6px; }
.periods .range { display: inline-flex; gap: 6px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin-top: 0; cursor: pointer; }
.card-body label.inline > input { display: inline-block; width: auto; margin: 0; }
.periods .range input { width: auto; }
label.inline.check { display: flex; align-items: flex-start; margin: 4px 0 10px; }
label.inline.check > input { margin-top: 4px; }

/* ---- launcher: the window the launcher extension opens at sign-in (templates/launcher.html) ---- */
body.launcher-page main { display: grid; place-items: center; }
.launcher { max-width: 560px; width: 100%; margin: 0; padding: 40px 44px 32px; text-align: center;
            border-top: 4px solid var(--action); }
.launcher h1 { font-size: 30px; margin: 22px 0 12px; }
.launcher .lead { color: var(--ink-2); font-size: 16px; margin: 0 0 24px; }
.launcher-status { display: inline-block; margin: 0 0 14px; padding: 6px 14px; background: var(--action-tint);
                   border: 1px solid var(--action-line); color: var(--forest-800); font-weight: 600;
                   font-size: 14px; }
.launcher-note { color: var(--muted); font-size: 13px; margin: 0; }
.launcher-spinner { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%;
                    border: 4px solid var(--mineral-200); border-top-color: var(--action);
                    animation: launcher-spin 1s linear infinite; }
@keyframes launcher-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .launcher-spinner { animation-duration: 3s; } }
.launcher.gave-up { border-top-color: var(--amber); }
/* Asking for a hand: the background pulses like the agent's highlight (amber and action green,
   700 ms each way), so a bench of Chromebooks shows at a glance which one needs a hand. */
body.launcher-page.needs-hand { animation: launcher-needs-hand 1.4s linear infinite; }
@keyframes launcher-needs-hand { 0%, 100% { background: var(--amber); } 50% { background: var(--action); } }
@media (prefers-reduced-motion: reduce) { body.launcher-page.needs-hand { animation-duration: 4s; } }
.launcher-mark { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
                 background: var(--amber-tint); border: 2px solid var(--amber); color: var(--amber-ink);
                 font: 700 28px/1 var(--heading); }
@media (max-width: 600px) { .launcher { padding: 28px 20px 24px; } .launcher h1 { font-size: 24px; } }
