/* The Orona skin over the Salesforce Lightning Design System 2.264.1 (D1, owner 2026-10-19: "A, SLDS
   (Orona skin)"). Loaded after static/vendor/slds/salesforce-lightning-design-system.scoped.min.css,
   which reaches only a container marked class="slds-scope"; so does every rule here. Markup that is
   not inside one gets only css/orona-base.css. Tokens from brand/orona/DESIGN.md (the --orona-*
   variables of css/orona-base.css), written into SLDS's own styling hooks: green for actions, navy
   for text, links, headings and focus, Montserrat, flat and square. css/orona-base.css already
   takes every radius but a radio's (E33-Q2) to 0 and every shadow away on the whole page, so
   SLDS's box-shadow focus ring is replaced by an outline here. Rules: docs/11. */

.slds-scope {
  /* Type: our self-hosted Montserrat (@font-face in css/orona-base.css), 400/600/700 only. */
  --slds-g-font-family-base: var(--orona-font);

  /* Brand ramp: SLDS's blue becomes Orona green where it marks an action; the dark end is navy. */
  --slds-g-color-brand-base-50: var(--orona-green);
  --slds-g-color-brand-base-40: var(--orona-navy);
  --slds-g-color-brand-base-30: var(--orona-navy);
  --slds-g-color-brand-base-20: var(--orona-navy);
  --slds-g-color-brand-base-10: var(--orona-navy);
  --slds-g-color-brand-base-95: var(--orona-grey);
  --slds-g-color-brand-base-90: var(--orona-tint);
  --lwc-brandPrimary: var(--orona-green);
  --lwc-brandPrimaryActive: var(--orona-navy);
  --lwc-brandAccessible: var(--orona-navy);
  --lwc-brandAccessibleActive: var(--orona-navy);
  --lwc-brandDark: var(--orona-navy);
  --lwc-brandDarkActive: var(--orona-navy);
  --lwc-brandLight: var(--orona-grey);
  --lwc-brandLightActive: var(--orona-tint);
  --slds-g-color-accent-1: var(--orona-green);
  --slds-g-color-accent-2: var(--orona-navy);
  --slds-g-color-accent-3: var(--orona-navy);
  --slds-g-color-border-accent-2: var(--orona-navy);

  /* Text and links: body colour for long text; navy for links (F71: small text is never slate). */
  --slds-g-color-neutral-base-10: var(--orona-body);
  --slds-g-color-on-surface-3: var(--orona-navy);
  --slds-g-link-color: var(--orona-navy);
  --slds-g-link-color-hover: var(--orona-navy);
  --slds-g-link-color-focus: var(--orona-navy);
  --slds-g-color-border-1: var(--orona-rule);
  --slds-g-color-border-base-1: var(--orona-rule);

  /* Status colours mean something; red only for "needs action", amber for a warning. */
  --slds-g-color-error-base-40: var(--orona-red);
  --slds-g-color-error-base-50: var(--orona-red);
  --slds-g-color-warning-base-60: var(--orona-amber);
  --slds-g-color-success-base-50: var(--orona-green);

  /* Flat and square (brand: radius 0 to 6 px; the Orona layer takes every radius to 0), no shadow. */
  --slds-g-radius-border-2: 0;
  --slds-g-shadow-1: none;
  --slds-g-shadow-2: none;
  --slds-g-shadow-3: none;
  --slds-g-shadow-4: none;

  /* Buttons: brand = the darker green with white bold text (F379: 4.79 to 1, never white on
     the brand green), hover navy as the Orona layer's .btn-primary; neutral = navy text on white. */
  --slds-c-button-brand-color-background: var(--orona-green-ink);
  --slds-c-button-brand-color-border: var(--orona-green-ink);
  --slds-c-button-brand-text-color: #FFFFFF;
  --slds-c-button-brand-color-background-hover: var(--orona-navy);
  --slds-c-button-brand-color-border-hover: var(--orona-navy);
  --slds-c-button-brand-text-color-hover: #FFFFFF;
  --slds-c-button-brand-color-background-active: var(--orona-navy);
  --slds-c-button-brand-color-border-active: var(--orona-navy);
  --slds-c-button-brand-text-color-active: #FFFFFF;
  --slds-c-button-text-color: var(--orona-navy);
  --slds-c-button-text-color-hover: var(--orona-navy);

  /* Tabs: the active tab's rule in green. */
  --slds-c-tabs-item-color-border-active: var(--orona-green);

  /* SLDS paints the page (its html rule) light blue; a scoped container keeps the page's white. */
  background: transparent;
  color: var(--orona-body);
  font-family: var(--orona-font);
}

