/* app/assets/stylesheets/application.css */
/*
  Trua I-9 design system — v2 (2026-06-04 design push).

  Structure top-to-bottom:
    1. Tokens — palette, type scale, spacing, radii, shadows
    2. Bootstrap overrides — re-map Bootstrap 5 vars to our tokens
    3. Component primitives — button matrix, breadcrumb, page header,
       badges, cards, tables, forms, alerts, dropdowns
    4. Surface tonal layers — .surface-employer, .surface-wallet,
       .surface-inspector pick their density / color emphasis
    5. Legacy class mappings — .tt-*, .i9-*, .w-*, .insp-* keep working
       and inherit the new tokens, so existing views look new without
       being touched. The view sweep migrates them to explicit classes
       over follow-up commits.

  Design language: architectural. Tight radii (right angles convey
  reliability and authority — see shape-psychology rationale in
  docs/style-guide.md). Strong grid presence. Crisp 1px borders, not
  soft shadows. Sentence case (no uppercase letter-spacing). Inter
  does all the typographic work — regular + semibold + bold only.
*/

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* ----------------------------------------------------------------
     Trua I-9 v3 palette (2026-06-06): deep-blue brand + green accent
     + cleaner neutral scale. Replaces v2's orange-primary anchor.
     Spec hexes (Blue 600 #31487A, Blue 900 #15264C, Green 500 #9DBF59,
     neutrals 100/300/500/700/900) come from the 2026-06-06 brand brief.
     Surrounding stops are interpolated to preserve the 8-step depth v2
     used for hover / soft / border tints.
     ---------------------------------------------------------------- */

  /* --- Palette: Primary Blue (brand, anchor, authority) --- */
  --blue-100: #E8EDF5;     /* lightest tint — soft hover, callout-brand bg */
  --blue-300: #A3B0CB;     /* border on callout-brand */
  --blue-500: #5F73A0;     /* secondary text on light brand surfaces */
  --blue-600: #31487A;     /* SPEC — Lighter Blue. Links, focus, mid-emphasis */
  --blue-700: #22365E;     /* primary hover, text-on-light-brand */
  --blue-900: #15264C;     /* SPEC — Deep Blue. Primary brand. CTAs, headings, page-header stripe */

  /* --- Palette: Accent Green --- */
  --green-100: #F0F7E1;     /* soft surface */
  --green-300: #C7DC8E;     /* mid */
  --green-500: #9DBF59;     /* SPEC — Bright Green. Accent, success, "verified" */
  --green-700: #6F8C36;     /* darker for text-on-light */
  --green-900: #42561D;     /* deepest */

  /* --- Palette: Neutrals --- */
  --neutral-0:   #FFFFFF;   /* SPEC — White. Elevated surface */
  --neutral-100: #F5F5F5;   /* SPEC — Off-White. Page bg */
  --neutral-300: #D9D9D9;   /* SPEC — Light Gray. Borders, dividers */
  --neutral-500: #7A7A7A;   /* SPEC — Gray. Muted text, placeholder */
  --neutral-700: #4A4A4A;   /* SPEC — Medium Gray. Body text */
  --neutral-900: #1E1E1E;   /* SPEC — Dark Gray. Text-strong, dark surfaces */

  /* --- Palette: Status (info / success / warning / error) ---
     Info aliases the primary blue (links + info read as the same family).
     Success aliases the green accent (verified + accent share one mark).
     Warning swaps from v2's deep amber-orange to a calmer amber that
     doesn't accidentally reference the retired brand orange.
     Error stays red — universal regardless of brand. */
  --info-10:    var(--blue-100);
  --info-20:    #C5D2E8;
  --info-30:    var(--blue-300);
  --info-40:    var(--blue-600);
  --info-50:    var(--blue-900);

  --success-10: var(--green-100);
  --success-20: #DCEBB8;
  --success-30: var(--green-300);
  --success-40: var(--green-500);
  --success-50: var(--green-700);

  --warning-10: #FFF4DB;
  --warning-20: #FFE2A8;
  --warning-30: #E8B85C;
  --warning-40: #C88B1F;    /* amber, not orange — keeps warning distinct from any brand recall */
  --warning-50: #7A4F0D;

  --error-10:   #FEEBEB;
  --error-20:   #FBC9C9;
  --error-30:   #ED7A7A;
  --error-40:   #D63030;
  --error-50:   #8C1818;

  /* --- Legacy aliases (preserve v2 token surface for unswept views) ---
     v2 used --navy-* / --light-* / --dark-* heavily across ~63 view
     references. Rather than touch every view in this commit, alias the
     v2 names to the v3 scales. Future view-sweep commits can migrate
     to explicit v3 names; nothing breaks in the meantime.

     Mapping rationale: navy-70 was the v2 "structural anchor heading"
     color (#1A365D) — closest v3 equivalent is blue-900 (#15264C, very
     close in hue + value). light-* → neutral-* shift their off-white-ish
     surfaces to the cleaner neutrals from the brief. dark-* fold into
     neutral-700/900 since the v3 brief consolidates dark gradations.

     The retired --orange-* scale is NOT aliased — any view that
     references --orange-* should now fail loudly, signaling a sweep
     is needed. (At commit time, only one such ref existed and was
     migrated; future regressions are easier to catch by absence.) */
  --navy-10: var(--blue-100);
  --navy-20: #C5D2E8;
  --navy-30: var(--blue-300);
  --navy-40: var(--blue-500);
  --navy-50: var(--blue-500);
  --navy-60: var(--blue-700);
  --navy-70: var(--blue-900);
  --navy-80: var(--neutral-900);

  --light-white:  var(--neutral-0);
  --light-off:    var(--neutral-100);
  --light-misty:  var(--neutral-100);
  --light-cloud:  var(--neutral-300);
  --light-silver: #BFBFBF;
  --light-pewter: var(--neutral-500);

  --dark-30: var(--neutral-700);
  --dark-50: var(--neutral-700);
  --dark-60: var(--neutral-900);
  --dark-70: var(--neutral-900);
  --dark-80: #0A0A0A;

  /* --- Semantic mappings (refer to scales above; don't hardcode hex) --- */
  --color-bg:           var(--neutral-100);
  --color-bg-elevated:  var(--neutral-0);
  --color-bg-subtle:    var(--neutral-100);
  --color-bg-inverse:   var(--blue-900);

  --color-text:         var(--neutral-700);
  --color-text-muted:   var(--neutral-500);
  --color-text-strong:  var(--blue-900);
  --color-text-inverse: var(--neutral-0);
  --color-text-link:    var(--blue-600);

  --color-border:        var(--neutral-300);
  --color-border-strong: #BFBFBF;
  --color-border-focus:  var(--blue-600);

  --color-brand:         var(--blue-900);    /* v2: var(--orange-50) */
  --color-brand-hover:   var(--blue-700);    /* v2: var(--orange-60) */
  --color-brand-soft:    var(--blue-100);    /* v2: var(--orange-10) */

  --color-accent:        var(--green-500);   /* v2: var(--navy-70) */
  --color-accent-hover:  var(--green-700);   /* v2: var(--navy-80) */

  /* --- Type scale (Inter, no decorative weights) --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  --text-2xs: 0.6875rem;    /* 11px — captions / footnotes */
  --text-xs:  0.75rem;      /* 12px — meta */
  --text-sm:  0.8125rem;    /* 13px — secondary body */
  --text-md:  0.9375rem;    /* 15px — body */
  --text-lg:  1.0625rem;    /* 17px — lead body */
  --text-xl:  1.25rem;      /* 20px — heading sm */
  --text-2xl: 1.5rem;       /* 24px — heading md */
  --text-3xl: 1.875rem;     /* 30px — heading lg */
  --text-4xl: 2.25rem;      /* 36px — heading xl */
  --text-5xl: 3rem;         /* 48px — heading 2xl */

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;
  --leading-loose:  1.65;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* --- Spacing scale (8pt grid with half-step) --- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  /* --- Radii: tight (architectural, not consumer-product) --- */
  --radius-0:  0;
  --radius-1:  2px;        /* default for inputs, buttons */
  --radius-2:  4px;        /* cards, panels */
  --radius-3:  6px;        /* large panels — rare */
  --radius-pill: 9999px;   /* status pills only */

  /* --- Shadows: subtle, structural --- */
  --shadow-0: none;
  --shadow-1: 0 1px 0 rgba(11, 24, 38, 0.05);              /* hairline separator */
  --shadow-2: 0 1px 2px rgba(11, 24, 38, 0.08);            /* resting card */
  --shadow-3: 0 2px 4px rgba(11, 24, 38, 0.10),
              0 1px 2px rgba(11, 24, 38, 0.06);            /* raised card */
  --shadow-4: 0 4px 8px rgba(11, 24, 38, 0.12);            /* popover */
  --shadow-focus: 0 0 0 3px rgba(53, 122, 204, 0.25);      /* focus ring */

  /* --- Layout --- */
  --layout-canvas-max: 720px;      /* wallet — narrow, holder-portable */
  --layout-employer-max: 1240px;   /* employer — wide, desktop HR */
  --layout-inspector-max: 880px;   /* inspector — medium, forensic */
  --layout-rail-w: 240px;

  /* --- Transitions --- */
  --tx-fast: 100ms ease-out;
  --tx:      150ms ease-out;
  --tx-slow: 240ms ease-out;
}

