/* The CMS master stylesheet: DUNNING-EMAIL-DESIGN/customer-care/components.css taken whole, line for line in Astra's
   order (cms_briefs/customer_care_astra_as_is.md, chunk G2). It differs from Astra's file only as that chunk allows,
   which cms_briefs/customer_care_parity_verification/g2check.mjs checks: lines left out, the shell lines marked below,
   this comment, and the "CMS additions" block at the end, where every rule Astra's file lacks goes. */
/* Foundation: each named component owns its rules; modifiers follow its base. */
* { box-sizing: border-box; }
body { margin: var(--space-0); color: var(--color-text); background: var(--color-workspace); font-family: var(--font-family); font-size: var(--font-size-md); line-height: var(--line-height-normal); }
h1, h2, h3, p { margin: var(--space-0); }
button, input, textarea, select { font: inherit; }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
button, a, input, textarea, select, [tabindex] { scroll-margin: var(--space-12); scroll-margin-top: var(--space-12); }
:focus-visible, .is-focus { outline: var(--outline-focus); outline-offset: var(--focus-offset); }
.icon { display: inline-block; flex: var(--flex-fixed); font-family: var(--font-family-icon); font-size: var(--icon-size-md); font-weight: var(--font-weight-normal); font-style: normal; line-height: var(--line-height-icon); color: inherit; }
.icon.small { font-size: var(--icon-size-sm); }
.icon.large { font-size: var(--icon-size-lg); }
.link { color: var(--color-action-primary); text-decoration: underline; text-underline-offset: var(--space-2); border-radius: var(--radius-sm); }
.link:hover { color: var(--color-action-primary-hover); }
.text { color: var(--color-text); }
.text.secondary { color: var(--color-text-secondary); }
.text.small { font-size: var(--font-size-sm); }
.text.error { color: var(--color-danger); }
.text.strong { font-weight: var(--font-weight-semibold); }
.skip-link { position: fixed; top: var(--space-8); left: var(--space-8); z-index: var(--z-skip); padding: var(--space-8) var(--space-16); background: var(--color-surface); color: var(--color-action-primary); transform: translateY(calc(-1 * var(--header-height) - var(--size-full))); }
.skip-link:focus { transform: none; }
.header { height: var(--header-height); display: flex; align-items: center; gap: var(--space-20); padding: var(--space-0) var(--space-24); background: var(--color-ink); color: var(--color-text-on-dark); border-bottom: var(--border-width) solid var(--color-nav-divider); position: sticky; top: var(--space-0); z-index: var(--z-header); }
.brand { display: flex; align-items: center; gap: var(--space-16); flex: var(--flex-fixed); }
.brand-logo { display: block; width: var(--logo-width); height: auto; }
.brand-title { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
.header-context { font-size: var(--font-size-sm); color: var(--color-brand-gold-light); }
.header-tools { display: flex; align-items: center; gap: var(--space-12); margin-left: auto; }
.header-user { white-space: nowrap; font-size: var(--font-size-sm); }
.header .link { color: var(--color-text-on-dark); }
.header :focus-visible, .header .is-focus { outline: var(--outline-focus-on-dark); }
.shell { display: grid; grid-template-columns: var(--nav-width) minmax(var(--size-min), var(--grid-flex)); align-items: start; }
.navigation { position: sticky; top: var(--header-height); height: calc(var(--viewport-height) - var(--header-height)); overflow-y: auto; padding: var(--space-16) var(--space-8); background: var(--color-ink); display: flex; flex-direction: column; gap: var(--space-4); }
.nav-item { display: flex; align-items: center; gap: var(--space-12); min-height: var(--control-height); width: var(--size-full); padding: var(--space-8) var(--space-12); border: var(--border-none); border-left: var(--border-width-emphasis) solid var(--color-transparent); border-radius: var(--radius-sm); background: var(--color-transparent); color: var(--color-text-on-dark); text-align: left; text-decoration: none; font-size: var(--font-size-sm); cursor: pointer; }
.nav-item .icon { color: var(--color-brand-gold); }
.nav-item:hover, .nav-item.is-hover { background: var(--color-nav-hover); }
.nav-item.active { background: var(--color-nav-active); border-left-color: var(--color-brand-gold); color: var(--color-brand-gold-light); font-weight: var(--font-weight-semibold); }
.nav-item:focus-visible, .nav-item.is-focus { outline: var(--outline-focus-on-dark); outline-offset: var(--focus-inset); }
.workspace { min-width: var(--size-min); width: var(--size-full); max-width: var(--workspace-max-width); padding: var(--space-32); margin-inline: auto; display: flex; flex-direction: column; gap: var(--space-24); }
.page-title { display: flex; flex-direction: column; gap: var(--space-8); }
.page-heading { font-size: var(--font-size-title); font-weight: var(--font-weight-bold); letter-spacing: var(--letter-spacing-title); line-height: var(--line-height-tight); }
.page-description { color: var(--color-text-secondary); font-size: var(--font-size-md); }
.section-heading { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); line-height: var(--line-height-normal); }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.panel { padding: var(--space-24); background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); display: flex; flex-direction: column; gap: var(--space-20); min-width: var(--size-min); scroll-margin-top: var(--space-12); }
.panel.subtle { background: var(--color-surface-subtle); box-shadow: var(--shadow-none); }
.panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); }
.panel-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); border-top: var(--border-default); padding-top: var(--space-16); }
.stack { display: flex; flex-direction: column; gap: var(--space-16); min-width: var(--size-min); }
.stack.compact { gap: var(--space-8); }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-12); min-width: var(--size-min); }
.row.end { align-items: flex-end; }
.grid { display: grid; grid-template-columns: var(--grid-auto-fields); gap: var(--space-24); align-items: start; }
.grid.filters { grid-template-columns: var(--grid-auto-filters); gap: var(--space-12); align-items: end; }
.divider { border: var(--border-none); border-top: var(--border-default); margin: var(--space-0); }
/* Actions and fields. Static states mirror their live counterparts. */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); min-height: var(--control-height); padding: var(--space-6) var(--space-16); border: var(--border-control); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); line-height: var(--line-height-normal); text-decoration: none; cursor: pointer; }
.button:hover:where(:not(:disabled):not(.is-disabled)), .button.is-hover:where(:not(:disabled):not(.is-disabled)) { background: var(--color-action-secondary-hover); }
.button.primary { background: var(--color-action-primary); border-color: var(--color-action-primary); color: var(--color-text-on-action); }
.button.primary:hover:where(:not(:disabled):not(.is-disabled)), .button.primary.is-hover:where(:not(:disabled):not(.is-disabled)) { background: var(--color-action-primary-hover); border-color: var(--color-action-primary-hover); }
.button.quiet { background: var(--color-transparent); border-color: var(--color-transparent); color: var(--color-action-primary); }
.button.quiet:hover:where(:not(:disabled):not(.is-disabled)), .button.quiet.is-hover:where(:not(:disabled):not(.is-disabled)) { background: var(--color-action-quiet-hover); }
.button.destructive { background: var(--color-danger); border-color: var(--color-danger); color: var(--color-text-on-action); }
.button.destructive:hover:where(:not(:disabled):not(.is-disabled)), .button.destructive.is-hover:where(:not(:disabled):not(.is-disabled)) { background: var(--color-danger-hover); border-color: var(--color-danger-hover); }
.button.small { min-height: var(--control-height-small); padding: var(--space-4) var(--space-12); font-size: var(--font-size-sm); }
.button:disabled, .button.is-disabled { background: var(--color-disabled-surface); border-color: var(--color-border); color: var(--color-disabled-text); cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: var(--space-6); min-width: var(--size-min); }
.field.grow { flex: var(--flex-grow); }
.field-label { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }
.field-help { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.field-help.error { color: var(--color-danger); }
.input { display: block; width: var(--size-full); min-width: var(--size-min); min-height: var(--control-height); padding: var(--space-6) var(--space-12); border: var(--border-control); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font-size: var(--font-size-md); line-height: var(--line-height-normal); }
.input::placeholder { color: var(--color-text-secondary); opacity: var(--flex-grow); }
.input:hover, .input.is-hover { border-color: var(--color-action-primary); }
.input:focus-visible, .input.is-focus { border-color: var(--color-focus); }
.input.is-error, .input[aria-invalid="true"] { border-color: var(--color-danger); background: var(--color-danger-surface); }
.input:disabled, .input.is-disabled { color: var(--color-disabled-text); background: var(--color-disabled-surface); border-color: var(--color-border); opacity: var(--flex-grow); cursor: not-allowed; }
.input.multiline { min-height: var(--textarea-height); resize: vertical; }
.input.select { cursor: pointer; }
.input.select:disabled { cursor: not-allowed; }
.input.header-search { width: var(--header-search-width); min-height: var(--control-height-small); background: var(--color-nav-hover); color: var(--color-text-on-dark); }
.input.header-select { width: var(--header-select-width); min-height: var(--control-height-small); background: var(--color-nav-hover); color: var(--color-text-on-dark); }
.checkbox { display: inline-flex; align-items: flex-start; gap: var(--space-8); font-size: var(--font-size-md); cursor: pointer; }
.checkbox-input { flex: var(--flex-fixed); width: var(--checkbox-size); height: var(--checkbox-size); margin: var(--space-2) var(--space-0) var(--space-0); accent-color: var(--color-action-primary); cursor: pointer; }
.checkbox.is-disabled { color: var(--color-disabled-text); cursor: not-allowed; }
.checkbox-input:disabled { cursor: not-allowed; }
.checkbox-input.is-hover { outline: var(--border-width) solid var(--color-action-primary); outline-offset: var(--space-2); }
/* Feedback and data. Explicit text and glyphs carry status alongside color. */
.badge { display: inline-flex; align-items: center; gap: var(--space-6); width: fit-content; padding: var(--space-2) var(--space-8); border: var(--border-width) solid var(--color-neutral-border); border-radius: var(--radius-pill); background: var(--color-neutral-surface); color: var(--color-neutral); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); line-height: var(--line-height-normal); white-space: nowrap; }
.badge.success { color: var(--color-success); background: var(--color-success-surface); border-color: var(--color-success-border); }
.badge.warning { color: var(--color-warning); background: var(--color-warning-surface); border-color: var(--color-warning-border); }
.badge.error { color: var(--color-danger); background: var(--color-danger-surface); border-color: var(--color-danger-border); }
.badge.info { color: var(--color-info); background: var(--color-info-surface); border-color: var(--color-info-border); }
.badge.on-dark { color: var(--color-brand-gold-light); background: var(--color-nav-active); border-color: var(--color-nav-divider); }
.notice { display: flex; align-items: flex-start; gap: var(--space-12); padding: var(--space-12) var(--space-16); border: var(--border-width) solid var(--color-info-border); border-radius: var(--radius-md); color: var(--color-info); background: var(--color-info-surface); }
.notice .icon { margin-top: var(--space-2); }
.notice.success { color: var(--color-success); background: var(--color-success-surface); border-color: var(--color-success-border); }
.notice.warning { color: var(--color-warning); background: var(--color-warning-surface); border-color: var(--color-warning-border); }
.notice.error { color: var(--color-danger); background: var(--color-danger-surface); border-color: var(--color-danger-border); }
.note { padding: var(--space-16); background: var(--color-surface-subtle); border-left: var(--border-width-emphasis) solid var(--color-border-control); border-radius: var(--radius-sm); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.note-list { padding-left: var(--space-20); margin: var(--space-8) var(--space-0) var(--space-12); }
.note-list li + li { margin-top: var(--space-2); }
.summary { display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); margin: var(--space-0); }
.summary-item { display: flex; flex-direction: column; gap: var(--space-4); }
.summary-label { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.summary-value { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); margin: var(--space-0); font-variant-numeric: tabular-nums; }
.table-region { overflow-x: auto; border: var(--border-default); border-radius: var(--radius-md); }
.table { width: var(--size-full); min-width: var(--table-min-width); border-collapse: collapse; text-align: left; font-size: var(--font-size-sm); }
.table.compact { min-width: var(--size-min); }
.table caption { padding: var(--space-12) var(--space-16); text-align: left; color: var(--color-text-secondary); background: var(--color-surface); }
.table th { padding: var(--space-12); background: var(--color-neutral-surface); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); border-bottom: var(--border-default); white-space: nowrap; }
.table td { padding: var(--space-12); border-bottom: var(--border-default); vertical-align: middle; white-space: nowrap; }
.table tbody tr:nth-child(even) { background: var(--color-surface-subtle); }
.table tbody tr:hover, .table tbody tr.is-hover { background: var(--color-action-quiet-hover); }
.table tbody tr.selected { background: var(--color-selection); }
.table tbody tr.selected td:first-child { box-shadow: inset var(--border-width-emphasis) var(--space-0) var(--space-0) var(--color-action-primary); }
.table tbody tr:focus-visible, .table tbody tr.is-focus { outline: var(--outline-focus); outline-offset: var(--focus-inset); }
.table tbody tr:last-child td { border-bottom: var(--border-none); }
.table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; }
.table .actions .button + .button { margin-left: var(--space-4); }
/* A table whose rows answer an earlier state (the report builder's out-of-date sample, builderTable STALE_CLASS). */
.table.is-stale tbody { opacity: var(--opacity-stale); }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-12); padding: var(--space-32); text-align: center; color: var(--color-text-secondary); }
.empty-state .icon { color: var(--color-action-primary); }
.modal { position: relative; display: flex; flex-direction: column; gap: var(--space-20); width: var(--size-full); max-width: var(--modal-width); padding: var(--space-24); border: var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-modal); background: var(--color-surface); color: var(--color-text); margin: var(--space-0); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-12); }
/* Work areas and compact queue. */
[hidden] { display: none !important; }
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-8); border-bottom: var(--border-default); }
.tab { display: inline-flex; align-items: center; gap: var(--space-8); min-height: var(--control-height); padding: var(--space-12) var(--space-20); border: var(--border-none); border-bottom: var(--border-width-emphasis) solid var(--color-transparent); background: var(--color-transparent); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); cursor: pointer; }
.tab:hover, .tab.is-hover { background: var(--color-action-quiet-hover); }
.tab[aria-selected="true"], .tab.active { color: var(--color-action-primary); border-bottom-color: var(--color-action-primary); }
.tab-panel { min-width: var(--size-min); }
.table-region.queue { max-height: var(--queue-height); overflow: auto; scrollbar-gutter: stable; }
.table.queue { table-layout: fixed; min-width: var(--size-min); }
.table.queue th { position: sticky; top: var(--space-0); z-index: var(--z-table); white-space: normal; }
.table.queue td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.table.queue .selection { width: var(--queue-check-width); }
.table.queue .customer { width: var(--queue-customer-width); }
.table.queue .failure { width: var(--queue-failure-width); }
.table.queue .age { width: var(--queue-age-width); }
.table.queue .history { width: var(--queue-history-width); }
.table.queue .row-actions { width: var(--queue-action-width); }
/* Email History (emailHistoryRender.mjs): Sent is the date over the time at its widest possible width; Email wraps so the
   five columns fit the panel without a sideways scroll. */
