@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

:root {
  --navy: #172126;
  --navy-2: #2c3d46;
  --ink: #172126;
  --muted: #5e7078;
  --subtle: #7f8d93;
  --cloud: #e7ecee;
  --surface: #ffffff;
  --border: #cbd5d9;
  --border-strong: #a9b5ba;
  --primary: #3f667a;
  --primary-dark: #2d5265;
  --primary-soft: #dce6e9;
  --teal: #176b59;
  --teal-soft: #e1f2ed;
  --amber: #8a6417;
  --amber-soft: #f8f0d8;
  --red: #a63d48;
  --red-soft: #f7e5e8;
  --shadow: 0 1px 2px rgb(23 33 38 / 8%);
  --radius: 5px;
  --font: Archivo, Arial, sans-serif;
  --mono: "Geist Mono", Consolas, monospace;
  --topbar: #ffffff;
  --input: #ffffff;
  --quiet: #e7ecee;
  --table-head: #f1f5f5;
  --row-hover: #f4f7f7;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --navy: #0e1519;
  --navy-2: #172126;
  --ink: #edf2f3;
  --muted: #acb9bd;
  --subtle: #84959b;
  --cloud: #11191e;
  --surface: #1b272e;
  --border: #34444c;
  --border-strong: #50636b;
  --primary: #52788a;
  --primary-dark: #63899a;
  --primary-soft: #263b44;
  --teal: #66b9a7;
  --teal-soft: #173d35;
  --amber: #d3ad5b;
  --amber-soft: #44391e;
  --red: #e07c87;
  --red-soft: #49262c;
  --shadow: 0 1px 2px rgb(0 0 0 / 25%);
  --topbar: #11191e;
  --input: #141f25;
  --quiet: #26343b;
  --table-head: #172229;
  --row-hover: #223139;
}
body { margin: 0; color: var(--ink); background: var(--cloud); font: 15px/1.5 var(--font); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid rgb(63 102 122 / 38%); outline-offset: 2px; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: white; background: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: 224px; flex-direction: column; color: #d9e2ec; background: var(--navy); }
.brand { display: flex; min-height: 72px; align-items: center; gap: 11px; padding: 0 20px; color: white; text-decoration: none; }
.brand__mark { display: block; width: 34px; height: 34px; flex: 0 0 auto; overflow: hidden; background: url("./assets/fixed-joint-mark-reversed.svg") center / contain no-repeat; border: 0; border-radius: 0; font-size: 0; }
.brand__name { font-size: 19px; font-weight: 600; letter-spacing: -.035em; }
.workspace-label { margin: 8px 12px 16px; padding: 10px 12px; color: #bfcadd; border: 1px solid rgb(255 255 255 / 12%); border-radius: 9px; font-size: 13px; }
.nav-label { padding: 12px 20px 6px; color: #8292aa; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; padding: 0 10px; }
.nav a { display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 0 12px; color: #c8d2df; border-radius: 9px; text-decoration: none; }
.nav a:hover { color: white; background: rgb(255 255 255 / 7%); }
.nav a[aria-current="page"] { color: white; background: rgb(63 102 122 / 42%); box-shadow: inset 3px 0 #8eabb7; }
.nav__icon { width: 19px; color: #aebbd0; text-align: center; }
.sidebar__foot { margin-top: auto; padding: 18px 20px; color: #94a4b9; border-top: 1px solid rgb(255 255 255 / 10%); font-size: 12px; }

.shell { min-width: 0; padding-left: 224px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; min-height: 64px; align-items: center; gap: 16px; padding: 10px 24px; background: var(--topbar); border-bottom: 1px solid var(--border); }
.menu-button { display: none; width: 44px; height: 44px; color: var(--ink); border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.search { position: relative; width: min(520px, 48vw); }
.search input { width: 100%; min-height: 42px; padding: 0 16px 0 40px; color: var(--ink); background: var(--cloud); border: 1px solid var(--border); border-radius: 9px; }
.search span { position: absolute; top: 10px; left: 14px; color: var(--muted); }
.topbar__spacer { flex: 1; }
.role-chip, .avatar { display: inline-flex; align-items: center; justify-content: center; }
.role-chip { min-height: 38px; padding: 0 12px; color: var(--ink); background: var(--quiet); border: 1px solid var(--border); border-radius: 9px; font-size: 13px; font-weight: 650; }
.avatar { width: 36px; height: 36px; color: white; background: var(--primary); border-radius: 50%; font-size: 12px; font-weight: 800; }
.theme-button { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.theme-button:hover { background: var(--quiet); }

.main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px 28px 64px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 5px; color: var(--primary); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 3vw, 31px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: 18px; line-height: 1.3; letter-spacing: -.02em; }
h3 { margin-bottom: 4px; font-size: 15px; }
.lede, .support { color: var(--muted); }
.lede { margin-bottom: 0; }
.support { margin-bottom: 0; font-size: 13px; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.section { padding: 20px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.divider { height: 1px; margin: 18px 0; background: var(--border); }

.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; color: white; background: var(--primary); border: 1px solid var(--primary); border-radius: 9px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button--secondary { color: var(--ink); background: var(--surface); border-color: var(--border-strong); }
.button--secondary:hover { background: var(--cloud); border-color: var(--border-strong); }
.button--quiet { color: var(--primary); background: transparent; border-color: transparent; }
.button--quiet:hover { background: var(--primary-soft); border-color: transparent; }
.button--danger { color: var(--red); background: var(--surface); border-color: #efc3c7; }
.button:disabled { color: #8b95a5; background: #e8edf1; border-color: #e0e6eb; cursor: not-allowed; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.badge { display: inline-flex; min-height: 26px; align-items: center; gap: 6px; padding: 3px 9px; color: #52646d; background: #e7ecee; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge--primary { color: var(--primary-dark); background: var(--primary-soft); }
.badge--verified { color: var(--teal); background: var(--teal-soft); }
.badge--warning { color: var(--amber); background: var(--amber-soft); }
.badge--blocked { color: var(--red); background: var(--red-soft); }
.status-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric { padding: 16px; }
.metric__label { color: var(--muted); font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.metric__value { margin: 8px 0 2px; font-size: 24px; font-weight: 780; letter-spacing: -.035em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.list { display: grid; gap: 10px; }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.step { position: relative; padding-top: 16px; color: var(--muted); font-size: 12px; font-weight: 650; }
.step::before { position: absolute; top: 0; right: 4px; left: 0; height: 4px; content: ""; background: #dfe5ea; border-radius: 4px; }
.step.is-done { color: var(--teal); }
.step.is-done::before { background: var(--teal); }
.step.is-current { color: var(--primary); }
.step.is-current::before { background: var(--primary); }

.evidence-row, .activity-row, .source-card { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.evidence-row:first-child, .activity-row:first-child { border-top: 0; }
.source-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--quiet); border-radius: 10px; font-size: 12px; font-weight: 800; }
.row-main { min-width: 0; flex: 1; }
.row-main strong { display: block; }
.row-meta { color: var(--muted); font-size: 12px; }
.row-action { flex: 0 0 auto; }

.request-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; background: var(--table-head); border: 1px solid var(--border); border-radius: 10px; }
.field-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; }
.field-value { font-weight: 700; }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; color: var(--primary-dark); background: var(--primary-soft); border: 1px solid #bdd0d8; border-radius: 9px; }
.notice--warning { color: #6e4b12; background: var(--amber-soft); border-color: #f1d99e; }
.notice--danger { color: #7d2731; background: var(--red-soft); border-color: #efc6ca; }
.notice--success { color: #105f5c; background: var(--teal-soft); border-color: #bde5df; }

.opportunity-layout { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(0, 1.55fr); gap: 18px; }
.opportunity-layout.detail-only { grid-template-columns: minmax(0, 1fr); }
.opportunity-layout.detail-only > .opportunity-list { display: none; }
.opportunity-list { overflow: hidden; }
.opportunity-item { display: block; width: 100%; padding: 16px; color: var(--ink); text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.opportunity-item:last-child { border-bottom: 0; }
.opportunity-item:hover { background: var(--table-head); }
.opportunity-item.is-selected { background: var(--primary-soft); box-shadow: inset 3px 0 var(--primary); }
.opportunity-item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.amount { margin: 0 0 4px; font-size: 21px; font-weight: 780; letter-spacing: -.025em; }
.detail-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.anonymized { display: inline-flex; align-items: center; gap: 7px; color: #526071; font-size: 13px; }

.tab-list { display: flex; gap: 4px; margin: 18px 0; padding: 4px; overflow-x: auto; background: var(--quiet); border-radius: 9px; }
.tab { min-height: 38px; padding: 0 14px; white-space: nowrap; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; font-weight: 650; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--border); box-shadow: 0 1px 2px rgb(20 37 61 / 8%); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.input { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); background: var(--input); border: 1px solid var(--border-strong); border-radius: 8px; }
textarea.input { min-height: 80px; resize: vertical; }
.input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgb(184 59 72 / 10%); }
.error { color: var(--red); font-size: 12px; }

.offer-card { padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.offer-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(63 102 122 / 14%); }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.offer-terms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }

.timeline { position: relative; display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding-bottom: 20px; }
.timeline-item::before { position: absolute; top: 18px; bottom: 0; left: 7px; width: 2px; content: ""; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 16px; height: 16px; margin-top: 3px; background: var(--surface); border: 4px solid var(--teal); border-radius: 50%; z-index: 1; }
.timeline-item.is-warning .timeline-dot { border-color: var(--amber); }
.timeline-item time { color: var(--muted); font-size: 12px; }
.fee-line { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fee-line:last-child { border: 0; }
.fee-line--total { font-size: 17px; font-weight: 780; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); background: var(--table-head); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
td { font-size: 13px; }
tbody tr:hover { background: var(--row-hover); }
.link-button { padding: 0; color: var(--primary); background: transparent; border: 0; font-weight: 700; cursor: pointer; }

.dialog-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; padding: 18px; place-items: center; background: rgb(11 23 39 / 60%); }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 22px; background: var(--surface); border-radius: 4px; box-shadow: 0 8px 24px rgb(23 33 38 / 24%); }
.dialog-head { display: flex; justify-content: space-between; gap: 16px; }
.icon-button { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.check-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 9px; }
.check-list li::before { color: var(--teal); content: "✓"; font-weight: 900; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgb(11 23 39 / 38%); }
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(460px, 100%); padding: 24px; overflow-y: auto; background: var(--surface); box-shadow: -15px 0 45px rgb(11 23 39 / 18%); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; padding: 14px; color: white; background: var(--navy); border-radius: 4px; box-shadow: 0 4px 12px rgb(23 33 38 / 20%); }

.workflow-page { min-height: 100vh; padding: 42px 24px; background: var(--navy); }
.workflow-wrap { width: min(1100px, 100%); margin: 0 auto; }
.workflow-brand { margin-bottom: 48px; color: white; }
.workflow-brand .brand__mark { display: inline-grid; margin-right: 10px; vertical-align: middle; }
.workflow-intro { max-width: 720px; margin-bottom: 30px; color: white; }
.workflow-intro .eyebrow { color: #9eb6c1; }
.workflow-intro h1 { font-size: clamp(32px, 5vw, 48px); }
.workflow-intro p { color: #b8c5d7; font-size: 17px; }
.workflow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.workflow-card { display: flex; min-height: 230px; flex-direction: column; padding: 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.workflow-card__number { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.workflow-card h2 { margin-top: 28px; font-size: 22px; }
.workflow-card .button { align-self: flex-start; margin-top: auto; }
.workflow-theme { position: absolute; top: 34px; right: 34px; }

.browse-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.browse-tabs { display: flex; gap: 4px; padding: 4px; overflow-x: auto; background: var(--quiet); border-radius: 9px; scrollbar-width: thin; }
.browse-tab { min-height: 42px; padding: 0 16px; white-space: nowrap; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; font-weight: 650; cursor: pointer; }
.browse-tab:hover { color: var(--ink); background: var(--table-head); }
.browse-tab[aria-selected="true"] { color: var(--ink); background: var(--surface); border-color: var(--border); box-shadow: 0 1px 2px rgb(20 37 61 / 8%); }
.browse-tab span { display: inline-flex; min-width: 23px; height: 21px; align-items: center; justify-content: center; margin-left: 7px; padding: 0 6px; background: var(--quiet); border-radius: 999px; font-size: 11px; }
.browse-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(210px, 360px) minmax(150px, 200px); gap: 12px; align-items: center; margin: 18px 0; }
.browse-toolbar .search { width: auto; }
.applicant-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.applicant-request-card { display: flex; min-width: 0; flex-direction: column; padding: 20px; border-left: 4px solid var(--border-strong); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.applicant-request-card:hover { border-left-color: var(--primary); box-shadow: 0 3px 8px rgb(23 33 38 / 12%); transform: translateY(-1px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-amount { margin: 18px 0 3px; font-size: 23px; letter-spacing: -.03em; }
.card-title { min-height: 45px; margin: 0 0 2px; font-weight: 700; }
.card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 18px 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.card-metrics > div { min-width: 0; padding: 12px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.card-metrics strong { display: block; overflow-wrap: anywhere; font-size: 13px; }
.applicant-request-card > .button { width: 100%; margin-top: auto; }

.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 210px)); gap: 12px; margin-bottom: 16px; }
.toolbar .search { width: auto; }
.request-list { overflow: hidden; }
.request-row { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(120px, .65fr)) auto; gap: 18px; align-items: center; padding: 18px 20px; color: var(--ink); border-top: 1px solid var(--border); text-decoration: none; }
.request-row:first-child { border-top: 0; }
.request-row:hover { background: var(--row-hover); }
.request-row h2 { margin-bottom: 3px; }
.request-meta { display: grid; gap: 3px; }
.request-meta strong { white-space: nowrap; }
.empty-state { padding: 52px 24px; text-align: center; }
.empty-state h2 { font-size: 22px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 18px; align-items: start; }
.form-section { padding: 22px; }
.form-section + .form-section { margin-top: 16px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice, .check-option { position: relative; display: flex; gap: 11px; padding: 14px; color: var(--ink); background: var(--input); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.choice { align-items: flex-start; }
.choice input, .check-option input { margin-top: 3px; accent-color: var(--primary); }
.choice:has(input:checked), .check-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgb(63 102 122 / 15%); }
.choice strong, .check-option strong { display: block; }
.choice span span, .check-option span span { color: var(--muted); font-size: 12px; }
.upload-zone { padding: 22px; text-align: center; background: var(--table-head); border: 1px dashed var(--border-strong); border-radius: 9px; }
.form-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding: 14px 0; background: var(--cloud); }
.sticky-summary { position: sticky; top: 84px; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.summary-line:last-child { border: 0; }
.success-panel { padding: 36px; text-align: center; }
.success-mark { display: grid; width: 52px; height: 52px; margin: 0 auto 16px; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 22px; }

html[data-theme="dark"] .badge { color: #c5d0d4; background: var(--quiet); }
html[data-theme="dark"] .badge--primary { color: #b6ccd6; background: var(--primary-soft); }
html[data-theme="dark"] .badge--verified { color: #8edbd3; background: var(--teal-soft); }
html[data-theme="dark"] .badge--warning { color: #f0cb80; background: var(--amber-soft); }
html[data-theme="dark"] .badge--blocked { color: #f3a1aa; background: var(--red-soft); }
html[data-theme="dark"] .notice { color: #c3d6df; border-color: #3f667a; }
html[data-theme="dark"] .notice--warning { color: #f0d18f; border-color: #635128; }
html[data-theme="dark"] .notice--danger { color: #f5aab2; border-color: #6a343d; }
html[data-theme="dark"] .notice--success { color: #98e0d8; border-color: #245d59; }
html[data-theme="dark"] .anonymized { color: var(--muted); }
html[data-theme="dark"] .workflow-intro .eyebrow { color: #9eb6c1; }

.nav-label, th, .timeline-item time, .row-meta { font-family: var(--mono); }
.button, .menu-button, .theme-button, .role-chip, .workspace-label, .nav a, .search input, .input, .choice, .check-option, .upload-zone, .tab-list, .browse-tabs, .browse-tab, .tab, .notice, .dialog, .icon-button, .offer-card, .request-summary, .source-icon, .toast { border-radius: 4px; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-main { grid-template-columns: 1fr; }
  .applicant-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sidebar { width: min(290px, 84vw); transform: translateX(-105%); transition: transform 180ms ease; box-shadow: 12px 0 36px rgb(11 23 39 / 24%); }
  body.nav-open .sidebar { transform: none; }
  .shell { padding-left: 0; }
  .menu-button { display: block; }
  .search { width: auto; flex: 1; }
  .search input { padding-left: 12px; }
  .search span { display: none; }
  .role-chip { display: none; }
  .main { padding: 22px 16px 48px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head > .button { align-self: flex-start; }
  .opportunity-layout, .grid-2 { grid-template-columns: 1fr; }
  .workflow-grid { grid-template-columns: 1fr; }
  .browse-stats { grid-template-columns: 1fr; }
  .browse-toolbar { grid-template-columns: 1fr 1fr; }
  .browse-toolbar > :first-child { grid-column: 1 / -1; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar .search { grid-column: 1 / -1; }
  .request-row { grid-template-columns: 1fr 1fr; }
  .request-row > :first-child { grid-column: 1 / -1; }
  .request-row > :last-child { justify-self: end; }
  .form-layout { grid-template-columns: 1fr; }
  .sticky-summary { position: static; }
}

@media (max-width: 560px) {
  .topbar { padding: 8px 12px; }
  .avatar { display: none; }
  .metric-grid, .request-summary, .form-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }
  .stepper { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
  .section { padding: 16px; }
  .button-row .button { width: 100%; }
  .offer-terms { grid-template-columns: 1fr; }
  .workflow-page { padding: 26px 16px; }
  .applicant-card-grid { grid-template-columns: 1fr; }
  .browse-toolbar { grid-template-columns: 1fr; }
  .browse-toolbar > :first-child { grid-column: auto; }
  .workflow-theme { top: 18px; right: 16px; }
  .request-row { grid-template-columns: 1fr; gap: 10px; }
  .request-row > :first-child { grid-column: auto; }
  .request-row > :last-child { justify-self: start; }
  .choice-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar .search { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
}
