/* Reconcilia app — design tokens from CLAUDE.md. Served from our own origin:
   the CSP allows no inline style, so every style lives here. */
:root {
  --ink: #0B0F14;
  --graphite: #1F2937;
  --slate: #64748B;
  --mist: #E5E7EB;
  --paper: #F8FAFC;
  --white: #FFFFFF;
  /* #059669 is the accent on a light background (figures recovered, icons, bars) and the logo's; anything carrying
     white text sits on --green-fill (5.5:1, WCAG AA; Samy, 2026-10-23: docs/DECISIONS.md AH). */
  --green: #059669;
  --green-hover: #047857;
  --green-fill: #047857;
  --green-fill-hover: #065F46;
  --green-soft: #ECFDF5;
  --red: #DC2626;
  --amber: #D97706;
  --radius-control: 8px;
  --radius-card: 14px;
}

/* The fonts, served by the app: vendored from @fontsource by tools/vendor_assets.py, pinned and
   checked (tools/vendored.json). No request leaves for a third party. */
/* Manrope, latin-ext */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/manrope-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/manrope-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/manrope-latin-ext-800.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Manrope, latin */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/manrope-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/manrope-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/manrope-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/manrope-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/manrope-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* IBM Plex Mono, latin-ext */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* IBM Plex Mono, latin */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 "Manrope", system-ui, sans-serif;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.brand { display: block; width: 168px; height: auto; margin: 0 auto 28px; }

.card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-card);
  padding: 32px;
}

h1 { font-weight: 800; font-size: 24px; line-height: 1.2; margin: 0 0 8px; }

.lede { color: var(--slate); margin: 0 0 24px; }

form { display: grid; gap: 18px; }

.field { display: grid; gap: 6px; }
.field[hidden] { display: none; }

.field label { font-weight: 600; font-size: 14px; }

.field input {
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--mist);
  border-radius: var(--radius-control);
  background: var(--white);
  color: var(--ink);
  width: 100%;
}

.field input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }

.hint { color: var(--slate); font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-control);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}

.btn-primary { background: var(--green-fill); color: var(--white); }
.btn-primary:hover { background: var(--green-fill-hover); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--mist); }

