/* © 2026 Tallawah Systems LLC. All rights reserved. Proprietary and confidential. */
/* Any author `display` rule outranks the browser's own [hidden], which
   would leave a hidden element on screen as a dead button. */
[hidden] {
  display: none !important;
}

/* The agency's brand style sheet: --primary is its wordmark blue, one
   fixed button fill in both themes; --lime the one accent, a background
   and never text; --geico-green only for status colours. --primary-text,
   --surface and --muted-text lighten on a dark background. */
:root {
  /* "only": a browser's forced dark never darkens it; dark is the toggle's, below. */
  color-scheme: only light;
  --primary: #1B4696;
  --primary-text: var(--primary);
  --subtle-blue-text: #526D96;
  /* Text and marks drawn over --primary, which is one fixed blue in both themes. */
  --on-primary: #fff;
  /* Amber, fixed in both themes: something is keeping alerts from this desk.
     --on-amber is the words on it and on every other bright fixed fill. */
  --amber: #ffb300;
  --on-amber: #10240f;
  /* A banner that something is wrong or waiting, fixed in both themes. */
  --alert-red: #b00020;
  --alert-red-edge: #7a0016;
  --on-alert-red: #fff;
  --alert-yellow: #ffd54f;
  /* Greyed: an office or a button not open yet, fixed in both themes. */
  --unavailable: #888;
  --on-unavailable: #ddd;
  --deep-navy: #14306B;
  /* The Dashboard's figures and section names, the deep navy lightening on a dark page. */
  --figure-text: var(--deep-navy);
  /* A Dashboard table's row under the pointer or the keyboard, every cell of it. */
  --row-lit: #D3DFF1;
  --lime: #A8CE3A;
  --background: #FBFDFC;
  --secondary-background: #E4ECF7;
  --surface: #fff;
  --text: #3C4650;
  --muted-text: #4a4a4a;
  --hairline: #E3E9E6;
  --input-border: #C7D5E8;
  --button-hover: #E8F4EF;
  --pressed: #143675;
  --sign-out-red: #B0301F;
  /* A Remove, an error, a field left wrong. */
  --danger: #B3261E;
  /* A box's hint before anything is typed, lighter than what is typed. */
  --placeholder-text: #6E7A86;
  /* A chart's readout over the page, dark on light and light on dark. */
  --tip-background: #2b2b2b;
  --tip-text: #fff;
  /* A table's line between rows, grey enough for either background. */
  --row-rule: rgba(128, 128, 128, 0.35);
  /* The shade at the edge of a strip of tabs a phone scrolls, where more is past it. */
  --strip-edge: color-mix(in srgb, var(--text) 40%, transparent);
  --geico-green: #4B8F39;
  /* A figure a little under its mark and under it, as a bar, a dot or its
     words; --geico-green is at it, --neutral-dot not read yet. */
  --warn-fill: #B7791F;
  --bad-fill: #B00020;
  --neutral-dot: #9aa0a6;
  /* The colours site_sales.py's WEBSITE_COLOURS names for a site's bars. */
  --chart-blue: var(--primary-text);
  --chart-green: var(--geico-green);
  /* A Dashboard grid's second and third group of columns, its first being --chart-blue: a teal and an
     orchid, hues no site's bars (WEBSITE_COLOURS) and no status (green, amber, red) take. */
  --grid-second: #02787E;
  --grid-third: #C262BB;
  --status-neutral-bg: #eef1f6;
  --status-good-bg: #e3f1de;
  --status-good-text: #2f6a24;
  --status-warn-bg: #fbefd6;
  --status-warn-text: #8a5a10;
  --status-bad-bg: #f9e0e4;
  --status-bad-text: #8f001a;
  --status-orange-bg: #fde4d0;
  --status-orange-text: #9a4400;
  --status-yellow-bg: #fbf3c2;
  --status-yellow-text: #6b5a00;
  /* A Compliance line NICHOLS has muted: calmer than amber. */
  --status-muted-dot: #D9B300;
  --status-info-bg: #e2ebfa;
  --status-info-text: #1B4696;
  --standards-below-bg: #17191d;
  --standards-below-text: #ff5a5f;
  --standards-below-ink: #e6eaf0;
  --standards-best-bg: #dccbf2;
  --standards-best-text: #3d2473;
  /* A light: a shared-out customer's (share_out/lights.py) and a job's dot, each at least 3:1 on every surface. */
  --light-completed: #2E7D32;
  --light-in-progress: #C25E00;
  --light-not-started: #C62828;
  /* A job's light's glyph, drawn on the light. */
  --on-light: #fff;
  /* A run bar on the Employee Portal Jobs page: one blue ramp, its own work darkest, the track the slot's room. */
  --seg-own: #1B4696;
  --seg-others: #4F78C2;
  --seg-wait: #8AA9DC;
  --seg-room: #DDE5F1;
  /* Behind the office logo, whose wordmark is the brand's dark blue. */
  --logo-backing: transparent;
}

/* Dark is the toggle's choice alone (theme_toggle.js, data-theme on
   <html>): every page starts light, whatever the computer's own setting.
   color-scheme keeps form controls and scrollbars in the page's theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --primary-text: #86AEEA;
  --subtle-blue-text: #9BB6DF;
  --figure-text: var(--text);
  --row-lit: #2C3D56;
  --background: #12181F;
  --secondary-background: #1B2430;
  --surface: #1E2733;
  --text: #DCE3EA;
  --muted-text: #9AA7B5;
  --hairline: #2B3645;
  --input-border: #3A475A;
  --button-hover: #24303F;
  --pressed: #6E93D6;
  --sign-out-red: #E8837A;
  --danger: #E8837A;
  --placeholder-text: #7D8A99;
  --tip-background: #E4EAF2;
  --tip-text: #12181F;
  --geico-green: #7BC65E;
  --warn-fill: #D9A040;
  --bad-fill: #E5606F;
  --grid-second: #57E3DF;
  --grid-third: #C360BC;
  --status-neutral-bg: #232E3D;
  --status-good-bg: #24391F;
  --status-good-text: #9BDB89;
  --status-warn-bg: #3A2E12;
  --status-warn-text: #E8C27D;
  --status-bad-bg: #3A1A20;
  --status-bad-text: #E89AA6;
  --status-orange-bg: #3D2616;
  --status-orange-text: #F0A46A;
  --status-yellow-bg: #363112;
  --status-yellow-text: #E5D36B;
  --status-muted-dot: #E5CF4F;
  --status-info-bg: #1F2D47;
  --status-info-text: #9DBDF2;
  --standards-below-bg: #000;
  --standards-below-text: #ff7479;
  --standards-below-ink: #e6eaf0;
  --standards-best-bg: #4a3670;
  --standards-best-text: #e6d8fc;
  --light-completed: #7BC65E;
  --light-in-progress: #F59E42;
  --light-not-started: #F2727F;
  --on-light: #12181F;
  --seg-own: #9DBDF2;
  --seg-others: #6489CF;
  --seg-wait: #3E5F9C;
  --seg-room: #2E3A4B;
  --logo-backing: #F4F7FB;
}

* {
  box-sizing: border-box;
}

/* A plain link reads the same visited or not; no weight, so any link
   with a colour of its own keeps it. */
:where(a:link, a:visited) {
  color: var(--primary-text);
}

/* The scrollbar's room kept on every page, scrolling or not: Windows
   draws one that takes width, so without this the centred logo and
   title move sideways between a long page and a short one. Not the
   lobby TV, which never scrolls and fills the screen. */
html {
  scrollbar-gutter: stable;
}

html:has(> body.display-body) {
  scrollbar-gutter: auto;
}

body {
  margin: 0;
  font-family: 'Karla', -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
}

/* A long table's heading rows kept in view while the table is on screen (sticky_heads.js): under a phone's safe
   area, and under a bar already pinned there, which the script sets --sticky-top to clear. Where nothing between
   the table and the page scrolls, the table's own cells stick. */
html {
  --sticky-safe: env(safe-area-inset-top, 0px);
  --sticky-top: var(--sticky-safe);
}

table[data-sticky-head="page"] > thead > tr > * {
  position: sticky;
  top: var(--sticky-top);
  z-index: 2;
}

table[data-sticky-head="page"] > thead > tr[data-sticky-leave] > * {
  position: static;
}

/* A table whose rows hold a marked table of their own lets go of the line while that one's heading holds it. */
table[data-sticky-head="page"][data-sticky-yield] > thead > tr > * {
  position: static;
}

/* In a frame that scrolls sideways, a copy of the heading pinned over the page instead, the frame's width; over
   the table's rows, under Edit Layout's bar, the corner buttons and the banners. */
.sticky-head-copy {
  position: fixed;
  z-index: 40;
  overflow: hidden;
  margin: 0;
  background: var(--background);
  box-shadow: 0 1px 0 var(--hairline);
}

.sticky-head-copy[hidden] {
  display: none;
}

.sticky-head-probe {
  position: fixed;
  top: var(--sticky-safe);
  visibility: hidden;
  pointer-events: none;
}

/* ---- Controls ---- */
/* Every control in the page's font, and one no component draws in the
   theme's colours rather than the browser's own, at no specificity so a
   component's rule always wins. A tick, a radio and a slider take the
   theme's blue; a date's and a time's picker, and the scrollbars,
   follow color-scheme. */
:root {
  accent-color: var(--primary-text);
}

:where(button, input, select, textarea) {
  font-family: inherit;
}

:where(button) {
  color: var(--text);
  background-color: var(--surface);
}

:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"],
               [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea) {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

:where(input[type="color"]) {
  inline-size: 3rem;
  block-size: 2.4rem;
  padding: 2px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  cursor: pointer;
}

/* The file box's own button, as .btn-secondary. */
:where(input[type="file"])::file-selector-button {
  margin-inline-end: 0.75rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--primary-text);
  border-radius: 4px;
  cursor: pointer;
}

:where(fieldset) {
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

::placeholder {
  color: var(--placeholder-text);
  opacity: 1;
}

/* A box the browser filled in (a saved username) keeps the box's colours
   rather than Chrome's own blue, which no rule can recolour. */
input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 100vmax var(--surface) inset;
}

/* The keys' ring in the theme's blue; an option in an open list is marked
   by its row's colours instead (Dropdowns). */
:where(:focus-visible:not(option)) {
  outline: 2px solid var(--primary-text);
  outline-offset: 2px;
}

:where(input:focus-visible, select:focus-visible, textarea:focus-visible) {
  outline-offset: 0;
}

/* Held while it sends (sending.js) or not open yet: no pointer. */
button:disabled {
  cursor: default;
}

/* Transparent PNG on the off-white band -- no color plate behind it. */
.brand-header {
  background: var(--background);
  padding: 0.75rem 1.5rem;
  text-align: center;
}

.brand-header img {
  display: block;
  height: 140px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  background: var(--logo-backing);
}

/* The one lime band per screen, per the style sheet. */
header {
  background: var(--lime);
  color: var(--deep-navy);
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
}

/* Ends on --toggle-clear, so the last row scrolls clear of the corner buttons,
   and keeps clear of the desk alerts' callout at its side while it shows
   (--callout-clear, theme_toggle.js), so it never stands over a row. */
main {
  padding: 1.5rem 1.5rem var(--toggle-clear);
  padding-right: calc(1.5rem + var(--callout-clear, 0px));
  max-width: 900px;
  margin: 0 auto;
}

.card {
  background: var(--secondary-background);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Headings and a box's lone lines read centred; a list of rows under
   them keeps its left edge, where the eye runs down it. */
.card > h2,
.card > h3,
details.card > summary,
.attendance-group > summary,
.roster-group > summary,
.dash-glossary > summary,
.dash-section-name,
.dash-person,
.dash-h4,
.dash-def,
.dash-note,
.dash-empty,
.dash-metric-empty,
.relay-job-status,
.relay-job-round,
.relay-empty,
.selfservice-goal-note,
.authenticator-card {
  text-align: center;
}

.checkin-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkin-form label {
  display: block;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* A fixed height, not padding: a select, a date box and a text box
   otherwise each pick their own and show it side by side. */
.checkin-form input:not([type="checkbox"], [type="radio"], [type="hidden"]),
.checkin-form select,
.checkin-form textarea,
.selfservice-staff-box input:not([type="checkbox"], [type="radio"], [type="hidden"]),
.selfservice-staff-box select {
  display: block;
  width: 100%;
  height: 3.5rem;
  /* Chrome centers a date box's fields on line-height, not height. */
  line-height: 3.5rem;
  padding: 0 1rem;
  font-size: 1.25rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

#submit-button {
  display: block;
  width: 100%;
}

.language-picker,
.department-picker,
.policy-type-picker,
.has-policy-picker,
.yes-no-picker {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Pills, not buttons that submit -- lime marks the chosen one, and
   lime never carries text (the brand style sheet's own rule). */
.language-btn,
.department-btn,
.policy-type-btn,
.has-policy-btn,
.yes-no-btn,
.where-btn {
  flex: 1;
  min-width: 120px;
  padding: 1rem;
  font-size: 1.1rem;
  background: var(--surface);
  color: var(--primary-text);
  border: 1px solid var(--input-border);
  border-radius: 999px;
}

.language-btn.selected,
.department-btn.selected,
.policy-type-btn.selected,
.has-policy-btn.selected,
.yes-no-btn.selected,
.where-btn.selected {
  background: var(--lime);
  color: var(--deep-navy);
  border-color: var(--lime);
}

.checkin-form button {
  margin-top: 1rem;
  padding: 1rem;
  font-size: 1.25rem;
}

button {
  font-size: 1rem;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:active {
  background: var(--pressed);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--primary-text);
}

/* An <a> that reads as a button: the shape rules above are on the
   button element, so a link styled .btn-* would otherwise sit flat. */
.link-button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

#location-retry {
  margin-top: 0.75rem;
}

/* gea-nichols.com's office picker (packaging/build_home_page.py). */
.office-picker {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 28rem;
  margin: 1.5rem auto 0;
}

.office-button {
  display: block;
  padding: 1.25rem;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
}

.office-button:active {
  background: var(--pressed);
}

/* Greyed as the sign-in's unfinished Sign In button is. */
.office-button.unavailable,
.office-button.unavailable:active {
  background: var(--unavailable);
  color: var(--on-unavailable);
  cursor: not-allowed;
}

.office-button small {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
}

/* /transfer's Notes: the placeholder is its prompt on the page, its label a screen reader's alone. */
.notes-box {
  margin-top: 1.25rem;
}

.btn-danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-warn {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
  border: 1px solid var(--status-warn-text);
}

.btn-good {
  background: var(--status-good-bg);
  color: var(--status-good-text);
  border: 1px solid var(--status-good-text);
}

.now-serving {
  text-align: center;
  padding: 2rem;
}

.now-serving .label {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--primary-text);
  font-weight: 700;
}

.now-serving .ticket {
  font-size: 4rem;
  font-weight: 800;
  margin: 0.25rem 0;
}

.now-serving .name {
  font-size: 2rem;
}

.now-serving.empty .ticket {
  font-size: 2rem;
  color: var(--muted-text);
}

/* One of the viewer's own walk-ins on /queue; several stack, newest first. */
.my-visit .ticket {
  font-size: 2.5rem;
}

.my-visit + .my-visit {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

/* Centred so "✓ Sale Recorded" sits level with the buttons beside it. */
.my-visit .now-serving-actions {
  flex-wrap: wrap;
  align-items: center;
}

.now-serving-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Record's kept sales: each line, why it waits for its rep, and its buttons, wrapping on a narrow screen. */
#held-sales .held-sale {
  flex-wrap: wrap;
  align-items: center;
}

#held-sales .held-why {
  color: var(--status-warn-text);
  font-size: 0.9rem;
}

/* A person's own switch (Queue's Walk Ins and Queue On / Off, the Staff
   Roster's Show Every Office): filled blue and saying On while it is on,
   so it reads without colour too; Queue's line under it is the one for
   its state. */
.up-front-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.up-front-switch {
  min-width: 4.5rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--primary-text);
}

.up-front-switch[aria-checked="true"] {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.up-front-switch[aria-checked="true"] .up-front-off,
.up-front-switch[aria-checked="false"] .up-front-on,
.up-front:has(.up-front-switch[aria-checked="true"]) .up-front-said-off,
.up-front:has(.up-front-switch[aria-checked="false"]) .up-front-said-on {
  display: none;
}

.roster-switch-row {
  flex-wrap: wrap;
  margin: 0.5rem 0 0.75rem;
}

.up-front-said {
  text-align: center;
  margin: 0.5rem 0 0;
}

.ticket-detail {
  font-size: 0.85rem;
  color: var(--muted-text);
}

.waiting-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.waiting-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
}

.waiting-list li:last-child {
  border-bottom: none;
}

/* A walk-in left waiting past lobby/assign.py's minutes, so a supervisor
   sees whom to Assign: amber, then red; the wait itself is in words too. */
.waiting-list li[data-waited="amber"],
.waiting-list li[data-waited="red"] {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  border-left: 4px solid var(--status-warn-text);
  background: var(--status-warn-bg);
}

.waiting-list li[data-waited="red"] {
  border-left-color: var(--status-bad-text);
  background: var(--status-bad-bg);
}

.waiting-list li[data-waited="amber"] .waited {
  color: var(--status-warn-text);
  font-weight: 600;
}

.waiting-list li[data-waited="red"] .waited {
  color: var(--status-bad-text);
  font-weight: 700;
}

.ticket-number {
  font-variant-numeric: tabular-nums;
  color: var(--muted-text);
  width: 4ch;
}

.name {
  flex: 1;
}

/* Sits at the far right of the same bar as .ticket-number/.name. */
.department {
  color: var(--muted-text);
}

/* /display, the lobby TV read from across the room: one screen, never
   scrolled, every size following the screen's own (vmin), so a
   portrait TV and a landscape one both fill. */
.display-body {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: calc(1.6vmin + 0.4rem);
}

.display-body .brand-header {
  padding: 0.5em 1em;
}

.display-body .brand-header img {
  height: 9vmin;
}

.display-body header {
  font-size: 1.35em;
  padding: 0.6em 1em;
}

/* Wrapped onto two lines on a narrow screen, each line centred. */
.display-body .bilingual-header {
  justify-content: space-around;
  gap: 0.25em 2em;
}

.display-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1em;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.display-main .card {
  margin: 0;
  padding: 1em;
}

.display-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 1em;
  margin: 0 0 0.5em;
  font-size: 1.4em;
  letter-spacing: 0.05em;
  color: var(--primary-text);
}

/* Several desks can serve at once: one entry fills the row, more share it. */
.display-serving-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13em), 1fr));
  gap: 0.75em;
}

.display-serving-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5em 0.75em;
  background: var(--surface);
  border-left: 0.35em solid var(--primary-text);
  border-radius: 4px;
}

.display-serving-entry .ticket {
  font-size: 4em;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary-text);
  font-variant-numeric: tabular-nums;
}

.display-serving-list[data-count="1"] .ticket {
  font-size: 8em;
}

.display-serving-entry .name {
  flex: none;
  font-size: 2em;
  font-weight: 700;
}

.display-serving-list[data-count="1"] .name {
  font-size: 2.6em;
}

/* Quieter than the customer's own name -- it says who is coming. */
.display-serving-entry .called-by {
  font-size: 1.2em;
  color: var(--muted-text);
}

.display-empty {
  text-align: center;
  color: var(--muted-text);
  font-size: 1.5em;
  padding: 0.5em 0;
}

#serving-empty {
  font-size: 4em;
}

/* An empty section says so in its middle. */
.display-main .display-empty {
  margin: auto 0;
}

.display-serving {
  display: flex;
  flex-direction: column;
}

.display-waiting {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.display-waiting .waiting-list {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.display-body .waiting-list li {
  font-size: 1.9em;
  padding: 0.35em 0;
}

.display-body .waiting-list .ticket-number {
  width: 4ch;
  font-weight: 700;
  color: var(--primary-text);
}

.display-body .waiting-list .department {
  color: var(--muted-text);
}

.display-more {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--muted-text);
  padding-top: 0.35em;
  border-top: 1px solid var(--hairline);
}

/* A landscape screen: the two sections side by side. */
@media (min-aspect-ratio: 1/1) {
  .display-main {
    flex-direction: row;
  }

  .display-serving {
    flex: 1.2 1 0;
    min-width: 0;
    overflow: hidden;
  }

  .display-waiting {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Tabs under the page title, since the installed app has no address
   bar. Above the cards, so it's there for a back-office desk too. */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  background: var(--secondary-background);
}

/* A desk's own tabs on one side, what a manager opens on the other,
   so the two aren't read as one list. */
.page-nav-desk,
.page-nav-end {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-nav-link {
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}

/* A tab lights up in the title band's green as the pointer crosses it,
   one that only names its menu as one that is a page, its arrow inside
   taking the same colour. */
a.page-nav-link:hover,
.page-nav-choice:hover {
  background: var(--lime);
  color: var(--deep-navy);
}

.page-nav-link.current {
  background: var(--primary);
  color: var(--on-primary);
}

/* A link without a clear keyboard ring is indistinguishable from the
   selected tab when the portal is used without a mouse. */
.page-nav-link:focus-visible,
.sign-out button:focus-visible {
  outline: 3px solid var(--deep-navy);
  outline-offset: 3px;
}

/* A tab with more under it: the Dashboard's pages, Record, Tools, Self
   Service, and Sign Out's other offices. Its arrow sits inside the tab's
   pill, in room the tab keeps at its right end (--nav-arrow, the arrow's
   width too), so a lit or ringed tab holds its arrow; a tab that only
   names its menu holds it inside its own button. */
.page-nav-menu {
  --nav-arrow: 1.75rem;
  position: relative;
  display: inline-flex;
  align-items: center;
}

.page-nav-link:has(+ .page-nav-more),
.page-nav-choice,
.sign-out-menu .sign-out button {
  padding-right: var(--nav-arrow);
}

.page-nav-more {
  align-self: stretch;
  width: var(--nav-arrow);
  margin-left: calc(-1 * var(--nav-arrow));
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.75rem;
  color: var(--primary-text);
  cursor: pointer;
}

/* On a lit tab the arrow takes the tab's own text colour. */
.page-nav-link.current + .page-nav-more {
  color: var(--on-primary);
}

a.page-nav-link:hover + .page-nav-more {
  color: var(--deep-navy);
}

/* With a mouse, the pointer over the arrow lights its tab as over the tab
   itself, so the pill lights and unlights as one. */
@media (hover: hover) {
  a.page-nav-link:has(+ .page-nav-more:hover) {
    background: var(--lime);
    color: var(--deep-navy);
  }

  a.page-nav-link + .page-nav-more:hover {
    color: var(--deep-navy);
  }
}

/* A page's own pages in a menu: its pill as wide as the list, its arrow
   at the list's edge. */
.page-nav-sub > .page-nav-link {
  flex: 1;
}

/* A tab that only names its menu: a button, so it is reachable by
   keyboard without being a link to nowhere, its arrow centred in its
   room as a page tab's is. */
.page-nav-choice {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: inherit;
  cursor: pointer;
}

.page-nav-arrow {
  display: inline-block;
  width: var(--nav-arrow);
  margin-right: calc(-1 * var(--nav-arrow));
  font-size: 0.75rem;
  text-align: center;
}

.page-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.4rem;
  background: var(--secondary-background);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.page-nav-dropdown.flip {
  left: auto;
  right: 0;
}

.page-nav-menu:focus-within > .page-nav-dropdown,
.page-nav-menu.open > .page-nav-dropdown {
  display: flex;
}

/* A mouse opens a menu by passing over it. A touch screen opens it by the
   tap alone (.open), since its hover sticks after a tap and would hold a
   menu open, or take the tap a link meant. */
@media (hover: hover) {
  .page-nav-menu:hover > .page-nav-dropdown {
    display: flex;
  }
}

/* A page in a menu with its own pages opens them in a second list beside
   it, its first page level with it. */
.page-nav-sub > .page-nav-dropdown {
  top: -0.4rem;
  left: 100%;
}

.page-nav-sub > .page-nav-dropdown.flip {
  left: auto;
  right: 100%;
}

/* On a page under the menu, its tab and arrow show where you are. */
.page-nav-menu:has(.page-nav-dropdown .current) {
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--primary-text);
}

/* A heading over a group of pages in a menu, not a link itself. */
.page-nav-group {
  padding: 0.35rem 1rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted-text);
}

.page-nav-group + .page-nav-link {
  padding-left: 1.5rem;
}

.sign-out {
  text-align: center;
  padding: 0.35rem 0;
}

/* Same box as a tab, pushed to the far end so it doesn't read as one. */
.page-nav .sign-out,
.sign-out-menu {
  margin-left: auto;
  padding: 0;
}

/* Sign Out's arrow in its red, so the two read as one control. */
.sign-out-menu .page-nav-more {
  color: var(--sign-out-red);
}

/* A finger's targets: on a touch screen each tab, menu button, arrow and
   menu link is at least 44px high, and an arrow 44px wide, its tab
   keeping that much room for it so it stays inside the pill. */
@media (pointer: coarse) {
  .page-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .page-nav-menu {
    --nav-arrow: 44px;
  }

  .page-nav-more {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  /* Keep each group intact and let a compact screen scroll the tabs
     horizontally instead of wrapping the sign-out control into them. An
     edge with more past it is shaded, so a tab cut short there reads as
     more to scroll to; the shade sits under the tabs, gone at either end. */
  .page-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-inline: 0.75rem;
    background:
      linear-gradient(to right, var(--secondary-background) 40%, transparent) left / 2.5rem 100% no-repeat local,
      linear-gradient(to left, var(--secondary-background) 40%, transparent) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--strip-edge), transparent) left / 0.9rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--strip-edge), transparent) right / 0.9rem 100% no-repeat scroll,
      var(--secondary-background);
  }

  .page-nav-desk,
  .page-nav-end {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .page-nav-link,
  .page-nav-sub > .page-nav-link,
  .page-nav .sign-out {
    flex: 0 0 auto;
  }

  /* A scrolling strip would clip a menu hanging under its tab, and a
     phone has no hover, so what is under one is a tab of its own here,
     never popped out by a tap's hover or focus. */
  .page-nav-menu,
  .page-nav-dropdown,
  .page-nav-menu:is(:hover, :focus-within, .open) > .page-nav-dropdown {
    display: contents;
  }

  .page-nav-more,
  .page-nav-choice,
  .page-nav-group {
    display: none;
  }

  /* No arrow here, so no room kept for one. */
  .page-nav-link:has(+ .page-nav-more),
  .sign-out-menu .sign-out button {
    padding-right: 1rem;
  }

  .page-nav-menu:has(.page-nav-dropdown .current) {
    box-shadow: none;
  }

  .page-nav-group + .page-nav-link {
    padding-left: 1rem;
  }

  /* A second list's pages follow their page in the strip, marked as under it. */
  .page-nav-sub > .page-nav-dropdown > .page-nav-link::before {
    content: "\203A\00A0" / "";
    opacity: 0.6;
  }
}

.sign-out button {
  background: none;
  border: 0;
  padding: 0.35rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: inherit;
  color: var(--sign-out-red);
  cursor: pointer;
}

.login-form {
  max-width: 420px;
  margin: 0 auto;
}

/* Sign-in's two steps, each laid out as the form itself is. */
.login-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* The password step's U-code, with Not You? beside it. */
.login-who {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 1rem 0 0;
  font-size: 1.25rem;
}

#signing-in-as {
  font-weight: 700;
  overflow-wrap: anywhere;
}

#not-you {
  font-size: 1rem;
  font-weight: 600;
}

.location-button {
  display: block;
  margin: 0.5rem auto 0;
}

#submit-button:disabled {
  cursor: not-allowed;
}

/* One box that reads as six slots -- separate boxes would lose the
   phone's one-tap code fill and paste. */
.checkin-form input.code-input {
  text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 1.75rem;
  letter-spacing: 0.6em;
  padding-left: 1.6em;
}

.checkin-form input.code-input::placeholder {
  color: var(--input-border);
}

.login-error {
  color: var(--danger);
  font-weight: 600;
  text-align: center;
}

.login-note {
  color: var(--muted-text);
  text-align: center;
  margin: 1rem 0 0;
}

.login-note + .login-note {
  margin-top: 0.25rem;
}

/* Self Service > Mobile's Signed In On: a line a sign-in, this browser's marked. */
.signed-in-on-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.signed-in-on-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.signed-in-on-browser {
  font-weight: 600;
}

.signed-in-on-this {
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* Keep me signed in on this computer: the tick beside its words. */
.checkin-form label.login-keep {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  margin: 1.25rem 0 0;
  cursor: pointer;
}

.login-keep input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
}

.setup-key {
  display: block;
  margin: 0.75rem 0;
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  user-select: all;
}

.setup-qr {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.setup-instructions {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

.setup-instructions h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.setup-instructions summary {
  cursor: pointer;
  padding: 0.5rem 0;
  font-weight: 600;
  color: var(--primary-text);
}

.setup-instructions details p {
  margin: 0.25rem 0 0.75rem;
  color: var(--muted-text);
}

/* Wider than the shared 900px: a ticket's detail line needs the room. */
.admin-body main {
  max-width: 1300px;
}

/* A form page (check-in, sign-in, a desk's own pages) reads as a centered
   form on a tablet or a phone, not a left-aligned document. */
.checkin-body main {
  text-align: center;
}

/* A lobby taking no walk-ins: the way to the front desk, a line per language. */
.checkin-closed p {
  font-size: 1.4rem;
  margin: 0.75rem 0;
}

/* Form controls don't reliably inherit text-align, so they're set
   directly -- this is also what centers their placeholders. Chrome and
   Edge center a select's chosen value on text-align-last instead. */
.checkin-body .checkin-form input,
.checkin-body .checkin-form select {
  text-align: center;
  text-align-last: center;
}

/* Two fields on one line, neither of which needs the full width.
   Wraps back to stacked on a narrow phone. */
.field-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.field-row .field {
  flex: 1;
  min-width: 10rem;
}

/* Record's QuoteWizard outcome: its longest reason fits a phone's box. */
@media (max-width: 560px) {
  .checkin-body .checkin-form #quotewizard-outcome {
    font-size: 1rem;
  }
}

/* Sign-in's and Check In's send button, grey until its form is filled in. */
.checkin-body #submit-button {
  background: var(--primary);
  color: var(--on-primary);
}

.checkin-body #submit-button.incomplete {
  background: var(--unavailable);
  color: var(--on-unavailable);
}

input.invalid,
select.invalid {
  border-color: var(--danger) !important;
  border-width: 2px !important;
}

/* The box to fix is focused at once, so its ring is red too. */
input.invalid:focus,
select.invalid:focus {
  outline: 2px solid var(--danger);
}

.department-picker.invalid,
.policy-type-picker.invalid,
#policy-number-question.invalid,
#ended-policy-question.invalid {
  border: 2px solid var(--danger);
  border-radius: 4px;
  padding: 0.5rem;
}

.form-warning {
  margin-top: 0.75rem;
  color: var(--status-warn-text);
  font-size: 0.9rem;
}

