:root {
  --app-ink: #173435;
  --app-muted: #667674;
  --app-bg: #f3f6f4;
  --app-panel: #fff;
  --app-brand: #0f5b55;
  --app-brand-dark: #0b4742;
  --app-line: #dce5e1;
  --app-accent: #e6f4ef;
}

.app-body,
.app-body *,
.app-body *::before,
.app-body *::after {
  box-sizing: border-box;
}

.app-body {
  margin: 0;
  background: var(--app-bg);
  color: var(--app-ink);
}

.app-body button,
.app-body input,
.app-body select {
  font: inherit;
}

.app-body .btn {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  justify-content: center;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease,
    color .15s ease, box-shadow .15s ease;
}

.app-body .btn:focus-visible,
.app-body .form-select:focus-visible,
.workspace-switcher summary:focus-visible,
.workspace-menu button:focus-visible,
.app-menu-toggle:focus-visible,
.app-menu-close:focus-visible {
  outline: 3px solid rgba(22, 89, 90, .24);
  outline-offset: 2px;
}

.app-body .btn-primary {
  border-color: var(--app-brand);
  background: var(--app-brand);
  color: #fff;
}

.app-body .btn-primary:hover {
  border-color: var(--app-brand-dark);
  background: var(--app-brand-dark);
  color: #fff;
}

.app-body .btn-dark {
  border-color: var(--app-ink);
  background: var(--app-ink);
  color: #fff;
}

.app-body .btn-dark:hover {
  background: #0e2527;
}

.app-body .btn-outline-dark,
.app-body .btn-outline-secondary {
  border-color: #81908d;
  background: #fff;
  color: var(--app-ink);
}

.app-body .btn-outline-dark:hover,
.app-body .btn-outline-secondary:hover {
  border-color: var(--app-brand);
  background: var(--app-accent);
  color: var(--app-brand-dark);
}

.app-body .btn-sm {
  min-height: 2.25rem;
  padding: .45rem .75rem;
  font-size: .88rem;
}

.app-body .btn-link {
  min-height: auto;
  padding: .35rem;
  border-color: transparent;
  background: transparent;
  color: var(--app-brand);
}

.app-body .w-100 {
  width: 100%;
}

.app-body .form-select {
  width: 100%;
  min-height: 2.65rem;
  padding: .55rem 2.25rem .55rem .75rem;
  border: 1px solid #afbfbb;
  border-radius: .62rem;
  background-color: #fff;
  color: var(--app-ink);
}

.app-body .small {
  font-size: .84rem;
}

.app-body .text-secondary {
  color: var(--app-muted);
}

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

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #123f3c;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.app-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.15rem;
  text-decoration: none;
}