/* ============================================================
   2. BOOTSTRAP OVERRIDES — re-map Bootstrap 5 vars to tokens
   ============================================================ */
:root {
  /* v3 RGB tuples updated for the deep-blue brand. Order matches
     v2; semantic targets unchanged so Bootstrap's color utilities
     (`text-primary`, `bg-success`, etc.) carry forward without any
     class sweep. */
  --bs-primary:        var(--color-brand);
  --bs-primary-rgb:    21, 38, 76;            /* blue-900 #15264C */
  --bs-secondary:      var(--blue-600);
  --bs-secondary-rgb:  49, 72, 122;           /* blue-600 #31487A */
  --bs-success:        var(--success-40);
  --bs-success-rgb:    157, 191, 89;          /* green-500 #9DBF59 */
  --bs-info:           var(--info-40);
  --bs-info-rgb:       49, 72, 122;
  --bs-warning:        var(--warning-40);
  --bs-warning-rgb:    200, 139, 31;          /* amber #C88B1F */
  --bs-danger:         var(--error-40);
  --bs-danger-rgb:     214, 48, 48;           /* red #D63030 */
  --bs-light:          var(--neutral-100);
  --bs-dark:           var(--neutral-900);

  --bs-body-bg:        var(--color-bg);
  --bs-body-color:     var(--color-text);
  --bs-border-color:   var(--color-border);
  --bs-link-color:     var(--color-text-link);
  --bs-link-hover-color: var(--color-brand);
  --bs-border-radius:    var(--radius-1);
  --bs-border-radius-sm: var(--radius-1);
  --bs-border-radius-lg: var(--radius-2);
}

