/* SoldierClaims — Design System v2 (federal). Square corners, rules not shadows, navy band. */
/* Public Sans v2.001, SIL Open Font License 1.1. License: /fonts/OFL.txt */
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-Medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-SemiBold.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-Bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/PublicSans-ExtraBold.woff2') format('woff2');
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
:root {
  /* Brand */
  --navy: #0B2545;
  --navy-hover: #123A6B;
  --green: #4B5320;
  --green-hover: #3E451A;
  --green-ink: #3E451A;
  --red: #B22234;
  --red-hover: #8F1B29;
  --red-ink: #8F1B29;
  /* Surface */
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --border: #D9D9D4;
  --border-soft: #E9E8E4;
  --border-faint: #F0EFEB;
  --desk: #EAE8E4;
  /* Tints */
  --navy-tint: #E7EDF4;
  --green-tint: #ECEFDF;
  --red-tint: #FBF1F2;
  /* Text */
  --ink: #1C1C1C;
  --text: #333333;
  --dim: #5C6570;
  --faint: #8A8F98;
  --rule-grey: #9AA7B8;
  --circle-grey: #C9CDD3;
  /* Focus */
  --focus: #4C7BC0;
  --sans: 'Public Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
a:hover { color: var(--navy-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
[x-cloak] { display: none !important; }

/* Layout shell */
.shell { max-width: 1240px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }

/* Section label — 12px uppercase, does the structural work */
.label { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }

/* Cards — square, rules not shadows */
.card { background: var(--surface); border: 1px solid var(--border); }
.card-primary { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--green); }
.card-status-red { border-left: 6px solid var(--red); }
.card-status-green { border-left: 6px solid var(--green); }
.card-status-navy { border-left: 6px solid var(--navy); }

/* Table header rule */
.thead-rule { border-bottom: 2px solid var(--navy); }
.row-rule { border-bottom: 1px solid var(--border-soft); }

/* Buttons — square; 44 min, 48 standard */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; border: none; box-sizing: border-box; }
.btn-primary { background: var(--navy); color: #FFFFFF; }
.btn-primary:hover { background: var(--navy-hover); color: #FFFFFF; }
.btn-outline { background: var(--surface); color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy-tint); color: var(--navy); }
.btn-recommended { background: var(--green); color: #FFFFFF; }
.btn-recommended:hover { background: var(--green-hover); color: #FFFFFF; }
.btn-toolbar { height: 44px; padding: 0 16px; background: var(--surface); color: var(--navy); border: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.btn-toolbar:hover { background: var(--bg); color: var(--navy); }
.btn-destructive { height: 44px; padding: 0 18px; background: var(--red); color: #FFFFFF; font-size: 14.5px; }
.btn-destructive:hover { background: var(--red-hover); color: #FFFFFF; }
.btn-add { height: 44px; padding: 0 16px; background: var(--surface); color: var(--navy); border: 1px dashed var(--rule-grey); font-size: 14.5px; font-weight: 600; }
.btn-add:hover { background: var(--bg); color: var(--navy); }
.btn-sm { height: 44px; padding: 0 18px; font-size: 15px; }
.btn[disabled], .btn-disabled { background: var(--border-soft); color: var(--faint); cursor: not-allowed; }

/* Inputs — 48px, square, labels always visible */
.field-label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.input { width: 100%; height: 48px; box-sizing: border-box; border: 1px solid var(--border); padding: 0 14px; font-family: inherit; font-size: 16px; color: var(--text); background: var(--surface); }
.input-error { border: 2px solid var(--red); }
textarea.input { height: auto; padding: 12px 14px; font-size: 15px; line-height: 1.6; resize: vertical; }
select.input { padding: 0 10px; }
.hint { font-size: 14px; color: var(--dim); margin-top: 6px; }

/* Chips — taxonomy only, never status */
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; border: 1px solid var(--border); color: var(--text); padding: 2px 8px; }
.chip-pending { border-style: dashed; border-color: var(--circle-grey); color: var(--dim); }
.chip-tag { display: inline-block; max-width: 100%; line-height: 1.35; overflow-wrap: anywhere; font-size: 13.5px; font-weight: 700; background: var(--navy-tint); color: var(--navy); padding: 4px 12px; border: none; }
.chip-provenance { font-size: 11.5px; font-weight: 700; background: var(--navy-tint); color: var(--navy); padding: 2px 8px; border: none; }

/* In-table status — icon + label, no chips */
.status-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.status-good { color: var(--green-ink); }
.status-wait { color: var(--navy); }
.status-need { color: var(--red-ink); }
.status-none { color: var(--dim); }

/* Progress bar — square ends, 8px */
.progress { height: 8px; background: var(--border-soft); overflow: hidden; }
.progress > div { height: 100%; background: var(--green); }
.progress.in-flight > div { background: var(--navy); }

/* Callouts */
.callout { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); padding: 16px 20px; }
.callout-deadline { border-left: 6px solid var(--red); }
.callout-ai { border-left: 6px solid var(--navy); }
.callout-assurance { background: var(--navy-tint); }
.callout-caveat { background: var(--bg); border: none; border-left: 4px solid var(--rule-grey); padding: 14px 16px; font-size: 14.5px; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(11,37,69,0.5); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 60; }
.modal { background: var(--surface); border-top: 4px solid var(--navy); width: 100%; max-width: 460px; padding: 26px; box-sizing: border-box; }
.modal-destructive { border-top-color: var(--red); }

/* Paper preview — the only shadow */
.desk { background: var(--desk); border: 1px solid var(--border); padding: 20px; }
.paper { background: #FFFFFF; box-shadow: 0 2px 10px rgba(11,37,69,0.15); aspect-ratio: 8.5/11; box-sizing: border-box; padding: 9.5%; font-family: Arial, Helvetica, sans-serif; color: #111111; }

/* Mobile application chrome — mirrors the approved 390px design system. */
.sc-mobile-header { display: none; height: 60px; background: var(--navy); color: #FFF; box-sizing: border-box; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; position: relative; z-index: 70; }
.sc-mobile-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.sc-mobile-brand img { display: block; width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.sc-mobile-brand-text { font-size: 17px; line-height: 1; font-weight: 800; color: #FFF; letter-spacing: -0.2px; white-space: nowrap; }
.sc-mobile-actions { display: flex; align-items: center; gap: 2px; }
.sc-mobile-iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #FFF; background: transparent; border: 0; padding: 0; box-sizing: border-box; }
button.sc-mobile-iconbtn { cursor: pointer; font-family: inherit; }
button.sc-mobile-iconbtn:hover { background: rgba(255,255,255,0.08); }
.sc-mobile-overlay { position: fixed; inset: 0; z-index: 100; }
.sc-mobile-overlay[hidden] { display: none !important; }
.sc-mobile-scrim { position: absolute; inset: 0; background: rgba(11,37,69,0.45); }
.sc-mobile-drawer { position: absolute; inset: 0 auto 0 0; width: min(300px,85vw); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; }
.sc-mobile-drawer-head { height: 60px; border-bottom: 3px solid var(--green); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; flex-shrink: 0; }
.sc-mobile-drawer-title { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.sc-mobile-drawer-nav { padding: 10px 0; flex: 1; overflow: auto; }
.sc-mobile-nav-label { padding: 18px 16px 8px; margin-top: 10px; border-top: 1px solid var(--border); font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.sc-mobile-nav-link { min-height: 52px; display: flex; align-items: center; padding: 0 16px; border-left: 4px solid transparent; box-sizing: border-box; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 600; }
.sc-mobile-nav-link:hover { color: var(--navy); background: var(--bg); }
.sc-mobile-nav-link.active { color: var(--navy); background: var(--bg); border-left-color: var(--green); font-weight: 700; }
.sc-mobile-nav-link.tool { min-height: 44px; font-size: 15px; font-weight: 500; }
.sc-mobile-nav-link.tool.active { font-weight: 700; }
.sc-mobile-account { border-top: 1px solid var(--border); padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.sc-mobile-avatar { width: 44px; height: 44px; border-radius: 999px; background: var(--navy); color: #FFF; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-mobile-account-copy { min-width: 0; flex: 1; }
.sc-mobile-account-name { display: block; font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-mobile-account-sub { display: block; font-size: 13px; line-height: 1.35; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-mobile-signout { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex: 0 0 44px; border: 0; background: transparent; color: var(--red); font-family: inherit; cursor: pointer; padding: 0; }

/* Desktop header account menu (menu button pattern, opened from the name). */
.sc-acct { position: relative; display: flex; align-items: center; align-self: stretch; min-width: 0; }
.sc-acct-btn { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 6px 8px; border: 0; background: transparent; font-family: inherit; color: var(--dim); cursor: pointer; }
.sc-acct-btn:hover, .sc-acct-btn[aria-expanded="true"] { background: var(--bg); }
.sc-acct-avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--navy); color: #FFF; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sc-acct-name { min-width: 0; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--ink); }
.sc-acct-caret { flex-shrink: 0; transition: transform 0.15s; }
.sc-acct-btn[aria-expanded="true"] .sc-acct-caret { transform: rotate(180deg); }
.sc-acct-menu { position: absolute; top: 100%; right: 0; width: 260px; max-width: calc(100vw - 32px); padding: 6px 0 8px; box-sizing: border-box; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--green); box-shadow: 0 8px 24px rgba(11,37,69,0.14); z-index: 50; }
.sc-acct-menu[hidden] { display: none; }
.sc-acct-group-label { padding: 12px 18px 6px; font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); }
.sc-acct-item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 18px 0 15px; box-sizing: border-box; border: 0; border-left: 3px solid transparent; background: transparent; font-family: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.3; color: var(--navy); text-align: left; text-decoration: none; cursor: pointer; }
.sc-acct-item:hover, .sc-acct-item:focus { background: var(--bg); color: var(--navy); outline: none; }
.sc-acct-item:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.sc-acct-item[aria-current="page"] { border-left-color: var(--green); font-weight: 700; }
.sc-acct-sep { height: 1px; margin: 6px 0; background: var(--border); }
.sc-acct-signout, .sc-acct-signout:hover, .sc-acct-signout:focus { color: var(--red-ink); }

@media (max-width: 640px) {

  /* Horizontal tab bars stay one line and scroll rather than compressing labels. */
  #tabs.shell { overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #tabs.shell::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; white-space: nowrap; }

  /* Auto-fit desktop grids can otherwise force a 300–320px minimum wider than small phones. */
  [style*="repeat(auto-fit,minmax(320px,1fr))"],
  [style*="repeat(auto-fit,minmax(300px,1fr))"],
  [style*="repeat(auto-fit,minmax(260px,1fr))"],
  [style*="repeat(auto-fit,minmax(240px,1fr))"],
  [style*="repeat(auto-fit,minmax(220px,1fr))"] {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .kv { grid-template-columns: minmax(0,1fr) !important; }

  .desk { overflow-x: auto; }
  .paper { min-width: 280px; }

  /* Dashboard-specific values from Dashboard Redesign mobile render. */
  .page-dashboard #hero .shell { padding: 28px 16px 32px !important; gap: 24px !important; }
  .page-dashboard #hero h1 { font-size: 27px !important; }
  .page-dashboard #tools-row .shell { padding: 26px 12px 28px !important; }
  .page-dashboard #tools-row .shell > div[style*="display:flex"] { gap: 18px 6px !important; }
  .page-dashboard #main.shell { padding: 20px 16px 44px !important; }
  .page-dashboard #main .card[style*="padding:26px 26px 24px"] { padding: 18px 12px 16px !important; }
  .page-dashboard #main .card[style="padding:26px"] { padding: 18px 14px !important; }
  .page-dashboard #main [style*="grid-template-columns:repeat(5,1fr)"] [style*="font-size:13.5px"] { font-size: 11px !important; }

  /* Admin header keeps its desktop identity but is allowed to wrap at phone widths. */
  .page-admin > header .shell { height: auto !important; min-height: 70px; flex-wrap: wrap; padding-top: 8px !important; padding-bottom: 8px !important; }
  .page-admin > header .shell > a:first-child > span { font-size: 17px !important; }
  .page-admin > header .shell > a:first-child > span > span { font-size: 12.5px !important; }

  /* Shared authenticated footer: brand spans the first row, links form two columns. */
  #sc-footer .shell { padding: 32px 20px 22px !important; }
  .sc-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 28px 20px !important; }
  .sc-footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .sc-mobile-brand-text { font-size: 16px; }
  .sc-mobile-header { padding-left: 12px; padding-right: 6px; }
  .sc-mobile-actions { gap: 0; }
  .tool-circle { min-width: 82px; }
}

/* Named layouts: shell fit and content fit are independent breakpoints. */
.sc-workspace, .sc-form-grid, .sc-records, .sc-record-row, .sc-record-header { min-width: 0; }
.sc-workspace > *, .sc-form-grid > *, .sc-record-row > * { min-width: 0; }
.sc-records { container-type: inline-size; }
.sc-record-row > * { overflow-wrap: anywhere; }
.sc-record-row [data-label]::before { display: none; }
.sc-table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.sc-table-scroll table { border-collapse: collapse; }
.sc-responsive-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)) !important; }
.btn { min-height: 48px; height: auto; padding-block: 10px; max-width: 100%; white-space: normal; }
.scrim { box-sizing: border-box; overflow-y: auto; }
.modal { min-width: 0; overflow-wrap: anywhere; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.modal input, .modal select, .modal textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
.sc-mobile-drawer { overscroll-behavior: contain; }
#sc-tools-menu { position: fixed !important; right: 24px !important; left: auto; max-height: calc(100dvh - 140px); overflow-y: auto; }
@media (max-width: 1100px) and (min-width: 1024px) {
  .sc-acct-name { max-width: 120px; }
}
@media (max-width: 1023px) {
  .sc-desktop-chrome { display: none !important; }
  .sc-mobile-header { display: flex; }
  .sc-workspace { grid-template-columns: minmax(0,1fr) !important; }
  .sc-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 28px 20px !important; }
  .sc-footer-grid > :first-child { grid-column: 1 / -1; }
  #tabs.shell { overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; }
  .tab { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 800px) {
  .sc-form-grid { grid-template-columns: minmax(0,1fr) !important; }
}
@container (max-width: 760px) {
  .sc-record-header { display: none !important; }
  .sc-record-row { grid-template-columns: minmax(0,1fr) !important; gap: 10px !important; }
  .sc-record-row [data-label]::before { display: inline; content: attr(data-label) ": "; font-weight: 600; color: var(--dim); }
}
@media (max-width: 640px), (max-height: 480px) {
  .scrim { padding: 16px; }
  .modal { padding: 20px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
}

.btn-toolbar, .btn-destructive, .btn-add, .btn-sm { min-height: 44px; padding-block: 8px; }