/* Repository-wide interface quality layer; loaded after page and Oat styles. */
:root { color-scheme: light; }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #3264be !important; outline-offset: 3px;
}
:where(button, a, summary, input, select) { touch-action: manipulation; }
:where(button, summary, select) { min-height: 24px; }
:where(input, select, textarea) { scroll-margin-block: 120px; }
select { background-color: var(--card, #fff); color: var(--foreground, #172332); }
:where(h1,h2,h3) { text-wrap: balance; scroll-margin-top: 120px; }
:where(p, li, .field, .entry-content, .panel, .project-card) { overflow-wrap: break-word; min-width: 0; }
:where(.val, .ev2-ev-stat-value, .ev2-savings-value, td, .entry-date) { font-variant-numeric: tabular-nums; }
:where(dialog, .suggest-panel) { overscroll-behavior: contain; }
:where(.project-dialog) { max-width: min(850px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.skip-link { position: fixed; top: -120px; left: max(12px, env(safe-area-inset-left)); z-index: 10000; background: #fff; color: #173d88; padding: 12px 20px; }
.skip-link:focus { top: max(12px, env(safe-area-inset-top)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.guideline-picker { display: grid; gap: 8px; max-width: 440px; margin: 16px auto; text-align: left; }
.guideline-picker select { width: 100%; }
.chart-alternative { margin-block: 16px; padding: 16px;  }
.chart-alternative p { margin: 0 0 10px; color: var(--muted-foreground, #536172); }
.chart-alternative summary { cursor: pointer; font-weight: 600; }
.chart-table-scroll { overflow: auto; max-height: 360px; margin-top: 12px; }
.chart-alternative table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chart-alternative th, .chart-alternative td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border, #dce1e7); white-space: nowrap; }
.chart-alternative thead { position: sticky; top: 0; background: var(--card, #fff); }
.field-error { color: #a32121; font-size: 14px; margin-block: 6px; }
[aria-invalid="true"] { border-color: #a32121 !important; }
.suggest-item[aria-selected="true"] { background: #e5edf9; color: #173d88; outline: 2px solid #3264be; outline-offset: -2px; }
/* Loading indicators use Oat aria-busy / data-spinner. */
button.project-toggle { padding: 0; font: inherit; }
.route-alt-card { text-align: left; font: inherit; color: inherit; }
.motion-controls { margin: 12px 0; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom); }
@media (max-width: 700px) {
  :where(input:not([type="checkbox"]):not([type="range"]), select, textarea) { font-size: 16px !important; }
  :where(button, summary, nav a, .tabs a, .text-link, .footer-icons a, .toggle-row) { min-height: 44px; }
  :where(button, .footer-icons a) { min-width: 44px; }
  nav a, .text-link { display: inline-flex; align-items: center; }
  .chart-alternative { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Expanded content must remain readable regardless of its length. */
.project-item.active .project-content { max-height: none; overflow: visible; transition: none; }
.project-content { transition: none; }

.ev2-status-dot, .ev-status-dot { animation: none; }
.button-progress { margin-inline-start: 8px; }
#portfolio-tabs { display: block; width: 100%; }
/* Grid/flex children must be allowed to shrink around long content. */
.hero > *, .cv-section > *, .section-bar > *, .role-heading > *, .site-shell-inner > *, .site-tool-grid > * { min-width: 0; }
:where(p, h1, h2, h3, li, .institution, .site-tool-card) { overflow-wrap: anywhere; }
.entry-date { white-space: normal; }
