/* PULSE composition layer for the AIC.Foundation host. Loaded after pulse-workspace.css (the round 2 production
   stylesheet, kept verbatim). This file holds only what that stylesheet does not define: Foundry host corrections,
   the MapLibre canvas that stands in for the reference drawing behind the same chrome, the coordinate fallback in the
   create-area frame and the forced-colours mapping. No raw colours except the recorded contrast fix. */

body { font-size: var(--bs-body-font-size); line-height: var(--bs-body-line-height); }
/* The pack's light faint text (#5C747C) measures 4.32:1 on the raised row fill; this value measures 5.1:1 and keeps 4.5:1 on white. Recorded for the brand owner. */
[data-bs-theme="light"] { --pulse-faint: #52676F; }
h1[tabindex="-1"]:focus-visible, h2[tabindex="-1"]:focus-visible, #main:focus-visible { outline: none !important; }
/* Foundry's layout styles give main a viewport height; the workspace main is sized by its fixed edges instead. */
main.pulse-main { height: auto !important; min-height: 0 !important; max-height: none !important; }
/* NavLink marks the active route with .active; the workspace stylesheet styles aria-current for the tab bar only. */
.pulse-tabbar a.active { color: var(--pulse-text); font-weight: 600; }
.pulse-tabbar a.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pulse-rose); }
.pulse-rail a.active .pulse-icon, .pulse-rail a[aria-current="page"] .pulse-icon { color: var(--pulse-text); }
/* Bootstrap inverts <kbd>; the workspace kbd is an outlined hint. */
kbd.pulse-kbd { background: transparent; color: var(--pulse-faint); }
/* The top bar must never overflow: the brand and wordmark keep their size, the breadcrumb and search shrink. */
.pulse-topbar { min-width: 0; overflow: hidden; }
.pulse-topbar-brand, .pulse-wordmark, .pulse-avatar, .pulse-topbar > .btn { flex: none; }
.pulse-crumb { min-width: 0; overflow: hidden; }
.pulse-crumb > span:first-child { overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
/* Long watch names in the breadcrumb must not squash the command search onto two lines. */
.pulse-crumb [aria-current="page"] { max-width: 26vw; overflow: hidden; text-overflow: ellipsis; }
button.pulse-command { flex: 0 1 auto; min-width: 180px; white-space: nowrap; }
button.pulse-command > span.pulse-hide-phone:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.pulse-statusbar .ms-auto { margin-left: auto; }
.pulse-statusbar span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* MapLibre canvas for real watch areas, inside .pulse-map (the chrome stays in PulseMap). */
.pulse-map-geo, .pulse-map-geo__canvas { position: absolute; inset: 0; }
.pulse-map-geo__canvas canvas { touch-action: none; }
.pulse-map-geo__warning { position: absolute; right: 12px; bottom: 36px; z-index: 3; max-width: 320px; margin: 0; }
.pulse-map-attribution a { color: var(--pulse-map-label); }
.pulse-map-tools > button:hover { background: var(--pulse-raised); color: var(--pulse-text); }
.pulse-map-tools--bottom { top: auto; bottom: 36px; }
.pulse-map-callout.pulse-map-callout--draft { left: 12px; top: 52px; width: 300px; }

/* Below 1280 px the inspector overlays the right edge of the map (workspace stylesheet), so the map tools, callout and
   attribution move left of it and stay usable. */
@media (min-width: 768px) and (max-width: 1279.98px) {
  /* PulseWorkspace sets the column widths inline, which would beat the stylesheet's breakpoint values and leave a
     384 px empty column under the fixed inspector; the grid template is restated here so the map keeps the width. */
  .pulse-workspace { grid-template-columns: 320px minmax(0, 1fr) 0px !important; }
  .pulse-workspace:not(.no-right) > .pulse-ws-centre .pulse-map-tools { right: 396px; }
  .pulse-workspace:not(.no-right) > .pulse-ws-centre .pulse-map-attribution { right: 392px; }
  .pulse-workspace:not(.no-right) > .pulse-ws-centre .pulse-map-callout { left: 12px; right: auto; }
}

/* Create-area frame on the MapLibre basemap. Place search is not shown until a verified geocoder exists, so the tool panel takes its slot. */
.pulse-draw-geo .pulse-draw-tools { top: 16px; }
.pulse-draw-geo .pulse-draw-tools .btn { height: 32px; }
.pulse-draw-geo .pulse-draw-tools .btn[disabled] { color: var(--pulse-faint); }
.pulse-draw-coordinates > summary { color: var(--pulse-link); cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.pulse-draw-coordinates > summary::-webkit-details-marker { display: none; }
.pulse-draw-coordinates__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 10px 0 0; border: 0; border-top: 1px solid var(--pulse-line); }
.pulse-draw-coordinates__fields legend { float: left; width: 100%; padding: 0 0 4px; margin: 0; font-size: .75rem; }
.pulse-draw-coordinates__fields label { display: grid; gap: 3px; font-size: .75rem; }
.pulse-draw-coordinates__fields .btn { grid-column: 1 / -1; }
.pulse-draw-summary .pulse-notice { margin-top: 12px; }
@media (max-width: 767.98px) {
  .pulse-draw-geo .pulse-draw-tools { top: auto; }
  .pulse-draw-geo .pulse-draw-tools .btn { flex: 1 1 0; }
  .pulse-draw-geo .pulse-map-tools--bottom, .pulse-draw-geo .pulse-map-attribution { display: none; }
  .pulse-draw-summary .pulse-draw-coordinates { display: block; }
}

/* Register rows in the operating picture report selection politely. */
.pulse-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (forced-colors: active) {
 /* Map the workspace tokens to system colours so forced-colours users get the platform palette throughout. */
 :root, [data-bs-theme] {
  --pulse-page: Canvas; --pulse-band: Canvas; --pulse-panel: Canvas; --pulse-surface: Canvas; --pulse-raised: Canvas; --pulse-inset: Canvas;
  --pulse-stroke: CanvasText; --pulse-line: CanvasText; --pulse-text: CanvasText; --pulse-muted: CanvasText; --pulse-faint: CanvasText;
  --pulse-action: ButtonFace; --pulse-action-hover: ButtonFace; --pulse-action-pressed: ButtonFace; --pulse-on-action: ButtonText;
  --pulse-rose: Highlight; --pulse-link: LinkText; --pulse-focus: Highlight; --pulse-ok: CanvasText; --pulse-warn: CanvasText; --pulse-danger: CanvasText;
  --pulse-map-label: CanvasText; --pulse-map-halo: Canvas;
 }
 .pulse-float, .pulse-map-chip, .pulse-map-tools, .pulse-map-callout, .pulse-card, .pulse-notice { border-color: CanvasText; }
 /* Bootstrap paints links from an rgb triplet that cannot name a system colour; use the platform link colour instead. */
 a { color: LinkText; }
 .btn-primary { color: ButtonText; background: ButtonFace; border-color: ButtonText; }
}

.pulse-theme-select { max-width: 240px; }

/* Below 1280 px the inspector overlays the map. The first watch is selected by default so the map and register agree,
   but its inspector opens only when the person selects a watch (?watch= in the address), so the map stays usable. */
@media (max-width: 1279.98px) {
  .pulse-workspace.pulse-op-implicit > .pulse-ws-right { display: none; }
}

/* Phone top bar: one brand mark at a time. Below 480 px the compact P-dot stands in for the wordmark so the search,
   avatar always fit a 320 px bar; from 480 px the wordmark returns. */
@media (max-width: 767.98px) {
  .pulse-topbar-brand { width: auto; padding: 0 4px 0 12px; border-right: 0; }
  .pulse-wordmark { display: none; }
}
@media (min-width: 480px) and (max-width: 767.98px) {
  .pulse-topbar-brand { display: none; }
  .pulse-wordmark { display: inline-flex; padding-left: 12px; border: 0; }
}

/* ── Page-level classification banner ─────────────────────────────────────────
   AIC.Marker's banner is fixed to the top and bottom edges of the viewport on every page, above every other layer
   including dialogs, so it is always visible and cannot scroll away. Everything else that is fixed to a viewport edge
   moves inward by --pulse-mark-h. pulse-shell.js sets that variable from the banner's measured height, so a longer
   real classification string that wraps never overlaps the application. */
:root { --pulse-mark-h: 28px; --pulse-z-marking: 2147483000; }
/* PulseMarkingFrame (ADR 0038) wraps the whole router, so these rules also cover Foundry's layouts, the not-found, error
   and sign-in states and the pre-render. The content box reserves the banners' height; shell pages position their own
   fixed chrome by --pulse-mark-h and are unaffected. The frame has no transform, so fixed children stay viewport-fixed. */
.pulse-marking-frame { box-sizing: border-box; min-height: 100vh; min-height: 100dvh; }
.pulse-marking-frame__content { box-sizing: border-box; min-height: 100vh; min-height: 100dvh; padding-block: var(--pulse-mark-h); }
.pulse-marking-frame__content .auth-shell.min-vh-100 { min-height: calc(100dvh - 2 * var(--pulse-mark-h)) !important; }
.pulse-marking-frame__content .auth-skip-link { top: var(--pulse-mark-h) !important; }
/* Foundry's primary layout pins its navigation bar and footer with Bootstrap's fixed-top and fixed-bottom (measured on
   /account/profile). PULSE's own chrome does not use these classes, so moving them inside the banners affects Foundry only. */
.pulse-marking-frame__content .fixed-top { top: var(--pulse-mark-h) !important; }
.pulse-marking-frame__content .fixed-bottom { bottom: var(--pulse-mark-h) !important; }
.pulse-marking-bar { position: fixed; left: 0; right: 0; z-index: var(--pulse-z-marking); min-height: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--pulse-panel); }
.pulse-marking-bar > * { flex: 1 1 100%; max-width: 100%; }
.pulse-marking-bar .handling-banner { width: 100%; max-width: none; margin: 0; }
.pulse-marking-bar--top { top: 0; border-bottom: 1px solid var(--pulse-line); }
.pulse-marking-bar--bottom { bottom: 0; border-top: 1px solid var(--pulse-line); }