.app-menu-close {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: .65rem;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.workspace-summary {
  margin: 28px 0 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px;
  display: grid;
  gap: 3px;
}

.workspace-summary span,
.workspace-summary small {
  color: #bcd1cd;
  font-size: .78rem;
}

.app-nav {
  display: grid;
  gap: 5px;
}

.app-nav p {
  margin: 20px 10px 4px;
  color: #9fc0bb;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.app-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #dfeae7;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a.active {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.app-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.app-sidebar-footer a,
.app-sidebar-footer button {
  padding: 5px 10px;
  border: 0;
  background: none;
  color: #c8dcd8;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-sidebar-footer a:hover,
.app-sidebar-footer button:hover {
  color: #fff;
}

.app-menu-backdrop {
  display: none;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  position: relative;
  z-index: 20;
  height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid var(--app-line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.app-menu-toggle {
  display: none;
}

.app-user {
  color: var(--app-muted);
  font-size: .9rem;
}

.workspace-switcher {
  position: relative;
}

.workspace-switcher summary {
  min-width: 220px;
  padding: .48rem 2rem .48rem .75rem;
  border: 1px solid #b7c4c1;
  border-radius: .65rem;
  background: #fff;
  color: var(--app-ink);
  font-size: .88rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.workspace-switcher summary::-webkit-details-marker {
  display: none;
}

.workspace-switcher summary::after {
  position: absolute;
  top: .58rem;
  right: .75rem;
  content: "▾";
  color: var(--app-muted);
}

.workspace-switcher[open] summary::after {
  content: "▴";
}

.workspace-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: min(320px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--app-line);
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(23, 52, 53, .16);
}

.workspace-menu form {
  margin: 0;
}

.workspace-menu button {
  width: 100%;
  padding: .7rem .75rem;
  border: 0;
  border-radius: .55rem;
  background: transparent;
  color: var(--app-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.workspace-menu button:hover,
.workspace-menu button.active {
  background: var(--app-accent);
}

.workspace-menu button span {
  color: var(--app-brand);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.app-content,
.app-flashes {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.app-flashes {
  padding-bottom: 0;
}

.app-auth-flashes {
  max-width: 540px;
  padding: 24px 12px 0;
}

.alert {
  padding: .85rem 1rem;
  border: 1px solid #b8cbc5;
  border-radius: .75rem;
  background: #fff;
  color: var(--app-ink);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(23, 52, 53, .08);
}

.alert-info {
  border-color: #a9c9df;
  background: #edf7fd;
  color: #214f6b;
}

.alert-success {
  border-color: #a9d0bd;
  background: #edf8f2;
  color: #1d5d3d;
}

.alert-error,
.alert-danger {
  border-color: #e2b5ad;
  background: #fff2ef;
  color: #7c3026;
}

.alert-warning {
  border-color: #e8cf92;
  background: #fff8e5;
  color: #765a18;
}

.alert-close {
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.app-page-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.app-page-heading h1 {
  margin: .1rem 0 .4rem;
  font-size: 2rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.app-page-heading p {
  margin: 0;
  color: var(--app-muted);
}

.app-eyebrow {
  color: var(--app-brand) !important;
  font-size: .72rem !important;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.metric-grid {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-grid article {
  padding: 20px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-panel);
  display: grid;
  gap: 8px;
}

.metric-grid span {
  color: var(--app-muted);
}

.metric-grid strong {
  font-size: 2rem;
}

.app-panel {
  padding: 24px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-panel);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.detail-section h2,
.decision-card h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.panel-heading a,
.back-link {
  color: var(--app-brand);
  font-weight: 700;
  text-decoration: none;
}

.panel-heading a:hover,
.back-link:hover {
  text-decoration: underline;
}

.score-help {
  max-width: 760px;
  margin: -.5rem 0 1.25rem;
  color: var(--app-muted);
  font-size: .85rem;
}

.opportunity-list {
  margin: 12px -24px -24px;
  display: grid;
}

.opportunity-row {
  padding: 17px 24px;
  border-top: 1px solid var(--app-line);
  color: var(--app-ink);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) auto;
  gap: 20px;
  align-items: center;
  text-decoration: none;
}

.opportunity-row:hover {
  background: #f8faf9;
}

.opportunity-row:focus-visible {
  outline: 3px solid rgba(22, 89, 90, .2);
  outline-offset: -3px;
}

.opportunity-row div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.opportunity-row span,
.opportunity-row small {
  color: var(--app-muted);
}

.status {
  width: max-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef1f0;
  color: #53615f;
  display: inline-flex;
  align-items: center;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-new {
  background: #e8f1ff;
  color: #285a94;
}

.status-reviewing {
  background: #fff4d6;
  color: #755500;
}

.status-pursuing,
.status-active {
  background: #dff4e9;
  color: #19613c;
}

.status-dismissed {
  background: #f1eeee;
  color: #725f5f;
}

.empty-state {
  padding: 42px 18px;
  text-align: center;
}

.filter-bar {
  margin-bottom: 18px;
  display: flex;
  align-items: end;
  gap: 14px;
}

.filter-bar label {
  color: var(--app-muted);
  display: grid;
  gap: 5px;
  font-size: .82rem;
}

.filter-bar .form-select {
  min-width: 190px;
}

.pagination-row {
  padding-top: 24px;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.detail-heading {
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.detail-grid > div {
  display: grid;
  gap: 20px;
}

.decision-card {
  position: sticky;
  top: 84px;
}

.decision-card form {
  display: grid;
  gap: 16px;
}

.decision-card label {
  color: var(--app-muted);
  display: grid;
  gap: 6px;
  font-size: .85rem;
}

.detail-list {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.detail-list div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.detail-list dt {
  color: var(--app-muted);
  font-size: .78rem;
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.reason-list,
.item-list,
.member-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.reason-list li,
.item-list > div,
.member-list li {
  padding-top: 12px;
  border-top: 1px solid var(--app-line);
  display: grid;
  gap: 3px;
}

.reason-list span,
.item-list span,
.item-list small,
.member-list span {
  color: var(--app-muted);
  font-size: .84rem;
}

.member-list li > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.member-list strong {
  overflow-wrap: anywhere;
}

.monitor-grid,
.organization-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.monitor-card ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.monitor-card li {
  padding: 10px 0;
  border-top: 1px solid var(--app-line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.monitor-card li strong {
  color: #19613c;
  font-size: .78rem;
}

.monitor-card li em {
  color: #8a6510;
  font-size: .78rem;
}

.monitor-meta {
  color: var(--app-muted);
  font-size: .84rem;
}

.opportunity-page-heading {
  margin-bottom: 20px;
}

.opportunity-summary-grid,
.opportunity-value-grid {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.opportunity-summary-grid article,
.opportunity-value-grid article {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  align-content: start;
  gap: 6px;
}

.opportunity-summary-grid .summary-highlight,
.opportunity-value-grid .summary-highlight {
  border-color: #b7d8ce;
  background: #eef8f4;
}

.opportunity-summary-grid span,
.opportunity-value-grid span {
  color: var(--app-muted);
  font-size: .78rem;
  font-weight: 700;
}

.opportunity-summary-grid strong,
.opportunity-value-grid strong {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.opportunity-summary-grid small,
.opportunity-value-grid small {
  color: var(--app-muted);
  font-size: .72rem;
}

.opportunity-value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opportunity-tabs {
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: #fff;
  display: flex;
  gap: 3px;
  overflow-x: auto;
}

.opportunity-tabs a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--app-muted);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.opportunity-tabs a:hover,
.opportunity-tabs a.active {
  background: var(--app-accent);
  color: var(--app-brand-dark);
}

.opportunity-filter-disclosure {
  margin-bottom: 18px;
}

.opportunity-filter-disclosure > summary {
  display: none;
}

.opportunity-filter-panel {
  margin-bottom: 0;
  padding: 18px;
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.filter-grid label {
  min-width: 0;
  color: var(--app-muted);
  display: grid;
  gap: 5px;
  font-size: .76rem;
  font-weight: 700;
}

.filter-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.opportunity-results {
  display: grid;
  gap: 12px;
}

.opportunity-card {
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.opportunity-card:hover {
  border-color: #b8cec7;
  box-shadow: 0 10px 30px rgba(23, 52, 53, .07);
}

.opportunity-card-main {
  min-width: 0;
  padding: 20px 22px;
}

.opportunity-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.opportunity-card-heading > div {
  min-width: 0;
}

.opportunity-card-heading h2 {
  margin: 7px 0 4px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.opportunity-card-heading h2 a {
  color: var(--app-ink);
  text-decoration: none;
}

.opportunity-card-heading h2 a:hover {
  color: var(--app-brand);
  text-decoration: underline;
}

.opportunity-card-heading p,
.opportunity-card-footer p {
  margin: 0;
  color: var(--app-muted);
  font-size: .86rem;
}

.opportunity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-badges {
  margin-top: 12px;
}

.fit-badge,
.eligibility-badge,
.confidence-badge {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
  text-transform: uppercase;
}

.fit-high,
.confidence-high {
  background: #dff4e9;
  color: #19613c;
}

.fit-medium,
.confidence-medium {
  background: #fff1c9;
  color: #765500;
}

.fit-low,
.confidence-low {
  background: #eef1f0;
  color: #586764;
}

.eligibility-badge {
  background: #e8f1ff;
  color: #285a94;
}

.opportunity-commercial-grid {
  margin: 18px 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.opportunity-commercial-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--app-line);
  background: #f8faf9;
  display: grid;
  gap: 3px;
}

.opportunity-commercial-grid dt {
  color: var(--app-muted);
  font-size: .72rem;
  font-weight: 700;
}

.opportunity-commercial-grid dd {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.opportunity-commercial-grid small {
  color: var(--app-muted);
  font-size: .7rem;
}

.opportunity-commercial-grid .aligned-value {
  border-left-color: #3d8c77;
  background: #eef8f4;
}

.deadline-urgent {
  border-left-color: #c75843 !important;
}

.deadline-urgent dt,
.deadline-text.deadline-urgent {
  color: #9a3828;
}

.deadline-soon {
  border-left-color: #d09a28 !important;
}

.deadline-soon dt,
.deadline-text.deadline-soon {
  color: #806015;
}

.opportunity-card-footer {
  padding-top: 13px;
  border-top: 1px solid var(--app-line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.opportunity-card-footer p:last-child {
  text-align: right;
}

.opportunity-card-action {
  min-width: 154px;
  padding: 18px;
  border-left: 1px solid var(--app-line);
  color: var(--app-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.opportunity-card-action:hover {
  background: var(--app-accent);
  color: var(--app-brand-dark);
}

.detail-status-stack {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.deadline-text {
  color: var(--app-brand);
  font-size: .82rem;
  white-space: nowrap;
}

.process-timeline {
  margin: 22px 0 26px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.process-timeline li {
  position: relative;
  min-width: 0;
  padding: 18px 14px 0 0;
  border-top: 3px solid var(--app-line);
  display: grid;
  gap: 4px;
}

.process-timeline li::before {
  position: absolute;
  top: -7px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #afbfbb;
  box-shadow: 0 0 0 1px #afbfbb;
  content: "";
}

.process-timeline li.complete,
.process-timeline li.current {
  border-color: #6cae9c;
}

.process-timeline li.complete::before,
.process-timeline li.current::before {
  background: var(--app-brand);
  box-shadow: 0 0 0 1px var(--app-brand);
}

.process-timeline span {
  color: var(--app-muted);
  font-size: .75rem;
}

.process-timeline strong {
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.matched-item-list {
  margin-top: 18px;
  display: grid;
}

.matched-item-list article {
  padding: 14px 0;
  border-top: 1px solid var(--app-line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.matched-item-list article > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.matched-item-list span,
.matched-item-list small {
  color: var(--app-muted);
  font-size: .78rem;
}

.matched-item-list article > strong {
  flex: 0 0 auto;
  color: var(--app-brand-dark);
}

.app-auth-content {
  min-height: 100vh;
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    z-index: 40;
    width: min(82vw, 290px);
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 18px 0 50px rgba(5, 28, 28, .22);
  }

  .app-menu-open {
    overflow: hidden;
  }

  .app-menu-open .app-sidebar {
    transform: translateX(0);
  }

  .app-menu-open .app-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: block;
    border: 0;
    background: rgba(8, 31, 31, .46);
    cursor: pointer;
  }

  .app-menu-close {
    display: inline-grid;
    place-items: center;
  }

  .app-topbar {
    padding: 0 18px;
    justify-content: space-between;
  }

  .app-menu-toggle {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border: 1px solid var(--app-line);
    border-radius: .65rem;
    background: #fff;
    color: var(--app-ink);
    display: inline-grid;
    place-items: center;
    font-size: 1.25rem;
    cursor: pointer;
  }

  .workspace-switcher summary {
    min-width: min(220px, calc(100vw - 92px));
    max-width: calc(100vw - 92px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .opportunity-summary-grid,
  .opportunity-value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .decision-card {
    position: static;
  }

  .monitor-grid,
  .organization-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-content,
  .app-flashes {
    padding: 22px 16px;
  }

  .app-flashes {
    padding-bottom: 0;
  }

  .app-auth-flashes {
    padding: 16px 12px 0;
  }

  .app-page-heading {
    display: grid;
    gap: 14px;
  }

  .detail-heading h1 {
    font-size: 1.75rem;
    line-height: 1.16;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-grid article {
    padding: 16px;
  }

  .opportunity-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-bar {
    display: grid;
  }

  .filter-bar label,
  .filter-bar .form-select,
  .filter-bar .btn {
    width: 100%;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .opportunity-summary-grid,
  .opportunity-value-grid,
  .filter-grid,
  .opportunity-commercial-grid,
  .process-timeline {
    grid-template-columns: 1fr;
  }

  .opportunity-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .opportunity-filter-panel {
    padding: 14px;
  }

  .opportunity-filter-disclosure {
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }

  .opportunity-filter-disclosure > summary {
    padding: 15px 16px;
    color: var(--app-ink);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .opportunity-filter-disclosure > summary span {
    color: var(--app-muted);
    font-size: .72rem;
    font-weight: 400;
    text-align: right;
  }

  .opportunity-filter-disclosure[open] > summary {
    border-bottom: 1px solid var(--app-line);
  }

  .opportunity-filter-disclosure .opportunity-filter-panel {
    border: 0;
    border-radius: 0;
  }

  .filter-actions,
  .opportunity-card-footer,
  .matched-item-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .opportunity-card {
    grid-template-columns: 1fr;
  }

  .opportunity-card-main {
    padding: 18px 16px;
  }

  .opportunity-card-heading {
    display: grid;
  }

  .opportunity-card-heading .status {
    grid-row: 1;
  }

  .opportunity-card-footer p:last-child {
    text-align: left;
  }

  .opportunity-card-action {
    min-width: 0;
    padding: 14px 16px;
    border-top: 1px solid var(--app-line);
    border-left: 0;
  }

  .detail-status-stack {
    justify-items: start;
  }

  .process-timeline li {
    padding: 0 0 18px 24px;
    border-top: 0;
    border-left: 3px solid var(--app-line);
  }

  .process-timeline li::before {
    top: 0;
    left: -7px;
  }

  .matched-item-list article > strong {
    flex-basis: auto;
  }

  .pagination-row {
    gap: 14px;
    font-size: .88rem;
  }
}