::selection {
  background-color: var(--blue-600);
  color: var(--neutral-0);
}

html, body { height: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   3. COMPONENT PRIMITIVES
   ============================================================ */

/* --- Typography primitives --- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--color-text-strong);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: -0.005em;
}

.text-2xs    { font-size: var(--text-2xs); }
.text-xs     { font-size: var(--text-xs);  }
.text-sm     { font-size: var(--text-sm);  }
.text-md     { font-size: var(--text-md);  }
.text-lg     { font-size: var(--text-lg);  }
.text-xl     { font-size: var(--text-xl);  }
.text-mono   { font-family: var(--font-mono); }
.text-strong { color: var(--color-text-strong); }
.text-muted  { color: var(--color-text-muted); }
.text-brand  { color: var(--color-brand); }
.text-anchor { color: var(--color-accent); }
.text-link   { color: var(--color-text-link); }

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--tx);
}
a:hover { color: var(--color-brand); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; border-radius: var(--radius-1); }

/* --- Button matrix: size × variant ---
   Sizes: .btn-xs, .btn-sm, .btn-md (default), .btn-lg
   Variants: .btn-filled (brand), .btn-outline, .btn-dark, .btn-light,
             .btn-ghost (transparent), .btn-danger
   Modifier: .btn--icon (icon-only square)

   Override matched Bootstrap classes too so existing markup picks up
   the new style without being rewritten.
*/
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-1);
  cursor: pointer;
  transition: background-color var(--tx), border-color var(--tx), color var(--tx);
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }

/* sizes */
.btn-xs, .btn-sm.btn-extra-small { padding: 5px 10px;  font-size: var(--text-xs); }
.btn-sm                          { padding: 7px 14px;  font-size: var(--text-sm); }
.btn-md, .btn                    { padding: 10px 18px; font-size: var(--text-md); }
.btn-lg                          { padding: 13px 24px; font-size: var(--text-lg); }