/* Layers that are fixed to a viewport edge also stay inside the banners, so a dialog, panel or toast never sits under one. */
.modal { padding-block: var(--pulse-mark-h); }
.offcanvas-start, .offcanvas-end { top: var(--pulse-mark-h); bottom: var(--pulse-mark-h); height: auto; }
.offcanvas-top { top: var(--pulse-mark-h); }
.offcanvas-bottom { bottom: var(--pulse-mark-h); }
.toast-container.position-fixed { margin-block: var(--pulse-mark-h); }
.pulse-sheet { bottom: var(--pulse-mark-h); }

.pulse-topbar { top: var(--pulse-mark-h); }
.pulse-rail { top: calc(var(--pulse-mark-h) + var(--pulse-topbar-h)); bottom: var(--pulse-mark-h); }
.pulse-main { top: calc(var(--pulse-mark-h) + var(--pulse-topbar-h)); bottom: calc(var(--pulse-mark-h) + var(--pulse-status-h)); }
.pulse-statusbar { bottom: var(--pulse-mark-h); }
@media (max-width: 1279.98px) {
  .pulse-workspace > .pulse-ws-right { top: calc(var(--pulse-mark-h) + var(--pulse-topbar-h)); bottom: calc(var(--pulse-mark-h) + var(--pulse-status-h)); }
}
@media (max-width: 767.98px) {
  .pulse-main { top: calc(var(--pulse-mark-h) + 52px); bottom: calc(var(--pulse-mark-h) + var(--pulse-tabbar-h) + env(safe-area-inset-bottom)); }
  .pulse-tabbar { bottom: var(--pulse-mark-h); }
  .pulse-workspace > .pulse-ws-right { top: calc(var(--pulse-mark-h) + 52px); bottom: calc(var(--pulse-mark-h) + var(--pulse-tabbar-h)); }
}
/* Focused flows (create and edit a watch) */
.pulse-step-header { top: var(--pulse-mark-h); }
.pulse-step-body { top: calc(var(--pulse-mark-h) + 56px); bottom: calc(var(--pulse-mark-h) + 64px); }
.pulse-step-footer { bottom: var(--pulse-mark-h); }
.pulse-create-area { top: var(--pulse-mark-h); bottom: var(--pulse-mark-h); }
@media (max-width: 767.98px) {
  .pulse-step-body { top: calc(var(--pulse-mark-h) + 52px); bottom: calc(var(--pulse-mark-h) + 104px + env(safe-area-inset-bottom)); }
  .pulse-step--full-bleed .pulse-step-body { bottom: var(--pulse-mark-h); }
}