.notice { border-radius: var(--radius-control); padding: 12px 14px; font-size: 14px; margin: 0 0 18px; }
.notice-error { background: #FEF2F2; color: var(--red); }
.notice-ok { background: var(--green-soft); color: var(--green-hover); }
.notice-warning { background: #FFFBEB; color: #92400E; display: grid; gap: 12px; }
.notice-warning p { margin: 0; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }

.qr { display: block; margin: 8px auto 16px; border: 1px solid var(--mist); border-radius: var(--radius-control); }
.secret { letter-spacing: 0.08em; }
.codes { columns: 2; gap: 24px; padding-left: 1.4em; margin: 0 0 24px; font-size: 15px; line-height: 2; }
.alternate { margin-top: 20px; color: var(--slate); }
.alternate summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.correct { margin: 8px 0 0; }
.correct summary { cursor: pointer; font-size: 14px; }
.span-field { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
.span-field legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 6px; }
.secondary-action { margin-top: 16px; }
.card-wide { max-width: 760px; }
h2 { font-weight: 700; font-size: 17px; margin: 28px 0 12px; }
.team-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.team-list li { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--mist); }
.team-list form { display: flex; gap: 8px; align-items: center; }
select { font: inherit; padding: 10px 12px; border: 1px solid var(--mist); border-radius: var(--radius-control); background: var(--white); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* HTMX's request indicator, which its own inline style would otherwise add
   (includeIndicatorStyles is off, docs/DECISIONS.md L). */
.htmx-indicator { opacity: 0; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; transition: opacity 200ms ease-in; }

/* The upload page (app/saas/uploads.py). */
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0 0 20px; }
.upload-form { margin: 0 0 12px; }
.upload-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.upload-list li { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--mist); }
.upload-list .hint { margin: 0; }
.status { justify-self: start; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--mist); color: var(--graphite); }
.status-reconciled, .status-imported { background: var(--green-soft); color: var(--green-hover); }
.status-failed, .status-quarantined { background: #FEF2F2; color: var(--red); }
.status-stuck, .status-needs_input { background: #FFFBEB; color: #92400E; }

/* ---------------------------------------------------------------- the shell (Phase 3, step 0)
   The mockups' layout (design/app-screens/): their inline styles made these classes, their values kept. */

.in-app { background: var(--paper); }
.in-app .btn { padding: 11px 16px; font-size: 14px; white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--white); color: var(--ink);
  padding: 10px 14px; border-radius: var(--radius-control); font-weight: 700; }
.skip-link:focus { top: 12px; }

.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

.side { background: var(--ink); color: var(--white); padding: 24px 16px; display: flex; flex-direction: column;
  gap: 28px; }
.logo-link { display: flex; align-items: center; gap: 10px; padding: 4px 12px; color: var(--white);
  font-weight: 800; font-size: 21px; letter-spacing: -0.04em; text-decoration: none; }
.logo-mark { width: 26px; height: 26px; flex: none; }

.navgroup { display: flex; flex-direction: column; gap: 4px; }
.navlink { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-control);
  font: inherit; font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, 0.72); text-decoration: none;
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.navlink:hover { background: rgba(255, 255, 255, 0.06); color: var(--white); }
.navlink.active { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.navlink .icon { width: 18px; height: 18px; flex: none; }
.navlink-small { padding: 8px 12px; font-size: 13px; }
.navlink:focus-visible, .logo-link:focus-visible, .menu-button:focus-visible, .skip-link:focus {
  outline: 2px solid var(--green); outline-offset: 2px; }

.spacer { flex: 1 1 0; }
.user { display: flex; align-items: center; gap: 12px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green-fill); color: var(--white); display: flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }
.user-who { display: grid; gap: 2px; min-width: 0; }
.user-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-agency { font-size: 12px; color: rgba(255, 255, 255, 0.6); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.account-links { display: grid; gap: 2px; }
.sign-out { display: block; margin: 0; }

/* At 390px, the menu behind a button: the page's own details element (no script). Hidden on a wide screen. */
.menu-narrow { display: none; }
.menu-button { display: inline-flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 10px 14px; border-radius: var(--radius-control); border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 700; font-size: 14px; color: var(--white); }
.menu-button::-webkit-details-marker { display: none; }
.menu-button .icon { width: 18px; height: 18px; }
.menu-panel { display: grid; gap: 12px; }

.main { background: var(--paper); min-width: 0; }
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 36px; border-bottom: 1px solid var(--mist); background: var(--white); }
.top-title { display: grid; gap: 4px; min-width: 0; }
.top-title h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.top-title p { margin: 0; font-size: 14px; color: var(--slate); }
.top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* The header's search, bell and help (Phase 3, step 10; Main.dc.html). */
.search { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--mist);
  border-radius: var(--radius-control); padding: 0 12px; background: var(--white); min-width: 0; flex: 1 1 220px;
  max-width: 320px; color: var(--slate); }
.search input { font: inherit; font-size: 13.5px; border: 0; outline: none; padding: 10px 0; width: 100%;
  min-width: 0; background: transparent; color: var(--ink); }
.search:focus-within { outline: 2px solid var(--green); outline-offset: 1px; }
.btn-icon { padding: 10px; position: relative; }
.bell-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.tools-rule { width: 1px; height: 28px; background: var(--mist); margin: 0 4px; }
/* The bell's page and the search's answers: one line each. */
.notification-list, .result-list { list-style: none; margin: 0; padding: 0; }
.notification-list li, .result-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding: 13px 22px; border-bottom: 1px solid #F1F5F9; overflow-wrap: anywhere; }
.notification-list li.unread { background: var(--paper); }
.notification-list li.unread .link-button { font-weight: 700; }
.notification-open { display: grid; gap: 2px; min-width: 0; }
.link-button { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px; }
.link-button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.audit-details { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.period-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.period-form label { font-size: 13px; font-weight: 600; color: var(--slate); }
.period-form select { font-size: 14px; font-weight: 600; }
.content { padding: 32px 36px; display: grid; gap: 28px; align-content: start; }
.content:focus { outline: none; }
.content > .notice { margin: 0; }

/* A panel of a page in the shell: the mockups' card (.card is the sign-in pages'). */
.panel { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); min-width: 0;
  overflow: hidden; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px;
  border-bottom: 1px solid var(--mist); }
.panel-h h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.panel-body { padding: 22px; display: grid; gap: 16px; }
.panel-body > * { margin-top: 0; margin-bottom: 0; }
.form-narrow, .upload-list .field { max-width: 440px; }
/* A file's or a person's name too long for the line breaks rather than pushes the panel past the screen. */
.upload-list li, .team-list li { overflow-wrap: anywhere; }