/* A phone box has no label of its own, so it takes a question's space from the answer above it. */
#phone-number-field,
#service-phone-number-field {
  margin-top: 1.5rem;
}

/* Check In's way on in English, under the notice that nobody in speaks the customer's language. */
.language-warning button {
  display: block;
  margin-top: 0.75rem;
}

/* The customer's pick of a rep: two pills on the form, and the whole
   list in a sheet over the page, so a long floor never stretches the form. */
.rep-choice {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.checkin-form .rep-btn,
.assign-sheet .rep-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 1.15rem;
  text-align: left;
  background: var(--surface);
  color: var(--primary-text);
  border: 1px solid var(--input-border);
  border-radius: 12px;
}

.checkin-form .rep-pill {
  flex: 1;
  min-width: 12rem;
  min-height: 4rem;
  justify-content: center;
  border-radius: 999px;
}

.rep-initial {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--secondary-background);
  color: var(--primary-text);
  font-weight: 700;
}

.rep-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkin-form .rep-btn.selected {
  background: var(--lime);
  color: var(--deep-navy);
  border-color: var(--lime);
}

.rep-btn.selected .rep-initial {
  background: var(--deep-navy);
  color: var(--lime);
}

.rep-sheet {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.5);
}

.rep-sheet[hidden] {
  display: none;
}

.rep-sheet-panel {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: 100%;
  overflow: hidden;
  background: var(--secondary-background);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.rep-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 1rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
  color: var(--primary-text);
  font-size: 1.35rem;
  font-weight: 700;
}

.checkin-form .rep-sheet-close,
.assign-sheet .rep-sheet-close {
  flex: none;
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  font-size: 1.75rem;
  line-height: 1;
}

.rep-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.6rem;
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Queue's Assign: the same sheet as a <dialog>, so the page behind it is
   out of reach and Escape closes it. One rep or many sit centred, a
   column on a phone, each with Free or whom they're helping under the
   name and the rep the customer asked for marked. */
.assign-sheet {
  width: min(44rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--secondary-background);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.assign-sheet[open] {
  display: flex;
  flex-direction: column;
}

.assign-sheet::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.assign-sheet-detail {
  margin: 0;
  padding: 0.75rem 1.5rem 0;
}

.assign-sheet .rep-picker {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 14rem));
  justify-content: center;
}

.assign-sheet .rep-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.assign-sheet button:focus-visible {
  outline: 3px solid var(--primary-text);
  outline-offset: 2px;
}

.assign-sheet .rep-btn.asked-for {
  border-color: var(--primary-text);
  box-shadow: inset 0 0 0 1px var(--primary-text);
}

.assign-rep-words {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.assign-rep-words .rep-name {
  max-width: 100%;
  font-weight: 700;
}

.assign-rep-status {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-text);
}

.assign-asked {
  margin-top: 0.25rem;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.assign-sheet-note {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--muted-text);
}

.assign-sheet-foot {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.5rem 1.25rem;
}

.assign-sheet-foot button {
  margin: 0;
}

@media (max-width: 560px) {
  .assign-sheet .rep-picker {
    grid-template-columns: minmax(0, 1fr);
    padding: 1rem;
  }

  .assign-sheet-detail {
    padding: 0.75rem 1rem 0;
  }

  .assign-sheet-foot {
    padding: 0 1rem 1rem;
  }
}

.rep-hint,
.question-hint {
  margin-top: 0.75rem;
  color: var(--muted-text);
  font-size: 0.95rem;
}

/* A shared tablet on a stand: no grey flash or double-tap zoom on a
   tap, and clear of the home bar. */
.kiosk {
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}

.kiosk button {
  touch-action: manipulation;
}

@media (min-width: 700px) {
  .kiosk main {
    max-width: 760px;
    padding: 2rem 2rem var(--toggle-clear);
  }

  .kiosk header {
    font-size: 1.6rem;
    padding: 1.25rem 2rem;
  }

  .kiosk .card {
    padding: 1.75rem 2rem;
    border-radius: 12px;
  }

  .kiosk .checkin-form label {
    font-size: 1.2rem;
  }

  .kiosk .language-btn,
  .kiosk .department-btn,
  .kiosk .policy-type-btn,
  .kiosk .has-policy-btn,
  .kiosk .yes-no-btn {
    min-height: 4rem;
    font-size: 1.3rem;
  }
}

/* The first question sits at the card's own padding, not a label's gap. */
.kiosk #policy-type-question > label,
.kiosk #policy-number-question > label {
  margin-top: 0;
}

.kiosk .brand-header img {
  height: 100px;
}

/* An iPad on its side: the logo gives up more height so the form
   starts on screen. */
@media (orientation: landscape) and (max-height: 900px) {
  .kiosk .brand-header img {
    height: 72px;
  }
}

#subject-other-field label {
  margin-top: 1.25rem;
}

#subject-other-field input {
  width: 100%;
}

.bilingual-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}


/* The training copy's strip, first on every page: in the page's flow, so
   it never covers anything, and in em, so the lobby TV's reads across the
   room. Orange, a hue no other banner across the page takes. */
.training-banner {
  padding: 0.5em 1em;
  background: var(--status-orange-bg);
  color: var(--status-orange-text);
  border-bottom: 3px solid currentColor;
  font-weight: 700;
  text-align: center;
}

/* View As on the training copy: whom the page is viewed as, and Back to You beside it. */
.training-viewing-as a {
  color: inherit;
}

.training-back {
  display: inline;
  margin-left: 0.5em;
}

.training-back button {
  padding: 0.15em 0.75em;
}

/* The training copy's View As, at the top of the Help pop-up. */
.page-key-view-as {
  margin: 0.75rem 0 0;
  text-align: center;
}

/* A banner across the page: a notice, the call bar, a relay's state.
   Queue's lost connection means every alert there is off, so it mustn't
   look like furniture. */
.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  /* Every banner is as tall as one with a button, so the page doesn't jump. */
  min-height: 61px;
}

.alert-banner button,
#desk-alerts-callout button {
  padding: 0.4rem 0.9rem;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
}

/* Amber: something here needs fixing before the page works as it should. */
.alert-banner.alerts-off {
  color: var(--on-amber);
  background: var(--amber);
}

/* Green: what the last save did. */
.alert-banner.alerts-on {
  color: var(--on-amber);
  background: var(--lime);
}

/* Red: the page has lost the stream, so every alert on it is off. */
.alert-banner.connection-lost {
  color: var(--on-alert-red);
  background: var(--alert-red);
}

.alert-banner.waiting {
  color: var(--on-amber);
  background: var(--alert-yellow);
}

/* Confirms the call this desk just accepted, and carries the name and
   number the accepted row took with it when it left the list above. */
.alert-banner.call-waiting {
  color: var(--on-primary);
  background: var(--primary);
}

.call-banner-detail {
  font-weight: 400;
  opacity: 0.9;
}

.call-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* A phone has no room beside the words, so the bar's buttons go under them and wrap. */
@media (max-width: 560px) {
  .alert-banner.call-waiting {
    flex-direction: column;
    align-items: stretch;
  }

  .call-banner-actions {
    flex-wrap: wrap;
    flex-shrink: 1;
  }
}

/* Sits where the Record Sale button was, so the confirmation lands
   under the eye that just clicked it. */
.sale-recorded {
  white-space: nowrap;
}

/* Calls Waiting and Accepted Calls: left border in the same blue, so the
   card reads as belonging with the call banner above it rather than as
   another queue. */
.call-queue {
  border-left: 6px solid var(--primary-text);
}

/* Callers owed a ring back, red: the one list here that only goes down
   when somebody acts on it. */
.call-missed {
  border-left: 6px solid var(--danger);
}

.call-missed .card-heading {
  color: var(--danger);
}

.card-heading {
  margin-bottom: 0.75rem;
}

/* The call lists' rows are two lines or more, so they sit top-aligned. */
.call-queue .waiting-list li,
.call-missed .waiting-list li {
  align-items: flex-start;
}

/* Queue on a phone: a row's number and name share its first line, its
   details take the width under them, and its buttons a line of their own
   below, rather than each squeezed into a column of a word or two. */
@media (max-width: 560px) {
  .queue-body .waiting-list li {
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
  }

  .queue-body .waiting-list li > .name {
    flex: 1 1 0;
    min-width: 0;
  }

  .queue-body .waiting-list li > .ticket-detail,
  .queue-body .waiting-list li > .ticket-actions {
    flex-basis: 100%;
  }

  .queue-body .waiting-list li > .ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* A missed walk-in is one row, as a missed call is: the customer on the
   left, its buttons on the right, wrapping within half the row while a
   rep's outcomes are more than one line holds. A phone puts them under
   the customer, as Queue's other rows. */
@media (min-width: 561px) {
  .walk-ins-missed .waiting-list li > .ticket-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    max-width: 50%;
  }
}

.walk-ins-missed .call-note {
  margin-top: 0;
}

.missed-walk-in-name {
  font-weight: 600;
}

/* /transfer's own "who took the call" answer -- the one thing the
   asker is still on that page to read. */
.transfer-status {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 0.35rem;
}

/* A bordered part of a form or page under its legend; a saved /sales
   policy shuts to one summary line. */
.box {
  border: 1px solid var(--primary-text);
  border-radius: 4px;
  padding: 0 1rem 1rem;
  margin-top: 1.5rem;
}

/* An auto margin centres a legend and keeps it shrink-to-fit, so its
   notch in the border moves with it. */
.box legend {
  margin-inline: auto;
  font-weight: 600;
  color: var(--primary-text);
  padding: 0 0.5rem;
}

.box label {
  margin-top: 1rem;
}

.box.collapsed .box-fields {
  display: none;
}

.box-summary {
  padding: 1rem 0 0.25rem;
  font-size: 1.1rem;
}

/* Record's Agent for a sales agent, who records only their own sales:
   no arrow and full strength, so it reads as fixed rather than broken. */
.checkin-form select:disabled {
  appearance: none;
  opacity: 1;
  background: var(--secondary-background);
  cursor: default;
}

/* A box Record fills in and holds (the dealership a referral type always
   is, a picked-up referral's credit) reads as fixed, as the Agent does. */
#refer-form input[readonly] {
  background: var(--secondary-background);
  cursor: default;
}

/* Record's buttons under the Source of Account and a referral's type:
   Check In's rep-choice pills, sized for a form with six in a row and
   centred as Check In's are, each wrapped line too. */
#refer-form .record-choice,
#settings-form .record-choice {
  margin-top: 0.75rem;
  justify-content: center;
}

#refer-form .record-choice .rep-pill,
#settings-form .record-choice .rep-pill {
  flex: 0 0 auto;
  min-width: 8rem;
  min-height: 2.75rem;
  font-size: 1rem;
}

#refer-form .record-choice .rep-pill:disabled {
  cursor: default;
}

/* Record's word that a write-up is recorded, over the form already
   cleared for the next, and the link to edit the sale. */
#recorded-note {
  margin-bottom: 1rem;
}

#recorded-link {
  color: var(--primary-text);
  font-weight: 600;
}

/* The contact's email on file: shown read-only in place of the box, which
   is still sent, as `hidden` would stop. */
#dealer-email-field.on-file #dealer-email,
#dealer-email-field:not(.on-file) #dealer-email-on-file {
  display: none;
}

.checkin-form textarea {
  height: auto;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  resize: vertical;
}

/* No background of its own: a dark-mode browser leaves inherited
   colors alone and fights a fixed light one. */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.price-table th,
.price-table td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--row-rule);
}

.price-table th:first-child {
  text-align: left;
  font-weight: 600;
}

.price-table thead th {
  font-weight: 400;
  opacity: 0.75;
}

.price-note {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.price-table tr.bundle {
  font-weight: 700;
  font-size: 1.25rem;
}

/* /hr/schedule: a quarter's Saturdays and a year's PTO read as plain tables. */
.hr-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.hr-table th,
.hr-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--row-rule);
}

/* Faint words, never a faint cell: a heading kept in view (sticky_heads.js)
   is drawn whole over the rows passing under it. */
.hr-table thead th {
  font-weight: 400;
  color: color-mix(in srgb, var(--text) 75%, transparent);
}

/* The quarter reads as columns on a laptop: the day never wraps, the
   counts sit together, and a wide quarter scrolls sideways inside its card. */
.hr-table-wrap {
  overflow-x: auto;
}

.hr-table td.hr-day {
  white-space: nowrap;
}

.hr-table td.hr-count {
  white-space: nowrap;
  text-align: center;
}

.hr-table th.hr-count {
  text-align: center;
}

.hr-table td.hr-short {
  color: var(--status-bad-text);
  font-weight: 600;
}

.hr-quarter th,
.hr-quarter td {
  min-width: 7rem;
}

.hr-quarter tr.hr-cover td.hr-day {
  color: var(--status-warn-text);
  font-weight: 600;
}

.hr-table form {
  display: inline;
}

/* A table in a card too narrow for its columns -- a phone, or an iPad
   with the text made larger: a row each, its first cell the heading and
   every other a label beside its value, so none of it scrolls sideways.
   /dealer's figures, and Admin's lists. */
.road-table-card {
  container-type: inline-size;
}

/* A figure wraps in a tight column rather than pushing the table past its card. */
.road-table td.hr-count {
  white-space: normal;
}

@container (max-width: 36rem) {
  .road-table,
  .road-table tbody {
    display: block;
  }

  .road-table thead {
    display: none;
  }

  .road-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--row-rule);
  }

  .road-table :is(td, th) {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .road-table tr > :first-child {
    grid-column: 1 / -1;
    font-weight: 700;
  }

  .road-table td[data-label] {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 0.5rem;
    text-align: right;
  }

  .road-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 400;
    color: var(--muted-text);
    text-align: left;
  }

  /* A long label or value, or a pick, takes the row's whole width, a
     value too long for the label's line reading from the left under it. */
  .road-table td.wide {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* A list with more columns than its card can hold side by side (GEICO
   Rejections' lists) folds the same way wherever its card is
   narrower than those columns need, a laptop's included, so none of it
   runs past the card. */
@container (max-width: 76rem) {
  .road-table-wide,
  .road-table-wide tbody {
    display: block;
  }

  .road-table-wide thead {
    display: none;
  }

  .road-table-wide tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.15rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--row-rule);
  }

  .road-table-wide :is(td, th) {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .road-table-wide tr > :first-child {
    grid-column: 1 / -1;
    font-weight: 700;
  }

  .road-table-wide td[data-label] {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 0.5rem;
    text-align: right;
  }

  .road-table-wide td[data-label]::before {
    content: attr(data-label);
    font-weight: 400;
    color: var(--muted-text);
    text-align: left;
  }

  .road-table-wide td.wide {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* All Saturdays: a row per day that opens to its people as one chip each. */
.hr-quarter td.hr-open-cell {
  min-width: 0;
  text-align: right;
}

.hr-open {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  background: var(--surface);
  color: var(--primary-text);
  cursor: pointer;
}

.hr-open[aria-expanded="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.hr-quarter tr:has(+ tr.hr-people:not([hidden])) td {
  border-bottom: 0;
}

.hr-quarter tr.hr-people td {
  background: var(--secondary-background);
  padding: 0.75rem;
}

/* Admin's Retention: the customers a rep has finished, folded under who is left. */
.retention-completed {
  margin-top: 0.75rem;
}

.retention-completed > summary {
  cursor: pointer;
  font-weight: 600;
}

/* A step's tick and the word beside it, both read-only. */
.road-table td.retention-step input {
  margin: 0;
}

.road-table td.retention-step span {
  margin-left: 0.35rem;
}

/* The caret beside a card's heading folds the card to the heading alone. */
.retention-fold {
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

#section-retention .card.folded > :not(.dash-card-head) {
  display: none;
}

#section-retention .card.folded > .dash-card-head {
  margin-bottom: 0;
}

/* What waits on a card, beside its heading, so a folded card still says it. */
.retention-head-count {
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* Who Has What: a list's name is the button that opens its card. */
.retention-glance-list {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

/* A list's tools, a white bar each under its reps, as /service's groups
   sit in their section: the bar's name is the form's one heading, and
   open, the form is Record's, centred, no wider than Record's own. A
   check before Confirm (and a rep's Return to Pool) takes the bar's
   width for its table, its words and buttons centred. */
#section-retention .retention-tools {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}

/* A Call List with nothing in its pool has no tool to show, so no gap for one. */
#section-retention .retention-tools:not(:has(> .retention-tool:not([hidden]))) {
  display: none;
}

#section-retention .retention-tool {
  min-width: 0;
  background: var(--surface);
  border-radius: 6px;
}

#section-retention .retention-tool > summary {
  padding: 0.85rem 1.15rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--figure-text);
  overflow-wrap: anywhere;
  cursor: pointer;
}

#section-retention .retention-tool > summary::marker {
  color: var(--figure-text);
}

#section-retention .retention-tool > summary:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: -2px;
  border-radius: 6px;
}

#section-retention .retention-tool[open] {
  padding-bottom: 1.25rem;
}

#section-retention .retention-tool > :not(summary) {
  margin: 0 1.15rem;
}

#section-retention .retention-tool > .checkin-form {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.15rem;
  gap: 0.5rem;
  text-align: center;
}

#section-retention .retention-tool .checkin-form label {
  margin: 1rem 0 0.25rem;
}

#section-retention .retention-tool .checkin-form label:first-of-type {
  margin-top: 0.25rem;
}

#section-retention .retention-tool .question-hint {
  margin: 0;
  font-size: 0.9rem;
}

/* What is pasted reads from its left edge, a sheet's columns as copied. */
#section-retention .retention-tool textarea {
  font-size: 1rem;
  text-align: left;
}

#section-retention .retention-tool .form-warning {
  margin-top: 0.5rem;
}

#section-retention .retention-check {
  text-align: center;
}

#section-retention .retention-check-said,
#section-retention .card .retention-check .dash-note {
  margin: 0.5rem 0;
  text-align: center;
}

#section-retention .retention-check > .checkin-form {
  max-width: 40rem;
  margin: 1rem auto 0;
  gap: 0.5rem;
}

/* A rep's pick in a check's table fills its cell however narrow, never a fixed width past it. */
#section-retention .retention-check .road-table select {
  min-width: 0;
}

/* One customer as written: each field's name beside what it holds. */
#section-retention .retention-check-lines {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 1rem;
  max-width: 32rem;
  margin: 0.75rem auto;
  text-align: left;
}

#section-retention .retention-check-lines dt {
  color: var(--muted-text);
}

#section-retention .retention-check-lines dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#section-retention .retention-check-list {
  margin: 0.5rem 0;
  padding: 0;
  list-style: none;
}

#section-retention .retention-check-list li + li {
  margin-top: 0.25rem;
}

#section-retention .retention-check .selfservice-buttons {
  margin-top: 1rem;
}

/* What a Confirm did, a line of its own under the list's reps. */
#section-retention .card > .alert-banner {
  margin-top: 1rem;
  border-radius: 6px;
}

/* Admin's Commissions: a rep's row opens to their sales the same way,
   in the table's own weight once it folds and its row heads go bold. */
.road-table tr.commissions-rep-sales > td {
  background: var(--secondary-background);
  padding: 0.75rem;
  font-weight: 400;
}

.road-table tr.commissions-total > * {
  font-weight: 700;
}

/* A rep's sales: the policy its pill and number, the short day on one
   line, Active its widest pill (Cancel Pending), Pays its mark, Verified
   room for its check, tag and Check, and the flags what is left, room for
   their chips side by side. */
.commissions-sales {
  table-layout: fixed;
}

.commissions-sales th:nth-child(1) { width: 15%; }
.commissions-sales th:nth-child(2) { width: 8rem; }
.commissions-sales th:nth-child(3) { width: 4.75rem; }
.commissions-sales th:nth-child(4) { width: 8rem; }
.commissions-sales th:nth-child(5) { width: 12rem; }
.commissions-sales th:nth-child(6) { width: 3.25rem; }

/* A cell's parts with a dot between them (Verified, an older check): each part whole, every one after its dot,
   the row drawn a dot's width to the left inside a box that clips it, so the dot before whichever part starts a
   line falls outside it: a dot never starts or ends a line. */
.commissions-dotted {
  display: block;
  overflow: hidden;
}

.commissions-dotted > span {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-left: -1em;
}

.commissions-dotted > span > span {
  white-space: nowrap;
}

.commissions-dotted > span > span::before {
  content: "\00b7" / "";
  display: inline-block;
  width: 1em;
  text-align: center;
}

/* Verified as a word in the row's own colour; bold red where the check found it cancelled inside its window. */
.commissions-verified-word.bad {
  color: var(--danger);
  font-weight: 700;
}

/* Each flag a whole chip, never broken over two lines. */
.commissions-sales .policy-flag {
  white-space: nowrap;
}

/* The held lists: the rep, policy and day each on one line, the wait and
   what to do the rest, until the card folds to a row each. */
@container (min-width: 36.0625rem) {
  .commissions-held :is(th, td):nth-child(-n + 3) {
    white-space: nowrap;
  }
}

/* A sale's product in its pill over its policy number, each on one line,
   so every row stands two lines high; folded, beside its label on the right. */
.commissions-policy-parts {
  display: grid;
  justify-items: start;
  gap: 0.2rem;
}

/* Pays: a check, or a bold red cross. */
.commissions-pays-yes,
.commissions-pays-no {
  font-size: 1.1rem;
  line-height: 1;
}

.commissions-pays-yes {
  color: var(--text);
  font-weight: 700;
}

.commissions-pays-no {
  color: var(--danger);
  font-weight: 800;
}

.commissions-policy-parts > * {
  white-space: nowrap;
}

/* A tinted product pill ringed in its own colour, so it stands off a rep's tinted rows in either theme. */
.commissions-policy-parts > .dash-pill:not(.primary) {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 40%, transparent);
}

@container (max-width: 36rem) {
  .road-table .commissions-policy-parts {
    justify-items: end;
    margin-left: auto;
  }
}

/* A held list's fold on the Admin page, a gap above it. */
section.commissions-held-fold {
  margin-top: 1rem;
}

/* Check on a sale or a held row, small beside what it checks. */
:is(.commissions-sales, .commissions-held) .commissions-check {
  margin: 0.35rem 0 0;
  padding: 0.2rem 0.75rem;
  font-size: 0.85rem;
}

/* Check's form, a row of its own under the sale it checks. */
.commissions-check-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
}

/* A grid, not a column of flex: a table's select grows along its flex. */
.commissions-check-form label {
  display: grid;
  gap: 0.2rem;
  font-weight: 600;
}

.commissions-check-form label[hidden] {
  display: none;
}

/* Its day, and the Correction's number and reason, a box the height of the select beside them. */
.commissions-check-form input:is([type="date"], :not([type])) {
  height: 3rem;
  padding: 0 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

.commissions-check-form button {
  margin: 0;
}

.commissions-sales :is(th, td) {
  padding-inline: 0.5rem;
  overflow-wrap: anywhere;
}

.commissions-sales td.commissions-written {
  white-space: nowrap;
}

.commissions-sales .dash-pill {
  padding-inline: 0.5rem;
  white-space: nowrap;
}

/* A rep's sales carried from earlier months, under a heading row of their own. */
.commissions-sales tr.commissions-carried-head > th {
  width: auto;
  padding-top: 0.75rem;
  text-align: left;
  font-weight: 700;
}

/* The month's Add a Correction, under its list: the number, the reason taking the room left, and Preview; Undo's
   reason the same. */
.commissions-correction {
  margin-top: 1rem;
  text-align: left;
}

.commissions-check-form .commissions-reason {
  flex: 1 1 14rem;
}

/* A customer's sales together: each after the first indented under it, its row joined to the one above. */
.commissions-sales tr.commissions-has-linked,
.commissions-sales tr.commissions-has-linked > * {
  border-bottom: 0;
}

.commissions-sales tr.commissions-linked > :first-child {
  padding-left: 1.75rem;
  text-indent: -1.25rem;
}

.commissions-link-mark {
  display: inline-block;
  width: 1.25rem;
  text-indent: 0;
  color: var(--muted-text);
}

.hr-bands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem 1.25rem;
}

.hr-band h4 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted-text);
}

.hr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hr-chips li {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.hr-chip,
.hr-for {
  white-space: nowrap;
}

.hr-chip {
  border: 1px solid var(--input-border);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.9rem;
}

.hr-chip-cover {
  border-color: currentColor;
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
  font-weight: 600;
}

/* A $ that can't be typed over, drawn in front of the box's text. */
.money {
  position: relative;
}

.money::before {
  content: "$";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--muted-text);
  pointer-events: none;
}

.money input {
  padding-left: 2rem;
}


/* Same treatment the check-in form's own pickers get when submitted
   with nothing chosen. */
.language-picker.invalid {
  border: 2px solid var(--danger);
  border-radius: 4px;
  padding: 0.5rem;
}


/* Who the U-code resolved to, always shown: what this desk is alerted
   about follows from it. */
.signed-in {
  text-align: center;
  padding: 0.4rem 1.25rem;
  font-size: 0.85rem;
  color: var(--muted-text);
  background: var(--secondary-background);
}


/* /jobs, /compliance and the relay's page: one centred column,
   The relay's waiting count in its own box. */
.relay-body main {
  max-width: 620px;
}

.relay-status {
  text-align: center;
}

/* Red while no relay is collecting, since nothing reaches Slack then;
   green once one is. */
.relay-banner {
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--on-alert-red);
  background: var(--alert-red);
  /* Its "sending" state is the header's own lime, which would
     otherwise blend into the lime header with no visible edge. */
  border-top: 1px solid var(--deep-navy);
}

/* The Start button sits on a line of its own under the sentence: a
   full-width break before it, since a fit-content button would otherwise
   fit beside the text. */
.relay-banner {
  flex-wrap: wrap;
}
.relay-banner::after {
  content: "";
  flex-basis: 100%;
  order: 1;
}
#relay-start {
  order: 2;
  max-width: fit-content;
  margin: 0 auto;
}
/* The training copy's line, in the Start button's place. */
#relay-training {
  order: 2;
}

/* Amber while the relay is open but its Slack isn't signed in yet. */
.relay-banner.starting {
  color: var(--on-amber);
  background: var(--amber);
}

.relay-banner.sending {
  color: var(--on-amber);
  background: var(--lime);
}

.relay-banner::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
}

.relay-stat {
  display: block;
  width: fit-content;
  margin: 1.1rem auto 0;
  padding: 1.1rem 2.75rem;
  background: var(--surface);
  border: 2px solid var(--primary-text);
  border-radius: 4px;
}

.relay-count {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-text);
}

.relay-label {
  display: block;
  margin-top: 0.4rem;
  font-weight: 600;
}

.relay-sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted-text);
}

.relay-setup summary {
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  color: var(--primary-text);
}

.relay-steps {
  margin: 1rem 0 0;
  padding-left: 1.4rem;
  line-height: 1.6;
}

.relay-steps li + li {
  margin-top: 0.6rem;
}

.step-aside {
  display: block;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Its own line under the step, not wedged into the sentence. */
.relay-steps .link-button {
  display: block;
  width: fit-content;
  margin: 0.6rem 0 0.35rem;
}

.relay-path {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--surface);
  word-break: break-all;
}

.relay-footnote {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* Settings, Self Service and HR: a note over a list, a row per person or
   request and its buttons. Wraps rather than squeezing, since a manager
   reads this on a phone. */
.access-note {
  color: var(--muted-text);
  margin: 0 0 1rem;
  text-align: center;
}

/* A box of those rows under its legend: a department on the roster, a
   person's stops or a dealership's people on Self Service. */
.access-box {
  padding-bottom: 0.25rem;
}

.access-list li {
  flex-wrap: wrap;
  /* As tall as a row with a button, so a list steps evenly down the
     page whether or not each person has one. */
  min-height: 3.5rem;
}

.access-state {
  color: var(--muted-text);
  font-size: 0.9rem;
}

.access-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.access-actions button {
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
}

.relay-section-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--primary-text);
}

.relay-messages,
.relay-notes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.relay-message,
.relay-note {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 12%, transparent);
}

.relay-message:first-child,
.relay-note:first-child {
  border-top: 0;
}

/* A relay computer on the relay's page: its name over its facts,
   which keep the list's left edge. */
.relay-lane {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.relay-lane .lead-fields {
  justify-content: flex-start;
}

.relay-when {
  flex-shrink: 0;
  width: 4.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.relay-message-body {
  flex: 1;
  min-width: 0;
}

.relay-where {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-text);
}

.relay-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relay-check {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--geico-green);
}

.relay-dropped {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--danger);
}

.relay-spinner {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 3px solid color-mix(in srgb, var(--primary-text) 20%, transparent);
  border-top-color: var(--primary-text);
  border-radius: 50%;
  animation: relay-spin 0.8s linear infinite;
}

@keyframes relay-spin {
  to { transform: rotate(360deg); }
}