/* ── Assistant ─────────────────────────────────────────────────────────────── */
.pulse-assistant-button { flex: none; }
.pulse-assistant-button .pulse-kbd { margin-left: 4px; }
button.pulse-command-hit { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; }
.pulse-tag-ai .pulse-icon { color: var(--pulse-link); }
.pulse-ai-suggestion { border-inline-start-color: var(--pulse-link); }
.pulse-assistant-proposal { display: grid; gap: 14px; }
.pulse-card-map { position: relative; height: 200px; overflow: hidden; }
.pulse-assistant-proposal .pulse-card-map { height: 200px; }
.pulse-assistant-qa { display: grid; gap: 10px; }
.pulse-assistant-answer { padding: 10px 12px; border: 1px solid var(--pulse-line); border-radius: var(--pulse-radius-control); background: var(--pulse-surface); }
@media (max-width: 767.98px) { .pulse-assistant-button { width: 36px; padding: 0; } }

/* The assistant button keeps its text for assistive technology on a phone and shows only the icon. */
@media (max-width: 575.98px) {
  .pulse-assistant-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* Printing an edition: the page content only, with the classification banners repeated on every sheet. */
@media print {
  .pulse-topbar, .pulse-rail, .pulse-statusbar, .pulse-tabbar, .pulse-contents, .pulse-evidence, .pulse-ws-right, .toast-container, .offcanvas, .modal, .modal-backdrop, .pulse-skip, [data-pulse-print="hide"] { display: none !important; }
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  .pulse-main { position: static !important; overflow: visible !important; inset: auto !important; padding: calc(var(--pulse-mark-h) + 8px) 0 !important; }
  .pulse-reader-grid { display: block !important; }
  .pulse-marking-bar { position: fixed !important; display: flex !important; visibility: visible !important; }
  .pulse-reader-h2 { break-after: avoid; }
  .pulse-card, .pulse-judgement { break-inside: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
}
.pulse-reader-h2, #document-control { scroll-margin-top: 12px; }

/* The reference hides page actions on a phone. PULSE needs them there (generate, export, ask, pause, edit), so they
   wrap into a full-width row beneath the heading instead. */
@media (max-width: 767.98px) {
  .pulse-page-actions { display: flex !important; width: 100%; margin-left: 0 !important; padding-top: 4px; }
  .pulse-page-actions > .btn, .pulse-page-actions > .position-relative { flex: 1 1 auto; }
  .pulse-page-actions > .position-relative > .btn { width: 100%; justify-content: center; }
  .pulse-page-actions .dropdown-menu { left: 0 !important; right: auto !important; }
}

/* Give the fixed banners their own compositor layers so they never share damage rectangles with the WebGL map canvas. */
.pulse-marking-bar { will-change: transform; transform: translateZ(0); }

/* On a phone the area sheet scrolls; keep its primary action in view above the bottom banner. */
@media (max-width: 767.98px) {
  .pulse-draw-summary .btn-primary.btn-lg { position: sticky; bottom: 0; z-index: 2; }
}

/* The report settings line above a watch's editions wraps on a phone, so the 40 px panel head grows with it. */
.pulse-editions-settings { height: auto; min-height: 40px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }

/* Version history rows are list items, where aria-selected is not allowed; the current version uses aria-current and
   keeps the selected-row look of the reference. */
.pulse-row[role="listitem"][aria-current="true"] { background: var(--pulse-raised); }
.pulse-row[role="listitem"][aria-current="true"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--pulse-rose); }
@media (forced-colors: active) { .pulse-row[role="listitem"][aria-current="true"]::before { background: Highlight; } }

/* Platform administration (ADR 0033). The Foundry pages bring Bootstrap markup; they sit under this section strip inside the
   PULSE shell. The strip is a plain list of links in the workspace tokens: teal for links, the page text colour and a
   2 px underline for the current section (rose stays reserved for rail bars and the primary action). */
.pulse-admin-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 10px 24px 0; border-bottom: 1px solid var(--pulse-line); background: var(--pulse-band); }
.pulse-admin-nav a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 2px 6px; border-bottom: 2px solid transparent; color: var(--pulse-link); text-decoration: none; font-size: .8125rem; }
.pulse-admin-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pulse-admin-nav a.active { color: var(--pulse-text); font-weight: 600; border-bottom-color: var(--pulse-text); }
.pulse-admin-body { min-width: 0; overflow-x: auto; }
/* Toasts open at the top right of the viewport, which is under the banner and the top bar; start them below both so the whole message shows. */
.pulse-main .toast-container.position-fixed { top: calc(var(--pulse-mark-h, 0px) + var(--pulse-topbar-h, 48px) + 8px) !important; }
/* The credits table: a long organisation name wraps, so allowance, used and remaining stay in view on a phone. */
.pulse-credits td:first-child { white-space: normal; overflow-wrap: anywhere; min-width: 9ch; }
.pulse-credits td, .pulse-credits th { padding-left: 8px; padding-right: 8px; }
/* The prices, grant and spend pages (ADR 0040): short inputs in a table cell, and a settings form that is one column on a phone. */
.pulse-price-input { min-width: 5.5rem; max-width: 9rem; margin-left: auto; }
.pulse-price-settings, .pulse-grant-form { grid-template-columns: minmax(0, 1fr); }
.pulse-period-select { max-width: 14rem; }
.table > tbody td.pulse-wrap-narrow { white-space: normal; overflow-wrap: anywhere; min-width: 9ch; height: auto; padding-top: 6px; padding-bottom: 6px; }
.table > tbody td.pulse-wrap-cell { white-space: normal; min-width: 16rem; height: auto; padding-top: 6px; padding-bottom: 6px; }
@media (min-width: 768px) {
  .pulse-price-settings, .pulse-grant-form { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); align-items: end; }
}
/* Foundry's grids are plain tables with no responsive wrapper and its page headers do not wrap, so on a phone they would push
   the whole workspace sideways. The body scrolls them inside itself instead (ui-rules 73); the document and .pulse-main never scroll. */