.table.email-history .sent { width: calc(var(--email-history-sent-text-width) + var(--space-12) + var(--space-12)); }
.table.email-history .email { white-space: normal; }
.cell { display: flex; flex-direction: column; gap: var(--space-4); min-width: var(--size-min); }
.cell-detail { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; font-size: var(--font-size-xs); color: var(--color-text-secondary); }
.cell-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.button.icon-only { width: var(--control-height-small); min-height: var(--control-height-small); padding: var(--space-4); flex: var(--flex-fixed); }
.indicator { display: inline-flex; align-items: center; gap: var(--space-4); padding: var(--space-2); color: var(--color-text-secondary); border-radius: var(--radius-sm); cursor: help; }
.indicator.warning { color: var(--color-warning); }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-12); }
.disclosure { padding: var(--space-12) var(--space-16); background: var(--color-surface-subtle); border: var(--border-default); border-radius: var(--radius-md); }
.disclosure summary { cursor: pointer; font-weight: var(--font-weight-medium); }
.disclosure-body { padding-top: var(--space-12); }
.tooltip { position: fixed; inset: auto; left: var(--tooltip-left); top: var(--tooltip-top); z-index: var(--z-tooltip); max-width: var(--tooltip-width); padding: var(--space-8) var(--space-12); margin: var(--space-0); border: var(--border-none); border-radius: var(--radius-md); background: var(--color-ink); color: var(--color-text-on-dark); font-size: var(--font-size-sm); box-shadow: var(--shadow-modal); pointer-events: auto; }
.tooltip.static { position: static; width: fit-content; }
/* Constrained template editor and the existing customer-facing email design. */
.editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--size-full), var(--editor-column-min)), var(--grid-flex))); gap: var(--space-24); align-items: start; }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.editor-preview { position: sticky; top: var(--space-16); max-height: calc(var(--viewport-height) - var(--header-height) - var(--space-32)); overflow: auto; padding: var(--space-4); }
.input.editor-body { min-height: var(--editor-textarea-height); }
.variable-list { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.image-drop { padding: var(--space-16); border: var(--border-width) dashed var(--color-border-control); border-radius: var(--radius-md); background: var(--color-surface-subtle); display: flex; flex-direction: column; gap: var(--space-12); }
.image-drop.is-hover { border-color: var(--color-action-primary); background: var(--color-info-surface); }
.email-preview { max-width: var(--email-width); width: var(--size-full); margin-inline: auto; background: var(--color-surface); border: var(--border-default); font-family: var(--email-font-family); color: var(--color-ink); }
.email-header { display: flex; justify-content: center; background: var(--color-ink); padding: var(--space-20) var(--space-24); border-bottom: var(--border-width-emphasis) solid var(--color-brand-gold); }
.email-logo { width: var(--email-logo-width); max-width: var(--size-full); height: auto; }
.email-body { padding: var(--space-32); display: flex; flex-direction: column; gap: var(--space-16); font-size: var(--font-size-xl); line-height: var(--line-height-normal); overflow-wrap: anywhere; }
.email-heading { font-size: var(--email-heading-size); line-height: var(--line-height-tight); font-weight: var(--font-weight-bold); }
.email-copy { white-space: pre-wrap; }
.email-image { width: var(--size-full); max-height: var(--image-preview-height); object-fit: contain; }
.email-button { display: block; width: var(--size-full); padding: var(--space-16) var(--space-20); border: var(--border-none); border-radius: var(--radius-sm); color: var(--color-text-on-action); background: var(--color-brand-red-dark); font-weight: var(--font-weight-bold); font-size: var(--font-size-xl); text-align: center; }
.email-footer { padding: var(--space-24) var(--space-32); border-top: var(--border-default); display: flex; flex-direction: column; gap: var(--space-8); font-size: var(--email-body-size); overflow-wrap: anywhere; }
.email-offer { padding: var(--space-12); border: var(--border-width) solid var(--color-warning-border); background: var(--color-warning-surface); color: var(--color-warning); border-radius: var(--radius-sm); font-size: var(--font-size-md); }
.preview-subject { padding: var(--space-12) var(--space-16); background: var(--color-surface-subtle); border: var(--border-default); overflow-wrap: anywhere; font-size: var(--font-size-sm); }
.payment-binding { overflow-wrap: anywhere; font-size: var(--font-size-sm); color: var(--color-text-secondary); }
/* Filter-to-results navigation and inline account history. */
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.tabs.workareas { position: sticky; top: var(--space-0); z-index: var(--z-tabs); min-height: var(--tabs-height); background: var(--color-workspace); }
.queue-workspace { min-width: var(--size-min); }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.queue-results { scroll-margin-top: calc(var(--tabs-height) + var(--space-16)); }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.queue-resultbar { position: sticky; top: var(--tabs-height); z-index: var(--z-toolbar); min-height: var(--queue-bar-min-height); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-12); background: var(--color-surface); border-bottom: var(--border-default); padding-block: var(--space-12); }
.table-region.queue.results { max-height: none; overflow: visible; }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.table.queue.results th { top: calc(var(--tabs-height) + var(--queue-bar-height)); }
/* The shell (cms_briefs/customer_care_astra_as_is.md): PageBody scrolls below the header, so --header-height is dropped. */
.table.queue.results button, .table.queue.results input, .table.queue.results textarea, .table.queue.results [tabindex] { scroll-margin-top: calc(var(--tabs-height) + var(--queue-bar-height) + var(--space-40)); }
.customer-toggle { display: inline-flex; align-items: flex-start; gap: var(--space-8); padding: var(--space-0); border: var(--border-none); border-radius: var(--radius-sm); text-align: left; background: var(--color-transparent); color: var(--color-action-primary); font-weight: var(--font-weight-semibold); cursor: pointer; }
.customer-toggle .icon { margin-top: var(--space-2); }
.customer-toggle[aria-expanded="true"] .icon { transform: rotate(var(--rotation-expanded)); }
.table.queue tr[data-code] { cursor: pointer; }
.table.queue tr.expanded { background: var(--color-selection); }
.table.queue tr.account-row { background: var(--color-surface-subtle); }
.table.queue tr.account-row:hover { background: var(--color-surface-subtle); }
.table.queue tr.account-row > td { padding: var(--space-24); }
.account-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--size-full), var(--account-column-min)), var(--grid-flex))); gap: var(--space-24); }
.account-facts { display: grid; grid-template-columns: var(--grid-columns-two); gap: var(--space-16); margin: var(--space-0); }
.account-facts dt { color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.account-facts dd { margin: var(--space-4) var(--space-0) var(--space-0); overflow-wrap: anywhere; }
.input.account-note { min-height: var(--account-note-height); }
.history-list { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-0); margin: var(--space-0); list-style: none; }
.history-entry { padding: var(--space-16); border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); display: flex; flex-direction: column; gap: var(--space-8); }
.history-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-list { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-0); margin: var(--space-0); list-style: none; }
.attachment { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); overflow-wrap: anywhere; }
.attachment .link { min-width: var(--size-min); }