.relay-day-title {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.relay-day:first-child .relay-day-title {
  margin-top: 0;
}

.relay-empty {
  margin: 0;
  opacity: 0.7;
}

.relay-job-status {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.relay-job-round {
  margin: -0.5rem 0 0.75rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.relay-job-round.over-half {
  color: var(--status-warn-text);
  opacity: 1;
}

.relay-caption {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.relay-stop {
  margin: 0;
  text-align: center;
}

.relay-console summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-text);
}

.relay-console pre {
  max-height: 20rem;
  overflow: auto;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

/* Settings, Self Service and HR: each section opens on its own, as
   The relay's setup card does, since each is a long list. */
.selfservice-section > summary {
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-text);
}

/* The triangle is drawn in the browser's own colour unless told: the
   same blue as the tab text, which the heading beside it already is. */
.selfservice-section > summary::marker,
.selfservice-section > summary::-webkit-details-marker {
  color: var(--primary-text);
}

/* Fields on this page name themselves, so the form's gap does the spacing. */
.selfservice-section .checkin-form {
  gap: 1rem;
}

.selfservice-section .box {
  padding-bottom: 1.5rem;
}

/* Room under the box's own heading before the first field. */
.selfservice-section .box > .checkin-form {
  margin-top: 1rem;
}

.selfservice-section .box + .box {
  margin-top: 2rem;
}

#notice {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.notice-dismiss {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

/* Where somebody is headed, on their roster row: a pill filled green so
   it reads as a highlight beside the grey state. */
.move-tag {
  font-size: 0.8rem;
  background: var(--geico-green);
  color: var(--surface);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  margin-left: 0.5rem;
}

/* Home or Away after the name of somebody at more than one office on the
   Staff Roster (shared/_office_tag.html): the status pills' green at their
   home office, blue at the other. Away names their home office on hover,
   and in a bubble once tapped or tabbed to, since a touch screen has no
   hover. Somebody from another office alone is outlined in its name. */
.office-tag {
  position: relative;
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.office-tag.home { background: var(--status-good-bg); color: var(--status-good-text); }
.office-tag.away { background: var(--status-info-bg); color: var(--status-info-text); cursor: help; }
.office-tag.elsewhere { border: 1px solid var(--status-info-text); color: var(--status-info-text); }
.office-tag.away:focus::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 10;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
  background: var(--status-info-text);
  color: var(--status-info-bg);
  font-weight: 500;
}

/* A PTO day's status on /hr/schedule. */
.pto-status {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.pto-status-requested {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.pto-status-approved {
  background: var(--status-good-bg);
  color: var(--status-good-text);
}

.pto-status-accepted {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

/* A Saturday taken in a swap reads as that, not as the rotation that first set it. */
.pto-status-swapped {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}

.pto-status-declined {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
}

.pto-status-withdrawn {
  background: var(--status-neutral-bg);
  color: var(--muted-text);
}

/* Self Service's form boxes read centred; a form control doesn't
   inherit text-align, so it is set directly. */
.selfservice-staff-box,
.selfservice-staff-box input,
.selfservice-staff-box select {
  text-align: center;
}

/* What a closed select shows is centred by this, not text-align. */
.selfservice-staff-box select {
  text-align-last: center;
}

.selfservice-tick {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.selfservice-tick input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
}

.selfservice-tick-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.selfservice-tick-row input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

/* Dimmed rather than recoloured, so it reads as off under a browser's
   dark rendering too -- a fixed light grey there is the one white box. */
.selfservice-tick-row input[type="text"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selfservice-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Admin › Callbacks' numbered picks: the people a callback may go to, the callbacks to close and the reasons. */
.callbacks-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.5rem 1rem;
  margin-top: 1rem;
}

/* A list of rows inside the centred box: a label that wraps keeps its left edge, its tick by its first line. */
.callbacks-picks .selfservice-tick-row {
  align-items: flex-start;
  text-align: left;
}

/* Edit fills the form above the roster, so it lights up as it scrolls
   into view rather than looking like it did nothing. */
.selfservice-staff-box.just-opened {
  animation: selfservice-lit 1.6s ease-out;
}

/* The roster row a save was about, after the reload it causes: lit up
   briefly, with what the save did on a line of its own under it. */
.access-list li.just-saved {
  animation: selfservice-lit 2.4s ease-out;
}

.access-list .row-saved {
  flex-basis: 100%;
  color: var(--status-good-text);
  font-weight: 500;
}

@keyframes selfservice-lit {
  from { box-shadow: 0 0 0 4px var(--geico-green); }
  to { box-shadow: 0 0 0 0 transparent; }
}

/* Self Service › Dealerships: the roster's rows, a box per territory. A
   row's address, and the contacts a search matched, are lines of their
   own; its contacts and either form open under it, full width. A long
   name or email breaks rather than widening the page, and a box nested
   in a box gives up a fieldset's own minimum width for the same reason. */
.dealership-group,
.dealership-form {
  min-width: 0;
}

.dealership-row > .name,
.dealership-contact > .name,
.dealership-row .access-state,
.dealership-line {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* A name claims a line of its own before the facts beside it squeeze it,
   which a roster row's name, with less beside it, never needs. */
.dealership-row > .name,
.dealership-contact > .name {
  flex: 1 1 12rem;
}

.dealership-line {
  flex-basis: 100%;
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* The facts are what a row is read for, so they keep the theme's own muted colour. */
.dealership-row .access-state,
.dealership-contact .access-state {
  color: var(--muted-text);
}

.dealership-hit {
  color: var(--primary-text);
}

.dealership-contacts,
.dealership-row > .dealership-form,
.dealership-contact > .dealership-form {
  flex-basis: 100%;
  min-width: 0;
}

/* Indented under its dealership by a rule, so a contact never reads as a dealership. */
.dealership-contacts {
  padding-left: 0.75rem;
  border-left: 3px solid var(--input-border);
}

.dealership-contacts .selfservice-buttons {
  margin-top: 0.75rem;
}

/* Three buttons under a dealership's form don't fit a phone's line. */
.dealership-form .selfservice-buttons {
  flex-wrap: wrap;
}

.waiting-list .dealership-row,
.waiting-list .dealership-contact {
  row-gap: 0.35rem;
}

/* A request from a visit: who and where, any likely match under it,
   then the answers, wrapping on a phone. */
.signoff-list li {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.signoff-list .selfservice-buttons {
  flex-wrap: wrap;
}

.signoff-list .call-about {
  display: block;
}

.signoff-match {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}

.dealership-row.taken-off > .name {
  color: var(--muted-text);
}

/* Quiet: what was taken off sits closed under the list. */
.dealership-taken-off {
  margin-top: 1.5rem;
}

/* Move Dealerships' ticks, under each territory, scrolled in the box
   so the territory pick stays in reach on a phone. */
.move-list {
  display: grid;
  gap: 0.4rem;
  max-height: 22rem;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.move-group {
  margin-top: 0.5rem;
  color: var(--muted-text);
  font-size: 0.9rem;
  text-align: left;
}

/* The form's labels are centred blocks; a tick row stays a row, its box
   beside its name, a finger's height (44px) each. */
.move-list .selfservice-tick-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  justify-content: flex-start;
  margin: 0;
  text-align: left;
  font-weight: 400;
}

.dealership-taken-off > summary {
  cursor: pointer;
  color: var(--muted-text);
  font-size: 0.9rem;
  text-align: center;
}

/* What was just saved lights up where it now sits in the list. */
.dealership-row.just-saved,
.dealership-contact.just-saved {
  animation: selfservice-lit 1.6s ease-out;
}


/* ---- Dashboard ---- */

/* Wide enough for four boxes a row with a dollar figure in each. */
.dashboard-body main {
  max-width: 1040px;
}

/* The Dashboard's own pages widen on a wide screen, so a year of days has room. */
@media (min-width: 1400px) {
  .dash-wide main {
    max-width: 1600px;
  }
}

/* The Dashboard's own tabs: underlined, so they don't read as the pill
   chips for the range under them. */
.dash-tabs {
  /* What it sits on, which a phone's shaded edges are drawn over. */
  --strip-ground: var(--background);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: -0.5rem 0 1rem;
  border-bottom: 1px solid var(--input-border);
}

.dash-tab {
  padding: 0.55rem 0.2rem;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}

a.dash-tab:hover {
  border-bottom-color: var(--input-border);
}

/* A phone keeps the tabs on one line, scrolled sideways like the page's
   menu and shaded the same way at an edge with more past it. */
@media (max-width: 560px) {
  .dash-tabs {
    flex-wrap: nowrap;
    justify-content: safe center;
    gap: 0 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-inline: 0.25rem;
    background:
      linear-gradient(to right, var(--strip-ground) 40%, transparent) left / 2.5rem 100% no-repeat local,
      linear-gradient(to left, var(--strip-ground) 40%, transparent) right / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--strip-edge), transparent) left / 0.9rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--strip-edge), transparent) right / 0.9rem 100% no-repeat scroll,
      var(--strip-ground);
  }

  .dash-tab {
    flex: none;
    white-space: nowrap;
  }
}

.dash-tab.current {
  border-bottom-color: var(--primary-text);
  color: var(--text);
}

/* A GEICO Rejections decision: its question, pick and what it comes to, a line each under the cell's label. */
.group-reject-decision {
  flex: 1 1 100%;
  text-align: left;
}

/* Admin's queue tabs with nothing pending, quiet at the row's end. */
.admin-all-clear {
  align-self: center;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.admin-all-clear a:not([hidden]) ~ a:not([hidden])::before {
  content: ", ";
  display: inline-block;
  white-space: pre;
  color: var(--muted-text);
}

/* A section's source strip: the tab strip's shape a size down, under the
   section's own boxes and over the sections it switches. */
.dash-sources {
  --strip-ground: var(--secondary-background);
  margin: 0.25rem 0 0.6rem;
  gap: 0.25rem 1.25rem;
}

.dash-sources .dash-tab {
  padding: 0.4rem 0.2rem;
  font-size: 0.95rem;
}

.dash-ranges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.dash-range {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  color: var(--primary-text);
  background: var(--surface);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
}

.dash-range.current {
  background: var(--primary);
  color: var(--on-primary);
}

/* A team's My Team / Office switch: the chips joined into one control, so
   it reads as a pick of two rather than two more ranges. */
.dash-views {
  gap: 0;
}

.dash-views .dash-range {
  border-radius: 0;
  min-width: 6.5rem;
  text-align: center;
}

.dash-views .dash-range + .dash-range {
  border-left-width: 0;
}

.dash-views .dash-range:first-child {
  border-radius: 999px 0 0 999px;
}

.dash-views .dash-range:last-child {
  border-radius: 0 999px 999px 0;
}

.dash-custom summary::-webkit-details-marker {
  display: none;
}

.dash-custom {
  position: relative;
}

/* Floated rather than laid out, so opening it doesn't widen the chip
   and shove "Choose Dates" off centre. */
.dash-custom-form {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-text) 14%, transparent);
}

.dash-custom-form input {
  height: 2.4rem;
  padding: 0 0.6rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
}

.dash-as-of,
.dash-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* A note under a table stands clear of its last row's rule. */
.hr-table + .dash-note {
  margin-top: 0.5rem;
}

.dash-as-of {
  text-align: center;
}

/* The range and when the numbers landed are two facts, so they read as
   two lines rather than one run-on. */
.dash-range-name,
.dash-updated {
  display: block;
}

.dash-range-name {
  font-weight: 600;
  color: var(--text);
}

/* A note about the page rather than another card of numbers, so it
   carries no card of its own. */
.dash-glossary {
  margin-bottom: 1rem;
}

.dash-source {
  margin-top: -0.4rem;
}

.dash-person {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.dash-person small {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* A row of boxes shares its width evenly, however long one box's figure
   is. The page splits a long row into even ones (seven are four and
   three), so a row never ends on a lone narrow box. */
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.dash-tiles[data-tiles="1"] { grid-template-columns: minmax(0, 1fr); }
.dash-tiles[data-tiles="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-tiles[data-tiles="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-tiles[data-tiles="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Office › Calls' live line: what Amazon Connect's queues hold now, one quiet strip over the day's boxes. An old
   read reads muted, its time saying when. */
.dash-live {
  margin: 0 0 0.7rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.dash-live p {
  margin: 0;
}

.dash-live-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.1rem;
}

.dash-live-label,
.dash-live-said,
.dash-live-queues {
  color: var(--muted-text);
}

.dash-live-said {
  margin-left: auto;
}

.dash-live-queues {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  margin-top: 0.2rem !important;
  font-size: 0.8rem;
}

.dash-live.stale strong {
  color: var(--muted-text);
  font-weight: 400;
}

.dash-tiles + .dash-h4 {
  margin-top: 1.2rem;
}

/* The boxes an opened metric leads to: a size down, so its own box
   stays the one the page is about. */
.dash-alongside .dash-tile-value {
  font-size: 1.6rem;
}

.dash-alongside .dash-tile.self .dash-tile-value {
  font-size: 2.2rem;
}

@media (max-width: 560px) {
  .dash-tiles,
  .dash-tiles[data-tiles="3"],
  .dash-tiles[data-tiles="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-tiles[data-tiles="3"] .dash-tile:last-child {
    grid-column: span 2;
  }

  /* Two to a row, so a premium in the millions still fits its box. */
  .dash-tiles .dash-tile-value,
  .dash-alongside .dash-tile.self .dash-tile-value {
    font-size: 1.7rem;
  }

  .dash-alongside .dash-tile-value {
    font-size: 1.4rem;
  }
}

/* A tab's sections, each a box of its own: the summary its header, a
   card's shade, holding the name and top line of boxes, with a chevron
   that turns as it opens. With no script, a shut header is one tap that
   opens it, so a box there takes a tap only once it is open; with
   metric_panels.js, a box there opens the section and its own chart at
   once. */
.dash-sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.dash-section {
  min-width: 0;
  background: var(--background);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

.dash-section > summary {
  position: relative;
  padding: 0.75rem 0.9rem 0.05rem;
  border-radius: 3px;
  background: var(--secondary-background);
  cursor: pointer;
  list-style: none;
}

.dash-section[open] > summary {
  border-bottom: 1px solid var(--input-border);
  border-radius: 3px 3px 0 0;
}

.dash-section > summary::-webkit-details-marker {
  display: none;
}

.dash-section > summary:focus-visible {
  outline: 3px solid var(--deep-navy);
  outline-offset: 2px;
}

/* Open or shut, in the header's corner: down while shut, up once open. */
.dash-section > summary::after {
  content: "\25BE";
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--input-border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary-text);
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.15s;
}

.dash-section[open] > summary::after {
  transform: rotate(180deg);
}

.dash-section > summary:hover::after {
  background: var(--button-hover);
}

/* Padded both sides alike, so the name stays centred clear of the chevron. */
.dash-section-name {
  display: block;
  margin-bottom: 0.7rem;
  padding: 0.15rem 2.3rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary-text);
}

.dash-section > summary:hover .dash-section-name {
  text-decoration: underline;
}

.dash-section:not([open]) > summary .dash-tile {
  pointer-events: none;
}

.dash-panels-on .dash-section:not([open]) > summary .dash-tile {
  pointer-events: auto;
}

/* The top line's boxes keep a four-across box's width, centred under
   the name, however few there are; on a phone, two to a row. */
.dash-section > summary .dash-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.dash-section > summary .dash-tile {
  flex: 0 1 calc((100% - 2.1rem) / 4);
  min-width: 0;
}

.dash-section-body {
  padding: 0.8rem 0.9rem 0.2rem;
}

/* A section's bars, side by side where there is room. A chart's panel
   takes the whole width under its row, the chart beside it staying put
   (dense). */
.dash-section-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  grid-auto-flow: row dense;
  gap: 0 2rem;
  margin-bottom: 1rem;
}

.dash-section-chart {
  min-width: 0;
}

.dash-section-bars > .dash-panel {
  grid-column: 1 / -1;
  margin-top: 0.6rem;
}

.dash-more {
  display: inline-block;
  margin: 0.2rem 0 0.6rem;
  font-size: 0.88rem;
  color: var(--primary-text);
}

/* A breakdown's bars or a grid's rows past its first (dashboard.PAGE_BARS):
   Expand More under them opens the rest in place, then reads Collapse,
   which puts them away again. */
.dash-more-bars > summary {
  cursor: pointer;
  list-style: none;
}

.dash-more-bars > summary::-webkit-details-marker {
  display: none;
}

.dash-more-bars:not([open]) .dash-more-open,
.dash-more-bars[open] .dash-more-shut {
  display: none;
}

/* The rest wait in their own list or table, hidden until the Expand More
   right after it is open, so a list's names keep one column; a grid's in
   every part's table, opening together so its rows still line up. */
.dash-bars:not(:has(+ .dash-rows-expand[open])) > .dash-rows-held,
.dash-grid-groups:not(:has(+ .dash-rows-expand[open])) .dash-rows-held {
  display: none;
}

/* What one of them opened goes with it, on a phone too. */
.dash-bars:not(:has(+ .dash-rows-expand[open])) > .dash-rows-held + li.dash-row-detail {
  display: none !important;
}

/* A metric's page opened in place under the box, bar or column it was
   opened from (metric_panels.js): the page's own card, edged in the
   boxes' blue so it reads as the box's. */
.dash-panel {
  min-width: 0;
  margin: 0 0 0.9rem;
  padding: 0.7rem 1rem 0.8rem;
  background: var(--secondary-background);
  border: 2px solid var(--primary-text);
  border-radius: 4px;
}

.dash-panel + .dash-h4 {
  margin-top: 1.2rem;
}

.dash-panel-head {
  position: relative;
  min-height: 1.9rem;
  padding: 0.25rem 2.4rem 0;
}

.dash-panel-title {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  color: var(--text);
}

.dash-panel-close {
  position: absolute;
  top: -0.15rem;
  right: -0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary-text);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
}

.dash-panel-close:hover {
  background: var(--button-hover);
}

.dash-panel-close:focus-visible {
  outline: 3px solid var(--deep-navy);
  outline-offset: 2px;
}

.dash-panel-note {
  margin: 0.6rem 0;
}

.dash-panel-foot {
  margin: 1rem 0 0;
  text-align: center;
}

.dash-panel-page {
  font-weight: 600;
  color: var(--primary-text);
}

/* The box whose chart is open: edged twice as heavy, a notch pointing
   down at its panel; a bar or column heading, bold and underlined. */
.dash-tile:has(> .dash-tile-open[aria-expanded="true"]) {
  box-shadow: inset 0 0 0 1px var(--primary-text);
}

.dash-tile:has(> .dash-tile-open[aria-expanded="true"])::before {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  border: 0.45rem solid transparent;
  border-top-color: var(--primary-text);
  border-bottom-width: 0;
  transform: translateX(-50%);
}

a[data-panel][aria-expanded="true"]:not(.dash-tile-open) {
  font-weight: 700;
  text-decoration: underline 2px;
  text-underline-offset: 2px;
}

/* A section's grid: groups of columns, each under its heading and in its
   own bar colour, a row per hour or source, each bar sized against its
   own column. Its own width picks the layout (a container query, so a
   grid inside a section reads its own room): wide, every group sits in
   one line with the row names once at the left; narrower, each group
   takes a line with its own names; on a phone each part of three stacks
   with them. So nothing scrolls sideways and no group is ever without
   its names. */
.dash-grid {
  /* The group headings' row, and the column names' row under it: three
     lines of a name, or with a note under one (through yesterday) room
     for the note's two as well. */
  --grid-band: 1.5rem;
  --grid-plain: 3.6rem;
  --grid-noted: 5rem;
  --grid-heads: var(--grid-plain);
  container-type: inline-size;
  margin-bottom: 1rem;
}

.dash-grid:has(.dash-grid-heads small) {
  --grid-heads: var(--grid-noted);
}

/* The names column as wide as its longest name (--name-chars, set by
   _grid.html) within its bounds, so a source or a campaign reads whole. */
.dash-grid-groups {
  --grid-names: clamp(4.2rem, calc(var(--name-chars, 0) * 1ch + 1rem), 12rem);
  --grid-gutter: 1.25rem;
  display: flex;
  column-gap: var(--grid-gutter);
  row-gap: 1.4rem;
  font-size: 0.85rem;
}

/* The line's room after the names and gutters, shared by column count;
   the first group holds the names too. */
.dash-grid-group {
  --grid-tone: var(--chart-blue);
  display: flex;
  row-gap: 1.4rem;
  min-width: 0;
  flex: 0 1 calc((100% - var(--grid-names) - var(--grid-gutter) * var(--grid-gaps)) * var(--group-of) / var(--grid-of));
}

.dash-grid-group:first-child {
  flex-basis: calc(var(--grid-names) + (100% - var(--grid-names) - var(--grid-gutter) * var(--grid-gaps)) * var(--group-of) / var(--grid-of));
}

.dash-grid-group.tone-2 {
  --grid-tone: var(--grid-second);
}

.dash-grid-group.tone-3 {
  --grid-tone: var(--grid-third);
}

/* A group's parts share its room, the one holding the names a name's
   width more. */
.dash-grid-part {
  min-width: 0;
  flex: 0 1 calc(100% * var(--grid-share) / var(--group-of));
}

.dash-grid-group:first-child > .dash-grid-part {
  flex-basis: calc((100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
}

.dash-grid-group:first-child > .dash-grid-part:first-child {
  flex-basis: calc(var(--grid-names) + (100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
}

.dash-grid table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.dash-grid-group + .dash-grid-group .dash-grid-name,
.dash-grid-part + .dash-grid-part .dash-grid-name {
  display: none;
}

/* A group's heading over its columns, one line over a rule in its colour;
   a part after the first carries the rule alone, reaching back over the
   seam between the two tables, so the heading reads once. */
.dash-grid thead .dash-grid-band th {
  height: var(--grid-band);
  padding: 0 0.4rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: none;
}

/* The corner over the names: the heading row's own height, not a row's. */
.dash-grid .dash-grid-band td {
  height: var(--grid-band);
  padding: 0;
}

.dash-grid-band span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dash-grid-band th::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--grid-tone);
}

.dash-grid-part + .dash-grid-part .dash-grid-band th::after {
  left: -2px;
}

.dash-grid-part + .dash-grid-part .dash-grid-band span {
  visibility: hidden;
}

/* Scrolled past a long grid's top, its headings stay over the rows still
   showing (sticky_heads.js): the group headings at the top, the column
   names just under them, opaque so no row shows through. Positioned
   either way, so a group's rule stays under its heading. */
.dash-grid thead th,
.dash-grid thead td {
  position: relative;
  background: var(--background);
}

.dash-grid table[data-sticky-head="page"] .dash-grid-band + .dash-grid-heads th {
  top: calc(var(--sticky-top) + var(--grid-band));
}

/* As a grid's last rows leave, its names slide under its headings. */
.dash-grid .dash-grid-band > * {
  z-index: 3;
}

/* A column's name runs to three lines beside its i, its note wrapping
   under it, in a heading row of one height across the parts on a line,
   so the rows still line up across them. */
.dash-grid thead th {
  height: var(--grid-heads);
  padding: 0 0.4rem 0.3rem;
  vertical-align: bottom;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  border-bottom: 1px solid var(--hairline);
}

.dash-grid thead th a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-decoration: none;
}

.dash-grid thead th a:hover {
  text-decoration: underline;
}

.dash-grid .dash-grid-name {
  width: var(--grid-names);
  padding-right: 0.6rem;
  text-align: right;
  font-weight: 400;
  white-space: nowrap;
  color: var(--muted-text);
  font-variant-numeric: tabular-nums;
}

.dash-grid tbody th,
.dash-grid td {
  height: 1.65rem;
  padding: 0 0.4rem;
}

/* Every other row shaded, so a row reads across the columns. */
.dash-grid tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--secondary-background) 55%, transparent);
}

/* A rule between columns, so a figure and its bar read as one column's. */
.dash-grid tbody td,
.dash-grid .dash-grid-heads th:not(.dash-grid-name) {
  border-left: 1px solid var(--hairline);
}

/* Each figure ahead of its own bar, in the width the column's widest sets
   (`--figure`, in characters, with room for a % or a $), so a column's
   figures line up and its bars start together. */
.dash-grid-cell {
  display: grid;
  grid-template-columns: calc((var(--figure, 3) + 0.6) * 1ch) minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}

.dash-grid .dash-bar {
  height: 0.7rem;
}

.dash-grid .dash-bar-fill {
  background: var(--grid-tone, var(--chart-blue));
}

.dash-grid-value {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dash-grid td.nothing .dash-grid-value {
  color: var(--muted-text);
}

/* A figure its amber lines mark (By Area's cost per sale), a place to cut
   or move spend, or a person's share well under the office's (a table of
   shares): shaded and in amber, its bar too, so it reads without the
   pointer. */
.dash-grid td.warn {
  background: var(--status-warn-bg);
}

.dash-grid td.warn .dash-grid-value {
  color: var(--status-warn-text);
  font-weight: 600;
}

.dash-grid td.warn .dash-bar-fill {
  background: var(--status-warn-text);
}

/* A table of people's rate at or past its target, or past its floor. */
.dash-grid td.good {
  background: var(--status-good-bg);
}

.dash-grid td.good .dash-grid-value {
  color: var(--status-good-text);
  font-weight: 600;
}

.dash-grid td.good .dash-bar-fill {
  background: var(--status-good-text);
}

.dash-grid td.bad {
  background: var(--status-bad-bg);
}

.dash-grid td.bad .dash-grid-value {
  color: var(--status-bad-text);
  font-weight: 600;
}

.dash-grid td.bad .dash-bar-fill {
  background: var(--status-bad-text);
}

/* A table of people's rate past its amber band and still at its minimum standard. */
.dash-grid td.minimum {
  background: var(--status-orange-bg);
}

.dash-grid td.minimum .dash-grid-value {
  color: var(--status-orange-text);
  font-weight: 600;
}

.dash-grid td.minimum .dash-bar-fill {
  background: var(--status-orange-text);
}

/* A grid by source ends in the All row, the column's own figure: a weight, no bar. */
.dash-grid tr.total th,
.dash-grid tr.total td {
  font-weight: 600;
  border-top: 1px solid var(--hairline);
}

.dash-grid tbody th a {
  color: var(--primary-text);
  text-decoration: none;
}

.dash-grid tbody th a:hover {
  text-decoration: underline;
}

/* A grid by source, closed by its All row: the names are sources', left
   and given a name's room, more for a longer one. */
.dash-grid:has(tr.total) .dash-grid-groups {
  --grid-names: clamp(7.4rem, calc(var(--name-chars, 0) * 1ch + 1rem), 12rem);
}

.dash-grid:has(tr.total) th.dash-grid-name {
  text-align: left;
}

/* A grid by value (keywords, campaigns): the names left and given at
   least a keyword's room, past the widest cut short on one line so the
   rows still line up across the parts, the pointer giving the whole. */
.dash-grid-named .dash-grid-groups {
  --grid-names: clamp(12rem, calc(var(--name-chars, 0) * 1ch + 1rem), 20rem);
}

/* A grid by value closed by its All row (By Area, By Campaign) keeps a value's room over a source's. */
.dash-grid-named:has(tr.total) .dash-grid-groups {
  --grid-names: clamp(12rem, calc(var(--name-chars, 0) * 1ch + 1rem), 20rem);
}

.dash-grid-named th.dash-grid-name {
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  color: var(--text);
}

.dash-grid-under {
  font-size: 0.72rem;
  color: var(--muted-text);
}

/* Rows that name what each value is within (a keyword's campaign, a
   search term's keyword) take two lines, every row alike, so the rows
   still line up across the parts. */
.dash-grid-paired tbody th,
.dash-grid-paired td {
  height: 2.6rem;
}

.dash-grid-paired th.dash-grid-name {
  line-height: 1.2;
}

.dash-grid-paired .dash-grid-under {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rows that open (By Area's states): a value's row and the rows under it
   a body each, striped by the body so a value reads with its rows; the
   rows under it set in from its name and shut until it is opened, in
   every part at once (dashboard_rows.js). A county's ZIPs follow it, set
   in further and shown while it is open (dashboard_rows.js marks them). */
.dash-grid-opening tbody tr:nth-child(even) {
  background: transparent;
}

.dash-grid-opening tbody.dash-grid-fold:nth-of-type(even) > tr {
  background: color-mix(in srgb, var(--secondary-background) 55%, transparent);
}

.dash-grid-fold:not(:has(> tr:first-child .dash-grid-open[open])) > .dash-grid-child,
.dash-grid-fold > .dash-grid-inner:not(.dash-grid-shown) {
  display: none;
}

.dash-grid-opens {
  cursor: pointer;
}

.dash-grid-open > summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary-text);
  cursor: pointer;
}

.dash-grid-child > th.dash-grid-name {
  padding-left: 1.4rem;
  color: var(--muted-text);
}

.dash-grid-inner > th.dash-grid-name {
  padding-left: 2.8rem;
}

/* Too narrow for every group in one line: each group a line of its own,
   its names beside it. */
@container (max-width: 56rem) {
  .dash-grid-groups {
    flex-wrap: wrap;
  }

  .dash-grid-group,
  .dash-grid-group:first-child {
    flex-basis: 100%;
  }

  .dash-grid-group > .dash-grid-part {
    flex-basis: calc((100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
  }

  .dash-grid-group > .dash-grid-part:first-child {
    flex-basis: calc(var(--grid-names) + (100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
  }

  .dash-grid-group + .dash-grid-group .dash-grid-part:first-child .dash-grid-name {
    display: table-cell;
  }

  /* A group on a line of its own is as tall as its own names need. */
  .dash-grid-group {
    --grid-heads: var(--grid-plain);
  }

  .dash-grid-group:has(.dash-grid-heads small) {
    --grid-heads: var(--grid-noted);
  }
}

/* A grid by value of many columns (By Keyword) sets each group on a line of
   its own at any width, as a narrow grid does, so a column's name has room
   to read whole; its names give way to the widest group's columns, down to
   a keyword's room. A phone's rules below still stand. */
@container (width > 42rem) {
  .dash-grid-crowded .dash-grid-groups,
  .dash-grid-crowded:has(tr.total) .dash-grid-groups {
    --grid-names: clamp(12rem, calc(var(--name-chars, 0) * 1ch + 1rem),
                        min(20rem, calc(100cqi - var(--grid-widest, 1) * 6.5rem)));
    flex-wrap: wrap;
  }

  .dash-grid-crowded .dash-grid-group,
  .dash-grid-crowded .dash-grid-group:first-child {
    flex-basis: 100%;
    --grid-heads: var(--grid-plain);
  }

  .dash-grid-crowded .dash-grid-group:has(.dash-grid-heads small) {
    --grid-heads: var(--grid-noted);
  }

  .dash-grid-crowded .dash-grid-group > .dash-grid-part {
    flex-basis: calc((100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
  }

  .dash-grid-crowded .dash-grid-group > .dash-grid-part:first-child {
    flex-basis: calc(var(--grid-names) + (100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
  }

  .dash-grid-crowded .dash-grid-group + .dash-grid-group .dash-grid-part:first-child .dash-grid-name {
    display: table-cell;
  }
}

/* A phone: each part of a group under the last, its heading and names
   said again. */
@container (max-width: 42rem) {
  .dash-grid-groups {
    --grid-names: 3.3rem;
    font-size: 0.8rem;
  }

  .dash-grid-group {
    flex-wrap: wrap;
  }

  .dash-grid-group > .dash-grid-part,
  .dash-grid-group > .dash-grid-part:first-child,
  .dash-grid-group:first-child > .dash-grid-part,
  .dash-grid-group:first-child > .dash-grid-part:first-child {
    flex-basis: 100%;
  }

  .dash-grid-group + .dash-grid-group .dash-grid-name,
  .dash-grid-part + .dash-grid-part .dash-grid-name {
    display: table-cell;
  }

  .dash-grid-part + .dash-grid-part .dash-grid-band span {
    visibility: visible;
  }

  .dash-grid thead th {
    height: auto;
    padding: 0 0.15rem 0.3rem 0.45rem;
  }

  .dash-grid thead th a {
    display: block;
  }

  .dash-grid:has(tr.total) .dash-grid-groups {
    --grid-names: 4.9rem;
  }

  .dash-grid:has(tr.total) tbody th.dash-grid-name {
    white-space: normal;
    line-height: 1.15;
  }

  .dash-grid-named .dash-grid-groups {
    --grid-names: 8rem;
  }

  .dash-grid-named:has(tr.total) .dash-grid-groups {
    --grid-names: 8rem;
  }

  .dash-grid-named:has(tr.total) tbody th.dash-grid-name {
    white-space: nowrap;
    line-height: inherit;
  }

  .dash-grid tbody th,
  .dash-grid td {
    padding: 0 0.15rem 0 0.45rem;
  }

  .dash-grid-cell {
    gap: 0.35rem;
  }
}

/* A table of shares (people by a value, a few columns each): a value to a
   line, so every column's name fits, each with the people's names on one
   line and a person's room; a value's parts side by side, the names before
   the first, and on a phone each part under the last with the names
   again, as a grid's do. After the rules above, whose weight it matches or
   passes. */
.dash-grid.dash-grid-named.dash-grid-shares .dash-grid-groups {
  --grid-names: 10rem;
  flex-wrap: wrap;
}

.dash-grid.dash-grid-shares .dash-grid-group {
  flex: 0 1 100%;
}

.dash-grid.dash-grid-shares .dash-grid-group > .dash-grid-part {
  flex-basis: calc((100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
}

.dash-grid.dash-grid-shares .dash-grid-group > .dash-grid-part:first-child {
  flex-basis: calc(var(--grid-names) + (100% - var(--grid-names)) * var(--grid-share) / var(--group-of));
}

.dash-grid.dash-grid-shares .dash-grid-group .dash-grid-part:first-child .dash-grid-name {
  display: table-cell;
}

.dash-grid.dash-grid-named.dash-grid-shares tbody th.dash-grid-name {
  white-space: nowrap;
}

@container (max-width: 42rem) {
  .dash-grid.dash-grid-named.dash-grid-shares .dash-grid-groups {
    --grid-names: 8rem;
  }

  .dash-grid.dash-grid-shares .dash-grid-group > .dash-grid-part,
  .dash-grid.dash-grid-shares .dash-grid-group > .dash-grid-part:first-child {
    flex-basis: 100%;
  }

  .dash-grid.dash-grid-shares .dash-grid-group .dash-grid-name {
    display: table-cell;
  }
}

/* A section inside another is a box inside its body, its name a size down. */
.dash-section-body .dash-sections {
  gap: 0.7rem;
  margin: 0.4rem 0 0.8rem;
}

.dash-section-body .dash-section-name {
  font-size: 0.95rem;
}

/* A phone keeps a 16px gutter and lends the boxes inside the rest. */
@media (max-width: 560px) {
  .dashboard-body main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dash-section > summary .dash-tile {
    flex-basis: calc((100% - 0.7rem) / 2);
  }

  /* The Office Log's Lead Sales and Text Lists keep their three tiles to one row. */
  .lead-sales-view > summary .dash-tile,
  .text-lists-view > summary .dash-tile {
    flex-basis: calc((100% - 1.4rem) / 3);
  }

  .dash-section > summary {
    padding: 0.65rem 0.5rem 0.05rem;
  }

  .dash-section > summary::after {
    right: 0.45rem;
  }

  .dash-section-body {
    padding: 0.7rem 0.5rem 0.1rem;
  }

  .dash-panel {
    padding: 0.6rem 0.6rem 0.7rem;
  }

  .dash-panel-close {
    right: -0.2rem;
  }
}

.dash-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.7rem 0.75rem;
  background: var(--surface);
  border: 2px solid var(--primary-text);
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
}

/* Every box but the page's own opens further from anywhere on it, its
   link stretched over the whole box, and says so under the pointer. */
.dash-tile-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.dash-tile-open::after {
  content: "";
  position: absolute;
  inset: 0;
}

.dash-tile:has(> .dash-tile-open:hover) {
  box-shadow: 0 3px 12px color-mix(in srgb, var(--primary-text) 20%, transparent);
}

.dash-tile-open:focus-visible {
  outline: none;
}

.dash-tile:has(> .dash-tile-open:focus-visible) {
  outline: 3px solid var(--deep-navy);
  outline-offset: 2px;
}

/* A figure's i: its definition under the pointer, and in place under the
   figure on a tap. No bigger than the words beside it, its reach a size
   up so a thumb finds it. */
.dash-info {
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: var(--primary-text);
  font-family: inherit;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  vertical-align: middle;
  cursor: pointer;
}

.dash-info::before {
  content: "";
  position: absolute;
  inset: -0.6em;
}

.dash-info[aria-expanded="true"] {
  background: var(--primary-text);
  color: var(--surface);
}

.dash-info:focus-visible {
  outline: 2px solid var(--deep-navy);
  outline-offset: 2px;
}

.dash-info-text {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  color: var(--muted-text);
}

.dash-info-text[hidden] {
  display: none;
}

/* A box's i sits in its corner and its words under the figure, both over
   the box's link. */
.dash-tile > .dash-info {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 1;
}

.dash-tile[data-definitions] .dash-tile-label {
  padding: 0 0.85rem;
}

.dash-tile > .dash-info-text {
  position: relative;
  z-index: 1;
}

.dash-section-chart > .dash-info-text {
  margin: -0.2rem 0 0.4rem;
}

.dash-bar-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.dash-bar-row > .dash-info-text {
  grid-column: 1 / -1;
  padding-bottom: 0.2rem;
}

/* A grid column's name, and beside it its sort button (sortable_table.js) over its i, stacked so the name keeps
   the width it had. */
.dash-grid-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  align-items: end;
  column-gap: 0.3rem;
  row-gap: 0.1rem;
}

.dash-grid-head > a {
  grid-row: 1 / -1;
  min-width: 0;
}

.dash-grid-head > :not(a) {
  grid-column: 2;
  justify-self: center;
}

.dash-grid-head > :last-child:not(a) {
  grid-row: 2;
}

/* A table heading's i opens its words in a box beside the heading, over
   the page (definitions.js): under the tab strip's bars and the corner
   buttons, over a pinned heading's copy, its arrow at the i. */
.dash-info-tip {
  position: fixed;
  z-index: 45;
  box-sizing: border-box;
  width: max-content;
  max-width: 22rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary-text) 18%, transparent);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.dash-info-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: calc(var(--tip-arrow, 50%) - 5px);
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: solid var(--input-border);
  border-width: 1px 0 0 1px;
  background: var(--surface);
  transform: rotate(45deg);
}

.dash-info-tip[data-side="above"]::before {
  top: auto;
  bottom: -6px;
  transform: rotate(225deg);
}

/* A table's chrome never selected with its rows: an i, a heading's words
   kept for its i, the sort arrows and the copy of a pinned heading
   (dashboard_copy.js copies the rows themselves). */
.dash-info,
th .dash-info-text,
.table-sort-beside,
.table-sort > [aria-hidden="true"],
.sticky-head-copy {
  -webkit-user-select: none;
  user-select: none;
}

/* A grid's picked cells painted row by row (dashboard_copy.js), the
   page's own selection, which runs down one part before the next,
   unpainted there; where the browser can't paint, the page's own stands. */
::highlight(dash-copy-rows) {
  background-color: Highlight;
  color: HighlightText;
}

@supports selector(::highlight(dash-copy-rows)) {
  .dash-grid-picking ::selection {
    background-color: transparent;
  }
}

/* The page's own box: its shading all but vanishes in dark mode, so the
   border thickens too. */
.dash-tile.self {
  background: var(--secondary-background);
  box-shadow: inset 0 0 0 1px var(--primary-text);
}

.dash-tile-label {
  font-weight: 600;
  font-size: 0.85rem;
}

/* A figure's words in small muted type, kept on one line where they run
   on from it ("of 10"). */
.dash-monthly {
  font-weight: 400;
  font-size: 0.7rem;
  opacity: 0.65;
  white-space: nowrap;
}

/* What state a figure is in (still settling, through yesterday, not read
   yet, estimated), or a column's target, is a line of its own under its
   name, wrapping there, so it never reads as part of the name. */
.dash-under-name {
  display: block;
  white-space: normal;
}

.dash-tile-value {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-text);
  font-variant-numeric: tabular-nums;
}

.dash-tile-empty,
.dash-metric-empty,
.dash-empty {
  font-size: 0.85rem;
  color: var(--muted-text);
  font-style: italic;
}

.dash-tile-office,
.dash-metric-office,
.dash-tile-solid {
  font-size: 0.8rem;
  color: var(--muted-text);
}

/* Green, amber, red: at or about the mark, a little under, under. */
.dash-sig {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
  background: var(--neutral-dot);
}

.dash-sig.good, .dash-goal-fill.good, .dash-bar-fill.good { background: var(--geico-green); }
.dash-sig.warn, .dash-goal-fill.warn, .dash-bar-fill.warn { background: var(--warn-fill); }
.dash-sig.bad, .dash-goal-fill.bad, .dash-bar-fill.bad { background: var(--bad-fill); }
small.good { color: var(--geico-green); }
small.warn { color: var(--warn-fill); }
small.bad { color: var(--bad-fill); }

.dash-goal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.dash-goal {
  display: block;
  position: relative;
  width: 100%;
  height: 0.6rem;
  border-radius: 4px;
  background: var(--secondary-background);
  overflow: hidden;
}

.dash-goal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--chart-blue);
}

.dash-goal-text {
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dash-group h2,
.dash-card-head h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

/* The heading centred, whatever sits beside it. */
.dash-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.dash-card-head h2 {
  margin: 0;
}

.dash-metric {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--input-border);
  color: var(--text);
  text-decoration: none;
}

.dash-metric:first-of-type {
  border-top: 0;
}

.dash-metric-label {
  flex: 1 1 10rem;
  font-weight: 600;
}

.dash-metric-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-text);
  font-variant-numeric: tabular-nums;
}

.dash-metric-value small,
.dash-metric-office small,
.dash-bar-value small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted-text);
}

.dash-def {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
}

.dash-h4 {
  margin: 1rem 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

/* A slot per day of the range (--slots of them), so the gaps narrow
   with a long range rather than pushing the chart past the card. */
.dash-trend {
  display: flex;
  align-items: flex-end;
  gap: min(3px, calc(25% / var(--slots, 1)));
  height: 96px;
  padding-top: 4px;
  border-bottom: 1px solid var(--input-border);
}

.dash-trend-slot {
  flex: 1;
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  position: relative;
  cursor: default;
}

.dash-trend-slot:hover .dash-trend-bar,
.dash-trend-slot:focus-visible .dash-trend-bar {
  filter: brightness(0.85);
}

/* A day past what a lagging figure reads through: shaded, not a zero. */
.dash-trend-slot.unread {
  background: repeating-linear-gradient(135deg, var(--input-border) 0 1px, transparent 1px 5px);
}

/* Shown the moment the column is under the pointer, so a day answers
   straight away rather than after the browser's own delay. */
.dash-trend-tip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  white-space: nowrap;
  background: var(--tip-background);
  color: var(--tip-text);
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  z-index: 2;
  pointer-events: none;
}

.dash-trend-slot:hover .dash-trend-tip,
.dash-trend-slot:focus-visible .dash-trend-tip {
  display: block;
}

/* The first and last columns would otherwise hang off the card. */
.dash-trend-slot:first-child .dash-trend-tip { left: 0; transform: none; }
.dash-trend-slot:last-child .dash-trend-tip { left: auto; right: 0; transform: none; }

.dash-trend {
  overflow: visible;
}

.dash-trend-bar {
  width: 100%;
  display: block;
  min-height: 2px;
  background: var(--chart-blue);
  border-radius: 3px 3px 0 0;
}

/* A source per colour: lines of each day's own figure, or a sum's
   parts stacked. The slots under the lines carry each day's readout;
   the lines themselves catch the pointer through a wide unseen twin. */
.dash-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1rem;
  margin: 0 0 0.4rem;
  padding: 0;
  font-size: 0.85rem;
}
.dash-legend b { font-weight: 600; }
.dash-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: -1px;
}
.dash-swatch.own {
  height: 0;
  border-top: 2px dashed currentColor;
  vertical-align: 3px;
}
.dash-chart { position: relative; }
.dash-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.dash-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
}
.dash-line.own {
  stroke: currentColor;
  stroke-width: 2;
  stroke-dasharray: 6 5;
  opacity: 0.7;
}
.dash-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  pointer-events: visibleStroke;
}
.dash-series:has(.dash-hit:hover) .dash-line { opacity: 0.25; }
.dash-series .dash-line:has(+ .dash-hit:hover) { opacity: 1; stroke-width: 4; }
.dash-line-label {
  display: none;
  position: absolute;
  right: 0;
  transform: translateY(-120%);
  font-size: 0.8rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border-radius: 3px;
  padding: 0 0.3rem;
  pointer-events: none;
}
.dash-overlay .dash-trend-slot:hover,
.dash-overlay .dash-trend-slot:focus-visible {
  box-shadow: inset 1px 0 0 currentColor;
}
.dash-trend-slot.stacked {
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 1px;
}
.dash-trend-slot.stacked .dash-trend-bar {
  min-height: 0;
  border-radius: 0;
}
.dash-trend-tip.multi {
  white-space: normal;
  text-align: left;
  min-width: 10rem;
}
.dash-trend-tip.multi b,
.dash-trend-tip.multi span { display: block; }
.dash-trend-tip.multi span b { display: inline; }