.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.pill-open { background: #FEE2E2; color: #991B1B; }
.pill-disputed { background: #FEF3C7; color: #92400E; }
.pill-recovered { background: #D1FAE5; color: #065F46; }

.table-wrap { overflow-x: auto; }
/* A table wider than the screen scrolls in its own box, which the keyboard reaches too (axe). */
.table-wrap:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--slate); padding: 10px 22px;
  border-bottom: 1px solid var(--mist); background: var(--paper); }
.data-table td { padding: 13px 22px; border-bottom: 1px solid #F1F5F9; }
.data-table .num { font-family: "IBM Plex Mono", ui-monospace, monospace; text-align: right; }
/* A row's own header (Agents & sources, Carriers): read as the row's first cell, not as a column's title. */
.data-table tbody th, .data-table tfoot th { font-size: 13.5px; color: var(--ink); background: none;
  border-bottom: 1px solid #F1F5F9; padding: 13px 22px; }
.data-table tfoot th, .data-table tfoot td { font-weight: 700; }
.data-table .hint.block { display: block; font-weight: 400; margin: 2px 0 0; font-size: 12.5px; }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: relative; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px; padding: 12px 16px; }
  .navgroup-wide, .spacer, .side-account { display: none; }
  .menu-narrow { display: block; }
  .menu-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--ink);
    padding: 8px 16px 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .top, .content { padding-left: 16px; padding-right: 16px; }
  .top-title h1 { font-size: 22px; }
  .content { padding-top: 20px; padding-bottom: 20px; gap: 20px; }
  .panel-h, .panel-body { padding-left: 16px; padding-right: 16px; }
}

/* ---------------------------------------------------------------- the dashboard (Phase 3, step 2; Main.dc.html) */

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); padding: 22px 24px;
  display: grid; gap: 10px; min-width: 0; align-content: start; }
.kpi p { margin: 0; }
.kpi-l { font-size: 13px; color: var(--slate); font-weight: 600; }
.kpi-v { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 30px; font-weight: 500; letter-spacing: -0.03em;
  line-height: 1; overflow-wrap: anywhere; }
