@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap");

:root {
  color-scheme: light;
  --bg: #d9e0e8;
  --bg-deep: #c8d1dc;
  --text: #10161f;
  --muted: #2f3b4c;
  --panel: #e8edf3;
  --panel-raised: #ffffff;
  --panel-recessed: #dfe5ed;
  --row-odd: #e8eef5;
  --row-even: #f7f9fc;
  --row-hover: #d4e2f7;
  --accent: #0a4fd6;
  --accent-strong: #063a9e;
  --accent-text: #ffffff;
  --interest: #0a6b42;
  --interest-strong: #084e31;
  --interest-soft: #c8eedc;
  --danger: #9f1d14;
  --hairline: rgba(16, 22, 31, 0.14);
  --border: rgba(16, 22, 31, 0.28);
  --focus: #4d82ef;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #d9e0e8;
  --bg-deep: #c8d1dc;
  --text: #10161f;
  --muted: #2f3b4c;
  --panel: #e8edf3;
  --panel-raised: #ffffff;
  --panel-recessed: #dfe5ed;
  --row-odd: #e8eef5;
  --row-even: #f7f9fc;
  --row-hover: #d4e2f7;
  --accent: #0a4fd6;
  --accent-strong: #063a9e;
  --accent-text: #ffffff;
  --interest: #0a6b42;
  --interest-strong: #084e31;
  --interest-soft: #c8eedc;
  --danger: #9f1d14;
  --hairline: rgba(16, 22, 31, 0.14);
  --border: rgba(16, 22, 31, 0.28);
  --focus: #4d82ef;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e131a;
  --bg-deep: #090d12;
  --text: #f3f6fb;
  --muted: #c2cad8;
  --panel: #171e28;
  --panel-raised: #222b3a;
  --panel-recessed: #121821;
  --row-odd: #1a222e;
  --row-even: #222b3a;
  --row-hover: #2c3c56;
  --accent: #7aafff;
  --accent-strong: #a8c9ff;
  --accent-text: #071018;
  --interest: #3dcc8c;
  --interest-strong: #8be0b5;
  --interest-soft: #163528;
  --danger: #ff8d80;
  --hairline: rgba(243, 246, 251, 0.12);
  --border: rgba(243, 246, 251, 0.42);
  --focus: #7aafff;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  height: 100%;
  color: var(--text);
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1.45;
  background: var(--bg);
}

#app,
.blazor-error-boundary {
  height: 100%;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 700;
  cursor: pointer;
}

a:hover { color: var(--accent); }

.shell {
  max-width: 1240px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 12px 16px 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.shell-chrome {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  padding-bottom: 6px;
}

.shell-workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-bottom: 40px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--panel-raised);
}

.account-menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.topbar-ai-spend {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  margin-right: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  white-space: nowrap;
}

.topbar-ai-spend:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--accent) 20%, var(--panel-raised));
}

.topbar-ai-spend.muted {
  color: var(--muted);
  font-weight: 600;
  background: transparent;
  border-color: var(--hairline);
}

.topbar .account-menu {
  margin-left: 0;
}

.bid-app-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--panel-raised);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bid-app-topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  flex: 0 0 auto;
}

.bid-app-topbar .brand:focus {
  outline: none;
}

.bid-app-topbar .brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.bid-app-topbar-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.bid-app-topbar-opportunity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: min(52rem, 100%);
}

.bid-app-topbar-opp-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.bid-app-topbar-rfp {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent-strong);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.bid-app-topbar-rfp:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  text-decoration: none;
}

.bid-app-topbar-bid-spend {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.bid-app-topbar-bid-spend.muted {
  color: var(--muted);
  font-weight: 600;
  background: transparent;
  border-color: var(--hairline);
}

.bid-app-topbar .topbar-ai-spend {
  margin-left: auto;
  margin-right: 0;
}

.bid-app-topbar-back {
  margin-left: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.82rem;
}

.bid-app-topbar-back:hover {
  color: var(--accent-strong);
}

.ai-spend-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ai-spend-stat {
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--panel-raised);
}

.ai-spend-stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.ai-spend-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ai-spend-table th.num,
.ai-spend-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ai-spend-table .tiny {
  font-size: 0.72rem;
  margin-top: 2px;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-raised);
}

.account-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.account-name {
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  min-width: 12rem;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 22%, transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-dropdown-email {
  padding: 6px 8px;
  font-size: 0.78rem;
  word-break: break-all;
}

.account-dropdown > a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.account-dropdown > a:hover {
  background: var(--panel-raised);
}

.login-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform 160ms ease, filter 160ms ease;
}

.login-google:hover {
  filter: brightness(1.06);
  color: var(--accent-text);
  transform: translateY(-1px);
}

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-width: auto;
  text-decoration: none;
  color: inherit;
}

.brand:hover {
  color: inherit;
  text-decoration: none;
}

.brand:focus {
  outline: none;
}

.brand:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.text-mark {
  display: block;
  height: auto;
  flex: 0 0 auto;
  overflow: visible;
  pointer-events: none;
}

h1:focus,
h2:focus,
h3:focus,
label:focus,
[aria-hidden="true"]:focus {
  outline: none;
}

.brand-mark,
.brand-mark-inline {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: block;
  overflow: hidden;
}

