/*
 * The app host (app/views/layouts/dashboard.html.erb): the customer dashboard.
 * The header (the brand plate and the account menu), the sections nav (a sidebar from
 * 900px, a Menu top bar under it), main, cards and table wraps, on the tokens of
 * tokens.css, so light and dark follow the device. Every rule is scoped under
 * body.dashboard, so the public, docs and activate pages never see one. Touch targets
 * are --button-height (48px). The two disclosures are <details> elements; script only adds the theme button, the
 * sidebar's Collapse and the search shortcut, each shipped hidden until its controller shows it.
 * Locked: Pattern 13 (docs/ai/BUG_PATTERNS_CATALOG.md), pinned by test/guards/dashboard_presentation_guard_test.rb.
 */

body.dashboard {
  display: flex;
  flex-direction: column;
}

body.dashboard > main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-4);
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
  padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
}

/* Header: the brand on the left (the secretag.co logo on its plate: .brand and .brand-logo in components.css, 56px
   tall and 72px from 900px), the account menu on the right. It is the positioning box of the account panel. */
body.dashboard .dashboard-header {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-4);
  padding-top: max(var(--space-1), env(safe-area-inset-top));
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

/* The logo never shrinks: the plate is the logo's width at --logo-height (56px * 336 / 120 = 156.8px) plus the plate's
   two --space-2 paddings, 172.8px under 900px. The account menu takes what is left of the row and gives way. */
body.dashboard .dashboard-header .brand {
  flex: none;
}

/* The account menu: the summary is the avatar alone (the signed-in email is its visually hidden text, so the
   disclosure keeps its name); its panel (the name, the email, the role, the pages and Log out) drops down under the
   header's right edge. At 375px the row holds 172.8 (the plate) + 12 + 48 (the theme button) + 12 + 48 (the avatar's
   target) = 292.8px of the 343px inside the header's paddings. */
body.dashboard .dashboard-account {
  flex: 0 1 auto;
  min-width: 0;
}

body.dashboard .dashboard-account-toggle,
body.dashboard .dashboard-menu-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

body.dashboard .dashboard-account-toggle::-webkit-details-marker,
body.dashboard .dashboard-menu-toggle::-webkit-details-marker {
  display: none;
}

/* A drawn caret on the Menu (borders in currentColor, so no icon file) that turns when the disclosure opens. */
body.dashboard .dashboard-menu-toggle::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

body.dashboard .dashboard-menu[open] > .dashboard-menu-toggle::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

body.dashboard .dashboard-menu[open] > .dashboard-menu-toggle {
  background: var(--surface);
}

/* The avatar's summary: a 48px round target around the 32px circle, no frame; open, it sits on the page ground. */
body.dashboard .dashboard-account-toggle {
  justify-content: center;
  min-width: var(--button-height);
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  background: none;
}

body.dashboard .dashboard-account[open] > .dashboard-account-toggle {
  background: var(--bg);
}

/* The theme button (System, Light, Dark): a 48px icon button between the search and the avatar, its label visually
   hidden and repeated as its title. */
body.dashboard .dashboard-theme-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--text);
  cursor: pointer;
}

@media (hover: hover) {
  body.dashboard .dashboard-theme-button:hover {
    background: var(--bg);
  }
}

body.dashboard .dashboard-theme-button .icon {
  width: 1.25em;
  height: 1.25em;
}

/* The avatar: a circle in the accent with the user's initial, drawn from data-initial so the summary's text stays the
   email; 32px in the summary, 40px at the head of the panel. aria-hidden in the layout: the email names the menu. */
body.dashboard .dashboard-avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
}

body.dashboard .dashboard-avatar::before {
  content: attr(data-initial);
}

body.dashboard .dashboard-avatar-large {
  width: 40px;
  height: 40px;
  font-size: var(--text-md);
}

/* The panel's head: the avatar, then the name, the email and the role badge (Company Administrator, Organization Administrator, Manager, Viewer or Reports user). */
body.dashboard .dashboard-account-head {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
}

body.dashboard .dashboard-account-who {
  min-width: 0;
}

body.dashboard .dashboard-account-who p {
  margin: 0;
}

body.dashboard .dashboard-account-name {
  font-weight: 700;
}

body.dashboard .dashboard-account-address {
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-account-who .dashboard-account-role {
  margin-top: var(--space-2);
}

body.dashboard .dashboard-role-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

body.dashboard .dashboard-account-panel {
  position: absolute;
  top: 100%;
  right: max(var(--space-4), env(safe-area-inset-right));
  z-index: 5;
  min-width: 200px;
  max-width: calc(100vw - 2 * var(--space-4));
  margin-top: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
}

body.dashboard .dashboard-log-out {
  margin: 0;
}

/* The account menu's pages (Your Profile, Settings, Security, and the admin pages): 48px links above Log out, a rule
   between them; the current page is marked as the sections nav marks it, by more than color. */
body.dashboard .dashboard-account-list {
  margin: 0 0 var(--space-2);
  padding: 0 0 var(--space-2);
  border-bottom: 1px solid var(--border);
  list-style: none;
}

body.dashboard .dashboard-account-link {
  display: flex;
  align-items: center;
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border-radius: var(--radius-input);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

@media (hover: hover) {
  body.dashboard .dashboard-account-link:hover {
    text-decoration: underline;
  }
}

body.dashboard .dashboard-account-link[aria-current="page"] {
  background: var(--surface);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* Settings: the read-only card stands apart from the form's Save button. */
body.dashboard .dashboard-settings-fixed {
  margin-top: var(--space-8);
}

/* Security: the session in use, named in words beside its device. */
body.dashboard .dashboard-this-device {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-input);
  background: var(--bg);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* Organizations: a row's Activate state in words beside the word Activate, the tag state chip's shape. Connected takes
   the --success left edge; Not connected the muted edge and muted text, as awaiting first ping. */
body.dashboard .dashboard-activate-chip {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

body.dashboard .dashboard-activate-chip-connected {
  border-left-color: var(--success);
}

body.dashboard .dashboard-activate-chip-not-connected {
  border-left-color: var(--border);
  color: var(--text-muted);
}

/* The header search (a linked account's pages): under 900px the header becomes a grid whose first row is the brand,
   then the theme button and the avatar at the right edge, and whose second row is the search across the whole width.
   From 900px the search sits between the brand and the two buttons on one row, at most 32rem wide. The box and its
   submit are 48px tall. */
body.dashboard .dashboard-header:has(> .dashboard-search) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "brand theme account"
    "search search search";
  row-gap: var(--space-2);
  padding-bottom: var(--space-2);
}

body.dashboard .dashboard-header:has(> .dashboard-search) > .brand {
  grid-area: brand;
}

body.dashboard .dashboard-header:has(> .dashboard-search) > .dashboard-theme-button {
  grid-area: theme;
  justify-self: end;
}

body.dashboard .dashboard-header:has(> .dashboard-search) > .dashboard-account {
  grid-area: account;
  justify-self: end;
  max-width: 100%;
}

body.dashboard .dashboard-search {
  grid-area: search;
  display: flex;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
}

body.dashboard .dashboard-search .dashboard-search-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--button-height);
  margin: 0;
}

body.dashboard .dashboard-search .dashboard-search-button {
  flex: none;
  min-height: var(--button-height);
  margin: 0;
}

/* The submit reads "Search" from 600px. Under 600px it is the search icon in a 48px square, the word visually hidden
   (still the button's name), so at 375px the box keeps 375 - 2 * 16 - 48 - 8 = 287px and its whole placeholder. */
body.dashboard .dashboard-search-button > .icon {
  display: none;
  width: 1.25em;
  height: 1.25em;
}

@media (max-width: 599.98px) {
  body.dashboard .dashboard-search .dashboard-search-button {
    justify-content: center;
    width: var(--button-height);
    min-width: var(--button-height);
    padding: 0;
  }

  body.dashboard .dashboard-search-button > .icon {
    display: block;
  }

  body.dashboard .dashboard-search-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (min-width: 900px) {
  body.dashboard .dashboard-header:has(> .dashboard-search) {
    grid-template-columns: auto minmax(14rem, 1fr) auto minmax(0, max-content);
    grid-template-areas: "brand search theme account";
    padding-bottom: var(--space-1);
  }

  body.dashboard .dashboard-search {
    justify-self: center;
    width: 100%;
    max-width: 32rem;
  }
}

/* Icons from the sprite (app/views/dashboard/_icons.html.erb): 1em in the text's color, Lucide's strokes. */
body.dashboard .icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The search box: the search icon inside its left edge, and from 900px the shortcut hint inside its right edge (hidden
   on a phone, where no key opens it). Neither takes a tap: the box is the target. */
body.dashboard .dashboard-search-box {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
}

body.dashboard .dashboard-search-box > .icon {
  position: absolute;
  left: var(--space-3);
  width: 1.25em;
  height: 1.25em;
  color: var(--text-muted);
  pointer-events: none;
}

body.dashboard .dashboard-search-box .dashboard-search-input {
  padding-left: calc(var(--space-3) + 1.25em + var(--space-2));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A box narrower than the placeholder ends it with the ellipsis glyph the browser draws, never a word cut short. */
body.dashboard .dashboard-search-box .dashboard-search-input::placeholder {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dashboard .dashboard-search-kbd {
  display: none;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-search-box .dashboard-search-input {
    padding-right: calc(var(--space-12) + var(--space-4));
  }

  body.dashboard .dashboard-search-kbd {
    position: absolute;
    right: var(--space-3);
    display: inline-block;
    padding: 2px var(--space-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    pointer-events: none;
  }
}

/* A button that reads as a link (Log out): a form control, so it stays a button. */
body.dashboard .dashboard-link-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--button-height);
  margin: 0;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-input);
  background: none;
  color: var(--accent);
  font-size: var(--text-md);
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

body.dashboard .dashboard-link-button:active {
  color: var(--accent-pressed);
}

/* The sections nav. Under 900px: a top bar under the header with the Menu disclosure; the list opens in the bar. */
body.dashboard .dashboard-sections {
  padding: var(--space-2) var(--space-4);
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

body.dashboard .dashboard-menu-toggle {
  display: inline-flex;
}

body.dashboard .dashboard-section-list {
  margin: 0;
  padding: var(--space-2) 0 0;
  list-style: none;
}

body.dashboard .dashboard-section-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border-radius: var(--radius-input);
  color: var(--text);
  text-decoration: none;
}

/* The section's icon from the sprite (app/views/dashboard/_icons.html.erb), 20px beside a 16px label. */
body.dashboard .dashboard-section-link .icon {
  width: 1.25em;
  height: 1.25em;
}

@media (hover: hover) {
  body.dashboard .dashboard-section-link:hover {
    text-decoration: underline;
  }
}

/* "Other apps": a rule and a small muted caption above the second list (Activate and Docs, the two links that leave
   this host), which follows the caption with no gap of its own. */
body.dashboard .dashboard-section-caption {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-3) var(--space-1);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-section-caption + .dashboard-section-list {
  padding-top: 0;
}

/* The current section is marked by more than color: a tint (the page ground in the accent's color), bold, underlined
   and a dot at the entry's right edge. */
body.dashboard .dashboard-section-link[aria-current="page"] {
  background: var(--bg);
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

body.dashboard .dashboard-section-link[aria-current="page"]::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
}

/* The Onboarding Hub (app/views/dashboard/_onboarding.html.erb), the sidebar's foot under a rule while a step is left:
   a disclosure whose summary is the head "Onboarding Hub N/5", a 48px target with the count at its right, the drawn
   caret the Menu uses and a progress bar on its own line, then the five steps, each a 48px row led by a check (done,
   in --success) or a circle (to do, muted). A step reads as the section rows above it do (the body color, underlined
   on hover), a done step's words recede to --text-muted and the next step's are bold, so the one to do now stands
   out by weight, not color; the head's title underlines on hover too. The server renders it open and, at 5/5, not at
   all; a stored choice is set on the disclosure itself by the layout's head script as it is parsed, and by
   onboarding_controller.js on a Turbo render, so no rule here waits. */

body.dashboard .dashboard-onboarding {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--border);
}

body.dashboard .dashboard-onboarding-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  color: var(--text);
  font-weight: 700;
}

body.dashboard summary.dashboard-onboarding-head {
  list-style: none;
  cursor: pointer;
}

body.dashboard summary.dashboard-onboarding-head::-webkit-details-marker {
  display: none;
}

body.dashboard summary.dashboard-onboarding-head::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

body.dashboard .dashboard-onboarding[open] > summary.dashboard-onboarding-head::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

@media (hover: hover) {
  body.dashboard summary.dashboard-onboarding-head:hover .dashboard-onboarding-title {
    text-decoration: underline;
  }
}

body.dashboard .dashboard-onboarding-count {
  margin-left: auto;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* The bar: the track in --border, the done part in --accent, through each engine's own parts; aria-hidden in the
   view, since the head's words already say N/5. order puts it after the summary's caret, on a line of its own. */
body.dashboard .dashboard-onboarding-bar {
  order: 1;
  flex: 1 0 100%;
  height: 6px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--border);
  color: var(--accent);
  overflow: hidden;
  appearance: none;
}

body.dashboard .dashboard-onboarding-bar::-webkit-progress-bar {
  border-radius: var(--radius-card);
  background: var(--border);
}

body.dashboard .dashboard-onboarding-bar::-webkit-progress-value {
  border-radius: var(--radius-card);
  background: var(--accent);
}

body.dashboard .dashboard-onboarding-bar::-moz-progress-bar {
  border-radius: var(--radius-card);
  background: var(--accent);
}

body.dashboard .dashboard-onboarding-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-onboarding-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--space-3);
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  color: var(--text);
}

body.dashboard .dashboard-onboarding-step .icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  color: var(--text-muted);
}

body.dashboard .dashboard-onboarding-step.is-done .icon {
  color: var(--success);
}

body.dashboard .dashboard-onboarding-link {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  min-width: 0;
  min-height: var(--button-height);
  color: var(--text);
  text-decoration: none;
}

@media (hover: hover) {
  body.dashboard .dashboard-onboarding-link:hover {
    text-decoration: underline;
  }
}

/* A done step's words in the muted token (its check keeps --success and its hidden "Done:" stays); the next step, the
   first not done, in bold. */
body.dashboard .dashboard-onboarding-step.is-done :is(.dashboard-onboarding-link, .dashboard-onboarding-label) {
  color: var(--text-muted);
}

body.dashboard .dashboard-onboarding-step.is-next :is(.dashboard-onboarding-link, .dashboard-onboarding-label) {
  font-weight: 700;
}

/* A member's admin-only step: the label, then "Ask an administrator" beside it or, in the 240px sidebar, under it. */
body.dashboard .dashboard-onboarding-text {
  display: flex;
  flex: 1 1 0;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  min-width: 0;
}

body.dashboard .dashboard-onboarding-ask {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* The sidebar's tool after the sections, Collapse, shown from 900px only: under 900px the Menu bar holds the Menu
   alone. */
body.dashboard .dashboard-tools {
  display: none;
}

body.dashboard .dashboard-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-width: var(--button-height);
  min-height: var(--button-height);
  margin: 0;
  padding: 0 var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

body.dashboard .dashboard-tool-button .icon {
  width: 1.25em;
  height: 1.25em;
}

/* The admin strip (plan breezy-sparking-cray, _admin_strip.html.erb): under the header on every page under /admin, the
   header's colours inverted (--text behind, --bg for the words: 17.74:1 light and 17.81:1 dark), its button the strip
   inverted again (--bg behind, --text for the words) at --button-height, its focus ring --bg on the strip. From 600px
   it wraps where it must, the button under the words, one row from where both fit; under 600px it is the one short
   row below. */
body.dashboard > .dashboard-admin-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--space-4);
  padding-left: max(var(--space-4), env(safe-area-inset-left));
  padding-right: max(var(--space-4), env(safe-area-inset-right));
  background: var(--text);
  color: var(--bg);
}