.dash-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted-text);
  margin-top: 0.25rem;
  position: relative;
  container-type: inline-size;
}

/* A section's trends by month, shut under its boxes: a small chart a figure, side by side and shorter than a
   figure's own. */
.dash-month-trends { margin: 0.5rem 0 0.75rem; }
.dash-month-trends > summary { cursor: pointer; color: var(--primary-text); font-size: 0.85rem; }
.dash-month-trend-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; margin-top: 0.4rem; }
.dash-month-trend { margin: 0; min-width: 0; }
.dash-month-trend figcaption { font-size: 0.75rem; color: var(--muted-text); margin-bottom: 0.15rem; }
.dash-month-trend .dash-trend { height: 56px; }

/* A day chart's month (or Monday) marks: a faint line up the chart at the
   day's left edge, its name centred under the day. A name near the axis's
   own first or last shows only where the chart is wide enough for both. */
.dash-chart .dash-trend {
  position: relative;
}
.dash-gridline {
  position: absolute;
  top: 4px;
  bottom: 0;
  left: calc(100% * var(--at) / var(--slots));
  border-left: 1px dashed var(--input-border);
  pointer-events: none;
}
.dash-mark-name {
  position: absolute;
  left: calc(100% * (var(--at) + 0.5) / var(--slots));
  transform: translateX(-50%);
  white-space: nowrap;
}
@container (max-width: 36rem) {
  .dash-mark-name.crowded { display: none; }
}
.dash-axis.dash-months {
  display: grid;
  grid-template-columns: repeat(var(--slots), minmax(0, 1fr));
  text-align: center;
}
.dash-months small {
  display: block;
  font-size: 0.65rem;
}

/* Read by touch (chart_scrub.js): a sideways drag is the chart's, a
   vertical one still scrolls the page; the day under the finger, or the
   keyboard's, is lit and its readout pinned above the chart in place of
   the tips. */
.dash-chart[data-scrub] {
  touch-action: pan-y;
}
.dash-trend-slot.scrub-at {
  background: color-mix(in srgb, var(--primary-text) 14%, transparent);
  outline: 1px solid var(--primary-text);
}
.dash-trend-slot.scrub-at .dash-trend-bar {
  filter: brightness(0.85);
}
.dash-chart.pinned .dash-trend-tip {
  display: none !important;
}
.dash-readout {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 100%;
  margin: 0;
  background: var(--tip-background);
  color: var(--tip-text);
  font-size: 0.75rem;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}
.dash-readout > * + * {
  margin-left: 0.6em;
}

.dash-bars {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
}

.dash-bar-row {
  display: grid;
  grid-template-columns: minmax(6rem, 10rem) 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
  font-size: 0.9rem;
}

.dash-bar-row.me {
  font-weight: 700;
}

.dash-you {
  padding: 0 0.35em;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--status-good-bg);
  color: var(--status-good-text);
}

/* A rep among the office's reps: their bar green, everyone else's blue, as on their day chart. */
.dash-bars.against .dash-bar-fill:not(.dash-bar-overlay) {
  background: var(--chart-blue);
}

.dash-bars.against .me .dash-bar-fill:not(.dash-bar-overlay) {
  background: var(--chart-green);
}

.dash-bar-name {
  color: var(--text);
  text-decoration: none;
}

a.dash-bar-name {
  color: var(--primary-text);
}

.dash-bar {
  position: relative;
  display: block;
  height: 0.8rem;
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

/* The chart blue a grid's bars take, light in the dark theme. */
.dash-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  height: 100%;
  background: var(--chart-blue);
}

/* Wraps, so five or six sources fit a phone. */
.dash-site-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.dash-site-legend i {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.3rem;
  border-radius: 2px;
}

/* The overlay, always the smaller, is drawn in the success green so it
   reads as the good outcome rather than a second series. */
.dash-bar-overlay {
  background: var(--geico-green);
}

/* A bar with a solid part (the offers at the computer) is that part solid
   and the rest of it the same colour, lighter. */
.dash-bar-faint {
  opacity: 0.4;
}

/* A bullet's bands sit faint behind the rep's own figure -- red under
   the floor, amber up to the goal -- and the figure is a thinner green
   bar over them, so where it ends reads against both. */
.dash-bar-band {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  opacity: 0.3;
}

.dash-bar-band.bad { background: var(--bad-fill); }
.dash-bar-band.warn { background: var(--warn-fill); }

.dash-bar-progress {
  top: 25%;
  height: 50%;
  background: var(--geico-green);
}

/* A fixed value column, so every row's bar is the same width and the
   bands line up down the list. */
.dash-bar-row.bullet {
  grid-template-columns: minmax(6rem, 10rem) 1fr 8.5rem;
}

/* The same for words after the figure, so a row with none has a bar as wide
   as the rest; a phone has no room beside them, so the bar takes its own line. */
.dash-bar-row.worded {
  grid-template-columns: minmax(6rem, 10rem) 1fr 13rem;
}

@media (max-width: 560px) {
  .dash-bar-row.worded {
    grid-template-columns: 1fr auto;
  }

  .dash-bar-row.worded .dash-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dash-bar-row.worded .dash-bar-value {
    grid-column: 2;
    grid-row: 1;
  }
}

.dash-bar-value {
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
  text-align: right;
}

/* A list's names share one column as wide as its longest, each on one line
   and right against its bar, as is a state under it, so a long name never
   wraps into a gap. A name past the cap (a phone's narrower) is cut short,
   whole under the pointer. */
@supports (grid-template-columns: subgrid) {
  .dash-bars {
    display: grid;
    grid-template-columns: minmax(6rem, max-content) 1fr auto;
    column-gap: 0.5rem;
  }

  .dash-bars:has(> .bullet) {
    grid-template-columns: minmax(6rem, max-content) 1fr 8.5rem;
  }

  .dash-bars:has(> .worded) {
    grid-template-columns: minmax(6rem, max-content) 1fr 13rem;
  }

  .dash-bar-row,
  .dash-bar-row.bullet,
  .dash-bar-row.worded {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }

  .dash-bar-row > .dash-bar-name,
  .dash-bar-label {
    justify-self: end;
    max-width: 22rem;
    text-align: right;
  }

  .dash-bar-label {
    justify-content: flex-end;
  }

  .dash-bar-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  @media (max-width: 560px) {
    .dash-bar-row > .dash-bar-name,
    .dash-bar-label {
      max-width: 9rem;
    }

    /* A phone has no pointer to show a cut name whole, so a long one wraps
       under itself instead. */
    .dash-bar-name {
      white-space: normal;
      overflow-wrap: break-word;
    }

    /* A cut-short name would otherwise give the words all the room. */
    .dash-bar-row.worded {
      grid-template-columns: minmax(50%, 1fr) auto;
    }

    .dash-bar-row.worded > .dash-bar-name,
    .dash-bar-row.worded > .dash-bar-label {
      justify-self: start;
      max-width: 100%;
      text-align: left;
    }
  }
}

/* The scorecard: result and rating per metric, the overall beneath. */
.dash-score {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.8rem;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.dash-score-h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

.dash-score-m {
  font-weight: 600;
}

.dash-right {
  text-align: right;
}

.dash-stars {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.dash-stars i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--secondary-background);
}

.dash-stars i.on {
  background: var(--primary);
}

.dash-overall {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--input-border);
}

/* All Referrals' dealer tables: the rep's colour down the name's edge, the total in weight. */
.ar-table th.shaded {
  border-left: 4px solid var(--rep-colour);
}

.ar-table tr.total th,
.ar-table tr.total td {
  font-weight: 700;
}

/* A row's name is a rep's, not a heading's: as the lines below write names. */
.ar-table tbody th {
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;
  color: inherit;
  white-space: nowrap;
}

.ar-table .dash-gloss td,
.ar-table .dash-gloss th.dash-right {
  text-align: right;
  white-space: nowrap;
}

/* The scorecard's How the Ratings Work panel, under the overall. */
.dash-legend {
  margin: 0.8rem 0 0;
}

.dash-legend .dash-gloss .dash-right {
  text-align: right;
}

.dash-legend p {
  text-align: left;
}

.dash-big {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-text);
}

.dash-pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-pill.good { background: var(--status-good-bg); color: var(--status-good-text); }
.dash-pill.warn { background: var(--status-warn-bg); color: var(--status-warn-text); }
/* A flagged_by line: a person's own mark a source disagrees with, under or after its figure. */
.dash-flagged { display: inline-block; margin: 2px 0 0 4px; font-size: 0.75rem; font-weight: 500; }
.dash-pill.bad { background: var(--status-bad-bg); color: var(--status-bad-text); }
.dash-pill.yellow { background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.dash-pill.info { background: var(--status-info-bg); color: var(--status-info-text); }
/* The portal's own blue, solid in both themes: Commissions' MOAT product beside an auto's lighter blue. */
.dash-pill.primary { background: var(--primary); color: var(--on-primary); }
/* A fact about a person rather than a status: a Service rep among who answered, after their name. */
.dash-pill.neutral { background: var(--status-neutral-bg); color: var(--text); }

/* A name and its pill on one line, the name cut short rather than the pill. */
.dash-bar-label > .dash-pill,
.dash-grid-marked > .dash-pill {
  flex: none;
  white-space: nowrap;
}

.dash-grid-marked {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.dash-grid-marked > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-glossary summary,
.dash-group summary,
.partner-relations-day summary {
  cursor: pointer;
  font-weight: 600;
}

.dash-wide {
  overflow-x: auto;
}

.dash-gloss {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}

.dash-gloss th,
.dash-gloss td {
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--input-border);
  vertical-align: top;
}

.dash-gloss th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

/* Monthly Targets on Settings: the unit belongs with the field's name, so
   a manager isn't guessing whether a box wants a count or a percentage. */
.selfservice-goal-unit {
  font-weight: 400;
  color: var(--muted-text);
  font-size: 0.8rem;
  margin-left: 0.3rem;
}

.selfservice-goal-note {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.selfservice-goal-more > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.2rem 0;
}

.selfservice-goal-group {
  margin: 0.9rem 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

/* One dot per relay job on the relay's page: green running, amber
   running but not yet able to send, red not running or stopped. */
.relay-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--light-not-started);
  vertical-align: middle;
}
.relay-dot.on { background: var(--light-completed); }
.relay-dot.waiting { background: var(--light-in-progress); }
/* The status page and Compliance: a line for information only, neither good nor bad. */
.relay-dot.note { background: var(--neutral-dot); }
.relay-dot.muted { background: var(--status-muted-dot); }
/* A card per topic, tapped into for its lines, as the Dashboard's boxes are. */
.checks-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 0.75rem;
}
.checks-card {
  display: block;
  margin: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
}
.checks-card:hover,
.checks-card:focus-visible {
  outline: 2px solid var(--primary-text);
}
.checks-card .relay-section-title {
  margin-bottom: 0.4rem;
}
.checks-counts {
  margin-left: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.75;
}
.checks-sentence {
  margin: 0;
}
.checks-line .relay-dot {
  flex: none;
  align-self: flex-start;
  margin-top: 0.35rem;
}
.checks-line {
  align-items: flex-start;
}
/* A line's words and names wrap inside the box at any width. */
.checks-line-body {
  flex: 1;
  min-width: 0;
}
.checks-line .relay-text {
  white-space: normal;
  overflow-wrap: anywhere;
}
/* Names listed under the sentence by group, never run into it. */
.checks-group {
  margin-top: 0.35rem;
  font-size: 0.9rem;
}
.checks-group-label {
  font-weight: 700;
}
.checks-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
}
/* Each name its own chip, so a list reads as separate people. */
.checks-names li {
  max-width: 100%;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--status-neutral-bg);
  color: var(--text);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
/* A name with details: its chip opens them under it, the whole row wide. */
.checks-detail > summary {
  cursor: pointer;
}
.checks-detail > summary::marker,
.checks-detail > summary::-webkit-details-marker {
  color: var(--muted-text);
}
.checks-names li:has(> .checks-detail[open]) {
  flex-basis: 100%;
  border-radius: 8px;
}
.checks-detail-lines {
  margin: 0.25rem 0 0.2rem;
  padding-left: 1.1rem;
  color: var(--muted-text);
  font-size: 0.8rem;
}
.checks-names .checks-detail-lines li {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* Compliance: a muted line keeps its words, on yellow, with who muted it and why. */
.checks-line.is-muted {
  margin: 0 -0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: var(--status-yellow-bg);
}
.checks-muted,
.checks-muted-count {
  margin: 0.35rem 0 0;
  color: var(--status-yellow-text);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.checks-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.checks-buttons .checks-action {
  margin: 0;
}
.checks-mute-form,
.checks-confirm-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex-basis: 100%;
}
.checks-mute-label,
.checks-confirm-text {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
}
.checks-mute-note {
  flex: 1 1 14rem;
  min-width: 0;
}
/* Lead Intake: a new key, shown once, whole on one line to copy. */
.intake-key {
  width: 100%;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* A month for Monthly Targets or a day for the Visit Schedule: the pick
   and its button read as one choice, centred, rather than a field with
   something beside it. */
.selfservice-goal-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* A holiday each, with an x to take it off. */
.selfservice-holidays {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}
.selfservice-holiday {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--primary-text);
  color: var(--primary-text);
  border-radius: 999px;
  padding: 0.15rem 0.5rem 0.15rem 0.7rem;
}
.selfservice-holiday-drop {
  border: 0;
  background: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  cursor: pointer;
}
.selfservice-holiday-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* pull_refresh.js's sign, out of sight above the top until a pull brings
   it down, turning as it comes; filled once letting go would refresh, its
   arrow spinning while the page reloads. Over the banners (1050, 1051),
   under a sheet over the page (1100). */
.pull-refresh {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) - 3rem);
  left: calc(50% - 1.25rem);
  z-index: 1055;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--primary-text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.15s ease;
}

.pull-refresh-pulling {
  transition: background-color 0.15s ease;
}

.pull-refresh-ready {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

@media (prefers-reduced-motion: no-preference) {
  .pull-refresh-going svg {
    animation: pull-refresh-spin 0.8s linear infinite;
  }
}

@keyframes pull-refresh-spin {
  to { transform: rotate(360deg); }
}

/* theme_toggle.js's band, fixed to the window's foot at every width,
   however short the page or far it scrolls, the desk alerts' callout
   included: Feedback and Help in the bottom left corner, text size and
   the theme in the bottom right, clear of a phone's rounded corners and
   notch (the safe-area insets). Only the buttons and the callout take a
   click, never the gap or the room over the buttons. */
#page-controls {
  position: fixed;
  left: max(1rem, env(safe-area-inset-left));
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.25rem;
  pointer-events: none;
}

/* A phone's band out of the way while the page scrolls down (theme_toggle.js), taking no tap until it is back. */
#page-controls {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#page-controls.page-controls-away {
  transform: translateY(calc(100% + 1.5rem));
  opacity: 0;
}
#page-controls.page-controls-away * {
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  #page-controls {
    transition: none;
  }
}

.page-controls-start,
.page-controls-end {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
}

.page-controls-start > *,
.page-controls-end > * {
  pointer-events: auto;
}

.page-controls-end {
  margin-left: auto;
}

/* The Not Ready banner (_not_ready_banner.html), in the sale banner's
   place over the top of the page, the sale banner dropping below it
   while it is up (--not-ready-clear, set by not_ready_banner.js). Queue's
   connection-lost red, one fill in both themes, white text on it. */
.not-ready-banner {
  position: fixed;
  top: max(0.5rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1051;
  display: flex;
  justify-content: center;
  width: max-content;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}

.not-ready-banner-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.2rem 0.2rem 0.2rem 1rem;
  border-radius: 999px;
  background: var(--alert-red);
  color: var(--on-alert-red);
  border: 1px solid var(--alert-red-edge);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.not-ready-banner-text {
  overflow-wrap: anywhere;
}

.not-ready-banner-hide {
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.not-ready-banner-hide:hover,
.not-ready-banner-hide:focus-visible {
  background: rgba(255, 255, 255, 0.25);
}

.not-ready-banner-hide:focus-visible {
  outline: 2px solid var(--on-alert-red);
  outline-offset: -2px;
}

/* The sale banner (_sale_banner.html), fixed over the top of the page so
   nothing under it moves as a sale comes or goes; only its rows take a
   click. Above the corner band, under a pop-up's backdrop. */
.sale-banner {
  position: fixed;
  top: calc(max(0.5rem, env(safe-area-inset-top)) + var(--not-ready-clear, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  pointer-events: none;
}

.sale-banner-item,
.sale-banner-more {
  pointer-events: auto;
  display: flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sale-banner-item {
  gap: 0.25rem;
  padding: 0.2rem 0.2rem 0.2rem 1rem;
  background: var(--status-good-bg);
  color: var(--status-good-text);
  border: 1px solid var(--geico-green);
  font-weight: 700;
}

/* A sale with a gift card it earned or a staff member who referred it: its line, then those smaller under it, the
   × beside both. */
.sale-banner-item.has-under {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.25rem;
  border-radius: 1.25rem;
}

.sale-banner-item.has-under .sale-banner-hide {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.sale-banner-under {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding-bottom: 0.15rem;
}

.sale-banner-referred {
  opacity: 0.85;
}

.sale-banner-card {
  font-weight: 700;
}

.sale-banner-card + .sale-banner-referred::before {
  content: "·";
  margin-right: 0.5rem;
}

/* A sale that earned a gift card glints once as it first shows on the page. */
.sale-banner-money {
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .sale-banner-money::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: sale-banner-glint 1.2s ease-out 0.15s 1 both;
    pointer-events: none;
  }
}

@keyframes sale-banner-glint {
  from { transform: translateX(0); }
  to { transform: translateX(350%); }
}

.sale-banner-more {
  padding: 0.2rem 0.8rem;
  background: var(--surface);
  color: var(--muted-text);
  border: 1px solid var(--hairline);
  font-size: 0.875rem;
}

.sale-banner-text {
  overflow-wrap: anywhere;
}

.sale-banner-hide {
  flex: none;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
}

.sale-banner-hide:hover,
.sale-banner-hide:focus-visible {
  background: var(--button-hover);
}

/* Room at the foot of every page for the band, so a page's last button
   scrolls clear of it: its 2.75rem over 1rem of inset, and a gap, until
   theme_toggle.js measures the band's own height, the callout's with it. */
:root {
  --toggle-clear: 4.25rem;
}

/* A phone keeps only text size and the theme, in the right corner. */
@media (max-width: 560px) {
  .page-controls-start,
  #desk-alerts,
  #carrier-logins-open,
  #call-notes-open {
    display: none;
  }
}

#theme-toggle,
#carrier-logins-open,
#call-notes-open {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  background: var(--secondary-background);
  font-size: 1.3rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

/* Call Notes (call_notes.js): a window over any page for jotting a call's
   vehicle, financing and address; its button above, light blue while it is
   open. The window draws its own boxes, so a page's form rules (Record's
   tall, centred boxes) never reach into it. */
#call-notes-open.selected,
#call-notes .cn-pill.selected {
  background: color-mix(in srgb, var(--primary-text) 25%, var(--background));
}

#call-notes {
  position: fixed;
  z-index: 1001;
  width: min(26rem, calc(100vw - 1rem));
  max-height: min(80vh, calc(100vh - 1rem));
  min-width: 18rem;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  background: var(--background);
  border: 1px solid var(--primary);
  border-radius: 0.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  resize: both;
}

#call-notes[hidden] {
  display: none;
}

#call-notes.moving {
  opacity: 0.92;
  user-select: none;
}

