/* AIP interface tokens. The official .co-page document is intentionally excluded. */
@font-face { font-family: Barlow; src: url('../fonts/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url('../fonts/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: Barlow; src: url('../fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url('../fonts/Barlow-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --primary: #0066e6; --primary-hover: #0052b8; --accent: #00a3e0; --accent-dark: #006c95;
  --navy: #0b2a4a; --navy-2: #10385f; --navy-3: #0b2a4a;
  /* Constant hue/chroma; lightness decreases by exactly .08 per step. */
  --neutral-0: oklch(0.98 0.015 250); --neutral-1: oklch(0.90 0.015 250);
  --neutral-2: oklch(0.82 0.015 250); --neutral-3: oklch(0.74 0.015 250);
  --neutral-4: oklch(0.66 0.015 250); --neutral-5: oklch(0.58 0.015 250);
  --neutral-6: oklch(0.50 0.015 250); --neutral-7: oklch(0.42 0.015 250);
  --neutral-8: oklch(0.34 0.015 250); --neutral-9: oklch(0.26 0.015 250);
  --neutral-10: oklch(0.18 0.015 250);
  --ink: var(--neutral-9); --muted: var(--neutral-6); --line: var(--neutral-1);
  --control-line: #7c8e9f; --bg: #f4f7fb; --card: #fff; --paper: #fff;
  --success: #14633c; --success-bg: #eaf7ef; --warning: #805000; --warning-bg: #fff5d9;
  --danger: #ae202b; --danger-bg: #fff0f1; --info: #0753a6; --info-bg: #edf5ff;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  --space-12: 48px; --space-16: 64px; --radius: 8px; --transition: 150ms ease;
  --shadow: 0 2px 6px rgb(11 42 74 / 3%); --sidebar-width: 240px;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 88px; }
body { margin: 0; color: var(--ink); font: 400 16px/24px Barlow, Arial, sans-serif; }
[hidden] { display: none !important; }
.ui-scope :where(h1,h2,h3,h4,p,ul,ol,dl):where(:not(.co-page *)) { margin-top: 0; }
.ui-scope :where(h1,h2,h3,h4):where(:not(.co-page *)) { color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.ui-scope :where(h1):where(:not(.co-page *)) { font-size: 32px; line-height: 40px; margin-bottom: 8px; }
.ui-scope :where(h2):where(:not(.co-page *)) { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.ui-scope :where(h3,h4):where(:not(.co-page *)) { font-size: 20px; line-height: 28px; margin-bottom: 12px; }
.ui-scope :where(a):where(:not(.co-page *)) { color: var(--primary-hover); text-underline-offset: 3px; overflow-wrap: anywhere; }
.ui-scope :where(a:hover):where(:not(.co-page *)) { color: var(--navy); }
.ui-scope :where(button,input,select,textarea,a,summary,[tabindex]):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.ui-scope :where(button,.btn,.ui-button,.auth-primary,.auth-secondary,.auth-danger,.auth-button-link):where(:not(.co-page *)) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 8px 16px; border: 1px solid var(--primary); border-radius: var(--radius);
  background: var(--primary); color: white; font: 600 16px/24px Barlow, Arial, sans-serif;
  text-align: center; text-decoration: none; cursor: pointer; overflow-wrap: anywhere;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.ui-scope :where(button,.btn,.ui-button,.auth-primary):where(:not(.co-page *)):hover { background: var(--primary-hover); border-color: var(--primary-hover); color: white; }
.ui-scope :where(.secondary,.ghost,.auth-secondary,.auth-button-link,.ui-button--secondary):where(:not(.co-page *)) { background: white; border-color: var(--control-line); color: var(--navy); }
.ui-scope :where(.secondary,.ghost,.auth-secondary,.auth-button-link,.ui-button--secondary):where(:not(.co-page *)):hover { background: var(--info-bg); border-color: var(--primary); color: var(--primary-hover); }
.ui-scope :where(.danger,.auth-danger,.ui-button--danger):where(:not(.co-page *)) { background: var(--danger); border-color: var(--danger); color: white; }
.ui-scope :where(.danger,.auth-danger,.ui-button--danger):where(:not(.co-page *)):hover { background: #871923; border-color: #871923; color: white; }
.ui-scope :where(button:disabled,input:disabled,select:disabled,textarea:disabled):where(:not(.co-page *)) { cursor: not-allowed; opacity: .6; }
.ui-scope :where(input,select,textarea):where(:not(.co-page *)):where(:not([type=checkbox])):where(:not([type=radio])):where(:not([type=hidden])):where(:not([type=file])) {
  display: block; width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--control-line); border-radius: var(--radius); background: white; color: var(--ink);
  font: 400 16px/24px Barlow, Arial, sans-serif; transition: border-color var(--transition), background var(--transition);
}
.ui-scope :where(input,textarea):where(:not(.co-page *))::placeholder { color: var(--muted); opacity: 1; }
.ui-scope :where(input,select,textarea):where(:not(.co-page *)):hover { border-color: var(--neutral-7); }
.ui-scope :where(input,select,textarea)[aria-invalid=true]:where(:not(.co-page *)) { border-color: var(--danger); }
.ui-scope :where(input[readonly],textarea[readonly]):where(:not(.co-page *)) { background: var(--bg); }
.ui-scope :where(textarea):where(:not(.co-page *)) { min-height: 96px; resize: vertical; }
.ui-scope :where(input[type=checkbox],input[type=radio]):where(:not(.co-page *)) { width: 20px; height: 20px; accent-color: var(--primary); flex: 0 0 auto; }
.ui-scope :where(label):where(:not(.co-page *)) { font-size: 14px; line-height: 20px; font-weight: 600; }
.field { margin-bottom: 16px; min-width: 0; }
.field > label:not(.file-pick-ui) { display: block; margin-bottom: 8px; }
.field > input + label { margin-top: 16px; }
.field > :last-child { margin-bottom: 0; }
.field > label + input,.field > label + select,.field > label + textarea { margin-top: 0; }
.ui-scope input[type=file]:not(.file-pick-input) { display: block; width: 100%; min-width: 0; color: var(--muted); font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); padding: 8px; }
.ui-scope input[type=file]::file-selector-button { min-height: 36px; padding: 6px 12px; margin-right: 12px; border: 1px solid var(--control-line); border-radius: 6px; background: white; color: var(--navy); font: 600 14px/20px Barlow,Arial,sans-serif; cursor: pointer; }
.hint,.file-hint,.field-hint,.auth-lead,.page-description { color: var(--muted); }
.hint,.file-hint,.field-hint,.ui-scope small:where(:not(.co-page *)) { font-size: 14px; line-height: 20px; }
.field-hint,.file-hint { display: block; margin-top: 8px; }
.ui-card,.admin-panel,.side-panel,.auth-card,.login-card,.status-page,.below-sheet-inner {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); min-width: 0;
}
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading p { margin-bottom: 0; max-width: 64ch; }
.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ui-card > :last-child,.admin-panel > :last-child { margin-bottom: 0; }
.help,.muted { color: var(--muted); font-size: 14px; line-height: 20px; }
.eyebrow,.auth-eyebrow,.request-brand { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--accent-dark); margin-bottom: 8px; }
.actions,.auth-actions,.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.badge,.session-badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--radius); font-size: 14px; line-height: 20px; font-weight: 600; background: var(--bg); color: var(--muted); }
.badge.success,.badge.high,.badge.good,.session-badge--sent { background: var(--success-bg); color: var(--success); }
.badge.warning,.badge.mid,.session-badge--pending,.session-badge--analyzing { background: var(--warning-bg); color: var(--warning); }
.badge.danger,.badge.low { background: var(--danger-bg); color: var(--danger); }
.badge.info,.session-badge--submitted { background: var(--info-bg); color: var(--info); }
.flash,.auth-errors,.ui-alert { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; background: var(--info-bg); color: var(--info); overflow-wrap: anywhere; }
.flash.error,.auth-errors,.ui-alert--danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.flash ul,.auth-errors ul { margin-bottom: 0; }
.table-scroll { position: relative; overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.table-scroll table { min-width: 640px; }
.ui-scope :where(table):where(:not(.co-page *)) { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; line-height: 20px; }
.ui-scope :where(th,td):where(:not(.co-page *)) { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ui-scope :where(th):where(:not(.co-page *)) { color: var(--muted); font-weight: 600; background: var(--bg); }
.ui-scope :where(tbody tr:last-child td):where(:not(.co-page *)) { border-bottom: 0; }
.ui-scope :where(tbody tr:hover):where(:not(.co-page *)) { background: var(--bg); }
.ui-scope td.table-cell--numeric,.ui-scope th.table-cell--numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-cell--date { white-space: nowrap; }
.table-cell--primary,.table-cell--email { overflow-wrap: anywhere; min-width: 150px; max-width: 300px; }
.empty-state { padding: 32px 24px; text-align: center; color: var(--muted); }
.empty-state p { margin: 8px 0 0; }
.empty-state strong { display: block; color: var(--navy); font-size: 20px; line-height: 28px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.metric-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.metric-value { display: block; font-size: 32px; line-height: 40px; font-weight: 700; color: var(--navy); }
.ui-dialog { width: min(480px,calc(100% - 32px)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--ink); background: white; box-shadow: 0 16px 48px rgb(11 42 74 / 24%); }
.ui-dialog::backdrop { background: rgb(11 42 74 / 48%); }
.ui-dialog .actions { justify-content: flex-end; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 16px; background: white; transform: translateY(-160%); border-radius: var(--radius); }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 767px) {
  .ui-scope :where(h1):where(:not(.co-page *)) { font-size: 24px; line-height: 32px; }
  .page-heading { flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .ui-card,.admin-panel,.side-panel,.auth-card,.login-card,.status-page,.below-sheet-inner { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