/* variants — explicit */
.btn-filled, .btn-primary, .btn-i9-primary {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--light-white);
}
.btn-filled:hover, .btn-primary:hover, .btn-i9-primary:hover {
  background-color: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  color: var(--light-white);
}

.btn-outline, .btn-outline-primary {
  background-color: transparent;
  border-color: var(--color-brand);
  color: var(--color-brand);
}
.btn-outline:hover, .btn-outline-primary:hover {
  background-color: var(--color-brand-soft);
  border-color: var(--color-brand);
  color: var(--color-brand-hover);
}

.btn-dark, .btn-i9-success {
  background-color: var(--navy-70);
  border-color: var(--navy-70);
  color: var(--light-white);
}
.btn-dark:hover, .btn-i9-success:hover {
  background-color: var(--navy-80);
  border-color: var(--navy-80);
  color: var(--light-white);
}

.btn-light, .btn-outline-secondary {
  background-color: var(--light-white);
  border-color: var(--color-border);
  color: var(--color-text-strong);
}
.btn-light:hover, .btn-outline-secondary:hover {
  background-color: var(--light-misty);
  border-color: var(--color-border-strong);
  color: var(--color-text-strong);
}

.btn-ghost, .btn-link {
  background-color: transparent;
  border-color: transparent;
  color: var(--color-text-link);
  padding-left: 4px;
  padding-right: 4px;
}
.btn-ghost:hover, .btn-link:hover {
  background-color: transparent;
  color: var(--color-brand);
  text-decoration: underline;
}

.btn-danger, .btn-outline-danger {
  background-color: var(--light-white);
  border-color: var(--error-40);
  color: var(--error-40);
}
.btn-danger:hover, .btn-outline-danger:hover {
  background-color: var(--error-40);
  border-color: var(--error-40);
  color: var(--light-white);
}

.btn-warning, .btn-outline-warning {
  background-color: var(--light-white);
  border-color: var(--warning-40);
  color: var(--warning-40);
}
.btn-warning:hover, .btn-outline-warning:hover {
  background-color: var(--warning-40);
  border-color: var(--warning-40);
  color: var(--light-white);
}

/* --- Status pills --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.3;
}
.pill-neutral { background: var(--light-misty);   color: var(--dark-50);    border-color: var(--light-cloud); }
.pill-info    { background: var(--info-10);       color: var(--info-50);    border-color: var(--info-20); }
.pill-success { background: var(--success-10);    color: var(--success-50); border-color: var(--success-20); }
.pill-warning { background: var(--warning-10);    color: var(--warning-50); border-color: var(--warning-20); }
.pill-error   { background: var(--error-10);      color: var(--error-50);   border-color: var(--error-20); }
.pill-brand   { background: var(--blue-100);      color: var(--blue-900);   border-color: var(--blue-300); }
.pill-dark    { background: var(--blue-900);      color: var(--neutral-0);  border-color: var(--blue-900); }

/* --- Cards --- */
.card,
.surface-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.card-header,
.surface-card__header {
  background: transparent;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.surface-card__title,
.card-header h2,
.card-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-strong);
  margin: 0;
  letter-spacing: -0.005em;
}
.surface-card__body,
.card-body {
  padding: var(--space-5);
}
.surface-card__body.flush,
.card-body.flush {
  padding: 0;
}

/* --- Page header (shared structure across surfaces) --- */
.page-header {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-5) var(--space-6);
  position: relative;
}
.page-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-brand);
}
.page-header__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-strong);
  margin: 0 0 var(--space-2) 0;
  letter-spacing: -0.01em;
}
.page-header__lead {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 70ch;
}
.page-header__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