/* Headings, links and labels: navy, sentence case (SLDS uppercases some labels and badges). */
.slds-scope a,
.slds-scope .slds-text-link,
.slds-scope .slds-text-heading_large,
.slds-scope .slds-text-heading_medium,
.slds-scope .slds-text-heading_small,
.slds-scope .slds-form-element__label { color: var(--orona-navy); }
/* F383 (owner, 20 Oct): page and section titles in the darker green (4.79 to 1 on white, 4.50 on
   the grey page); body, labels and figures stay navy. Never a status colour (a green heading is
   not "good"). */
.slds-scope .slds-page-header__title,
.slds-scope .slds-card__header-title,
.slds-scope .o-head__h1,
.slds-scope .o-lib__h2 { color: var(--orona-green-ink); }
.slds-scope a:hover, .slds-scope a:focus { color: var(--orona-navy); text-decoration: underline; }
/* DESIGN-FIX1 B3 (D9): SLDS's `.slds-scope a { text-decoration: none }` (0-1-1) beat D9's `main a`
   (orona-base.css, 0-0-2), so a link in the page's words looked like the words around it (WCAG
   1.4.1). The same weight, later: underlined again, the line thicker on hover. Controls keep their
   own look (D9): buttons (the CSV link's too), tabs, chips, pills, the back link, menu and rail
   items, sort headers, links in a nav and the chart bars; :where() adds no weight, so any rule
   naming a class still wins. */