.queue-resultbar .text { overflow-wrap: anywhere; }

.saved-search-picker { width: auto; max-width: var(--size-full); }

.search-roster-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-12); padding: var(--space-12); border-bottom: var(--border-default); }
.search-roster-row[aria-current="true"] { background: var(--color-selection); }
#search-setup, #filter-setup { padding-block: var(--space-16); }
#search-roster { max-height: var(--preview-min-height); overflow-y: auto; }

/* CMS additions: not in Astra's file. */
/* A toggled-on button; :where() keeps it off a disabled button, as when it sat before the disabled rule. */
.button.on:where(:not(:disabled):not(.is-disabled)) { background: var(--color-action-quiet-hover); border-color: var(--color-action-primary); color: var(--color-action-primary); }
/* A tab that opens another page (a link beside a tablist) keeps the tab look, not the link underline. */
a.tab { text-decoration: none; }
/* A link inside a notice takes the notice's tone, not the action blue; :hover is listed so .link:hover's blue cannot win. */
.notice .link, .notice .link:hover { color: inherit; }
/* A native <dialog class="modal">: .modal's display would show it closed and its margin would pin it top-left, so the
   closed state, centring, phone gutter and scrim are restored here. A form wrapping the body passes .modal's gap through. */
dialog.modal:not([open]) { display: none; }
dialog.modal { margin: auto; max-width: min(var(--modal-width), calc(var(--size-full) - var(--space-32))); }
dialog.modal::backdrop { background: var(--color-scrim); }
.modal > form { display: contents; }
/* A right-side sheet on the native dialog (the account panel's email preview, lane notes L-D6): full height against the
   right edge, square, scrolling inside; the wide modal width, kept clear of a phone's left edge. */