/* --- Breadcrumb --- */
.breadcrumb,
.crumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-3) 0;
  flex-wrap: wrap;
}
.breadcrumb .breadcrumb-item,
.crumb__item {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.breadcrumb .breadcrumb-item + .breadcrumb-item::before,
.crumb__item + .crumb__item::before {
  content: "›";
  color: var(--color-border-strong);
  padding: 0;
}
.breadcrumb .breadcrumb-item a,
.crumb__item a {
  color: var(--color-text-link);
  text-decoration: none;
}
.breadcrumb .breadcrumb-item a:hover,
.crumb__item a:hover {
  color: var(--color-brand);
  text-decoration: underline;
}
.breadcrumb .breadcrumb-item.active,
.crumb__item--current {
  color: var(--color-text-strong);
  font-weight: var(--weight-medium);
}

/* --- Tables --- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: 0;
}
.table thead th {
  background: var(--light-misty);
  color: var(--color-text-strong);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table.table-hover tbody tr:hover td,
.table tbody tr:hover td { background-color: var(--light-misty); }
.table code { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-strong); }

/* --- Form controls --- */
.form-control,
.form-select {
  width: 100%;
  background: var(--light-white);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
  padding: 9px 12px;
  font-size: var(--text-md);
  font-family: var(--font-sans);
  color: var(--color-text);
  height: 40px;
  transition: border-color var(--tx), box-shadow var(--tx);
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
}
.form-control::placeholder { color: var(--color-text-muted); }
.form-control[readonly] { background: var(--light-misty); cursor: not-allowed; }

textarea.form-control { height: auto; min-height: 88px; }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-strong);
  margin-bottom: var(--space-1);
}
.form-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.form-check-input {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-1);
}
.form-check-input:checked {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
}
.form-check-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-focus);
}
.form-check-label { color: var(--color-text); }

/* --- Alerts --- */
.alert {
  border: 1px solid transparent;
  border-radius: var(--radius-2);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-md);
  margin-bottom: var(--space-4);
}
.alert-primary, .alert-info {
  background: var(--info-10);
  border-color: var(--info-20);
  color: var(--info-50);
}
.alert-success {
  background: var(--success-10);
  border-color: var(--success-20);
  color: var(--success-50);
}
.alert-warning {
  background: var(--warning-10);
  border-color: var(--warning-20);
  color: var(--warning-50);
}
.alert-danger {
  background: var(--error-10);
  border-color: var(--error-20);
  color: var(--error-50);
}

/* --- Dropdowns --- */
.dropdown-menu {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-4);
  padding: var(--space-1);
  background: var(--color-bg-elevated);
}
.dropdown-item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-1);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--light-misty);
  color: var(--color-text-strong);
}
.dropdown-item.active,
.dropdown-item:active {
  background: var(--color-brand);
  color: var(--light-white);
}

/* --- Step circles: numbered indicators in onboarding flows ---
   Surface-aware: wallet uses brand orange, employer/inspector use navy. */
.step-circle {
  background: var(--navy-70);
  color: var(--light-white);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  margin-right: var(--space-3);
  flex-shrink: 0;
}
.surface-wallet .step-circle { background: var(--color-brand); }
.step-row { display: flex; align-items: flex-start; margin-bottom: var(--space-3); }
.step-row__body strong { color: var(--color-text-strong); }
.step-row__body .step-help { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }

/* --- Callouts: highlighted inline info boxes ---
   Use for "satisfied via clearance", "employer of record", document-
   list info banners, and similar. Architectural left-border anchor
   (4px) and tight border-radius reinforce the structural register. */
.callout {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--radius-1);
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  background: var(--color-bg-elevated);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  margin: var(--space-1) 0;
}
.callout.block { display: block; }
.callout-success { background: var(--success-10); border-color: var(--success-20); border-left-color: var(--success-40); color: var(--success-50); }
.callout-info    { background: var(--info-10);    border-color: var(--info-20);    border-left-color: var(--info-40);    color: var(--info-50); }
.callout-warning { background: var(--warning-10); border-color: var(--warning-20); border-left-color: var(--warning-40); color: var(--warning-50); }
.callout-error   { background: var(--error-10);   border-color: var(--error-20);   border-left-color: var(--error-40);   color: var(--error-50); }
.callout-brand   { background: var(--blue-100);   border-color: #C5D2E8;             border-left-color: var(--blue-900); color: var(--blue-900); }
.callout-neutral { background: var(--light-misty);border-color: var(--color-border); border-left-color: var(--dark-30);  color: var(--dark-50); }
.callout strong { color: inherit; }
.callout code { font-family: var(--font-mono); font-size: var(--text-xs); background: transparent; padding: 0 2px; }
.callout .callout-meta { color: var(--color-text-muted); font-size: var(--text-xs); margin-top: var(--space-1); }

/* --- Definition list (key/value pairs) --- */
.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.kv__k { color: var(--color-text-muted); font-weight: var(--weight-medium); }
.kv__v { color: var(--color-text-strong); font-weight: var(--weight-regular); }
.kv__v code, .kv__v .mono { font-family: var(--font-mono); font-size: var(--text-xs); }

/* --- Hashes / DIDs (truncated mono with hover-tooltip-via-title) --- */
.mono-trunc {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-strong);
  background: var(--light-misty);
  padding: 1px 5px;
  border-radius: var(--radius-1);
  border: 1px solid var(--color-border);
  display: inline-block;
  max-width: 32ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* --- Focus management --- */
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-5) 0;
}

