/* Shared control roles. Keep data, labels and widget state in their components. */
body.flat-blue {
  --control-ink: #15293e;
  --control-hover: #244867;
  --control-soft: #eaf2fa;
  --control-line: #c6d9ea;
}

/* CTA geometry is independent of the surrounding prose scale. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn, .ac-button, .db-btn, .agd-go) {
  box-sizing: border-box;
  min-height: 56px;
  max-width: 100%;
  padding: 16px 28px;
  border: 1px solid var(--control-ink) !important;
  border-radius: 999px !important;
  background: var(--control-ink) !important;
  color: #fff !important;
  font-family: Geist, system-ui, sans-serif !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn, .ac-button, .db-btn, .agd-go):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--control-hover) !important;
  border-color: var(--control-hover) !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn-ghost, .db-btn.ghost, .ac-button-secondary) {
  background: var(--control-soft) !important;
  border-color: var(--control-line) !important;
  color: var(--control-ink) !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn-ghost, .db-btn.ghost, .ac-button-secondary):hover:not(:disabled):not([aria-disabled="true"]) {
  background: #dce9f5 !important;
  border-color: #9fb8cf !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.closing, #cta-band, .cs-closer, .cta-band, .ac-cta-band) :is(.btn, .ac-button),
html body.flat-blue.flat-blue.flat-blue.flat-blue .agd-go {
  background: #fff !important;
  border-color: #fff !important;
  color: var(--control-ink) !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.closing, #cta-band, .cs-closer, .cta-band, .ac-cta-band) :is(.btn, .ac-button):hover:not(:disabled),
html body.flat-blue.flat-blue.flat-blue.flat-blue .agd-go:hover:not(:disabled) {
  background: #dce9f5 !important;
  border-color: #dce9f5 !important;
  color: var(--control-ink) !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.hero-cta, .cta-actions, .ac-actions, .os-deploy, .entry-actions, .db-actions) {
  gap: 12px;
  flex-wrap: wrap;
}

/* Utility actions retain a smaller, touch-friendly footprint. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.os-copy, [data-entry-copy], .cs-back-top, .cs-all) {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--control-line) !important;
  border-radius: 999px !important;
  background: var(--control-soft) !important;
  color: var(--control-ink) !important;
  font-family: Geist, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.4 !important;
  letter-spacing: 0;
  text-transform: none;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.os-copy, [data-entry-copy], .cs-back-top, .cs-all):hover:not(:disabled) {
  background: #dce9f5 !important;
  border-color: #9fb8cf !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.cs-arrowbtn, .vo-arrowbtn, .db-modal-close, :where(#mobile-menu-toggle)) {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--control-line);
  background: var(--control-soft);
  color: var(--control-ink);
  align-items: center;
  justify-content: center;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.cs-arrowbtn, .vo-arrowbtn, .db-modal-close, :where(#mobile-menu-toggle)):hover:not(:disabled) {
  background: #dce9f5;
  border-color: #9fb8cf;
  color: var(--control-ink);
}

/* Tabs and filters share feedback, while retaining their widget layout. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.ol-tabs, .os-tabs, .news-filter, .filters, .audit-controls) {
  gap: 12px;
  border-bottom: 0;
  flex-wrap: wrap;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.ol-tab, .svc-tab, .os-tab, .tce-tab, .pf-tab, .bx-tab, .news-chip, .filters button, .audit-controls button, .seg-btn) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  margin: 0;
  border: 1px solid var(--control-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--control-ink) !important;
  font-family: Geist, system-ui, sans-serif !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: normal;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.news-chip, .filters button, .audit-controls button, .seg-btn) {
  min-height: 44px;
  padding: 10px 16px;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .seg-btn { padding-inline: 4px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.ol-tab, .svc-tab, .os-tab, .tce-tab, .pf-tab, .bx-tab, .news-chip, .filters button, .audit-controls button, .seg-btn):hover:not(:disabled) {
  background: var(--control-soft) !important;
  border-color: #9fb8cf !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.ol-tab, .svc-tab, .os-tab, .tce-tab, .pf-tab, .bx-tab, .news-chip, .filters button, .audit-controls button, .seg-btn):is(.on, .active, .is-active, [aria-selected="true"], [aria-pressed="true"]) {
  background: var(--control-ink) !important;
  border-color: var(--control-ink) !important;
  color: #fff !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.tce-tab-label, .pf-tab-title, .bx-tab-title) {
  color: inherit !important;
  font: inherit !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.tce-tab-count, .pf-tab-idx) { color: inherit !important; font-size: 14px; }

/* Rich selectors preserve their timeline and progress structures. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.et-mark, .wire-idx button, .svs-node) {
  min-height: 48px;
  border-radius: 12px;
  font-family: Geist, system-ui, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  color: var(--control-ink) !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .et-mark { padding: 0 6px 12px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .et-mark:is(:hover, .on) { background: var(--control-soft); }
html body.flat-blue.flat-blue.flat-blue.flat-blue .et-mark :is(.et-when, .et-k) { font-size: 14px !important; line-height: 1.4 !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .et-name { font-size: 16px !important; line-height: 1.4 !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .et-dot { transform: none !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .wire-idx { gap: 12px; padding-top: 16px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .wire-idx button { padding: 16px; background: #fff; border: 1px solid var(--control-line); }
html body.flat-blue.flat-blue.flat-blue.flat-blue .wire-idx button:is(:hover, .on) { background: var(--control-soft); }
html body.flat-blue.flat-blue.flat-blue.flat-blue .wire-idx .tt { color: var(--control-ink) !important; font-size: 16px; line-height: 1.4; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .wire-idx .no { color: #47617a !important; font-family: Geist, system-ui, sans-serif; font-size: 14px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .svs-node { padding: 12px 16px; gap: 8px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .svs-node:not(.svs-pair) { background: #fff; border-color: var(--control-line); }
html body.flat-blue.flat-blue.flat-blue.flat-blue .svs-node:not(.svs-pair):is(:hover, .on) { background: var(--control-soft); border-color: #9fb8cf; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .svs-nm { font-size: 16px; line-height: 1.4; }

/* Tags are information, not controls. Semantic status colours remain local. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.cs-tags, .cs-tech-tags, .chips, .cat-chips, .ch-chips) { gap: 8px; }
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.cs-tags span, .cs-tech-tag, .chip, .piece-tag, .stack-tag, .os-hero-tag, .os-rel-tag, .tag-first, .cat-chips .fam, .ch-chips .fam, .svs-tag) {
  box-sizing: border-box;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #c6d9ea !important;
  border-radius: 999px !important;
  background: #eaf3fa !important;
  color: #344e68 !important;
  font-family: Geist, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: normal;
  cursor: default;
  transform: none !important;
  transition: none !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .cs-tags span + span::before { content: none; }
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.cat-chips .fam, .ch-chips .fam):hover { color: #344e68 !important; background: #eaf3fa !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .svs-tag { padding: 4px 8px; }

/* Feedback belongs to interactive controls, never their surrounding panels. */
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn, .ac-button, .db-btn, .agd-go, .cs-all, [data-entry-copy], .cs-back-top, .cs-arrowbtn, .vo-arrowbtn, .db-modal-close, :where(#mobile-menu-toggle), .ol-tab, .svc-tab, .os-tab, .tce-tab, .pf-tab, .bx-tab, .news-chip, .filters button, .audit-controls button, .seg-btn, .et-mark, .wire-idx button, .svs-node, .finding, .btn-text) {
  transform: none !important;
  translate: none !important;
  scale: none !important;
  transition: background-color 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.btn svg, .btn .arrow, .agd-goarrow, .cs-all svg) { transform: none !important; translate: none !important; transition: none !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(button, .btn, .ac-button, .db-btn, .cs-all):focus-visible {
  outline: 3px solid #2074ef !important;
  outline-offset: 3px !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(.closing, #cta-band, .cs-closer, .cta-band, .agd-console) :is(button, .btn, .ac-button):focus-visible { outline-color: #b7d7fa !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue :is(button, .btn, .ac-button, .db-btn):is(:disabled, [aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html body.flat-blue.flat-blue.flat-blue.flat-blue.flat-blue :is(button, .btn, .ac-button, .db-btn, .cs-all, .btn-text),
  html body.flat-blue.flat-blue.flat-blue.flat-blue.flat-blue :is(button, .btn, .ac-button, .db-btn, .cs-all, .btn-text) * { transition: none !important; }
}

/* Explicit variants keep their meaning even when a size modifier is present. */
html body.flat-blue.flat-blue.flat-blue.flat-blue .btn-sm {
  min-height: 44px;
  padding: 10px 18px;
  font-size: 16px !important;
  line-height: 1.4 !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .btn-danger {
  background: #fff !important;
  border-color: #a92a32 !important;
  color: #a92a32 !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .btn-danger:hover:not(:disabled):not([aria-disabled="true"]) { background: #fff0f1 !important; border-color: #a92a32 !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .btn-text {
  min-height: 44px;
  padding: 10px 0;
  font: 600 16px/1.4 Geist, system-ui, sans-serif;
  color: #185bb7;
  transform: none !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .btn-text:hover { color: #12478f; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .ac-button-light,
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .db-btn {
  background: #fff !important;
  border-color: #fff !important;
  color: #15293e !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .ac-button-light:hover:not(:disabled):not([aria-disabled="true"]),
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .db-btn:hover:not(:disabled) {
  background: #dce9f5 !important;
  border-color: #dce9f5 !important;
  color: #15293e !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .db-btn.ghost {
  background: #1d354e !important;
  border-color: #617990 !important;
  color: #e3edf7 !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .db-btn.ghost:hover:not(:disabled) { background: #244867 !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap :is(.db-btn, button):focus-visible { outline-color: #b7d7fa !important; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .tag-first {
  color: #e3edf7 !important;
  background: #244867 !important;
}
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .finding { background: transparent; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .finding:is(:hover, :focus-visible) { background: #1d354e; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .finding.first { background: #1d354e; }
html body.flat-blue.flat-blue.flat-blue.flat-blue .dossier-wrap .finding.first:is(:hover, :focus-visible) { background: #244867; }