.brand h1 {
  margin: 0;
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand .tagline {
  display: none;
}

.shell-landing {
  max-width: none;
}

.shell-landing .shell-chrome {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
}

.shell-landing .shell-workspace {
  overflow: auto;
}

.landing {
  min-height: calc(100dvh - 4.5rem);
  display: grid;
  place-items: center;
  padding: 1.5rem 1.25rem 3rem;
  background:
    radial-gradient(1200px 520px at 18% -10%, color-mix(in srgb, #0f766e 22%, transparent), transparent 55%),
    radial-gradient(900px 480px at 92% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 50%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.landing-hero {
  width: min(36rem, 100%);
  text-align: left;
  animation: landing-rise 520ms ease-out both;
}

.landing-mark,
.landing-hero .brand-mark-inline {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  display: block;
  margin-bottom: 1.25rem;
  box-shadow: 0 18px 40px color-mix(in srgb, #0f766e 28%, transparent);
  animation: landing-mark 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.landing-hero .text-mark {
  height: 52px;
  width: auto;
  margin: 0 0 1.1rem;
  animation: landing-mark 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.landing-brand {
  margin: 0 0 0.35rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.landing-headline {
  margin: 0 0 0.75rem;
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.landing-lede {
  margin: 0 0 1.5rem;
  max-width: 32rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--muted);
}

.landing-auth {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.landing-cta {
  margin-top: 0;
}

.landing-boot {
  padding: 2rem 1rem;
}

@keyframes landing-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes landing-mark {
  from { opacity: 0; transform: translateY(10px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .landing-mark,
  .landing-hero .brand-mark-inline,
  .landing-hero .text-mark {
    animation: none;
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.nav a,
.nav button,
button,
.btn,
a.btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: 5px 10px;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav a.secondary,
.nav button.secondary,
button.secondary,
.btn.secondary,
a.btn.secondary {
  background: var(--panel-recessed);
  color: var(--text);
}

.nav a.active {
  background: var(--accent-strong);
  color: var(--accent-text);
}

.nav a:hover,
button:hover,
.btn:hover {
  filter: brightness(1.06);
  text-decoration: none;
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.meta {
  display: none;
}

.meta-line {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sort-bar {
  gap: 10px;
  align-items: end;
}

.muted { color: var(--muted); }

.header-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.download-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-recessed);
}

.panel {
  background: var(--panel);
  border: 0;
  border-radius: 10px;
  padding: 18px 16px;
  margin-bottom: 14px;
  color: var(--text);
}

.panel h2 {
  margin: 0;
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
}

.cred-block {
  margin-top: 14px;
  padding: 12px 14px 14px;
  border-radius: 8px;
  background: var(--panel-recessed);
  border: 1px solid var(--border);
}

.cred-block:first-of-type {
  margin-top: 10px;
}

.cred-block h3 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.cred-block .row {
  align-items: start;
}

.cred-block .field {
  flex: 1 1 220px;
}

.cred-status {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.cred-status.ok { color: var(--ok, #2a7); }
.cred-status.bad { color: var(--danger); }

.row.actions { align-items: center; }
.spacer { flex: 1 1 auto; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

.field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field.inline {
  flex-direction: row;
  align-items: center;
  min-width: auto;
}

.field.inline span {
  margin-right: 8px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

input,
select,
textarea {
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-raised);
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

select {
  appearance: auto;
  min-height: 2.25rem;
}

select option {
  color: CanvasText;
  background-color: Canvas;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
.nav a:focus:not(:focus-visible) {
  outline: none;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--panel-raised);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 11px 10px;
  border: 0;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--bg-deep);
  box-shadow: inset 0 -3px 0 var(--accent);
}

tbody tr:nth-child(odd) td {
  background: var(--row-odd);
}

tbody tr:nth-child(even) td {
  background: var(--row-even);
}

tbody tr:hover td {
  background: var(--row-hover);
}

/* Card-like opportunity rows: still a table, but multiline and spaced. */
.opp-table-wrap {
  background: transparent;
  overflow: visible;
}

.opp-table {
  border-collapse: separate;
  border-spacing: 0 10px;
}

.opp-table thead th {
  background: transparent;
  box-shadow: none;
  padding: 4px 14px 8px;
  color: var(--muted);
}

.opp-table tbody tr.opp-row td {
  background: var(--panel-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 14px;
  vertical-align: top;
}

.opp-table tbody tr.opp-row td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 12px 0 0 12px;
}

.opp-table tbody tr.opp-row td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 12px 12px 0;
}

.opp-table tbody tr.opp-row td:first-child:last-child {
  border-radius: 12px;
}

.opp-table tbody tr.opp-row:hover td {
  background: var(--row-hover);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.opp-table tbody tr.opp-row-clickable {
  cursor: pointer;
}

.opp-col-score {
  width: 5.5rem;
  white-space: nowrap;
  vertical-align: top;
}

.score-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.score-ai {
  color: var(--accent-strong);
}

.opp-col-main {
  min-width: 18rem;
}

.opp-head-line {
  display: grid;
  gap: 10px 14px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.opp-head-title {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.opp-head-detail {
  margin-top: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.opp-head-detail-bid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.docs-count-ready {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--interest-strong);
}

.opp-doc-cred {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
  max-width: 14rem;
}

.opp-doc-cred-missing {
  color: #b45309;
}

.opp-doc-cred-invalid {
  color: #b91c1c;
}

.opp-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.opp-line {
  display: grid;
  gap: 10px 14px;
  align-items: start;
  min-width: 0;
}

.opp-line-title {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.opp-title-actions {
  flex-shrink: 0;
  justify-self: end;
}

.opp-line-ai {
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  padding-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--border) 85%, transparent);
}

.opp-line-ai-error .opp-title,
.opp-line-ai-error .desc {
  color: var(--danger);
}

.ai-response-body {
  white-space: pre-wrap;
}

.opp-line-detail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.opp-line-detail-bid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.opp-notice {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.opp-title-block {
  min-width: 0;
}

.opp-title {
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.35;
}

.opp-title a {
  color: var(--text);
  text-decoration-thickness: 1px;
}

.opp-reasons {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.opp-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.opp-field-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.opp-field-value {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.opp-sub {
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.opp-closing-date {
  font-weight: 750;
}

.opp-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 8px 14px;
}

.opp-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
}

@media (max-width: 900px) {
  .opp-head-detail,
  .opp-line-detail {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .opp-line-title {
    grid-template-columns: 1fr;
  }

  .opp-title-actions {
    justify-self: start;
  }

  .opp-head-detail,
  .opp-line-detail {
    grid-template-columns: 1fr;
  }
}

.tiny {
  padding: 6px 10px !important;
  font-size: 0.8rem !important;
}

.icon-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.icon-btn {
  width: 2rem;
  height: 2rem;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--panel-recessed);
  color: var(--text);
  border: 1px solid var(--border);
  position: relative;
  text-decoration: none;
}

.icon-btn:hover,
.icon-btn:focus-visible,
[data-tooltip]:hover,
[data-tooltip]:focus-visible {
  z-index: 40;
}

[data-tooltip] {
  position: relative;
}

/* Pseudo tooltips disabled — floating tip is positioned in JS to stay in-bounds. */
[data-tooltip]::after {
  content: none !important;
  display: none !important;
}

.app-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(18rem, calc(100vw - 16px));
  padding: 6px 9px;
  border-radius: 8px;
  border: 2px solid var(--text);
  background: var(--panel-raised);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  text-align: left;
  box-shadow: 0 8px 22px color-mix(in srgb, #000 28%, transparent);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
}

.app-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-tooltip.is-wrap {
  white-space: normal;
  min-width: 10rem;
}


.icon-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.icon-btn.danger {
  color: var(--danger);
}

.icon-btn:hover:not(:disabled) {
  background: var(--panel);
}

.icon-btn.not-interested-on {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}

.icon-btn.interest-on {
  color: var(--interest-strong);
  border-color: color-mix(in srgb, var(--interest) 45%, var(--border));
  background: var(--interest-soft);
}

.review-outcome {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.review-outcome-bid {
  color: var(--interest-strong);
  background: var(--interest-soft);
}

.review-outcome-missed {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.review-outcome-no_fit {
  color: #9a3412;
  background: #fff7ed;
}

.icon-spin {
  font-size: 0.85rem;
  line-height: 1;
}

.review-actions.icon-actions {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  width: max-content;
}

.ai-triage-panel {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-recessed);
}

.ai-triage-panel-busy {
  box-shadow: inset 0 0 0 2px var(--accent, #0969da);
}

.ai-triage-panel h3 {
  margin: 0;
  font-size: 1.05rem;
}

.ai-triage-match {
  background: color-mix(in srgb, var(--interest) 10%, transparent);
}

.ai-triage-rationale {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.35;
}

.ai-triage-chip-match {
  background: var(--interest-soft);
  color: var(--interest-strong);
}

.ai-triage-chip-skip {
  opacity: 0.85;
}

.all-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.all-toolbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.all-toolbar > button,
.all-toolbar > .toolbar-menu,
.all-toolbar > .all-count,
.all-toolbar > .all-toolbar-title {
  flex: 0 0 auto;
}

.all-toolbar .row.actions {
  flex-wrap: nowrap;
}

@media (max-width: 960px) {
  .all-toolbar {
    flex-wrap: wrap;
  }
}

.all-search {
  flex: 1 1 14rem;
  min-width: 10rem;
}

.all-search input {
  width: 100%;
  padding: 7px 10px;
}

.all-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.toolbar-menu {
  position: relative;
}

.toolbar-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 16rem;
  max-width: min(28rem, 90vw);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 22%, transparent);
}

.toolbar-menu-wide {
  min-width: 18rem;
  max-width: min(32rem, 90vw);
}

.toolbar-menu-end {
  left: auto;
  right: 0;
}

.toolbar-menu-panel > button,
.toolbar-menu-panel > a {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  font-weight: 700;
}

.toolbar-menu-panel > a:hover,
.toolbar-menu-panel > button:hover {
  filter: brightness(1.06);
}

.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;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  text-align: inherit;
}

.th-sort:hover,
.th-sort.active {
  color: var(--accent-strong, var(--text));
}

.th-dir {
  font-size: 0.7em;
  line-height: 1;
}

.column-picker {
  position: relative;
}

.column-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 18rem;
  max-width: min(32rem, 90vw);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 22%, transparent);
}

.column-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

@media (max-width: 640px) {
  .column-picker-grid {
    grid-template-columns: 1fr;
  }
}

button.interest,
.btn.interest {
  background: var(--interest);
  color: #ffffff;
}

button.interested,
.btn.interested {
  background: var(--interest-soft);
  color: var(--interest-strong);
  font-weight: 800;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 9.5rem;
}

.ai-fit {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #2a6);
  background: var(--panel-recessed);
  border-radius: 0 8px 8px 0;
  max-width: 52rem;
}

.ai-fit-ready {
  border-left-color: var(--ok, #2a7);
}

.ai-fit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
}

.ai-fit-score {
  font-weight: 800;
  color: var(--text);
}

.ai-fit-body {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.45;
}

.ai-fit-error {
  color: var(--danger);
  font-size: 13px;
}

button.not-interested,
.btn.not-interested {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

button.not-interested-on,
.btn.not-interested-on {
  background: var(--panel-recessed);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 700;
}

.theme-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: var(--panel-recessed);
}

.theme-seg button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 7px 11px;
  box-shadow: none;
  font-weight: 700;
}

.theme-seg button.active {
  background: var(--accent);
  color: var(--accent-text);
}

.score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  color: var(--text);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.rule-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.rule-section h3 {
  margin: 0;
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.rule-card {
  margin-top: 10px;
  padding: 14px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-raised);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}

.rule-card:nth-child(even) {
  background: var(--panel-recessed);
}

.rule-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
}

#blazor-error-ui {
  background: var(--danger);
  bottom: 0;
  display: none;
  left: 0;
  padding: 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: #fff;
  font-weight: 700;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
  color: #fff;
  margin-left: 1rem;
}

.loading-progress {
  position: relative;
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 20vh auto 1rem;
}

.loading-progress circle {
  fill: none;
  stroke: var(--accent, #0a4fd6);
  stroke-width: 0.55rem;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}

.loading-progress circle:last-child {
  stroke: transparent;
  stroke-dasharray: calc(3.14159265359 * 8rem);
  stroke-dashoffset: calc(3.14159265359 * 8rem);
  animation: progress 1.2s ease-in-out infinite;
}

@keyframes progress {
  0% { stroke-dashoffset: calc(3.14159265359 * 8rem); }
  50% { stroke: var(--accent, #0a4fd6); }
  100% { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-progress circle:last-child { animation: none; }
}

/* —— Bid system (separate shell from Procurement browse) —— */
.bid-system-shell {
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.bid-system {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 100vh;
}

.bid-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 100vh;
  padding: 12px 8px;
  border-right: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--panel) 88%, var(--bg-deep));
}

.bid-rail-exit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
}

.bid-rail-exit:hover {
  background: var(--row-hover);
  color: var(--text);
}

.bid-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 56px;
  min-height: 56px;
  padding: 8px 4px;
  border-radius: 14px;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
}

.bid-rail-item:hover {
  background: var(--row-hover);
  color: var(--text);
}

.bid-rail-item.active {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-raised));
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.bid-rail-glyph {
  display: grid;
  place-items: center;
  line-height: 0;
}

.bid-rail-glyph svg {
  display: block;
}

.bid-rail-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
}

.bid-rail-badge {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 16%, transparent);
  color: var(--muted);
}

/* A finished section reads green whether or not it is the open one. */
.bid-rail-badge.done {
  background: color-mix(in srgb, var(--interest) 20%, transparent);
  color: var(--interest-strong);
}

/* Mailbox check history, beside the Gmail credentials in Settings. */
.mail-check {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.mail-check-state {
  margin: 8px 0 10px;
  font-weight: 700;
}

.mail-check-ok {
  color: var(--interest-strong);
}

.mail-check-error,
.mail-check-stale,
.mail-check-never,
.mail-check-unconfigured {
  color: var(--danger);
}

.mail-check-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin: 0;
  font-size: 0.82rem;
}

.mail-check-facts dt {
  color: var(--muted);
}

.mail-check-facts dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.mail-check-error {
  margin: 10px 0 0;
  font-size: 0.8rem;
}

/* Cost to bid: the figure is the point of the panel, so give it some size. */
.bid-cost-figure {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 6px;
}

.bid-cost-evidence {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.78rem;
  color: var(--muted);
}

.bid-cost-error {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--danger);
}

.bid-system-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bid-system-header {
  position: sticky;
  top: 44px;
  z-index: 5;
  display: grid;
  gap: 4px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  backdrop-filter: blur(8px);
}

.bid-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

.bid-header-meta {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: min(36rem, 100%);
}

.bid-header-stage {
  margin: 0;
  gap: 6px;
}

.bid-header-stage span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.bid-header-status {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.bid-deadline-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-recessed);
  font-size: 0.8rem;
}

.bid-deadline-chip strong {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bid-deadline-chip.bid-deadline-ok {
  border-color: color-mix(in srgb, #2f8f5b 40%, var(--border));
  background: color-mix(in srgb, #2f8f5b 10%, var(--panel-recessed));
}

.bid-deadline-chip.bid-deadline-soon {
  border-color: color-mix(in srgb, #c98512 50%, var(--border));
  background: color-mix(in srgb, #c98512 12%, var(--panel-recessed));
}

.bid-deadline-chip.bid-deadline-soon strong {
  color: #a66a00;
}

.bid-deadline-chip.bid-deadline-urgent,
.bid-deadline-chip.bid-deadline-closed {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, var(--panel-recessed));
}

.bid-deadline-chip.bid-deadline-urgent strong,
.bid-deadline-chip.bid-deadline-closed strong {
  color: var(--danger);
}

.bid-system-header .bid-deadline {
  margin: 0;
}

.bid-system-titleblock {
  min-width: 0;
}

.bid-system-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: min(72ch, 100%);
}

.bid-system-title a {
  color: inherit;
  text-decoration: none;
}

.bid-system-title a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.bid-ai-spend {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-raised));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  white-space: nowrap;
}

.bid-ai-spend.muted {
  color: var(--muted);
  font-weight: 600;
  background: transparent;
  border-color: var(--hairline);
}

.bid-system-content,
.bid-system-body {
  padding: 14px 18px 28px;
}

@media (max-width: 720px) {
  .bid-system {
    grid-template-columns: 1fr;
  }

  .bid-rail {
    position: sticky;
    top: 0;
    z-index: 6;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    min-height: 0;
    width: 100%;
    padding: 8px;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
  }

  .bid-rail-exit {
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .bid-rail-item {
    flex: 0 0 auto;
    width: 64px;
  }

  .bid-rail-label {
    display: none;
  }

  .bid-deadline-date {
    margin-left: 0;
  }
}

.bid-deadline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-recessed);
}

.bid-deadline-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.bid-deadline-remaining {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.bid-deadline-date {
  margin-left: auto;
  font-size: 0.92rem;
  color: var(--muted);
}

.bid-deadline-ok {
  border-color: color-mix(in srgb, #2f8f5b 40%, var(--border));
  background: color-mix(in srgb, #2f8f5b 10%, var(--panel-recessed));
}

.bid-deadline-soon {
  border-color: color-mix(in srgb, #c98512 50%, var(--border));
  background: color-mix(in srgb, #c98512 12%, var(--panel-recessed));
}

.bid-deadline-soon .bid-deadline-remaining {
  color: #a66a00;
}

.bid-deadline-urgent,
.bid-deadline-closed {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  background: color-mix(in srgb, var(--danger) 12%, var(--panel-recessed));
}

.bid-deadline-urgent .bid-deadline-remaining,
.bid-deadline-closed .bid-deadline-remaining {
  color: var(--danger);
}

.bid-deadline-unknown .bid-deadline-remaining {
  font-size: 1.1rem;
}

.bid-hero {
  margin-top: 10px;
  padding-top: 4px;
}

.bid-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 6px;
  font-size: 0.92rem;
}

.bid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.bid-col h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.bid-col h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.bid-file-list,
.bid-note-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bid-file-list li,
.bid-note-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-recessed);
  border: 1px solid var(--border);
}

.bid-file-list button.file-open-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 650;
  color: var(--accent, #0b5cab);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.bid-file-list button.file-open-link:hover:not(:disabled) {
  filter: brightness(1.08);
}

.docs-panel .docs-toolbar {
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.docs-summary {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.docs-collect-status {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--accent, #2f6fed);
  background: color-mix(in srgb, var(--accent, #2f6fed) 8%, transparent);
  font-size: 0.92rem;
  line-height: 1.35;
}

.docs-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-recessed);
  padding: 2px 4px 2px 2px;
}

.docs-row-actions {
  position: relative;
  display: flex;
  align-items: center;
}

.docs-row-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel, #fff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.docs-row-menu button {
  text-align: left;
  justify-content: flex-start;
}

.bid-step-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.req-translation {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted, #5c6570);
  background: #eef3f8;
  border-radius: 999px;
  padding: 1px 8px;
}

.docs-row-main {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}

.docs-row-main:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent, #0b5cab) 8%, transparent);
}

.docs-badge {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 4px;
  line-height: 1.1;
}

.docs-badge-rfp {
  color: #0b4a6f;
  background: color-mix(in srgb, #0b5cab 16%, transparent);
}

.docs-badge-proponent {
  color: #5a3d08;
  background: color-mix(in srgb, #c48a1a 18%, transparent);
}

.docs-name {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-meta {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-foot {
  margin-top: 10px;
}

.docs-copilot {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.docs-copilot textarea {
  width: 100%;
  margin-top: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}

.docs-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 10px;
}

.docs-view-heading {
  margin: 16px 0 6px;
  font-size: 0.95rem;
}

.docs-view-text {
  margin: 0;
  max-height: min(60vh, 560px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-muted, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border);
}

.docs-upload {
  max-width: 320px;
}

.docs-upload-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-recessed, transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.docs-upload-selected {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.docs-dropzone {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border: 1.5px dashed color-mix(in srgb, var(--accent, #2f6fed) 45%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #2f6fed) 6%, transparent);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.docs-dropzone.is-active {
  border-color: var(--accent, #2f6fed);
  background: color-mix(in srgb, var(--accent, #2f6fed) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, #2f6fed) 35%, transparent);
}

.docs-dropzone.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.docs-dropzone-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  pointer-events: none;
}

.docs-dropzone-copy strong {
  font-size: 0.98rem;
}

.docs-dropzone-copy span {
  font-size: 0.84rem;
  color: var(--muted, #889);
}

.docs-activity {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent, #2f6fed) 5%, transparent);
}

.docs-activity-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.docs-activity-list li {
  padding: 2px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  white-space: pre-wrap;
  word-break: break-word;
}

.docs-activity-list li:last-child {
  border-bottom: 0;
}

.docs-empty-hint {
  margin-top: 10px;
}

.bid-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.bid-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted, #667);
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  font: inherit;
  cursor: pointer;
}

.bid-tabs button.active {
  color: var(--text);
  background: var(--panel-recessed);
  font-weight: 650;
  box-shadow: inset 0 -2px 0 var(--accent, #0b5cab);
}

.kebab {
  position: relative;
}

.kebab-toggle {
  min-width: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  background: var(--panel, #fff);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.kebab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: transparent;
}

.kebab-menu.kebab-menu-portal {
  position: fixed;
  right: auto;
  top: auto;
  z-index: 100;
}

.kebab-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

.kebab-menu button:hover:not(:disabled) {
  background: var(--panel-recessed);
}

.kebab-menu hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.kebab-menu a.kebab-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
}

.kebab-menu a.kebab-link:hover {
  background: var(--panel-recessed);
}

.opp-table.opp-table-compact {
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
}

.opp-table.opp-table-compact thead th {
  padding: 6px 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opp-table.opp-table-compact tbody tr.opp-row td {
  padding: 8px 10px;
  vertical-align: middle;
  border-radius: 0;
}

.opp-table.opp-table-compact tbody tr.opp-row td:first-child {
  border-radius: 8px 0 0 8px;
}

.opp-table.opp-table-compact tbody tr.opp-row td:last-child {
  border-radius: 0 8px 8px 0;
}

.opp-table.opp-table-compact .opp-col-rules,
.opp-table.opp-table-compact .opp-col-ai {
  width: 5.5rem;
  white-space: nowrap;
  overflow: hidden;
}

.opp-table.opp-table-compact .opp-col-due {
  width: 9.5rem;
  max-width: 9.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opp-table.opp-table-compact .opp-col-menu {
  width: 2.75rem;
  text-align: right;
  overflow: visible;
  position: relative;
}

.opp-table.opp-table-compact tbody tr.opp-row td.opp-col-menu {
  overflow: visible;
  z-index: 1;
}

.opp-table.opp-table-compact tbody tr.opp-row:has(.kebab.open) {
  position: relative;
  z-index: 20;
}

.opp-table.opp-table-compact tbody tr.opp-row:has(.kebab.open) td.opp-col-menu {
  z-index: 30;
}

.kebab.open {
  z-index: 40;
}

.kebab.open .kebab-menu {
  z-index: 50;
}

.opp-table.opp-table-compact .opp-col-title-compact {
  min-width: 0;
}

.opp-title-ellipsis {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
}

a.opp-title-ellipsis:hover {
  text-decoration: underline;
}

.opp-due-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.opp-fit-why {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opp-buyer-site {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.opp-buyer-unknown {
  color: var(--danger);
  font-weight: 650;
}

.buyer-account-list {
  display: grid;
  gap: 12px;
}

.buyer-account-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.buyer-account-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.buyer-account-card label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.buyer-account-card .row.actions a.btn,
.buyer-account-card .row.actions button {
  cursor: pointer;
}

.opp-table.opp-table-compact .score {
  display: inline;
  margin-right: 4px;
}

.opp-table.opp-table-compact .score-label {
  display: inline;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

button.ai-fit-get {
  padding: 3px 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  min-height: 0;
  white-space: nowrap;
}

.ai-fit-spinner {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-top-color: var(--accent-strong, var(--accent));
  border-radius: 50%;
  animation: ai-fit-spin 0.65s linear infinite;
  vertical-align: middle;
}

@keyframes ai-fit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-fit-spinner { animation: none; border-top-color: var(--accent); opacity: 0.7; }
}

.view-toggle {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--muted);
}

.view-toggle button.active {
  background: var(--panel-recessed);
  color: var(--text);
  font-weight: 600;
}

.bid-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.bid-honest-take {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--panel-recessed);
}

.bid-honest-take h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.bid-honest-take > p {
  margin: 0 0 8px;
  line-height: 1.45;
}

.bid-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 820px) {
  .bid-match-grid {
    grid-template-columns: 1fr;
  }
}

.bid-match-col {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-recessed);
  padding: 12px 14px;
  min-width: 0;
}

.bid-match-col h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
}

.bid-match-yes {
  border-color: color-mix(in srgb, #2f8f5b 45%, var(--border));
}

.bid-match-no {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
}

.bid-match-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bid-match-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.35;
}

.bid-match-tag {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
  min-width: 4.5rem;
}

.bid-check-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bid-check-list label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.bid-pursuit-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bid-pursuit-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
}

.bid-pursuit-list li.done .bid-pursuit-mark {
  color: #15803d;
}

.bid-pursuit-mark {
  width: 1.1em;
  color: var(--muted, #64748b);
}

.bid-next-action {
  margin: 6px 0 0;
  font-size: 14px;
}

.bid-gap-strip {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}

.bid-gap-chip {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--hairline, #d1d5db);
  border-radius: 4px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
}

.bid-assessment-editor {
  width: 100%;
  box-sizing: border-box;
}

.bid-assessment-view {
  margin-top: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-recessed, transparent);
  min-height: 280px;
}

.markdown-editor .EasyMDEContainer {
  width: 100%;
}

.markdown-editor .EasyMDEContainer .CodeMirror {
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  background: var(--panel);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.markdown-editor .EasyMDEContainer .CodeMirror-cursor {
  border-left-color: var(--text);
}

.markdown-editor .EasyMDEContainer .editor-toolbar {
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--panel-raised);
  opacity: 1;
}

.markdown-editor .EasyMDEContainer .editor-toolbar button {
  color: var(--text) !important;
}

.markdown-editor .EasyMDEContainer .editor-toolbar button:hover,
.markdown-editor .EasyMDEContainer .editor-toolbar button.active {
  background: color-mix(in srgb, var(--accent) 16%, transparent) !important;
  border-color: transparent !important;
}

.markdown-editor .EasyMDEContainer .editor-toolbar i.separator {
  border-left-color: var(--hairline);
  border-right-color: var(--hairline);
}

.markdown-editor .EasyMDEContainer .editor-preview,
.markdown-editor .EasyMDEContainer .editor-preview-side {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}

.markdown-editor .EasyMDEContainer .editor-statusbar {
  color: var(--muted);
}

.markdown-viewer {
  line-height: 1.55;
  font-size: 0.95rem;
  color: var(--text);
}

.markdown-viewer > *:first-child {
  margin-top: 0;
}

.markdown-viewer > *:last-child {
  margin-bottom: 0;
}

.markdown-viewer h1,
.markdown-viewer h2,
.markdown-viewer h3,
.markdown-viewer h4 {
  margin: 1.1em 0 0.45em;
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.markdown-viewer h1 { font-size: 1.35rem; }
.markdown-viewer h2 { font-size: 1.18rem; }
.markdown-viewer h3 { font-size: 1.05rem; }

.markdown-viewer p,
.markdown-viewer ul,
.markdown-viewer ol {
  margin: 0.55em 0;
}

.markdown-viewer ul,
.markdown-viewer ol {
  padding-left: 1.35rem;
}

.markdown-viewer li + li {
  margin-top: 0.25em;
}

.markdown-viewer strong {
  font-weight: 750;
}

.markdown-viewer code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--panel-raised) 80%, var(--border));
}

.markdown-viewer pre {
  overflow: auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--hairline);
  background: var(--panel-raised);
}

.markdown-viewer pre code {
  padding: 0;
  background: transparent;
}

.markdown-viewer blockquote {
  margin: 0.7em 0;
  padding: 0.2em 0 0.2em 0.9em;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--muted);
}

.markdown-viewer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.7em 0;
}

.markdown-viewer th,
.markdown-viewer td {
  border: 1px solid var(--hairline);
  padding: 6px 8px;
  text-align: left;
}

.markdown-viewer th {
  background: var(--panel-raised);
}

.markdown-viewer a {
  color: var(--accent-strong);
}

.markdown-viewer-empty {
  margin: 0;
}

.markdown-editor .EasyMDEContainer .editor-preview h1,
.markdown-editor .EasyMDEContainer .editor-preview-side h1,
.markdown-editor .EasyMDEContainer .editor-preview h2,
.markdown-editor .EasyMDEContainer .editor-preview-side h2,
.markdown-editor .EasyMDEContainer .editor-preview h3,
.markdown-editor .EasyMDEContainer .editor-preview-side h3 {
  margin: 1em 0 0.4em;
  line-height: 1.25;
  font-weight: 750;
}

.markdown-editor .EasyMDEContainer .editor-preview ul,
.markdown-editor .EasyMDEContainer .editor-preview-side ul,
.markdown-editor .EasyMDEContainer .editor-preview ol,
.markdown-editor .EasyMDEContainer .editor-preview-side ol {
  padding-left: 1.35rem;
}

.markdown-editor .EasyMDEContainer .editor-preview strong,
.markdown-editor .EasyMDEContainer .editor-preview-side strong {
  font-weight: 750;
}

.bid-table-scores {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bid-table-scores th,
.bid-table-scores td {
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--hairline, #e5e7eb);
}

.bid-table-scores tr.below-floor td {
  color: #b45309;
}

.bid-comp-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bid-comp-row span {
  flex: 1;
}

.bid-inline-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-recessed);
}

.bid-details {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-recessed);
}

.bid-details summary {
  cursor: pointer;
  font-weight: 650;
}

.bid-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.bid-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.bid-mini-table th,
.bid-mini-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.bid-mini-table tr.req-flagged {
  background: color-mix(in srgb, #f59e0b 12%, transparent);
}

.req-matrix-summary {
  font-size: 12px;
  margin: 0 0 8px;
}

.req-toolbar {
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.req-toolbar-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.toolbar-menu-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 4px 0;
}

.toolbar-menu-label:first-child {
  padding-top: 0;
}

.req-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

button.req-filter-active {
  outline: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-raised));
}

.req-walk-panel {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-raised));
  box-shadow: inset 4px 0 0 var(--accent);
}

.walk-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 80;
}

.walk-overlay {
  position: fixed;
  z-index: 81;
  left: 50%;
  top: 3vh;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 24px));
  max-height: 94vh;
  overflow: auto;
  padding: 22px 24px;
  border-radius: 14px;
  background: #111;
  color: #f4f4f4;
  border: 1px solid #333;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.walk-overlay textarea,
.walk-overlay .bid-chat-input {
  width: 100%;
  box-sizing: border-box;
  background: #1a1a1a;
  color: #f4f4f4;
  border-color: #333;
}

.walk-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8c8c8;
  margin-bottom: 2px;
}

.walk-verdict {
  margin: 0 0 8px;
  font-weight: 800;
  color: #f2c14e;
}

.walk-meta {
  margin: 0 0 12px;
  padding: 10px 12px;
  white-space: pre-wrap;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d0d0d0;
  background: #1a1a1a;
  border-radius: 8px;
}

.walk-rule {
  border: 0;
  border-top: 1px solid #333;
  margin: 16px 0;
}

.walk-catalog-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 90;
}

.walk-catalog-panel {
  position: fixed;
  z-index: 91;
  right: 20px;
  top: 8vh;
  width: min(440px, calc(100vw - 32px));
  max-height: 84vh;
  overflow: auto;
  padding: 16px 18px;
  border-radius: 12px;
  background: #161616;
  color: #f4f4f4;
  border: 1px solid #3a3a3a;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.walk-catalog-hit {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1f1f1f;
}

.req-walk-ref {
  margin: 10px 0 4px;
  font-weight: 700;
}

.req-walk-text {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.req-walk-cite {
  margin: 0 0 10px;
}

.req-walk-cite blockquote {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  white-space: pre-wrap;
}

.req-walk-log {
  max-height: 280px;
  overflow: auto;
  margin: 0 0 10px;
}

.req-card.req-walk-current {
  outline: 2px solid var(--accent);
  box-shadow: inset 4px 0 0 var(--accent);
}

.req-card.req-done {
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--interest) 55%, transparent);
}

.req-done-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--interest-strong);
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--interest) 16%, transparent);
}

.bid-req-review-modal {
  max-width: min(40rem, calc(100vw - 2rem));
}

.req-review-context {
  display: grid;
  gap: 8px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-deep) 50%, transparent);
  font-size: 0.92rem;
  line-height: 1.45;
}