dialog.modal.side-sheet { margin: var(--space-0) var(--space-0) var(--space-0) auto; height: var(--viewport-height); max-height: var(--viewport-height); max-width: min(var(--modal-width-wide), calc(var(--size-full) - var(--space-32))); box-sizing: border-box; border-radius: var(--radius-none); overflow-y: auto; }
/* The logo is clickable. */
.brand-logo { cursor: pointer; }
/* The framework's PageBody.css (common-mixin, served) rounds the content pane's top-left corner; Astra's workspace is square. */
.page-main > .PageBody { border-top-left-radius: var(--space-0); }
/* The framework's Main.css (common-mixin, served) sets text-align: left on the shell, so every element computed left; Astra's
   computes the initial start. */
.Main { text-align: start; }
/* Customer Care's 10-04 return: Astra's DUNNING-EMAIL-DESIGN/cms-pages/proposed-additions.css:69,71 and the one layout rule
   of cms-pages/CustomerCare.css:4,10, unscoped because the Customer Care page sheet stays empty. Checked against every
   master rule by cms_briefs/customer_care_completion_verification/dupcheck.mjs: none does the same job. */
/* An inline machine identifier (a short code, an id) in the code font, without a code-block container. */
.text.mono { font-family: var(--font-family-code); overflow-wrap: anywhere; }
/* Rendered plain email text: line breaks kept, the body font, no code-block height limit. */
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-family); font-size: var(--font-size-md); line-height: var(--line-height-normal); margin: var(--space-0); padding: var(--space-16); background: var(--color-surface-subtle); border: var(--border-default); border-radius: var(--radius-md); }
/* A rendered HTML email shown in place (the compose box's preview): full width; its height follows the email. */
.email-frame { display: block; width: var(--size-full); border: var(--border-default); border-radius: var(--radius-md); }
/* A narrow list rail beside its editor (the Email templates slots); one column from 850px down. */
.template-layout { display: grid; grid-template-columns: var(--reader-grid); gap: var(--space-24); align-items: start; }
@media (max-width: 850px) { .template-layout { grid-template-columns: var(--grid-flex); } }

/* The account panel's Open card form and Paste customer email buttons keep their own width in a stretching column. */
.account-panel .stack > .button { align-self: flex-start; }

/* The rest of the CMS (cms_briefs/rest_of_cms_astra_layouts.md D3): Astra's DUNNING-EMAIL-DESIGN/cms-pages/
   proposed-additions.css with its keyword tokens written as keywords (D1). Checked against every master rule by
   cms_briefs/customer_care_completion_verification/dupcheck.mjs; .metric-value is not added (hero numbers carry
   .page-heading), .prose holds only the declaration .stack lacks, and .modal.wide sets the width .modal reads. */
/* Chart ink: the plot area and its line, secondary, grid and bar series. */
.plot { display: block; width: var(--size-full); height: var(--trend-chart-height); overflow: hidden; }
.plot-line { fill: none; stroke: var(--color-action-primary); stroke-width: var(--chart-line-width); }
.plot-secondary { fill: none; stroke: var(--color-success); stroke-width: var(--chart-line-width); stroke-dasharray: var(--chart-gridline-dash); }
.plot-grid { fill: none; stroke: var(--color-border); stroke-width: var(--chart-gridline-width); }
.plot-new { fill: var(--color-action-primary); }
.plot-rebill { fill: var(--color-success); }
/* Three more bar fills for a stack of up to five parts (the Reports page's Subscribers tab: Apple, Google and any other
   door beside .plot-new and .plot-rebill; REPORT_TELEMETRY_SUBSCRIBERS_BRIEF.md 5.8, REPORTS_SECTION_PLAN.md decision 2).
   Each reads apart from the other fills and from .plot-provisional's warning band behind it; Astra may recolour them. */
