/* The console's one style sheet (Service-v1.md sections 16 and 27.10, part 1).
   The look is "Beacon" (Console-v1 decision C12): a light side menu, round
   corners. Light and dark (C14): the device's own choice unless the person
   has chosen one, which the page carries as data-mode on <html>.
   An organisation's own colour (C32) is --org, with --on-org for the words
   on it, and it fills the band that carries the organisation's name and
   nothing else. Everything a person works with (buttons, links, the
   keyboard's ring, what is chosen) is black and grey from --act and --tint,
   and the status colours are fixed, so no colour an organisation picks can
   change how anything works. A test in brand.rs holds the sheet to that. */
:root {
  --org: #0f766e; --on-org: #ffffff;
  --page: #f4f7f6; --card: #ffffff; --line: #e1e8e6; --edge: #c3cfcc; --field-edge: #7a8b88; --ink: #1b2a2a; --soft: #5c6b6a; --side: #ffffff; --head: #f7faf9;
  --good: #2a7350; --good-bg: #e2f2ea; --seen: color-mix(in srgb, var(--good) 72%, var(--card)); --warning: #b7791f; --warning-ink: #7a4a05; --warning-bg: #fcefd8;
  --critical: #b3261e; --critical-bg: #fbe6e4; --info: #2b5c9e; --info-bg: #e4edfa; --quiet-bg: #edf1f0;
  --act: var(--ink); --on-act: var(--card); --tint: #e3e9e7; --link: var(--ink);
  --desk1: #dfe7ee; --desk2: #c9d6e2; --code-bg: #16201f; --code-ink: #d6e7e3;
  --r: 14px; --rs: 10px; --shadow: 0 6px 18px rgba(20, 60, 55, .07);
  color-scheme: light;
}
:root[data-mode="dark"] {
  --page: #111716; --card: #1a2221; --line: #2a3634; --edge: #3b4a47; --field-edge: #70827e; --ink: #e7efed; --soft: #9aaaa7; --side: #151c1b; --head: #1f2928;
  --good: #6fcf9e; --good-bg: #173226; --seen: color-mix(in srgb, var(--good) 50%, var(--card)); --warning: #f0b765; --warning-ink: #f0b765; --warning-bg: #3a2c13;
  --critical: #ff8a80; --critical-bg: #3b1f1d; --info: #8fb8f0; --info-bg: #1b2a40; --quiet-bg: #232d2c;
  --tint: #2c3836;
  --desk1: #2c3f55; --desk2: #172433; --code-bg: #0c1211; --code-ink: #d6e7e3;
  --shadow: 0 6px 18px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --page: #111716; --card: #1a2221; --line: #2a3634; --edge: #3b4a47; --field-edge: #70827e; --ink: #e7efed; --soft: #9aaaa7; --side: #151c1b; --head: #1f2928;
    --good: #6fcf9e; --good-bg: #173226; --seen: color-mix(in srgb, var(--good) 50%, var(--card)); --warning: #f0b765; --warning-ink: #f0b765; --warning-bg: #3a2c13;
    --critical: #ff8a80; --critical-bg: #3b1f1d; --info: #8fb8f0; --info-bg: #1b2a40; --quiet-bg: #232d2c;
    --tint: #2c3836;
    --desk1: #2c3f55; --desk2: #172433; --code-bg: #0c1211; --code-ink: #d6e7e3;
    --shadow: 0 6px 18px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--page); }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; }