.req-review-req {
  font-weight: 700;
  color: var(--text);
  margin: 4px 0;
}

.req-review-aiwhy {
  color: var(--muted);
}

.req-matrix {
  margin-top: 4px;
}

.req-matrix-list {
  display: grid;
  gap: 16px;
}

.req-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  border: none;
  border-radius: 12px;
  background: var(--row-odd);
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--accent) 35%, transparent);
}

.req-card.req-stripe {
  background: var(--row-even);
}

.req-card.req-flagged {
  background: color-mix(in srgb, #f59e0b 12%, var(--row-odd));
  box-shadow: inset 4px 0 0 color-mix(in srgb, #f59e0b 75%, transparent);
}

.req-card.req-flagged.req-stripe {
  background: color-mix(in srgb, #f59e0b 12%, var(--row-even));
}

.req-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  min-width: 0;
}

.req-line-id {
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 14px;
}

.req-line-id .req-id {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.req-line-id .req-pri,
.req-line-id .req-table {
  flex: 0 0 auto;
  white-space: nowrap;
}

.req-line-id .req-del {
  margin-left: auto;
  flex: 0 0 auto;
}

.req-line-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.req-line-main .req-text {
  flex: 1 1 auto;
  min-width: 0;
}

.req-context-btn {
  flex: 0 0 auto;
  margin-top: 2px;
}

.req-line-source {
  font-size: 0.78rem;
  line-height: 1.35;
}

.req-source-excerpt {
  margin: 6px 0 0;
  padding: 10px 12px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--panel-raised) 70%, transparent);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.92rem;
  line-height: 1.45;
}

.bid-req-context-modal {
  max-width: min(640px, 94vw);
  max-height: min(85vh, 900px);
  overflow: auto;
}

.req-id {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.req-pri,
.req-table {
  font-size: 0.82rem;
}

.req-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--text);
}