.kpi-of { font-size: 18px; color: var(--slate); }
.kpi-d { font-size: 12.5px; color: var(--slate); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kpi-accent { border-color: var(--green); background: var(--green-soft); }
.kpi-accent .kpi-l, .kpi-accent .kpi-v { color: var(--green-hover); }
.kpi-accent .kpi-d { color: #3F5E55; }

.grid2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.panel-link { font-size: 13px; font-weight: 700; color: var(--green-hover); text-decoration: none; }
.panel-link:hover { text-decoration: underline; }
.panel-note { font-size: 13px; color: var(--slate); }
.strong { font-weight: 600; }
.muted { color: var(--slate); }
.data-table .mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.data-table th, .data-table td { padding-left: 12px; padding-right: 12px; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 22px; }
/* Words wrap; figures, numbers, months and statuses stay on one line. */
.data-table .num, .data-table .mono, .data-table .nowrap, .data-table .pill { white-space: nowrap; }
.cell-hint { display: block; font-size: 12px; color: var(--slate); }
.pill-dismissed, .pill-resolved { background: var(--mist); color: var(--graphite); }

.carrier-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.carrier-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px;
  border: 1px solid var(--mist); border-radius: var(--radius-control); font-size: 13.5px; overflow-wrap: anywhere; }
.carrier-lines .hint { grid-column: 1 / -1; margin: 0; }
.carrier-name { font-weight: 600; }
.state { font-size: 12.5px; font-weight: 600; justify-self: end; text-align: right; }
.state-reconciled { color: var(--green-hover); }
.state-reading, .state-not_received { color: var(--slate); }
.state-held { color: #92400E; }
.state-missing { color: #B91C1C; }

.panel-ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.panel-ink .panel-body { padding: 24px; gap: 14px; }
.panel-ink p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.72); line-height: 1.5; }
.ink-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 700; }
.ink-title .icon { width: 20px; height: 20px; color: #34D399; }
.panel-ink .ink-meta { font-size: 12px; color: rgba(255, 255, 255, 0.72); }
.panel-ink .btn { justify-content: center; }
.btn .icon { width: 16px; height: 16px; }

.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; font-size: 13.5px; }
.bars li { display: grid; gap: 6px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bar { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.bar-track { fill: var(--mist); }
.bar-fill { fill: var(--green); }

.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 13px; }
.activity li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .top-tools .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------------------------------------------------------------- Statements (Phase 3, step 3; Upload.dc.html) */

.upload-form { margin: 0; display: block; }
.dropzone { border: 2px dashed #CBD5E1; border-radius: 12px; padding: 36px 24px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; text-align: center; background: var(--paper); }
.dropzone p { margin: 0; }
.dropzone.is-over { border-color: var(--green); background: var(--green-soft); }
.dropzone.is-busy { opacity: 0.7; }
.dropzone:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.dropzone-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center; }
.dropzone-icon .icon { width: 22px; height: 22px; }
.dropzone-title { font-weight: 700; font-size: 16px; }
.dropzone-browse { color: var(--green-hover); text-decoration: underline; cursor: pointer; }
.dropzone .hint { max-width: 42em; }
/* The file input itself, out of sight but still reached by the keyboard (its label, "browse", is the button). */
.visually-hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.files-summary { margin: 0; font-size: 13px; color: var(--slate); }
.upload-list .file { gap: 8px; }
.file-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.file-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--mist); color: var(--graphite); }
.file-icon .icon { width: 18px; height: 18px; }
.file-icon-done { background: var(--green-soft); color: var(--green-hover); }
.file-icon-yours { background: #FFFBEB; color: #92400E; }
.file-icon-unread { background: #FEF2F2; color: var(--red); }
.file-who { display: grid; gap: 2px; min-width: 0; }
.file-name { font-weight: 600; font-size: 13.5px; }
.file-meta { font-size: 12.5px; color: var(--slate); }
.file-head .status { justify-self: end; text-align: right; }

.file-progress { width: 100%; height: 6px; accent-color: var(--green); }
.stepper { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.stepper li { color: var(--slate); }
.stepper .step-done { color: var(--green-hover); }
.stepper .step-done::before { content: "\2713\00a0"; }
.stepper .step-current { color: var(--ink); font-weight: 700; }

.carrier-choice { gap: 8px; }

.next-steps { margin: 0; padding: 0; list-style: none; counter-reset: next; display: grid; gap: 14px; font-size: 13.5px; }
.next-steps li { counter-increment: next; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px;
  align-items: start; }
.next-steps li::before { content: counter(next); width: 26px; height: 26px; border-radius: 50%; background: var(--ink);
  color: var(--white); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }

.facts { margin: 0; display: grid; gap: 10px; font-size: 13.5px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9; }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.facts dt, .facts dd { min-width: 0; }  /* a long term or value wraps, never past the edge (step 7) */

@media (max-width: 760px) {
  .file-head { grid-template-columns: auto minmax(0, 1fr); }
  .file-head .status { grid-column: 2; justify-self: start; text-align: left; }
}

/* ---------------------------------------------------------------- Exceptions (Phase 3, step 4; Exceptions.dc.html) */

.btn-ink { background: var(--ink); color: var(--white); }
.plain-form { display: block; margin: 0; }
.nav-badge { margin-left: auto; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; background: var(--red);
  color: var(--white); padding: 2px 7px; border-radius: 999px; }

.kind-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.kind-filters .btn { padding: 9px 13px; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters label { font-size: 13px; font-weight: 600; color: var(--slate); }
.filters select { font-size: 14px; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.panel-actions select { font-size: 14px; }
.data-table tr.is-selected td { background: var(--green-soft); }
.data-table td a.strong { color: var(--ink); text-decoration: none; }
.data-table td a.strong:hover { text-decoration: underline; color: var(--green-hover); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px; font-size: 13px; color: var(--slate); }

.detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.detail-text { display: grid; gap: 14px; font-size: 14px; line-height: 1.6; min-width: 0; }
.detail-text p { margin: 0; }
.next-step { background: var(--paper); border-left: 3px solid var(--green); padding: 12px 14px; border-radius: 0 8px 8px 0; }
.moves { display: grid; gap: 12px; }
.move-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.move-form label { font-size: 13px; font-weight: 600; color: var(--slate); }
.move-form input { font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--mist); border-radius: var(--radius-control);
  min-width: 0; flex: 1 1 140px; }
.move-form select { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--mist);
  border-radius: var(--radius-control); min-width: 0; flex: 1 1 120px; }
/* The review screen (Phase 3, step 6): a fixed-width file's line, as the file has it. */
.row-text { margin: 0; padding: 10px 12px; background: var(--paper); border-radius: 8px; white-space: pre-wrap;
  overflow-wrap: anywhere; font-size: 13px; }
.detail-side { display: grid; gap: 12px; min-width: 0; }
.side-title { margin: 0; font-size: 12px; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: 0.04em; }
.history { width: 100%; height: auto; display: block; }
.history-axis { stroke: var(--mist); }
.history-paid { fill: var(--ink); }
.history-short { fill: #92400E; }
.history-unpaid { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 4 3; }
.history-unknown { fill: none; stroke: var(--mist); stroke-width: 2; }
.history-label { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; fill: var(--slate); }
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.notes li { border: 1px solid var(--mist); border-radius: var(--radius-control); padding: 10px 12px; display: grid; gap: 4px;
  overflow-wrap: anywhere; }
.notes p { margin: 0; font-size: 13.5px; white-space: pre-line; }
.note-form { gap: 8px; }
.note-form label { font-weight: 600; font-size: 13px; }
.note-form textarea { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--mist);
  border-radius: var(--radius-control); width: 100%; resize: vertical; }
.note-form p { margin: 0; }

@media (max-width: 1100px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- Policies & members (Phase 3, step 5; Policy.dc.html) */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--slate); }
.crumbs a { color: var(--slate); text-decoration: none; }
.crumbs a:hover { color: var(--green-hover); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.kpi-words { font-family: inherit; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.filters .check { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--graphite); }
.search-input { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--mist); border-radius: var(--radius-control);
  min-width: 0; flex: 1 1 260px; }

/* ---------------------------------------------------------------- Settings (Phase 3, step 7; Settings.dc.html) */

.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--mist); }
.tabs a { padding: 12px 4px; font-weight: 700; font-size: 14px; color: var(--slate); text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--green); }