#call-notes.minimized {
  resize: none;
  min-height: 0;
  height: auto !important;
}

#call-notes.minimized .call-notes-body {
  display: none;
}

#call-notes .call-notes-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  cursor: move;
  touch-action: none;
}

#call-notes .call-notes-title {
  flex: 1;
  font-weight: 700;
}

#call-notes .call-notes-bar button {
  margin: 0;
  padding: 0.2rem 0.8rem;
  border: 1px solid var(--on-primary);
  border-radius: 999px;
  background: transparent;
  color: var(--on-primary);
  cursor: pointer;
}

#call-notes .call-notes-min,
#call-notes .call-notes-close {
  padding: 0.15rem 0.55rem;
  font-size: 1.2rem;
  line-height: 1;
}

#call-notes .call-notes-body {
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
  text-align: left;
}

#call-notes .notes-part {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}

#call-notes .notes-part:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

#call-notes label {
  display: block;
  margin: 0.3rem 0 0.1rem;
  font-size: 0.8rem;
}

#call-notes .notes-part-title {
  font-weight: 700;
  color: var(--primary-text);
}

#call-notes label.notes-part-title {
  margin-top: 0;
  font-size: 1rem;
}

#call-notes input[type="text"],
#call-notes textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.55rem;
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: left;
}

/* Nothing on Call Notes is sent, so a ZIP Code that misses its pattern is only outlined, once typed. */
#call-notes input:invalid:not(:focus) {
  border-color: var(--danger);
}

#call-notes .vin-box {
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#call-notes .finance-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

#call-notes .finance-kinds {
  display: flex;
  gap: 0.3rem;
}

#call-notes .cn-pill {
  margin: 0;
  padding: 0.15rem 0.7rem;
  border: 1px solid var(--primary-text);
  border-radius: 999px;
  background: var(--background);
  color: var(--primary-text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

#call-notes .cn-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 3.5rem 5rem;
  gap: 0.4rem;
}

/* A language after a name (language_tags.py): its colour as the border
   and a tint behind ordinary text, so it reads in both themes and the
   name of the language is always there. */
.language-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.45rem;
  border: 1px solid var(--language-colour, var(--muted-text));
  border-left-width: 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--language-colour, transparent) 16%, transparent);
  color: var(--primary-text);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

/* pages.ini's colours are picked against the light page; on the dark one
   each is drawn part white, or the portal's navy vanishes into it. */
:root[data-theme="dark"] .language-tag {
  border-color: color-mix(in srgb, var(--language-colour, var(--muted-text)) 70%, white);
}

/* Who somebody reports to, after their name on the Staff Roster: the
   sign-in chips' neutral pill, a fact about the row rather than a warning. */
.reports-to-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--status-neutral-bg);
  color: var(--muted-text);
  font-size: 0.8em;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

/* Text size, to the toggle's left: A± opens A+ and A− stacked above it.
   The steps follow the button in the page, so Tab reaches them next. */
#text-size {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.25rem;
}
#text-size-steps {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
#text-size button {
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  background: var(--secondary-background);
  color: var(--primary-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
#text-size button:disabled {
  opacity: 0.4;
}

/* The desk alerts' bell (_desk_alerts.html), in the right corner,
   crossed out while alerts are off, and its callout standing over it in
   the band, so the band's height is the callout's too: the bell's width
   alone in the row, the callout reaching left from its right edge. Past
   a phone's width alone, where the band holds the bell. */
@media (min-width: 561px) {
  #desk-alerts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 2.75rem;
  }
}
#desk-alerts-bell {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  background: var(--secondary-background);
  color: var(--primary-text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
#desk-alerts-bell svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The cross over a gap in the button's own colour, so it reads across the bell. */
#desk-alerts-bell .bell-cross-gap {
  stroke: var(--secondary-background);
  stroke-width: 5;
}
#desk-alerts-bell[aria-pressed="true"] .bell-cross,
#desk-alerts-bell[aria-pressed="true"] .bell-cross-gap {
  display: none;
}

/* Asking a desk to allow alerts: amber, pointing down at the bell, and
   as hard to miss as a banner across the page. */
#desk-alerts-callout {
  position: relative;
  flex: none;
  margin-bottom: 0.75rem;
  width: 22rem;
  max-width: calc(100vw - 9rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
#desk-alerts-callout p {
  margin: 0;
}
#desk-alerts-callout::after {
  content: "";
  position: absolute;
  top: 100%;
  right: calc(1.375rem - 0.6rem);
  border: 0.6rem solid transparent;
  border-top-color: var(--amber);
}

/* /leads: the search on one line, then a box per lead -- the same
   bordered box /sales and /transfer put a part of a form in -- a line
   each until opened. */
.lead-search {
  flex-direction: row;
  align-items: stretch;
  margin-bottom: 0.5rem;
}
.lead-search button {
  margin-top: 0;
}
.lead-count {
  color: var(--muted-text);
}
.lead {
  background: var(--surface);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.lead[open] {
  padding-bottom: 1rem;
}
/* The browser's own marker sits on a line of its own once the row below
   it is a grid, so the row carries its own, beside the name. */
.lead summary {
  cursor: pointer;
  color: var(--primary-text);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  list-style: none;
}
.lead summary::-webkit-details-marker {
  display: none;
}
.lead summary::before {
  content: "\25B8";
  width: 0.8rem;
  flex: none;
  text-align: center;
}
.lead[open] summary::before {
  content: "\25BE";
}
.lead summary:hover .lead-name {
  text-decoration: underline;
}
/* One row per lead, on columns of its own, so the phone under a long
   name starts where the phone above it does. */
.lead-line {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.2rem 1rem;
  align-items: baseline;
}
.lead-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.lead-tags:empty {
  display: none;
}
/* The tags keep their own line at every width, so the four values
   spread evenly and line up from one lead to the next. */
@media (min-width: 760px) {
  .lead-line {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.lead-name {
  font-weight: 700;
  font-size: 1.1rem;
}
.lead-when {
  color: var(--muted-text);
}
/* An opened lead's number, beside its Record Sale. */
.lead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-top: 0.5rem;
}
.lead-number {
  color: var(--muted-text);
}
/* An opened lead: its parts side by side, each in a box of its own as a
   policy sits in /sales, so it reads as contact, insurance, driver and
   car rather than as one long list. */
.lead-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 0.75rem;
  align-items: start;
}
@media (min-width: 760px) {
  .lead-row {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }
  /* A lead with one driver, or one car: centred rather than stretched
     across a width meant for two. */
  .lead-row.one {
    grid-template-columns: minmax(0, 32rem);
    justify-content: center;
  }
}
.lead-section {
  border: 1px solid var(--secondary-background);
  border-radius: 8px;
  background: var(--background);
  padding: 0.6rem 0.9rem;
}
.lead-transfer {
  background: var(--geico-green);
  color: var(--surface);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.85rem;
}
.lead-section h3 {
  color: var(--primary-text);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}
/* A field is its own cell, the label over the value and each as wide as
   it needs: as many to a line as fit, and a line with fewer centred
   rather than left hanging. */
.lead-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0;
}
.lead-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lead-fields dt {
  color: var(--muted-text);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lead-fields dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* The Call List: a box per customer like /leads's leads, under a
   heading per standing, with the rep's own call picked out. */
.calls-summary {
  color: var(--muted-text);
}
.calls-problem {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
}
/* static/live.js healing a page's connection: said quietly, and gone once it has. */
.live-reconnecting {
  color: var(--muted-text);
  font-style: italic;
}
/* The page's one strip under the tab strip, for whichever of its live views is cut off. */
.live-reconnecting-strip {
  margin: 0.5rem 0;
  text-align: center;
}
.call-group {
  margin-top: 1.25rem;
}
.call-group-title {
  color: var(--primary-text);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  cursor: default;
}
details.call-group > .call-group-title {
  cursor: pointer;
}
.call-group-title-done {
  color: var(--subtle-blue-text);
}
.call-row {
  text-align: left;
  background: var(--surface);
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
}
.call-row.yours {
  border-width: 2px;
  background: var(--secondary-background);
}
/* My Policies' full view: how far a sale has got, the box's edge amber
   where Sales Archive or Edge reads a figure differently and red once Edge
   says it is cancelling. */
.policy-stage { font-weight: 600; }
.policy-row.policy-differs { border-left: 6px solid var(--status-warn-text); }
.policy-differ { color: var(--status-warn-text); }
.policy-row.policy-cancelled { border-left: 6px solid var(--status-bad-text); }
.policy-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0;
}
/* My Policies' pay flags: a chip each (my_policies/flags.py's tones), red
   where pay could be taken back, amber where something wants checking,
   green where it counts for the rep, yellow for DriveEasy still to
   register, blue for a bundle, gray for what it is. */
.policy-summary { font-weight: 600; margin: 0.5rem 0 0.25rem; }
.policy-commission span { font-style: italic; color: var(--muted-text); }
.policy-filters { margin: 0.5rem 0; }
/* My Policies' edit form: the Company, Premium and Paid In Full boxes and their labels sit in the form's own
   column, gone for an auto. */
.policy-company,
.policy-priced {
  display: contents;
}

.policy-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}
.policy-flag {
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--status-neutral-bg);
  font-size: 0.8rem;
}
.policy-flag.bad { border-color: var(--status-bad-text); background: var(--status-bad-bg); color: var(--status-bad-text); }
.policy-flag.warn { border-color: var(--status-warn-text); background: var(--status-warn-bg); color: var(--status-warn-text); }
.policy-flag.good { border-color: var(--status-good-text); background: var(--status-good-bg); color: var(--status-good-text); }
.policy-flag.yellow { border-color: var(--status-yellow-text); background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.policy-flag.info { border-color: var(--status-info-text); background: var(--status-info-bg); color: var(--status-info-text); }
.policy-pay { margin-top: 0.5rem; font-size: 0.9rem; }
.policy-pay summary { cursor: pointer; }

/* A sale's own small folds (Pay Flags and Figures, its edits) open by the
   Dashboard's arrow, left of the name, turning down as it opens. */
:is(.policy-pay, .policy-history) > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--primary-text);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

:is(.policy-pay, .policy-history) > summary::-webkit-details-marker {
  display: none;
}

:is(.policy-pay, .policy-history) > summary::before {
  content: "";
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

:is(.policy-pay, .policy-history)[open] > summary::before {
  transform: rotate(45deg);
}
.policy-pay-line { margin: 0.3rem 0 0; }
.policy-pay-line[title] { cursor: help; }
/* A sale's company and premium say their source only on hover (_policy_priced.html). */
.policy-card-meta span[title] { cursor: help; }
/* My Policies' boxes, in both views: a card a sale on the list's own
   background, the customer and a status pill over the product, chips and
   a bottom row of small buttons. */
.policy-cards-count {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted-text);
}
.policy-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  text-align: left;
}
.policy-card + .policy-card { margin-top: 0.6rem; }
.policy-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
}
.policy-card-name {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.policy-card-meta {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted-text);
  overflow-wrap: anywhere;
}
.policy-card .policy-flags { margin-top: 0.5rem; }
/* Active green, Cancel Pending amber, Cancelled red. */
.policy-pill {
  flex: none;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--status-neutral-bg);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}
.policy-pill.good { background: var(--status-good-bg); color: var(--status-good-text); }
.policy-pill.warn { background: var(--status-warn-bg); color: var(--status-warn-text); }
.policy-pill.bad { background: var(--status-bad-bg); color: var(--status-bad-text); }
/* The Verified column: a slot at each box's right edge, under a heading
   over the list set in by the box's own border and padding, so the tags
   line up down the page. */
.policy-cards-head {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.25rem;
  padding: 0 calc(1rem + 1px);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-text);
}
/* Room for the longest tag on one line (Awaiting Check); a phone's narrower. */
.policy-verified {
  flex: none;
  width: 6.5rem;
  text-align: center;
}
/* A tag too long for the slot wraps inside its own border rather than
   breaking it, and never runs past the box. */
.policy-verified .policy-flag {
  display: inline-block;
  max-width: 100%;
  padding: 0.05rem 0.45rem;
  font-size: 0.75rem;
  line-height: 1.3;
}
/* A chip or tag with words behind it says so on pointing at it. */
:is(.policy-flags, .policy-verified) .policy-flag[title] { cursor: help; }
/* Edit and Remove on the left, the copy buttons on the right; a number
   the browser wouldn't copy shows beside its button, to select by hand. */
.policy-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.65rem 0 0;
}
.policy-buttons-edit, .policy-buttons-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
/* The copy buttons take the rest of the row, wrapping within it on a
   narrow screen; a small basis keeps them beside Edit and Remove there. */
.policy-buttons-edit { flex: none; }
.policy-buttons-copy { flex: 1 1 10rem; justify-content: flex-end; }
.policy-buttons button, .checkin-form .policy-remove-offer button {
  margin: 0;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
}
.policy-buttons button { white-space: nowrap; }
.policy-copy-shown { font-size: 0.85rem; user-select: all; overflow-wrap: anywhere; }
/* A number in a row's words, selected whole by a click. */
.policy-number { user-select: all; }
.policy-remove-offer { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--muted-text); }
/* While an edit or removal previews, its form's own fields and buttons stand aside, so the preview's Confirm is the
   one thing to press; Back brings them back as they were (policies.html's checking()). */
.policy-form.policy-checking > :not(.policy-check, .form-warning) { display: none; }
.policy-form .policy-check { margin-top: 0.5rem; }
/* A MOAT bundle under the auto it was written up with: a thin blue line,
   labelled, joins the two boxes. */
.policy-bundle-link {
  margin: 0 0 0 1.5rem;
  padding: 0.2rem 0 0.2rem 0.6rem;
  border-left: 2px solid var(--status-info-text);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--status-info-text);
}
.policy-bundle-link + .policy-card { margin-top: 0; }
@media (max-width: 600px) {
  .card:has(> .policy-card) { padding: 0.75rem; }
  .policy-card { padding: 0.7rem 0.8rem; }
  .policy-cards-head { padding: 0 calc(0.8rem + 1px); }
  .policy-card-head { gap: 0.5rem 0.6rem; }
  .policy-verified { width: 4.6rem; }
  .policy-buttons button { padding: 0.3rem 0.55rem; font-size: 0.8rem; }
}
.call-line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0.2rem 1rem;
  align-items: baseline;
}
/* A Call List card's line (name, phone and days left, its number on the
   Copy button) and a follow-up row's (customer, company, day and rep, in
   the same columns on SSL's, which has no company). No name breaks: each
   part keeps to one line and the company takes the slack, and below the
   page's full width (main's 900px) the name has a row of its own. The day
   keeps the width of one with its year ("Opened Sep 30, 2025") on every
   row, one that shows none too, so the rep beside it stands where it does
   on the rows above and below. */
.call-line.call-list-line {
  grid-template-columns: minmax(max-content, 1.4fr) minmax(max-content, 1fr) minmax(max-content, 0.8fr);
}
.call-line.followup-line {
  grid-template-columns: minmax(max-content, 1.4fr) minmax(0, 1fr) max-content minmax(max-content, 0.8fr);
}
.followup-line .followup-day { grid-column: 3; min-width: 9rem; }
.followup-line .followup-agent { grid-column: 4; }
@media (max-width: 899px) {
  .call-line.call-list-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .call-list-line .lead-name {
    grid-column: 1 / -1;
  }
  /* After the name, each part whole beside the last where it fits, else on the next row. */
  .call-line.followup-line {
    display: flex;
    flex-wrap: wrap;
  }
  .followup-line .lead-name {
    flex-basis: 100%;
  }
}
.call-left {
  justify-self: end;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  color: var(--status-warn-text);
  font-weight: 600;
}
/* Days left before a customer leaves the list: red on the last day,
   then orange, yellow and, from three on, green. */
.call-row.left-0 { border-left: 6px solid var(--status-bad-text); }
.call-row.left-1 { border-left: 6px solid var(--status-orange-text); }
.call-row.left-2 { border-left: 6px solid var(--status-yellow-text); }
.call-row.left-3 { border-left: 6px solid var(--status-good-text); }
.call-row.left-0 .call-left { background: var(--status-bad-bg); color: var(--status-bad-text); }
.call-row.left-1 .call-left { background: var(--status-orange-bg); color: var(--status-orange-text); }
.call-row.left-2 .call-left { background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.call-row.left-3 .call-left { background: var(--status-good-bg); color: var(--status-good-text); }
.call-about {
  color: var(--muted-text);
  margin-top: 0.3rem;
}
.call-line .call-about {
  margin-top: 0;
}
.call-note {
  margin-top: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-block;
  background: var(--status-neutral-bg);
}
.call-note.done {
  background: var(--status-good-bg);
  color: var(--status-good-text);
}
.call-note.awaiting, .call-note.to_call {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}
.call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}
/* A follow-up's note box takes the row's width beside Save Note and Cancel. */
.call-actions .followup-note {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 100%;
}
/* A follow-up row on /service reads in parts: the customer leads, what
   stands beside the name and how the row was given are small print, the
   notes fold under their count and open behind a rule at one size, and
   the marks share a line under small names. Its buttons are small, since a row holds eight or
   more. */
.followup-row .followup-line > span:not(.lead-name),
.followup-row > .call-about {
  font-size: 0.9rem;
  color: var(--muted-text);
}
.followup-row .followup-notes {
  margin-top: 0.6rem;
  font-size: 0.9rem;
}
/* The notes' own line, which opens them: how many there are. */
.followup-row .followup-notes-title {
  font-weight: 600;
  color: var(--primary-text);
  cursor: pointer;
}
.followup-row .followup-note-lines {
  margin-top: 0.4rem;
  padding: 0.1rem 0 0.1rem 0.7rem;
  border-left: 3px solid var(--input-border);
}
.followup-row .followup-note-line + .followup-note-line {
  margin-top: 0.3rem;
}
/* Who wrote a note and when: its words' own size, told apart by weight and colour alone. */
.followup-row .followup-note-by {
  margin-right: 0.4rem;
  font-weight: 600;
  color: var(--muted-text);
}
.followup-row .followup-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--row-rule);
}
/* A mark's buttons drop under its name rather than wrap their own words. */
.followup-row .followup-mark {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.followup-row .followup-mark-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-text);
}
/* Retained? asked in Completed's place on a MOAT row PSA doesn't read, its name a question rather than a label. */
.followup-row .followup-ask .followup-mark-name {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--primary-text);
}
.followup-row button {
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.followup-row .call-actions {
  margin-top: 0.6rem;
}
/* Why a follow-up was assigned, always in sight under its name line. */
.followup-row .followup-reason {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
}
/* Find's headings over its two kinds of answer. */
.find-heading {
  margin: 1rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-text);
}
/* A follow-up's notes in amber: a day marked No, on the rep's row and on Admin's list of them, and what keeps an
   open one from moving until somebody steps in, for Admin and whoever sees every rep's. */
.followup-no-credit,
.followup-stall {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warn-fill);
}
.call-let-go {
  background: none;
  color: var(--primary-text);
  text-decoration: underline;
  font-weight: 400;
}
/* copy_number.js's button, bottom right of a Call List card or follow-up
   row. Its labels share one grid cell, so it is the widest one's width
   whichever shows. */
.copy-number {
  display: inline-grid;
  justify-items: center;
  margin-left: auto;
}
.copy-number-label {
  grid-area: 1 / 1;
}
/* A shared-out customer's light: green done, orange worked and still
   open, red not started; a pool customer has none. Its words are for a
   screen reader and the hover title, and the key over the page. */
.status-light {
  display: inline-block;
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  vertical-align: baseline;
}
.status-light.completed { background: var(--light-completed); }
.status-light.in-progress { background: var(--light-in-progress); }
.status-light.not-started { background: var(--light-not-started); }
.status-light-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
}
.call-line .lead-name .status-light {
  vertical-align: 0.05rem;
}
/* Words a screen reader says that the page shows another way. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 600px) {
  .call-line {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* /service: every section collapsed to its heading and count until tapped. */
.service-section > summary {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--input-border);
}
.service-section .section-count,
.dash-tab .section-count,
.attendance-group .section-count,
.roster-group .section-count {
  color: var(--muted-text);
  font-weight: 400;
}
.service-section > .calls-summary {
  margin-top: 0.75rem;
}



/* ---- Dashboard, Refined ---- */

/* A figure is a blue-tint card keeping .dash-tile's edge, its label over
   its number and the quiet lines under it, read from the left; inside a
   section's blue-tint body, white, on the Dashboard's own pages (dash-wide). */
.dash-wide .dash-tile {
  align-items: flex-start;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  background: var(--secondary-background);
  border-radius: 6px;
  text-align: left;
}

.dash-wide .dash-tile-open {
  align-items: flex-start;
  gap: 0.2rem;
}

.dash-wide .dash-section-body .dash-tile,
.dash-wide .dash-panel .dash-tile {
  background: var(--surface);
}

.dash-wide .dash-tile-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-text);
}

.dash-wide .dash-tile[data-definitions] .dash-tile-label {
  padding: 0 1.4rem 0 0;
}

.dash-wide .dash-tile-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--figure-text);
}

.dash-wide .dash-tile-office,
.dash-tile-parts,
.dash-wide .dash-tile-solid,
.dash-wide .dash-metric-office {
  font-size: 0.85rem;
  color: var(--text);
}

/* The one quiet line under a figure against its target: amber or red
   text only when behind, never a bar or a light. A second figure
   (followed_by, beside) is a line of its own above it, in the same type. */
.dash-pace,
.dash-tile-second {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.dash-pace.warn {
  color: var(--status-warn-text);
  font-weight: 700;
}

.dash-pace.bad {
  color: var(--status-bad-text);
  font-weight: 700;
}

/* Inside a bar's line or a ranked table's own cell it runs on with its
   words; an agent's figures opened under a row keep it under the figure. */
.dash-fold-line .dash-pace,
.dash-fold-part.dash-pace,
.dash-ranked > tbody > tr > td > .dash-pace {
  display: inline;
  font-size: inherit;
}

/* The Overview's row: the same cards a size up, in equal columns filling
   the width -- three across, one on a phone. Every row of figures keeps
   equal columns (data-tiles), a row of four two by two below 60rem. */
.dash-tiles.dash-headline {
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 60rem) {
  .dash-wide .dash-tiles[data-tiles="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-headline .dash-tile {
  padding: 1.25rem 1.4rem;
}

.dash-headline .dash-tile-label {
  font-size: 0.95rem;
}

.dash-headline .dash-tile-value {
  font-size: 2.6rem;
  line-height: 1.05;
}

.dash-headline .dash-tile-parts,
.dash-headline .dash-tile-office,
.dash-headline .dash-pace,
.dash-headline .dash-tile-second {
  font-size: 0.9rem;
}

/* A tab's sections, each one blue bar until opened: the arrow left of
   its name, pointing right while shut and down once open, its period
   chip and its one line, the whole bar its button. Clipped to its
   corners, never `hidden`, which would make it a scrolling box its
   tables' headings stick inside rather than to the page. */
section.dash-section,
.dash-glossary {
  display: flow-root;
  min-width: 0;
  background: var(--secondary-background);
  border: 0;
  border-radius: 6px;
  overflow: clip;
}

.dash-glossary {
  margin-bottom: 1rem;
}

.dash-fold-head {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.dash-fold {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  width: 100%;
  padding: 1.1rem 1.4rem;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dash-fold:hover {
  background: color-mix(in srgb, var(--secondary-background) 88%, var(--primary-text));
}

.dash-fold:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: -2px;
}

.dash-fold-arrow {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--figure-text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-fold[aria-expanded="true"] > .dash-fold-arrow,
.dash-row-open[aria-expanded="true"] > .dash-fold-arrow {
  transform: rotate(90deg);
}

@media (prefers-reduced-motion: no-preference) {
  .dash-fold-arrow {
    transition: transform 0.15s ease;
  }
}

section.dash-section .dash-section-name,
.dash-glossary .dash-section-name {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--figure-text);
  text-align: left;
}

.dash-chip {
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.dash-fold-line {
  min-width: 0;
  font-size: 0.95rem;
  color: var(--text);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.dash-fold-figure {
  font-weight: 800;
  color: var(--figure-text);
}

section.dash-section > .dash-section-body,
.dash-glossary > .dash-glossary-body {
  padding: 0.25rem 1.4rem 1.4rem;
}

/* A section inside a section is a white bar in its blue-tint body, a size down. */
.dash-section-body section.dash-section {
  background: var(--surface);
}

.dash-section-body section.dash-section .dash-section-name {
  font-size: 1.05rem;
}

.dash-section-body section.dash-section .dash-fold {
  padding: 0.85rem 1.15rem;
}

.dash-wide .dash-section-body section.dash-section .dash-section-body .dash-tile {
  background: var(--secondary-background);
}

.dash-section-body .dash-h4 {
  margin: 1rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
  color: var(--figure-text);
  text-align: left;
}

/* A ranked table of people and a person's own figures: white on the
   blue-tint body, a row each, the office's last, a person's name opening
   their figures in place under their row. */
.dash-ranked-wrap {
  overflow-x: auto;
  background: var(--surface);
  border-radius: 6px;
}

.dash-ranked,
.dash-figures,
.dash-rows-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.dash-ranked th,
.dash-ranked td,
.dash-figures th,
.dash-figures td,
.dash-rows-table th,
.dash-rows-table td {
  padding: 0.65rem 1.15rem;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.dash-ranked thead th,
.dash-figures thead th,
.dash-rows-table thead th {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom-color: var(--input-border);
  font-weight: 800;
  color: var(--primary-text);
}

.dash-ranked tbody th,
.dash-figures tbody th {
  font-weight: 400;
}

.dash-ranked .num,
.dash-figures .num {
  text-align: right;
}

.dash-ranked tr.me > th {
  font-weight: 700;
}

.dash-ranked tfoot th,
.dash-ranked tfoot td {
  border-bottom: 0;
  font-weight: 700;
}

.dash-row-detail > td {
  padding: 0 1.15rem 1rem;
  background: var(--surface);
}

/* Under a bar, the whole list's width: placed in the names' column alone, its
   table would widen that column and squeeze every bar. */
li.dash-row-detail {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0.4rem 0 0.8rem;
  list-style: none;
}

.dash-row-figures,
.dash-rows {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  background: var(--secondary-background);
}

.dash-rows .dash-note,
.dash-row-figures .dash-note {
  margin: 0 0 0.5rem;
  text-align: left;
}

/* A breakdown's value opened to its people: their bars set in under its own, a rule down their side. */
.dash-row-people {
  padding: 0.3rem 0 0.3rem 0.9rem;
  border-left: 3px solid var(--secondary-background);
}

.dash-row-people > .dash-note {
  margin: 0;
  text-align: left;
}

/* A grid row's people open as a panel after the grid (a campaign's who answered), under its head with no rule. */
.dash-panel > .dash-row-people {
  padding: 0.5rem 0 0;
  border-left: 0;
}

/* Where an opened campaign's calls went, above who answered them: each place's count, in a row that wraps. */
.dash-value-parts {
  margin: 0 0 0.7rem;
}

.dash-value-parts-head {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.dash-value-parts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dash-value-parts-list li {
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--text);
}

.dash-value-parts-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--figure-text);
}

/* The office's figure across a bar, in the page's ink. */
.dash-bar-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--text);
}

/* A spend's daily budget as a band the full height of its bar, the spend a thinner bar over it so the band shows
   past and around it (By Campaign), and on one day Google's limit for it, twice the budget, as a mark; a shared
   budget is words under the bar, never a band. */
.dash-grid .dash-bar-budgeted {
  height: 0.9rem;
}

.dash-bar-budget {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--lime);
  opacity: 0.75;
}

.dash-bar-budgeted > .dash-bar-fill {
  top: 22%;
  height: 56%;
}

.dash-grid-budget {
  grid-column: 2;
  font-size: 0.7rem;
  line-height: 1.1;
  color: var(--muted-text);
}

/* A campaign's own budget is its band, but on a phone, where the bar may have no room, its amount as plain text
   under the figure, explaining no band. */
.dash-grid-budget.own {
  display: none;
}

@container (max-width: 42rem) {
  .dash-grid-budget {
    grid-column: 1 / -1;
    text-align: right;
  }

  .dash-grid-budget.own {
    display: block;
  }

  /* No band or mark is drawn here, so the key names neither; the day budgets were recorded from stays. */
  .dash-budget-key-drawn {
    display: none;
  }
}

.dash-budget-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--muted-text);
}

.dash-budget-key i {
  display: inline-block;
  width: 0.8rem;
  height: 0.7rem;
  margin-right: 0.3rem;
  vertical-align: -0.05rem;
}

.dash-budget-key .dash-budget-swatch {
  border-radius: 2px;
  background: var(--lime);
  opacity: 0.75;
}

.dash-budget-key .dash-limit-swatch {
  width: 2px;
  margin-right: 0.45rem;
  background: var(--text);
}

.dash-figures {
  font-size: 0.9rem;
}

.dash-figures :is(.dash-pace, .dash-tile-second) {
  font-size: 0.8rem;
}

.dash-rows-wrap {
  overflow-x: auto;
  border-radius: 6px;
  background: var(--surface);
}

.dash-rows-table {
  font-size: 0.88rem;
}

.dash-copy-cell {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.dash-rows-table .copy-number {
  margin-left: 0;
  padding: 0.2rem 0.65rem;
  font-size: 0.82rem;
}

/* My Referrals' sold policy, a line of its own under the outcome: its type, then Copy Policy Number. */
.referral-policy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin-top: 0.35rem;
}

