/* Civic keeps its service identity; the community palette is shared locally. */
:root[data-ov-bridge~="statecivic"] {
  --ov-surface-page: var(--brand-page);
  --ov-surface-sunk: var(--brand-page);
  --ov-surface-raised: var(--brand-surface);
  --ov-surface-overlay: var(--brand-surface);
  --ov-text-primary: var(--brand-text);
  --ov-text-secondary: var(--brand-secondary);
  --ov-text-muted: var(--brand-secondary);
  --ov-text-on-accent: var(--brand-action-text);
  --ov-accent: var(--brand-action);
  --ov-accent-text: var(--brand-action);
  --ov-accent-hover: var(--brand-action);
  --ov-accent-subtle: color-mix(in srgb, var(--brand-action) 12%, var(--brand-surface));
  --ov-border: var(--brand-divider);
  --ov-border-soft: var(--brand-divider);
  --ov-border-strong: var(--brand-secondary);
  --ov-font-sans: "Segoe UI", system-ui, Arial, sans-serif;
  --sidebar-w: 256px;
}
body { font-size: 16px; line-height: 1.6; }
.community-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 8px max(20px, calc((100vw - 1396px) / 2)); background: var(--brand-text); color: var(--brand-page); }
.community-nav a { color: inherit; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; text-decoration: none; }
.community-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.community-wordmark { margin-right: auto; font-size: 21px !important; font-weight: 650; letter-spacing: -.5px; }
.community-wordmark span { margin-left: 10px; font-size: 12px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.civic-skip { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 12px 20px; background: var(--brand-surface); color: var(--brand-action); transform: translateY(-180%); }
.civic-skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--brand-focus); outline-offset: 3px; }
.site-header { background-image: none; }
.header-inner { min-height: 64px; height: auto; padding-block: 10px; }
.seal { filter: none; }
.system-switch { border-radius: 4px; }
.system-tab { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; border-radius: 3px; }
.system-tab.active { box-shadow: none; }
.nav-toggle, .theme-toggle { width: 44px; height: 44px; }
.civic-search-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.search-icon { display: none; }
.search-inner { gap: 12px; }
.search-inner input { min-width: 0; font-size: 16px; }
.sidebar-link { min-height: 44px; display: flex; align-items: center; font-size: 14px; }
.sidebar-note { font-size: 14px; line-height: 1.6; }
.drawer-close { display: none; }
.main { min-width: 0; scroll-margin-top: 180px; }
.t-page-title, .page-title { font-size: clamp(28px, 4vw, 36px); }
.t-prose { max-width: 74ch; font-size: 16px; }
.t-btn, .t-pill { min-height: 44px; }
.t-error { border-color: var(--brand-secondary); }
.civic-context { padding: 24px 20px; border-top: 1px solid var(--brand-divider); color: var(--brand-secondary); font-size: 14px; }
.civic-context a { color: var(--brand-action); }
@media (max-width: 880px) {
  .header-inner { flex-wrap: wrap; gap: 8px; }
  .header-text { flex: 1; }
  .header-title { display: block; font-size: 17px; }
  .system-switch { order: 5; width: 100%; margin: 0; overflow-x: auto; }
  .system-tab { flex: 1; justify-content: center; padding: 7px 10px; }
  .sidebar { visibility: hidden; max-width: calc(100vw - 44px); padding-top: 20px; }
  .sidebar.open { visibility: visible; }
  .drawer-close { display: block; min-height: 44px; margin: 0 14px 16px; padding: 8px 16px; background: var(--brand-surface); color: var(--brand-text); border: 1px solid var(--brand-secondary); border-radius: 4px; cursor: pointer; }
}
@media (max-width: 420px) {
  .community-nav { gap: 0 16px; }
  .community-wordmark { width: 100%; }
  .header-inner { padding-inline: 14px; }
  .civic-search-label { font-size: 12px; }
  .system-tab { font-size: 12px; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Complete the theme pair for native controls and legacy service aliases. */
:root[data-ov-bridge~="statecivic"] {
  color-scheme:light;
  --tr-on-accent:var(--brand-action-text);
  --ov-status-critical:#a3261e; --ov-status-caution:#805000;
  --ov-status-positive:#235c53; --ov-status-info:#255b89;
  --ov-status-adjudicated:#68449b; --ov-status-neutral:#4e5e66;
  --t-capital:#a3261e; --t-f2:#924307; --t-sjf:#736000; --t-mc:#235c53;
}
:root[data-ov-bridge~="statecivic"][data-theme="dark"] {
  color-scheme:dark;
  --ov-status-critical:#ffb4ab; --ov-status-caution:#eac58f;
  --ov-status-positive:#99d2c7; --ov-status-info:#a3cfff;
  --ov-status-adjudicated:#d1b8ff; --ov-status-neutral:#c1cbd0;
  --t-capital:#ffb4ab; --t-f2:#ffc49b; --t-sjf:#e7d879; --t-mc:#99d2c7;
}
input, textarea, select { color:var(--brand-text); background-color:var(--brand-surface); }
select option, select optgroup { color:var(--brand-text); background:var(--brand-surface); }
input::placeholder, textarea::placeholder { color:var(--brand-secondary); opacity:1; }
input:disabled, textarea:disabled, select:disabled { color:var(--brand-secondary); background:var(--brand-page); opacity:1; }
input:-webkit-autofill, textarea:-webkit-autofill { -webkit-text-fill-color:var(--brand-text); box-shadow:0 0 0 1000px var(--brand-surface) inset; }
input[type=checkbox], input[type=radio] { accent-color:var(--brand-action); }