.req-del {
  justify-self: end;
}

.req-line-match {
  align-items: stretch;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-deep) 55%, transparent);
}

.req-match-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  flex: 1 1 16rem;
  min-width: 0;
}

.req-ai-why {
  flex: 1 1 12rem;
  font-size: 0.9rem;
  line-height: 1.45;
  min-width: 0;
  color: var(--muted);
}

.req-line-response {
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-deep) 40%, transparent);
}

.req-agree-block {
  flex: 1 1 16rem;
  min-width: 0;
  display: grid;
  gap: 6px;
}

.req-agree-mark {
  font-size: 11px;
  text-transform: lowercase;
}

.req-line-response .req-final-comment {
  flex: 1 1 auto;
  min-width: 10rem;
}

.req-draft {
  font-size: 0.82rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.req-final-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.req-caps {
  font-size: 11px;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.req-flag {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
}

.req-ai-match {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
  border: none;
  background: color-mix(in srgb, var(--muted) 22%, transparent);
  color: var(--text);
}

.req-ai-match-match {
  color: #86efac;
  background: color-mix(in srgb, #22c55e 22%, transparent);
}

.req-ai-match-partial {
  color: #fde68a;
  background: color-mix(in srgb, #eab308 22%, transparent);
}

.req-ai-match-gap {
  color: #fca5a5;
  background: color-mix(in srgb, #ef4444 22%, transparent);
}

.req-ai-match-unclear {
  color: #d7deea;
  background: color-mix(in srgb, #94a3b8 20%, transparent);
}

.req-agree-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.req-agree-reason {
  width: 100%;
  min-width: 140px;
  font-size: 12px;
}

button.req-agree-active {
  outline: 1px solid #86efac;
}

button.req-disagree-active {
  outline: 1px solid #fca5a5;
}

@media (max-width: 900px) {
  .req-line-id {
    flex-wrap: wrap;
  }

  .req-line-id .req-id {
    flex: 1 1 100%;
    white-space: normal;
  }

  .req-line-response {
    flex-wrap: wrap;
  }

  .req-line-response .req-final-comment {
    flex: 1 1 100%;
  }
}

.req-final-comment {
  width: 100%;
  min-width: 140px;
  font: inherit;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel, #fff);
  color: inherit;
}

.bid-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 50;
}

.bid-modal {
  position: fixed;
  z-index: 51;
  left: 50%;
  top: 10vh;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  max-height: 80vh;
  overflow: auto;
}

.bid-skip-modal textarea {
  width: 100%;
  min-height: 120px;
  box-sizing: border-box;
  resize: vertical;
}

.bid-skip-modal .input-invalid {
  border-color: color-mix(in srgb, #dc2626 70%, var(--border));
  outline-color: #dc2626;
}

.bid-skip-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #9a3412;
  background: color-mix(in srgb, #fb923c 18%, var(--panel-raised));
  border: 1px solid color-mix(in srgb, #fb923c 35%, transparent);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-tools-modal {
  width: min(720px, calc(100vw - 24px));
  top: 6vh;
  max-height: 88vh;
}

.review-tool-block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.review-tool-block:first-of-type {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
}

.review-tool-block h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}


.bid-note-body {
  white-space: pre-wrap;
  line-height: 1.4;
  margin: 4px 0 8px;
}

.bid-note-input,
.bid-chat-input {
  width: 100%;
  resize: vertical;
  margin-top: 6px;
}

.bid-chat-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

.bid-chat-log {
  flex: 1 1 auto;
  min-height: 16rem;
  max-height: 48vh;
  overflow: auto;
  margin: 10px 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--panel-recessed);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bid-chat-msg {
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 95%;
}

.bid-chat-msg.user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--interest) 18%, var(--panel-raised));
}

.bid-chat-msg.assistant {
  align-self: flex-start;
  background: var(--panel-raised);
  border: 1px solid var(--border);
}

.bid-chat-role {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.bid-chat-content {
  white-space: pre-wrap;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .bid-grid {
    grid-template-columns: 1fr;
  }

  .bid-chat-panel {
    position: static;
    max-height: none;
  }
}

.dash {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dash-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-section-title {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dash-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--panel-raised) 88%, #0f766e) 0%, var(--panel-raised) 55%);
  text-decoration: none;
  color: inherit;
  min-height: 6.5rem;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

a.dash-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  color: inherit;
  text-decoration: none;
}

.dash-tile-static {
  cursor: default;
}

.dash-tile-interest {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--interest-soft) 70%, var(--panel-raised)) 0%, var(--panel-raised) 60%);
}

.dash-tile-bid {
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--panel-raised)) 0%, var(--panel-raised) 60%);
}