body.dashboard .dashboard-admin-strip-text {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-admin-strip-note {
  margin-left: var(--space-2);
}

body.dashboard .dashboard-admin-strip-button {
  flex: none;
  border-color: var(--bg);
  background: var(--bg);
  color: var(--text);
}

body.dashboard .dashboard-admin-strip-button:focus-visible {
  outline-color: var(--bg);
}

/* The exit's chevron shows on a phone alone (below); from 600px the button reads its words only. */
body.dashboard .dashboard-admin-strip-button > .icon {
  display: none;
  width: 1.25em;
  height: 1.25em;
}

/* Under 600px (the header's phone breakpoint, the search button's) the strip is one short row (plan breezy-sparking-cray,
   the UX pass of 2026-11-19, the owner's words: "approve recommendations 1 and 2"): "Admin" at the left, the rest of
   "Admin dashboard" and the note visually hidden (still the strip's text), and the exit a text link in the strip's
   inverse (--bg words and underline on --text, its hover the same, never the secondary button's --surface) with the
   chevron, 48px tall and the strip's height, its focus ring --bg as above. It fits one row at 320px. */
@media (max-width: 599.98px) {
  body.dashboard > .dashboard-admin-strip {
    flex-wrap: nowrap;
    gap: var(--space-2);
    padding-top: 0;
    padding-bottom: 0;
  }

  body.dashboard .dashboard-admin-strip-text {
    position: relative;
    white-space: nowrap;
  }

  body.dashboard :is(.dashboard-admin-strip-more, .dashboard-admin-strip-note) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  body.dashboard .dashboard-admin-strip .dashboard-admin-strip-button,
  body.dashboard .dashboard-admin-strip .dashboard-admin-strip-button:hover {
    gap: var(--space-1);
    min-width: 0;
    padding: 0 var(--space-1);
    border-color: transparent;
    background: transparent;
    color: var(--bg);
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  body.dashboard .dashboard-admin-strip-button > .icon {
    display: block;
  }
}

/* From 900px, signed in: two columns, the header across the top, the sections nav as a 240px left sidebar and main to
   its right. The skip link is the grid's first item; positioned off screen it takes no track, and shown on focus it
   spans the top row. Signed out (no nav) the page stays the one column above. */
@media (min-width: 900px) {
  body.dashboard:has(> .dashboard-sections) {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
  }

  body.dashboard:has(> .dashboard-sections) > .skip-link {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  body.dashboard:has(> .dashboard-sections) > .dashboard-header {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  body.dashboard > .dashboard-sections {
    grid-column: 1;
    grid-row: 3;
    padding: var(--space-4) var(--space-3);
    padding-left: max(var(--space-3), env(safe-area-inset-left));
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  body.dashboard:has(> .dashboard-sections) > main {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    padding: var(--space-6);
    padding-right: max(var(--space-6), env(safe-area-inset-right));
  }

  /* Under /admin the strip takes row 3 across both columns and the sidebar and main move to row 4; a page without the
     strip keeps the three rows above. */
  body.dashboard:has(> .dashboard-admin-strip) {
    grid-template-rows: auto auto auto 1fr;
  }

  body.dashboard:has(> .dashboard-sections) > .dashboard-admin-strip {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  body.dashboard:has(> .dashboard-admin-strip) > :is(.dashboard-sections, main) {
    grid-row: 4;
  }

  body.dashboard .dashboard-section-list {
    padding-top: 0;
  }

  /* The sidebar: the sections, Other apps, then Collapse under a rule, drawn as the entries are. */
  body.dashboard .dashboard-tools {
    display: flex;
    flex-direction: column;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
  }

  body.dashboard .dashboard-tool-button {
    justify-content: flex-start;
    width: 100%;
    border: 0;
    background: none;
    text-align: left;
  }

  /* The collapsed rail (data-sidebar="rail" on html, set by the head script before the first paint and by
     sidebar_controller.js): a 72px column of 48px icon entries, each label visually hidden (still the link's name, and
     its title shows on hover); the caption becomes a rule. */
  body.dashboard:has(> .dashboard-sections) {
    transition: grid-template-columns 0.2s ease;
  }

  html[data-sidebar="rail"] body.dashboard:has(> .dashboard-sections) {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  html[data-sidebar="rail"] body.dashboard > .dashboard-sections {
    padding: var(--space-4) var(--space-2);
    padding-left: max(var(--space-2), env(safe-area-inset-left));
  }

  html[data-sidebar="rail"] body.dashboard :is(.dashboard-section-link, .dashboard-tool-button) {
    justify-content: center;
    padding: 0;
  }

  html[data-sidebar="rail"] body.dashboard :is(.dashboard-section-label, .dashboard-tool-label, .dashboard-section-caption, .dashboard-onboarding-title) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  html[data-sidebar="rail"] body.dashboard .dashboard-section-caption + .dashboard-section-list {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
  }

  html[data-sidebar="rail"] body.dashboard .dashboard-section-link[aria-current="page"]::after {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
  }

  /* The hub in the rail: the head alone, its count a compact badge (the title, visually hidden above, stays its name,
     and the head's title attribute shows "Onboarding Hub N/5" on hover); the bar, the caret and the steps are hidden,
     so the rail stays a rail. */
  html[data-sidebar="rail"] body.dashboard .dashboard-onboarding-head {
    position: relative;
    justify-content: center;
    padding: 0;
  }

  html[data-sidebar="rail"] body.dashboard :is(.dashboard-onboarding-bar, .dashboard-onboarding-list) {
    display: none;
  }

  /* The steps are hidden here, so while this property reads hidden onboarding_controller.js turns the badge's click
     into Expand: the full sidebar comes back with the hub open. */
  html[data-sidebar="rail"] body.dashboard .dashboard-onboarding {
    --dashboard-onboarding-steps: hidden;
  }

  html[data-sidebar="rail"] body.dashboard summary.dashboard-onboarding-head::after {
    display: none;
  }

  html[data-sidebar="rail"] body.dashboard .dashboard-onboarding-count {
    margin: 0;
    padding: 0 var(--space-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg);
    color: var(--text);
    font-size: var(--text-sm);
  }

  /* The Menu disclosure stands open as the sidebar: its summary is hidden and its content shown, by CSS on the details
     element alone. A browser without ::details-content keeps the Menu summary, so the list is still reachable. */
  @supports selector(::details-content) {
    body.dashboard .dashboard-menu > .dashboard-menu-toggle {
      display: none;
    }

    body.dashboard .dashboard-menu::details-content {
      content-visibility: visible;
    }
  }
}

body.dashboard h1 {
  margin: var(--space-1) 0 var(--space-3);
  font-size: var(--text-xl);
}

body.dashboard h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
}

/* Cards: a framed block on the surface color. */
body.dashboard .card {
  min-width: 0;
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}

body.dashboard .card > :first-child {
  margin-top: 0;
}

body.dashboard .card > :last-child {
  margin-bottom: 0;
}

body.dashboard .actions {
  margin-top: var(--space-4);
}

/* Tables (Tags, Shipments and later pages): a wide table scrolls sideways inside its wrap, never the page, and its first column stays in
   place while the rest scrolls. */
body.dashboard .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

/* Separate borders with no spacing, so each border belongs to its cell: under border-collapse the held first column's
   right edge stays with the table grid and scrolls away (measured 2026-10-29, the F2 screenshot). */
body.dashboard .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

body.dashboard .table-wrap th,
body.dashboard .table-wrap td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

/* A numeric or money column (plan tender-pondering-raccoon D5): its header and cells right-aligned with tabular figures,
   beating the wrap's left alignment on specificity. */
body.dashboard .table-wrap :is(th, td).dashboard-cell-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body.dashboard .table-wrap th:first-child,
body.dashboard .table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Secondary text. */
body.dashboard .muted {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* The as-of line (dashboard/_as_of): when each kind's data is from, and Refresh (.button, 48px). */
body.dashboard .dashboard-as-of {
  margin-bottom: var(--space-4);
  color: var(--text);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-as-of ul {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-as-of p {
  margin: 0 0 var(--space-2);
}

body.dashboard .dashboard-as-of form {
  margin: 0 0 var(--space-2);
}

/* The inert Refresh (plan glimmering-inventing-wigderson, D5): components.css paints every disabled button as a filled
   block for the auth busy state; the dashboard's inert Refresh is a secondary button whose reason sentence sits under
   it, so it stays outlined and muted instead of reading as the page's primary action. */
body.dashboard .dashboard-refresh .button[disabled] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

/* One line when the kinds agree (plan tender-pondering-raccoon, D2): the line, then Refresh beside it; the banner
   and the gate's reason keep a row of their own. The beside form applies only outside a page head's aside, which no
   page renders since 2026-11-05: inside the aside the column rules below put Refresh under the line. */
body.dashboard .dashboard-as-of-one {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

body.dashboard .dashboard-as-of-one > p {
  flex-basis: 100%;
  margin: 0;
}

body.dashboard .dashboard-as-of-one > ul,
body.dashboard .dashboard-as-of-one > form {
  margin: 0;
}

/* The staleness banner: marked by its border and its words, never by color alone. */
body.dashboard .dashboard-banner {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

/* Lists (Tags, Shipments): the filter form, the sentence that says what the list is filtered by, the table and
   Previous and Next. Every control is 48px (--button-height). */
body.dashboard .dashboard-filters {
  display: grid;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-4);
}

body.dashboard .dashboard-filters .field + .field {
  margin-top: 0;
}

body.dashboard .dashboard-filters .field-input {
  min-height: var(--button-height);
}

body.dashboard .dashboard-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* A row of buttons under a sentence or a list keeps --space-3 from the text: base.css sets every p margin to 0. */
body.dashboard :is(p, ul, dl) + .dashboard-filter-actions {
  margin-top: var(--space-3);
}

/* A move's run card (plan logical-imagining-hejlsberg): its one definition list keeps the list's own row rhythm, and
   what follows it (the progress block with Refresh, or the stopped sentence and Try the rest again) stands --space-3
   below, so no row touches the next block. */
body.dashboard .tag-move-run > dl ~ * {
  margin-top: var(--space-3);
}

/* The move pages' spacing (the headed walk of 2026-11-16, D2, D3, D5 and D6): the run card stands --space-2 under the
   status chip; the check's cannot-be-undone sentence stands --space-3 under its buttons (the rule above's distance);
   from 600px (the phone stack's own rules govern under it) a check or results table gives its last, text column the
   spare width, so the Row column is as wide as its numbers; and the hint's example id never breaks at its hyphen. */
body.dashboard .tag-move-run {
  margin-top: var(--space-2);
}

body.dashboard .tag-move-note {
  margin-top: var(--space-3);
}

@media (min-width: 600px) {
  body.dashboard .tag-move-table :is(th, td):last-child {
    width: 100%;
  }
}

body.dashboard .tag-move-id {
  white-space: nowrap;
}

/* Recent moves' ten columns (D1 gave it the run page's five counts) wrap at their spaces when the wrap is short of room
   (Already there, Not moved and Not tried first), so at 1280 they fit the card instead of scrolling sideways (1,051px
   of columns in a 941px wrap on one line each, measured 2026-11-16). */
body.dashboard .tag-move-recent :is(th, td) {
  white-space: normal;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-filters {
    grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(10rem, 1fr));
  }
}

/* Tags' filter row (plan lazy-percolating-horizon, 2026-11-05; the owner's answer: a filter row above the table, one
   control per column in the columns' order, labeled with the column names, the same controls stacked on a phone).
   From 900px the six or seven controls and the actions sit in aligned tracks of at least 10rem, the search field two
   tracks wide, wrapping to a second row; the actions take two tracks too, so Apply and Clear stand side by side (in
   one track they wrapped one above the other at 1280, measured 2026-11-05); under 900px the base single-column grid
   stacks them. */
@media (min-width: 900px) {
  body.dashboard .dashboard-filters.dashboard-filters-columns {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  }

  body.dashboard .dashboard-filters-columns > :is(.field:has(> input[type="search"]), .dashboard-filter-actions) {
    grid-column: span 2;
  }
}

/* Home's service level filter (plan tender-pondering-raccoon D3): one row at every width, at most 32rem, the select
   taking what the buttons leave; after the 900px block so the row wins there too. */
body.dashboard .dashboard-filters.dashboard-filters-inline {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  max-width: 32rem;
}

body.dashboard .dashboard-filters-inline .field {
  flex: 1 1 auto;
  min-width: 0;
}

body.dashboard .dashboard-filters-inline .dashboard-filter-actions {
  flex: none;
  flex-wrap: nowrap;
}

body.dashboard .dashboard-list-summary {
  margin: 0 0 var(--space-3);
  color: var(--text);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-table th,
body.dashboard .dashboard-table td {
  vertical-align: middle;
}

body.dashboard .dashboard-table thead th {
  font-size: var(--text-sm);
}

body.dashboard .dashboard-table tbody th {
  font-weight: 400;
}

/* Buttons in a table's inline forms may wrap, and the 48px target holds (the Users table's Actions keep one line, by their own rule). */
body.dashboard .dashboard-table td .dashboard-inline-form .button {
  white-space: normal;
}

/* A row's link (the first column) is a 48px target. */
body.dashboard .dashboard-row-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
  font-weight: 700;
}

body.dashboard .dashboard-cell-note,
body.dashboard .dashboard-cell-distributor {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* A long address wraps in its own column instead of making every row one line wide. */
body.dashboard .dashboard-table .dashboard-cell-wide {
  min-width: 14rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* A table with two wide cells (Users and Teams' Name and Email, Integrations' Label and Endpoint URL) holds its first
   one to 9rem from 900px, so at 1280 the table fits its card (Users: 1,026px of columns in a 956px wrap at 14rem, 80px
   less at 9rem, measured 2026-10-29). Under 900px the held first column's own rule below governs. */
@media (min-width: 900px) {
  body.dashboard .dashboard-table .dashboard-cell-wide.dashboard-cell-lead {
    min-width: 9rem;
  }

  /* Users and Teams' four roles (plan frolicking-singing-hopper): at 1280 the table measured 972px in its 956px frame
     once the role select grew to its natural 140px (Administrator 97.5px, the arrow 16.5px, 24px padding, 2px border);
     the Email cell's 14rem (224px) floor was the width that could not compress. 12.5rem (200px) gives back 24px, so
     972 - 24 = 948 in 956, an 8px gap, while two@example.com (about 130px) keeps one line and a long address wraps as
     before. Under 900px nothing changes. The Company Administrator (plan whimsical-twirling-hare, 2026-11-18): at
     12.5rem a closed table at 1280 with the sidebar open (the 941px wrap of a classic scrollbar) still broke
     company@secretag.example over two lines, the column held to 213px while the Role and Actions columns took the
     rest; 16rem (256px) holds an address of about 28 characters on one line.
     The double check (2026-11-18, review of plan whimsical-twirling-hare): the fixed 16rem floor pushed the closed
     table 41px past main's at 1024 and 1100 (923px against main's 882px in a 685px or 761px wrap), and with
     overflow-wrap anywhere an address broke mid-word. The width equation, measured with the sidebar open and a classic
     scrollbar: the wrap is the viewport less 339px (685, 761 and 941 at 1024, 1100 and 1280); the closed table's
     narrowest row is Name 9rem (144) + Email E + Role 161 + Joined at most 93 + Last sign-in 105 + Actions 178, so
     E + 681, and it fits while E <= viewport - 1020. E = clamp(12.5rem, 100vw - 64rem, 16rem): from 1224px E is the
     viewport less 1024px, 4px inside the bound, up to 16rem at 1280; under 1224px E is main's own 12.5rem, so the
     table's narrowest width is main's and the wrap scrolls no more than main's did. The address breaks only at its
     wbr (after the @, before each dot; overflow-wrap normal), so the cell is never narrower than its longest part. */
  body.dashboard .dashboard-users-table .dashboard-cell-wide:not(.dashboard-cell-lead) {
    min-width: clamp(12.5rem, 100vw - 64rem, 16rem);
    overflow-wrap: normal;
  }

  /* While a Change role is open the select is as wide as its longest option, Organization Administrator, and with
     Remove open too the table measured 954px in the 941px wrap at a 7rem Email floor: the Email floor gives way to
     6.5rem and the Name floor to 8rem, so the open table fits and the closed one keeps its floors. The double check
     (2026-11-18): the table is open while a Change role or a Remove is open on it, and an open address breaks as a last
     resort (overflow-wrap anywhere) at a floor that holds every ordinary piece of an address. The width equation, with
     the sidebar open and a classic scrollbar: the open table's narrowest row with both open is Name N + Email E + the
     open Role cell 265 + Joined at most 95 + Last sign-in 105 + Actions with Remove open 232, so N + E + 697, and it
     fits the 941px wrap at 1280 while N + E <= 244 (the table measured 942 at N 8rem and E 7.25rem, so N is 7.75rem,
     124px, and N + E is 240). E = 7.25rem (116px) is 92px of text inside 24px of padding, and the longest piece of an
     ordinary address in the seed and system-test data (between its wbr marks and after its hyphens) is company2@ at
     90.1px, so an ordinary address breaks only at its @, a dot or a hyphen. Only a piece longer than 92px breaks
     mid-word (the test's .featherstonehaugh- at 148px). */
  body.dashboard .dashboard-users-table:has(.dashboard-role-change[open], .dashboard-remove[open]) .dashboard-cell-wide:not(.dashboard-cell-lead) {
    min-width: 7.25rem;
    overflow-wrap: anywhere;
  }

  body.dashboard .dashboard-users-table:has(.dashboard-role-change[open], .dashboard-remove[open]) .dashboard-cell-wide.dashboard-cell-lead {
    min-width: 7.75rem;
  }

  /* Integrations' tables: with a Deactivate open (its panel is 13rem) the webhooks measured 972px in the 956px wrap at
     1280 (1,388px with four events on one line), and a long event beside two 14rem cells the deliveries 985px. With the
     Events cell wrapping, an 8rem floor holds both at 1265 too. */
  body.dashboard .dashboard-integrations-table .dashboard-cell-wide:not(.dashboard-cell-lead) {
    min-width: 8rem;
  }

  /* A time (Integrations' Created) wraps before its zone name from 900px, so a full date and time never widens its
     row. 9.5rem of border box holds the widest date and time, "Dec 31, 12:59 pm" (126px plus 24px of padding), on one
     line. Users' Joined and Last sign-in are relative times since plan frolicking-singing-hopper's Plan 2 (one word or
     two, the full time on hover) and carry no time class. */
  body.dashboard .dashboard-table .dashboard-cell-time {
    min-width: 9.5rem;
    white-space: normal;
  }
}

/* Under 900px the Users table's address keeps its earlier breaking (overflow-wrap anywhere, at the last character that
   fits): its wbr marks are not drawn, so they offer no break and a phone card reads as before the double check. */
@media (max-width: 899.98px) {
  body.dashboard .dashboard-users-table td[data-label="Email"] wbr {
    display: none;
  }
}

/* On a phone the first column (held in place by the sticky rule above) stays narrow enough to leave room for the
   columns that scroll beside it, and a long first value wraps inside it, never narrower than 7rem. */
@media (max-width: 899.98px) {
  body.dashboard .table-wrap th:first-child,
  body.dashboard .table-wrap td:first-child {
    min-width: 7rem;
    max-width: 10rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

body.dashboard .dashboard-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

body.dashboard .dashboard-pager-position {
  margin: 0;
}

/* Count cards: the label, the figure and the formula it is counted by. */
body.dashboard .dashboard-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-count {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

body.dashboard .dashboard-count p {
  margin: 0;
}

body.dashboard .dashboard-count-label {
  font-weight: 700;
}

body.dashboard .dashboard-count-value {
  font-size: var(--text-2xl);
  font-weight: 700;
}

/* A Home figure's number is the link to its figure page (plan wiggly-bubbling-duckling): the figure's own size and
   weight in the accent, underlined on hover and focus, and a 48px tall target that keeps the number in its place, at
   least 24px wide (WCAG 2.5.8's minimum, for a one-digit number) with the number centered in it. */
body.dashboard .dashboard-count-link,
body.dashboard .dashboard-pipeline-value .dashboard-count-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: var(--button-height);
  color: var(--accent);
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}

/* Home's one headline number: the house's SecreTags available to be assigned (the owner's order of 2026-11-16 and his
   pick the same day, "One number, top right") and, since 2026-11-18, a customer's SecreTags assigned (the owner's
   order, "# of Secretags assigned to top right right above the text that reads Data as of...."), one block of the
   same shape: the aside's first block, above the as-of block. Its number is a card number
   (.dashboard-count-value), and its label (under it from 900px, beside it below) reads like the line under a heading
   (muted, 14px, weight 400). Since 2026-11-24 (the owner's "build 1 and 2") the link is the whole block, the number and the label,
   so a one-digit count has a wide target. Neither line has a margin of its own, so the aside's 8px gap is
   the one space under the block; it takes the aside's alignment (left under the title on a phone, right from 900px).
   The review of 2026-11-16 (findings 1 and 6): the block's own rule says it takes that alignment, so no later rule
   restyles the block; and the link starts on the aside's left edge on a phone and ends on its right edge from 900px,
   so a one-digit count lines up with the as-of lines, its target still 48px tall.
   Below 900px the number and the label share one line (2026-11-24, "build remaining recommendations"), linked or
   plain, and wrap to two where they do not fit; from 900px they stack. */
body.dashboard .dashboard-available {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
  text-align: inherit;
}

body.dashboard .dashboard-available .dashboard-count-link {
  flex-wrap: wrap;
  align-items: baseline;
  align-content: center;
  justify-content: flex-start;
  column-gap: var(--space-2);
}

@media (min-width: 900px) {
  body.dashboard .dashboard-page-aside > .dashboard-available {
    display: block;
  }

  body.dashboard .dashboard-page-aside > .dashboard-available .dashboard-count-link {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }
}

/* While the aside stands under the name (below 900px) Home's name sits at the bottom of its title group, 8px shorter than
   the 48px that meets a button in the aside: the space under the name is gone and the name stays within 3px of the other
   pages' headings (2026-11-24, "build 1 and 2"). With no minimum at all the name stood 10px above Tags'
   heading (measured 2026-11-25). The rule keeps none of Refresh in view under the open account menu: with a long
   email the menu covers it on a 375px phone. */
@media (max-width: 899.98px) {
  body.dashboard .dashboard-page-title:has(+ .dashboard-page-aside > .dashboard-available) {
    justify-content: flex-end;
    min-height: calc(var(--button-height) - var(--space-2));
  }
}

body.dashboard .dashboard-available > p:first-child {
  margin: 0;
}

body.dashboard .dashboard-available > .dashboard-count-link > p:first-child {
  margin: 0;
}

body.dashboard .dashboard-available > p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

body.dashboard .dashboard-available > .dashboard-count-link > p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

body.dashboard .dashboard-count-link:is(:hover, :focus-visible),
body.dashboard .dashboard-pipeline-value .dashboard-count-link:is(:hover, :focus-visible) {
  text-decoration: underline;
}

/* A figure page's criteria: label and words in pairs, stacked on a phone, two columns from 600px. */
body.dashboard .dashboard-criteria {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-4);
}

@media (min-width: 600px) {
  body.dashboard .dashboard-criteria {
    grid-template-columns: max-content minmax(0, 1fr);
  }
}

body.dashboard .dashboard-criteria dt {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-criteria dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Detail pages: the way back, a heading that may hold a long id, and label and value pairs. */
body.dashboard .dashboard-back {
  margin: 0;
}

body.dashboard .dashboard-back a {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
}

body.dashboard .dashboard-title-wrap {
  overflow-wrap: anywhere;
}

body.dashboard h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}

body.dashboard h4 {
  margin: var(--space-3) 0 var(--space-2);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-details {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

body.dashboard .dashboard-details > div {
  display: grid;
  gap: var(--space-1);
}

@media (min-width: 900px) {
  body.dashboard .dashboard-details > div {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: var(--space-3);
  }
}

body.dashboard .dashboard-details dt {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-package + .dashboard-package {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

body.dashboard .dashboard-plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-plain-list > li + li {
  margin-top: var(--space-2);
}

/* Edit forms: one column at the reading width. */
body.dashboard .dashboard-form {
  max-width: 40rem;
  margin-top: var(--space-4);
}

body.dashboard .dashboard-form .field-hint {
  margin: 0 0 var(--space-4);
}

/* A select's chosen option shown whole on a phone (plan memoized-noodling-wave D, measured 2026-11-05 at 375px):
   Chrome draws the native arrow inside the control and keeps 16px of its content box for it, so at the field's
   12px sides "(GMT-06:00) Central Time (US & Canada)" lost its ")"; 8px sides give the text that room back. */
body.dashboard .dashboard-form select#settings_time_zone {
  padding-inline: var(--space-2);
}

/* Home's claim card (plan tender-pondering-raccoon D3): from 600px the label, the field and Add on one row (the field's
   wrapper drops out of the box tree, so its label, input and hint are the grid's items) with the hint on row 2 under
   the field; stacked under 600px as every other form. */
@media (min-width: 600px) {
  body.dashboard .dashboard-claim-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: var(--space-3);
    row-gap: var(--space-1);
    align-items: center;
  }

  body.dashboard .dashboard-claim-form .field {
    display: contents;
  }

  body.dashboard .dashboard-claim-form .field-label {
    grid-row: 1;
    grid-column: 1;
    margin: 0;
  }

  body.dashboard .dashboard-claim-form .field-input {
    grid-row: 1;
    grid-column: 2;
  }

  body.dashboard .dashboard-claim-form .field-hint {
    grid-row: 2;
    grid-column: 2 / -1;
    margin: 0;
  }

  /* A refusal's line (plan vectorized-mapping-clarke Part C, Phase C2) on row 3 under the hint, as wide as it; left to
     auto-placement it took the label's column and pushed the field to a sliver (measured headed at 1280, 2026-11-16). */
  body.dashboard .dashboard-claim-form .field-error {
    grid-row: 3;
    grid-column: 2 / -1;
    margin: 0;
  }

  body.dashboard .dashboard-claim-form .form-actions {
    grid-row: 1;
    grid-column: 3;
    margin: 0;
  }
}

/* Home's claim card: the link to the tag the last claim added, set apart from the Add button. */
body.dashboard .dashboard-claimed {
  margin-top: var(--space-4);
}

/* Home (dashboard/home/show): the Live now badge of In Transit (marked by its border and its words, never by color
   alone), the three Fulfillment pipeline figures side by side from 900px, the report card's grade cell, Top
   destinations as a ranked list with each count at the row's end, and the formula lines under a card's list. */
body.dashboard .dashboard-count .dashboard-live {
  display: inline-block;
  margin: var(--space-1) 0;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* A figure's unit on its own smaller line under the number (ux-2 B2), and the dimmed absent value (G12, ux-2 B3): the
   mark or the word in the muted token, so the real values stand out in both themes. */
body.dashboard .dashboard-count-unit {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-absent {
  color: var(--text-muted);
  font-weight: 400;
}

/* Home's claim card sentence under its heading. */
body.dashboard .dashboard-claim-intro {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
}

/* The Logistics caption over the pipeline and the report card, with View reports at its end (a plain link, 48px). */
body.dashboard .dashboard-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-1);
}

body.dashboard .dashboard-group-caption {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.dashboard .dashboard-group-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* The Fulfillment pipeline: one row a leg (its name and chip, the figure with its unit under it at the row's end, the
   share bar across the row), then the Total avg footer. Phone first: the same rows at every width. */
body.dashboard .dashboard-pipeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-pipeline-row,
body.dashboard .dashboard-pipeline-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}

body.dashboard .dashboard-pipeline-row p,
body.dashboard .dashboard-pipeline-total p {
  margin: 0;
}

body.dashboard .dashboard-pipeline-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  grid-row: 1 / span 2;
  font-weight: 700;
}

body.dashboard .dashboard-pipeline-chip {
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

body.dashboard .dashboard-pipeline-value {
  grid-column: 2;
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

body.dashboard :is(.dashboard-pipeline-row, .dashboard-pipeline-total) .dashboard-count-unit {
  grid-column: 2;
  text-align: right;
}

body.dashboard .dashboard-pipeline-bar {
  display: block;
  grid-column: 1 / -1;
  height: 6px;
  margin-top: var(--space-2);
  border-radius: var(--radius-input);
  background: var(--border);
  overflow: hidden;
}

body.dashboard .dashboard-pipeline-fill {
  display: block;
  height: 100%;
  background: var(--accent);
}

body.dashboard .dashboard-pipeline-total {
  border-bottom: 0;
}

/* The bar's width: the leg's share to the nearest 5 percent, one class a step (no style attribute: the CSP and the
   presentation guard refuse one). */
body.dashboard .dashboard-pipeline-fill-0 { width: 0; }
body.dashboard .dashboard-pipeline-fill-5 { width: 5%; }
body.dashboard .dashboard-pipeline-fill-10 { width: 10%; }
body.dashboard .dashboard-pipeline-fill-15 { width: 15%; }
body.dashboard .dashboard-pipeline-fill-20 { width: 20%; }
body.dashboard .dashboard-pipeline-fill-25 { width: 25%; }
body.dashboard .dashboard-pipeline-fill-30 { width: 30%; }
body.dashboard .dashboard-pipeline-fill-35 { width: 35%; }
body.dashboard .dashboard-pipeline-fill-40 { width: 40%; }
body.dashboard .dashboard-pipeline-fill-45 { width: 45%; }
body.dashboard .dashboard-pipeline-fill-50 { width: 50%; }
body.dashboard .dashboard-pipeline-fill-55 { width: 55%; }
body.dashboard .dashboard-pipeline-fill-60 { width: 60%; }
body.dashboard .dashboard-pipeline-fill-65 { width: 65%; }
body.dashboard .dashboard-pipeline-fill-70 { width: 70%; }
body.dashboard .dashboard-pipeline-fill-75 { width: 75%; }
body.dashboard .dashboard-pipeline-fill-80 { width: 80%; }
body.dashboard .dashboard-pipeline-fill-85 { width: 85%; }
body.dashboard .dashboard-pipeline-fill-90 { width: 90%; }
body.dashboard .dashboard-pipeline-fill-95 { width: 95%; }
body.dashboard .dashboard-pipeline-fill-100 { width: 100%; }

body.dashboard .dashboard-table .dashboard-grade {
  font-size: var(--text-lg);
  font-weight: 700;
  text-align: center;
}

body.dashboard .dashboard-destinations {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-destinations > li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-destination-count {
  flex: none;
  font-weight: 700;
}

body.dashboard .dashboard-formula {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Map View and the tag's Journey card (dashboard/map): the generated outline nested at the map's viewBox, the dots as
   links painted by their state class, the selected dot's ring and the journey polyline. Every paint is a class on the
   tokens, never an attribute or an inline style. The map takes its container's full width (a phone gets all of it)
   and keeps the viewBox's 960 by 600 shape. The state chips are 48px buttons that wrap, the chosen one marked
   aria-current="page" (the Disputes rule below). */
body.dashboard .dashboard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-map-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 600;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
}

body.dashboard .dashboard-map-small {
  max-width: 40rem;
}

body.dashboard .map-outline {
  overflow: hidden;
}

body.dashboard .map-context {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-land {
  fill: var(--bg);
  stroke: var(--text-muted);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* The state lines over the outline (dashboard/map/states, the shipment page's map only): a hairline at every zoom,
   in the neighbours' border token, so a fitted inland view shows the borders around its dot. */
body.dashboard .map-states {
  overflow: hidden;
}

body.dashboard .map-state-line {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-journey {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-dot {
  fill: var(--warning);
  stroke: var(--bg);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

/* A tag's dot shares the state chips' palette (plan glimmering-inventing-wigderson D3), so the dot, its card's chip and
   the list's chip for one tag are one color: in transit the --state-transit purple, approaching the warning, delivery
   verification the --state-verification teal, delivered and completed the success, disputed in transit the danger. At
   origin and awaiting first ping are the muted text (the chip's --border edge would vanish on the map's fill); the 2px
   --bg stroke keeps every dot's edge. */
body.dashboard .map-dot-awaiting_first_ping,
body.dashboard .map-dot-at_origin {
  fill: var(--text-muted);
}

body.dashboard .map-dot-in_transit {
  fill: var(--state-transit);
}

body.dashboard .map-dot-approaching {
  fill: var(--warning);
}

body.dashboard .map-dot-delivery_verification {
  fill: var(--state-verification);
}

body.dashboard .map-dot-delivered,
body.dashboard .map-dot-completed {
  fill: var(--success);
}

body.dashboard .map-dot-disputed_in_transit {
  fill: var(--danger);
}

body.dashboard .map-selected {
  fill: none;
  stroke: var(--text);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-dot-link:focus {
  outline: none;
}

/* The dot of a card under a mouse or pen pointer or the keyboard focus (map_link_controller.js, plan
   refactored-floating-cerf Part 1 decision 7) takes the ring the dot link draws on its own keyboard focus. */
body.dashboard .map-dot-link:focus-visible .map-dot,
body.dashboard .is-hovered .map-dot {
  stroke: var(--focus-ring);
  stroke-width: 5;
}

body.dashboard .dashboard-journey-summary {
  margin: var(--space-3) 0 0;
  overflow-wrap: anywhere;
}

/* A trail's facts table (dashboard/map/_trail_lines, Part 1 decision 5; the owner's answer: a compact facts table):
   the details list, its labels short, so from 900px the label column is narrower than Details' 12rem; the coordinates
   in the small muted mono type of a row's second line (.dashboard-row-sub). */
body.dashboard .dashboard-journey-facts {
  margin: var(--space-3) 0 0;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-journey-facts > div {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
}

body.dashboard .dashboard-coords {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  white-space: nowrap;
}

/* The breadcrumb trails (dashboard/map/_trail, plan refactored-floating-cerf, decision 6): per segment a --bg halo
   under a 3px line in the state's token, the crumbs as zero-length round-capped subpaths (a fixed-size dot at every
   zoom through the non-scaling stroke, haloed), and the start as a hollow diamond. Show journey widens one trail and
   dims the rest. A trail, its crumbs and its start share its dot's palette (the dots' comment above): in transit the
   --state-transit purple, approaching the warning, delivery verification the --state-verification teal, delivered and
   completed the success, disputed in transit the danger, at origin and awaiting first ping the muted text. The trail of a
   card under a mouse or pen pointer or the keyboard focus (is-hovered, map_link_controller.js, Part 1 decision 7) is
   drawn as the highlighted one and stands at full opacity even when Show journey dims it. */
body.dashboard .map-trail-halo {
  fill: none;
  stroke: var(--bg);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-trail-line {
  fill: none;
  stroke: var(--warning);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-crumbs-halo {
  fill: none;
  stroke: var(--bg);
  stroke-width: 9;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-crumbs {
  fill: none;
  stroke: var(--warning);
  stroke-width: 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-start {
  fill: var(--bg);
  stroke: var(--warning);
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

body.dashboard .map-trail-awaiting_first_ping :is(.map-trail-line, .map-crumbs, .map-start),
body.dashboard .map-trail-at_origin :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--text-muted);
}

body.dashboard .map-trail-in_transit :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--state-transit);
}

body.dashboard .map-trail-approaching :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--warning);
}

body.dashboard .map-trail-delivery_verification :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--state-verification);
}

body.dashboard .map-trail-delivered :is(.map-trail-line, .map-crumbs, .map-start),
body.dashboard .map-trail-completed :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--success);
}

body.dashboard .map-trail-disputed_in_transit :is(.map-trail-line, .map-crumbs, .map-start) {
  stroke: var(--danger);
}

body.dashboard .map-trail.is-dimmed {
  opacity: .3;
}

body.dashboard .map-trail.is-hovered {
  opacity: 1;
}

body.dashboard .map-trail.is-highlighted .map-trail-line,
body.dashboard .map-trail.is-hovered .map-trail-line {
  stroke-width: 4;
}

body.dashboard .map-trail.is-highlighted .map-trail-halo,
body.dashboard .map-trail.is-hovered .map-trail-halo {
  stroke-width: 8;
}

/* The key under a map with trails (dashboard/map/_legend): each mark a 20px SVG beside its words, wrapping on a phone. */
body.dashboard .map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

body.dashboard .map-legend > li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

body.dashboard .map-legend-mark {
  flex: none;
  width: 20px;
  height: 20px;
  overflow: visible;
}

/* A trail's Breadcrumbs disclosure (dashboard/map/_trail_lines): a .dashboard-parts disclosure, so its summary is the one
   pinned 48px summary rule's; the list of crumbs under it wraps a long line. */
body.dashboard .dashboard-points > ol {
  margin: var(--space-2) 0 0;
  overflow-wrap: anywhere;
}

/* Map View's layout (plan unified-giggling-music G18, G19): one column under 900px, the map's column first (the map card
   and Off the map, then the panel: plan refactored-floating-cerf Part 1 decision 8, the owner's answer of 2026-11-11:
   the map first on a phone), from 900px the panel a third at the left and the map two thirds, side by side. The cards' list scrolls inside its own region from
   900px, so the map stays beside the first cards. */
body.dashboard .dashboard-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}

body.dashboard .dashboard-map-panel,
body.dashboard .dashboard-map-main {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
}

body.dashboard .dashboard-map-panel > *,
body.dashboard .dashboard-map-main > * {
  margin: 0;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-map-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }

  body.dashboard .dashboard-devices {
    max-height: 40rem;
    overflow-y: auto;
  }

  /* The panel is a third of the page: the search, the State select and the buttons stack (measured 2026-11-05: side by
     side at 1280px the select leaves 131px for the 143px "Delivery verification"). */
  body.dashboard .dashboard-map-panel .dashboard-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 899.98px) {
  body.dashboard .dashboard-map-main {
    order: -1;
  }
}

/* The figure page's split (dashboard/figures/show, plan splendid-enchanting-biscuit, approved by the owner on
   2026-11-16: "shrink the detail on the left side and to the right side show a map in satellite view"; his answers: on
   narrow screens the map goes on top, and in the UX pass of the same day, on laptops "Summary beside map
   (Recommended)"). On a figure page whose rows name a tag, three blocks stand in one grid placed by
   grid-template-areas, never by order: the summary (the counts card through "How this number is counted"), the rows
   (the Showing line, the table and the pager) and the map card.
   - Under SUMMARY (1205px), the map on top: "map" "summary" "rows".
   - From SUMMARY, the summary beside the map in two equal columns, the rows the full width under both:
     "summary map" "rows rows". Main's 1120px cap is lifted for that page alone (main:has(> .dashboard-figure-split)).
   - From SPLIT (1644px), the summary and the rows at the left, the map at their right spanning both rows and sticking
     under the top of the window, as the shipment page's map column does: "summary map" "rows map".
   Shipments sent has no map: its .dashboard-figure-body holds the same two blocks as a plain block.
   The columns share W - 327 (the 240px sidebar, a 15px classic scrollbar, main's two 24px paddings from 900px and the
   24px gap, --space-6).
   SPLIT, from the widest table (measured 2026-11-16 on the headed rig's seed, long values included): the split
   begins where every table that fits a figure page today fits its wrap in the left column. That column is 878px: the
   widest such table is SecreTags assigned's at 852px, a time cell's words move it (its Last seen read "24 min ago",
   then "1 h ago", and the table grew to 853px), so it keeps 24px of headroom (--space-6) and the wrap's 2px borders,
   852 + 24 + 2 = 878. The split began as two thirds and one third, W >= 327 + 878 * 3 / 2 = 1644, and SPLIT stays
   there: at 1644px the columns are exactly as they were, 878 and 439. From SPLIT the left column holds its 878px
   (minmax(0, 878px)) and every further pixel goes to the map (minmax(0, 1fr)), W - 1205 wide: 715px at 1920px (531px
   as one third), 1,355px at 2560px. Total avg's table (1,088px when its times stood on one line) wraps its four times
   as a report's wrap_columns do (dashboard-cell-wide dashboard-cell-lead, held to 9rem from 900px), so its narrowest
   is 91 + 96 + 4 * 144 + 66 + 2 = 831px, under the 876px wrap at 1644 (measured 2026-11-16: the table 876px in its
   876px wrap, each time column 156px); it does not move SPLIT.
   SUMMARY: the laptop's map column (W - 327) / 2 first reaches the split's own narrowest map, 439px at SPLIT, at
   W = 327 + 2 * 439 = 1205; below it the map would be narrower than anywhere in the split, so it goes on top.
   A grid item keeps its children's margins, so inside the split the summary's last block (the criteria card) drops
   its bottom margin and the 16px row gap alone stands between the summary and the rows, as the card's margin does on
   Shipments sent. */
body.dashboard .dashboard-figure-split {
  display: grid;
  grid-template-areas: "map" "summary" "rows";
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

body.dashboard .dashboard-figure-summary {
  grid-area: summary;
  min-width: 0;
}

body.dashboard .dashboard-figure-rows {
  grid-area: rows;
  min-width: 0;
}

body.dashboard .dashboard-figure-split > .dashboard-figure-summary > :last-child {
  margin-bottom: 0;
}

body.dashboard .dashboard-figure-split > .satellite-map {
  grid-area: map;
  margin: 0;
}

/* Under SUMMARY the map stands on top, and a full-width map would push the figure's number under the fold (about
   1050 by 656 at 1440 by 900). So the whole map card is held to 80vh plus its two 16px paddings and its two 1px
   borders: the frame is at most 80vh wide, and at the SVG's 640:400 shape at most 0.625 * 80vh = 50vh tall, half the
   window's height. The card stands at the left like the cards under it, so its title, its buttons, the frame and the
   notes share one edge. A phone held upright is untouched: 80vh is wider than its screen (649px at 375 by 812). */
@media (max-width: 1204.98px) {
  body.dashboard .dashboard-figure-split > .satellite-map {
    max-width: calc(80vh + 2 * var(--space-4) + 2px);
  }
}

@media (min-width: 1205px) {
  body.dashboard > main:has(> .dashboard-figure-split) {
    max-width: none;
  }

  body.dashboard .dashboard-figure-split {
    grid-template-areas: "summary map" "rows rows";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--space-4) var(--space-6);
  }
}

/* From SPLIT the rows' track takes what the map card needs beyond the summary (auto 1fr), so a tall map never opens
   a gap between the summary and the rows. The map never passes the window's height: the whole card (so its head row's
   buttons stay on the frame's right edge) is held to (100vh - X) * 1.6 plus its two 16px paddings and its two 1px
   borders, 1.6 being the SVG's 640:400 shape, so the frame is at most 100vh - 368px tall. 368px is the frame's top
   on first paint, before any scroll, with the card at its natural top under the page head, measured 2026-11-16 on the
   headed rig's seed at 3440 by 1440 (331px on In transit, Delivered and SecreTags assigned, 352px on Order to ship and
   Total avg, whose head is a line taller), plus 16px of room under it, so the whole frame shows in the first screen.
   Stuck, the card is 77px of chrome above the frame and at most 194px under it (SecreTags assigned's "No location
   reported yet" note; the credit line, the notes, "Locations on this map", the padding and the border), so
   16 + 77 + 1,072 + 194 = 1,359px, inside 1,440. It binds only on wide, short windows: at 3440 by 1440 the map column
   is 2,235px and the card (1440 - 368) * 1.6 + 34 = 1,749px, the frame 1,715 by 1,072.
   The cap's floor is the split's narrowest map card, 439px, its column at SPLIT (the double check of 2026-11-17,
   finding R6): without it the cap fell under 439px below (439 - 34) / 1.6 + 368 = 621px tall, left the frame no width
   at 368px tall and none at all below 347px (measured: 85px wide at 1920 by 400, the head row and the notes spilling
   out of it). From the floor the card holds 439px and the frame 405 by 253 at any height.
   The whole card is held to the window's height less its 16px top, so it never passes the window's bottom while
   stuck, and scrolls inside itself past that (finding R5): "Locations on this map" opened with 25 rows made the card 1,489px tall at 1920 by 1080 and
   2,093px at 1644 by 900 (measured), too tall to stick, so the frame left the screen as the page scrolled to the list.
   The focus rings (3px at a 2px offset) stand inside the card's 16px padding, so the scroll never clips them. */
@media (min-width: 1644px) {
  body.dashboard .dashboard-figure-split {
    grid-template-areas: "summary map" "rows map";
    grid-template-columns: minmax(0, 878px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  body.dashboard .dashboard-figure-split > .satellite-map {
    position: sticky;
    top: var(--space-4);
    max-width: max(439px, calc((100vh - 368px) * 1.6 + 2 * var(--space-4) + 2px));
    max-height: calc(100vh - var(--space-4));
    overflow-y: auto;
  }
}

/* The map card (dashboard/figures/_satellite_map): the head and the 48px zoom buttons are Map View's
   (.dashboard-map-head, .dashboard-map-tool), the frame its focus ring. The SVG keeps SatelliteMap's 640 by 400 shape
   on the --bg token, the ground a missing tile leaves. A pin is a dot in the accent with a --bg edge, its name beside
   it in bold text on a --bg halo (paint-order stroke, so the halo sits under the letters), each stroke the same on
   screen at every zoom; a linked pin carries a 24px invisible hit circle and takes the focus ring's edge on keyboard
   focus. Under the split (SPLIT, 1644px), wherever the map stands in the page's flow, a vertical finger scrolls the
   page over the map (touch-action pan-y, Map View's phone rule; the UX pass's U3, Google Maps' cooperative gestures),
   so a tablet's or a laptop's finger scroll is never trapped by the map, while a sideways drag pans and two fingers
   pinch through the controller. From SPLIT the map is sticky beside the rows and keeps touch-action none. */
body.dashboard .satellite-map-frame {
  position: relative;
}

body.dashboard .satellite-map-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 400;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  user-select: none;
  touch-action: none;
}

@media (max-width: 1643.98px) {
  body.dashboard .satellite-map-svg {
    touch-action: pan-y;
  }
}

body.dashboard .satellite-map-frame.is-zoomed .satellite-map-svg {
  cursor: grab;
}

body.dashboard .satellite-map-frame.is-dragging .satellite-map-svg {
  cursor: grabbing;
}

body.dashboard .satellite-map-pin {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.dashboard .satellite-map-hit {
  fill: transparent;
}

body.dashboard .satellite-map-label {
  fill: var(--text);
  stroke: var(--bg);
  stroke-width: 4;
  stroke-linejoin: round;
  paint-order: stroke;
  font-weight: 700;
  vector-effect: non-scaling-stroke;
}

body.dashboard .satellite-map-pin-link:focus {
  outline: none;
}

body.dashboard .satellite-map-pin-link:focus-visible .satellite-map-pin {
  stroke: var(--focus-ring);
  stroke-width: 5;
}

/* A cluster (satellite_map_controller.js): pins nearer than 32px on screen drawn as one larger dot in the accent with
   its count in --on-accent and the label "N tags" beside it; its members' pins and labels are hidden by the
   is-clustered class, never by a style attribute. It is a button: the pointer cursor, the focus ring's edge on
   keyboard focus. */
body.dashboard .satellite-map-pins .is-clustered {
  display: none;
}

body.dashboard .satellite-map-cluster {
  cursor: pointer;
}

body.dashboard .satellite-map-cluster:focus {
  outline: none;
}

body.dashboard .satellite-map-cluster-dot {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

body.dashboard .satellite-map-cluster:focus-visible .satellite-map-cluster-dot {
  stroke: var(--focus-ring);
  stroke-width: 5;
}

body.dashboard .satellite-map-cluster-count {
  fill: var(--on-accent);
  font-weight: 700;
  pointer-events: none;
}

/* The hint a plain wheel shows over the map (satellite_map_controller.js, the cooperative wheel): a scrim of --text
   at 85% over the picture (opacity, as a color is written only in tokens.css), the words in --bg, centred, never in
   the pointer's way; shown and hidden by the hidden attribute
   alone (the dashboard's [hidden] rule, display: none !important, outranks its display: flex). */
body.dashboard .satellite-map-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--space-4);
  border-radius: var(--radius-input);
  background: var(--text);
  color: var(--bg);
  opacity: 0.85;
  font-size: var(--text-md);
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

/* The credit, one line under the frame and never over the picture (Esri's rule for interactive maps: the data sources
   at the bottom of the map, always visible, at the left; "Powered by Esri" at the right; 12px or larger): a row that
   wraps when the names do not fit, so every name stays visible with no expander. */
body.dashboard .satellite-map-credit {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3);
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
  overflow-wrap: anywhere;
}

body.dashboard .satellite-map-credit a {
  margin-left: auto;
}

body.dashboard .satellite-map-note {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .satellite-map-list {
  margin-top: var(--space-3);
}

/* One tag on the map (plan deep-wishing-volcano, the owner on 2026-11-23: "show the address after the text Last Reported
   Location and under it in a smalleer font report the longitude and latitude"): the heading with the address, the
   coordinates (.dashboard-coords) under it. The block takes the room the zoom buttons leave and the address wraps in it;
   the heading keeps the head's own zero margin. In the list a row's coordinates start a line of their own under its
   place or address; with neither they stay on the row's line. */
body.dashboard .satellite-map .satellite-map-where {
  flex: 1 1 12rem;
  min-width: 0;
}

body.dashboard .satellite-map .satellite-map-where > h2,
body.dashboard .satellite-map .satellite-map-where > p {
  margin: 0;
}

body.dashboard .satellite-map .satellite-map-address {
  overflow-wrap: anywhere;
}

body.dashboard .satellite-map .satellite-map-list .satellite-map-address:not(:empty)::after {
  content: "\A";
  white-space: pre;
}

/* The shipment page (dashboard/shipments/show, plan distributed-weaving-treehouse, decisions 1 to 4, and its UX pass,
   decisions U1 to U6). The head row: the package icon in a 40px tile, the title and its chips on one wrapping line,
   the small line under it (the title group's muted subtitle rule). The actions sit first in the page head's aside,
   each a secondary 48px button, its icon at the page head's icon size and the button's own gap before the label: one
   row that wraps, from 900px aligned right, the aside free of the shared 36rem cap on this page so the row sits
   beside the title wherever it fits; under 720px and from 900px to 1023.98px Generate Evidence PDF takes a row of
   its own and the others share the next (under 600px at the narrower side padding); the share field and its status
   line under the row. The panel is one card of flush rows on hairline dividers in the border token: the Last location
   block, then the sections, closed .dashboard-parts disclosures (the pinned 48px summary), each summary an icon, its
   h2 and a chevron that turns when the section opens. From 900px the panel and the map stand side by side, the panel
   two fifths but never under 18rem, the map the rest (Map View keeps a third and two thirds): measured 2026-11-12
   beside the sidebar, two fifths reach 18rem at 1024px, so from there the columns are exactly two fifths and three,
   and from 900px to 1023.98px the panel holds 18rem, where Metatags' row (its "Coming soon" on one line) needs 256px
   of the card's 286px (plain two fifths left 236px at 900px and every row ran past the card, double-check R2 and R7).
   The map column sticks under the top of the window from 900px, scrolling inside itself when it is taller than the
   window, and comes first under 900px (Map View's rule). The destination is a hollow square in the text token, never
   a state color, so it cannot read as a tag's state. */
body.dashboard .shipment-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
}

body.dashboard .shipment-head-row > h1 {
  margin: 0;
  min-width: 0;
}

body.dashboard .shipment-head-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--accent);
}

body.dashboard .shipment-head-sub {
  overflow-wrap: anywhere;
}

body.dashboard .shipment-count-chip {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

body.dashboard .shipment-actions {
  width: 100%;
}

body.dashboard .shipment-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

body.dashboard .shipment-action-row > .actions {
  display: contents;
}

body.dashboard .shipment-action-row [hidden],
body.dashboard .shipment-actions > [hidden] {
  display: none;
}

body.dashboard .shipment-share-field {
  width: 100%;
  margin-top: var(--space-2);
}

body.dashboard .shipment-share-status {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .shipment-share-status:not(:empty) {
  margin-top: var(--space-2);
}

/* Where the one row does not fit (review R5, measured 2026-11-12: the manager's four actions need about 651px, so they
   wrapped Archive alone at 600px and, beside the sidebar, at 900px), Generate Evidence PDF takes a row of its own and
   the others share the next, edge to edge: under 720px, and from 900px (the sidebar's width) to 1023.98px. */
@media (max-width: 719.98px), (min-width: 900px) and (max-width: 1023.98px) {
  body.dashboard .shipment-action-row .button {
    flex: 1 1 0;
  }

  body.dashboard .shipment-action-row > .actions:first-child > .button {
    flex-basis: 100%;
  }
}

@media (max-width: 599.98px) {
  body.dashboard .shipment-action-row .button {
    padding: 0 var(--space-3);
  }
}

@media (min-width: 900px) {
  body.dashboard .shipment-head > .dashboard-page-aside {
    max-width: 100%;
  }

  body.dashboard .shipment-action-row {
    justify-content: flex-end;
  }

  body.dashboard .shipment-layout {
    grid-template-columns: minmax(18rem, 2fr) minmax(0, 3fr);
  }

  body.dashboard .shipment-map-column {
    position: sticky;
    top: var(--space-4);
    max-height: calc(100vh - 2 * var(--space-4));
    overflow-y: auto;
  }
}

body.dashboard .shipment-sections {
  gap: 0;
  margin: 0;
  padding: 0;
}

body.dashboard .shipment-sections > .shipment-section {
  margin: 0;
  padding: 0 var(--space-4);
  border-top: 1px solid var(--border);
}

body.dashboard .shipment-sections > .shipment-section[open] {
  padding-bottom: var(--space-4);
}

/* The Last location block (decision U1): per pinged tag its map pin, then the small muted label, the place in bold
   and "Last seen" in the muted token; per package its truck and the carrier line. The icon sits on the first line. */
body.dashboard .shipment-last {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow-wrap: anywhere;
}

body.dashboard .shipment-last p {
  margin: 0;
}

body.dashboard :is(.shipment-last-place, .shipment-last-carrier) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--space-3);
  align-items: start;
}

body.dashboard .shipment-last .icon {
  margin-top: 0.25em;
  color: var(--text-muted);
}

body.dashboard :is(.shipment-last-label, .shipment-last-seen) {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .shipment-last-label {
  font-weight: 700;
}

/* A tag's name in a Last location label or a carrier line moves to the next line whole, never broken at its hyphen
   (093-/PAIR1 in the narrow panel); one longer than the whole line (an unprinted id) still breaks rather than overflow. */
body.dashboard .shipment-last-tag {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.dashboard .shipment-last-where {
  font-size: var(--text-lg);
  font-weight: 700;
}

/* A section's summary reads as a heading, not a link (Phase 1 fix F3): the body text color and no underline, over the
   shared disclosure rule's accent and underline (this selector outweighs it), the pinned 48px height and the focus ring
   kept; the chevron turns when the section opens. */
body.dashboard .shipment-section > .shipment-section-summary {
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
  list-style: none;
}

body.dashboard .shipment-section > .shipment-section-summary::-webkit-details-marker {
  display: none;
}

body.dashboard .shipment-section > .shipment-section-summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

body.dashboard .shipment-section-summary > h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-md);
  font-weight: 600;
  text-decoration: none;
}

body.dashboard .shipment-section-chevron {
  display: inline-flex;
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

/* A summary's muted note (Metatags' "Coming soon", decision U6) sits at the right, just before the chevron. */
body.dashboard .shipment-section-note {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
  white-space: nowrap;
}

body.dashboard .shipment-section-note + .shipment-section-chevron {
  margin-left: 0;
}

body.dashboard .shipment-section[open] .shipment-section-chevron {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  body.dashboard .shipment-section-chevron {
    transition: none;
  }
}

body.dashboard .shipment-section .dashboard-details {
  margin-top: var(--space-2);
}

/* The panel is a column of at least 18rem beside the map from 900px, so the sections' labels take 8rem (Details' 12rem
   would leave a tracking number a few characters a line). */
@media (min-width: 900px) {
  body.dashboard .shipment-section .dashboard-details > div {
    grid-template-columns: 8rem minmax(0, 1fr);
  }
}

body.dashboard .shipment-section > .dashboard-details + .dashboard-package {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* The map card's Trail details disclosure (decision U4) sits a step under the key, its list a step under its summary. */
body.dashboard .shipment-map-column .map-legend + .dashboard-parts {
  margin-top: var(--space-3);
}

body.dashboard .shipment-trail-list {
  margin-top: var(--space-2);
}

body.dashboard .shipment-events {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .shipment-events > li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}

body.dashboard .shipment-events > li:first-child {
  border-top: 0;
}

body.dashboard .shipment-events p {
  margin: 0;
}

/* A carrier progress row (decision U5): the event on the first line, then one muted line of its time, its place and
   its status when that differs from the event. */
body.dashboard .shipment-event-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .map-destination {
  fill: var(--bg);
  stroke: var(--text);
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Live updates (dashboard/shipments/_feed_row, decision 3): one list on a vertical rail in the border token, a dot per
   row at the rail beside its first line (a carrier scan in the accent, a tag's place in the muted text, the origin
   hollow), every row one column at every width: the event, then its time and detail in one muted line (decision
   U5). A place on the map is a full-width button, 48px tall at least, lit on hover and while pinned (aria-pressed)
   through the tokens only. The ring it moves (journey_ring_controller.js, decision 5) is a hollow circle in the focus
   ring's token with a non-scaling stroke and a time label haloed in the page background, both shipped hidden and
   never a pointer target, so the map's drag and its dots' titles still work. */
body.dashboard .shipment-feed {
  position: relative;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

body.dashboard .shipment-feed::before {
  content: "";
  position: absolute;
  top: var(--space-3);
  bottom: var(--space-3);
  left: 5px;
  border-left: 2px solid var(--border);
}

body.dashboard .shipment-feed-more {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .shipment-feed-row {
  position: relative;
  padding-left: var(--space-6);
  overflow-wrap: anywhere;
}

body.dashboard .shipment-feed-row::before {
  content: "";
  position: absolute;
  top: 0.875rem;
  left: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  background: var(--text-muted);
}

body.dashboard .shipment-feed-carrier::before {
  border-color: var(--accent);
  background: var(--accent);
}

body.dashboard .shipment-feed-origin::before {
  top: 1.125rem;
  background: var(--surface);
}

body.dashboard .shipment-feed-earlier {
  padding-left: var(--space-6);
}

body.dashboard .shipment-feed-earlier > .dashboard-parts {
  margin-top: 0;
}

body.dashboard .shipment-feed-earlier .shipment-feed-more > .shipment-feed-row {
  margin-left: calc(-1 * var(--space-6));
}

body.dashboard .shipment-feed-entry {
  display: grid;
  min-height: var(--button-height);
  padding: var(--space-2);
  align-content: center;
}

body.dashboard .shipment-feed-body {
  display: grid;
  min-width: 0;
}

body.dashboard :is(.shipment-feed-text, .shipment-feed-meta) {
  display: block;
}

body.dashboard .shipment-feed-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .shipment-feed-point {
  width: 100%;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

body.dashboard .shipment-feed-point:hover,
body.dashboard .shipment-feed-point[aria-pressed="true"] {
  border-color: var(--border);
  background: var(--bg);
}

body.dashboard .shipment-feed-point[aria-pressed="true"] {
  border-color: var(--focus-ring);
}

body.dashboard .shipment-feed-point:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Network access (plan distributed-weaving-treehouse, decision 3): the form under the figures, its select and Save on
   one line where both fit (decision U6: the field grows from 16rem, Save keeps its width, both on the row's foot) and
   Save under the select where they do not, then the two Support links, each a full tap target. */
body.dashboard .shipment-network-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-4);
}

body.dashboard .shipment-network-form > .field {
  flex: 1 1 16rem;
  min-width: 0;
}

body.dashboard .shipment-network-form > .form-actions {
  flex: none;
  margin: 0;
}

body.dashboard .shipment-network-asks {
  margin-top: var(--space-4);
}

body.dashboard .shipment-network-asks a {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
}

body.dashboard .map-ping-mark {
  fill: none;
  stroke: var(--focus-ring);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

body.dashboard .map-ping-label {
  fill: var(--text);
  stroke: var(--bg);
  stroke-width: 4;
  stroke-linejoin: round;
  paint-order: stroke;
  vector-effect: non-scaling-stroke;
  font-weight: 700;
  pointer-events: none;
}

body.dashboard :is(.map-ping-mark, .map-ping-label)[hidden] {
  display: none;
}

/* A device card: the tag's name and its state chip on the first line, the destination and Last seen under it, each
   after its icon. The name's link covers the whole card (its ::after), so the card is one target; Show journey sits
   above that cover at the card's foot. The selected tag's card has the accent edge. */
body.dashboard .dashboard-devices {
  border-radius: var(--radius-input);
}

body.dashboard .dashboard-device-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-device {
  position: relative;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
}

body.dashboard .dashboard-device:hover {
  background: var(--surface);
}

body.dashboard .dashboard-device.is-selected {
  border-color: var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

body.dashboard .dashboard-device-link {
  display: grid;
  gap: var(--space-1);
  min-height: var(--button-height);
  color: var(--text);
  text-decoration: none;
}

/* The house's card of a tag another organization holds: the same lines with no link, at the linked card's height. */
body.dashboard .dashboard-device-body {
  display: grid;
  gap: var(--space-1);
  min-height: var(--button-height);
  color: var(--text);
}

body.dashboard .dashboard-device-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
}

body.dashboard .dashboard-device-link:focus-visible {
  outline: none;
}

body.dashboard .dashboard-device-link:focus-visible::after {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

body.dashboard .dashboard-device-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

body.dashboard .dashboard-device-line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-device-line .icon {
  flex: none;
}

body.dashboard .dashboard-device-journey {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: var(--button-height);
}

/* The map card's head: the heading, then the actions (Part 1 decision 6): with a selection Close the journey, a link
   that works without script, then the zoom buttons (+, minus, Reset), each a 48px secondary button. A bound's disabled
   button keeps the secondary look with muted text. The frame is the map's focus target (the keys), with the focus
   ring. From 900px touch-action none hands pinch and drag to map_zoom_controller.js; under 900px touch-action pan-y
   (Part 1 decision 8: the owner's answer, one finger scrolls the page over the map) leaves a vertical finger to the
   page's scroll, while a pinch (two pointers) and a sideways drag still reach the controller, and the buttons zoom. The
   cursor says the map can be dragged once it is zoomed. */
body.dashboard .dashboard-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

body.dashboard .dashboard-map-head > h2 {
  margin: 0;
}

body.dashboard .dashboard-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

body.dashboard .dashboard-map-actions > .dashboard-map-tool {
  font-size: var(--text-md);
}

body.dashboard .dashboard-map-tools {
  display: flex;
  gap: var(--space-2);
}

body.dashboard .dashboard-map-tool {
  min-width: var(--button-height);
  padding: 0 var(--space-3);
  font-size: var(--text-lg);
}

body.dashboard .dashboard-map-tool:last-child {
  font-size: var(--text-md);
}

body.dashboard .dashboard-map-tool[disabled] {
  border-color: var(--border);
  background: transparent;
  color: var(--text-muted);
}

body.dashboard .dashboard-map-frame {
  border-radius: var(--radius-input);
}

body.dashboard .dashboard-map-frame:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

body.dashboard .dashboard-map-frame .dashboard-map-svg {
  touch-action: none;
  user-select: none;
}

@media (max-width: 899.98px) {
  body.dashboard .dashboard-map-frame .dashboard-map-svg {
    touch-action: pan-y;
  }
}

body.dashboard .dashboard-map-frame.is-zoomed .dashboard-map-svg {
  cursor: grab;
}

body.dashboard .dashboard-map-frame.is-dragging .dashboard-map-svg {
  cursor: grabbing;
}

/* Alerts (dashboard/alerts, plan unified-giggling-music G20): the subtitle, the count line with Mark all read beside
   it from 600px, the Filters disclosure (a 48px summary over the filter form), the active filters as chips with a
   48px Clear each, the Unread only checkbox as a 48px label, and the list as cards. A card: the icon tile by type at
   the left, the title, message and meta, the severity badge at the right in small caps (its word in its color, never
   color alone), the Unread badge, and the More menu (a 48px summary opening a small panel anchored right, 48px items).
   An unread card is tinted with the accent at 8 percent over the surface; a read card is plain. Phone first: under
   600px the tile, the badges and More share the card's top row and the text takes the full width under them. */
body.dashboard .dashboard-subtitle {
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-filter-disclosure {
  margin-bottom: var(--space-3);
}

body.dashboard .dashboard-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-filter-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-filter-disclosure[open] > .dashboard-filter-toggle {
  border-color: var(--accent);
  color: var(--accent);
}

body.dashboard .dashboard-filter-disclosure > .dashboard-filters {
  margin: var(--space-3) 0 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

/* Tags' Filters disclosure (plan lazy-percolating-horizon, the UX pass of 2026-11-05; the owner: "Simple, elegant,
   intuitive, and functional is the goal."; his answer: on a phone the filters sit collapsed behind a Filters button
   with the count). Under 900px the Alerts rules above apply as they are: the 48px pill, the bordered card around the
   open form. From 900px, CSS alone and with no script: the details' content shows whether or not it is open (its
   ::details-content made visible), its summary is hidden and its form loses the card, so the filter row reads exactly
   as it did before the disclosure, from the first paint. The summary is hidden only where ::details-content is
   supported, so an older browser keeps the closed pill (one click, as on Alerts) and no browser loses the controls. */
@media (min-width: 900px) {
  @supports selector(::details-content) {
    body.dashboard .dashboard-filter-disclosure-phone::details-content {
      content-visibility: visible;
      display: block;
    }

    body.dashboard .dashboard-filter-disclosure-phone > .dashboard-filter-toggle {
      display: none;
    }

    body.dashboard .dashboard-filter-disclosure-phone > .dashboard-filters {
      margin: 0 0 var(--space-4);
      padding: 0;
      border: 0;
      border-radius: 0;
      background: none;
    }
  }
}

body.dashboard .dashboard-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  padding-left: var(--space-3);
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-filter-chip-clear {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  color: var(--accent);
  font-weight: 700;
}
body.dashboard .dashboard-alert-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

body.dashboard .dashboard-alert-count {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

body.dashboard .dashboard-mark-all {
  margin: 0;
}

body.dashboard .dashboard-check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  cursor: pointer;
}

body.dashboard .dashboard-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--accent);
}

body.dashboard .dashboard-alerts {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "tile badges more" "main main main";
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
}

@media (min-width: 600px) {
  body.dashboard .dashboard-alert {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "tile main badges more";
    align-items: start;
  }
}

/* The unread tint: the accent at 8 percent laid over the card (tokens.css is the one home of color literals, so no
   color function mixes it). The card's parts are positioned after it, so they paint above the tint, and the open More
   panel (z-index) above the cards that follow. */
body.dashboard .dashboard-alert-unread {
  position: relative;
}

body.dashboard .dashboard-alert-unread::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0.08;
  pointer-events: none;
}

body.dashboard .dashboard-alert > * {
  position: relative;
}

/* The icon tile's edge is currentColor, so each kind's one color rule paints the icon and its edge. */
body.dashboard .dashboard-alert-tile {
  display: inline-flex;
  grid-area: tile;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-lg);
}

body.dashboard .dashboard-alert-tile-critical {
  color: var(--danger);
}

body.dashboard .dashboard-alert-tile-location {
  color: var(--accent);
}

body.dashboard .dashboard-alert-tile-delivery {
  color: var(--success);
}

body.dashboard .dashboard-alert-main {
  grid-area: main;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-alert-badges {
  display: flex;
  flex-wrap: wrap;
  grid-area: badges;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin: 0;
}

@media (min-width: 600px) {
  body.dashboard .dashboard-alert-badges {
    min-height: var(--button-height);
  }
}

/* The severity in words, in small caps, its word and edge in the severity's token. */
body.dashboard .dashboard-severity {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.04em;
}

body.dashboard .dashboard-severity-info {
  color: var(--accent);
}

body.dashboard .dashboard-severity-warning {
  color: var(--warning);
}

body.dashboard .dashboard-severity-critical {
  color: var(--danger);
}

/* An unread alert says so in words (plan tender-pondering-raccoon D7b): a chip like the severity chip, its edge the
   unread accent, so the state never rests on the card's colored edge alone. */
body.dashboard .dashboard-alert-unread-badge {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
}

body.dashboard .dashboard-alert-type {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-alert-title {
  margin: 0;
  font-size: var(--text-md);
}

body.dashboard .dashboard-alert-message {
  margin: var(--space-1) 0 0;
}

body.dashboard .dashboard-alert-meta {
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-alert-meta a {
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
}

/* The More menu: a 48px summary with the ellipsis, its panel anchored to the card's right under it, each item 48px. */
body.dashboard .dashboard-more {
  position: relative;
  grid-area: more;
}

body.dashboard .dashboard-more-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  min-height: var(--button-height);
  border-radius: var(--radius-input);
  color: var(--text);
  font-size: var(--text-lg);
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-more-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-more[open] > .dashboard-more-toggle {
  background: var(--bg);
  color: var(--accent);
}

body.dashboard .dashboard-more-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 5;
  display: grid;
  gap: var(--space-1);
  width: max-content;
  min-width: 12rem;
  max-width: calc(100vw - 4 * var(--space-4));
  margin-top: var(--space-1);
  padding: var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
}

body.dashboard .dashboard-more-form {
  margin: 0;
}

body.dashboard .dashboard-more-form .button {
  width: 100%;
}

body.dashboard .dashboard-more-link,
body.dashboard .dashboard-more-note {
  display: flex;
  align-items: center;
  min-height: var(--button-height);
  margin: 0;
  padding: 0 var(--space-3);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-more-link {
  border-radius: var(--radius-input);
  color: var(--accent);
  font-weight: 700;
}

body.dashboard .dashboard-more-note {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* The Organizations table's Actions menu (plan dynamic-questing-rivest, 2026-11-05): a disclosure whose 48px summary,
   as wide as the cell, reads Actions with the sprite's chevron turned down (up when open). Its panel stays IN the cell's flow, so the row
   grows under it: the wrap's overflow-x: auto makes overflow-y auto too, so an absolutely positioned panel (the More
   menu's) would be clipped or scroll inside the wrap on the last rows. The items are the More menu's full-width
   forms; their words may wrap, and their padding is --space-2, a third less than the summary's, so the open menu fits
   the column the closed one takes and the table still fits its wrap at 1280: with the summary's --space-3 the longest
   word, "dashboard" of View dashboard, drew the item 109.2px against the summary's 104.8, the Actions column 133.2
   against 128.8 and the table 942.3 in its 941px wrap (measured headed 2026-11-19); at --space-2 the item is 101.2. */
body.dashboard .dashboard-actions {
  display: block;
}

body.dashboard .dashboard-actions-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--text-muted);
  border-radius: var(--radius-input);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-actions-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-actions-toggle .icon {
  width: 1em;
  height: 1em;
  transform: rotate(90deg);
}

body.dashboard .dashboard-actions[open] > .dashboard-actions-toggle {
  background: var(--bg);
}

body.dashboard .dashboard-actions[open] > .dashboard-actions-toggle .icon {
  transform: rotate(-90deg);
}

@media (hover: hover) {
  body.dashboard .dashboard-actions-toggle:hover {
    background: var(--bg);
  }
}

body.dashboard .dashboard-actions-panel {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

body.dashboard .dashboard-actions-panel .button {
  padding: 0 var(--space-2);
  white-space: normal;
}

/* The Organizations row's Edit distributor group, first in its Actions menu (plan breezy-sparking-cray, the UX pass,
   part two, 2026-11-19): the caption naming the group, then the Distributor label, its field and Save at the panel's
   width, a rule under it before the row's other actions. */
body.dashboard .dashboard-actions-group {
  display: grid;
  gap: var(--space-1);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

body.dashboard .dashboard-actions-caption {
  margin: 0;
  font-weight: 700;
}

body.dashboard .dashboard-actions-group .dashboard-role-form {
  align-items: stretch;
  gap: var(--space-1);
}

/* The viewing banner (plan dynamic-questing-rivest, 2026-11-05), inside the admin strip since the UX pass, part two
   (plan breezy-sparking-cray, 2026-11-19, the owner's words: "approve other recommendations"; _admin_strip.html.erb):
   while a Company Administrator views another organization the strip is one block in its inverse colours, the
   "Admin · Viewing as" line across the top, then the sentence and the two controls on a row that wraps. Stop viewing is
   the strip's inverse button (--bg behind, --text words), as the exit is, its hover the secondary button's, its focus
   ring --bg; the sentence's link is underlined in --bg with the --bg focus ring. Under 600px it stacks (below). */
body.dashboard > .dashboard-admin-strip.dashboard-viewing {
  align-items: center;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

body.dashboard .dashboard-viewing-name {
  flex: 1 1 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-viewing-text {
  flex: 1 1 16rem;
  margin: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-viewing .dashboard-viewing-text a {
  color: var(--bg);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

body.dashboard .dashboard-viewing .dashboard-viewing-text a:focus-visible {
  outline-color: var(--bg);
}

body.dashboard .dashboard-viewing-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

body.dashboard .dashboard-viewing-form {
  margin: 0;
}

body.dashboard :where(.dashboard-viewing) .dashboard-viewing-form .button {
  border-color: var(--bg);
  background: var(--bg);
  color: var(--text);
}

body.dashboard .dashboard-viewing .dashboard-viewing-form .button:focus-visible {
  outline-color: var(--bg);
}

/* Under 600px the block stacks: the "Admin · Viewing as" line, the sentence, Stop viewing at the full width (the rule
   below the viewing-only page's), then the Organization dashboard text link of the phone strip, 48px tall. */
@media (max-width: 599.98px) {
  body.dashboard > .dashboard-admin-strip.dashboard-viewing {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }

  body.dashboard .dashboard-viewing-text {
    flex: none;
  }

  body.dashboard .dashboard-viewing-controls {
    flex-direction: column;
    align-items: stretch;
  }

  body.dashboard .dashboard-viewing-controls > .dashboard-admin-strip-button {
    align-self: flex-start;
  }
}

/* The viewing-only page's Stop viewing stands apart from its sentence. */
body.dashboard .card > .dashboard-viewing-form {
  margin-top: var(--space-4);
}

@media (max-width: 599.98px) {
  body.dashboard .dashboard-viewing-form,
  body.dashboard .dashboard-viewing-form .button {
    width: 100%;
  }
}

@media (max-width: 599px) {
  body.dashboard .dashboard-mark-all,
  body.dashboard .dashboard-mark-all .button {
    width: 100%;
  }
}

/* Risk (dashboard/risk, plan unified-giggling-music G21): the top card in three panels, stacked under 900px with a rule
   between them and side by side from 900px with a rule at each panel's left: Score an address (street and street 2
   full width, then ZIP, city and state side by side in a panel at least 21rem wide), the gauge and the scored address with the reason and
   the six signals. The gauge is an inline SVG arc: the track and the value path, the value as long as the score
   (stroke-dasharray over pathLength 100), painted by classes on the tokens, never an attribute or an inline style; the
   score and "out of 100" sit inside the arc, the level in words with a colored left edge under it (never color alone).
   The intro paragraph of every page that has one keeps the same gap above the card that follows it. */
body.dashboard :is(.dashboard-risk-intro, .dashboard-intro) {
  margin: 0 0 var(--space-4);
}

body.dashboard .dashboard-risk-top {
  display: grid;
  gap: var(--space-4);
}

body.dashboard .dashboard-risk-panel {
  min-width: 0;
}

body.dashboard .dashboard-risk-panel + .dashboard-risk-panel {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  body.dashboard .dashboard-risk-top {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
  }

  body.dashboard .dashboard-risk-panel + .dashboard-risk-panel {
    padding-top: 0;
    padding-left: var(--space-6);
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

body.dashboard .dashboard-risk-lead {
  margin: 0 0 var(--space-3);
}

body.dashboard .dashboard-risk-form {
  display: grid;
  gap: var(--space-3);
}

body.dashboard .dashboard-risk-form .field {
  margin: 0;
}

body.dashboard .dashboard-risk-form .form-actions {
  margin: 0;
}

/* ZIP, City and State share a row once the Score panel itself is at least 21rem (336px) wide, a container query on the
   panel rather than a window width: from 900px the panel is a third of the card (204px at 900, 312px at 1180, 350px at
   1280), so a window rule left City a 24px box there. At 336px City keeps 120px beside the 7.5rem ZIP and the 4.5rem
   State; a narrower panel stacks the three, as on a phone. The ZIP column is 7.5rem (120px) so a full ZIP+4 fits its
   box: "28348-1234" measures 92px in the system font, plus the input's 24px of padding and 2px of border (plan
   sorted-wibbling-sparkle, second arc, decision 1, and its third review's finding 1). Container queries hold in Chrome
   105, Safari 16 and Firefox 110, all under the browser floor in ApplicationController (Chrome 105, Safari 16.4,
   Firefox 121). */
body.dashboard .dashboard-risk-score {
  container: risk-score / inline-size;
}

@container risk-score (min-width: 21rem) {
  body.dashboard .dashboard-risk-form {
    grid-template-columns: 7.5rem minmax(0, 1fr) 4.5rem;
  }

  body.dashboard .dashboard-risk-form .dashboard-risk-field-street,
  body.dashboard .dashboard-risk-form .dashboard-risk-field-street2,
  body.dashboard .dashboard-risk-form .dashboard-zip-help,
  body.dashboard .dashboard-risk-form .form-actions {
    grid-column: 1 / -1;
  }
}

/* The Risk form's ZIP lookup (zip_lookup_controller.js, plan sorted-wibbling-sparkle, decision 9): the status line and
   the choice buttons span the form's row wherever the row is three-up (the container query above), after the ZIP and State error lines, which sit here as one
   full-width line each rather than wrapped inside their narrow columns (second arc, review finding 2). While the line,
   the choices and both error lines are empty or hidden the block leaves the grid flow (position: absolute, zero-sized:
   no track and no gap), so the form at rest keeps its spacing and the role="status" line stays in the accessibility
   tree, ready to be announced when its text arrives. A visible error line sits a small gap above the next visible line.
   A choice is a 48px outlined button (never .button: Risk keeps one filled action), wrapping on a phone. The data
   credit sits muted under the form. Tokens only. */
body.dashboard .dashboard-zip-status {
  margin: 0;
}

body.dashboard .dashboard-zip-help:has(> .dashboard-zip-status:empty):has(> .dashboard-zip-choices:empty):not(:has(> .field-error:not([hidden]))) {
  position: absolute;
}

body.dashboard .dashboard-zip-help .field-error {
  margin-top: 0;
}

body.dashboard .dashboard-zip-help .field-error:not([hidden]) ~ .field-error:not([hidden]),
body.dashboard .dashboard-zip-help .field-error:not([hidden]) ~ .dashboard-zip-status:not(:empty) {
  margin-top: var(--space-2);
}

body.dashboard .dashboard-zip-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

body.dashboard .dashboard-zip-status:not(:empty) + .dashboard-zip-choices:not(:empty) {
  margin-top: var(--space-2);
}

body.dashboard .dashboard-zip-choice {
  min-height: var(--button-height);
  padding: 0 var(--space-3);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.dashboard .dashboard-zip-credit {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
}

/* A box the ZIP lookup filled (data-zip-lookup-filled, set by zip_lookup_controller.js and removed on the customer's
   first edit) wears --input-filled, a pale blue in the browsers' autofill tint (a deep muted blue in Dark), distinct from
   the card's own --surface, so a filled value reads differently from a typed one; its input edge keeps 3:1 on it and the
   error border still shows on it. The State box shows its letters in capitals (the server sends them so). Plan
   sorted-wibbling-sparkle, second arc, decisions 2 and 4, and its review round's finding 3. Tokens only. */
body.dashboard .dashboard-risk-form .field-input[data-zip-lookup-filled] {
  background: var(--input-filled);
}

body.dashboard .dashboard-risk-field-state .field-input {
  text-transform: uppercase;
}

body.dashboard .dashboard-risk-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

body.dashboard .dashboard-risk-when {
  margin: 0;
  font-size: var(--text-sm);
}

body.dashboard .dashboard-risk-gauge {
  position: relative;
  width: 100%;
  max-width: 15rem;
}

body.dashboard .risk-gauge {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

body.dashboard .risk-gauge-track {
  stroke: var(--border);
}

body.dashboard .risk-gauge-value {
  stroke: var(--text-muted);
}

body.dashboard .risk-gauge-value-low {
  stroke: var(--success);
}

body.dashboard .risk-gauge-value-medium {
  stroke: var(--warning);
}

body.dashboard .risk-gauge-value-high {
  stroke: var(--danger);
}

body.dashboard .dashboard-risk-gauge-text {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
}

body.dashboard .dashboard-risk-gauge-text p {
  margin: 0;
}

body.dashboard .dashboard-risk-score-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

body.dashboard .dashboard-risk-score-none {
  color: var(--text-muted);
  font-size: var(--text-lg);
  font-weight: 700;
}

body.dashboard .dashboard-risk-out-of {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .risk-level {
  display: inline-block;
  margin: 0;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

body.dashboard .risk-level-low {
  border-left-color: var(--success);
}

body.dashboard .risk-level-medium {
  border-left-color: var(--warning);
}

body.dashboard .risk-level-high {
  border-color: var(--danger);
  border-left-color: var(--danger);
}

body.dashboard .dashboard-risk-result h2 {
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-risk-empty {
  margin: 0;
}

body.dashboard .dashboard-risk-reason {
  margin: 0 0 var(--space-4);
  font-size: var(--text-lg);
  overflow-wrap: anywhere;
}

/* The signals read one column in the third panel at every width: the signal, then its points and explanation. */
body.dashboard .dashboard-risk-signals > div {
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1);
}

body.dashboard .dashboard-risk-signals dd {
  display: grid;
  gap: var(--space-1);
}

body.dashboard .dashboard-risk-signal-score {
  font-weight: 700;
}

body.dashboard .dashboard-risk-signal-explanation {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* A level's color (Dashboard::RiskController::TONES): a count card's figure and a level's word in Live activity, its
   label or word beside it in words. */
body.dashboard .dashboard-tone-danger {
  color: var(--danger);
}

body.dashboard .dashboard-tone-warning {
  color: var(--warning);
}

body.dashboard .dashboard-tone-success {
  color: var(--success);
}

/* Live activity: one sentence a row, the age muted, the address and the level in bold, the address wrapping. */
body.dashboard .dashboard-risk-activity > li {
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-risk-activity-when {
  color: var(--text-muted);
}

body.dashboard :is(.dashboard-risk-activity-address, .dashboard-risk-activity-level) {
  font-weight: 700;
}

/* Disputes (dashboard/disputes): the status chip says the status in words with a colored left edge (never color
   alone), the tab marked aria-current="page" as the map's chips, the Amount at risk card's "How this is computed"
   disclosure (a 48px summary, then the formula and one line per part: the shipment, its disputes and its declared
   value) and the action buttons' forms side by side. */
body.dashboard .dispute-status {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

body.dashboard .dispute-status-open {
  border-color: var(--danger);
  border-left-color: var(--danger);
}

body.dashboard .dispute-status-investigating {
  border-left-color: var(--warning);
}

body.dashboard .dispute-status-resolved {
  border-left-color: var(--success);
}

body.dashboard .dashboard-chip[aria-current="page"] {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
  font-weight: 700;
}

/* The amount never runs past its card: a long figure wraps, and under 600px every card of the Disputes page takes
   the whole row, so the figure and its opened parts have the phone's width and no card sits beside an empty half. */
body.dashboard .dashboard-count-amount .dashboard-count-value {
  overflow-wrap: anywhere;
}

@media (max-width: 599px) {
  body.dashboard .dashboard-counts-disputes > li {
    grid-column: 1 / -1;
  }
}

body.dashboard .dashboard-parts {
  margin-top: var(--space-2);
}

body.dashboard :is(.dashboard-parts, .dashboard-formulas) > summary {
  display: flex;
  align-items: center;
  min-height: var(--button-height);
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* A row of figures' formulas (dashboard/_formulas, plan tender-pondering-raccoon D1): closed under its row, the 48px
   summary above with the Menu toggle's drawn caret (borders in currentColor, so no icon file) turning when it opens. */
body.dashboard .dashboard-formulas {
  margin-top: var(--space-2);
}

body.dashboard .dashboard-counts + .dashboard-formulas {
  margin: calc(-1 * var(--space-2)) 0 var(--space-4);
}

/* Inside a card (Home's Fulfillment pipeline) the card's own padding ends the disclosure, as under the other cards. */
body.dashboard .card > .dashboard-formulas:last-child {
  margin-bottom: 0;
}

body.dashboard .dashboard-formulas > summary {
  gap: var(--space-2);
  width: fit-content;
  list-style: none;
}

body.dashboard .dashboard-formulas > summary::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-formulas > summary::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

body.dashboard .dashboard-formulas[open] > summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

body.dashboard .dashboard-formulas > .dashboard-formula {
  margin: 0;
}

body.dashboard .dashboard-count .dashboard-parts-formula {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-parts-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-parts-list > li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-parts-value {
  font-weight: 700;
}

body.dashboard .dashboard-inline-form {
  margin: 0;
}

/* Reports (dashboard/reports): the index's cards, one column on a phone and two from 900px, each with View and CSV
   (48px buttons); a report's description and summary above its table. */
body.dashboard .dashboard-reports {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .dashboard-reports > .card {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-reports {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.dashboard .dashboard-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

body.dashboard .dashboard-report-description,
body.dashboard .dashboard-report-summary {
  margin: 0 0 var(--space-2);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-report-summary {
  font-weight: 700;
}

/* Search (dashboard/search): one card a group; a long title, claim or address wraps inside it. */
body.dashboard .dashboard-search-group {
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-search-title {
  display: block;
  font-weight: 700;
}

/* Users and Teams, API Keys and Integrations (dashboard/users, api_keys, integrations): a new key or signing secret
   shown once with an accent edge, in mono, breaking anywhere so a phone never scrolls sideways; the role form (the
   Organizations distributor form reuses it stacked; the Users table lays it on one line, below); the events as a
   frameless fieldset of 48px checkbox labels. */
body.dashboard .dashboard-secret {
  border-left: 4px solid var(--accent);
}

body.dashboard .dashboard-secret-value {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--bg);
  font-family: var(--font-mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* A visually hidden span in a table cell (a row button's "of <name>") is absolutely positioned: without a positioned
   ancestor its containing block is the page, so a span in a column scrolled out of the wrap widened the page itself
   (measured at 1280px on Users and Teams). The wrap as its containing block keeps it inside the wrap's own scroll. */
body.dashboard .table-wrap {
  position: relative;
}

body.dashboard .dashboard-role-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
}

body.dashboard .dashboard-role-form .field-input {
  width: auto;
}

/* The Organizations row's distributor field, in its Actions menu's Edit distributor group (plan breezy-sparking-cray,
   the UX pass, part two, 2026-11-19, the owner's words: "approve other recommendations"): as wide as the panel, its Save
   and the menu's buttons under it, so the group reads as one column. The field moved out of the Name cell, so the two
   rules that held it there (max-width: 100%, and 12rem from 900px) went with it. size 12 draws it about 121px: at 1280
   over the 24-row local list (headed, a classic 15px scrollbar, the 941px wrap) the open Actions column measured 144.9px
   against 128.8 closed and the table stayed 941 in 941; at 390 the open column was 140.8 (measured 2026-11-19). */
body.dashboard .dashboard-actions-panel .dashboard-role-form .field-input {
  width: 100%;
}

/* The Users table's rows (plan frolicking-singing-hopper, Plan 2 U2). Another user's role is the summary of a closed
   Change role disclosure: the badge and a chevron, a 48px target, the marker hidden. It opens INLINE under the badge
   (the alerts More panel is absolutely positioned and would be clipped by the wrap's overflow), the select and Save
   role on one line when the cell has room, else Save role under the select. The Actions cell stacks its controls, one
   button wide: Resend invite, then Remove, a closed disclosure styled as the secondary button it replaced, whose
   panel holds the sentence naming the person and Remove the account (two presses, no dialog, no script). The cells
   do not wrap (the table rule), so the panel wraps its sentence itself and from 600px is 13rem wide: on one line the
   open sentence made the Actions column 511px and the table 1,221px in its 956px wrap, and held to the closed column
   (147px) Remove the account broke over three lines (both measured at 1280). On a phone it takes the value column. */
body.dashboard .dashboard-role-change-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--button-height);
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-role-change-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-users-table .dashboard-role-form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  margin: var(--space-1) 0 var(--space-2);
}

body.dashboard .dashboard-user-actions {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
}

/* A sentence that names an unlabeled webhook's URL breaks it instead of running past a phone's width. */
body.dashboard .flash {
  overflow-wrap: anywhere;
}

/* Integrations' Send test event and Deactivate under the word Active, as far from it as from each other. */
body.dashboard .dashboard-webhook-actions {
  margin-top: var(--space-2);
}

/* From 600px the Actions cell's buttons keep one line (over the inline forms' wrap rule above, by order): with the
   disclosures closed at 1280 the column took 143px and Resend invite broke over two lines while Email took the slack.
   Under 600px the stacked card's value column is narrower than Remove the account, so there it may wrap. */
@media (min-width: 600px) {
  body.dashboard .dashboard-users-table td .dashboard-user-actions .button {
    white-space: nowrap;
  }
}

body.dashboard .dashboard-remove-toggle {
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-remove-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard .dashboard-remove-panel {
  display: grid;
  justify-items: start;
  gap: var(--space-2);
  margin-top: var(--space-2);
  white-space: normal;
}

body.dashboard .dashboard-remove-panel > p {
  margin: 0;
}

@media (min-width: 600px) {
  body.dashboard .dashboard-remove-panel {
    width: 13rem;
  }
}

/* A Users row's badge may wrap its words, at every width (plan whimsical-twirling-hare): on one line "Organization
   Administrator", and "Company Administrator" beside a Change role chevron, ran past the 375px card, and at 1280 the
   Role column's one-line badges took the room the Email cell needed, so a closed table broke company@secretag.example
   mid-address. The Role permissions cards keep their badges on one line. */
body.dashboard .dashboard-users-table :is(td > .dashboard-role-badge, .dashboard-role-change-toggle > .dashboard-role-badge) {
  min-width: 0;
  white-space: normal;
}

/* Under 600px the Users table stacks with the other lists (table-stack): the own row's badge keeps its own width in
   the value column, and the own row's empty Actions cell is not drawn as a label with nothing after it. */
@media (max-width: 599.98px) {
  body.dashboard .table-wrap.table-stack .dashboard-users-table td > .dashboard-role-badge {
    justify-self: start;
  }

  /* An open Change role takes the card's whole width under its label: in the value column the select, as wide as its
     longest option, Organization Administrator (plan whimsical-twirling-hare), ran past the 375px card. */
  body.dashboard .table-wrap.table-stack .dashboard-users-table td > .dashboard-role-change[open] {
    grid-column: 1 / -1;
  }

  body.dashboard .table-wrap.table-stack .dashboard-users-table td:empty {
    display: none;
  }
}

/* The invite form's closed disclosure under the Users card (Support's New case toggle shape, its own rule): the head's
   Invite someone link opens it and focuses this summary. */
body.dashboard .dashboard-invite-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--button-height);
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

body.dashboard .dashboard-invite-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard details.dashboard-invite[open] > .dashboard-invite-toggle {
  margin-bottom: var(--space-3);
}

/* Role permissions (dashboard/users, plan frolicking-singing-hopper D4 and Plan 2 U3): one card a role, one column on
   a phone and exactly two from 600px, so the four read two by two, each row's cards one height. A card's head row
   holds the badge and, at the right, how many of the organization's users hold the role; the Viewer card (the
   default) says so on a muted line under it. The badge is the account menu's pill with the role's own edge and text
   colour (admin the danger token, manager the accent, viewer the muted grey, reports user the warning amber; the
   Company Administrator, plan whimsical-twirling-hare, the danger token filled, its text the page background); its
   icon and its words always name the role, so the colour is never the only cue. */
body.dashboard .dashboard-roles {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr);
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  body.dashboard .dashboard-roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.dashboard .dashboard-role-card {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
}

body.dashboard .dashboard-role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

body.dashboard .dashboard-role-card h3 {
  margin: 0;
}

body.dashboard .dashboard-role-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-role-count {
  white-space: nowrap;
}

body.dashboard .dashboard-role-card .dashboard-role-default {
  margin-bottom: var(--space-1);
  font-weight: 700;
}

body.dashboard :is(.dashboard-role-card, .dashboard-users-table) .dashboard-role-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  white-space: nowrap;
}

body.dashboard .dashboard-role-badge .icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

body.dashboard .dashboard-role-badge-company_admin {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--bg);
}

body.dashboard .dashboard-role-badge-admin {
  border-color: var(--danger);
  color: var(--danger);
}

body.dashboard .dashboard-role-badge-manager {
  border-color: var(--accent);
  color: var(--accent);
}

body.dashboard .dashboard-role-badge-viewer {
  border-color: var(--text-muted);
  color: var(--text-muted);
}

body.dashboard .dashboard-role-badge-reports_user {
  border-color: var(--warning);
  color: var(--warning);
}

body.dashboard .dashboard-events {
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
}

body.dashboard .dashboard-events .dashboard-check {
  display: flex;
}

/* Organizations (dashboard/organizations): the first admin's Name and Email address are one frameless fieldset under
   the organization's name, its legend 16px bold, one step above the 14px field labels, so the group reads as a heading
   between the fields. min-width: 0 drops a fieldset's default min-content floor, which would widen a phone layout. */
body.dashboard .dashboard-fieldset {
  margin: var(--space-6) 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

body.dashboard .dashboard-legend {
  padding: 0;
  margin: 0 0 var(--space-3);
  font-weight: 700;
}

/* Support: the case status chip (the dispute chip's shape) and the thread. A message body is text: its line breaks
   are kept by white-space, and a long word or address wraps instead of widening the page. */
body.dashboard .support-status {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

/* Each status its own edge (plan unified-giggling-music G25): new the GET method's blue, open the accent, in progress
   the warning amber, waiting on you the PATCH method's orange all round (the one word that asks something of the
   side reading it), resolved the success green, closed the muted grey of the base rule. The word always names the status. */
body.dashboard .support-status-new {
  border-left-color: var(--method-get);
}

body.dashboard .support-status-open {
  border-left-color: var(--accent);
}

body.dashboard .support-status-in_progress {
  border-left-color: var(--warning);
}

body.dashboard .support-status-waiting_on_customer {
  border-color: var(--method-patch);
}

body.dashboard .support-status-resolved {
  border-left-color: var(--success);
}

body.dashboard .support-thread {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.dashboard .support-message {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-input);
  background: var(--bg);
  min-width: 0;
}

body.dashboard .support-message-secretag {
  border-left-color: var(--accent);
}

body.dashboard .support-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

body.dashboard .support-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Phone stacks (ux-2 B1), opt-in per table (table-wrap table-stack): under 600px each row is a card, its row header on
   the first line and every cell a labelled line (the cell's data-label before its value), nothing to swipe. The thead
   is display: none, which also takes it out of the accessibility tree; the label is drawn with empty alternative text
   so a screen reader does not read it twice (a browser without that syntax keeps the first content line). The held
   first column's sticky rules are undone here; these rules sit after them so they win at equal specificity. From
   600px the table renders exactly as every other table. */
@media (max-width: 599.98px) {
  body.dashboard .table-wrap.table-stack {
    border: 0;
    background: none;
  }

  body.dashboard .table-wrap.table-stack thead {
    display: none;
  }

  body.dashboard .table-wrap.table-stack :is(table, tbody, tr) {
    display: block;
  }

  body.dashboard .table-wrap.table-stack tr {
    margin: 0 0 var(--space-3);
    padding: var(--space-2) 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
  }

  body.dashboard .table-wrap.table-stack :is(th, td) {
    display: block;
    position: static;
    min-width: 0;
    max-width: none;
    padding: var(--space-1) var(--space-3);
    border: 0;
    background: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.dashboard .table-wrap.table-stack th {
    font-weight: 700;
  }

  body.dashboard .table-wrap.table-stack td {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    column-gap: var(--space-3);
  }

  body.dashboard .table-wrap.table-stack td::before {
    content: attr(data-label);
    content: attr(data-label) / "";
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 400;
    text-align: left;
  }

  /* Every element of a cell's value sits in the value column: a cell holding text and a note (a dispute's claim and
     its type) puts the note under the text, never under the label (seen at 375 in the Phase 8 walk, 2026-11-03). */
  body.dashboard .table-wrap.table-stack td > * {
    grid-column: 2;
  }

  /* A chip that is its cell's value keeps its own width instead of stretching across the value column (Home's Open
     disputes status, seen at 375 in the Phase 8 walk, 2026-11-03). */
  body.dashboard .table-wrap.table-stack td > :is(.state-chip, .dispute-status) {
    justify-self: start;
  }

  /* The report card's Grade ends where the figures above it end, a letter and "Not enough data" alike (the owner,
     2026-11-23: "right-align Grade"): on a card it started left, or centered, under four right-aligned figures. */
  body.dashboard .table-wrap.table-stack td[data-label="Grade"] {
    text-align: right;
  }

  /* A Users card's Actions line holds two forms, Resend invite over Remove: without a row gap the two 48px buttons
     touch (0px apart, measured at 375 on 2026-11-05); the gap matches the role form's select over Save role (8px). */
  body.dashboard .table-wrap.table-stack .dashboard-users-table td {
    row-gap: var(--space-2);
  }

  /* An Organizations card's Actions menu takes the card's whole width under its label, closed and open (plan
     buzzing-dreaming-eich, part 2, 2026-11-20, the owner's words: "choose only 1"), as the Users card's open Change
     role does: in the value column the menu was 174px of a 324px card at 390 and 104px of 254 at 320 with overlay
     scrollbars (a phone), and 159 of 309 and 89 of 239 with a classic 15px scrollbar, where "Actions" broke in two
     and the Distributor field showed 6 characters (measured headed 2026-11-20). Spanning, the menu's width is the
     card's less the cell's two --space-3 paddings (298 of 324 at 390, 228 of 254 at 320, overlay), and its panel,
     field and Save fill it. */
  body.dashboard .table-wrap.table-stack td > .dashboard-actions {
    grid-column: 1 / -1;
  }
}

/* Shipments (plan unified-giggling-music G14, G15, D11). The tiles: an icon tile and a figure in the group's color
   (In transit the --state-transit purple, Approaching the warning, Delivered the success, Disputed the danger token),
   the label in words beside them, so the color never stands alone. Phone first: two tiles a row at 375, four from
   900px. */
body.dashboard .dashboard-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Under 900px the icon tile sits above the label, so "Approaching" keeps its line in a half-width tile; from 900px it
   sits beside the label and the figure. */
@media (min-width: 900px) {
  body.dashboard .dashboard-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.dashboard .dashboard-tile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-3);
    align-items: center;
  }
}

@media (max-width: 899.98px) {
  body.dashboard .dashboard-tile-icon {
    margin-bottom: var(--space-2);
  }
}

/* The icon tile's edge is currentColor, so each group's one color rule paints the icon, its edge and the figure. */
body.dashboard .dashboard-tile-icon {
  display: inline-flex;
  grid-row: 1 / span 2;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-input);
  background: var(--bg);
  font-size: var(--text-lg);
}

body.dashboard .dashboard-tile .dashboard-count-label {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-tile .dashboard-count-value {
  line-height: 1.1;
}

body.dashboard .dashboard-tile-transit :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--state-transit);
}

body.dashboard .dashboard-tile-approaching :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--warning);
}

body.dashboard .dashboard-tile-delivered :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--success);
}

body.dashboard .dashboard-tile-disputed :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--danger);
}

/* Disputes (plan unified-giggling-music G23): the four cards share the Shipments tile (Open the danger token, Amount
   at risk the warning, Avg response time the accent, Resolved the plain figure with a muted icon), each label in words
   beside its color. */
body.dashboard .dashboard-tile-danger :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--danger);
}

body.dashboard .dashboard-tile-warning :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--warning);
}

body.dashboard .dashboard-tile-info :is(.dashboard-tile-icon, .dashboard-count-value) {
  color: var(--accent);
}

body.dashboard .dashboard-tile-plain .dashboard-tile-icon {
  color: var(--text-muted);
}

/* A dispute card's icon tile sits above its label at every width, so a long amount ("$1,250.05") or "24.0 hours"
   keeps the card's whole width and its one line, and the amount's parts disclosure the width under it. */
@media (min-width: 900px) {
  body.dashboard .dashboard-counts-disputes > .dashboard-tile {
    display: block;
  }

  body.dashboard .dashboard-counts-disputes .dashboard-tile-icon {
    margin-bottom: var(--space-2);
  }
}

/* The tabs as a chip row with the list's count at its right; on a narrow phone the count wraps under the chips. */
body.dashboard .dashboard-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-4);
}

body.dashboard .dashboard-chip-row .dashboard-chips {
  margin: 0;
}

body.dashboard .dashboard-chip-count {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

/* An empty list's card: the icon tile above the sentence, centered. */
body.dashboard .dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: var(--space-8) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  text-align: center;
}

body.dashboard .dashboard-empty > .dashboard-list-summary {
  margin: 0;
}

body.dashboard :is(.dashboard-empty-icon, .dashboard-report-icon) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-xl);
}

/* Reports (G24): each card's icon tile beside its title, in the accent. */
body.dashboard .dashboard-report-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
}

body.dashboard .dashboard-report-head > h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-report-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  font-size: var(--text-lg);
}

/* A tag state's chip (dashboard/_state_chip): the state in words with a colored left edge, as the disputes' chip;
   completed and disputed in transit also take the color all round. The palette is tokens.css's: in transit the
   --state-transit purple, at origin the muted text, awaiting first ping the border, delivery verification the
   --state-verification teal. */
body.dashboard .state-chip {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  white-space: nowrap;
}

body.dashboard .state-chip-awaiting_first_ping {
  border-left-color: var(--border);
  color: var(--text-muted);
}

body.dashboard .state-chip-in_transit {
  border-left-color: var(--state-transit);
}

body.dashboard .state-chip-approaching {
  border-left-color: var(--warning);
}

body.dashboard .state-chip-delivered {
  border-left-color: var(--success);
}

body.dashboard .state-chip-delivery_verification {
  border-left-color: var(--state-verification);
}

body.dashboard .state-chip-disputed_in_transit {
  border-color: var(--danger);
}

body.dashboard .state-chip-completed {
  border-color: var(--success);
}

body.dashboard .state-chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}

body.dashboard .state-chip-more {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}

/* A shipment row: the tracking number as the lead, its tags in mono under it; the carrier after its truck; the
   chevron cell holds the row's one link, a 48px square. */
body.dashboard .dashboard-row-lead {
  display: block;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-row-sub {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

body.dashboard .dashboard-carrier {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

body.dashboard .dashboard-carrier .icon {
  color: var(--text-muted);
}

body.dashboard .dashboard-table .dashboard-cell-go {
  width: var(--button-height);
  padding-top: 0;
  padding-bottom: 0;
  text-align: right;
}

body.dashboard .dashboard-row-go {
  justify-content: center;
  min-width: var(--button-height);
  font-size: var(--text-lg);
}

/* A Tags row's controls (plan woolly-honking-thompson, 2026-11-24, the owner's answer: an icon on each row): the archive
   icon, then the chevron, side by side, each a 48px square. The icon is a form's button with no label on the screen, so
   it draws as the chevron's neighbor, never as a button; its focus ring is the page's. */
body.dashboard .dashboard-row-controls {
  display: inline-flex;
  align-items: center;
}

body.dashboard .dashboard-row-archive {
  margin: 0;
}

body.dashboard .dashboard-row-archive-press {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  padding: 0;
  border: 0;
  border-radius: var(--radius-input);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

body.dashboard .dashboard-row-archive-press:active {
  color: var(--accent-pressed);
}

@media (hover: hover) {
  body.dashboard .dashboard-row-archive-press:hover {
    color: var(--text);
  }
}

/* A page of the house's list with both controls on a row takes the second square's width out of Destination, so the
   table keeps its 1280 fit (measured 2026-11-24 with the widest state chip and long names: 997px in its 990px wrap
   without this rule). */
@media (min-width: 600px) {
  body.dashboard .dashboard-tags-table-house:has(.dashboard-row-archive + .dashboard-row-go) .dashboard-cell-wide {
    min-width: calc(14rem - var(--button-height));
  }
}

/* A Tags row's name links to its shipment (2026-11-20, the owner's order: every tag on a shipment): the link holds the
   lead (a block) and shrinks to it, so the click area and the focus ring are the name, never the empty rest of the
   cell, and a long name wraps inside the cell as before, on a phone card too. Its color and underline are the page's
   other text links'. */
body.dashboard .dashboard-tags-table .dashboard-row-lead-link {
  display: inline-block;
  max-width: 100%;
}

/* The house's Tags table (plan lazy-percolating-horizon, 2026-11-05): its Organization column fits the 1280 wrap
   because the holder's name and the row's lead wrap in their own columns (on one line each, the house's table
   measured 1,373px in its 990px wrap with a 54-character organization name and a 25-character tag name). The lead
   keeps at least 9rem, so a short tag name never breaks, and the holder's column at least 8rem; a long value wraps at
   a word or a hyphen first. Since 2026-11-20 (the Tags list's name link) a customer's table wraps its lead the same
   way: without it, .table-wrap th's nowrap kept a 47-character tag name on one line and the table measured 1,150px in
   its 990px wrap, Carrier and the chevron behind a sideways scroll. The holder's column stays the house's alone. */
body.dashboard .dashboard-tags-table tbody th,
body.dashboard .dashboard-tags-table-house .dashboard-cell-holder {
  white-space: normal;
  overflow-wrap: break-word;
}

body.dashboard .dashboard-tags-table tbody th {
  min-width: 9rem;
}

body.dashboard .dashboard-tags-table-house .dashboard-cell-holder {
  min-width: 8rem;
}

/* On a phone the shipment or tag card (and a figure page's row) keeps its chevron at the top right, beside the lead,
   with no label line of its own. */
@media (max-width: 599.98px) {
  body.dashboard .table-wrap.table-stack :is(.dashboard-shipments-table, .dashboard-tags-table, .dashboard-figure-table) tr {
    position: relative;
  }

  body.dashboard .table-wrap.table-stack :is(.dashboard-shipments-table, .dashboard-tags-table, .dashboard-figure-table) th {
    padding-right: calc(var(--button-height) + var(--space-2));
  }

  /* A Tags card with the archive icon beside its chevron keeps both clear of the lead. */
  body.dashboard .table-wrap.table-stack .dashboard-tags-table tr:has(.dashboard-row-archive + .dashboard-row-go) th {
    padding-right: calc(2 * var(--button-height) + var(--space-2));
  }

  /* A chip that is its cell's value keeps its own width instead of stretching across the card's value column. */
  body.dashboard .table-wrap.table-stack .dashboard-tags-table td > .state-chip {
    justify-self: start;
  }

  body.dashboard .table-wrap.table-stack :is(.dashboard-shipments-table, .dashboard-tags-table, .dashboard-figure-table) td.dashboard-cell-go {
    display: block;
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
    width: auto;
    padding: 0;
  }

  body.dashboard .table-wrap.table-stack :is(.dashboard-shipments-table, .dashboard-tags-table, .dashboard-figure-table) td.dashboard-cell-go::before {
    content: none;
  }
}

/* The house's group rows, the sort marker and the holder's clamp (plan lazy-percolating-horizon, the UX pass of
   2026-11-05; the owner: "Simple, elegant, intuitive, and functional is the goal."; his answer: the house's three-group
   order shows as group headers in the table, with the sort shown on the Last seen column header). A group row is a
   bold, small band on the surface spanning the table (no first-column width cap); under 600px it is a plain heading
   line between the cards, no card edge, no band and no chevron slot. The Last seen arrow sits inline at the text's
   size. From 600px the holder's name takes at most two lines, the whole name in its title; on a phone the card shows
   it whole. Tokens only. The class is dashboard-tags-group-head, never Home's dashboard-group-head: that caption row's
   display: flex made the group row's one cell a block one column wide (measured at 1280 on 2026-11-05: 151px of a
   990px table). The band's one cell is its row's first child, so it would take the held first column's sticky place
   and right border: it is static with no right border, so from 600 to 899px its label scrolls with the table and no
   stray edge closes the band (the review of 2026-11-06). The house's Shipments list (plan refactored-floating-cerf
   Part 1, decision 2; his answer: one group per organization) takes the same group row, dashboard-shipments-group-head,
   in these same rules. */
body.dashboard .dashboard-tags-table .dashboard-tags-group-head th,
body.dashboard .dashboard-shipments-table .dashboard-shipments-group-head th {
  position: static;
  border-right: 0;
  max-width: none;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  text-align: left;
}

@media (max-width: 599.98px) {
  body.dashboard .table-wrap.table-stack .dashboard-tags-table .dashboard-tags-group-head,
  body.dashboard .table-wrap.table-stack .dashboard-shipments-table .dashboard-shipments-group-head {
    margin: var(--space-3) 0 var(--space-2);
    padding: 0;
    border: 0;
    background: none;
  }

  body.dashboard .table-wrap.table-stack .dashboard-tags-table .dashboard-tags-group-head th,
  body.dashboard .table-wrap.table-stack .dashboard-shipments-table .dashboard-shipments-group-head th {
    padding: 0;
    background: none;
  }
}

body.dashboard .dashboard-sort .icon {
  width: 1em;
  height: 1em;
  vertical-align: middle;
}

@media (min-width: 600px) {
  body.dashboard .dashboard-holder-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* A page head (plan unified-giggling-music D9): the h1 and the page's one action on one row, the action at the right;
   on a narrow phone the action wraps under the heading. */
body.dashboard .dashboard-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

body.dashboard .dashboard-page-head > h1 {
  margin: 0;
}

body.dashboard .dashboard-page-head .icon {
  width: 1.25em;
  height: 1.25em;
}

/* A page head carrying the as-of block (the owner's order of 2026-11-05): the title group at the left (the h1, and on
   a customer's Home its SecreTag count, on Map View its active-tag line, on Alerts its subtitle), the aside at the
   right (the page's one action, or on the house's Home since 2026-11-16 the SecreTags available to be assigned, then
   the as-of lines, Refresh under them, the gate's reason under the button). Under 900px the
   aside takes a row of its own under the title, left-aligned; from 900px it sits at the content's right edge,
   right-aligned, both groups top-aligned, and a long name wraps before the aside does. The subtitle slot and the time
   lines are supporting text in the muted token, the banner and the failed line keep the text token, and the one
   rhythm is 8px (the lines, Refresh, the reason). Locked: Pattern 13, section 15; this block's lines are pinned in
   order by test_page_head_css, and no later rule may retarget these classes. */
body.dashboard .dashboard-page-head-aside {
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

body.dashboard .dashboard-page-title {
  display: flex;
  flex: 1 1 20rem;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: var(--button-height);
}

body.dashboard .dashboard-page-title > h1 {
  margin: 0;
}

body.dashboard .dashboard-page-title > p {
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 400;
}

body.dashboard .dashboard-page-aside {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

body.dashboard .dashboard-page-aside > .dashboard-as-of {
  margin-bottom: 0;
}

body.dashboard .dashboard-page-aside .dashboard-as-of > ul {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

body.dashboard .dashboard-page-aside > p.dashboard-as-of {
  color: var(--text-muted);
}

body.dashboard .dashboard-page-aside .dashboard-as-of > :last-child {
  margin-bottom: 0;
}

body.dashboard .dashboard-page-aside .dashboard-as-of-one {
  flex-direction: column;
  align-items: flex-start;
}

body.dashboard .dashboard-page-aside .dashboard-as-of-one > p {
  flex-basis: auto;
}

body.dashboard .dashboard-page-aside .dashboard-as-of-one > ul {
  margin-bottom: 0;
}

/* The aside's actions share one row (Tags: Move tags for a SecreTag administrator, then New shipment; plan
   logical-imagining-hejlsberg): they wrap with the 8px-step gap, left on a phone and right-aligned from 900px. A
   wrapper with no button (a role that sees neither) takes no row, so the as-of lines keep their place. */
body.dashboard .dashboard-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

body.dashboard .dashboard-page-actions:not(:has(> *)) {
  display: none;
}

@media (min-width: 900px) {
  body.dashboard .dashboard-page-aside {
    flex: 0 1 auto;
    margin-left: auto;
    align-items: flex-end;
    max-width: min(100%, 36rem);
    text-align: right;
  }

  body.dashboard .dashboard-page-aside .dashboard-as-of-one {
    align-items: flex-end;
  }

  body.dashboard .dashboard-page-aside .dashboard-banner {
    width: fit-content;
    margin-left: auto;
    text-align: left;
  }

  body.dashboard .dashboard-page-actions {
    justify-content: flex-end;
  }
}

/* Tags (plan unified-giggling-music G17): Active | Archived as a segmented control, two links side by side in one
   bordered track, each a 48px target; the chosen one (aria-current="page") is filled with the accent and bold, so the
   choice never rests on color alone. Every paint is a token, so both themes follow tokens.css. */
body.dashboard .dashboard-segments {
  display: inline-flex;
  gap: var(--space-1);
  margin: 0 0 var(--space-4);
  padding: var(--space-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
}

body.dashboard .dashboard-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: calc(var(--button-height) * 2);
  min-height: var(--button-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-input);
  color: var(--text);
  text-decoration: none;
}

body.dashboard .dashboard-segment:hover {
  background: var(--bg);
}

body.dashboard .dashboard-segment[aria-current="page"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

/* New shipment: the carrier code shows only while Other is chosen. A browser without :has drops the rule and shows
   the field, which the form reads only under Other. */
body.dashboard .dashboard-new-shipment:has(#shipment_carrier option[value="other"]:not(:checked)) .field-carrier-code {
  display: none;
}

/* Support (plan unified-giggling-music G25): the head's life-buoy tile beside "Support" and its line, New case at the
   right; the cases as cards, each one link at least 48px tall (phone first: the number and chip, the subject and the
   age stacked beside the chevron; from 900px one row), the New case disclosure in the head (plan
   glimmering-inventing-wigderson D1: its summary is the filled button at the head's right; open, it takes the head's
   whole width, the summary still at the right and the form's card under it, above the status chips), and the
   "Prefer email?" card with the mail tile. Every paint is a token, so both themes follow tokens.css. */
body.dashboard .support-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

body.dashboard .support-head h1 {
  margin: 0;
}

body.dashboard .support-status-nav {
  margin-top: var(--space-4);
}

/* The eight chips of Support on one line of a 1072px row (plan floofy-bubbling-gray, the owner's order of 2026-11-23):
   seven chips 964 and 6 gaps of 8 are 1012; with Sent (about 113) and 7 gaps 1133; 16px a side instead of 24 takes
   8 x 16 off, 1005. The Disputes chips keep 24px. */
body.dashboard .support-status-nav .dashboard-chip {
  padding-inline: var(--space-4);
}

body.dashboard .support-status-nav ~ .dashboard-formula {
  margin-bottom: var(--space-4);
}

body.dashboard :is(.support-head-icon, .support-email-icon) {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-input);
  background: var(--bg);
  color: var(--accent);
  font-size: var(--text-xl);
}

body.dashboard .support-cases {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

body.dashboard .support-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "top go" "subject go" "updated go";
  align-items: center;
  gap: var(--space-1) var(--space-3);
  min-height: var(--button-height);
  padding: var(--space-3) var(--space-2) var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

body.dashboard .support-case:hover {
  border-color: var(--accent);
}

body.dashboard .support-case:hover .support-case-subject {
  text-decoration: underline;
}

body.dashboard .support-case-top {
  grid-area: top;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

body.dashboard .support-case-number {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

body.dashboard .support-case-subject {
  grid-area: subject;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body.dashboard .support-case-updated {
  grid-area: updated;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .support-case-go {
  grid-area: go;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--button-height);
  height: var(--button-height);
  color: var(--text-muted);
  font-size: var(--text-lg);
}

/* SecreTag's inbox (plan abstract-fluttering-hejlsberg, 2026-11-20): each card names its organization first in its
   top row, bold; on a phone a long name wraps, and from 900px, where the top row stays on one line, it is cut to one
   line with an ellipsis so it never widens the row. The house case page names the organization in its intro too. */
body.dashboard .support-case-organization {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* The house case page's Status card: the select and Save status share one row, which wraps on a phone. */
body.dashboard .support-status-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3);
}

body.dashboard .support-status-form > .field {
  flex: 1 1 14rem;
  min-width: 0;
  margin: 0;
}

body.dashboard .support-status-form > .form-actions {
  margin: 0;
}

body.dashboard .support-status-form > .field-hint {
  flex-basis: 100%;
  margin: 0;
}

@media (min-width: 900px) {
  body.dashboard .support-case-top .support-case-organization {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dashboard .support-case {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "top subject updated go";
    gap: var(--space-4);
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }

  body.dashboard .support-case-top {
    flex-wrap: nowrap;
  }
}

body.dashboard details.support-new-case {
  min-width: 0;
  margin-left: auto;
}

body.dashboard details.support-new-case[open] {
  flex-basis: 100%;
  width: 100%;
}

body.dashboard .support-new-case-toggle {
  display: flex;
  width: fit-content;
  margin-left: auto;
  cursor: pointer;
  list-style: none;
}

body.dashboard .support-new-case-toggle::-webkit-details-marker {
  display: none;
}

body.dashboard details.support-new-case[open] > .support-new-case-toggle {
  margin-bottom: var(--space-3);
}

body.dashboard details.support-new-case > .support-new-case-body {
  margin-bottom: 0;
}

body.dashboard .support-email {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

body.dashboard .support-email h2 {
  margin: 0 0 var(--space-1);
}

body.dashboard .support-email p {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Label from Activate (plan activate-label-retention, D7): a SecreTag admin's preview of each label, bounded so a tall
   page-1 render stays on screen, then its lines and actions; the earlier documents in a closed disclosure (the shared
   dashboard-parts summary). The card sits under the two columns, apart from them by the layout's own gap. */
body.dashboard .shipment-label-documents {
  margin-top: var(--space-4);
}

body.dashboard .dashboard-label-note {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

body.dashboard .dashboard-label-document + .dashboard-label-document {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

body.dashboard .dashboard-label-preview {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: var(--space-3);
}

body.dashboard .dashboard-label-preview img {
  display: block;
  max-width: 100%;
  max-height: 24rem;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
}

body.dashboard .dashboard-label-none {
  color: var(--text-muted);
}

body.dashboard .dashboard-label-earlier {
  margin-top: var(--space-2);
}

/* A display rule beats the hidden attribute, so hidden wins on this host. */
body.dashboard [hidden] {
  display: none !important;
}
