:root{--ink:#12232f;--muted:#61717c;--navy:#082c3d;--teal:#007c83;--teal-soft:#e6f4f3;--cream:#f7f5ef;--white:#fff;--line:#dce3e4;--red:#b42318;--red-soft:#fef0ed;--amber:#9a6700;--amber-soft:#fff5d8;--green:#087443;--green-soft:#e8f7ee;--shadow:0 18px 50px rgba(16,38,50,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--cream)}*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,#eef4f2 0,#f7f5ef 240px);min-height:100vh}a{color:var(--teal);text-decoration:none}button,input,select,textarea{font:inherit}.site-header{height:76px;background:rgba(8,44,61,.98);color:#fff;display:flex;align-items:center;padding:0 3vw;gap:3vw;position:sticky;top:0;z-index:20;box-shadow:0 8px 30px rgba(8,44,61,.16)}.brand{display:flex;align-items:center;color:#fff;gap:12px;min-width:max-content}.brand-mark,.auth-emblem{display:grid;place-items:center;background:#e1b955;color:var(--navy);font-weight:900;letter-spacing:-.04em;border-radius:12px;width:42px;height:42px}.brand span:last-child,.account-menu span{display:flex;flex-direction:column}.brand small,.account-menu small{font-size:.72rem;color:#b9c9ce;margin-top:2px}.site-header nav{display:flex;gap:1.6rem;flex:1}.site-header nav a{color:#d9e7e8;font-size:.92rem}.site-header nav a:hover{color:#fff}.account-menu{display:flex;align-items:center;gap:16px;text-align:right;font-size:.82rem}.link-button{border:0;background:none;color:#b9d9db;padding:0;cursor:pointer}.page-shell{max-width:1480px;margin:0 auto;padding:42px 3vw 70px}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:30px;margin-bottom:28px}.page-heading h1,.narrow-heading h1{font-size:clamp(2rem,4vw,3.4rem);line-height:1.02;letter-spacing:-.045em;margin:.25rem 0 .7rem}.narrow-heading{max-width:750px;margin-bottom:28px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:var(--teal);font-size:.72rem;margin:0}.muted,.help{color:var(--muted)}.messages{margin-bottom:18px}.message{padding:14px 18px;border-radius:12px;background:#eef2f3;border:1px solid var(--line)}.message.success{background:var(--green-soft);border-color:#aed6bf}.message.error{background:var(--red-soft);border-color:#edb8b1}.panel{background:rgba(255,255,255,.96);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);margin-bottom:24px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.panel-heading.padded{padding:22px 24px 15px}.panel-heading h2,.action-panel h2,.approval-panel h2,.upload-panel h2{margin:4px 0;font-size:1.25rem}.filter-bar{background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 16px;display:flex;gap:14px;align-items:end;margin-bottom:22px}.filter-bar label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:.78rem;font-weight:700}.filter-bar select,.filter-bar input,.stacked-form input,.stacked-form select,.stacked-form textarea,.upload-form input,.upload-form select,.inline-reason input,.action-panel input,.decision-forms input{border:1px solid #c9d4d7;border-radius:10px;padding:10px 12px;background:#fff;color:var(--ink)}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:24px}.metric{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;display:flex;flex-direction:column;min-height:145px}.metric.featured{background:linear-gradient(135deg,var(--navy),#07515b);color:#fff;border:none}.metric span{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:var(--muted)}.metric.featured span,.metric.featured small{color:#b8d6d7}.metric strong{font-size:clamp(1.6rem,2.5vw,2.5rem);letter-spacing:-.04em;margin:auto 0 8px}.metric small{color:var(--muted)}.split-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.split-grid .panel{padding:24px}.control-counts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.control{border-radius:14px;padding:18px;display:flex;flex-direction:column}.control.critical{background:var(--red-soft);color:var(--red)}.control.warning{background:var(--amber-soft);color:var(--amber)}.control strong{font-size:2.2rem}.control span{font-size:.8rem;font-weight:700}.activity-list>a,.audit-list>div{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:13px 0;border-top:1px solid #edf0f0;color:var(--ink)}.activity-list span:first-child{display:flex;flex-direction:column}.activity-list small,.audit-list small,td small{display:block;color:var(--muted);margin-top:3px}.audit-list{padding:0 24px 18px}.audit-list>div{justify-content:flex-start}.audit-list code{margin-left:auto}.event-icon{width:9px;height:9px;border-radius:50%;background:var(--teal);flex:none}.button{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:10px;padding:10px 15px;font-weight:800;cursor:pointer}.button.primary{background:var(--teal);color:#fff}.button.secondary{background:#e6eff0;color:var(--navy)}.button.ghost{background:#f2f4f3;color:var(--ink)}.button.success{background:var(--green);color:#fff}.button.danger{background:var(--red);color:#fff}.button.warning{background:var(--amber);color:#fff}.button.small{padding:7px 10px;font-size:.78rem}.button.wide{width:100%;padding:13px}.status-pill,.status-tag{display:inline-flex;align-items:center;gap:7px;border-radius:999px;font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em;padding:8px 11px;white-space:nowrap}.status-pill{background:#fff;border:1px solid var(--line)}.status-pill.compact{padding:5px 8px}.status-pill.pass,.status-tag.approved,.status-tag.succeeded,.status-tag.resolved{background:var(--green-soft);color:var(--green)}.status-pill.review,.status-tag.review,.status-tag.submitted,.status-tag.warning,.status-tag.overridden{background:var(--amber-soft);color:var(--amber)}.status-pill.fail,.status-tag.failed,.status-tag.rejected,.status-tag.critical,.status-tag.open{background:var(--red-soft);color:var(--red)}.status-tag.draft,.status-tag.uploaded,.status-tag.processing,.status-tag.queued{background:#edf1f3;color:#51646e}.status-dot{width:8px;height:8px;border-radius:50%;background:currentColor}.status-stack{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.table-panel{overflow:hidden}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:850px}th{text-align:left;padding:12px 18px;background:#f0f5f4;color:#54656d;font-size:.72rem;text-transform:uppercase;letter-spacing:.07em}td{padding:15px 18px;border-top:1px solid #e7ecec;vertical-align:top;font-size:.88rem}.table-link{font-weight:800;color:var(--ink)}.empty{text-align:center;color:var(--muted);padding:28px}.padded{padding:24px}.form-panel{max-width:760px;padding:28px}.stacked-form{display:flex;flex-direction:column;gap:8px}.stacked-form label,.upload-form label{font-weight:800;font-size:.85rem;margin-top:8px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.field-error,.form-errors{color:var(--red);font-size:.82rem}.auth-shell{display:grid;place-items:center;min-height:100vh;padding:30px}.auth-card{width:min(100%,480px);background:#fff;border:1px solid var(--line);box-shadow:0 30px 90px rgba(8,44,61,.14);border-radius:26px;padding:42px}.auth-card h1{font-size:2.2rem;line-height:1.05;letter-spacing:-.04em}.auth-emblem{width:54px;height:54px;margin-bottom:28px}.subtle-link{display:block;text-align:center;margin-top:18px;font-size:.85rem}.workflow-strip{display:flex;align-items:center;max-width:850px;margin:0 auto 28px}.workflow-strip span{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#dfe6e5;color:#68777b;font-weight:900;position:relative}.workflow-strip span.done{background:var(--teal);color:#fff}.workflow-strip small{position:absolute;top:52px;color:var(--muted);font-size:.65rem;text-transform:uppercase}.workflow-strip i{height:3px;background:#dfe6e5;flex:1}.upload-panel,.action-panel,.approval-panel{padding:26px;display:flex;align-items:center;justify-content:space-between;gap:28px}.upload-panel>div{max-width:560px}.upload-form{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;min-width:420px}.upload-form .button{grid-column:1/-1;margin-top:8px}.exception-cards{padding:0 20px 20px}.exception{display:grid;grid-template-columns:1fr minmax(260px,38%);gap:20px;border:1px solid var(--line);border-left:5px solid var(--amber);border-radius:14px;padding:18px;margin-top:10px}.exception.critical{border-left-color:var(--red)}.exception strong{margin-left:9px}.exception p{margin:.7rem 0}.exception>div:last-child{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.inline-reason{display:flex;gap:6px;width:100%}.inline-reason input{min-width:0;flex:1}.decision-forms{display:flex;flex-direction:column;gap:10px}.decision-forms form,.action-panel form{display:flex;gap:8px}.back-link{font-size:.82rem;font-weight:800}.status-tag.large{padding:10px 14px}.auth-card ul.errorlist{padding-left:18px;color:var(--red)}code{font-size:.77rem;color:#48616d}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.mobile-nav{display:none;position:relative}.mobile-nav summary{cursor:pointer;list-style:none;color:#d9e7e8;font-size:.84rem;font-weight:800;padding:8px}.mobile-nav summary::-webkit-details-marker{display:none}.mobile-nav>div{position:absolute;right:0;top:42px;width:210px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:8px;display:flex;flex-direction:column}.mobile-nav a{padding:10px 12px;border-radius:8px;color:var(--ink);font-weight:700}.mobile-nav a:hover{background:var(--teal-soft)}
@media(max-width:1050px){.site-header nav{display:none}.mobile-nav{display:block;margin-left:auto}.account-menu{margin-left:0}.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.split-grid{grid-template-columns:1fr}.upload-panel,.action-panel,.approval-panel{align-items:stretch;flex-direction:column}.upload-form{min-width:0;width:100%}}
@media(max-width:640px){.site-header{height:68px;padding:0 18px}.brand small,.account-menu span{display:none}.page-shell{padding:28px 16px 55px}.page-heading{flex-direction:column}.page-heading h1,.narrow-heading h1{font-size:2.2rem}.filter-bar{display:grid;grid-template-columns:1fr 1fr}.filter-bar label:first-child,.filter-bar .button{grid-column:1/-1}.metric-grid{grid-template-columns:1fr 1fr}.metric{min-height:126px;padding:16px}.metric strong{font-size:1.55rem}.control-counts{grid-template-columns:1fr}.workflow-strip small{display:none}.workflow-strip span{width:38px;height:38px}.upload-form{grid-template-columns:1fr}.exception{grid-template-columns:1fr}.exception>div:last-child{align-items:stretch}.inline-reason,.decision-forms form,.action-panel form{flex-direction:column}.auth-card{padding:28px}.status-stack{align-items:flex-start}}
@media(max-width:430px){.metric-grid{grid-template-columns:1fr}.account-menu{gap:6px}.brand strong{font-size:.9rem}}
.access-form{display:flex;align-items:end;gap:8px;min-width:620px}.access-form label{display:flex;flex-direction:column;gap:4px;font-size:.75rem;font-weight:800;color:var(--muted)}.access-form select,.access-form input[type=text],.access-form input:not([type]){border:1px solid #c9d4d7;border-radius:9px;padding:8px 10px;background:#fff}.access-form .checkbox-label{flex-direction:row;align-items:center;padding-bottom:9px;color:var(--ink)}
.metric strong a{color:inherit}.metric small a{color:var(--muted)}.metric.featured small a{color:#b8d6d7}.trace-link{font-weight:800;text-decoration:underline;text-decoration-color:#94c7c8;text-underline-offset:3px}

.ai-assistant{margin-top:30px}.ai-assistant h2,.ai-explanation h2{margin:.35rem 0 .5rem}.ai-assistant form{margin:16px 0}.ai-explanation{border-top:1px solid var(--line);margin-top:18px;padding-top:18px}.ai-explanation ul{padding-left:1.25rem}.ai-explanation li+li{margin-top:.65rem}

/* Keyboard, touch, status, and error affordances shared by every workflow. */
body {
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 100;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 9px;
  background: #fff;
  color: #082c3d;
  font-weight: 900;
  transform: translateY(-160%);
  transition: transform 120ms ease-out;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.environment-banner {
  position: sticky;
  top: 76px;
  z-index: 19;
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid #d59b20;
  background: #fff0c7;
  color: #5c3a00;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.environment-banner.production {
  border-color: #7a1b14;
  background: #b42318;
  color: #fff;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #ffcf5c;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #082c3d;
}

:where(button, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea, summary, .button, .link-button) {
  min-height: 44px;
}

.site-header nav > a,
.mobile-nav a,
.desktop-nav-more a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

[data-error-summary],
.error-summary {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 2px solid var(--red);
  border-radius: 12px;
  background: var(--red-soft);
  color: #7a1b14;
}

[data-error-summary]:focus {
  outline: 3px solid #ffcf5c;
  outline-offset: 3px;
}

[data-error-summary] a {
  color: #7a1b14;
  font-weight: 900;
  text-decoration: underline;
}

.table-wrap,
.table-wrap td,
.table-wrap a,
.table-wrap code,
.table-link {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 640px) {
  .environment-banner {
    top: 68px;
  }
}

.unassigned-banner .button {
  align-self: flex-start;
}

.unassigned-filter label:first-child {
  flex: 1 1 280px;
}

.unassigned-filter {
  flex-wrap: wrap;
}

.unassigned-filter label:not(:first-child) {
  flex: 1 1 150px;
}

.record-type-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.record-type-tab {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.record-type-tab strong {
  color: var(--teal);
  font-size: 1.2rem;
}

.record-type-tab.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.pagination > div {
  display: flex;
  gap: 8px;
}

.pagination > div:last-child {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .record-type-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .record-type-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pagination {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pagination > div,
  .pagination > div:last-child {
    justify-content: center;
  }
}

.pipeline-proof {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
  color: var(--ink-soft);
}

.next-action-card,
.unassigned-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 1.25rem 1.25rem;
  padding: 1rem;
  border-radius: 0.85rem;
}

.next-action-card {
  border: 1px solid color-mix(in srgb, var(--teal) 34%, transparent);
  background: color-mix(in srgb, var(--teal) 6%, var(--surface));
}

.next-action-card h3,
.next-action-card p {
  margin: 0.35rem 0;
}

.unassigned-banner {
  align-items: flex-start;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--amber) 42%, transparent);
  background: color-mix(in srgb, var(--amber) 9%, var(--surface));
}

.section-heading {
  margin: 2rem 0 1rem;
}

.section-heading h2,
.section-heading p {
  margin-block: 0.25rem;
}

@media (max-width: 700px) {
  .next-action-card {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Keep the two-column dashboard filter inside a 320px reflow viewport. */
@media (max-width: 640px) {
  .filter-bar > * {
    min-width: 0;
    width: 100%;
  }

  .filter-bar select,
  .filter-bar input,
  .filter-bar .button {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

/* Phase A design tokens: semantic aliases over the existing palette, Swiss-minimal typography. */
@font-face{font-family:"Instrument Sans";src:url("../fonts/InstrumentSans.73e3eb26e68e.ttf") format("truetype");font-weight:100 900;font-display:swap}
:root{--paper:var(--cream);--surface:#fff;--accent:var(--teal);--accent-ink:#fff;--ok:var(--green);--attention:var(--amber);--blocked:var(--red);--ink-soft:var(--muted);--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--space-12:48px;--radius-s:4px;--radius-m:8px;--radius-l:12px;--shadow-1:0 1px 2px rgba(28,28,26,.06);--shadow-2:0 4px 12px rgba(28,28,26,.08);--dur-fast:150ms;--dur-slow:250ms;font-family:"Instrument Sans",Inter,"Segoe UI",sans-serif}
.money,td.money,.num,.metric strong{font-variant-numeric:tabular-nums lining-nums}
.money,td.money,.num{text-align:right}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