.dash-tile-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.dash-tile-value {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}

.dash-tile-hint {
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

.dash-panel {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--panel);
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-list a {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.dash-list a:hover {
  color: var(--accent-strong);
}

.dash-list-meta {
  font-size: 0.78rem;
}

.dash-ops {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-ops > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.dash-ops dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.dash-ops dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.dash-actions a.secondary {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--panel-recessed);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
}

.dash-actions a.secondary:hover {
  color: var(--accent-strong);
}

@media (max-width: 960px) {
  .dash-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .dash-tiles {
    grid-template-columns: 1fr;
  }

  .dash-ops > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Settings sub-navigation */
.settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.settings-subnav a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, var(--border, #ccc) 70%, transparent);
  font-size: 0.9rem;
}

.settings-subnav a.active,
.settings-subnav a:hover {
  border-color: var(--accent, #5a7);
  background: color-mix(in srgb, var(--accent, #5a7) 12%, transparent);
}

.settings-shell {
  margin-bottom: 8px;
}

.fit-details {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--border, #ccc) 70%, transparent);
  border-radius: 8px;
  padding: 8px 12px;
}

.fit-details summary {
  cursor: pointer;
  font-weight: 600;
}

.fit-pre {
  margin: 10px 0 4px;
  padding: 10px 12px;
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.4;
  background: color-mix(in srgb, var(--panel, #111) 92%, var(--accent, #5a7));
  border-radius: 6px;
}

.fit-terms {
  font-size: 0.9rem;
  word-break: break-word;
}

.fit-wrap {
  word-break: break-all;
}

body:has(.settings-shell) .shell {
  max-width: min(1200px, 96vw);
}

body:has(.symon-panel) .shell {
  max-width: min(1600px, 96vw);
}

.symon-wide {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  min-height: 16rem;
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
}

.symon-ask-log {
  min-height: 8rem;
  max-height: 22rem;
  margin-bottom: 10px;
}

.symon-filters {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.symon-search {
  flex: 1 1 16rem;
  min-width: 12rem;
}

.symon-oos-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.symon-cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.symon-cap-card {
  border: 1px solid color-mix(in srgb, var(--border, #ccc) 80%, transparent);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  background: color-mix(in srgb, var(--panel, #fff) 92%, var(--accent, #888) 8%);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.symon-cap-card:hover {
  border-color: var(--accent, #5a7);
  transform: translateY(-1px);
}

.symon-cap-card.oos {
  opacity: 0.72;
}

.symon-cap-id {
  font-size: 0.78rem;
}

.symon-lane {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.symon-cap-summary {
  margin: 6px 0 4px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.symon-cap-meta {
  font-size: 0.78rem;
}

details.symon-panel > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}


.trust-ops-modal {
  width: min(880px, calc(100vw - 24px));
  top: 4vh;
  max-height: 92vh;
}

.trust-ops-item {
  margin: 12px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline);
}

.trust-ops-help {
  font-size: 0.9rem;
  margin: 0 0 8px;
}

.trust-ops-controls {
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.trust-ops-controls label,
.trust-ops-notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}

.trust-ops-notes {
  width: 100%;
  margin-top: 6px;
}

.trust-ops-notes textarea,
.trust-ops-notes input,
.trust-ops-claim input,
.trust-ops-controls select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--border, var(--hairline));
  border-radius: 6px;
  background: var(--panel-raised, #fff);
  color: inherit;
}

.trust-ops-footer {
  margin-top: 16px;
  position: sticky;
  bottom: 0;
  background: var(--panel);
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

.symon-stance {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--interest-soft);
  color: var(--interest-strong);
}
.operator-facts-input {
  width: 100%;
  resize: vertical;
  min-height: 10rem;
  font: inherit;
  line-height: 1.45;
  padding: 10px 12px;
  border: 1px solid var(--border, var(--hairline));
  border-radius: 8px;
  background: var(--panel-raised, #fff);
  color: inherit;
}