.plot-ink-3 { fill: var(--color-brand-gold); }
.plot-ink-4 { fill: var(--color-brand-red); }
.plot-ink-5 { fill: var(--color-neutral); }
/* A person's photo, or their initials when there is none. */
.avatar { width: var(--avatar-size); height: var(--avatar-size); border-radius: var(--radius-pill); background: var(--color-neutral-surface); color: var(--color-neutral); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--font-weight-semibold); flex: var(--flex-fixed); }
/* A thumbnail, or a same-size fallback when the image is missing. */
.media-thumb { width: var(--video-thumb-width); height: var(--video-thumb-height); display: inline-flex; align-items: center; justify-content: center; border: var(--border-default); background: var(--color-surface-subtle); color: var(--color-text-secondary); object-fit: contain; }
/* A machine response or markdown source in the code font. */
.code-block { font-family: var(--font-family-code); font-size: var(--font-size-sm); white-space: pre-wrap; overflow-wrap: anywhere; max-height: var(--code-block-max-height); overflow: auto; padding: var(--space-16); margin: var(--space-0); border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
/* A wide dialog: sets the width .modal and dialog.modal read, so dialog.modal's phone gutter still applies. */
.modal.wide { --modal-width: var(--modal-width-wide); }
/* Rendered prose on a .stack: long words and addresses wrap inside the column. */
.prose { overflow-wrap: anywhere; }
/* A matched search term, in the selection colour instead of the browser's yellow. */
.search-match { background: var(--color-selection); color: var(--color-text); }
/* Rules a rest-of-CMS page chunk needed and no shared class covered (rest_of_cms_astra_layouts.md Method step 6). */
/* A table cell whose prose wraps inside its column (a search snippet); every other cell stays on one line. */
.table td.wrap { white-space: normal; overflow-wrap: anywhere; }
/* A table row on its way out while its removal is in flight (an undelivered message being dismissed). */
.table tbody tr.is-leaving { opacity: var(--opacity-half); }
/* The formatting editor's surface (a contenteditable drawn as .input.multiline): its placeholder reads as an input's
   placeholder does, and a link looks like a link while it is being written. */
.input[contenteditable]:empty::before { color: var(--color-text-secondary); }
.input[contenteditable] a { color: var(--color-action-primary); text-decoration: underline; }
/* A ticket board's drag and drop (Tickets): the tab, lane or card being dragged fades; the tab or lane a dragged tab or
   column would land on is marked on its leading edge; the lane a card is held over is lit, with a line where the card
   would land. Scoped under .tab and .board-lane; no Customer Care, Ecosystem map or User journeys file sets these states. */
.tab.dragging, .board-lane.dragging, .board-lane .panel.dragging { opacity: var(--opacity-disabled); }
.tab.drop-target, .board-lane.col-drop-target { box-shadow: inset var(--border-width-emphasis) var(--space-0) var(--space-0) var(--color-action-primary); }
.board-lane.drop-target { background: var(--color-action-quiet-hover); border-radius: var(--radius-md); }
.board-lane .drop-hint { height: var(--border-width-emphasis); background: var(--color-action-primary); border-radius: var(--radius-sm); }
/* A ticket card's first image, a strip across the top of the card. */
.board-lane .panel > img { display: block; width: var(--size-full); height: var(--thumbnail-height); object-fit: cover; border-radius: var(--radius-sm); }
/* Stored rich text drawn as .prose (a ticket's description and comments): a link looks like a link, and its blocks keep
   the spacing the ticket drawer gave them. Not on the editor's surface (.input.prose), which keeps the browser's own
   spacing while somebody types; its link look is .input[contenteditable] a above. */
.prose:not(.input) a { color: var(--color-action-primary); text-decoration: underline; }
.prose:not(.input) a:hover { color: var(--color-action-primary-hover); }
.prose:not(.input) :is(p, ul, ol, blockquote) { margin: var(--space-0) var(--space-0) var(--space-6) var(--space-0); }
.prose:not(.input) :is(p, ul, ol, blockquote):last-child { margin-bottom: var(--space-0); }
.prose:not(.input) :is(ul, ol) { padding-left: var(--space-20); }
.prose:not(.input) blockquote { padding-left: var(--space-12); border-left: var(--border-width-emphasis) solid var(--color-border); color: var(--color-text-secondary); }
.prose:not(.input) code { background: var(--color-surface-subtle); padding: var(--space-0) var(--space-2); border-radius: var(--radius-sm); }
/* A person's photo beside their name in a table cell (Directory): centred on the line, as the initials disc already
   reads, instead of standing on the text baseline. No Customer Care, Ecosystem map or User journeys file emits .avatar. */
.table td > img.avatar { vertical-align: middle; }
/* The project card the Ecosystem map sent the reader to (Roadmap, #Roadmap?item=<id>): the red edge and gold ring the
   old card wore (Roadmap.css:90-93 before page chunk 11). Scoped under .panel; no Customer Care, Ecosystem map or User
   journeys file puts aria-current on a .panel. */
.panel[aria-current="true"] { border-color: var(--color-brand-red); box-shadow: var(--space-0) var(--space-0) var(--space-0) var(--border-width-emphasis) var(--color-brand-gold-light); }
/* A Knowledge contents entry for a sub-heading (Knowledge reader, #Knowledge?id=<page>): set in under its section, as the
   old rail drew it (Knowledge.css:151-154 before page chunk 12). No Customer Care, Ecosystem map or User journeys file
   emits data-depth. */
.template-layout > nav > .link[data-depth="3"] { padding-left: var(--space-12); }
/* Rendered markdown on a .stack.prose (the Knowledge reader and its editor preview): its blocks take the stack's gap,
   headings read as section headings, a quote reads as a .note (as Astra's reader draws one), and fenced code, tables
   and rules take the code block, table and divider looks, since the server's sanitised HTML carries no class
   (helpers/markdown.mjs). Links, list indents and inline code's ground come from the .prose rules above. Scoped under .stack.prose: Ticket detail's .prose is not a .stack, and no Customer
   Care, Ecosystem map or User journeys file emits .prose. */
.stack.prose > :is(p, ul, ol, blockquote) { margin: var(--space-0); }
.stack.prose :is(h1, h2, h3, h4, h5, h6) { margin: var(--space-0); font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); line-height: var(--line-height-normal); }
.stack.prose :is(h4, h5, h6) { font-size: var(--font-size-md); }
.stack.prose li + li { margin-top: var(--space-2); }
.stack.prose blockquote { padding: var(--space-16); background: var(--color-surface-subtle); border-left: var(--border-width-emphasis) solid var(--color-border-control); border-radius: var(--radius-sm); color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.stack.prose code { font-family: var(--font-family-code); font-size: var(--font-size-sm); }
.stack.prose pre { font-family: var(--font-family-code); font-size: var(--font-size-sm); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; padding: var(--space-16); margin: var(--space-0); border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.stack.prose pre code { padding: var(--space-0); background: var(--color-transparent); font-size: inherit; }
.stack.prose table { display: block; overflow-x: auto; border-collapse: collapse; text-align: left; font-size: var(--font-size-sm); }
.stack.prose th { padding: var(--space-12); background: var(--color-neutral-surface); color: var(--color-text-secondary); font-weight: var(--font-weight-semibold); border-bottom: var(--border-default); }
.stack.prose td { padding: var(--space-12); border-bottom: var(--border-default); vertical-align: top; }
.stack.prose hr { margin: var(--space-0); border: var(--border-none); border-top: var(--border-default); }
/* The dashboard's drag and drop (Dashboard, arrange mode; dashDrag.mjs): the card being carried is a clone with a gold
   edge under the dialog shadow, and the slot it left is a hollow dashed gold outline whose contents fade, the old look
   (DashboardGrid.css:95-118 before page chunk 14). Scoped under .panel; no Customer Care, Ecosystem map or User journeys
   file emits drag-ghost or drag-source. */
.panel.drag-ghost { border-color: var(--color-brand-gold); box-shadow: var(--shadow-modal); }
.panel.drag-source { background: var(--color-surface-subtle); border-style: dashed; border-color: var(--color-brand-gold); box-shadow: var(--shadow-none); }
.panel.drag-source > * { opacity: var(--opacity-disabled); }
/* The Reports trend (Reports, rest-of-CMS page chunk 15; Reports.css:66,70-72 before it): axis labels in the secondary
   ink; a provisional day's band in the warning tint its legend badge wears; each day's transparent hit area, which a
   pointer or keyboard focus tints so the day reads as clickable. Scoped under .plot; the Dashboard's charts draw no
   text and none of these classes, and no Customer Care, Ecosystem map or User journeys file emits .plot. */
.plot text { fill: var(--color-text-secondary); font-size: var(--font-size-4xs); }
.plot .plot-provisional { fill: var(--color-warning-surface); }
.plot .plot-hit { fill: var(--color-transparent); cursor: pointer; }
.plot .plot-hit:hover, .plot .plot-hit:focus-visible { fill: var(--color-action-primary); opacity: var(--opacity-faint); }
/* The Directory's roster and person editor (Astra's DUNNING-EMAIL-DESIGN/cms-pages/proposed-additions.css, final
   Directory block, 2026-10-06; keyword tokens written as keywords): a name or address wraps inside its column; the
   permission matrix's cells sit tighter than a queue row, its section names read as plain row labels and its radios
   centre under their heads; below 850px each roster row wraps, labelled by its cell's data-column, ruled between
   people instead of under every cell. Scoped under .directory-roster, .person-editor and .permission-matrix; no
   Customer Care, Ecosystem map or User journeys file emits them. */
.directory-roster .text, .person-editor .text { overflow-wrap: anywhere; }
.permission-matrix th, .permission-matrix td { padding: var(--space-8) var(--space-12); }
.permission-matrix th[scope="row"] { background: var(--color-surface); font-weight: var(--font-weight-normal); white-space: pre-wrap; }
.permission-matrix td, .permission-matrix th:not(:first-child) { text-align: center; }
@media (max-width: 850px) {
  .directory-roster td { border-bottom: var(--border-none); }
  .directory-roster tr + tr { border-top: var(--border-default); }
  .directory-roster td[data-column]::before { content: attr(data-column); display: block; font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-bottom: var(--space-4); }
}

/* Entity report builder (REPORT_BUILDER_ENTITY_PAGE_BRIEF.md 5.9; Astra's DUNNING-EMAIL-DESIGN/cms-pages/proposed-additions.css,
   the nine entity strip rules at :165-173 and the forty round-two rules at :213-252, each with .ReportBuilderEntities
   written .ReportBuilder, otherwise verbatim): the entity strip, the axis head and its by options, the column joins,
   marks and footnotes, the sub-row table's axis cells, and the picker's grouped field sections. */
.ReportBuilder .entity-start { background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-md); }
.ReportBuilder .entity-start > .text { padding: var(--space-12) var(--space-16); margin: var(--space-0); border-top: var(--border-default); }
.ReportBuilder .entity-start-button { font: inherit; color: var(--color-text); background: var(--color-surface); border: var(--border-none); border-top: var(--border-width-emphasis) solid var(--color-transparent); padding: var(--space-16); display: var(--display-flex); align-items: var(--layout-start); gap: var(--space-12); text-align: var(--text-left); cursor: var(--cursor-pointer); }
.ReportBuilder .entity-start-button + .entity-start-button { border-left: var(--border-default); }
.ReportBuilder .entity-start-button[aria-pressed="true"] { border-top: var(--entity-active-rule); background: var(--color-info-surface); }
.ReportBuilder .entity-start-button:hover { background: var(--color-action-quiet-hover); }
.ReportBuilder .entity-start-button:focus-visible { outline: var(--outline-focus); outline-offset: var(--focus-inset); }
.ReportBuilder .entity-start-button strong { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
.ReportBuilder .entity-description { display: var(--display-block); font-size: var(--font-size-sm); color: var(--color-text-secondary); line-height: var(--line-height-normal); margin-top: var(--space-4); }
.ReportBuilder .entity-empty { min-height: var(--preview-min-height); background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-md); display: var(--display-flex); align-items: var(--layout-center); justify-content: var(--layout-center); }
.ReportBuilder .entity-empty > p { font-size: var(--font-size-xl); color: var(--color-text-secondary); }
.ReportBuilder .entity-axis-title { display: var(--display-flex); gap: var(--entity-axis-head-gap); flex-wrap: var(--flow-wrap); align-items: var(--layout-start); }
.ReportBuilder .entity-axis-by { max-width: var(--size-full); }
.ReportBuilder .entity-axis-by > .button { padding-inline: var(--space-8); }
.ReportBuilder .entity-by-options { background: var(--color-surface); border: var(--border-control); border-radius: var(--radius-sm); padding: var(--space-4); }
.ReportBuilder .entity-by-options .button { display: var(--display-flex); width: var(--size-full); justify-content: var(--layout-start); }
.ReportBuilder .entity-by-options [aria-pressed="true"] { background: var(--color-selection); color: var(--color-action-primary); }
.ReportBuilder .entity-measure .entity-column-derived, .ReportBuilder .entity-measure .entity-column-join { margin-top: var(--space-8); line-height: var(--line-height-normal); }
.ReportBuilder .entity-measure .entity-column-join { color: var(--color-action-primary); }
.ReportBuilder .entity-note-link { margin-top: var(--space-8); width: var(--size-fit); text-decoration: var(--text-decoration-none); }
.ReportBuilder .entity-note-link:focus-visible { outline: var(--outline-focus); outline-offset: var(--focus-offset); }
.ReportBuilder .entity-column-notes { padding-left: var(--entity-footnote-padding); margin: var(--space-0); font-size: var(--font-size-sm); line-height: var(--line-height-normal); color: var(--color-text-secondary); }
.ReportBuilder .entity-column-notes li + li { margin-top: var(--space-8); }
.ReportBuilder .entity-column-notes li:target { background: var(--color-info-surface); color: var(--color-text); }
.ReportBuilder .entity-table .entity-axis-cell { background: var(--sheet-header-surface); color: var(--color-text); white-space: var(--white-normal); min-width: var(--sheet-anchor-width); max-width: var(--sheet-anchor-width); font-weight: var(--font-weight-medium); vertical-align: var(--vertical-top); }
.ReportBuilder .entity-table tbody tr.entity-customer-start > * { border-top: var(--entity-group-rule); }
.ReportBuilder .entity-show-rank { color: var(--color-text-secondary); font-variant-numeric: var(--font-tabular); }
.ReportBuilder .entity-table td { vertical-align: var(--vertical-top); }
.ReportBuilder .entity-table td:not(.numeric) { white-space: var(--white-normal); }
.ReportBuilder .entity-column-picker { padding: var(--space-20); border-top: var(--sheet-anchor-rule); }
.ReportBuilder .entity-column-picker > .field { margin-block: var(--space-16); }
.ReportBuilder .entity-picker-title { justify-content: var(--layout-between); }
.ReportBuilder .entity-field-section { border-top: var(--border-default); }
.ReportBuilder .entity-field-section > summary { padding-block: var(--space-12); cursor: var(--cursor-pointer); font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); color: var(--color-text); }
.ReportBuilder .entity-field-section > summary h3 { display: inline; font-size: inherit; margin: var(--space-0); }
.ReportBuilder .entity-field-section[open] > summary { color: var(--color-action-primary); }
.ReportBuilder .entity-field-section-body { padding-right: var(--space-8); padding-bottom: var(--space-8); }
.ReportBuilder .entity-source-heading { margin-block: var(--space-12); padding-bottom: var(--space-8); border-bottom: var(--border-default); }
.ReportBuilder .entity-field-choice { display: var(--display-grid); grid-template-columns: var(--entity-control-columns); align-items: var(--layout-start); gap: var(--space-8); padding-block: var(--space-8); border-bottom: var(--border-default); }
.ReportBuilder .entity-field-choice > div { min-width: var(--size-min); }
.ReportBuilder .entity-field-choice .strong { font-weight: var(--font-weight-medium); font-size: var(--font-size-sm); }
.ReportBuilder .entity-field-choice p { margin-top: var(--space-4); }
.ReportBuilder .entity-field-choice.is-unavailable > div > .strong { color: var(--color-disabled-text); }
.ReportBuilder .entity-field-choice .button { padding-inline: var(--space-8); }
.ReportBuilder .entity-not-held { padding-top: var(--space-12); margin-top: var(--space-12); border-top: var(--border-default); font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.ReportBuilder .entity-not-held summary { cursor: var(--cursor-pointer); }
.ReportBuilder .entity-not-held p { margin-top: var(--space-8); }
.ReportBuilder .entity-column-menu { font-weight: var(--font-weight-normal); }
.ReportBuilder .entity-measure .entity-column-derived, .ReportBuilder .entity-measure .entity-column-join { font-weight: var(--font-weight-normal); }

/* Report builder redesign (DUNNING-EMAIL-DESIGN/report-builder-redesign/layout.css, its preview-shell rules left out):
   the report heading, the compact period row and Run, the canvas beside the contextual panel while one is open, the
   structure and cohort strip, the column header button, the spreadsheet grid's left-aligned cells and vertical
   separators (--border-default), the nested source picker, the library cell, the listed-report search row, and the
   wrapping at narrow widths. Every dimension is an existing token. The narrow-width blocks query the builder's own
   width, not the window's: the prototype's preview shell hides its menu at 850px, the console's menu never hides, so
   a window query left the builder its wide arrangement in a column half as wide (a 606px window gave the listed
   search row a 43px box and laid Rows per page over Clear). Each width is the builder's width in the prototype at
   the window breakpoint it replaces: 941px at 1180px, 795px at 850px, 561px at 600px (measured 2026-10-10). */
.ReportBuilder { container: report-builder / inline-size; }
/* The prototype's .report-design workspace: no width cap, its own padding, and the builder's tabs, build page and saved
   page stacked with no gap (the prototype's builder is a block inside that workspace; the console's builder is the
   workspace, so the master .workspace's 32px padding, 24px gap and width cap are replaced here). A container cannot
   query its own width, so the padding steps on the window: 1180px as in the prototype (both show the 184px menu there),
   and 784px for the prototype's 600px, the width where the prototype hides its menu: 600px plus that menu. */
.ReportBuilder.workspace { max-width: none; gap: var(--space-0); padding: var(--space-24) var(--space-32); }
@media (max-width: 1180px) {
.ReportBuilder.workspace { padding: var(--space-20); }
}
@media (max-width: 784px) {
.ReportBuilder.workspace { padding: var(--space-12); }
}
.ReportBuilder #build-page { gap: var(--space-0); }
.ReportBuilder #builder-toolbar { display: flex; flex-direction: column; gap: var(--space-16); }
.ReportBuilder .report-heading { margin-top: var(--space-16); }
.ReportBuilder .report-controls { display: flex; flex-direction: row; align-items: end; justify-content: space-between; gap: var(--space-16); padding: var(--space-0); }
.ReportBuilder .report-period { display: flex; align-items: end; gap: var(--space-12); flex-wrap: wrap; }
.ReportBuilder .report-period > .field { width: var(--field-min-width); }
.ReportBuilder .report-run { flex: var(--flex-fixed); align-items: center; padding-bottom: var(--space-0); }
.ReportBuilder .report-result-tools { margin-top: calc(-1 * var(--space-12)); margin-bottom: var(--space-8); }
.ReportBuilder .builder-body { display: grid; grid-template-columns: var(--grid-columns-one); align-items: start; gap: var(--space-20); }
.ReportBuilder .builder-body.has-inspector { grid-template-columns: var(--report-inspector-columns); }
.ReportBuilder .report-canvas { padding: var(--space-20); gap: var(--space-16); min-height: var(--canvas-min-height); }
.ReportBuilder #builder-strip .tabs { flex-wrap: nowrap; }
.ReportBuilder #builder-strip .tab { flex: var(--flex-grow); justify-content: center; padding-inline: var(--space-12); }
.ReportBuilder .report-cohort { text-align: right; }
.ReportBuilder .report-cohort .row { justify-content: flex-end; }
.ReportBuilder .entity-strip { display: grid; grid-template-columns: var(--grid-columns-two); }
.ReportBuilder .entity-axis-by { position: relative; }
.ReportBuilder .entity-by-options { position: absolute; top: var(--size-full); left: var(--space-0); z-index: var(--z-tooltip); min-width: var(--field-min-width); }
.ReportBuilder .entity-table { min-width: var(--size-min); }
.ReportBuilder .entity-table th { white-space: normal; vertical-align: top; min-width: var(--field-min-width); }
.ReportBuilder .entity-table th:last-child { min-width: var(--thumbnail-width); }
.ReportBuilder .entity-table th { text-align: left; }
.ReportBuilder .report-column-trigger { width: var(--size-full); justify-content: space-between; text-align: left; padding-inline: var(--space-0); gap: var(--space-12); }
.ReportBuilder .entity-table .sheet-anchor { min-width: var(--key-column-width); padding-top: calc(var(--space-12) + var(--space-4)); }
.ReportBuilder .entity-table td { padding-block: var(--space-20); }
.ReportBuilder #builder-table > .stack { gap: var(--space-12); }
.ReportBuilder #builder-table > .stack > .table-region { order: var(--order-first); }
.ReportBuilder #builder-picker { position: sticky; top: calc(var(--header-height) + var(--space-20)); min-width: var(--size-min); max-height: calc(var(--viewport-height) - var(--header-height) - var(--space-40)); overflow-y: auto; }
.ReportBuilder #builder-picker > .panel { gap: var(--space-16); }
.ReportBuilder .entity-column-picker > .field { margin-block: var(--space-0); }
.ReportBuilder .entity-field-section-body { padding-right: var(--space-0); }
.ReportBuilder .report-source { margin-bottom: var(--space-8); }
.ReportBuilder .report-source > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); }
.ReportBuilder .report-source > summary::before { content: '▸'; }
.ReportBuilder .report-source[open] > summary::before { content: '▾'; }
.ReportBuilder .report-source > summary .secondary { margin-left: auto; }
.ReportBuilder .report-source .disclosure-body { padding-inline: var(--space-12); }
.ReportBuilder .entity-field-choice { grid-template-columns: var(--grid-fill-auto); }
.ReportBuilder .entity-field-choice p { max-width: var(--size-full); }
.ReportBuilder #builder-picker .grid { grid-template-columns: var(--grid-columns-one); }
.report-library table { min-width: var(--size-min); }
/* The reporting pages' toast (toast.mjs): it floats at the foot of the window, centred, over the page and through to it for the pointer. */
.toast-dock { position: fixed; left: var(--space-0); right: var(--space-0); bottom: var(--space-24); display: flex; justify-content: center; z-index: var(--z-tooltip); pointer-events: none; }
@container report-builder (max-width: 941px) {
.ReportBuilder .report-controls { flex-wrap: wrap; }
.ReportBuilder .builder-body.has-inspector { grid-template-columns: var(--report-inspector-columns); }
.ReportBuilder #builder-strip .tab { padding-inline: var(--space-8); }
}
@container report-builder (max-width: 795px) {
.ReportBuilder .builder-body.has-inspector { grid-template-columns: var(--grid-columns-one); }
.ReportBuilder #builder-picker { position: static; max-height: none; order: var(--order-first); }
.ReportBuilder .report-canvas { min-height: var(--preview-min-height); }
.ReportBuilder #builder-picker .entity-field-groups { max-height: var(--dropdown-max-height); overflow-y: auto; }
}
@container report-builder (max-width: 561px) {
.ReportBuilder .report-controls { padding: var(--space-12); }
.ReportBuilder .report-period { display: grid; grid-template-columns: var(--grid-columns-two); width: var(--size-full); }
.ReportBuilder .report-period > .field { width: auto; }
.ReportBuilder .report-period > .field:first-child { grid-column: var(--grid-column-full); }
.ReportBuilder .report-run { flex-wrap: wrap; width: var(--size-full); justify-content: space-between; }
.ReportBuilder .report-canvas { padding: var(--space-12); }
.ReportBuilder #builder-strip .tabs { flex-wrap: wrap; }
.ReportBuilder #builder-strip .tab { flex-basis: var(--report-tab-half); }
.ReportBuilder .entity-strip { grid-template-columns: var(--grid-columns-one); }
}
.ReportBuilder .entity-table .entity-axis-cell { min-width: var(--key-column-width); max-width: var(--key-column-width); }
.report-library td { vertical-align: top; }
.report-library td.wrap { white-space: normal; }
.report-library td:last-child { width: var(--list-column-width); }
.report-library .grid { max-width: var(--search-width); }
.ReportBuilder .entity-table tr > :not(:last-child) { border-right: var(--border-default); }
.ReportBuilder .entity-table tbody td { text-align: left; }
.ReportBuilder .entity-table tbody .entity-axis-cell { vertical-align: middle; }
.ReportBuilder #report-structure { align-items: start; }
.ReportBuilder #report-structure > .row { min-height: var(--control-height-small); }
.ReportBuilder #builder-rows { grid-template-columns: var(--report-search-columns); row-gap: var(--space-8); }
.ReportBuilder #builder-rows > .stack { display: contents; }
.ReportBuilder #builder-rows > .stack > .field { grid-column: var(--grid-line-1); grid-row: var(--grid-line-1); }
.ReportBuilder #builder-rows > .stack > .text { grid-column: var(--grid-column-full); grid-row: var(--grid-line-2); }
.ReportBuilder #builder-rows > .row { grid-column: var(--grid-line-2); grid-row: var(--grid-line-1); flex-wrap: nowrap; }
.ReportBuilder #builder-rows > .row .button { min-height: var(--control-height); }
.ReportBuilder #builder-rows > .field { grid-column: var(--grid-line-4); grid-row: var(--grid-line-1); }
@container report-builder (max-width: 561px) {
.ReportBuilder #builder-rows { grid-template-columns: var(--grid-fill-auto); }
.ReportBuilder #builder-rows > .field { grid-column: var(--grid-column-full); grid-row: var(--grid-line-3); max-width: var(--field-min-width); }
}