.pulse-admin-body .d-flex.justify-content-between { flex-wrap: wrap; gap: 8px; }
/* A visually hidden span inside a table cell is absolutely positioned and, without a positioned wrapper, widens the page scroller. */
.table-responsive { position: relative; }
@media (max-width: 767.98px) {
  .pulse-admin-nav { padding: 8px 16px 0; gap: 2px 14px; }
}
@media (pointer: coarse) {
  .pulse-admin-nav a { min-height: 44px; }
}
@media (forced-colors: active) {
  .pulse-admin-nav a.active { border-bottom-color: Highlight; }
}

/* The Foundry pages colour badges and outline buttons with Bootstrap's contextual hues, which fall below 4.5:1 on the PULSE
   panels (axe measured the warning and info badges and the info and danger outline buttons). Text and outlines take the
   workspace tokens instead; the status words stay in the text and the tinted fill is kept, so nothing depends on hue alone. */
.pulse-admin-body .badge.text-warning, .pulse-admin-body .badge.text-info, .pulse-admin-body .badge.text-success,
.pulse-admin-body .badge.text-danger, .pulse-admin-body .badge.text-secondary, .pulse-admin-body .badge.text-primary { color: var(--pulse-text) !important; }
.pulse-admin-body .btn-outline-info, .pulse-admin-body .btn-outline-primary, .pulse-admin-body .btn-outline-success, .pulse-admin-body .btn-outline-warning, .pulse-admin-body .btn-outline-secondary {
  --bs-btn-color: var(--pulse-text); --bs-btn-border-color: var(--pulse-stroke);
  --bs-btn-hover-color: var(--pulse-text); --bs-btn-hover-bg: var(--pulse-raised); --bs-btn-hover-border-color: var(--pulse-text);
  --bs-btn-active-color: var(--pulse-text); --bs-btn-active-bg: var(--pulse-raised); --bs-btn-active-border-color: var(--pulse-text);
}
.pulse-admin-body .btn-check:checked + .btn-outline-primary { --bs-btn-color: var(--pulse-text); background: var(--pulse-raised); border-color: var(--pulse-text); }
.pulse-admin-body .text-info, .pulse-admin-body .text-primary { color: var(--pulse-link) !important; }
.pulse-admin-body .text-danger { color: var(--pulse-danger) !important; }
.pulse-admin-body .text-success, .pulse-admin-body .text-warning, .pulse-admin-body .text-secondary { color: var(--pulse-text) !important; }
.pulse-admin-body .text-muted, .pulse-admin-body .text-body-secondary { color: var(--pulse-muted) !important; }
.pulse-admin-body .bg-info { background-color: var(--pulse-raised) !important; color: var(--pulse-text) !important; border: 1px solid var(--pulse-stroke); }
.pulse-admin-body .btn-outline-danger {
  --bs-btn-color: var(--pulse-danger); --bs-btn-border-color: var(--pulse-danger);
  --bs-btn-hover-color: var(--pulse-page); --bs-btn-hover-bg: var(--pulse-danger); --bs-btn-hover-border-color: var(--pulse-danger);
  --bs-btn-active-color: var(--pulse-page); --bs-btn-active-bg: var(--pulse-danger); --bs-btn-active-border-color: var(--pulse-danger);
}
.pulse-admin-body code { color: var(--pulse-text); }
@media (forced-colors: active) {
  /* Name the system colours so that a contrast check, as well as the browser, resolves text against the forced palette. */
  .pulse-admin-body .alert { color: CanvasText; background-color: Canvas; border: 1px solid CanvasText; }
  .pulse-admin-body :where(h1, h2, h3, h4, h5, h6, p, label, small, li, td, th, span, strong, div, legend) { color: CanvasText; }
  .pulse-admin-body a:not(.btn) { color: LinkText; }
}