/* The frame: the menu at the side, a strip across the top, the page. */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 16px; }
/* The organisation's band: the one place its own colour goes. */
.org { display: flex; align-items: center; gap: 10px; margin: -16px -12px 0; padding: 14px 16px; background: var(--org); color: var(--on-org); border-bottom: 1px solid var(--line); font-weight: 700; font-size: 15px; min-width: 0; }
.org span { overflow-wrap: anywhere; }
.org img.logo { object-fit: cover; background: none; }
.brand-logo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); }
.brand-logo.none { background: var(--org); color: var(--on-org); display: grid; place-items: center; font-weight: 700; font-size: 22px; border-color: var(--field-edge); }
.brand-try .band { display: inline-block; background: var(--org); color: var(--on-org); border: 1px solid var(--field-edge); border-radius: var(--rs); padding: 8px 16px; font-weight: 700; overflow-wrap: anywhere; }
input[type=color] { width: 56px; height: 38px; padding: 2px; border: 1px solid var(--field-edge); border-radius: var(--rs); background: var(--card); }
.org .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--on-org); color: var(--org); display: grid; place-items: center; font-size: 13px; flex: none; }
nav { display: flex; flex-direction: column; gap: 2px; }
nav small { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; color: var(--soft); padding: 4px 10px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--rs); color: var(--soft); text-decoration: none; font-weight: 600; }
nav a:hover { color: var(--ink); background: var(--quiet-bg); }
nav a.on { background: var(--tint); color: var(--ink); }
nav svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav .count { margin-left: auto; background: var(--act); color: var(--on-act); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; flex: none; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--soft); padding: 0 6px; }
.side-foot svg { width: 16px; height: 16px; flex: none; }
.frame { min-width: 0; display: flex; flex-direction: column; }
.strip { display: flex; align-items: center; justify-content: flex-end; gap: 6px 16px; padding: 9px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 13px; color: var(--soft); }
.strip form { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
.strip .me { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.strip button.plain { background: none; border: 0; box-shadow: none; color: var(--soft); padding: 3px 9px; border-radius: 999px; font: inherit; cursor: pointer; }
.strip button.plain:hover { color: var(--ink); background: var(--quiet-bg); }
.strip .chosen { color: var(--ink); background: var(--tint); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
main { padding: 24px 28px 60px; max-width: 1180px; width: 100%; min-width: 0; }

h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 16.5px; margin: 26px 0 10px; font-weight: 700; }
.card > h2:first-of-type, .card > .row:first-child h2 { margin-top: 2px; }
.sub { color: var(--soft); margin: 0 0 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid4, .grid2 { margin-top: 14px; }
table { border-collapse: separate; border-spacing: 0; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); background: var(--head); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.hist td:first-child { white-space: nowrap; min-width: 0; }
table.hist td:last-child { overflow-wrap: anywhere; }
.card table { box-shadow: none; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--quiet-bg); color: var(--soft); white-space: nowrap; }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.warning { background: var(--warning-bg); color: var(--warning-ink); }
.tag.critical { background: var(--critical-bg); color: var(--critical); }
.tag.good { background: var(--good-bg); color: var(--good); }
button, .btn { font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--edge); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--soft); }
button.primary, .btn.primary { background: var(--act); border-color: var(--act); color: var(--on-act); }
button.primary:hover, .btn.primary:hover { background: color-mix(in srgb, var(--act) 84%, var(--card)); }
button.danger { border-color: var(--critical); color: var(--critical); }
input[type=text], input[type=number], input[type=datetime-local], textarea, select { font: inherit; padding: 8px 11px; border: 1px solid var(--field-edge); border-radius: var(--rs); width: 100%; background: var(--card); color: var(--ink); }
input[type=checkbox], input[type=radio] { accent-color: var(--act); }
::placeholder { color: var(--soft); opacity: 1; }
textarea { min-height: 110px; resize: vertical; }
label.f { display: block; font-weight: 700; margin: 14px 0 4px; }
.hint { color: var(--soft); font-size: 13px; margin-top: 3px; }
.note { border-left: 4px solid var(--info); background: var(--info-bg); padding: 10px 14px; border-radius: 0 var(--rs) var(--rs) 0; margin: 12px 0; }
.note.warning { border-color: var(--warning); background: var(--warning-bg); }
.note.critical { border-color: var(--critical); background: var(--critical-bg); }
.note.good { border-color: var(--good); background: var(--good-bg); }
.stat b { display: block; font-size: 26px; font-weight: 700; }
.stat span { color: var(--soft); font-size: 13px; }
/* People: a row for each person; "Edit" opens the choices in place. */
.people { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 20px; }
details.person { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
details.person > summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; list-style: none; }
details.person > summary::-webkit-details-marker { display: none; }
details.person .who { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
details.person .who .hint { margin: 0; }
details.person .tags { display: flex; flex-wrap: wrap; gap: 6px; }
details.person .last { display: flex; flex-direction: column; font-size: 13px; }
details.person .last .hint { margin: 0; }
details.person[open] > summary { border-bottom: 1px solid var(--line); }
details.person[open] .edit { background: var(--tint); color: var(--ink); }
.person-edit { padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.person-edit select { max-width: 360px; }
details.about { margin: 10px 0; }
details.about > summary { cursor: pointer; color: var(--link); font-size: 13px; font-weight: 600; }
/* Add PCs: three numbered steps side by side. */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0 22px; align-items: start; }
.step { min-width: 0; margin: 0; }
.step h2 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--act); color: var(--on-act); display: grid; place-items: center; font-size: 14px; flex: none; }
.step pre.cfg { max-height: 260px; overflow: auto; }
b.big { font-size: 24px; }
@media (max-width: 760px) { details.person > summary { grid-template-columns: minmax(0, 1fr) auto; } details.person .tags, details.person .last { grid-column: 1 / -1; } }
.tabs { display: flex; gap: 4px; margin: 14px 0; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; text-decoration: none; color: var(--soft); border-radius: 999px; font-weight: 600; border: 1px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); background: var(--tint); }
.signin { max-width: 420px; margin: 60px auto; }
/* The organisation's band on a page shown before signing in (S56): a
   company's own install, and the page a person's own link opens. */