/* The signup (Phase 4, step 1; Signup.dc.html): the steps across the top, the form beside the plan. */
.start-page { min-height: 100vh; display: flex; flex-direction: column; }
.start-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 36px;
  background: var(--white); border-bottom: 1px solid var(--mist); }
.start-logo { width: 140px; height: auto; }
.start-steps { display: flex; gap: 28px; font-size: 13px; font-weight: 700; color: var(--slate); }
.start-steps .on { color: var(--ink); }
.start-login { font-size: 14px; font-weight: 600; color: var(--slate); }
.start-wrap { max-width: 1040px; width: 100%; margin: 0 auto; padding: 40px 24px; display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
.start-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-card); }
.start-form { padding: 32px; display: grid; gap: 18px; }
.start-form h1 { font-size: 28px; letter-spacing: -0.03em; margin: 0; }
.start-form .lede { margin: 0; }
.start-heading { display: grid; gap: 6px; }
.start-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.start-form select { width: 100%; font-size: 15px; padding: 12px 14px; }
.start-submit { width: fit-content; }
.start-summary { padding: 26px; display: grid; gap: 16px; }
.start-summary h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.start-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.start-quiet { color: var(--slate); font-size: 13px; }
.start-total { font-weight: 800; font-size: 16px; }
.start-rule { height: 1px; background: var(--mist); }
.start-checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px;
  color: var(--graphite); }
.start-checks li { position: relative; padding-left: 26px; }
.start-checks li::before { content: ""; position: absolute; left: 3px; top: 3px; width: 6px; height: 11px;
  border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
@media (max-width: 860px) {
  .start-wrap { grid-template-columns: 1fr; padding: 24px 16px; }
  .start-two { grid-template-columns: 1fr; }
  .start-steps { display: none; }
  .start-bar { padding: 16px 20px; flex-wrap: wrap; }
}

/* The hosted demo (app/saas/demo_mode.py): every page says so. */
.demo-banner { margin: 0; padding: 8px 16px; background: #FEF3C7; color: #78350F; font-size: 13px; font-weight: 600;
  text-align: center; border-bottom: 1px solid #FCD34D; }

/* The error pages (app/saas/errors.py). */
.error-code { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--slate); font-size: 13px;
  font-weight: 600; }
.error-code .icon { width: 18px; height: 18px; color: var(--red); }