/* Platform admin overview (ui-rules 78). One column that uses the width of the content area up to 1440 px: a row of totals,
   the organisations table and the limits table, each full width. The totals sit in a grid that runs four across on a
   desktop and two across on a phone. Cells break only between words, so a phone scrolls the organisations table inside
   its labelled region instead of splitting numbers, and the limits table is tightened to fit 360 px. */
.pulse-admin-overview { max-width: 1440px; display: grid; gap: 16px; align-content: start; }
.pulse-admin-stats dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin: 0; }
.pulse-admin-stats dl > div { min-width: 0; padding: 12px 16px; border: 1px solid var(--pulse-line); border-radius: var(--pulse-radius-panel); background: var(--pulse-panel); }
.pulse-admin-stats dt { font-size: .6875rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--pulse-faint); }
.pulse-admin-stats dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pulse-admin-stats dd small { display: block; font-size: .75rem; font-weight: 400; color: var(--pulse-muted); }
.pulse-admin-table .table > tbody td { white-space: normal; }
.pulse-admin-table .table > tbody td:first-child { min-width: 14ch; overflow-wrap: anywhere; }
.pulse-admin-table code { overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
  .pulse-admin-table .table > thead th, .pulse-admin-table .table > tbody td { padding-left: 6px; padding-right: 6px; }
  .pulse-admin-table .table > tbody td .pulse-tag { white-space: normal; height: auto; min-height: 22px; padding-top: 2px; padding-bottom: 2px; }
  .pulse-admin-limits .table > thead th { white-space: normal; letter-spacing: .03em; }
  .pulse-admin-limits .table > tbody td:first-child { min-width: 0; }
  .pulse-admin-limits .table > tbody td { height: auto; padding-top: 6px; padding-bottom: 6px; }
}
@media (forced-colors: active) {
  .pulse-admin-stats dl > div { border-color: CanvasText; }
}