/* The customer panel and its Payment tab (Astra's DUNNING-EMAIL-DESIGN/customer-payment/payment.css, 2026-10-29;
   dunning_briefs/comp_toggle_2026-10-29.md rule 9): the specimen's .PaymentPreview scope dropped, not renamed, so a
   rule under it is scoped under .customer-panel (in screen.html the panel sits inside that workspace); .comp-switch is
   unscoped as Astra wrote it. Its --calendar-columns is a token in tokens.css. The specimen's chrome rules (navigation, header, Main, page-main, PageMenu and the
   workspace padding) are prototype scaffolding and are not here. */
.customer-panel { padding: var(--space-0); gap: var(--space-0); }
.customer-panel .customer-heading { padding: var(--space-20) var(--space-24); }
.customer-panel .customer-code { margin-left: var(--space-16); }
.customer-panel > .tabs { padding-inline: var(--space-24); }
.customer-panel .payment-body { padding: var(--space-24); gap: var(--space-32); }
.customer-panel .comp-section { gap: var(--space-20); }
.customer-panel h4 { margin: var(--space-0); }
.customer-panel .comp-control { flex-wrap: nowrap; }
.comp-switch { display: inline-flex; align-items: center; flex: var(--flex-fixed); width: calc(var(--space-24) + var(--space-24)); height: var(--control-height-small); padding: var(--space-4); border: var(--border-width) solid var(--color-border-control); border-radius: var(--radius-pill); background: var(--color-neutral); cursor: pointer; }
.comp-switch > span { width: var(--icon-size-lg); height: var(--icon-size-lg); border-radius: var(--radius-pill); background: var(--color-surface); }
.comp-switch[aria-checked="true"] { justify-content: flex-end; background: var(--color-action-primary); border-color: var(--color-action-primary); }
.customer-panel .expiry-layout { display: grid; grid-template-columns: var(--entity-report-columns); gap: var(--space-32); align-items: start; }
.customer-panel .expiry-layout > .stack { padding-top: var(--space-8); }
.customer-panel .calendar-card { min-width: var(--size-min); margin: var(--space-0); padding: var(--space-16); border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface-subtle); }
.customer-panel .calendar-card legend { padding-inline: var(--space-6); }
.customer-panel .calendar-week, .customer-panel .calendar-days { display: grid; grid-template-columns: var(--calendar-columns); gap: var(--space-4); text-align: center; }
.customer-panel .calendar-week { color: var(--color-text-secondary); font-size: var(--font-size-xs); }
.customer-panel .calendar-day { min-width: var(--size-min); min-height: var(--control-height-small); padding: var(--space-4); border: var(--border-width) solid var(--color-transparent); border-radius: var(--radius-sm); background: var(--color-transparent); color: var(--color-text); cursor: pointer; font-variant-numeric: tabular-nums; }
.customer-panel .calendar-day:hover:enabled { background: var(--color-action-quiet-hover); }
.customer-panel .calendar-day[aria-pressed="true"] { background: var(--color-action-primary); color: var(--color-text-on-action); }
.customer-panel .calendar-day:disabled { color: var(--color-disabled-text); cursor: not-allowed; }
.customer-panel .calendar-card:disabled .calendar-days, .customer-panel .calendar-card:disabled .calendar-week { opacity: var(--opacity-half); }
.customer-panel .calendar-inputs { grid-template-columns: var(--grid-columns-two); gap: var(--space-12); margin-top: var(--space-8); }
.customer-panel .calendar-inputs .input { padding-inline: var(--space-6); }
.customer-panel .payment-history { padding-top: var(--space-24); border-top: var(--border-default); }
.customer-panel .payment-history .field { min-width: var(--field-min-width); }
.customer-panel .payment-history .table { min-width: var(--readable-width); }
.customer-panel .payment-history .table td { padding-block: var(--space-16); }
.customer-panel .payment-description { display: block; color: var(--color-text-secondary); font-size: var(--font-size-xs); margin-top: var(--space-4); }
.customer-panel .customer-heading p { overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .customer-panel .expiry-layout { grid-template-columns: var(--grid-columns-one); gap: var(--space-20); }
  .customer-panel .calendar-card { max-width: var(--field-max-width); width: var(--size-full); }
  .customer-panel .customer-heading, .customer-panel .payment-body { padding: var(--space-16); }
  .customer-panel > .tabs { padding-inline: var(--space-8); }
  .customer-panel > .tabs .tab { padding-inline: var(--space-12); }
  .customer-panel .customer-code { display: block; margin-left: var(--space-0); }
}
