:root {
  color-scheme: light;
  --bg: #f4f6f7;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --ink: #17232b;
  --muted: #5d6b74;
  --line: #d8e0e4;
  --line-strong: #b8c4ca;
  --accent: #1f3f8f;
  --accent-dark: #17336f;
  --topbar: #ffffff;
  --warn: #916313;
  --danger: #a43d35;
  --shadow: 0 1px 2px rgba(23, 35, 43, .06), 0 8px 24px rgba(23, 35, 43, .04);
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Segoe UI", Arial, sans-serif;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  transform: translateY(calc(-100% - 20px));
  padding: 9px 13px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent-dark);
  box-shadow: var(--shadow);
  font-weight: 750;
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 9px 28px;
  background: var(--topbar);
  border-bottom: 3px solid #fbaf02;
  box-shadow: 0 2px 12px rgba(23, 35, 43, .06);
  color: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-logo { width: 84px; height: 52px; object-fit: contain; }

.brand-copy { display: grid; line-height: 1.15; }
.brand-copy { padding-left: 12px; border-left: 1px solid var(--line); }
.brand-copy strong { color: #19355f; font-size: 16px; }
.brand-copy small { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #6b7780; font-size: 11px; font-weight: 600; }
.brand-copy small img { width: 16px; height: 16px; object-fit: contain; }

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.topbar nav > a,
.nav-logout button {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #263c4b;
  font-weight: 600;
  cursor: pointer;
}

.topbar nav > a:hover,
.nav-logout button:hover,
.topbar nav > a.active {
  background: #edf2fb;
  color: var(--accent-dark);
  text-decoration: none;
}

.topbar nav > a.active { border-color: #c5d1ed; }

.topbar nav .nav-login {
  margin-left: 6px;
  border-color: #8ea2d1;
  background: #f7f9fe;
}

.nav-user {
  max-width: 180px;
  margin-left: 8px;
  overflow: hidden;
  color: #697780;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-logout { margin: 0; }

.page {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px;
}

h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: 0; }
h1 { margin: 0 0 6px; font-size: 30px; font-weight: 750; }
h2 { margin: 28px 0 10px; font-size: 18px; }
p { margin: 0; color: var(--muted); }

.eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.toolbar > div:first-child { max-width: 780px; }

.hero-strip {
  margin-bottom: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-top-width: 4px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(23, 35, 43, .04);
  color: var(--ink);
}

.stat-pill:hover { border-color: var(--line-strong); text-decoration: none; }
.stat-pill span { font-weight: 700; }
.stat-pill strong { font-size: 25px; line-height: 1; }
.stat-pill.target { border-top-color: #2b8a6e; }
.stat-pill.consider { border-top-color: #d2a22e; }
.stat-pill.outside { border-top-color: #c65b4d; }
.stat-pill.subsection { border-top-color: #557c9f; }
.stat-pill.active { outline: 3px solid rgba(31, 63, 143, .14); border-right-color: var(--accent); border-bottom-color: var(--accent); border-left-color: var(--accent); }

.filters,
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.broker-search { grid-template-columns: minmax(250px, 1.7fr) repeat(4, minmax(140px, 1fr)); }
.class-filters { grid-template-columns: minmax(280px, 1.7fr) repeat(2, minmax(170px, 1fr)) auto auto; }
.wide-search { min-width: 260px; }

.class-hero { align-items: flex-end; }
.class-search {
  max-width: 1040px;
  margin: 8px 0 28px;
  padding: 20px;
  border-left: 4px solid #fbaf02;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 20px; padding: 1px 6px; border-radius: 10px; background: #f4b41f; color: #17232b; font-size: 10px; font-weight: 800; line-height: 1; }
.smart-search-fields { display: grid; grid-template-columns: minmax(210px, 1.3fr) minmax(180px, 1fr) minmax(150px, .7fr) auto auto; gap: 10px; align-items: end; }
.smart-search-fields input { min-height: 46px; font-size: 16px; }
.smart-search-fields .button, .smart-search-fields button { min-height: 46px; }
.state-feedback { min-height: 20px; margin: 8px 0 -4px; color: #355c72; font-size: 12px; font-weight: 700; }
.state-feedback.error { color: var(--danger); }
.directory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.directory-heading h2 { margin: 0; }
.directory-summary { display: flex; align-items: center; gap: 10px; }
.selected-state-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; border: 1px solid #bfd0dd; border-radius: 6px; background: #edf4f7; color: #294e63; font-size: 12px; font-weight: 750; }
.selected-filter-chip { display: inline-flex; align-items: center; min-height: 27px; padding: 3px 9px; border: 1px solid #e2c773; border-radius: 6px; background: #fff8e3; color: #5f4b10; font-size: 12px; font-weight: 750; }
.class-context-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.class-state-chip,
.quality-chip { display: inline-flex; align-items: center; width: fit-content; max-width: 100%; min-height: 25px; padding: 3px 8px; border: 1px solid #bfd0dd; border-radius: 5px; background: #edf4f7; color: #294e63; font-size: 11px; font-weight: 750; line-height: 1.3; }
.quality-chip { border-color: var(--line-strong); background: var(--panel-soft); color: #44535c; }
.class-directory { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); }
.class-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.class-file[hidden] { display: none; }
.class-file:hover { background: #f7fafc; color: var(--accent-dark); text-decoration: none; }
.class-file > span:first-child { min-width: 0; }
.class-file > span:first-child { display: grid; gap: 2px; }
.class-file strong { overflow-wrap: anywhere; font-size: 15px; }
.class-file small { color: var(--muted); font-size: 11px; font-weight: 600; }
.class-file-arrow { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border: 1px solid #c6d2e8; border-radius: 50%; background: #f3f6fc; color: var(--accent-dark); font-size: 19px; font-weight: 800; line-height: 1; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.class-file:hover .class-file-arrow { transform: translateX(2px); border-color: var(--accent); background: #e7edfa; }
.directory-empty { padding: 24px 0; }

label {
  display: grid;
  gap: 6px;
  color: #31414a;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: var(--ink);
}

input::placeholder, textarea::placeholder { color: #87939a; }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 63, 143, .14);
}

textarea { min-height: 108px; resize: vertical; }

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

button:hover,
.button:hover { border-color: #8e9ca3; background: var(--panel-soft); text-decoration: none; }
.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.primary:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.danger:hover { background: #87312b; }
.compact { min-height: 32px; padding: 5px 10px; font-size: 12px; }

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
th {
  background: #edf2f4;
  color: #43515a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfb; }
.records-table { min-width: 820px; }
.records-table th:first-child, .records-table td:first-child { width: 30%; }
.records-table th:nth-child(2), .records-table td:nth-child(2) { width: 25%; }
.classes-table { min-width: 680px; }
.classes-table th:first-child, .classes-table td:first-child { width: 34%; }
.contacts-table { min-width: 1080px; }

.sub { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.carrier-link, .class-link { color: var(--accent-dark); font-size: 15px; font-weight: 750; }
.class-link { font-size: 16px; }
.notes-cell { max-width: 420px; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
}

.target { background: #dcefe7; color: #145844; }
.consider { background: #fff0bd; color: #6f5008; }
.outside { background: #f5d9d5; color: #812d26; }
.subsection { background: #dfe9f2; color: #2c4f6b; }
.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: #44535c;
  font-size: 12px;
  font-weight: 750;
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 14px;
}

.review-stat,
.review-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #40505a;
  font-size: 12px;
  font-weight: 700;
}

.review-stat { min-height: 34px; padding: 6px 11px; }
.review-stat:hover, .review-stat.active { border-color: var(--accent); background: #f0f3fb; text-decoration: none; }
.review-stat strong { color: var(--ink); font-size: 15px; }
.review-chip { min-height: 26px; padding: 4px 9px; white-space: nowrap; }
.review-chip.current { border-color: #a9d2c4; background: #eef8f4; color: #24624f; }
.review-chip.needs-review { border-color: #e4c88c; background: #fff8e7; color: #76520b; }
.review-chip.neutral { background: #f2f4f5; color: #68757c; }
.review-dot { width: 7px; height: 7px; border-radius: 50%; background: #809098; }
.current .review-dot { background: #2b8a6e; }
.needs-review .review-dot { background: #c18b1d; }
.result-count { margin: 0 0 9px; font-size: 13px; }

.stale { color: var(--warn); font-weight: 700; }
.ok { color: #4e6658; }
.actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.row-actions { justify-content: flex-end; }
.inline { display: inline; }

.icon-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.icon-button:hover { border-color: var(--accent); background: #f0f3fb; text-decoration: none; }

.record-header { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.record-overview { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; }
.record-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.fact { display: grid; gap: 6px; min-height: 82px; padding: 15px 16px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact > span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.fact > strong { align-self: end; font-size: 15px; }
.fact > small { color: var(--muted); font-size: 11px; }

.guidance-panel,
.contact-panel {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.guidance-panel { border-left: 4px solid #d3a84f; }
.guidance-panel h2, .contact-panel h2 { margin: 0 0 12px; font-size: 20px; }
.guidance-copy { color: #2d3b43; font-size: 16px; line-height: 1.65; white-space: pre-wrap; }
.legacy-directory { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.legacy-directory > summary { color: var(--accent-dark); font-size: 13px; font-weight: 750; cursor: pointer; }
.legacy-directory pre { max-height: 260px; margin: 10px 0 0; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fa; color: #34434b; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; }
.contact-panel p + p { margin-top: 5px; }
.text-link { display: inline-block; margin-top: 18px; font-weight: 700; }
.compact-link { margin-top: 0; font-size: 12px; }

.detail-support {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.detail-support h2 { margin: 0 0 8px; }

.detail-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

dt, dd { margin: 0; padding: 12px 15px; border-bottom: 1px solid var(--line); }
dt { background: #edf2f4; color: #3e4c54; font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.wide { grid-column: 1 / -1; }

.advanced-fields {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.advanced-fields summary, .export-tools summary { color: #33444d; font-weight: 700; cursor: pointer; }
.nested-form { grid-template-columns: repeat(2, minmax(180px, 1fr)); margin: 0; padding: 14px 0 0; border: 0; background: transparent; box-shadow: none; }

.export-tools {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.export-tools summary { text-align: center; }
.export-tools div { display: flex; gap: 8px; margin-top: 10px; }
.export-tools .button { flex: 1; }
.check { align-self: center; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.stacked-actions { margin-top: 22px; flex-direction: column; }

.login-panel {
  width: min(100%, 470px);
  margin: 7vh auto 0;
  padding: 30px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel h1 { font-size: 26px; }
.login-form { display: grid; gap: 15px; margin-top: 24px; }
.login-help-link { width: fit-content; justify-self: center; font-size: 13px; }
.recovery-message { display: grid; gap: 4px; margin: 20px 0; padding: 14px; border: 1px solid #9fcdbc; border-radius: 6px; background: #eff9f5; color: #245f4c; }
.recovery-message p { color: inherit; }
.account-panel { margin-top: 5vh; }
.form-error { margin: 16px 0; color: var(--danger); font-weight: 700; }
.user-form { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.center-cell { text-align: center; }
.center-cell input { width: auto; min-height: auto; }

.class-health,
.access-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.health-stat,
.access-summary > div {
  display: grid;
  gap: 1px;
  min-height: 70px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  color: var(--ink);
}
.health-stat:last-child, .access-summary > div:last-child { border-right: 0; }
.health-stat:hover, .health-stat.active { background: #f0f7f7; text-decoration: none; }
.health-stat.gap strong { color: var(--danger); }
.health-stat.review strong { color: var(--warn); }
.health-stat strong, .access-summary strong { font-size: 23px; line-height: 1.1; }
.health-stat span, .access-summary span { color: var(--muted); font-size: 12px; font-weight: 650; }

.appetite-mix { display: flex; align-items: center; gap: 5px; }
.mix-count { display: inline-flex; align-items: center; gap: 4px; min-width: 58px; height: 28px; padding: 3px 7px; border-radius: 6px; }
.mix-count strong { font-size: 13px; }
.mix-count small { font-size: 9px; font-weight: 800; }

.workspace-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(23, 35, 43, .04);
}

.class-header { margin-bottom: 0; }
.class-tabs { display: flex; align-items: center; gap: 2px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.class-tabs a { position: relative; min-height: 43px; padding: 11px 15px 10px; color: #52616a; font-weight: 700; }
.class-tabs a:hover { background: #f8fafb; text-decoration: none; }
.class-tabs a.active { color: var(--accent-dark); }
.class-tabs a.active::after { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 3px; background: #fbaf02; content: ""; }
.class-tabs .history-tab { margin-left: auto; color: #738087; font-size: 12px; }

.state-context-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: -7px 0 22px;
  padding: 15px 17px;
  border: 1px solid #c9d9df;
  border-left: 4px solid #557c9f;
  background: #f3f7f8;
}
.state-context-banner.has-guidance { border-left-color: #1f6a83; background: #eef6f8; }
.state-context-copy { min-width: 0; }
.state-context-copy .eyebrow { margin-bottom: 2px; }
.state-context-copy h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 19px; }
.state-context-copy h2 span { display: inline-grid; min-width: 32px; min-height: 25px; place-items: center; padding: 2px 6px; border-radius: 5px; background: #294e63; color: #fff; font-size: 11px; }
.state-context-copy p { max-width: 720px; margin: 0; color: #3d505a; }
.state-context-copy .text-link { display: inline-block; margin-top: 5px; }
.state-switch { display: grid; flex: 0 0 auto; grid-template-columns: minmax(150px, 190px) auto; gap: 8px; align-items: end; }
.state-switch .text-link { grid-column: 1 / -1; justify-self: end; }

.class-view-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.class-view-heading h2 { margin: 0 0 3px; font-size: 20px; }
.quiet-heading { margin-top: 2px; }
.popover-action { position: relative; flex: 0 0 auto; }
.popover-action > summary { list-style: none; cursor: pointer; }
.popover-action > summary::-webkit-details-marker { display: none; }
.popover-panel { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(380px, calc(100vw - 36px)); padding: 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 16px 38px rgba(23, 35, 43, .16); }

.appetite-board { display: grid; gap: 24px; }
.appetite-group { min-width: 0; }
.appetite-heading { margin-bottom: 9px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.appetite-heading h2,
.appetite-heading h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: #35434b; font-size: 15px; }
.status-swatch { width: 10px; height: 10px; min-width: 10px; border-radius: 3px; }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }

.market-card { position: relative; display: grid; align-content: start; gap: 10px; min-width: 0; min-height: 154px; padding: 14px 15px 12px; border: 1px solid var(--line); border-left-width: 5px; border-radius: 7px; background: #fff; box-shadow: 0 1px 2px rgba(23, 35, 43, .04); }
.market-card.compact-card { min-height: 104px; }
.market-card:hover { border-color: #b8c9ce; box-shadow: 0 5px 16px rgba(23, 35, 43, .07); }
.market-card.target-card { border-left-color: #2b8a6e; }
.market-card.consider-card { border-left-color: #d2a22e; }
.market-card.outside-card { border-left-color: #c65b4d; }
.market-card.subsection-card { border-left-color: #557c9f; }
.market-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.market-card > header > div:first-child { min-width: 0; padding-right: 40px; }
.market-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px solid #edf1f3; }
.market-review { margin: 0; }
.market-guidance { min-width: 0; }
.market-guidance p { color: #34434b; line-height: 1.55; white-space: pre-wrap; }
.guidance-more > summary { display: grid; gap: 7px; list-style: none; color: #34434b; cursor: pointer; }
.guidance-more > summary::-webkit-details-marker { display: none; }
.guidance-more > summary strong { width: fit-content; color: var(--accent-dark); font-size: 12px; }
.guidance-more[open] > summary span { display: none; }
.guidance-more[open] > summary strong::before { content: "Less guidance"; }
.guidance-more[open] > summary strong { font-size: 0; }
.guidance-more[open] > summary strong::before { font-size: 12px; }
.guidance-more > p { margin-top: 2px; }
.source-presence { color: #355c72; font-size: 12px; font-weight: 700; }
.scope-chip { display: block; width: fit-content; max-width: 100%; margin-top: 4px; overflow: hidden; color: #5b6870; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.state-chip { display: block; width: fit-content; max-width: 100%; margin-top: 6px; padding: 3px 7px; border: 1px solid; border-radius: 5px; font-size: 10px; font-weight: 800; line-height: 1.35; }
.state-chip.guidance { border-color: #b8ceda; background: #edf5f8; color: #2b5870; }
.state-chip.restriction { border-color: #e0b6b1; background: #faeeec; color: #8d332c; }
.state-chip.hard-stop { border-color: #dfaaa5; background: #fff4f2; color: #7a2e28; }
.card-links { display: flex; align-items: center; gap: 12px; }

.quick-edit { position: static; }
.quick-edit > summary { position: absolute; top: 12px; right: 50px; list-style: none; }
.quick-edit > summary::-webkit-details-marker { display: none; }
.quick-edit[open] > summary { border-color: var(--accent); background: #f0f3fb; }
.quick-edit[open] + .market-note { display: none; }
.quick-edit-panel {
  width: 100%;
  margin-top: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}
.quick-edit-actions { display: flex; gap: 8px; }
.quick-edit-actions > * { flex: 1; }

.notice { margin: 0 0 16px; padding: 11px 13px; border: 1px solid; border-radius: 6px; font-weight: 650; }
.error-notice { border-color: #dfaaa5; background: #fff4f2; color: #7a2e28; }
.success-notice { border-color: #9fcdbc; background: #eff9f5; color: #245f4c; }
.source-add { padding-top: 3px; border-top: 1px solid #edf1f3; }
.source-add > summary, .source-paste > summary, .source-body > summary {
  width: fit-content;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.source-add[open] > summary { margin-bottom: 9px; }
.source-form { display: grid; gap: 10px; }
.source-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 14px;
  border: 2px dashed #aebcc3;
  border-radius: 6px;
  background: #fafcfd;
  text-align: center;
  cursor: pointer;
}
.source-drop:hover, .source-drop.dragging { border-color: var(--accent); background: #f1f5fc; }
.source-drop input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }
.source-drop span { display: grid; gap: 2px; }
.source-drop small { color: var(--muted); font-weight: 500; }
.source-paste { padding: 8px 0; }
.source-paste label { margin-top: 8px; }
.source-meta-fields { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 10px; }
.source-meta-fields label { font-size: 12px; }
.source-add-wide { max-width: 920px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.source-add-wide > summary { color: var(--ink); font-size: 14px; }
.source-list { display: grid; gap: 10px; margin-top: 14px; }
.source-item { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid #557c9f; border-radius: 6px; background: #fff; }
.source-item.highlighted-source { border-color: #6f91c8; box-shadow: 0 0 0 3px rgba(48, 83, 154, .09); }
.source-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.source-item-heading > div:first-child { display: grid; gap: 3px; }
.source-item-heading span, .source-item > small { color: var(--muted); font-size: 12px; }
.source-body pre { max-height: 340px; margin: 9px 0 0; overflow: auto; padding: 12px; border: 1px solid var(--line); background: #f7f9fa; color: #2d3b43; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; }
.source-warning { color: var(--warn); font-size: 12px; }
.source-suggestion { display: grid; gap: 10px; padding: 13px; border: 1px solid #bfd0e8; border-radius: 6px; background: #f6f9fe; }
.source-suggestion-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.source-suggestion-heading h3 { margin: 1px 0 0; font-size: 15px; }
.suggestion-confidence { padding: 3px 7px; border: 1px solid #b9cae2; border-radius: 5px; color: #31558d; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.suggestion-reason { color: #465963; font-size: 12px; }
.suggestion-form { display: grid; gap: 10px; }
.suggestion-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.suggestion-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 58px; padding: 9px; border: 1px solid #d5e0ee; border-radius: 5px; background: #fff; cursor: pointer; }
.suggestion-option input { width: 16px; height: 16px; min-height: 0; margin-top: 2px; }
.suggestion-option span { display: grid; gap: 2px; min-width: 0; }
.suggestion-option small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.suggestion-option strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.4; }
.suggestion-option.guidance-option { grid-column: 1 / -1; }
.suggestion-actions { display: flex; gap: 8px; }
.source-suggestion-state { padding: 8px 10px; border-left: 3px solid #aebcc3; background: #f6f8f9; color: #52636c; font-size: 12px; }
.source-suggestion-state.applied { border-color: #5c9a83; background: #eff8f4; color: #245f4c; }
.source-empty { margin-top: 13px; }
.source-workspace { margin-top: 24px; }
.source-only-panel { display: grid; gap: 8px; margin: 0 0 18px; padding: 13px 15px; border: 1px solid #c9d9df; border-left: 4px solid #557c9f; background: #f3f7f8; }
.source-only-preview { max-height: 320px; overflow: auto; padding: 11px 12px; border-left: 3px solid var(--line-strong); background: var(--panel-soft); color: #34434b; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.compact-source-add { margin-top: 14px; padding-top: 12px; }
.danger-outline { border-color: #d3a49f; color: var(--danger); background: #fff; }
.danger-outline:hover { border-color: var(--danger); background: #fff4f2; }

.workspace-section { margin-top: 18px; padding: 18px; }
.compact-toolbar { margin-bottom: 12px; }
.compact-toolbar h2 { margin-top: 0; }
.note-list, .change-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.note-list li { display: grid; gap: 5px; padding: 11px 0 0; border-top: 1px solid var(--line); }
.note-meta { display: flex; align-items: center; gap: 8px; }
.note-list small, .change-list span { display: block; color: var(--muted); font-size: 12px; }
.table-note { max-width: 520px; }

.admin-create > summary { color: var(--ink); font-size: 17px; font-weight: 750; cursor: pointer; }
.side-form { display: grid; gap: 11px; margin-top: 12px; }
.side-form textarea { min-height: 82px; }
.contact-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.empty-note { color: var(--muted); font-style: italic; }

.admin-create { margin-bottom: 16px; padding: 15px 16px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.admin-create > .filters { margin: 12px -16px 0; border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
.users-table { min-width: 900px; }
.permission-chip { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #e8eef2; color: #344b59; font-size: 12px; font-weight: 750; }
.permission-chip.admin { background: #e6e2f3; color: #4e3e78; }
.access-menu { min-width: 92px; }
.access-menu > summary { list-style: none; }
.access-menu > summary::-webkit-details-marker { display: none; }
.access-menu-panel { width: 300px; margin-top: 8px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgba(23, 35, 43, .1); }
.access-menu-panel > form + form { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.access-menu-panel .danger-outline { width: 100%; border-color: #d3a49f; color: var(--danger); }
.access-menu-panel .activity-link { width: 100%; }
.user-link { color: var(--ink); }

.carrier-contact-directory,
.contact-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.carrier-contact-group,
.directory-contact-group { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(23, 35, 43, .04); }
.carrier-contact-group > header,
.directory-contact-group > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 62px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: #f5f8f9; }
.carrier-contact-group h3,
.directory-contact-group h2 { margin: 0; font-size: 16px; }
.carrier-contact-group header span { color: var(--muted); font-size: 11px; font-weight: 650; }
.directory-contact-group.unassigned { border-color: #dec78e; }
.person-list { display: grid; }
.person-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 13px 15px; border-bottom: 1px solid #e9eef0; }
.person-row:last-child { border-bottom: 0; }
.person-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ccd8dd; border-radius: 50%; background: #edf3f5; color: #34505e; font-size: 13px; font-weight: 800; }
.person-details { display: grid; gap: 2px; min-width: 0; }
.person-details > span, .person-details > small { color: var(--muted); font-size: 12px; }
.person-details > p { margin-top: 4px; font-size: 12px; }
.person-tools { display: flex; gap: 5px; }
.person-tools form { margin: 0; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 3px 12px; }
.contact-actions a { overflow-wrap: anywhere; font-size: 13px; }
.contact-search { width: min(100%, 560px); min-width: 0; margin-bottom: 14px; }
.contact-filter-empty { padding: 18px 0; color: var(--muted); font-style: italic; }
.carrier-name { min-width: 0; overflow-wrap: anywhere; font-weight: 750; }
.contact-empty { padding: 18px 15px; }
.record-contact-list { display: grid; gap: 9px; }
.record-contact-list > div { display: grid; gap: 2px; padding-top: 9px; border-top: 1px solid var(--line); }
.record-contact-list span, .record-contact-list a { font-size: 13px; }

.directory-search-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 10px; align-items: end; }
.carrier-search { max-width: 820px; }
.carrier-directory { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.carrier-file-heading { align-items: end; }
.carrier-state-filter { display: grid; grid-template-columns: minmax(150px, 190px) auto auto; gap: 8px; align-items: end; }
.carrier-appetite-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.carrier-appetite-row { display: grid; grid-template-columns: minmax(180px, .8fr) 150px minmax(220px, 1.5fr) auto; gap: 16px; align-items: center; min-height: 84px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.carrier-appetite-row:last-child { border-bottom: 0; }
.carrier-appetite-row:hover { background: #fafcfd; }
.carrier-appetite-class { display: grid; gap: 5px; min-width: 0; }
.carrier-appetite-class strong { overflow-wrap: anywhere; font-size: 15px; }
.carrier-appetite-row > div:nth-child(2) { display: grid; justify-items: start; gap: 5px; }
.state-row-note { color: #355c72; font-size: 10px; font-weight: 700; }
.carrier-guidance { display: -webkit-box; overflow: hidden; color: #34434b; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.carrier-row-tools { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.suggest-button { white-space: nowrap; }
.carrier-people-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.carrier-person-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 15px; border-bottom: 1px solid var(--line); }
.carrier-person-row:last-child { border-bottom: 0; }
.placement-groups { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; }
.placement-group { min-height: 250px; padding: 18px; border: 1px solid var(--line); border-top: 4px solid #24479b; border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.placement-group:nth-child(2) { border-top-color: #2b8a6e; }
.placement-group:nth-child(3) { border-top-color: #d2a22e; }
.placement-group > header { display: flex; justify-content: space-between; gap: 12px; }
.placement-group h3 { margin: 0; font-size: 17px; }
.coverage-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.coverage-chips span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-soft); color: #45545d; font-size: 10px; font-weight: 700; }
.commission-value { display: grid; gap: 2px; margin: 28px 0 12px; }
.commission-value strong { font-size: 24px; line-height: 1.1; }
.commission-value span { color: var(--muted); font-size: 12px; }
.commission-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.commission-details summary { color: var(--brand); cursor: pointer; font-size: 12px; font-weight: 750; }
.commission-source-copy { margin: 10px 0 8px; color: #34434b; font-size: 12px; line-height: 1.55; white-space: pre-line; }
.commission-details small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.commission-editor { width: 340px; }

.request-access-panel { width: min(100%, 520px); }
.request-access-panel > .button { width: 100%; margin-top: 12px; }
.request-comparison { display: grid; grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.5fr); gap: 22px; align-items: start; }
.request-current { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.request-current h2 { margin-top: 0; }
.request-facts { display: grid; gap: 14px; margin: 12px 0 0; }
.request-facts > div { display: grid; gap: 5px; padding-top: 12px; border-top: 1px solid var(--line); }
.request-facts dt, .request-facts dd { padding: 0; border: 0; background: transparent; }
.request-form { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.request-guidance-toggle { display: flex; align-items: center; }
.request-list { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.request-list-row { display: grid; grid-template-columns: minmax(180px, .8fr) auto minmax(220px, 1.4fr) auto; gap: 14px; align-items: center; min-height: 78px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.request-list-row:last-child { border-bottom: 0; }
.request-list-row > div:first-child { display: grid; gap: 2px; }
.request-list-row span, .request-list-row small { color: var(--muted); font-size: 11px; }
.request-row-meta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.request-status { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: 5px; background: #e9eef1; color: #40515a; font-size: 11px; font-weight: 800; text-transform: capitalize; }
.request-status.pending { background: #fff1c7; color: #765000; }
.request-status.approved { background: #dcefe7; color: #195c46; }
.request-status.rejected { background: #f3d9d6; color: #873027; }
.request-status.withdrawn { background: #e9eef1; color: #5b6870; }
.reviewer-note { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); }
.request-review-link { color: var(--ink); }
.request-review-link:hover { background: #fafcfd; text-decoration: none; }
.request-open-arrow { font-size: 22px !important; font-weight: 800; }
.request-review-meta { display: grid; grid-template-columns: 1.2fr .6fr .8fr; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.request-review-meta > div { display: grid; gap: 3px; padding: 13px 15px; border-right: 1px solid var(--line); }
.request-review-meta > div:last-child { border-right: 0; }
.request-review-meta span, .request-review-meta small { color: var(--muted); font-size: 11px; }
.request-reason { margin-bottom: 18px; padding: 15px 17px; border-left: 4px solid #fbaf02; background: var(--panel); }
.request-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.request-diff > section { min-height: 180px; padding: 18px; background: var(--panel); }
.request-diff h2 { margin: 0 0 12px; font-size: 18px; }
.request-source { display: grid; grid-template-columns: 1fr auto; gap: 16px; margin-top: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.request-source h2 { margin: 0 0 4px; }
.request-source details { grid-column: 1 / -1; }
.request-decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.request-decisions form { display: grid; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.contributor-table td:first-child small { display: block; color: var(--muted); }
.contributor-table form { display: flex; align-items: center; gap: 8px; }

.unassigned-contacts { margin-top: 22px; padding: 14px 16px; border: 1px solid #dec78e; border-radius: 8px; background: #fffbef; }
.unassigned-contacts > summary { color: #6f5008; font-weight: 750; cursor: pointer; }
.unassigned-contacts > p { margin-top: 6px; font-size: 12px; }
.unassigned-list { display: grid; gap: 8px; margin-top: 13px; }
.unassigned-list form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto; gap: 9px; align-items: center; padding-top: 8px; border-top: 1px solid #eadcb8; }

.notes-workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 16px; align-items: start; }
.class-note-panel,
.source-transcript,
.activity-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.class-note-panel { padding: 17px; }
.class-note-panel h3 { margin: 0 0 12px; font-size: 16px; }
.class-note-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.class-note-list li { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.class-note-list li:first-child { padding-top: 0; border-top: 0; }
.class-note-list li > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.class-note-list span { color: var(--muted); font-size: 12px; }
.class-note-list p { color: #34434b; white-space: pre-wrap; }
.note-inline-edit { width: 100%; }
.note-inline-edit > summary { width: fit-content; color: var(--accent-dark); font-size: 12px; font-weight: 700; cursor: pointer; }
.note-inline-edit > .side-form { max-width: 620px; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-soft); }
.source-transcript { overflow: hidden; }
.source-transcript > summary { display: grid; gap: 3px; padding: 17px; list-style: none; cursor: pointer; }
.source-transcript > summary::-webkit-details-marker { display: none; }
.source-transcript > summary span { color: var(--ink); font-size: 16px; font-weight: 750; }
.source-transcript > summary small { color: var(--muted); }
.source-transcript[open] > summary { border-bottom: 1px solid var(--line); background: #f8fafb; }
.source-transcript pre { max-height: 640px; margin: 0; overflow: auto; padding: 18px; color: #2f3d45; font: 13px/1.6 "Segoe UI", Arial, sans-serif; white-space: pre-wrap; }

.profile-summary { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.profile-summary > div { display: grid; gap: 4px; padding: 14px 16px; border-right: 1px solid var(--line); }
.profile-summary > div:last-child { border-right: 0; }
.profile-summary span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.profile-summary strong { font-size: 17px; }
.activity-panel { padding: 18px; }
.section-heading h2 { margin: 0 0 14px; }
.activity-list { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.activity-list::before { position: absolute; top: 8px; bottom: 8px; left: 5px; width: 2px; background: #dce4e7; content: ""; }
.activity-list li { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 0 0 18px; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-marker { z-index: 1; width: 12px; height: 12px; margin-top: 4px; border: 3px solid #fff; border-radius: 50%; background: #557c9f; box-shadow: 0 0 0 1px #9db0b9; }
.activity-list li > div { min-width: 0; }
.activity-list p { margin-top: 3px; font-size: 12px; }
.class-activity-panel { max-width: 980px; }
.empty-state { padding: 18px 0; color: var(--muted); font-style: italic; }

.contact-form { max-width: 880px; }

a[href^="mailto:"] { overflow-wrap: anywhere; word-break: break-word; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .topbar { align-items: flex-start; }
  .topbar nav { max-width: 760px; }
  .broker-search { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
  .class-filters { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
  .notes-workspace { grid-template-columns: 1fr; }
  .class-directory { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .carrier-appetite-row { grid-template-columns: minmax(170px, .8fr) 140px minmax(180px, 1.3fr); }
  .carrier-row-tools { grid-column: 1 / -1; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }
  .placement-groups { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .topbar nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; overflow: visible; padding-bottom: 0; }
  .topbar nav > a, .nav-logout button { min-height: 44px; white-space: nowrap; }
  .nav-user { display: none; }
  .page { padding: 20px 14px; }
  h1 { font-size: 25px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar > .actions { flex-wrap: wrap; }
  .status-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .filters, .form-grid, .broker-search, .nested-form, .user-form { grid-template-columns: 1fr; }
  .class-filters { grid-template-columns: 1fr; }
  .wide-search { min-width: 0; }
  .smart-search-fields, .source-meta-fields, .class-directory { grid-template-columns: 1fr; }
  .directory-search-row, .carrier-state-filter, .carrier-appetite-row, .request-comparison, .request-list-row, .request-review-meta, .request-diff, .request-decisions { grid-template-columns: 1fr; }
  .carrier-appetite-row { align-items: start; }
  .carrier-row-tools { grid-column: auto; justify-content: flex-start; flex-wrap: wrap; }
  .request-row-meta { justify-content: flex-start; flex-wrap: wrap; }
  .request-review-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .request-review-meta > div:last-child { border-bottom: 0; }
  .request-source { grid-template-columns: 1fr; }
  .request-source details { grid-column: auto; }
  .carrier-person-row { grid-template-columns: 38px minmax(0, 1fr); }
  .carrier-person-row > .access-menu { grid-column: 2; }
  .directory-heading { align-items: flex-start; }
  .directory-summary { flex-direction: column; align-items: flex-end; gap: 4px; }
  .state-context-banner { flex-direction: column; align-items: stretch; }
  .state-switch { grid-template-columns: 1fr auto; width: 100%; }
  .record-overview, .record-facts, .two-col, .market-grid, .carrier-contact-directory, .contact-directory, .detail-support { grid-template-columns: 1fr; }
  .class-health, .access-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .class-health > :nth-child(2), .access-summary > :nth-child(2) { border-right: 0; }
  .class-health > :nth-child(-n+2), .access-summary > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .brand-logo { width: 72px; height: 44px; }
  .fact { border-right: 0; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  dt { padding-bottom: 4px; border-bottom: 0; }
  dd { padding-top: 4px; }
  .login-panel { margin-top: 2vh; padding: 22px; }
  .source-item-heading { flex-direction: column; }
  .source-item-heading .actions { flex-wrap: wrap; }
  .source-suggestion-heading { flex-direction: column; }
  .suggestion-fields { grid-template-columns: 1fr; }
  .suggestion-option.guidance-option { grid-column: auto; }
  .suggestion-actions { flex-direction: column; }
  .suggestion-actions > button { width: 100%; }
  .class-tabs { flex-wrap: wrap; gap: 2px 4px; overflow: visible; }
  .class-tabs a { display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }
  .class-tabs .history-tab { margin-left: 0; }
  .class-view-heading { flex-direction: column; align-items: stretch; }
  .popover-panel { position: fixed; top: 12vh; right: 14px; left: 14px; width: auto; max-height: 76vh; overflow: auto; }
  .unassigned-list form { grid-template-columns: 1fr; }
  .profile-summary { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .profile-summary > :nth-child(2) { border-right: 0; }
  .profile-summary > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  input, select, button, .button { min-height: 44px; }
  .compact { min-height: 40px; }
  .icon-button { width: 40px; height: 40px; }
  .review-stat { min-height: 40px; }
  .actions { flex-wrap: wrap; }
  .contact-actions a, .card-links a { display: inline-flex; align-items: center; min-height: 40px; }
  .source-add > summary, .source-paste > summary, .source-body > summary, .note-inline-edit > summary { display: flex; align-items: center; min-height: 40px; }
}