.signin .own { display: flex; align-items: center; gap: 10px; margin: -16px -18px 16px; padding: 14px 18px; background: var(--org); color: var(--on-org); border-bottom: 1px solid var(--line); border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.signin .own .logo { width: 34px; height: 34px; border-radius: 10px; background: var(--on-org); color: var(--org); display: grid; place-items: center; font-size: 13px; flex: none; object-fit: cover; }
.signin .own img.logo { background: none; }
.inline { display: inline; }

/* A notice drawn as the PC app draws it (Console-v1.md section 13). A
   notice on a PC is light unless Windows is dark, whatever the console's
   mode, so these colours are fixed. The text keeps its line breaks. An
   organisation's colour that goes to PCs is --n-edge: the strip of a card,
   the edge of a pop-up and the ground of a full-screen notice, on an
   information notice only (C33). */
.pv { border: 1px dashed var(--edge); border-radius: var(--rs); padding: 14px; background: linear-gradient(135deg, var(--desk1), var(--desk2)); min-height: 150px; display: flex; align-items: center; justify-content: center; color: #1a1a1a; --n-brand: #0f766e; --n-sev: #0f766e; --n-word: #0c5e58; }
.pv.end { align-items: flex-end; justify-content: flex-end; }
.pv.full { padding: 0; }
.pv .warning { --n-sev: #e0a000; --n-word: #7a4a05; --n-edge: initial; --n-line: initial; }
.pv .critical { --n-sev: #c42b1c; --n-word: #a3241b; --n-edge: initial; --n-line: initial; }
.n-text { white-space: pre-wrap; margin: 6px 0 0; overflow-wrap: anywhere; line-height: 1.5; }
.n-title { overflow-wrap: anywhere; display: block; }
.n-who { font-size: 11px; color: #5c5c5c; display: flex; align-items: center; gap: 6px; }
.n-who .n-x { margin-left: auto; color: #1a1a1a; font-size: 11px; }
.n-who .mark { margin: 0; }
.mark { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: var(--n-sev); margin-right: 6px; vertical-align: -2px; flex: none; }
.n-label { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--n-word); background: color-mix(in srgb, var(--n-sev) 13%, #fff); border-radius: 999px; padding: 3px 9px 3px 4px; margin: 10px 0 8px; }
.n-label .mark { margin-right: 5px; vertical-align: 0; }
.n-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; }
.n-button, .n-link { border-radius: 7px; padding: 5px 16px; font-size: 12px; font-weight: 600; border: 1px solid #d6d6d6; background: #fbfbfb; color: #1a1a1a; }
.n-button { background: var(--n-brand); border-color: var(--n-brand); color: #fff; min-width: 76px; text-align: center; }
.n-button.critical { background: #c42b1c; border-color: #c42b1c; }
.n-button.waits { background: #c8c8c8; border-color: #c8c8c8; }
.n-note { margin: 12px 0 0; font-size: 11px; color: #5c5c5c; }
.n-dialog { background: #fff; border-radius: 9px; border: 1px solid var(--n-edge, var(--n-sev)); box-shadow: 0 10px 28px rgba(0,0,0,.28); width: 100%; max-width: 380px; font-size: 13px; padding: 9px 16px 16px; }
.n-dialog .n-title { font-size: 17px; line-height: 1.25; }
.n-card { background: #fff; border-radius: 9px; border-top: 4px solid var(--n-edge, var(--n-sev)); box-shadow: 0 6px 18px rgba(0,0,0,.28); width: 290px; max-width: 100%; font-size: 13px; padding: 9px 13px 12px; }
.n-card .n-title { font-size: 14px; margin-top: 6px; }
.n-card .n-text { margin-top: 3px; }
.n-card .n-foot { margin-top: 10px; }
.n-toast { background: #f3f3f3; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.28); width: 290px; max-width: 100%; font-size: 13px; padding: 10px 12px; }
.n-toast .n-title { margin-top: 4px; }
.n-foot.wide { justify-content: stretch; margin-top: 10px; }
.n-foot.wide span { flex: 1; text-align: center; background: #fbfbfb; border: 1px solid #d6d6d6; border-radius: 4px; padding: 4px; font-size: 12px; }
.n-full { --n-deep: var(--n-edge, #0f6b64); background: linear-gradient(180deg, color-mix(in srgb, var(--n-deep) 90%, #fff), color-mix(in srgb, var(--n-deep) 55%, #000)); border-radius: 4px; width: 100%; padding: 26px 34px; }
.n-full.warning { --n-deep: #9d5d00; }
.n-full.critical { --n-deep: #c42b1c; }
.n-sheet { background: #fff; border-radius: 12px; font-size: 13px; padding: 14px 20px 18px; border: 1px solid var(--n-line, transparent); }
.n-sheet .n-who { font-size: 12px; color: #1a1a1a; }
.n-sheet .n-title { font-size: 19px; line-height: 1.25; }
.n-tick { background: #f1f3f5; border-radius: 9px; padding: 9px 11px; margin: 14px 0 0; font-size: 12px; }
.n-pic { display: block; max-width: 100%; height: auto; margin: 8px 0 2px; border-radius: 4px; }
.n-by { margin: 6px 0 0; font-size: 12px; color: #5c5c5c; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 196px minmax(0, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  main { padding: 18px 16px 50px; }
  .strip { padding: 8px 16px; }
  table { display: block; overflow-x: auto; }
  table td:first-child { min-width: 230px; }
}
/* A phone (Console-v1 section 14): the side menu and the strip give way to
   a slim bar at the top and a bar along the bottom, in reach of a thumb.
   More and You are pages; nothing here needs a script. */
.ptop, .pbar, .pfab { display: none; }
.rows { padding: 2px 16px; }
.rowl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; text-decoration: none; color: var(--ink); margin: 0; }
.rowl:last-child { border-bottom: 0; }
.picks-inline { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-weight: 400; }
.picks-inline .chosen { color: var(--ink); background: var(--tint); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
@media (max-width: 640px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side, .strip { display: none; }
  .ptop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 6; background: var(--org); color: var(--on-org); border-bottom: 1px solid var(--line); padding: 9px 14px; padding-top: max(9px, env(safe-area-inset-top, 0px)); }
  .ptop .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--on-org); color: var(--org); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; object-fit: cover; }
  .ptop img.logo { background: none; }
  .ptop b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ptop .pme { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--quiet-bg); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; text-decoration: none; flex: none; }
  .ptop .pme.on { outline: 2px solid var(--on-org); }
  .ptop .pme:focus-visible { outline: 3px solid var(--on-org); }
  .pbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--side); border-top: 1px solid var(--line); padding: 7px 6px; padding-bottom: max(9px, env(safe-area-inset-bottom, 0px)); }
  .pbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--soft); text-decoration: none; padding: 3px 2px; border-radius: 10px; }
  .pbar a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  .pbar a.on { color: var(--ink); background: var(--tint); }
  .pfab { display: block; position: fixed; right: 14px; bottom: 78px; z-index: 5; background: var(--act); color: var(--on-act); border-radius: 999px; padding: 11px 18px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
  main { padding-bottom: 150px; }
  /* A notice that waits for the person keeps its buttons in view. */
  .acts { position: fixed; left: 0; right: 0; bottom: 62px; z-index: 5; background: var(--card); border-top: 1px solid var(--line); padding: 10px 14px; margin: 0; justify-content: flex-end; }
  body:has(.acts) .pfab { display: none; }
}
pre.cfg { background: var(--code-bg); color: var(--code-ink); padding: 14px; border-radius: var(--rs); font-size: 12.5px; overflow: auto; margin: 0; }
code { background: var(--quiet-bg); padding: 4px 8px; border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.card + .card, .card + table, table + .card, form.card, .card + form { margin-top: 14px; }
/* The audit log: fixed columns, so a long value wraps in its own column at any width. */
table.log { display: table; table-layout: fixed; }
table.log th:nth-child(1) { width: 48px; }
table.log th:nth-child(2) { width: 132px; }
table.log th:nth-child(3) { width: 16%; }
table.log th:nth-child(4) { width: 20%; }
table.log td:first-child { min-width: 0; }
table.log td { overflow-wrap: anywhere; }
table.log td:nth-child(1), table.log td:nth-child(2) { white-space: nowrap; }
table.log code { font-size: 12px; padding: 1px 5px; }
/* Widths, as classes: the pages allow no inline style. */
input[type=datetime-local] { max-width: 260px; display: block; }
time { white-space: nowrap; }
input.w320 { max-width: 320px; }
input.w220 { max-width: 220px; }
input.w120 { max-width: 120px; }
.row.apart { justify-content: space-between; }
/* A long line in one half of a grid scrolls inside it and does not push the page wide. */
.grid2 > *, .grid4 > * { min-width: 0; }
/* On a narrow screen the audit log scrolls inside itself, as the other tables do. */
@media (max-width: 640px) {
  table.log { display: block; overflow-x: auto; }
}
/* Part 2: a notice's bar, Home's figures and rows, and Activity. */
/* The bar's edge can be seen (3 to 1), so the part not reached reads as the empty rest of a whole. */
.meter { display: inline-block; width: 150px; max-width: 100%; height: 8px; border-radius: 999px; overflow: hidden; vertical-align: middle; border: 1px solid var(--field-edge); }
.meter.big { display: block; width: 100%; height: 16px; margin-bottom: 4px; }
.meter svg { display: block; width: 100%; height: 100%; }
.meter .rest { fill: var(--edge); }
.meter .ack { fill: var(--good); }
.meter .seen { fill: var(--seen); }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--soft); margin: 12px 0 0; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.legend .ack { background: var(--good); }
.legend .seen { background: var(--seen); }
.legend .rest { background: var(--edge); box-shadow: inset 0 0 0 1px var(--field-edge); }
a.card.stat { text-decoration: none; color: var(--ink); display: block; }
a.card.stat:hover { border-color: var(--soft); }
.card.stat i { font-style: normal; font-size: 15px; color: var(--soft); font-weight: 600; }
.card.stat.attn { border-color: var(--warning); background: var(--warning-bg); }
.card .grid4 { margin-top: 10px; }
a.item { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
a.item:hover b { text-decoration: underline; }
a.item > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
a.item b { overflow-wrap: anywhere; }
a.item .reach { flex: none; align-items: flex-start; }
.wait { display: flex; flex-direction: column; gap: 5px; padding: 11px 0; border-top: 1px solid var(--line); }
.wait b { overflow-wrap: anywhere; }
.feed { padding-top: 4px; padding-bottom: 4px; }
.did { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.did:first-child { border-top: 0; }
.did time { color: var(--soft); font-size: 13px; min-width: 128px; }
.did > span:last-child { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.did code { font-size: 12.5px; padding: 1px 6px; }
.grid2 > .card + .card, .grid4 > .card + .card { margin-top: 0; }
/* Part 4: templates as a grid of small cards. */
.tpl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tpl > .card { display: flex; flex-direction: column; gap: 6px; margin-top: 0; }
.tpl > .card + .card { margin-top: 0; }
.tpl > .card b { overflow-wrap: anywhere; }
.tpl > .card .row { margin-top: auto; padding-top: 6px; }
.tpl details p { margin: 4px 0 0; }
#summary { margin: 0 0 10px; }
#start-from { margin-bottom: 14px; }
/* Part 5: the raw entry of the audit log, behind Details. */
code.raw { display: block; margin-top: 6px; font-size: 12px; padding: 8px 10px; white-space: pre-wrap; }
.did details, .tpl details { margin-top: 2px; }
/* The New notice page (Console-v1 section 12): one place to write a notice. */
.newbtn { display: block; text-align: center; background: var(--act); color: var(--on-act); border-radius: 999px; padding: 10px 14px; font-weight: 700; text-decoration: none; }
.newbtn:hover { background: color-mix(in srgb, var(--act) 84%, var(--card)); }
.compose { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 18px; align-items: start; margin-top: 14px; }
.compose form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.compose form .card { margin-top: 0; }
.compose .card h2 { margin: 0 0 4px; }
.compose .card h2 + h2, .compose .card .row + h2, .compose .card .hint + h2 { margin-top: 18px; }
.compose .aside { position: sticky; top: 14px; min-width: 0; }
.compose .aside h2 { margin-top: 0; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--edge); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.chip.on, .chip:has(input:checked) { background: var(--tint); border-color: var(--act); color: var(--ink); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip:has(input:focus-visible), .pick:has(input:focus-visible) { outline: 3px solid var(--act); outline-offset: 2px; }
#all-templates { margin-top: 12px; }
#all-templates summary, details.more summary { cursor: pointer; font-weight: 700; }
#all-templates input[type=search] { font: inherit; padding: 8px 11px; border: 1px solid var(--field-edge); border-radius: var(--rs); width: 100%; background: var(--card); color: var(--ink); margin-top: 8px; }
.tlist { border: 1px solid var(--line); border-radius: var(--rs); max-height: 260px; overflow: auto; padding: 4px; margin-top: 8px; display: flex; flex-direction: column; }
.tlist .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); font-weight: 700; padding: 8px 8px 3px; margin: 0; }
.trow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-radius: 8px; padding: 7px 8px; text-decoration: none; color: var(--ink); }
.trow:hover { background: var(--quiet-bg); }
.trow b { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere; }
.gaps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; background: var(--warning-bg); border-radius: var(--rs); padding: 10px 12px; margin-bottom: 4px; }
.gaps label { font-size: 13px; font-weight: 700; color: var(--warning-ink); display: flex; flex-direction: column; gap: 4px; }
.picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; }
.pick { border: 1px solid var(--line); background: var(--card); border-radius: var(--rs); padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; position: relative; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick:has(input:checked) { border-color: var(--act); background: var(--tint); }
.pick .hint { margin: 0; }
.pick .scr { height: 62px; border-radius: 6px; background: linear-gradient(135deg, var(--desk1), var(--desk2)); position: relative; overflow: hidden; display: block; }
.pick .scr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(0, 0, 0, .55); }
.pick .scr i { position: absolute; background: #fff; border-radius: 3px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.pick.corner .scr i { right: 5px; bottom: 10px; width: 34px; height: 20px; }
.pick.popup .scr i { left: 50%; top: 46%; width: 46px; height: 30px; transform: translate(-50%, -50%); }
.pick.toast .scr i { right: 5px; bottom: 10px; width: 34px; height: 12px; background: #dfe3e8; }
.pick.full .scr i { inset: 0; border-radius: 0; background: rgba(255, 255, 255, .92); }
.pick.sev b::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; background: var(--info); }
.pick.sev.warning b::before { background: var(--warning); }
.pick.sev.critical b::before { background: var(--critical); }
.pick.sev.warning:has(input:checked) { border-color: var(--warning); }
.pick.sev.critical:has(input:checked) { border-color: var(--critical); }
label.switch { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 12px; cursor: pointer; }
label.switch input { width: 18px; height: 18px; }
label.switch.fixed { cursor: default; color: var(--soft); }
label.switch + .hint { margin: 4px 0 0 26px; }
details.card.more > summary { list-style-position: inside; }
@media (max-width: 1000px) { .compose { grid-template-columns: minmax(0, 1fr); } .compose .aside { position: static; order: -1; } }

/* Add PCs: what a standing code asks for, and what a fixed-term one does. */
form.step:has(input[name="kind"][value="fixed"]:checked) .when-standing,
form.step:has(input[name="kind"][value="standing"]:checked) .when-fixed { display: none; }

/* Several warnings at once fold under one line, and open to show them. */
details.notes { border-left: 4px solid var(--warning); background: var(--warning-bg); border-radius: 0 var(--rs) var(--rs) 0; margin: 12px 0; }
details.notes > summary { padding: 10px 14px; cursor: pointer; }
details.notes > .note { margin: 0; border-left: 0; border-top: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); border-radius: 0; background: transparent; }

/* The list of enrolment codes: a count and a date each stay on one line,
   and what can be done with a code sits in a row. */
table.codes th, table.codes td[data-l] { white-space: nowrap; }
table.codes td.does form { display: flex; flex-wrap: wrap; gap: 6px; }
/* A tag that is said quietly: a code another has taken over from. */
.tag.muted { background: transparent; border: 1px dashed var(--line); color: var(--soft); }
/* The settings to copy: taller, so that less of it is out of sight. */
.step pre.cfg { max-height: 420px; }
@media (max-width: 640px) {
  /* The list of enrolment codes, each as a card: its name and kind, then
     how many used it and until when, then what can be done with it. */
  table.codes, table.codes tbody, table.codes tr, table.codes td { display: block; width: auto; }
  table.codes tr:first-child { display: none; }
  table.codes tr { padding: 12px 14px; border-top: 1px solid var(--line); }
  table.codes tr:nth-child(2) { border-top: 0; }
  table.codes td { padding: 2px 0; border: 0; text-align: left; }
  table.codes td.name { font-weight: 600; font-size: 1.05em; }
  table.codes td[data-l]::before { content: attr(data-l) ": "; color: var(--soft); }
  table.codes td.does, table.codes td.last { padding-top: 8px; }
  table.codes td[data-l] { white-space: normal; }
  /* Settings' tabs in one row that slides, in place of three rows. */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  /* The sign-in card keeps clear of a phone's edges, and a line that opens is tall enough for a thumb. */
  .signin { margin: 24px 14px; }
  summary { padding-block: 5px; }
}
