/* heatnet operator app.
   Calm, dense back-office styling. Colour is reserved for meaning:
   the "heat" scale (cool -> hot) marks urgency and nothing else. */

:root {
  --ink: #17252d;
  --ink-2: #4a5d68;
  --ink-3: #6f818b;
  --paper: #f4f6f7;
  --surface: #ffffff;
  --rule: #dbe2e6;
  --pipe: #17263a;       /* heatnet navy: structure and primary actions */
  --pipe-2: #2b4f75;
  --pipe-soft: #e7edf4;
  --h1: #a9ccd1;         /* heat scale: plenty of time ... deadline reached */
  --h2: #e2c15c;
  --h3: #eea04a;
  --h4: #e2703a;
  --h5: #b42f23;
  --good: #276b44;
  --good-bg: #e5f2ea;
  --warm: #9a5808;
  --warm-bg: #fcf0de;
  --hot: #a8261b;
  --hot-bg: #fbe7e4;
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.5 var(--font);
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
a { color: var(--pipe-2); }
a:hover { color: var(--pipe); }
:focus-visible { outline: 3px solid var(--h3); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; }
h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 600; }
h3 { font-size: 0.95rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
h4 { font-size: 0.9rem; font-weight: 600; margin: 1rem 0 0.5rem; }
p { margin: 0 0 0.75rem; max-width: 75ch; }

.skip { position: absolute; left: -999px; top: 0.5rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* --- shell --- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: var(--pipe);
  color: #e8eef4;
  padding: 1.25rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; padding: 0 0.5rem; }
.brand img { display: block; height: 40px; width: auto; }
.signin-card .brand { justify-content: center; margin-bottom: 0.5rem; }
.signin-card .brand img { height: 52px; }
.org { padding: 0.25rem 0.5rem 1.25rem; color: #aab8c9; font-size: 0.85rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  color: #d5dee8; text-decoration: none; padding: 0.5rem 0.75rem; border-radius: var(--radius);
  border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.12); color: #fff; border-left-color: var(--h3); font-weight: 600; }
.sidebar .btn.signout { margin-top: auto; color: #aab8c9; text-align: left; padding: 0.5rem 0.75rem; text-decoration: none; }
.sidebar .btn.signout:hover { color: #fff; text-decoration: underline; }
main { padding: 2rem 2.5rem 4rem; max-width: 1180px; width: 100%; outline: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin: 0.35rem 0 0; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.back { display: inline-block; margin-bottom: 0.75rem; font-size: 0.9rem; text-decoration: none; }
.back::before { content: "\2039  "; }

/* --- panels --- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.note { color: var(--ink-2); font-size: 0.9rem; }
.empty { color: var(--ink-3); padding: 0.5rem 0; margin: 0; }
.loading { color: var(--ink-3); }
.boot { padding: 3rem; }

/* --- stats --- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.stats.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0.5rem 0 1rem; }
.stat {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.9rem 1rem;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
}
a.stat:hover { border-color: var(--pipe-2); }
.stat-n { font-size: 1.6rem; font-weight: 600; line-height: 1.1; }
.stat-l { color: var(--ink-2); font-size: 0.85rem; }
.stat-good { border-left: 4px solid var(--good); }
.stat-warm { border-left: 4px solid var(--h3); }
.stat-hot { border-left: 4px solid var(--h5); }

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.task a { display: block; padding: 0.65rem 0.9rem; border-radius: var(--radius); text-decoration: none; color: var(--ink); border-left: 4px solid; }
.task-hot a { background: var(--hot-bg); border-color: var(--h5); }
.task-warm a { background: var(--warm-bg); border-color: var(--h3); }

/* --- tables --- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.82rem; padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--rule); white-space: nowrap; }
td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.num { text-align: right; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--pipe-soft); }

/* --- badges --- */
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; margin-right: 0.25rem; }
.badge-neutral { background: #eef1f3; color: var(--ink-2); }
.badge-muted { background: #f0f2f3; color: var(--ink-3); }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warm { background: var(--warm-bg); color: var(--warm); }
.badge-hot { background: var(--hot-bg); color: var(--hot); }

/* --- buttons and forms --- */
.btn {
  font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  padding: 0.5rem 0.9rem; border-radius: var(--radius);
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  text-decoration: none; display: inline-block; line-height: 1.3;
}
.btn:hover { border-color: var(--pipe-2); }
.btn.primary { background: var(--pipe-2); border-color: var(--pipe-2); color: #fff; }
.btn.primary:hover { background: var(--pipe); }
.btn.danger { color: var(--hot); border-color: #e7b9b3; }
.btn.hot { background: var(--hot-bg); border-color: var(--h5); color: var(--hot); }
.btn.link { border: 0; background: none; padding: 0; color: var(--pipe-2); font-weight: 500; text-decoration: underline; }
.btn:disabled { opacity: 0.55; cursor: progress; }
.icon-btn { font-size: 1.5rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--ink-2); padding: 0 0.25rem; }

.form { display: grid; gap: 0.9rem; }
.field { display: grid; gap: 0.3rem; }
.field label, legend { font-weight: 600; font-size: 0.9rem; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #b9c5cc; border-radius: var(--radius); padding: 0.5rem 0.6rem; width: 100%;
}
textarea { resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--pipe-2); transform: scale(1.15); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; }
.check input { margin-top: 0.3rem; }
.hint { color: var(--ink-3); font-size: 0.82rem; }
.field-error { color: var(--hot); font-size: 0.82rem; font-weight: 600; }
.field-error:empty { display: none; }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; }
.inline-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.75rem; }
.inline-form .field { min-width: 180px; }
fieldset.needs { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.75rem 1rem; display: grid; gap: 0.4rem; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0.5rem 0 1rem; border-left: 4px solid; }
.alert ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.alert-hot { background: var(--hot-bg); border-color: var(--h5); color: #6b1a12; }
.alert-warm { background: var(--warm-bg); border-color: var(--h3); color: #5c3606; }

.tabs { display: flex; gap: 0.25rem; }
.tab { font: inherit; font-size: 0.88rem; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--rule); background: #fff; cursor: pointer; }
.tab.active { background: var(--pipe); border-color: var(--pipe); color: #fff; }

.drop {
  display: grid; justify-items: center; gap: 0.25rem; padding: 2rem; margin-bottom: 1rem;
  border: 2px dashed #b9c5cc; border-radius: var(--radius); cursor: pointer; background: #fafcfc; position: relative;
}
.drop.over, .drop:focus-within { border-color: var(--pipe-2); background: var(--pipe-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop span { color: var(--ink-2); font-size: 0.9rem; }
.result { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1rem; }
.bulk { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.pick { list-style: none; margin: 0.25rem 0; padding: 0; display: grid; gap: 0.25rem; }

/* --- complaints queue: the urgency strip --- */
.queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.queue-item {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 1rem; align-items: stretch;
  padding: 0.75rem 1rem 0.75rem 0; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; background: #fff; overflow: hidden;
}
.queue-item:hover { border-color: var(--pipe-2); }
.heat { display: block; width: 8px; min-height: 100%; }
.heat.h1 { background: var(--h1); }
.heat.h2 { background: var(--h2); }
.heat.h3 { background: var(--h3); }
.heat.h4 { background: var(--h4); }
.heat.h5 { background: var(--h5); }
.q-top { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.q-ref { color: var(--ink-3); font-size: 0.85rem; }
.q-summary { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-meta { display: grid; justify-items: end; gap: 0.2rem; font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.quote { border-left: 3px solid var(--rule); padding-left: 1rem; white-space: pre-wrap; }
.deadlines { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.6rem; }
.deadlines li { display: grid; gap: 0.1rem; padding-left: 0.75rem; border-left: 3px solid var(--rule); font-size: 0.9rem; }
.deadlines li span:first-child { color: var(--ink-2); font-size: 0.82rem; }
.deadlines li.done { border-color: var(--good); }
.deadlines li.overdue { border-color: var(--h5); }
.meter-bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--h1), var(--h2), var(--h3), var(--h4), var(--h5)); position: relative; }
.meter-bar span { position: absolute; right: 0; top: 0; bottom: 0; background: #e8edf0; border-radius: 0 999px 999px 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.timeline li { border-left: 2px solid var(--rule); padding-left: 0.9rem; }
.tl-head { display: flex; gap: 0.75rem; align-items: baseline; }
.tl-head span { color: var(--ink-3); font-size: 0.82rem; }
.timeline p { margin: 0.2rem 0 0; white-space: pre-wrap; }
.letter { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.5rem 0.9rem; margin-bottom: 0.5rem; }
.letter summary { cursor: pointer; font-weight: 600; }
.letter-body { white-space: pre-wrap; font: 0.95rem/1.55 Georgia, "Times New Roman", serif; background: #fbfbf9; border: 1px solid var(--rule); padding: 1.25rem 1.5rem; border-radius: var(--radius); max-height: 60vh; overflow: auto; }

/* --- bill --- */
.bill-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0 0 1rem; font-size: 0.92rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
table.lines td { border-bottom: 1px solid var(--rule); }
table.lines tfoot td { border: 0; padding-top: 0.4rem; }
table.lines tr.total td { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--ink); }

/* --- modal --- */
dialog.modal { border: 0; border-radius: 10px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(15, 40, 50, 0.35); color: var(--ink); }
dialog.modal.wide { width: min(820px, 96vw); }
dialog::backdrop { background: rgba(15, 40, 50, 0.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); }
.modal-body { padding: 1.25rem; max-height: 78vh; overflow: auto; }

/* --- sign in --- */
.signin { min-height: 100vh; display: grid; place-items: center; background: var(--pipe); padding: 1rem; }
.signin-card { background: #fff; border-radius: 10px; padding: 2rem; width: min(440px, 100%); display: grid; gap: 1.25rem; }
.signin-card .brand { color: var(--pipe); padding: 0; }
.signin-card h1 { font-size: 1.3rem; }

/* --- toast --- */
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--ink); color: #fff; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none; max-width: 420px; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
.toast-warm { background: var(--warm); }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 0.75rem; }
  .sidebar nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; width: 100%; order: 3; gap: 0.25rem; }
  .nav-link { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .nav-link.active { border-bottom-color: var(--h3); }
  .org { display: none; }
  .sidebar .btn.signout { margin: 0 0 0 auto; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .q-meta { white-space: normal; }
  .toast { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
  main { padding: 1.25rem 1rem 3rem; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
@media print {
  .sidebar, .actions, .inline-form, .tabs, .skip, .toast { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}

/* --- compliance --- */
.subnav { flex-wrap: wrap; margin: -0.25rem 0 1.25rem; }
.subnav a.tab { text-decoration: none; color: var(--ink); }
.subnav a.tab.active { color: #fff; }
.obligations { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.obligation { border: 1px solid var(--rule); border-left: 4px solid var(--good); border-radius: var(--radius); padding: 0.65rem 1rem; background: #fff; }
.obligation-hot { border-left-color: var(--h5); }
.obligation-warm { border-left-color: var(--h3); }
.obligation p { margin: 0.3rem 0 0; color: var(--ink-2); font-size: 0.92rem; }
.obligation details { margin-top: 0.35rem; font-size: 0.88rem; }
.obligation summary { cursor: pointer; color: var(--pipe-2); }
.ob-top { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.alert-good { background: var(--good-bg); border-color: var(--good); color: #17462b; }
.findings { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.4rem; font-size: 0.92rem; }
.rule-ref { display: block; margin-top: 0.35rem; color: inherit; opacity: 0.8; }
.btn.small { font-size: 0.82rem; padding: 0.2rem 0.6rem; }

/* --- staff sign-in (ADR 0009) --- */
.content { min-width: 0; display: flex; flex-direction: column; }
.who { margin-top: auto; padding: 1rem 0.75rem 0.25rem; border-top: 1px solid rgba(255,255,255,0.12); display: grid; gap: 2px; }
.who-name { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.who-name:hover { text-decoration: underline; }
.who small { color: #aab8c9; font-size: 0.8rem; }
.sidebar .who + .btn.signout { margin-top: 0; }
.support-banner { background: var(--warm, #b4580f); color: #fff; padding: 0.6rem 2.5rem; font-size: 0.9rem; font-weight: 600; }
.setup-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: 0.04em;
  background: #f4f6f7; border: 1px solid #dde3e5; border-radius: 6px; padding: 0.6rem 0.75rem; margin: 0.5rem 0; word-break: break-all; user-select: all; }
.steps { padding-left: 1.2rem; display: grid; gap: 0.6rem; margin: 0; }
.signin-card .btn.link { justify-self: start; padding: 0; }
@media print { .who, .support-banner { display: none; } }
.setup-key.small { font-size: 0.85rem; }
[hidden] { display: none !important; }
.backup-codes { columns: 2; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.05rem;
  background: #f4f6f7; border: 1px solid #dde3e5; border-radius: 6px; padding: 0.75rem 0.75rem 0.75rem 2.2rem; margin: 0.5rem 0; }
.backup-codes li { padding: 0.15rem 0; }
.btn.microsoft { display: flex; align-items: center; justify-content: center; gap: 0.6rem; background: #fff; color: #1f1f1f;
  border: 1px solid #8c8c8c; font-weight: 600; text-decoration: none; padding: 0.6rem 1rem; }
.btn.microsoft:hover { background: #f3f3f3; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; display: block; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.or { display: grid; gap: 0.75rem; }
.or-line { display: flex; align-items: center; gap: 0.75rem; color: var(--ink-3, #6b7a80); font-size: 0.85rem; }
.or-line::before, .or-line::after { content: ""; flex: 1; border-top: 1px solid #dde3e5; }
@media print { .backup-codes { columns: 1; } }
.btn.microsoft.small { display: inline-flex; padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.form-heading { font-size: 0.95rem; margin: 0.75rem 0 -0.25rem; padding-top: 0.75rem; border-top: 1px solid #e3e8ea; color: var(--ink-2, #3b4a50); }
.form .form-heading:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
dd.pre { white-space: pre-line; }
.hint.block { display: block; margin-top: 0.15rem; }
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.notes li { border-left: 3px solid #dde3e5; padding: 0.25rem 0 0.25rem 0.75rem; }
.notes p { margin: 0 0 0.2rem; }
p.pre { white-space: pre-line; }
.alert-neutral { background: #eef3f5; border-left: 4px solid #8aa4ad; }
.field.grow { flex: 1; min-width: 260px; }
details summary { cursor: pointer; margin: 0.75rem 0 0.5rem; color: var(--ink-2, #3b4a50); }

/* Metering */
pre.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; background: var(--pipe-soft);
  border: 1px solid var(--rule); border-radius: 6px; padding: 0.6rem 0.75rem; overflow-x: auto; margin: 0.5rem 0; user-select: all; }
pre.code.wrap { white-space: pre-wrap; word-break: break-word; user-select: text; }
a.stat-link { text-decoration: none; color: inherit; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--pipe-2); }
.inline-form .field.grow { flex: 1 1 260px; }
.inline-form .field.grow input { width: 100%; }
.nowrap { white-space: nowrap; }

/* board report */
.headlines { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.4rem; }
.headlines li { padding: 0.55rem 0.75rem; border-radius: var(--radius); background: #f4f6f8; border-left: 4px solid #b8c4cf; }
.headlines li.hl-action { background: var(--hot-bg); border-left-color: var(--h5); }
.headlines li.hl-attention { background: var(--warm-bg); border-left-color: var(--h3); }
.headlines li.hl-good { background: var(--good-bg); border-left-color: var(--good); }
.chart-wrap { overflow-x: auto; }
svg.trend { width: 100%; min-width: 520px; height: auto; display: block; }
svg.trend .grid { stroke: var(--rule); stroke-width: 1; }
svg.trend .axis { font-size: 11px; fill: var(--ink-2); }
svg.trend .bar.billed { fill: var(--pipe); }
svg.trend .bar.collected { fill: #f78133; }
.key-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 0.35rem 0 0.75rem; vertical-align: -1px; }
.key-swatch:first-child { margin-left: 0; }
.key-swatch.billed { background: var(--pipe); }
.key-swatch.collected { background: #f78133; }
.board-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.board-two > .panel { margin: 0; }
.ageing-bar { display: flex; height: 16px; border-radius: 4px; overflow: hidden; background: #eef2f4; margin: 0.25rem 0 0.75rem; }
.ageing-bar span { display: block; height: 100%; }
.age0 { background: var(--h1); } .age1 { background: var(--h2); } .age2 { background: var(--h3); } .age3 { background: var(--h4); } .age4 { background: var(--h5); }
.ageing-key { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; color: var(--ink-2); }
.ageing-key .key-swatch { margin-left: 0; }

/* free trial banner (operator app) and the Bice Technology console */
.trial-banner { background: var(--pipe-soft); color: var(--pipe); padding: 0.55rem 2.5rem; font-size: 0.9rem; border-bottom: 1px solid var(--rule); }
.trial-banner.ended { background: #fdf0e3; color: #7a3d06; }
.trial-banner a { color: inherit; font-weight: 600; }
.modal h3 { font-size: 0.95rem; margin: 1rem 0 0.25rem; }
.facts dd { overflow-wrap: anywhere; }
.tl-head { flex-wrap: wrap; }
.pick.setup { margin-bottom: 1rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
td select { min-width: 8rem; }
td .btn.link { white-space: nowrap; }
/* Ofgem data returns */
.detail-grid.ofgem { grid-template-columns: minmax(0, 1fr) 300px; }
table.ofgem-points td { vertical-align: top; }
table.ofgem-points td .note { font-size: 0.82rem; max-width: 46ch; }
table.ofgem-points ul.pick { margin: 0; text-align: left; }
@media (max-width: 900px) { .detail-grid.ofgem { grid-template-columns: 1fr; } }
.ofgem-periods { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1.25rem; }
.ofgem-period { display: grid; gap: 0.2rem; text-align: left; font: inherit; font-size: 0.85rem; padding: 0.55rem 0.8rem;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); cursor: pointer; min-width: 170px; }
.ofgem-period span { color: var(--ink-2); }
.ofgem-period.active { border-color: var(--pipe); box-shadow: inset 0 0 0 1px var(--pipe); }
.ofgem-period .badge { justify-self: start; }

/* Online payments: Stripe's embedded screens */
.plain-list { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.stripe-embed:not(:empty) { min-height: 3rem; }
.stripe-embed + .panel, .stripe-embed:empty { margin-top: 0; }

/* Prepayment */
ul.checks { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.45rem; }
ul.checks li { padding: 0.45rem 0.6rem; border: 1px solid var(--rule); border-radius: var(--radius); border-left-width: 4px; }
ul.checks li.check-ok { border-left-color: var(--good); }
ul.checks li.check-todo { border-left-color: var(--h3); }
ul.checks li.check-block { border-left-color: var(--h5); background: var(--hot-bg); }
.menu { display: grid; gap: 0.5rem; }
.btn.block { display: block; width: 100%; text-align: left; }