.slds-scope a:where(:not([class*="button"], [class*="tabs"], [class*="__item"], [class*="chip"], [class*="pill"], .o-back, .skip-link, thead a, nav a, svg a)) { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.slds-scope a:where(:not([class*="button"], [class*="tabs"], [class*="__item"], [class*="chip"], [class*="pill"], .o-back, .skip-link, thead a, nav a, svg a)):hover { text-decoration-thickness: 2px; }
.slds-scope .slds-text-title_caps,
.slds-scope .slds-badge { text-transform: none; letter-spacing: normal; }

/* Buttons: bold white on the darker green (F379, see the hooks above), never under 14 px. */
.slds-scope .slds-button_brand { font-weight: 700; font-size: 14px; }
/* f_flakes_060: no border transition on the grey button. WebKit can style a page once before its
   sheets apply (no border, `medium` width); SLDS's `transition: border .15s` then drew 3 px thinning to
   1 px after the page showed, and the CRM list's Filters and Views row rose 2 px under the reader. */
.slds-scope .slds-button_neutral { font-weight: 600; border-color: var(--orona-rule); transition: none; }

/* Focus: SLDS draws a box-shadow ring and sets `outline: 0` on focus in many components (its
   `.slds-button:focus` among them); the Orona layer removes every box-shadow with !important, which
   would leave no focus at all. So a navy outline, with !important to beat each of those rules. */
.slds-scope :focus-visible { outline: 2px solid var(--orona-navy) !important; outline-offset: 2px !important; }
/* issue 1130 F3: the one exception, beside the rule it beats: a month chart's column link draws its own ring (the
   column's 3 px stroke, orona-slds-charts.css `.o-mc__hit`), so the outline gives way there (ONE ring). */
.slds-scope .o-mc a:focus-visible { outline: none !important; }
/* ...but under forced colours (Windows high contrast) a drawn stroke is not a system focus indicator: the link takes the
   real outline back in the system's highlight colour (WCAG 2.4.7; tests/shell/test_mc1130_browser.py forced colours) */
@media (forced-colors: active) { .slds-scope .o-mc a:focus-visible { outline: 2px solid Highlight !important; outline-offset: 2px !important; } }

/* One accent per surface: the page header carries the green rule on its left, cards a thin rule. */
.slds-scope .slds-page-header { background: #FFFFFF; border: 1px solid var(--orona-rule); border-left: 4px solid var(--orona-green); }
.slds-scope .slds-card { border: 1px solid var(--orona-rule); }

/* Tables: panel-grey head with navy SemiBold labels; figures in tabular numerals. SLDS sets table
   text at 13 px, so it is navy (F71: every text under 14 px; D2's /design/ test reads it). */
.slds-scope .slds-table thead th { background: var(--orona-grey); color: var(--orona-navy); font-weight: 600; }
.slds-scope .slds-table td, .slds-scope .slds-table th { color: var(--orona-navy); font-variant-numeric: tabular-nums; }

/* Tab labels navy. */
.slds-scope .slds-tabs_default__link { color: var(--orona-navy); font-weight: 600; }

/* Small text is never green (green on white is 3.27 to 1): SLDS colours success text and inserted
   rich text with success-base-50, which is green here. */
.slds-scope .slds-text-color_success,
.slds-scope .slds-rich-text-editor__output ins,
.slds-scope .slds-rich-text-editor__textarea ins { color: var(--orona-navy); }

/* ---- D2: the base partials (templates/slds/, platform_core/templatetags/slds.py; mocks mock1 and
   m12). Small text (under 14 px) is navy on a light ground, or white on navy, never green or slate
   (F71; tests/shell/test_design_browser.py reads every small text on /design/). Status is a word
   and its Tabler icon; colour only repeats it. Phone: every control is 44 px tall under 768 px. */
.slds-scope .icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* Back link above the header. */
.slds-scope .o-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-bottom: 8px; min-height: 24px; }

/* Page header: object square, kicker, title, id line, actions, then the facts row. */
.slds-scope .o-head { padding: 14px 16px 0; margin-bottom: 16px; }
.slds-scope .o-head__top { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; padding-bottom: 14px; }
.slds-scope .o-head__title { flex: 1 1 320px; min-width: 0; }
.slds-scope .o-head__icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: var(--orona-navy); color: #FFFFFF; }
.slds-scope .o-head__icon .icon { width: 20px; height: 20px; }
.slds-scope .o-head__kicker { color: var(--orona-navy); font-size: 12px; font-weight: 600; margin: 0; }
.slds-scope .o-head__h1 { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 2px 0 4px; overflow-wrap: anywhere; }
.slds-scope .o-head__meta { color: var(--orona-navy); font-size: 12px; margin: 0; overflow-wrap: anywhere; }
.slds-scope .o-head__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slds-scope .o-head__actions .slds-button { margin: 0; gap: 6px; min-height: 32px; }
.slds-scope .o-head__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 -16px; border-top: 1px solid var(--orona-rule); }
.slds-scope .o-head__fact { padding: 10px 16px; border-right: 1px solid var(--orona-rule); min-width: 0; }
.slds-scope .o-head__fact:last-child { border-right: 0; }
.slds-scope .o-head__fact_attention { background: var(--orona-new); }
.slds-scope .o-head__fact dt { color: var(--orona-navy); font-size: 12px; font-weight: 600; }
.slds-scope .o-head__fact dd { margin: 2px 0 0; color: var(--orona-body); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.slds-scope .o-head__note { display: block; color: var(--orona-navy); font-size: 12px; font-weight: 400; }

/* Badges: word + icon; tint or rule behind navy text. Red marks "needs action" by its border and
   icon, never as small text on red. */
.slds-scope .o-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; border: 1px solid transparent; color: var(--orona-navy); font-size: 12px; font-weight: 700; line-height: 18px; white-space: normal; text-align: left; vertical-align: 1px; }
.slds-scope .o-badge .icon { width: 14px; height: 14px; }
.slds-scope .o-badge_success { background: var(--orona-tint); }
.slds-scope .o-badge_warning { background: var(--orona-amber); }
.slds-scope .o-badge_error { background: #FFFFFF; border-color: var(--orona-red); }
.slds-scope .o-badge_error .icon { color: var(--orona-red); }
.slds-scope .o-badge_info { background: var(--orona-grey); }
.slds-scope .o-badge_waiting { background: #FFFFFF; border-color: var(--orona-rule); }

/* The "i" help: a <details>; the panel sits under the "i" and never wider than the screen. */
.slds-scope .o-help { display: inline-block; position: relative; vertical-align: middle; }
.slds-scope .o-help__button { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--orona-navy); cursor: pointer; list-style: none; }
.slds-scope .o-help__button::-webkit-details-marker { display: none; }
.slds-scope .o-help__button .icon { width: 16px; height: 16px; } /* D9: the same 16 px as the figures' "i" */
.slds-scope .o-help__pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: -8px; width: max-content; max-width: min(20rem, calc(100vw - 32px)); border: 1px solid var(--orona-navy); text-align: left; font-weight: 400; white-space: normal; }
.slds-scope .o-help__pop .slds-popover__body { padding: 10px 12px; color: var(--orona-body); font-size: 14px; }
.slds-scope .o-help__pop .slds-popover__body p + p { margin-top: 6px; }
.slds-scope .o-help__title { color: var(--orona-navy); font-weight: 700; }
.slds-scope .o-help_end .o-help__pop { left: auto; right: -8px; }

/* Empty state: one title and one sentence, centred in its card. */
.slds-scope .o-empty { padding: 24px 16px; text-align: center; color: var(--orona-body); }
.slds-scope .o-empty__icon { display: inline-flex; color: var(--orona-navy); }
.slds-scope .o-empty__icon .icon { width: 32px; height: 32px; }
.slds-scope .o-empty__title { color: var(--orona-navy); font-size: 16px; font-weight: 700; margin: 8px 0 4px; }
.slds-scope .o-empty__text { font-size: 14px; max-width: 36rem; margin: 0 auto; }
.slds-scope .o-empty__action { margin-top: 12px; }

/* Toasts: in the page's flow above the content, navy ground with white text (as mock1); the tone
   is the icon and its word (assistive text), plus a coloured left rule. */