/* ============================================================
   4. SURFACE TONAL LAYERS
   Apply .surface-employer | .surface-wallet | .surface-inspector
   on <body> (or the layout's outermost element) to set the surface's
   character. Tokens stay the same; emphasis shifts.
   ============================================================ */

/* --- Employer: navy-anchored, dense, tabular, authority --- */
.surface-employer {
  background: var(--light-misty);
}
.surface-employer .page-header {
  background: var(--light-white);
}
.surface-employer .page-header::before {
  background: var(--navy-70);                  /* anchor stripe is navy here */
}
.surface-employer .page-header__title { color: var(--navy-70); }
.surface-employer .surface-card,
.surface-employer .card {
  border-radius: var(--radius-2);
}
/* Brand orange is used sparingly on employer — only for primary CTAs. */

/* --- Wallet: light + warm, calm, generous whitespace --- */
.surface-wallet {
  background: var(--light-off);
}
.surface-wallet .page-header {
  background: var(--green-100);
  border-bottom-color: var(--green-300);
}
.surface-wallet .page-header::before {
  background: var(--green-500);                /* green stripe — wallet's warm anchor in v3 (was orange in v2) */
}
.surface-wallet .page-header__title { color: var(--navy-70); }
.surface-wallet .surface-card,
.surface-wallet .card { border-radius: var(--radius-2); }
.surface-wallet h2, .surface-wallet h3 { letter-spacing: -0.008em; }

/* --- Inspector: forensic, neutral, mono-forward, no brand presence --- */
.surface-inspector {
  background: var(--light-white);
}
.surface-inspector .page-header {
  background: var(--light-white);
  border-bottom-color: var(--navy-70);
}
.surface-inspector .page-header::before {
  background: var(--navy-80);                  /* deepest navy, austere */
}
.surface-inspector .page-header__title { color: var(--navy-80); }
.surface-inspector .surface-card,
.surface-inspector .card {
  border-radius: var(--radius-1);              /* tightest — most architectural */
}
.surface-inspector body,
.surface-inspector p { color: var(--dark-50); }

/* ============================================================
   5. LEGACY CLASS MAPPINGS
   Keep existing class names working so views don't break. These map
   the old .tt-* / .i9-* / .w-* / .insp-* utilities onto the new
   tokens. The view sweep migrates them away over time.
   ============================================================ */

/* --- .tt-* (Trua shared) --- */
.tt-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.tt-canvas {
  width: 100%;
  max-width: var(--layout-canvas-max);
  margin-inline: auto;
  padding: var(--space-4);
}
@media (min-width: 640px) {
  .tt-canvas {
    padding: var(--space-5);
    margin: var(--space-5) auto;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-2);
    box-shadow: var(--shadow-2);
  }
}
@media (min-width: 1024px) {
  .tt-canvas { padding: var(--space-6); margin: var(--space-6) auto; }
}
@media (max-width: 639px) {
  .tt-canvas { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0)); }
}
.tt-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
@media (min-width: 640px) {
  .tt-header { flex-direction: row; justify-content: space-between; align-items: center; }
}
.tt-nav {
  background: var(--color-bg-elevated);
  padding: var(--space-4);
  position: fixed; bottom: 0; left: 0; right: 0;
  box-shadow: 0 -1px 0 var(--color-border);
}
@media (min-width: 640px) {
  .tt-nav {
    position: static;
    border-top: 1px solid var(--color-border);
    box-shadow: none;
    margin-top: var(--space-5);
    padding: var(--space-5) 0 0;
  }
}
.tt-nav-inner {
  width: 100%;
  max-width: var(--layout-canvas-max);
  display: flex; justify-content: space-between; gap: var(--space-3);
  margin: 0 auto;
}
.tt-footer { border-top: 1px solid var(--color-border) !important; color: var(--color-text-muted); }
.tt-footer a { color: var(--color-text-muted); }
.tt-footer a:hover { color: var(--color-brand); }