/* Delivery (ADR 0039): one bordered block for each destination on the Delivery tab, and the page scrolls inside the workspace stack. */
.pulse-delivery { flex: 1; min-height: 0; max-width: 960px; }
.pulse-delivery .pulse-dest { border: 1px solid var(--pulse-line); border-radius: 8px; padding: 12px 14px; }
.pulse-delivery code { color: var(--pulse-text); } /* Bootstrap colours code pink, which fails contrast on the panel. */
.pulse-edition-review .pulse-kv dd { overflow-wrap: anywhere; } /* The content digest is one long word. */

/* Scheduled reports and credits (ADR 0043). The credits figure in the top bar, the one-series bar chart and the report library. */
.pulse-credits-figure { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--pulse-line); border-radius: 999px; font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--pulse-text); text-decoration: none; white-space: nowrap; }
.pulse-credits-figure:hover { background: var(--pulse-panel); }
.pulse-credits-figure.is-low { border-color: var(--pulse-colour-warning); box-shadow: inset 0 0 0 1px var(--pulse-colour-warning); }
.pulse-credits-figure .pulse-credits-label { color: var(--pulse-muted); }
.pulse-credits-big { font-size: 2rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; margin: 0; }
.pulse-barchart svg { width: 100%; height: auto; max-height: 220px; display: block; }
.pulse-barchart-bar { fill: var(--pulse-link); }
.pulse-barchart-grid { stroke: var(--pulse-line); stroke-width: 1; }
.pulse-barchart-axis { stroke: var(--pulse-muted); stroke-width: 1; }
.pulse-barchart-label { fill: var(--pulse-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pulse-reports { flex: 1; min-height: 0; max-width: 1100px; overflow: auto; }
.pulse-reports .pulse-dl-links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pulse-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pulse-table-scroll { overflow-x: auto; max-width: 100%; }
@media (max-width: 767.98px) { .pulse-two { grid-template-columns: minmax(0, 1fr); } .pulse-barchart-label { font-size: 22px; } }
/* On a phone each report is a block with its labels beside its values, so the Download link is never off screen. The header row stays for assistive technology. */
@media (max-width: 767.98px) {
  .pulse-reports-stack .table > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pulse-reports-stack .table > tbody > tr { display: grid; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--pulse-line); }
  .pulse-reports-stack .table > tbody > tr:last-child { border-bottom: 0; }
  .pulse-reports-stack .table > tbody > tr > td { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .pulse-reports-stack .table > tbody > tr > td::before { content: attr(data-label); color: var(--pulse-muted); font-size: .8125rem; }
  .pulse-reports-stack .table > tbody > tr > td, .pulse-reports-stack .table > tbody > tr > td.text-nowrap { white-space: normal; overflow-wrap: anywhere; }
  .pulse-reports-stack .pulse-dl-links a { white-space: normal; }
}
.pulse-schedule-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* Edition comparison (ADR 0051, UI rules 123 to 128): one column on every width, groups under a small caps heading, nothing that depends on colour. */
.pulse-compare { display: grid; gap: 16px; max-width: 760px; }
.pulse-compare-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pulse-compare-section { background: var(--pulse-panel); border: 1px solid var(--pulse-line); border-radius: 12px; padding: 14px; }
.pulse-compare-group + .pulse-compare-group { margin-top: 14px; }
.pulse-compare-heading { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--pulse-muted); }
.pulse-compare-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pulse-compare-list > li { padding-bottom: 10px; border-bottom: 1px solid var(--pulse-line); overflow-wrap: anywhere; }
.pulse-compare-list > li:last-child { padding-bottom: 0; border-bottom: 0; }
.pulse-compare details > summary { cursor: pointer; }
@media (pointer: coarse) { .pulse-compare-nav a, .pulse-compare details > summary { display: inline-flex; align-items: center; min-height: 44px; } }
@media (forced-colors: active) { .pulse-compare-section { border-color: CanvasText; } .pulse-compare-list > li { border-color: CanvasText; } }
@media (max-width: 767.98px) { .pulse-credits-figure { display: none; } }
@media (forced-colors: active) {
  .pulse-barchart-bar { fill: Highlight; }
  .pulse-barchart-grid, .pulse-barchart-axis { stroke: CanvasText; }
  .pulse-barchart-label { fill: CanvasText; }
  .pulse-credits-figure { border-color: CanvasText; }
}