.slds-scope .o-toasts { display: grid; gap: 8px; margin-bottom: 12px; }
.slds-scope .o-toast { position: static; display: flex; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; max-width: none; margin: 0; padding: 10px 12px; background: var(--orona-navy); color: #FFFFFF; border-left: 6px solid var(--orona-green); text-align: left; }
.slds-scope .o-toast_warning { border-left-color: var(--orona-amber); }
.slds-scope .o-toast_error { border-left-color: var(--orona-red); }
.slds-scope .o-toast_info, .slds-scope .o-toast_waiting { border-left-color: var(--orona-grey); }
.slds-scope .o-toast__icon { display: inline-flex; color: #FFFFFF; padding-top: 1px; }
.slds-scope .o-toast__icon .icon { width: 20px; height: 20px; }
.slds-scope .o-toast__text { flex: 1 1 auto; min-width: 0; margin: 0; color: #FFFFFF; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.slds-scope .o-toast__close { flex: none; position: static; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: -4px -4px -4px 0; color: #FFFFFF; }
.slds-scope .o-toast__close .icon { width: 18px; height: 18px; }

/* The library page /design/ (staff only): sections, a code line per partial. */
.slds-scope .o-lib { max-width: 1180px; }
.slds-scope .o-lib__section { margin-bottom: 24px; }
.slds-scope .o-lib__h2 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.slds-scope .o-lib__lede { color: var(--orona-body); font-size: 14px; margin: 0 0 12px; max-width: 48rem; }
.slds-scope .o-lib__row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.slds-scope .o-lib__code { display: block; padding: 8px 12px; background: var(--orona-grey); color: var(--orona-navy); font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; margin-top: 8px; }
.slds-scope .o-lib__card { background: #FFFFFF; border: 1px solid var(--orona-rule); padding: 12px 16px; }
.slds-scope .o-lib__card + .o-lib__card { margin-top: 12px; }
.slds-scope .o-lib__table { width: 100%; }

@media (max-width: 767.98px) {
  .slds-scope .o-head { padding: 12px 12px 0; }
  .slds-scope .o-head__facts { margin: 0 -12px; grid-template-columns: 1fr 1fr; }
  .slds-scope .o-head__fact { padding: 10px 12px; border-bottom: 1px solid var(--orona-rule); }
  .slds-scope .o-head__h1 { font-size: 20px; }
  .slds-scope .o-head__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .slds-scope .o-head__actions .slds-button { min-height: 44px; justify-content: center; }
  .slds-scope .o-head__actions .o-head__primary { grid-column: 1 / -1; }
  /* r18 (c): a head with its one button (My report's "Print or save as PDF") keeps that label on one line beside Help */
  .slds-scope .o-head__actions:has(> button.slds-button:first-child) { grid-template-columns: auto 1fr; }
  .slds-scope .o-back { min-height: 44px; }
  .slds-scope .o-help__button { width: 44px; height: 44px; margin: -10px; }
  .slds-scope .o-help__pop, .slds-scope .o-help_end .o-help__pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-width: none; }
  .slds-scope .o-empty__action .slds-button, .slds-scope .o-lib__row .slds-button { min-height: 44px; }
  .slds-scope .o-toast__close { width: 44px; height: 44px; margin: -12px -8px -12px 0; }
}
/* One-look D3 item 6 (P14 ASK (4), FOLLOW-UPS D3 (9)): "← Repairs" is 44 px tall at 768-1023 too (it was 24) */
@media (max-width: 1023.98px) { .slds-scope .o-back { min-height: 44px; } }

/* D8: the jump-to index of a long page ("On this page"): in-page links to each section's
   heading, which takes the focus (tabindex="-1"). Links wrap; each is a 44 px target on a phone. */
.slds-scope .o-jump { margin: 0 0 16px; padding: 10px 16px; background: #FFFFFF; border: 1px solid var(--orona-rule); }
.slds-scope .o-jump__title { margin: 0 0 6px; color: var(--orona-navy); font-size: 14px; font-weight: 600; }
.slds-scope .o-jump__list { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.slds-scope .o-jump__list a { display: inline-flex; align-items: center; min-height: 32px; color: var(--orona-navy); text-decoration: underline; text-underline-offset: 2px; }
.slds-scope .o-jump__list a:focus-visible { outline: 2px solid var(--orona-navy); outline-offset: 2px; }
@media (max-width: 767.98px) {
  .slds-scope .o-jump { padding: 8px 12px; }
  .slds-scope .o-jump__list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
  .slds-scope .o-jump__list a { min-height: 44px; min-width: 44px; }
}
@media (max-width: 767.98px) {
  /* D8: a header with one action gives it the full width (a long "Exec report for …" stays on one or two lines). */
  .slds-scope .o-head__actions .slds-button:only-child { grid-column: 1 / -1; }
}