/* --- .i9-* (employer surface) --- */
.i9-section {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
  margin-bottom: var(--space-5);
  overflow: hidden;
}
.i9-section .section-header {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--light-misty);
}
.i9-section .section-header h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-text-strong);
  margin: 0;
}
.i9-section .section-body { padding: var(--space-5); }
.i9-section .section-body.flush { padding: 0; }
.i9-hash-trunc {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--light-misty);
  padding: 2px 6px;
  border-radius: var(--radius-1);
  border: 1px solid var(--color-border);
}
.i9-status {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}
.i9-status.status-section1_open    { background: var(--info-10);    color: var(--info-50);    border-color: var(--info-20); }
.i9-status.status-section1_complete{ background: var(--blue-10);    color: var(--blue-50);    border-color: var(--blue-20); }
.i9-status.status-section2_due     { background: var(--warning-10); color: var(--warning-50); border-color: var(--warning-20); }
.i9-status.status-complete         { background: var(--success-10); color: var(--success-50); border-color: var(--success-20); }
.i9-status.status-terminated       { background: var(--light-misty);color: var(--dark-50);    border-color: var(--color-border); }
.i9-status.status-legal_hold       { background: var(--warning-10); color: var(--warning-50); border-color: var(--warning-20); }   /* v3: amber, was orange */

/* --- .w-* (wallet surface) --- */
.w-form { display: flex; flex-direction: column; gap: var(--space-4); }

/* Disclosure semantic states — "WILL see" / "WILL NOT see" pattern in
   Phase C presentation review and similar consent disclosures.
   Selectors target both legacy <i.bi-*> markup and the Lucide-swapped
   <svg.lucide-icon> equivalent. */
.w-card-header.is-allowed { color: var(--success-50); }
.w-card-header.is-blocked { color: var(--error-50); }
.w-disclosure .w-disclosure-row .bi-check-square-fill,
.w-disclosure .w-disclosure-row svg.lucide-icon {
  color: var(--success-40); stroke: var(--success-40);
  width: 20px; height: 20px;
  stroke-width: 2.2;
  margin-right: var(--space-2); margin-top: 2px;
  flex-shrink: 0;
}
.w-disclosure.is-blocked .w-disclosure-row .bi-x-square-fill,
.w-disclosure.is-blocked .w-disclosure-row svg.lucide-icon {
  color: var(--error-40); stroke: var(--error-40);
  width: 20px; height: 20px;
  stroke-width: 2.2;
  margin-right: var(--space-2); margin-top: 2px;
  flex-shrink: 0;
}
.w-step-counter {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.w-section {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

/* --- .insp-* (inspector surface) --- */
.insp-shell {
  max-width: var(--layout-inspector-max);
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
}
.insp-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-1);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.insp-result-valid {
  border-left: 4px solid var(--success-40);
  background: var(--success-10);
}
.insp-result-invalid {
  border-left: 4px solid var(--error-40);
  background: var(--error-10);
}

/* --- .tt-timeline (kept as-is, retoken'd) --- */
.tt-timeline { display: flex; align-items: center; gap: var(--space-2); }
.tt-timeline-bar {
  height: 6px;
  border-radius: var(--radius-1);
  background: var(--color-brand);
  opacity: 0.7;
}
.tt-timeline-separator { font-size: 10px; line-height: 1; }
.tt-timeline-separator.gap    { color: var(--error-40); }
.tt-timeline-separator.no-gap { color: var(--color-border); }
.tt-timeline-meta { font-size: var(--text-xs); color: var(--color-text-muted); }

/* --- Public landing styles (kept compatible) --- */
.display-4 {
  color: var(--color-text-strong);
  font-weight: var(--weight-bold);
  letter-spacing: -0.015em;
}
.lead { color: var(--color-text); font-weight: var(--weight-regular); font-size: var(--text-lg); }

/* --- Custom: purple badge color used in places --- */
.bg-purple { background: #7c3aed !important; color: var(--light-white); }

/* --- Print stylesheet inclusion (loaded at print media only) --- */
@import url("/assets/print-d53714ac.css") print;
@import url("/assets/pdf-a897ffc4.css") print;