/* A name opening a person's figures or the rows behind a figure: the arrow left of it, turning as it opens. */
.dash-row-open {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.dash-row-open .dash-fold-arrow {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.dash-row-open:hover {
  text-decoration: underline;
}

.dash-row-open:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: 2px;
}

/* A Dashboard table's row lights whole under the pointer or the keyboard,
   so a figure far along it reads against its name; a grid split into parts
   lights the same row in each (dashboard_rows.js). A long list is striped
   faintly, and where a table scrolls sideways its names stay in view. */
.dash-ranked tbody tr:nth-child(even) > *,
.dash-rows-table tbody tr:nth-child(even) > * {
  background: color-mix(in srgb, var(--secondary-background) 45%, var(--surface));
}

.dash-ranked tbody tr:is(:hover, :focus-within) > *,
.dash-figures tbody tr:is(:hover, :focus-within) > *,
.dash-rows-table tbody tr:is(:hover, :focus-within) > *,
.dash-gloss tbody tr:is(:hover, :focus-within) > *,
.dash-grid tbody tr:is(:hover, :focus-within, .dash-row-lit) > * {
  background: var(--row-lit);
}

.dash-ranked,
.dash-rows-table {
  min-width: 30rem;
}

.dash-ranked tbody th,
.dash-ranked tfoot th,
.dash-ranked thead th:first-child,
.dash-rows-table td:first-child,
.dash-rows-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

/* A phone keeps its 16px gutter: two cards a row, a bar's line under its
   name, and a table's rows stacked, each figure under its own heading. */
@media (max-width: 560px) {
  .dash-wide .dash-tiles.dash-headline[data-tiles] {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-wide .dash-tiles.dash-headline[data-tiles] .dash-tile:last-child {
    grid-column: auto;
  }

  .dash-headline .dash-tile {
    padding: 1rem;
  }

  .dash-headline .dash-tile-value {
    font-size: 1.75rem;
  }

  .dash-fold {
    padding: 0.9rem 1rem;
  }

  section.dash-section .dash-section-name,
  .dash-glossary .dash-section-name {
    font-size: 1.1rem;
  }

  section.dash-section > .dash-section-body,
  .dash-glossary > .dash-glossary-body {
    padding: 0.25rem 0.75rem 1rem;
  }

  .dash-ranked thead,
  .dash-figures thead,
  .dash-rows-table thead {
    display: none;
  }

  .dash-ranked,
  .dash-rows-table {
    min-width: 0;
  }

  .dash-ranked tr,
  .dash-figures tr,
  .dash-rows-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem 0.75rem;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--hairline);
  }

  .dash-ranked th,
  .dash-ranked td,
  .dash-figures th,
  .dash-figures td,
  .dash-rows-table td {
    padding: 0;
    border: 0;
    text-align: left;
  }

  .dash-ranked .num,
  .dash-figures .num {
    text-align: left;
  }

  .dash-ranked tbody th,
  .dash-ranked tfoot th,
  .dash-figures tbody th {
    grid-column: 1 / -1;
  }

  .dash-ranked td[data-pre]::before,
  .dash-figures td[data-pre]::before,
  .dash-rows-table td[data-pre]::before {
    content: attr(data-pre);
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-text);
  }

  /* A shut one stays hidden ([hidden] is as heavy and earlier). */
  .dash-row-detail:not([hidden]) {
    display: block !important;
    padding: 0 !important;
  }

  .dash-row-detail > td {
    display: block;
    padding: 0 0 0.75rem;
  }

  /* A stacked row leaves out a heading with nothing under it. */
  .dash-rows-table td:empty,
  .dash-ranked td:empty {
    display: none;
  }

  /* My Referrals' Outcome a line of its own, so a sold policy's type and Copy Policy Number sit side by side. */
  .dash-rows-table td.referral-outcome {
    grid-column: 1 / -1;
  }

  /* A stacked row is striped whole, not cell by cell. */
  .dash-ranked tbody tr:nth-child(even),
  .dash-rows-table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--secondary-background) 45%, var(--surface));
  }

  .dash-ranked tbody tr:nth-child(even):not(:hover, :focus-within) > *,
  .dash-rows-table tbody tr:nth-child(even):not(:hover, :focus-within) > * {
    background: none;
  }
}

/* Hide Numbers, for leads and up: the toggle beside the range chips, its
   eye shut while on, and while on (html.dash-numbers-hidden, the person's
   preference) what an agent couldn't see blurred past
   reading -- each figure, row, chart and section dashboard.py marks
   private by the gates, and a drill's policy numbers and contact IDs with
   their Copy. What an agent is shown, and every name, label and period,
   stays. Edit Layout sits beside it in the same shape. */
.dash-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: -0.25rem 0 0.75rem;
}

.dash-hide-numbers,
.dash-edit-layout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.dash-hide-numbers:hover,
.dash-edit-layout:hover {
  border-color: var(--primary-text);
}

.dash-hide-numbers[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.dash-hide-numbers svg,
.dash-edit-layout svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-hide-numbers .dash-eye-shut,
.dash-hide-numbers[aria-pressed="true"] .dash-eye-open {
  display: none;
}

.dash-hide-numbers[aria-pressed="true"] .dash-eye-shut {
  display: inline;
}

/* Held, or opened from the caret joined to its side, Hide Numbers is a
   menu: itself, each vendor view and Show Everything, the one on ticked.
   The button keeps its own long touch, so no callout opens over it. */
.dash-numbers-pick {
  position: relative;
  display: inline-flex;
}

.dash-numbers-pick .dash-hide-numbers {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.dash-numbers-pick:has(.dash-numbers-more) .dash-hide-numbers {
  border-radius: 999px 0 0 999px;
}

.dash-numbers-more {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.55rem 0.35rem 0.45rem;
  border: 1px solid var(--input-border);
  border-left: 0;
  border-radius: 0 999px 999px 0;
  background: var(--surface);
  color: var(--primary-text);
  cursor: pointer;
}

.dash-numbers-more:hover,
.dash-numbers-more[aria-expanded="true"] {
  border-color: var(--primary-text);
}

.dash-numbers-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-numbers-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  min-width: 13rem;
  padding: 0.3rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 22%, transparent);
}

.dash-numbers-menu[hidden] {
  display: none;
}

.dash-numbers-menu [role="menuitemradio"] {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.dash-numbers-menu [role="menuitemradio"]::before {
  content: "";
  width: 1rem;
  text-align: center;
  font-weight: 700;
}

.dash-numbers-menu [role="menuitemradio"][aria-checked="true"] {
  font-weight: 700;
}

.dash-numbers-menu [role="menuitemradio"][aria-checked="true"]::before {
  content: "\2713";
  color: var(--primary-text);
}

.dash-numbers-menu [role="menuitemradio"]:is(:hover, :focus-visible) {
  background: var(--row-lit);
  outline: none;
}

/* A vendor view (html.dash-vendor-view, dashboard_numbers.js), for
   screen-sharing with a vendor's team, blurs every value on the page the
   way Hide Numbers blurs what is marked private: each box's figures, a
   section bar's figures, bars, grid cells, every table's cells, charts and
   their keys, a panel's lines of figures, and the folds of a person's page
   whole; names, labels and periods stay. A figure, section or breakdown
   value the view shows (vendor_views.ini) is marked data-vendor by the
   server, and inside that mark --dash-mask is none, so it reads; anything
   else greys as it blurs, so no status colour reads through. Customer
   data is never shown, whatever is marked. */
.dash-vendor-view {
  --dash-mask: blur(0.5em) grayscale(1);
  --dash-reach: none;
}

.dash-numbers-hidden :is([data-private], [data-private-tile] :is(.dash-tile-value, .dash-tile-second, .dash-tile-parts, .dash-pace),
  [data-private-office] .dash-tile-office, [data-private-row] > :is(.dash-bar, .dash-bar-value),
  [data-private-grid] .dash-grid-value, [data-private-section] > .dash-section-body,
  [data-private-section] .dash-fold-line, [data-private-card] :is(.dash-right, .dash-overall, .dash-fold-line),
  .dash-rows-table :is(td.policy, td.contact)),
.dash-vendor-view :where(.dash-tile-value, .dash-tile-second, .dash-tile-parts, .dash-tile-solid, .dash-tile-office,
  .dash-tile-value ~ .dash-monthly, .dash-pace, .dash-flagged, .dash-fold-line strong, .dash-fold-part:not(:has(strong)),
  .dash-bar, .dash-bar-value, .dash-grid-value, .dash-grid-budget, .dash-value-parts-count, .dash-chart, .dash-legend,
  .dash-figure-note, .dash-profile-lead, .dash-profile-other small, .dash-score .dash-right, .dash-overall,
  .dash-live-figure strong, .dash-live-said, .dash-live-queue, main td:not(.dash-glossary-body td, tr.dash-row-detail > td),
  .dash-page-fold:not(.dash-person-figures, .dash-detail) :is(.dash-fold-line, .dash-section-body), [data-private]) {
  filter: var(--dash-mask, blur(0.5em));
  user-select: none;
}

/* Nor does a blurred cell's or chart's own readout show under the pointer. */
.dash-vendor-view :where(main td, .dash-chart, .dash-page-fold:not(.dash-person-figures, .dash-detail) .dash-section-body) {
  pointer-events: var(--dash-reach);
}

html[data-vendor-view="google-ads"] :is([data-vendor~="google-ads"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor~="google-ads"])),
html[data-vendor-view="everquote"] :is([data-vendor~="everquote"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor~="everquote"])),
html[data-vendor-view="quotewizard"] :is([data-vendor~="quotewizard"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor~="quotewizard"])) {
  --dash-mask: none;
  --dash-reach: auto;
}

/* A value a view leaves blurred even inside what it shows (its except
   line: LICI's and QCI's rows and bars under Google Ads). */
html[data-vendor-view="google-ads"] :is([data-vendor-except~="google-ads"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor-except~="google-ads"])),
html[data-vendor-view="everquote"] :is([data-vendor-except~="everquote"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor-except~="everquote"])),
html[data-vendor-view="quotewizard"] :is([data-vendor-except~="quotewizard"],
  .dash-grid td:has(> .dash-grid-cell > [data-vendor-except~="quotewizard"])) {
  --dash-mask: blur(0.5em) grayscale(1);
  --dash-reach: none;
}

.dash-vendor-view .dash-rows-table :is(td.policy, td.contact) {
  filter: blur(0.5em) grayscale(1);
  pointer-events: none;
  user-select: none;
}

/* The strip saying a vendor view is on, held at the top as the page
   scrolls (sticky_heads.js keeps a table's heading under it), with Exit;
   its view's own line alone. */
.dash-vendor-banner,
.dash-vendor-said > span {
  display: none;
}

.dash-vendor-view .dash-vendor-banner {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.9rem;
  padding: calc(0.5rem + env(safe-area-inset-top)) 16px 0.5rem;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 700;
  text-align: center;
}

.dash-vendor-said {
  margin: 0;
}

html[data-vendor-view="google-ads"] [data-vendor-said="google-ads"],
html[data-vendor-view="everquote"] [data-vendor-said="everquote"],
html[data-vendor-view="quotewizard"] [data-vendor-said="quotewizard"] {
  display: inline;
}

.dash-vendor-exit {
  padding: 0.25rem 1rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.dash-vendor-exit:hover {
  background: color-mix(in srgb, var(--on-amber) 12%, transparent);
}

.dash-numbers-hidden :is([data-private-section] > .dash-section-body, .dash-rows-table .copy-number) {
  pointer-events: none;
}

/* A box with a stand-in (hidden_shows): its own face, and while numbers
   are hidden the figure an agent sees in its place, under that figure's
   label. Each face lays out as the box's own lines. */
.dash-tile-face {
  display: contents;
}

.dash-tile-stand-in,
.dash-numbers-hidden .dash-tile-face:not(.dash-tile-stand-in) {
  display: none;
}

.dash-numbers-hidden .dash-tile-stand-in {
  display: contents;
}

/* The Dashboard's other pages -- a person's, a metric's, Sales Standards,
   My Policies -- in the Overview's look: each section a fold drawn as its
   sections are (_fold.html), a gap under each, its notes read from the
   left, and a card or form inside it on white, as a ranked table is. */
section.dash-page-fold {
  margin-bottom: 0.9rem;
}

.dash-page-fold > .dash-section-body > :is(.dash-def, .dash-note, .dash-empty, .dash-metric-empty) {
  text-align: left;
}

.dash-score-card,
.dash-review-form {
  margin-bottom: 0.9rem;
  padding: 1rem 1.15rem;
  border-radius: 6px;
  background: var(--surface);
}

.dash-score-card .dash-overall {
  border-top-color: var(--hairline);
}

/* The Partner Relations tab's heading over its scorecards, as a section's own headings read. */
.dash-h4.partner-heading {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
  color: var(--figure-text);
  text-align: left;
}

.dash-review-form .dash-h4 {
  margin-top: 0;
}

.dash-legend-table th {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: normal;
  text-transform: none;
  color: var(--primary-text);
}

.dash-legend-table :is(th, td) {
  padding: 0.5rem 0.75rem;
  border-bottom-color: var(--hairline);
}

/* A person's figure in their table reads as a figure in a ranked table does, the office's quiet beside it. */
.dash-figures .dash-metric-value {
  font-size: inherit;
  font-weight: 700;
  color: var(--figure-text);
}

.dash-figures .dash-metric-office {
  font-size: inherit;
  color: var(--text);
}

.dash-figure-name {
  color: var(--primary-text);
  text-decoration: none;
}

.dash-figure-name:hover {
  text-decoration: underline;
}

/* A long list's rows past its first ten wait until the Expand More after its table is open. */
.dash-rows-wrap:not(:has(+ .dash-rows-expand[open])) .dash-rows-held {
  display: none;
}

.dash-rows-wrap + .dash-rows-expand {
  margin-top: 0.4rem;
}

/* While masked nothing hidden keeps a status colour, which reads ahead or
   behind through the blur: a figure, its pace line, its bar, its cell and
   the section bar's entry for it take the page's own ink, and a grid
   cell's bar is blurred with its figure. */
.dash-numbers-hidden :is(.dash-pace, .dash-fold-part)[data-private],
.dash-numbers-hidden .dash-fold-part:has([data-private]),
.dash-numbers-hidden :is([data-private-tile], [data-private-section], [data-private-card], [data-private-row])
  :is(.dash-pace, .dash-fold-part, .dash-pill:not(.neutral)),
.dash-numbers-hidden :is([data-private-grid] td, .dash-grid td:has([data-private])) .dash-grid-value {
  color: var(--text);
  font-weight: inherit;
}

.dash-numbers-hidden [data-private-card] .dash-pill:not(.neutral),
.dash-numbers-hidden :is([data-private-grid] td, .dash-grid td:has([data-private])) {
  background: none;
}

.dash-numbers-hidden :is([data-private-row], [data-private-section], [data-private-grid] td,
  .dash-grid td:has([data-private])) :is(.dash-bar-fill:not(.dash-bar-overlay), .dash-bar-progress) {
  background: var(--chart-blue);
}

.dash-numbers-hidden :is([data-private-row], [data-private-section]) .dash-bar-band {
  background: var(--secondary-background);
}

.dash-numbers-hidden :is([data-private-grid] td, .dash-grid td:has([data-private])) .dash-bar {
  filter: blur(0.5em);
}

/* ---- Sales Standards (/sales-standards) ---- */

/* The office's box for each standard, a row sharing its width evenly. */
.standards-tiles {
  display: grid;
  grid-template-columns: repeat(var(--tiles, 4), minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

/* The page's levels in the workbook sheet's colours: green at goal, yellow at the expected standard, red at the
   minimum standard and black below it. A box takes its figure's as its cell in the grid does. */
.standards-tile.good,
.dash-wide .dash-section-body .standards-tile.good {
  border-color: var(--status-good-text);
  background: var(--status-good-bg);
}

.standards-tile.warn,
.dash-wide .dash-section-body .standards-tile.warn {
  border-color: var(--status-yellow-text);
  background: var(--status-yellow-bg);
}

.standards-tile.minimum,
.dash-wide .dash-section-body .standards-tile.minimum {
  border-color: var(--status-bad-text);
  background: var(--status-bad-bg);
}

.standards-tile.bad,
.standards-tile.bad:hover,
.dash-wide .dash-section-body .standards-tile.bad {
  border-color: var(--standards-below-bg);
  background: var(--standards-below-bg);
  color: var(--standards-below-ink);
}

.standards-tile.bad .dash-tile-label,
.standards-tile.bad .dash-tile-office,
.standards-tile.bad .standards-group,
.standards-tile.bad .standards-reps {
  color: var(--standards-below-ink);
}

.standards-tile.good .dash-tile-value,
.standards-tile.good .standards-level,
.standards-level-name.good { color: var(--status-good-text); }
.standards-tile.warn .dash-tile-value,
.standards-tile.warn .standards-level,
.standards-level-name.warn { color: var(--status-yellow-text); }
.standards-tile.minimum .dash-tile-value,
.standards-tile.minimum .standards-level,
.standards-level-name.minimum { color: var(--status-bad-text); }
.standards-tile.bad .dash-tile-value,
.standards-tile.bad .standards-level { color: var(--standards-below-text); }

/* The minimum standard's dot on the Dashboard's table, between amber and red. */
.dash-sig.minimum {
  background: var(--status-orange-text);
}

/* A level's dot on this page, in the sheet's colours; the black one ringed so it shows on a black box. */
.standards-page .dash-sig.warn { background: var(--status-muted-dot); }
.standards-page .dash-sig.minimum { background: var(--bad-fill); }
.standards-page .dash-sig.bad {
  background: var(--standards-below-bg);
  box-shadow: 0 0 0 2px var(--standards-below-text);
}

/* A figure's level in words, so it reads without its colour. */
.standards-level,
.standards-level-name {
  font-size: 0.78rem;
  font-weight: 700;
}

.standards-tile:hover .dash-tile-label,
.standards-tile:focus-visible .dash-tile-label {
  text-decoration: underline;
}

.standards-tile .dash-tile-value {
  font-size: 1.8rem;
}

/* The table's group a standard sits under, over its name. */
.standards-group {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text);
}

/* How many reps are green, amber and red on a standard. */
.standards-reps {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.standards-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.1rem;
  margin: 0.4rem 0 0;
}

/* A rep below goal and the rates that put them there, by level, the furthest first. */
.standards-off {
  list-style: none;
  margin: 0;
  padding: 0;
}

.standards-off li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--row-rule);
}

.standards-off li:first-child {
  border-top: 0;
}

.standards-off-name {
  flex: 0 0 15rem;
  font-weight: 600;
}

.standards-off-name a {
  color: var(--primary-text);
  text-decoration: none;
}

.standards-off-name a:hover {
  text-decoration: underline;
}

.standards-chips {
  display: flex;
  flex: 1 1 20rem;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.standards-level-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.standards-chip {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.standards-chip.good {
  background: var(--status-good-bg);
  color: var(--status-good-text);
  border: 1px solid var(--status-good-text);
}

.standards-chip.warn {
  background: var(--status-yellow-bg);
  color: var(--status-yellow-text);
  border: 1px solid var(--status-yellow-text);
}

.standards-chip.minimum {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
  border: 1px solid var(--status-bad-text);
}

.standards-chip.bad {
  background: var(--standards-below-bg);
  color: var(--standards-below-text);
  border: 1px solid var(--standards-below-bg);
}

/* Over the grid, on the right: what the best's colour means and the tick for each standard's mark. */
.standards-sheet-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1.5rem;
  margin-bottom: 0.6rem;
}

.standards-sheet-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.standards-sheet-tools label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.standards-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.3rem;
  border-radius: 3px;
  background: var(--standards-best-bg);
  vertical-align: -1px;
}

/* A table wider than a narrow screen scrolls inside its card. */
.standards-wide {
  overflow-x: auto;
}

/* The sheet's grid: a column a standard under its heading, what each level is for it in the rows under that, then
   a row a rep, the office's and each supervisor's, every figure a block in its level's colour. */
.standards-board {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.standards-board th,
.standards-board td {
  padding: 2px 3px;
  text-align: center;
  white-space: nowrap;
}

.standards-board thead tr:first-child th {
  padding: 0.55rem 0.4rem;
  border-bottom: 2px solid var(--input-border);
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
  vertical-align: bottom;
}

/* The names stay in view while the figures scroll under them. */
.standards-board th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  padding-right: 0.8rem;
  padding-left: 0.6rem;
  background: var(--secondary-background);
  text-align: left;
  font-weight: 600;
}

.standards-board tbody th a {
  color: var(--primary-text);
  text-decoration: none;
}

.standards-board tbody th a:hover {
  text-decoration: underline;
}

.standards-board .standards-leader {
  padding-right: 0.6rem;
  text-align: left;
  color: var(--muted-text);
}

.standards-c {
  display: block;
  padding: 0.32rem 0.5rem;
  border-radius: 6px;
}

.standards-lv .standards-c,
.standards-each .standards-c {
  font-weight: 600;
}

.standards-lv.good .standards-c,
.standards-c.good {
  background: var(--status-good-bg);
  color: var(--status-good-text);
}

.standards-lv.warn .standards-c,
.standards-c.warn {
  background: var(--status-yellow-bg);
  color: var(--status-yellow-text);
}

.standards-lv.minimum .standards-c,
.standards-c.minimum {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
}

.standards-lv.bad .standards-c,
.standards-c.bad {
  background: var(--standards-below-bg);
  color: var(--standards-below-text);
  font-weight: 700;
}

/* The best rep's figure in its column, over its level's colour as the sheet had it. */
.standards-lv.standards-best .standards-c {
  background: var(--standards-best-bg);
  color: var(--standards-best-text);
  font-weight: 700;
}

.standards-mark .standards-c {
  font-weight: 700;
}

.standards-mark small {
  font-weight: 400;
  opacity: 0.75;
}

.standards-other .standards-c {
  text-align: right;
}

/* A count's share of the most any rep has, behind it. */
.standards-bar {
  background: linear-gradient(to right, var(--input-border) var(--bar), transparent var(--bar));
}

/* What each level is for each standard, a row a level under the headings. */
.standards-key-row th,
.standards-key-row td,
.standards-board .standards-key-row th:first-child {
  background: var(--surface);
}

.standards-board .standards-key-row th:first-child {
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted-text);
}

.standards-key-row .standards-c {
  padding: 0.22rem 0.4rem;
  font-size: 0.78rem;
}

.standards-board .standards-key-rest {
  padding-left: 0.6rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--muted-text);
}

.standards-board thead tr:last-child > * {
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--input-border);
}

.standards-board tbody tr:first-child > * {
  padding-top: 0.45rem;
}

.standards-board tbody tr:hover > * {
  background: var(--surface);
}

.standards-board .standards-office-row > * {
  padding-top: 0.45rem;
  border-top: 2px solid var(--input-border);
  font-weight: 700;
}

.standards-board .standards-band th {
  position: static;
  padding: 1.1rem 0.6rem 0.35rem;
  border-bottom: 1px solid var(--row-rule);
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-text);
}

/* Each standard's own mark, shown by the card's tick. */
.standards-board .standards-each {
  display: none;
}

.standards-board.standards-show-each .standards-each {
  display: table-cell;
}

.standards-board thead th.standards-each {
  background: var(--status-neutral-bg);
  font-size: 0.78rem;
}

.standards-board thead th.standards-each span {
  font-weight: 400;
  color: var(--muted-text);
}

@media (max-width: 760px) {
  .standards-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .standards-off-name {
    flex-basis: 100%;
  }

  /* A level's name spans two columns, too wide to hold in view on a phone. */
  .standards-board .standards-key-row th:first-child {
    position: static;
  }
}

/* ---- Dealership (/dealer) ---- */

/* The day's marked visits, each with its own Unmark at the far end. */
.dealer-visits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dealer-visits li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--input-border);
}

.dealer-visits li:first-child {
  border-top: none;
}

.dealer-visit-what {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dealer-visit-who {
  display: block;
  font-size: 0.85rem;
  color: var(--muted-text);
}

/* The day's stops: one visited reads as done rather than dropping off. */
.dealer-stops li.done .dealer-visit-what {
  opacity: 0.6;
}

.dealer-stops li:not(.done) .dealer-stop-done {
  display: none;
}

.dealer-stop-done {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--status-good-text);
}

.dealer-route {
  margin: 0.75rem 0 0;
}

/* Tall enough to place a stop on a phone held upright. */
#dealer-map {
  height: 320px;
  margin-top: 1rem;
  border-radius: 8px;
  z-index: 0;
}

/* The street tiles are a daylight picture: darkened with the page
   rather than swapped for a basemap that wants a key. The satellite is
   left alone -- inverted aerial imagery is unreadable. */
:root[data-theme="dark"] .map-street { filter: var(--map-dark-filter); }

/* The map's own controls in the page's colours rather than Leaflet's
   white boxes, which load after this sheet: hence the map's id. The
   layers icon is drawn in the text's colour, Leaflet's being a dark
   picture. */
#dealer-map .leaflet-bar,
#dealer-map .leaflet-control-layers {
  border-color: var(--input-border);
}

#dealer-map .leaflet-bar a,
#dealer-map .leaflet-control-layers {
  background-color: var(--surface);
  color: var(--text);
}

#dealer-map .leaflet-bar a {
  border-bottom-color: var(--hairline);
}

#dealer-map .leaflet-bar a:hover,
#dealer-map .leaflet-bar a:focus-visible {
  background-color: var(--button-hover);
}

#dealer-map .leaflet-bar a.leaflet-disabled {
  background-color: var(--secondary-background);
  color: var(--muted-text);
}

#dealer-map .leaflet-control-layers-toggle {
  position: relative;
  background-image: none;
}

#dealer-map .leaflet-control-layers-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 8l10 5 10-5zM2 12l10 5 10-5M2 16l10 5 10-5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / 60% no-repeat;
}

#dealer-map .leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
}

#dealer-map .leaflet-control-attribution a {
  color: var(--primary-text);
}

/* Admin's Attendance: the name search and the department groups.
   Dealerships' search is the same line, and so are /service's Find and
   My Policies' search by number. */
.attendance-find,
.dealership-find,
.service-find,
.policy-find,
.roster-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}
/* /service's Find over the sections, with what it found under it. */
.service-find-card,
.policy-find-card {
  margin-bottom: 1rem;
}
.service-find label,
.policy-find label {
  font-weight: 600;
  color: var(--primary-text);
}
/* A control on a line rather than under a label of its own: a search, a
   pick in a list's row or table, and the filters over a list. */
.attendance-find input[type="search"],
.dealership-find input[type="search"],
.service-find input[type="search"],
.policy-find input[type="search"],
.roster-find input[type="search"],
.attendance-group select,
.attendance-group input:not([type="checkbox"], [type="radio"]),
.road-table select,
.referral-switches select {
  flex: 1 1 14rem;
  height: 3rem;
  padding: 0 1rem;
  font-size: 1.1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}
.attendance-group > summary,
.roster-group > summary {
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-text);
}
.selfservice-section .attendance-group,
.selfservice-section .roster-group {
  padding: 0.75rem 1rem;
}
.selfservice-section .attendance-group + .attendance-group,
.selfservice-section .roster-group + .roster-group {
  margin-top: 0.75rem;
}

/* A notice over a page's figures: amber for a warning, red for an error. */
.run-notice {
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  background: var(--status-neutral-bg);
}
.run-notice.warning { background: var(--status-warn-bg); color: var(--status-warn-text); }
.run-notice.error { background: var(--status-bad-bg); color: var(--status-bad-text); }
/* The relay that never answered: amber, fixable here and now. */
.install-banner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}
/* What the in-portal download is doing; empty until it starts. */
.download-status:empty { display: none; }

/* Self Service's Authenticator: a line of state, and the link while it is owed. */
.authenticator-card p {
  margin: 0.35rem 0 0.75rem;
}
.authenticator-card p:last-child {
  margin-bottom: 0;
}
/* Enabled in green, Disabled in red, from the status tokens each theme sets. */
.authenticator-state {
  padding: 0.05rem 0.6rem;
  border-radius: 999px;
}
.authenticator-state.on { background: var(--status-good-bg); color: var(--status-good-text); }
.authenticator-state.off { background: var(--status-bad-bg); color: var(--status-bad-text); }
a.authenticator-link {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
}

/* The Guide, opened by Help: the viewer's pages as the tab strip groups
   them, centred. */
.page-key {
  width: min(32rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 4rem);
  padding: 1rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}

.page-key::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

/* Three columns, so the title sits in the middle and the close button at the end. */
.page-key-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.page-key-head h2 {
  grid-column: 2;
  margin: 0;
  font-size: 1.15rem;
  text-align: center;
  color: var(--primary-text);
}

.page-key-close {
  grid-column: 3;
  justify-self: end;
  background: none;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

.page-key-list {
  margin: 0.75rem 0 0;
  text-align: center;
}

.page-key-list dt {
  margin-top: 0.6rem;
  font-weight: 700;
}

.page-key-list dt a {
  color: var(--primary-text);
}

.page-key-list dd {
  margin: 0.1rem 0 0;
  color: var(--muted-text);
  font-size: 0.9rem;
}

/* The Dashboard's link to its targets, for whoever sets them. */
.dash-edit-targets {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--primary-text);
  font-weight: 600;
}

/* A manager gets Edit Targets and My Policies side by side. */
.dash-edit-targets + .dash-edit-targets {
  margin-left: 1.25rem;
}

.page-key-list .page-key-here {
  color: var(--text);
}

/* Feedback and Help, the band's left corner; Feedback's pop-up is in the Guide's shape. */
#feedback-open,
#page-key-open {
  height: 2.75rem;
  margin: 0;
  padding: 0 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--primary-text);
  background: var(--secondary-background);
  color: var(--primary-text);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

/* The carrier logins pop-up, in the Guide's shape: a site's link and who last
   changed it, then a row per field with its buttons at the right. */
.carrier-site {
  margin-top: 0.9rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--hairline);
}

.carrier-site-name {
  font-weight: 700;
}

.carrier-changed {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

.carrier-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.carrier-field-label {
  flex: 1 1 8rem;
}

.carrier-field button {
  margin: 0;
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
}

.carrier-not-set {
  color: var(--status-warn-text);
  font-size: 0.9rem;
}

.carrier-said {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--status-good-text);
}

.carrier-said.carrier-wrong {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.carrier-change {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.6rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
}

.carrier-change label {
  font-weight: 700;
}

.carrier-change input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--background);
  color: var(--text);
  font: inherit;
  font-weight: 400;
}

/* A page's guide: a numbered card per clip. Each clip's box is held before
   it loads, so one below the fold never reads as on screen and loads early. */
.guide-clips {
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-clip {
  margin: 0 0 1.25rem;
}

/* Who a run of clips is for, above it. */
.guide-audience {
  margin: 1.5rem 0 0.75rem;
  font-size: 1rem;
  color: var(--primary-text);
}

.guide-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--surface);
}

.guide-caption {
  margin-top: 0.75rem;
}

.guide-step {
  display: inline-block;
  min-width: 1.6rem;
  margin-right: 0.3rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.feedback form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.feedback label {
  margin-top: 0.4rem;
  font-weight: 700;
}

.feedback input,
.feedback textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 6px;
  background: var(--background);
  color: var(--text);
  font: inherit;
}

.feedback-warning {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
  font-size: 0.9rem;
}

/* Feature, Bug or Other: Check In's rep pills, three across, the pick lit as Check In's is. */
.feedback-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.feedback-kind {
  min-height: 2.75rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary-text);
  font: inherit;
  font-weight: 600;
}

.feedback-kind[aria-pressed="true"] {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--deep-navy);
}

.feedback-said {
  margin: 0.4rem 0 0;
  color: var(--status-good-text);
}

.feedback-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Dashboard › Settings' Portal Feedback: a line per feedback sent, opening to its whole row. Wraps on a phone. */
.feedback-entry {
  border-top: 1px solid var(--hairline);
  padding: 0.6rem 0.25rem;
}
.feedback-entry > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  cursor: pointer;
  list-style: none;
}
.feedback-entry > summary::-webkit-details-marker {
  display: none;
}
.feedback-entry > summary::before {
  content: "▸";
  color: var(--muted-text);
}
.feedback-entry[open] > summary::before {
  content: "▾";
}
.feedback-entry-ref {
  font-weight: 700;
  color: var(--primary-text);
}
.feedback-entry-when,
.feedback-entry-person {
  color: var(--muted-text);
}
.feedback-entry-title {
  flex: 1 1 14rem;
  overflow-wrap: anywhere;
}
.feedback-status {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}
.feedback-status-sent {
  background: var(--status-good-bg);
  color: var(--status-good-text);
}
.feedback-status-failed {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
}
.feedback-detail {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
  gap: 0.25rem 1rem;
  margin: 0.75rem 0 0.5rem;
}
.feedback-detail dt {
  font-weight: 700;
}
.feedback-detail dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .feedback-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .feedback-detail dd {
    margin-bottom: 0.4rem;
  }
}

/* Record Service's pop-up, in the Guide's shape over any page: Record's
   fields, closer together and left-aligned as Feedback's are. */
.visit-dialog .checkin-form label {
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
}

.visit-dialog .checkin-form input,
.visit-dialog .checkin-form select {
  text-align: left;
  text-align-last: auto;
}

.visit-who {
  margin: 0.5rem 0 0;
  font-weight: 700;
  text-align: center;
}

.visit-saved {
  margin: 0.25rem 0 0;
  color: var(--status-good-text);
  text-align: center;
}

/* Every page's trail back: earlier steps bold in the text colour, a light
   separator, and this page plain and quieter. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
}
.crumbs a,
.crumbs a:visited {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.crumbs a:hover,
.crumbs a:focus-visible {
  text-decoration: underline;
}
.crumbs > span:not(.crumbs-sep):not(.crumbs-here) {
  font-weight: 700;
}
.crumbs-sep {
  padding: 0 0.45rem;
  color: var(--muted-text);
}
.crumbs-here {
  font-weight: 400;
  color: var(--muted-text);
}

/* A person's sign-in on the Staff Roster, for whoever may reset it. */
.sign-in-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.sign-in-chip {
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--input-border);
  border-radius: 999px;
  background: var(--status-neutral-bg);
  color: var(--text);
  font-size: 0.8rem;
}
.sign-in-chip.warn {
  border-color: var(--status-warn-text);
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}
.access-actions form {
  margin: 0;
}

/* ---- Partner Relations' manager side (#317) ---- */
/* The scorecards' heading on the Dashboard's Partner Relations tab, set off from the day's lists above it. */
.partner-heading {
  margin-top: 1.5rem;
}
/* Tools > Attrition: the Dashboard's tabs and cards at a wide table's width. */
.attrition-main {
  max-width: 1100px;
}
/* Admin > Gift Cards: wide enough that a bonus's referral and a dealership's name each keep to one line. */
main.gift-cards-main {
  max-width: 1180px;
}
@container (min-width: 60rem) {
  .gift-card-line { white-space: nowrap; }
}
/* Each kind's part sets its columns alike, so the parts line up down the page. */
.gift-cards-part th:nth-child(1) { width: 18%; }
.gift-cards-part th:nth-child(2) { width: 29%; }
.gift-cards-part th:nth-child(3) { width: 18%; }
.gift-cards-part th:nth-child(4),
.gift-cards-part th:nth-child(5) { width: 10%; }
/* Folded on a phone, a card's status keeps its pill's height beside the taller Edit and Remove. */
.gift-cards-part .dash-pill { align-self: flex-start; }
/* The caret beside a list's heading folds its card to the heading alone. */
.gift-cards-fold {
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
#section-gift-cards .card.folded > :not(.dash-card-head) { display: none; }
#section-gift-cards .card.folded > .dash-card-head { margin-bottom: 0; }
/* A part's Select All, in its first heading over the cards' own ticks: their size, and their gap before the name. */
.gift-cards-part th .gift-cards-all {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 0.75rem 0 0;
  vertical-align: middle;
}
/* Tools > Analytics: its list of reports, and a report's headings that sort and counts that open. */
.analytics-reports {
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-reports li + li {
  margin-top: 0.75rem;
}

.analytics-reports a {
  font-weight: 600;
  color: var(--primary-text);
}

/* A note in Dealership Notes keeps the lines it was written in. */
.dealership-note-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.analytics-sort {
  color: inherit;
  text-decoration: none;
}

/* A heading that sorts its table on the page (sortable_table.js): the heading as it reads, pressed from the keyboard too. */
.table-sort {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.table-sort:hover,
.table-sort:focus-visible {
  text-decoration: underline;
}

/* Beside a heading whose name is a link (a Dashboard grid's column, which opens its chart): a small button of its
   own, muted until the table is sorted by it. */
.table-sort-beside {
  flex: none;
  padding: 0 0.15rem;
  color: var(--muted-text);
  font-size: 0.9em;
  line-height: 1;
}

.table-sort-beside:hover,
.table-sort-beside:focus-visible,
[aria-sort="ascending"] .table-sort-beside,
[aria-sort="descending"] .table-sort-beside {
  color: var(--primary-text);
  text-decoration: none;
}

.analytics-sort.current,
.analytics-sort:hover,
.analytics-sort:focus-visible {
  text-decoration: underline;
}

/* Dealership Quality's Bad Business: the office's own row, which every marked figure is held to. */
.road-table tr.bad-office td {
  font-weight: 700;
}

/* Quality of Business: a row over the rows under it, each level sitting further in. */
.qob-table tr.qob-class th,
.qob-table tr.qob-class td {
  font-weight: 700;
}

.qob-table tr.qob-brand th {
  padding-left: 1.5rem;
  font-weight: 400;
}

.qob-table tr.qob-town th {
  padding-left: 3rem;
  font-weight: 400;
}

.analytics-count {
  font-weight: 600;
  color: var(--primary-text);
}

.analytics-table tr.opened td,
.analytics-callers td {
  background: var(--surface);
}

.analytics-callers ul {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.25rem;
}

.analytics-callers .hr-count {
  margin-left: 0.5rem;
  font-weight: 600;
}

/* A count that isn't whole yet, the days a total is whole over, and what a part is. */
.analytics-mark {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted-text);
}

.analytics-note {
  color: var(--muted-text);
}

/* The Walk Ins Report's grid of weekday against hour: the more in a cell, the darker it is. */
.walk-ins-grid td.shade-1 { background: color-mix(in srgb, var(--primary-text) 8%, transparent); }
.walk-ins-grid td.shade-2 { background: color-mix(in srgb, var(--primary-text) 16%, transparent); }
.walk-ins-grid td.shade-3 { background: color-mix(in srgb, var(--primary-text) 26%, transparent); }
.walk-ins-grid td.shade-4 { background: color-mix(in srgb, var(--primary-text) 38%, transparent); }

/* A calling-dealerships report's dealership, tagged with its own office:
   drawn as the Staff Roster's Home and Away pills are, green for this
   office, blue for the office whose list it is. */
.dealer-home-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.dealer-home-tag.here { background: var(--status-good-bg); color: var(--status-good-text); }
.dealer-home-tag.calling { background: var(--status-info-bg); color: var(--status-info-text); }

.calling-home-count {
  margin-left: 0.35rem;
  font-weight: 400;
  opacity: 0.75;
}

.attrition-find {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.attrition-find label {
  margin: 0;
}
.attrition-find input[type="search"],
.attrition-find select {
  flex: 1 1 12rem;
  width: auto;
  min-width: 0;
}
/* A dealership's figures from GEICO's reports, inside its own form. */
.dealership-report {
  margin-top: 0.75rem;
}
/* Territory Overviews (/dealer/overviews): an overview a row, its Open
   and Download at the row's end, or under it on a phone. */
.overview-route {
  font-weight: 600;
}
.overview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
.overview-actions .link-button {
  margin: 0;
}
.overview-earlier {
  margin-top: 0.75rem;
}
/* All Referrals (/dealer/referrals): a group per rep, headed in their
   colour with black writing whatever the theme, as on the morning's PDF
   (each colour is refused under 4.5:1 against black); each referral a
   line with its facts under it, so nothing scrolls sideways. */
.ar-group {
  padding: 0;
  overflow: hidden;
}
.ar-group > summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 0.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  list-style: none;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.ar-group > summary::-webkit-details-marker {
  display: none;
}
.ar-group > summary.shaded {
  background: var(--rep-colour);
  color: var(--on-amber);
}
.ar-count {
  font-size: 0.9rem;
}
.ar-note {
  margin: 0.75rem 1.25rem 0;
}
.ar-lines {
  padding: 0 1.25rem 0.25rem;
}
.ar-lines .preferred .ar-where {
  font-weight: 700;
}
/* Edit's box, and its picks' warning, open under the line at its full width, so each reads on a phone. */
.ar-lines li:has(> .ar-edit-box),
.ar-lines li:has(> .ar-edit-warning) {
  flex-wrap: wrap;
}
.ar-lines .ar-edit-box,
.ar-lines .ar-edit-warning {
  flex: 1 1 100%;
}
/* The search: its label over the box and button, which wrap on a phone. */
.ar-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0.75rem 0;
}
.ar-search label {
  flex-basis: 100%;
  font-weight: 600;
}
.ar-search input {
  flex: 1 1 14rem;
  min-width: 0;
}
.ar-found .ar-lines {
  padding: 0;
}
@media (max-width: 560px) {
  .overview-list li {
    flex-wrap: wrap;
  }
  /* Picked dates open on a row of their own under the chips, inside the
     screen: the Dashboard's and All Referrals' alike. */
  .dash-ranges .dash-custom[open] {
    flex-basis: 100%;
    text-align: center;
  }
  .dash-ranges .dash-custom-form {
    position: static;
    transform: none;
    flex-wrap: wrap;
    margin-top: 0.4rem;
  }
  .dash-ranges .dash-custom-form input {
    flex: 1 1 8rem;
    min-width: 0;
  }
}
/* /referrals: the switches under the search, on one line where they
   fit, and each referral's Retention # with its Copy Retention Number and Continue Recording Sale. */
.referral-switches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0.25rem 0 0.5rem;
}
.referral-switches label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
}
.referral-switches input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}
.referral-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
}
.referral-quote .link-button,
.referral-quote button {
  margin: 0;
}
/* The name box and the dealership box stacked, "and/or" between, so
   one Search the height of both reads as searching by either. */
.referral-search-boxes {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.referral-and-or {
  color: var(--muted-text);
  font-size: 0.85rem;
  text-align: center;
}
/* The dealer's rep under the dealership, not wrapped after it. */
.referral-contact {
  display: block;
}
/* Retention #, Copy and Continue on the columns of the line above, so
   Continue sits under the date and quote it carries on. */
@media (min-width: 560px) {
  .referral-quote {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  }
  .referral-quote .copy-retention {
    grid-column: 2;
    justify-self: start;
  }
  .referral-quote .link-button {
    grid-column: 3;
    justify-self: start;
  }
}
@media (min-width: 760px) {
  .referral-quote {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- Admin (/admin) ---- */
/* A pasted list reads from its left edge, in a centred box too. */
.selfservice-staff-box textarea {
  text-align: left;
}

/* A pick in a table's row fills its column, and the rest of its line once the table folds. */
.road-table select {
  width: 100%;
  min-width: 16rem;
  font-size: 1rem;
  text-align: left;
  text-align-last: auto;
}

/* Each line a preview leaves out, and why, under the rows it would have joined. */
.selfservice-staff-box .calls-problem {
  margin: 0.5rem 0 0;
}

/* A field's hint sits under it at the form's own gap, its buttons just under that. */
.selfservice-staff-box .question-hint {
  margin: 0;
}

.question-hint + .selfservice-buttons {
  margin-top: 0.5rem;
}

/* The filters over a list share its width, a line each on a phone. */
.referral-switches label:has(select) {
  flex: 1 1 12rem;
}

/* A line under a table cell's value says more of it, never as its heading. */
.road-table .call-about {
  font-weight: 400;
}

/* A person a row, a list's rows rather than a form's boxes; the pick sits
   level with its words, and Clear at the row's end. */
.selfservice-section .attendance-group .call-row {
  margin-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.attendance-group .call-actions label {
  margin: 0;
}

.attendance-group .call-actions :is(select, input) {
  flex: 0 1 16rem;
  min-width: 0;
}

.attendance-group .call-actions .btn-warn {
  margin-left: auto;
}

/* ---- Dropdowns ---- */
/* Chrome's customizable select, so an open list is the portal's own at
   its text size, where Chrome's own draws it at the box's 1.25rem.
   Safari and an older Edge keep theirs. A multiple or sized select is a
   list on the page, left native. */
@supports (appearance: base-select) {
  select:not([multiple], [size]),
  ::picker(select) {
    appearance: base-select;
  }

  /* The closed box as Chrome's own draws it: the value in regular
     weight on one line, centred top to bottom. */
  select:not([multiple], [size]) {
    position: relative;
    font-weight: normal;
    white-space: nowrap;
    cursor: default;
  }

  /* Chrome's own room inside every select's 1rem padding: 4px before the
     value, 12px for the arrow. Record's fixed Agent has no arrow
     (appearance: none), so keeps its plain box. */
  select:not([multiple], [size], :disabled) {
    padding-inline: calc(1rem + 4px) calc(1rem + 12px);
    line-height: normal;
    align-content: center;
    align-items: center;
  }

  /* Chrome's own chevron, where it drew it, in the text's colour. */
  select:not([multiple], [size])::picker-icon {
    content: "";
    position: absolute;
    inset-inline-end: 2px;
    top: 50%;
    width: 10px;
    height: 6px;
    translate: 0 -50%;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1.2 1.2 5 5l3.8-3.8' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  /* The field's width, scrolling past about eight rows; under the box
     wherever it fits, so it covers what comes after rather than before.
     A row reads from its left edge in a centred form too. */
  ::picker(select) {
    inline-size: anchor-size(self-inline);
    max-block-size: min(20rem, 50dvh);
    position-try-order: normal;
    overflow-y: auto;
    text-align: start;
    text-align-last: auto;
    margin-block: 2px;
    padding: 0.25rem 0;
    font-size: 1rem;
    line-height: 1.3;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  select:not([multiple], [size]) option {
    padding: 0.45rem 0.75rem;
    white-space: normal;
  }

  /* The tab strip's colours rather than a tick: the pick as the current
     tab, the row the keys are on or the pointer is over as a tab hovered,
     the keys' row giving way to the pick, which the list opens on. A
     blank pick is no pick. */
  select:not([multiple], [size]) option::checkmark {
    display: none;
  }

  select:not([multiple], [size]) option:focus-visible {
    background: var(--lime);
    color: var(--deep-navy);
  }

  select:not([multiple], [size]) option:checked:where(:not(:empty)) {
    background: var(--primary);
    color: var(--on-primary);
  }

  select:not([multiple], [size]) option:hover {
    background: var(--lime);
    color: var(--deep-navy);
  }
}

/* A text box's own list (type_ahead.js), the open select's above in
   every browser: the box's width, scrolling past about eight rows, under
   the box or over it where only that has room (--room, the script's).
   Fixed on the page, so a card or a table's scroll never clips it; over
   the banners and page controls (1050), under a sheet over the page (1100). */
.type-ahead-list {
  position: fixed;
  z-index: 1060;
  max-block-size: min(20rem, 50dvh, var(--room, 100dvh));
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: start;
  margin-block: 2px;
  padding: 0.25rem 0;
  font-size: 1rem;
  line-height: 1.3;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.type-ahead-list [role="option"] {
  padding: 0.45rem 0.75rem;
  overflow-wrap: anywhere;
  cursor: default;
}

/* The select's colours: the keys' row and the pointer's lime, the name
   in the box --primary, the keys' row giving way to it. */
.type-ahead-list [aria-selected="true"] {
  background: var(--lime);
  color: var(--deep-navy);
}

.type-ahead-list .picked {
  background: var(--primary);
  color: var(--on-primary);
}

.type-ahead-list [role="option"]:hover {
  background: var(--lime);
  color: var(--deep-navy);
}

/* The portal's log: a long line wraps rather than widening the page. */
.portal-log-line { display: block; }
.portal-log-line .relay-text { white-space: normal; overflow-wrap: anywhere; }
.portal-log-at { display: block; font-size: 0.85em; opacity: 0.75; }
.portal-log-line.is-serious .portal-log-at { font-weight: 700; opacity: 1; }
/* The way into the portal log, worded and weighted as the Jobs page's own link to it. */
.checks-log-link { display: block; width: fit-content; margin-top: 0.3rem; font-size: 0.875rem; font-weight: 700; }

/* This Computer: what the portal sees, a name and its answer a row. */
.computer-facts {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.4rem 1rem;
  margin: 0;
}

.computer-facts dt {
  color: var(--muted-text);
}

.computer-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Self Service > Settings, laid out as Record: a list or table typed
   whole keeps its lines' own left edge and grows to them; a hint sits
   tight under its field; the grid's rows read from the left. */
/* A fieldset grows to its widest child unless told: the grid scrolls inside its box instead. */
#settings-form fieldset {
  min-width: 0;
}

/* Off, watch and on stay one row, as a phone has room for. */
#settings-form .settings-modes {
  flex-wrap: nowrap;
}

#settings-form .settings-modes .rep-pill {
  flex: 1 1 0;
  min-width: 0;
  max-width: 10rem;
}

#settings-form textarea {
  height: auto;
  line-height: 1.4;
  padding: 0.75rem 1rem;
  text-align: left;
}

#settings-form .ticket-detail {
  margin: 0.4rem 0 0;
}

/* Fields side by side keep their boxes level, a label that wraps taking the room above its own. */
#settings-form .field-row .field {
  display: flex;
  flex-direction: column;
}

#settings-form .field-row .field > label {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Every label wraps, never cut short, however narrow its field. */
#settings-form label {
  overflow-wrap: anywhere;
  white-space: normal;
}

/* A long line or list wraps in its box, centred as Record's fields are, and grows to it. */
#settings-form textarea.settings-wrap {
  min-height: 3.5rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  text-align: center;
  resize: none;
  overflow: hidden;
}

/* The grid of pages by departments: tight enough for every department to
   fit a laptop's box, the page names held at the left as it scrolls on a phone. */
.settings-grid th,
.settings-grid td {
  padding: 0.45rem 0.35rem;
}

.settings-grid thead th {
  font-size: 0.85rem;
}

.settings-grid abbr {
  text-decoration: none;
}

.settings-grid th[scope="row"] {
  min-width: 9rem;
  font-weight: 600;
  position: sticky;
  left: 0;
  background: var(--secondary-background);
}

#recent-changes .call-row p {
  margin: 0.25rem 0;
}

/* A Settings page drawn a step at a time: Back and the trail over each
   step, the step said, the categories and choices as the Jobs page's
   cards, an item list a link a line, and the line as it stands now over
   its field. */
.settings-steps {
  max-width: 60rem;
  margin: 0 auto;
}

.settings-back {
  margin: 0 0 0.35rem;
  font-weight: 700;
  text-align: left;
}

.settings-back a,
.settings-back a:visited {
  color: var(--primary-text);
  text-decoration: none;
}

.settings-back a:hover,
.settings-back a:focus-visible {
  text-decoration: underline;
}

.settings-step {
  margin: 0.25rem 0 0.75rem;
  font-size: 1.2rem;
  color: var(--primary-text);
  text-align: left;
}

.settings-find {
  margin: 0 0 1rem;
}

.settings-steps .checks-cards {
  margin-bottom: 1rem;
}

.settings-choices-heading {
  margin: 1rem 0 0.5rem;
}

/* A line's value on its card, cut to three lines; step 4 shows it whole. */
.settings-choices .settings-value {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.settings-value {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.settings-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.settings-steps-list li {
  padding: 0.6rem 0.25rem;
  border-bottom: 1px solid var(--input-border);
  overflow-wrap: anywhere;
}

.settings-steps-list li:last-child {
  border-bottom: none;
}

.settings-steps-list a,
.settings-steps-list a:visited {
  color: var(--primary-text);
  font-weight: 600;
  text-decoration: none;
}

.settings-steps-list a:hover,
.settings-steps-list a:focus-visible {
  text-decoration: underline;
}

.settings-steps-list .ticket-detail {
  display: block;
  margin: 0.15rem 0 0;
}

.settings-now {
  margin-bottom: 1rem;
}

.settings-now > label,
.settings-tile > label {
  display: block;
  font-weight: 600;
  color: var(--primary-text);
}

.settings-tile {
  margin: 1rem 0;
}

/* The tile drawn alone: as wide as a Dashboard box, never the whole card. */
.settings-tile .dash-tiles {
  max-width: 22rem;
  margin: 0.5rem auto 0;
}

/* An announcement (shared/_training_banner.html): the training strip's
   own band across the top, in the colour its kind says, its one or two
   lines as typed; a notice the pop-up Feedback opens in. */
.announcement-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.announcement-banner-text {
  flex: 1;
  min-width: 0;
}

/* The ×, as the sale banner's; a gap as wide before the text keeps it centred. */
.announcement-banner:has(.announcement-hide)::before {
  content: "";
  flex: none;
  width: 2rem;
}

.announcement-hide {
  margin: 0;
}

.announcement-alert {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.announcement-urgent {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
}

.announcement-celebration {
  background: var(--status-good-bg);
  color: var(--status-good-text);
}

/* An urgent notice: the pop-up in an urgent alert's red. */
.announcement-urgent-notice {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
  border-color: currentColor;
}

.announcement-urgent-notice .page-key-head h2,
.announcement-urgent-notice .page-key-close {
  color: inherit;
}

.announcement-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-size: 1.15rem;
}

/* The route reminder's two answers, side by side under its words. */
.route-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1rem 0 0;
}

/* The link and the button the same height, each one's word centred. */
.route-reminder-actions > * {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

/* Who sees an announcement, and who is in a staff promotion: three to a
   row, an announcement's Everyone across the bottom; on a phone, two to a
   row, packed so Administration fits. */
:is(#announce-form, #staff-promotions-form) .announce-who {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

:is(#announce-form, #staff-promotions-form) .announce-who .rep-pill {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
}

:is(#announce-form, #staff-promotions-form) .announce-who [data-everyone] {
  grid-column: 1 / -1;
}

@media (max-width: 36rem) {
  :is(#announce-form, #staff-promotions-form) .announce-who {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  :is(#announce-form, #staff-promotions-form) .announce-who .rep-pill {
    padding-inline: 0.25rem;
    font-size: 0.9rem;
  }
}

#announce-form textarea.announce-text {
  height: auto;
  min-height: 5.5rem;
  line-height: 1.5;
  padding: 0.75rem 1rem;
}

/* Admin > Office Log: a view's search as a row of picks that wraps, one to a line on a phone. */
main.office-log-main {
  max-width: 1180px;
}

/* Admin's Dealers reads as Self Service's pages do: its rows and forms left-aligned, at their width. */
main.dealers-main {
  max-width: 1300px;
  text-align: left;
}
.checkin-body main.dealers-main .checkin-form input,
.checkin-body main.dealers-main .checkin-form select {
  text-align: left;
  text-align-last: auto;
}

/* Its search's fieldset is the box, so its legend sits in the one border
   (Lead Sales' too). */
.box.office-log-search {
  border: 0;
  padding: 0;
}

.office-log-search > fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 1rem 1rem;
  border: 1px solid var(--primary-text);
  border-radius: 4px;
}

.office-log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.office-log-filters .field {
  flex: 1 1 11rem;
  min-width: 0;
}

.office-log-filters .field[hidden] {
  display: none;
}

.office-log-filters :is(select, input) {
  width: 100%;
}

.office-log-since {
  margin: 0 0 0.6rem;
}

/* A test entry removed reads apart from the lines that count, its Put Back beside it. */
.office-log-lines tr.office-log-removed > td:not(.office-log-actions) {
  color: var(--muted-text);
  text-decoration: line-through;
}

.office-log-lines td.office-log-actions {
  white-space: nowrap;
}

@container (max-width: 36rem) {
  .office-log-lines td.office-log-actions {
    white-space: normal;
  }

  /* Folded, a cell with nothing in it (no referral matched, nobody helped yet) is left out, not a bare label. */
  .office-log-lines td[data-label]:empty {
    display: none;
  }
}

.office-log-lines tr.office-log-box-row > td {
  padding: 0.4rem 0 0.8rem;
}

.office-log-older .btn-secondary {
  margin-left: 0.4rem;
}

/* The bar a search is narrowed to, under its picks, with its Clear. */
.office-log-narrowed {
  margin: 0.6rem 0 0;
}

/* Possible Test Entries' tick, on a line of its own under the filters. */
.office-log-tests {
  margin: 0.6rem 0 0;
}

.office-log-narrowed .btn-secondary {
  margin-left: 0.4rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
}

/* The charts under a search: the Dashboard's bars, columns and its chart
   blue, which lightens in dark (--primary stays navy); a bar narrows the
   search to it, so it answers the pointer. */
.office-log-charts {
  min-width: 0;
}

.office-log-chart-grid {
  margin-top: 0.6rem;
}

.office-log-chart {
  min-width: 0;
  margin-bottom: 1.2rem;
}

.office-log-chart .dash-bar-fill,
.office-log-chart .dash-trend-bar {
  background: var(--chart-blue);
}

.office-log-chart .dash-bar {
  background: var(--secondary-background);
}

.office-log-chart .office-log-pickable {
  cursor: pointer;
}

.office-log-chart li.office-log-pickable:hover .dash-bar-fill,
.office-log-chart .office-log-pickable:focus-within .dash-bar-fill {
  filter: brightness(1.15);
}

.office-log-chart button.dash-bar-name {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--primary-text);
  font: inherit;
  font-weight: 400;
  text-align: right;
}

/* A dealership's shares on a line of their own under its bar, wrapping on a phone. */
.office-log-bar-words {
  grid-column: 2 / -1;
  margin: -0.1rem 0 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-text);
  line-height: 1.6;
}

/* A phone has no room for a long dealership beside its bar: its name and count on one line, the bar under them,
   its shares under that. */
@media (max-width: 560px) {
  .office-log-chart .dash-bar-row.office-log-worded {
    grid-template-columns: 1fr auto;
  }

  .office-log-chart .dash-bar-row.office-log-worded > .dash-bar-name {
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .office-log-chart .dash-bar-row.office-log-worded > .dash-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .office-log-chart .dash-bar-row.office-log-worded > .dash-bar-value {
    grid-column: 2;
    grid-row: 1;
  }

  .office-log-bar-words {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* A column a button: the Dashboard's slot, with nothing of a button's own. */
.office-log-chart button.dash-trend-slot {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
}

.office-log-chart button.dash-trend-slot:hover .dash-trend-bar,
.office-log-chart button.dash-trend-slot:focus-visible .dash-trend-bar {
  filter: brightness(1.15);
}

.office-log-chart button.dash-trend-slot:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: 1px;
}

.office-log-columns .dash-trend {
  padding-top: 1.1rem;
}

/* Each column no wider than a bar should be, centred in its slot, the rest air. */
.office-log-columns .dash-trend-slot {
  justify-content: center;
}

.office-log-columns .dash-trend-bar {
  position: relative;
  max-width: 1.75rem;
}

/* A column's count on its cap. */
.office-log-cap {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted-text);
  white-space: nowrap;
  pointer-events: none;
}

.office-log-columns .dash-axis span {
  white-space: nowrap;
  overflow: visible;
}

/* A whole in its parts: the ring beside its legend, under it on a phone. */
.office-log-donut {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.4rem;
}

.office-log-ring {
  flex: none;
  width: 9.5rem;
  height: 9.5rem;
}

.office-log-slice {
  fill: none;
  stroke-width: 15;
  cursor: pointer;
}

.office-log-ring:has(.office-log-slice:hover) .office-log-slice:not(:hover) {
  opacity: 0.45;
}

.office-log-ring-total {
  fill: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.office-log-ring-noun {
  fill: var(--muted-text);
  font-size: 8px;
}

.office-log-legend {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.office-log-legend-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.2rem 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  text-align: left;
}

.office-log-legend-line:hover .office-log-legend-name,
.office-log-legend-line:focus-visible .office-log-legend-name {
  text-decoration: underline;
}

.office-log-legend-line .dash-swatch {
  flex: none;
  margin-right: 0;
}

.office-log-legend-name {
  flex: 1 1 auto;
  min-width: 0;
}

.office-log-legend-line b {
  font-variant-numeric: tabular-nums;
}

/* How a hand-off ended, a hue each in both themes, the same in the ring, its legend and a bar. */
.office-log-tone-sold { stroke: var(--chart-green); background: var(--chart-green); }
.office-log-tone-accepted { stroke: var(--chart-blue); background: var(--chart-blue); }
.office-log-tone-callback { stroke: var(--grid-second); background: var(--grid-second); }
.office-log-tone-dropped { stroke: var(--grid-third); background: var(--grid-third); }
.office-log-tone-untaken { stroke: var(--neutral-dot); background: var(--neutral-dot); }
.office-log-chart .dash-bar-fill.office-log-tone-sold { background: var(--chart-green); }
.office-log-chart .dash-bar-fill.office-log-tone-callback { background: var(--grid-second); }
.office-log-chart .dash-bar-fill.office-log-tone-dropped { background: var(--grid-third); }
.office-log-chart .dash-bar-fill.office-log-tone-untaken { background: var(--neutral-dot); }

.office-log-chart-note {
  margin: 0.3rem 0 0;
}

/* The Dealership Overview: a frequency picked and saved on its own row, the box a list is pasted into, and the next visit's due label. */
.visit-frequency-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.visit-frequency-paste textarea {
  width: 100%;
  margin-bottom: 0.5rem;
}

.visit-due {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.visit-due-overdue {
  background: var(--status-bad-bg);
  color: var(--status-bad-text);
}

.visit-due-due {
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

/* On a phone each dealership is its own block, every field labelled, so Next Visit is never scrolled out of sight. */
@media (max-width: 600px) {
  .visit-frequency-table thead {
    display: none;
  }

  .visit-frequency-table tr {
    display: block;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--row-rule);
  }

  .visit-frequency-table td {
    display: block;
    border-bottom: 0;
    padding: 0.15rem 0.25rem;
  }

  .visit-frequency-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted-text);
  }

  .visit-frequency-name {
    font-weight: 700;
  }
}

/* Edit Layout (dashboard_edit.js): the Overview arranged where it is drawn. A held tile sinks a little while the
   hold counts. */
[data-overview-edit] .dash-tile {
  -webkit-touch-callout: none;
}

.dash-edit-holding {
  transform: scale(0.94);
  transition: transform 1.4s ease-in;
}

.dash-edit-layout[hidden] {
  display: none;
}

/* While editing, the row holding Edit Layout is the bar: Hide Numbers at its left, the editing controls at its
   right, kept in view as the page scrolls. */
.dash-tools-editing {
  position: sticky;
  top: 0;
  z-index: 900;
  justify-content: space-between;
  margin: -0.25rem -0.75rem 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--background);
  border-bottom: 2px solid var(--primary-text);
}

.dash-edit-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.dash-edit-controls button {
  margin: 0;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
}

.dash-edit-pick {
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.4rem 0.6rem;
  border-color: var(--primary-text);
  color: var(--primary-text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.dash-edit-pick:disabled {
  opacity: 0.5;
  cursor: default;
}

.dash-edit-pick option,
.dash-edit-pick optgroup {
  color: var(--text);
  font-weight: 400;
}

.dash-edit-pick optgroup {
  font-weight: 700;
}

.dash-edit-said {
  flex-basis: 100%;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--alert-red);
}

.dash-edit-said:empty {
  display: none;
}

/* At a phone's width the bar is a grid the width of the page: the lists across, then Default View, Cancel and
   Save. */
@media (max-width: 560px) {
  .dash-tools-editing {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dash-edit-controls {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  .dash-edit-pick {
    width: 100%;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.85rem;
  }

  .dash-edit-controls > .dash-edit-pick {
    grid-column: span 3;
  }

  .dash-edit-controls > .dash-edit-pick:only-of-type {
    grid-column: 1 / -1;
  }

  .dash-edit-controls button {
    grid-column: span 2;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .dash-edit-said {
    grid-column: 1 / -1;
    text-align: center;
  }
}

/* Editing: every tile is a block to drag, and says so by moving; with less motion asked for, a still dashed
   outline says it instead. */
.dash-editing [data-overview-edit] .dash-tile {
  touch-action: none;
  user-select: none;
  cursor: grab;
  animation: dash-edit-sway 1.1s ease-in-out infinite alternate;
}

/* Neighbours sway out of step, so the row breathes and doesn't rock as one. */
.dash-editing [data-overview-edit] .dash-tile:nth-child(3n + 2) {
  animation-duration: 1.3s;
  animation-delay: -0.4s;
}

.dash-editing [data-overview-edit] .dash-tile:nth-child(3n) {
  animation-duration: 1.2s;
  animation-delay: -0.8s;
}

@keyframes dash-edit-sway {
  from { transform: translateY(-1.5px) rotate(-0.45deg); }
  to { transform: translateY(1.5px) rotate(0.45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dash-editing [data-overview-edit] .dash-tile {
    animation: none;
    outline: 2px dashed var(--primary-text);
    outline-offset: 3px;
  }
}

/* A tile's link and i open nothing while editing, so its hover lift and its i go; its arrows take that corner. */
.dash-editing [data-overview-edit] .dash-tile:has(> .dash-tile-open:hover) {
  box-shadow: none;
}

.dash-editing [data-overview-edit] .dash-info {
  visibility: hidden;
}

/* A section keeps the page's own shape, its heading centred over its rows, on a soft panel that sets it apart
   from the next. The panel is painted around it and takes no room, so the tiles stay where the page has them.
   One of the Overview's own sections (Production, Sales by Agent) is edged as the page draws it. */
.dash-edit-section {
  --panel: color-mix(in srgb, var(--primary-text) 7%, transparent);
  margin: 0 0 1.9rem;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 0 0 0.6rem var(--panel);
  outline: 2px solid transparent;
  outline-offset: 0.6rem;
}

.dash-edit-section[data-section] {
  box-shadow: 0 0 0 0.6rem var(--panel), 0 0 0 calc(0.6rem + 1px) var(--input-border);
}

/* Over a section's tiles, what one of the Overview's own draws besides them; under them, its own Add Tile. */
.dash-edit-also {
  margin: 0 0 0.9rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-text);
}

.dash-edit-foot {
  display: flex;
  justify-content: center;
  margin-top: 0.6rem;
}

.dash-edit-add {
  min-width: 12rem;
}

/* Default View lays out the Overview as it is set up for the role: the bar's one red button, kept apart from
   Cancel and Save. */
@media (min-width: 561px) {
  .dash-edit-controls .dash-edit-default {
    margin-right: 0.5rem;
  }
}

/* The one being dragged is the one outlined. */
.dash-edit-section.dash-edit-moving,
.dash-edit-section.dash-edit-ghost {
  outline-color: var(--primary-text);
}

.dash-edit-head {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0 0.4rem;
}

.dash-edit-name {
  justify-self: center;
  width: 100%;
  max-width: 24rem;
  margin: 0;
  padding: 0.25rem 0.5rem;
  border-color: var(--input-border);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.dash-edit-name:hover,
.dash-edit-name:focus {
  border-color: var(--primary-text);
}

.dash-edit-grip {
  font-size: 1.2rem;
  text-align: center;
  color: var(--primary-text);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

/* The rows the Overview draws: each tile as wide as its row's share (--span of 12, dashboard_edit.js). */
@media (min-width: 561px) {
  .dash-tiles.dash-edit-tiles {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .dash-edit-tiles > .dash-tile {
    grid-column: span var(--span, 3);
  }
}

@media (max-width: 560px) {
  .dash-tiles.dash-edit-tiles .dash-tile:last-child {
    grid-column: auto;
  }
}

.dash-tiles.dash-edit-tiles {
  margin-bottom: 0;
}

.dash-edit-empty {
  display: none;
  margin: 0.25rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted-text);
}

.dash-edit-tiles:not(:has(> .dash-tile)) + .dash-edit-empty {
  display: block;
}

/* One of the Overview's own sections with no tile still holds its chart or table, which its line says. */
.dash-edit-section[data-section]:has(.dash-edit-also) .dash-edit-empty {
  display: none;
}

/* A tile's X on its left corner and its arrows on its right, clear of its figure; a section's beside its name. */
.dash-edit-off,
.dash-edit-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--surface);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.dash-edit-off {
  border: 2px solid var(--alert-red);
  color: var(--alert-red);
}

.dash-edit-move {
  border: 2px solid var(--primary-text);
  color: var(--primary-text);
}

.dash-edit-move:disabled {
  opacity: 0.3;
  cursor: default;
}

.dash-edit-off:focus-visible,
.dash-edit-move:focus-visible {
  outline: 3px solid var(--deep-navy);
  outline-offset: 2px;
}

.dash-edit-moves {
  display: inline-flex;
  gap: 0.25rem;
}

.dash-tile > .dash-edit-off {
  position: absolute;
  top: -0.65rem;
  left: -0.65rem;
  z-index: 2;
}

.dash-tile > .dash-edit-tile-moves {
  position: absolute;
  top: -0.65rem;
  right: -0.65rem;
  z-index: 2;
}

.dash-edit-new {
  border-style: dashed;
}

/* Where the dragged block will land, and the copy of it under the pointer. */
.dash-edit-moving {
  opacity: 0.3;
}

.dash-edit-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  margin: 0;
  pointer-events: none;
  opacity: 0.92;
  animation: none;
}

/* A section that already holds the dragged tile, and the copy under the pointer saying so. */
.dash-edit-section.dash-edit-refuses {
  outline-color: var(--alert-red);
}

.dash-edit-refused {
  border-color: var(--alert-red);
}

.dash-edit-refused::after {
  content: "Already in this section";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--alert-red);
}

/* A block taken off shrinks away; a tile added pops into its place. */
.dash-editing [data-overview-edit] .dash-tile.dash-edit-leaving,
.dash-edit-section.dash-edit-leaving {
  animation: dash-edit-leave 0.22s ease-in forwards;
  pointer-events: none;
}

.dash-editing [data-overview-edit] .dash-tile.dash-edit-arriving {
  animation: dash-edit-arrive 0.3s ease-out;
}

@keyframes dash-edit-leave {
  to { transform: scale(0.6); opacity: 0; }
}

@keyframes dash-edit-arrive {
  from { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .dash-editing [data-overview-edit] .dash-tile.dash-edit-leaving,
  .dash-edit-section.dash-edit-leaving,
  .dash-editing [data-overview-edit] .dash-tile.dash-edit-arriving {
    animation-duration: 0.01s;
  }
}

/* ---- The Employee Portal Jobs page ---- */
/* A lights-first grid of job cards, each opening in place to what needs a
   look, its figures and its last run, under the program's own checks. */
.jobs-body main {
  max-width: 1080px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.jobs-glyphs {
  position: absolute;
}
/* A light: a disc with a glyph, so its meaning never rests on colour alone. */
.light {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  color: var(--on-light);
}
.light svg { width: 0.72rem; height: 0.72rem; }
.light.sm { width: 0.9rem; height: 0.9rem; }
.light.sm svg { width: 0.6rem; height: 0.6rem; }
.light.good { background: var(--light-completed); }
.light.warn { background: var(--amber); color: var(--on-amber); }
.light.bad { background: var(--light-not-started); }
.light.off,
.light.note { background: var(--neutral-dot); }
.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-text);
}
.chip-version {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  white-space: nowrap;
}
.program-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.program-head h2 { margin: 0; font-size: 1.25rem; color: var(--primary-text); }
.program-head .chip-version { margin-left: auto; }
.program-where { margin: 0.35rem 0 0.9rem; }
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.5rem 1.25rem;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
  padding-block: 0.45rem;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
}
.check .light { margin-top: 0.15rem; }
/* A line with a meter takes the whole row, so the meter has room. */
.check.wide { grid-column: 1 / -1; }
.check.wide .meter { max-width: 34rem; }
.check-body { min-width: 0; flex: 1; }
.check-label { font-weight: 700; display: block; overflow-wrap: anywhere; }
.check-detail { display: block; font-size: 0.875rem; color: var(--muted-text); overflow-wrap: anywhere; }
.check.warn-row .check-label { color: var(--status-warn-text); }
.check-link { display: inline-block; margin-top: 0.3rem; font-size: 0.875rem; font-weight: 700; }
/* How to fix it: plain numbered steps behind a dropdown, only on a failing check. */
.fix { margin-top: 0.4rem; font-size: 0.875rem; }
.fix summary { cursor: pointer; font-weight: 700; color: var(--primary-text); width: fit-content; }
.fix-steps { margin: 0.4rem 0 0.2rem; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
/* A thin meter: memory against what it may hold, the disk against its size. */
.meter { margin-top: 0.4rem; }
.meter-bar { display: flex; gap: 2px; height: 8px; }
.meter-bar span { min-width: 2px; }
.meter-bar span:first-child { border-radius: 4px 0 0 4px; }
.meter-bar span:last-child { border-radius: 0 4px 4px 0; }
.meter-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted-text);
}
.key { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; overflow-wrap: anywhere; }
.swatch { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.key strong { color: var(--text); font-weight: 700; }
.seg-own { background: var(--seg-own); }
.seg-others { background: var(--seg-others); }
.seg-wait { background: var(--seg-wait); }
.seg-room { background: var(--seg-room); }
/* The count strip, which also filters the grid, and the legend. */
.jobs-section { margin-bottom: 1.25rem; }
.jobs-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.counts { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.count {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.count[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.count:hover { border-color: var(--primary-text); }
.jobs-tools .btn-secondary { padding: 0.45rem 1rem; border-radius: 4px; font-weight: 700; cursor: pointer; }
.as-of { margin: 0.6rem 0 0; font-size: 0.875rem; color: var(--muted-text); }
.legend {
  list-style: none;
  margin: 0.75rem 0 1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.35rem 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-text);
}
.legend li { display: flex; align-items: flex-start; gap: 0.5rem; }
.legend .light { margin-top: 0.12rem; }
.legend strong { color: var(--text); }
/* The grid of job cards; Show Every Line makes it one column. */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.75rem;
  align-items: start;
}
.job-grid.every { grid-template-columns: minmax(0, 1fr); }
.job {
  background: var(--secondary-background);
  border-radius: 6px;
  container-type: inline-size;
  min-width: 0;
}
.job[data-state="bad"] { background: var(--status-bad-bg); }
.job-h { margin: 0; font-size: inherit; font-weight: inherit; }
.job-head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.65rem;
  row-gap: 0.2rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.job-head:hover { box-shadow: inset 0 0 0 2px var(--primary-text); }
.job-head .light { grid-column: 1; grid-row: 1; }
.job-name { grid-column: 2; grid-row: 1; font-weight: 700; color: var(--primary-text); overflow-wrap: anywhere; }
.job-when {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted-text);
  white-space: nowrap;
}
.job-line { grid-column: 2; grid-row: 2; font-size: 0.875rem; overflow-wrap: anywhere; }
.job[data-state="warn"] .job-line,
.job[data-state="bad"] .job-line { font-weight: 700; }
.job[data-state="warn"] .job-line { color: var(--status-warn-text); }
.job[data-state="bad"] .job-line { color: var(--status-bad-text); }
.job[data-state="off"] .job-line { color: var(--muted-text); }
/* Side by side, each headline keeps two lines' room so a row's cards end level. */
@media (min-width: 40rem) {
  .job-grid:not(.every) .job-line { min-height: 2.9em; }
}
.chev { grid-column: 3; grid-row: 2; justify-self: end; width: 1rem; height: 1rem; color: var(--muted-text); }
.job-head[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: no-preference) {
  .chev, .stat-chev { transition: transform 0.15s ease; }
}
/* An open card: the left column says what happened, the right how its run went. */
.job-detail { padding: 0 1rem 1rem; display: grid; gap: 1rem; }
.job-detail > div { display: grid; gap: 1rem; align-content: start; min-width: 0; }
@container (min-width: 40rem) {
  .job-detail { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
.job-detail .block { display: grid; gap: 0.45rem; min-width: 0; }
.look {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  background: var(--status-warn-bg);
  display: grid;
  gap: 0.55rem;
}
.look.bad { background: var(--surface); }
.look li { display: flex; gap: 0.55rem; align-items: flex-start; }
.look li > span { min-width: 0; }
.look .light { margin-top: 0.15rem; }
.look-text { font-weight: 700; color: var(--status-warn-text); overflow-wrap: anywhere; }
.look.bad .look-text { color: var(--status-bad-text); }
.look-todo { display: block; font-size: 0.875rem; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.job-detail .prose { margin: 0; font-size: 0.875rem; overflow-wrap: anywhere; }
/* A job card's one button, what the card says of the job's run, and what Employee Portal Jobs answered beside it. */
.run-now { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.run-now-note { margin: 0; font-size: 0.875rem; color: var(--text); overflow-wrap: anywhere; }
.run-now-said { margin: 0; font-size: 0.875rem; color: var(--muted-text); overflow-wrap: anywhere; }
.run-now-said:empty { display: none; }
.run-now-said.bad { color: var(--status-bad-text); }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.25rem), 1fr));
  gap: 0.45rem;
}
.stat {
  background: var(--surface);
  border-radius: 4px;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.stat-label { font-size: 0.78rem; color: var(--muted-text); line-height: 1.3; overflow-wrap: anywhere; }
.stat-value { font-size: 1.25rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.stat-of { font-size: 0.875rem; font-weight: 500; color: var(--muted-text); }
.stat.warn { background: var(--status-warn-bg); }
.stat.warn .stat-value, .stat.warn .stat-label { color: var(--status-warn-text); }
.stat.bad { background: var(--status-bad-bg); box-shadow: inset 0 0 0 1px var(--light-not-started); }
.stat.bad .stat-value, .stat.bad .stat-label { color: var(--status-bad-text); }
/* A figure with rows behind it: a ring, a chevron and a dotted underline set it apart from a plain tile. */
button.stat {
  position: relative;
  width: 100%;
  border: 0;
  padding-right: 1.7rem;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--input-border);
}
button.stat .stat-value { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
button.stat:hover, button.stat[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--primary-text); }
.stat-chev { position: absolute; top: 0.45rem; right: 0.4rem; width: 1rem; height: 1rem; color: var(--primary-text); }
button.stat[aria-expanded="true"] .stat-chev { transform: rotate(180deg); }
/* The rows behind a figure, under the tiles: a table that scrolls in its own box rather than past the card,
   stacked rows once the drawer is narrow; every cell wraps a long name or id. */
.behind {
  position: relative;
  container-type: inline-size;
  background: var(--surface);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--input-border);
  padding: 0.65rem 0.8rem 0.7rem;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}
.behind > * { min-width: 0; }
.behind-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.behind-title { margin: 0; min-width: 0; font-size: 0.875rem; font-weight: 700; color: var(--primary-text);
  overflow-wrap: anywhere; }
.behind-close {
  flex: none;
  padding: 0.1rem 0.2rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.behind-note, .behind-more { margin: 0; font-size: 0.875rem; color: var(--muted-text); overflow-wrap: anywhere; }
.evidence-box { overflow-x: auto; }
.evidence { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.evidence th, .evidence td { overflow-wrap: anywhere; }
.evidence th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-text);
  padding: 0 0.75rem 0.3rem 0;
}
.evidence td {
  padding: 0.35rem 0.75rem 0.35rem 0;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
  vertical-align: top;
}
.evidence th:last-child, .evidence td:last-child { padding-right: 0; }
.evidence .id { font-weight: 700; font-variant-numeric: tabular-nums; }
.evidence .when { color: var(--muted-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.evidence .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.evidence tr.quiet td { color: var(--muted-text); }
@container (max-width: 30rem) {
  .evidence thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .evidence, .evidence tbody { display: block; }
  .evidence tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.1rem 0.6rem;
    padding-block: 0.4rem;
    border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
  }
  .evidence tbody tr:first-child { border-top: 0; }
  .evidence td { display: block; min-width: 0; padding: 0; border: 0; }
  .evidence td.why { flex-basis: 100%; }
  .evidence td[data-pre]::before { content: attr(data-pre) " "; color: var(--muted-text); font-weight: 500; }
  .evidence td[data-post]::after { content: " " attr(data-post); color: var(--muted-text); font-weight: 500; }
}
/* The job's own lines from the Portal Log, newest first, on a problem card. */
.log-lines {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  background: var(--surface);
}
.log-lines li {
  display: grid;
  gap: 0.1rem;
  padding-block: 0.4rem;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
}
.log-lines li:first-child { border-top: 0; }
.log-at { font-size: 0.78rem; color: var(--muted-text); font-variant-numeric: tabular-nums; }
.log-at.serious { font-weight: 700; color: var(--status-bad-text); }
.log-text { overflow-wrap: anywhere; }
.log-note { margin: 0.4rem 0 0; font-size: 0.78rem; color: var(--muted-text); }
.log-note a { font-weight: 700; }
.facts { margin: 0; display: grid; }
.facts > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-block: 0.4rem;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
  font-size: 0.875rem;
}
.facts > div:first-child { border-top: 0; }
/* A detail's light beside its label, grey for information only; an amber or red row's label takes its colour. */
.facts dt { display: flex; align-items: flex-start; gap: 0.45rem; min-width: 0; font-weight: 700;
  color: var(--muted-text); overflow-wrap: anywhere; }
.facts dt .light { margin-top: 0.1rem; }
.facts > div.warn dt { color: var(--status-warn-text); }
.facts > div.bad dt { color: var(--status-bad-text); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* The raw error a detail puts plainly, behind Show Error. */
.fact-error {
  margin: 0.4rem 0 0.1rem;
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  background: var(--surface);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@container (max-width: 22rem) {
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0.05rem; }
}
.off-note { margin: 0; font-size: 0.875rem; max-width: 60ch; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; }
.timeline li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.5rem;
  padding-block: 0.3rem;
  border-top: 1px solid color-mix(in srgb, var(--primary-text) 14%, transparent);
}
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted-text); font-variant-numeric: tabular-nums; }
.timeline li > span { min-width: 0; overflow-wrap: anywhere; }
.list-more { justify-self: start; padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.875rem; cursor: pointer; }
/* The run bar. One scale per job: the longer of the run and its slot fills the width. */
.run {
  background: var(--surface);
  border-radius: 4px;
  padding: 0.7rem 0.8rem 0.75rem;
  display: grid;
  gap: 0.5rem;
}
.run > * { min-width: 0; }
.run-said { margin: 0; font-size: 0.875rem; font-weight: 700; overflow-wrap: anywhere; }
/* Time over the slot is amber only past its grace (.late); a little over is drawn plain. */
.run-said .over { color: var(--muted-text); }
.run.late .run-said .over { color: var(--status-warn-text); }
.run-chart { position: relative; padding-top: 1.15rem; }
.run-chart.has-over { padding-bottom: 1.6rem; }
.run-bar { display: flex; gap: 2px; height: 12px; }
.run-bar > span { min-width: 2px; }
.run-bar > .end { border-radius: 0 4px 4px 0; }
.slot-mark {
  position: absolute;
  top: 0.85rem;
  height: calc(12px + 0.3rem + 4px);
  width: 2px;
  margin-left: -1px;
  background: var(--text);
}
.slot-label {
  position: absolute;
  top: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  line-height: 1;
}
.over-bracket {
  position: absolute;
  top: calc(1.15rem + 12px + 4px);
  height: 6px;
  border: 2px solid var(--muted-text);
  border-top: 0;
  border-radius: 0 0 2px 2px;
}
.run.late .over-bracket { border-color: var(--warn-fill); }
.over-label {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted-text);
  white-space: nowrap;
  line-height: 1;
}
.run.late .over-label { color: var(--status-warn-text); }
.steps { display: grid; gap: 0.3rem; margin-top: 0.15rem; font-size: 0.875rem; }
.step { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.step-bar { height: 8px; background: var(--seg-room); border-radius: 0 4px 4px 0; }
.step-bar span { display: block; height: 100%; background: var(--seg-others); border-radius: 0 4px 4px 0; min-width: 2px; }
.step-secs { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.step > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.jobs-tip {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  background: var(--tip-background);
  color: var(--tip-text);
  font-size: 0.875rem;
  max-width: 16rem;
}
.jobs-tip strong { font-variant-numeric: tabular-nums; }
/* A topic page that folds its passing checks: its name and counts over the problems. */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.section-head h2 { margin: 0; font-size: 1.25rem; color: var(--primary-text); }
.section-sum { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.875rem; font-weight: 700; }
.checks-fold { margin-top: 0.75rem; }
.checks-fold > summary { cursor: pointer; font-weight: 700; color: var(--primary-text); width: fit-content; }
.checks-fold > .relay-notes { margin-top: 0.5rem; }
.checks-todo { display: block; margin-top: 0.2rem; font-size: 0.9rem; }

/* The Customer Profile (dashboard/_profile.html): each figure a fold of its
   own, its table in a box that scrolls sideways on a phone rather than the
   page, a value's months hidden until its name is opened. A source's name
   wraps under its column and cells sit closer, so nine sources fit the
   page's width. */
.dash-profile-group { margin-bottom: 0.8rem; }
.dash-profile {
  margin: 0 0 0.5rem;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--surface);
}
.dash-profile > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.dash-profile[open] > summary { border-bottom: 1px solid var(--hairline); }
.dash-profile > .dash-note { margin: 0.5rem 0.75rem; text-align: left; }
.dash-profile-name { font-weight: 700; color: var(--primary-text); }
.dash-profile-lead { color: var(--text); }
.dash-profile-lead small,
.dash-profile-table small { color: var(--muted-text); }
.dash-profile-scroll { overflow-x: auto; margin: 0 0.75rem 0.5rem; }
.dash-profile > .dash-rows-expand { margin: 0 0.75rem; }
/* A table's i opens its definition on a line of its own under its name. */
.dash-profile > summary > .dash-info-text { flex-basis: 100%; }
.dash-profile-book > .dash-note { margin: 0 0 0.5rem; text-align: left; }
.dash-profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.dash-profile-table th,
.dash-profile-table td {
  padding: 0.25rem 0.35rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--row-rule);
}
.dash-profile-table th[scope="row"],
.dash-profile-table thead th:first-child { text-align: left; font-weight: 400; }
.dash-profile-table thead th { font-weight: 600; color: var(--text); vertical-align: bottom; }
.dash-profile-table thead th:nth-child(n+4) { white-space: normal; }
.dash-profile-table tr.total th,
.dash-profile-table tr.total td { font-weight: 700; border-bottom: none; }
.dash-profile-open > summary { cursor: pointer; color: var(--primary-text); }
.dash-profile-month th[scope="row"] { padding-left: 1.6rem; color: var(--muted-text); }
.dash-profile-month { background: color-mix(in srgb, var(--secondary-background) 55%, transparent); }
.dash-profile-value:not(:has(.dash-profile-open[open])) .dash-profile-month,
.dash-profile-table tfoot:not(:has(.dash-profile-open[open])) .dash-profile-agent,
.dash-profile-table tbody:not(:has(.dash-profile-open[open])) .dash-profile-part,
.dash-profile-scroll:not(:has(+ .dash-rows-expand[open])) .dash-rows-held {
  display: none;
}
/* What Other holds, under a table whose sources are its columns. */
.dash-profile > .dash-profile-other { margin: 0 0.75rem 0.5rem; font-size: 0.85rem; text-align: left; }
.dash-profile-other > summary { cursor: pointer; color: var(--primary-text); }
.dash-profile-other ul { list-style: none; margin: 0.25rem 0 0; padding: 0 0 0 1.6rem; }
.dash-profile-other small { color: var(--muted-text); }
/* The book's charts by sale month: a block per source, its charts side by side and shorter than a figure's own. */
.dash-profile-trend-blocks { display: grid; gap: 0.75rem; margin: 0.4rem 0 0.25rem; }
.dash-profile-trend > b { display: block; color: var(--text); margin-bottom: 0.2rem; }
.dash-profile-trend-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem; }
.dash-profile-chart { margin: 0; min-width: 0; }
.dash-profile-chart figcaption { font-size: 0.75rem; color: var(--muted-text); margin-bottom: 0.15rem; }
.dash-profile-chart .dash-trend { height: 48px; }
.dash-profile-trends > .dash-note { margin: 0.25rem 0; text-align: left; }


/* ---- Record's Service page and Admin's Retention, drawn as the Dashboard's pages ----
   A section is one blue-tint bar that opens in place: its arrow, its
   name and one quiet line. What it holds sits white inside it, read from
   the left, a table's rows parted by hairlines. */
.service-section,
.service-find-card,
#section-retention .card {
  margin: 0 0 0.75rem;
  background: var(--secondary-background);
  border: 0;
  border-radius: 6px;
  text-align: left;
}

.service-section > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 0;
  border-radius: 6px;
  list-style: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--figure-text);
  cursor: pointer;
}

.service-section > summary::-webkit-details-marker {
  display: none;
}

/* The bar's arrow: right while shut, down once open. */
.service-section > summary::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin: 0 0.3rem 0 0.15rem;
  border-right: 2.4px solid var(--figure-text);
  border-bottom: 2.4px solid var(--figure-text);
  transform: rotate(-45deg);
}

.service-section[open] > summary::before {
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .service-section > summary::before {
    transition: transform 0.15s ease;
  }
}

.service-section > summary:hover {
  background: color-mix(in srgb, var(--secondary-background) 88%, var(--primary-text));
}

.service-section > summary:focus-visible {
  outline: 2px solid var(--primary-text);
  outline-offset: -2px;
}

.service-section .section-count {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
}

.service-section[open] {
  padding-bottom: 1.4rem;
}

.service-section > :not(summary) {
  margin-left: 1.4rem;
  margin-right: 1.4rem;
}

.service-section > .calls-summary {
  margin-top: 0.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
}

/* A row is a white card on the bar's tint, its customer the one strong line. */
.service-section .call-row,
.service-find-card .call-row {
  margin-top: 0.6rem;
  padding: 0.85rem 1.15rem;
  background: var(--surface);
  border: 0;
  border-radius: 6px;
}

.service-section .call-row.yours {
  box-shadow: inset 4px 0 0 var(--primary-text);
}

.service-section .lead-name,
.service-find-card .lead-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--figure-text);
}

.service-section > .card {
  background: var(--surface);
  border-radius: 6px;
}

/* A group inside a section (the rows done lately) is a white bar a size down, its rows on a faint tint. */
.service-section .call-group {
  margin-top: 0.75rem;
  background: var(--surface);
  border-radius: 6px;
}

.service-section .call-group > summary,
.service-section section.call-group > .call-group-title {
  padding: 0.85rem 1.15rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--figure-text);
}

/* A Call List standing's group (On the Phone, Next Try Later) is the same bar, always open. */
.service-section .call-group[open],
.service-section section.call-group {
  padding-bottom: 0.85rem;
}

/* Its rows take the bar's whole width, as wide as the rows above it, so their company, day and rep stand in the
   same columns as those rows' (a row's line is a grid of its own, sized by its width); their padding lines the
   customer up under the bar's name. */
.service-section .call-group > .call-row {
  margin-left: 0;
  margin-right: 0;
  background: color-mix(in srgb, var(--secondary-background) 45%, var(--surface));
}

/* The Walk-In reads as Record's form: its boxes on the bar's tint, every
   label and box centred, and its word that one is recorded over the form. */
.service-section .walk-in-record {
  text-align: center;
}

#walk-in-recorded {
  margin-top: 1rem;
}

/* Balanced, so a phone never leaves "in" alone after "walk-". */
#walk-in-recorded .transfer-status {
  text-wrap: balance;
}

#walk-in-edit {
  margin-top: 0.75rem;
}

/* The Walk-In's day while a walk-in is corrected, fixed as its Agent is: full strength, and no picker. */
#walk-in-form input:disabled {
  opacity: 1;
  background: var(--secondary-background);
  color: var(--text);
  cursor: default;
}

#walk-in-form input:disabled::-webkit-calendar-picker-indicator {
  display: none;
}

/* Find: a bar of its own over the sections, its name as theirs. */
.service-find-card {
  padding: 1.1rem 1.4rem 1.2rem;
}

.service-find-card .service-find {
  margin: 0;
}

.service-find-card .service-find label {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--figure-text);
}

/* Its box takes a line of its own sooner than cut its placeholder short. */
.service-find-card .service-find input[type="search"] {
  flex-basis: 15rem;
  height: 2.5rem;
  font-size: 1rem;
}

.service-find-card .service-find button {
  margin-top: 0;
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
}

/* Retention: each list's card is a bar too, its heading and count on one line from the left. */
#section-retention,
#section-retention > .dash-note {
  text-align: left;
}

#section-retention .card {
  padding: 1.1rem 1.4rem 1.4rem;
}

#section-retention .card.folded {
  padding-bottom: 1.1rem;
}

#section-retention .dash-card-head {
  justify-content: flex-start;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.75rem;
}

#section-retention .dash-card-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--figure-text);
  text-align: left;
}

#section-retention .retention-head-count {
  font-size: 0.95rem;
  color: var(--text);
}

#section-retention .retention-fold {
  font-size: 0.9rem;
  color: var(--figure-text);
}

#section-retention .card .dash-note,
#section-retention .card .dash-empty {
  font-size: 0.95rem;
  text-align: left;
}

#section-retention .card > .road-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 6px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

#section-retention .road-table th,
#section-retention .road-table td {
  padding: 0.65rem 1.15rem;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

#section-retention .road-table thead th {
  border-bottom-color: var(--input-border);
  font-weight: 800;
  color: var(--primary-text);
}

#section-retention .road-table th.hr-count,
#section-retention .road-table td.hr-count {
  text-align: right;
}

#section-retention .retention-glance-list {
  font-weight: 800;
  text-decoration: none;
}

#section-retention .retention-glance-list:hover {
  text-decoration: underline;
}

/* A day's Yes and No off that day: shut to the rep, and plainly so. */
.followup-row .followup-mark button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}