:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F9;
  --border: #E2E6EE;
  --border-strong: #CBD5E1;
  --ink: #0F172A;
  --muted: #475569;
  --navy: #0B2545;
  --primary: #1D4ED8;
  --primary-hover: #1E40AF;
  --primary-soft: #EFF6FF;
  --fit: #05603A;
  --fit-soft: #ECFDF5;
  --fit-ring: #10B981;
  --soon: #8A4B00;
  --soon-soft: #FEF3C7;
  --urgent: #B42318;
  --urgent-soft: #FEE4E2;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0B1120;
  --surface: #111827;
  --surface-alt: #1E293B;
  --border: #1F2937;
  --border-strong: #334155;
  --ink: #F8FAFC;
  --muted: #94A3B8;
  --navy: #1E3A5F;
  --primary: #3B82F6;
  --primary-hover: #60A5FA;
  --primary-soft: rgba(59, 130, 246, 0.14);
  --fit: #34D399;
  --fit-soft: rgba(16, 185, 129, 0.14);
  --fit-ring: #10B981;
  --soon: #FBBF24;
  --soon-soft: rgba(245, 158, 11, 0.14);
  --urgent: #F87171;
  --urgent-soft: rgba(239, 68, 68, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus { left: 16px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.92);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-grid > * { min-width: 0; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.wordmark:hover { text-decoration: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* !important so .btn display rules cannot re-show it on desktop; the <=860px media query re-enables it. */
.mobile-only,
.btn.mobile-only { display: none !important; }

.mobile-drawer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 12px 0 20px;
}
.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-alt); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-icon { min-width: 44px; min-height: 44px; padding: 0; }

@media (max-width: 860px) {
  .container { padding: 0 16px; }
  .header-nav,
  .header-actions .desktop-only,
  .btn.desktop-only {
    display: none !important;
  }
  .header-actions { gap: 8px; flex-shrink: 0; }
  .mobile-only,
  .btn.mobile-only {
    display: inline-flex !important;
  }
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #FFFFFF; }
.btn-outline-primary {
  background: var(--primary-soft);
  border-color: rgba(29, 78, 216, 0.35);
  color: var(--primary);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-danger-ghost {
  background: var(--urgent-soft);
  border-color: transparent;
  color: var(--urgent);
}
.btn-danger {
  background: var(--urgent);
  border-color: var(--urgent);
  color: #FFFFFF;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-sub {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.card-sub-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-sub h3, .sub-h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }

/* Hero */
.hero-section {
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle at top right, rgba(29, 78, 216, 0.06), transparent 48%), var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}

.eyebrow-pill, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eyebrow-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
}

.hero-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-subtitle {
  margin: 0 0 22px;
  font-size: 17px;
  color: var(--muted);
  max-width: 62ch;
}

.hero-search-card { padding: 20px; }
.field-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}
.search-input-row {
  display: flex;
  gap: 10px;
}
.search-input-row input { flex: 1; }

.chip-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.toolbar-label { font-size: 13px; font-weight: 600; color: var(--muted); }

.chip-btn, .region-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.chip-btn:hover, .region-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.region-pill.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.region-fieldset { border: 0; margin: 0; padding: 0; }
.region-fieldset .chip-toolbar { margin-top: 0; }
.filter-select-wrap { min-width: 190px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .search-input-row { flex-direction: column; }
  .filter-select-wrap { width: 100%; }
}

/* Sample Card */
.sample-card { padding: 20px; border-top: 4px solid var(--navy); }
.sample-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.sample-caption { font-size: 12px; color: var(--muted); }
.sample-score-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}
.sample-meta { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.sample-title { margin: 0; font-size: 18px; line-height: 1.3; }
.sample-reasons {
  margin: 14px 0 16px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}
.sample-reasons li + li { margin-top: 4px; }

.fit-ring-static {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid var(--fit-ring);
  background: var(--fit-soft);
  color: var(--fit);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.fit-num { font-size: 17px; font-weight: 700; }
.fit-sub { font-size: 10px; font-weight: 600; text-transform: uppercase; margin-top: 2px; }

/* Freshness Strip */
.freshness-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.freshness-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.freshness-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fit-ring);
  flex-shrink: 0;
}
.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.source-filter-pill {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.source-filter-pill.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* Sections & Chips */
.section-pad { padding: 40px 0; }
.surface-band { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head, .page-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.section-h2, .page-h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.results-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.results-controls select { width: auto; min-width: 170px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.chip-neutral { background: var(--surface-alt); color: var(--muted); border: 1px solid var(--border); }
.chip-region { background: #E0F2FE; color: #075985; }
.chip-source { background: var(--primary-soft); color: var(--primary); }
.chip-sample { background: var(--navy); color: #FFFFFF; }
.chip-fit { background: var(--fit-soft); color: var(--fit); }
.chip-soon, .chip-restricted { background: var(--soon-soft); color: var(--soon); }
.chip-urgent { background: var(--urgent-soft); color: var(--urgent); }
[data-theme="dark"] .chip-region { background: rgba(14, 165, 233, 0.16); color: #7DD3FC; }

/* Tender Cards (1-Column Focused List) */
.tender-stack, .stack-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tender-card, .tender-list-card {
  padding: 20px 22px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tender-card:hover, .tender-list-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.tender-card-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.tender-card-main { flex: 1; min-width: 0; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.tender-title {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.tender-title a { color: var(--ink); }
.tender-title a:hover { color: var(--primary); }
.tender-excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}
.tender-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-size: 14px;
  color: var(--muted);
}
.tender-facts strong { color: var(--ink); }

.tender-card-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* 56px Dynamic SVG Fit Ring */
.fit-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  position: relative;
}
.fit-ring {
  position: relative;
  width: 56px;
  height: 56px;
}
.fit-ring svg { transform: rotate(-90deg); display: block; }
.fit-ring-bg { fill: none; stroke: var(--border); stroke-width: 4.5; }
.fit-ring-fg { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.fit-ring-fg.is-fit { stroke: var(--fit-ring); }
.fit-ring-fg.is-soon { stroke: #D97706; }
.fit-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.fit-ring-score { font-size: 15px; font-weight: 700; color: var(--ink); }
.fit-ring-label { font-size: 10px; font-weight: 600; color: var(--muted); }

.why-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  padding: 6px 8px;
}
.why-popover {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 13px;
}
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.breakdown-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12px;
}

.tender-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 680px) {
  .tender-card-layout { flex-direction: column; }
  .tender-card-aside { flex-direction: row; width: 100%; justify-content: space-between; align-items: center; }
}

.empty-card {
  padding: 32px 24px;
  text-align: center;
}
.empty-card h3 { margin: 0 0 8px; }
.browse-footer { margin-top: 22px; text-align: center; }

/* Workspace Tabs */
.workspace-shell { overflow: hidden; }
.tab-bar-wrap { position: relative; }
.tab-bar-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 1px;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--surface-alt));
}
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0 28px 0 18px;
  background: var(--surface-alt);
  overflow-x: auto;
}
.tab-btn {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tab-btn.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-panel { padding: 22px; }
.workspace-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin-top: 2px; flex-shrink: 0; }

.profile-item-card, .brief-history-card {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

@media (max-width: 820px) {
  .workspace-two-col, .form-row-2 { grid-template-columns: 1fr; }
}

/* Pricing */
.pricing-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.price-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.price-card.is-popular {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.popular-tag {
  position: absolute;
  top: -11px;
  right: 16px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.price-name { margin: 0 0 6px; font-size: 18px; }
.price-amount { font-size: 30px; font-weight: 700; margin: 8px 0; font-family: var(--font-display); }
.price-amount span { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-features {
  margin: 14px 0 18px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--muted);
}
.price-features li + li { margin-top: 6px; }
@media (max-width: 960px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

/* 640px Slide-Over Brief Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 90;
}
.brief-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 100vw);
  background: var(--surface);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-head-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.drawer-h2 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; font-family: var(--font-display); }
.drawer-meta-line { margin: 0 0 16px; font-size: 14px; }
.drawer-tabs { margin: 0 -20px 16px; padding: 0 20px; }
.brief-panel { font-size: 15px; }
.drawer-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.drawer-loading {
  text-align: center;
  padding: 36px 12px;
  color: var(--muted);
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.gate-box { margin-bottom: 18px; border-left: 4px solid var(--primary); }
.inline-auth-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-auth-form input { flex: 1; }
@media (max-width: 520px) { .inline-auth-form { flex-direction: column; } }
.gate-msg { margin: 10px 0 0; font-size: 14px; color: var(--fit); font-weight: 500; }

.check-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.check-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.locked-preview {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--surface-alt);
  overflow: hidden;
}
.locked-preview-blur {
  filter: blur(4px);
  user-select: none;
  opacity: 0.55;
  pointer-events: none;
}
.locked-preview-overlay {
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 14px;
}
.similar-group-banner {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.similar-sub-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
}
.similar-sub-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.source-quote {
  margin-top: 6px;
  padding: 6px 10px;
  background: var(--surface-alt);
  border-left: 3px solid var(--border-strong);
  font-size: 13px;
  color: var(--muted);
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-dialog {
  width: min(460px, 100%);
  padding: 22px;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.modal-h2 { margin: 0; font-size: 19px; font-family: var(--font-display); }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  max-width: min(520px, calc(100vw - 32px));
}
.toast.is-error { background: var(--urgent); }

/* /bids & Legal Pages */
.filter-form-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.9fr auto;
  gap: 10px;
  margin-bottom: 20px;
}
@media (max-width: 780px) { .filter-form-row { grid-template-columns: 1fr; } }

.pagination-bar {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.is-disabled { opacity: 0.45; pointer-events: none; }

.detail-card, .legal-card { padding: 28px; }
.breadcrumb { margin-bottom: 14px; font-size: 14px; }
.detail-h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}
.detail-section { margin-top: 24px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist-row { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-alt); }
.checklist-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.cta-banner {
  margin-top: 26px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1px solid rgba(29, 78, 216, 0.25);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.cta-banner h3 { margin: 0 0 4px; }
.cta-banner p { margin: 0; }
.inline-form { display: flex; gap: 10px; max-width: 480px; }
@media (max-width: 520px) {
  .inline-form { flex-direction: column; }
  .pagination-bar { flex-wrap: wrap; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.center-row { justify-content: center; }
.end-row { justify-content: flex-end; }
.meta-sm { font-size: 13px; }
.mt-xs { margin-top: 6px; }
.mb-sm { margin-bottom: 12px; }
.locked-preview-note { margin: 4px 0 0; }
.text-danger { color: var(--urgent); }
.plain-pre { white-space: pre-wrap; font-family: inherit; }

/* SSO Buttons & Divider */
.sso-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.sso-btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.btn-sso {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-sso:hover {
  background: var(--surface-alt);
  border-color: var(--primary);
}
.sso-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sso-divider::before,
.sso-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}
.auth-sent-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
}
.link-btn-inline {
  background: transparent;
  border: 0;
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 2px;
  min-height: 40px;
}
.link-btn-inline:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
}

@media print {
  .site-header, .site-footer, main, .drawer-backdrop, .drawer-foot, .drawer-tabs, .gate-box {
    display: none !important;
  }
  .brief-drawer {
    position: static;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  .brief-panel { display: block !important; page-break-inside: avoid; margin-bottom: 18px; }
}

/* Locked workspace (non-subscribers) */
.workspace-locked {
  padding: 28px;
  border: 1px dashed var(--border-strong, var(--border));
}
.workspace-locked-body { max-width: 640px; }
.workspace-locked-body h3 { margin: 0 0 8px; }
.workspace-locked-list { margin: 12px 0 16px; }
@media (max-width: 560px) {
  .workspace-locked { padding: 20px 16px; }
}

/* Free-trial banner and pricing fine print */
.trial-banner {
  margin-bottom: 14px; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--primary-soft); color: var(--ink); border-left: 4px solid var(--primary); font-size: 14px;
}
.trial-note { margin: 6px 0 0; text-align: center; }
.pricing-fineprint { text-align: center; margin-top: 16px; }

/* AI verdict line on tender cards */
.ai-why { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--ink); font-size: 14px; line-height: 1.45; }
.ai-why.is-summary { background: var(--surface-alt); color: var(--muted); }
.ai-why-tag { flex: none; font: 700 10.5px var(--font-mono); letter-spacing: .06em; color: var(--primary); border: 1px solid currentColor; border-radius: 4px; padding: 1px 5px; margin-top: 2px; }

/* Free weekly email signup */
.free-alerts-band { padding-top: 8px; }
.free-alerts-card { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; padding: 28px; }
.free-alerts-copy .section-h2 { margin-top: 4px; }
.free-alerts-form { display: flex; flex-direction: column; gap: 12px; }
.free-alerts-form .form-field input { width: 100%; }
.free-alerts-form .checkbox-row span { font-size: 13px; }
.free-alerts-form .btn { align-self: flex-start; }
@media (max-width: 860px) {
  .free-alerts-card { grid-template-columns: 1fr; padding: 20px; gap: 16px; }
  .free-alerts-form .btn { align-self: stretch; }
}

/* ---------- In-site billing ---------- */
.billing-card { grid-column: 1 / -1; }
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.billing-plan { margin: 0 0 4px; font-size: 15px; }
.billing-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.billing-row .btn-row { flex-wrap: nowrap; align-items: center; gap: 8px; max-width: 100%; }
.billing-row .btn-row > span { flex: 1 1 auto; }
.billing-cancel { align-self: stretch; }
.billing-row select { flex: 1 1 auto; min-width: 0; min-height: 34px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); padding: 4px 8px; }
.billing-cancel { display: flex; flex-direction: column; gap: 8px; }
.billing-cancel textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); padding: 8px; font: inherit; }
.billing-refund { grid-column: 1 / -1; border: 1px solid var(--soon); background: var(--soon-soft); border-radius: var(--radius-sm); padding: 12px 14px; }
.billing-refund p { margin: 0 0 8px; color: var(--ink); }
.billing-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.billing-table th, .billing-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.billing-table .num { text-align: right; }
.btn-danger { background: var(--urgent); color: #fff; border: 1px solid var(--urgent); }
.btn-danger:hover { filter: brightness(0.92); }
@media (max-width: 600px) { .billing-table { font-size: 13px; } .billing-table th:nth-child(2), .billing-table td:nth-child(2) { display: none; } }

/* Light theme only on every page (dark mode removed 2026-11-17). */
:root { color-scheme: light; }

/* Pricing currency switch */
.currency-toggle { display: inline-flex; gap: 4px; padding: 4px; margin: 0 auto 18px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; }
.pricing-head + .currency-toggle { display: flex; width: max-content; }
.currency-btn { border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.currency-btn.is-active { background: var(--navy); color: #fff; }

/* ---- Comparison table ---- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.compare-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--muted); }
.compare-table thead th { font-size: 13px; font-weight: 700; color: var(--ink); background: var(--surface-alt); }
.compare-table tbody th { color: var(--ink); font-weight: 600; width: 19%; }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table .compare-us { background: var(--primary-soft); color: var(--ink); width: 27%; }
.compare-table thead .compare-us { background: var(--navy); color: #FFFFFF; }
.compare-yes { color: var(--fit); font-weight: 700; }
.compare-note { margin-top: 12px; text-align: center; }

/* ---- AI bid writer ---- */
.writer-usage { margin: 0 0 14px; }
.import-item { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.import-item-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.import-item-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.import-item p { margin: 4px 0 0; }
#importForm textarea, #companyForm textarea, #briefPanelDraft textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); resize: vertical; }
.draft-body { white-space: pre-wrap; line-height: 1.6; margin-top: 6px; }
.draft-actions { margin-bottom: 8px; }
@media (max-width: 640px) {
  .import-item .btn-row { width: 100%; }
  .compare-table { font-size: 13px; }
}
@media print {
  #briefPanelDraft:not(.hidden) .draft-actions { display: none; }
}

/* ======================================================================
   Rightbid look (from the Claude Design canvas): warm paper background,
   deep navy ink, gold accent, Space Grotesk headings, roomier layout.
   ====================================================================== */
:root {
  --bg: #FBFAF6;
  --surface: #FFFFFF;
  --surface-alt: #F4F1E8;
  --border: #E8E5DC;
  --border-strong: #D9D4C7;
  --ink: #14181F;
  --muted: #4A5260;
  --navy: #12263A;
  --primary: #12263A;
  --primary-hover: #0B1826;
  --primary-soft: #EEF2F6;
  --accent: #F5C518;
  --accent-hover: #E3B40C;
  --accent-soft: #FFF6CC;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-md: 0 10px 30px rgba(18, 38, 58, 0.08);
}
body { background: var(--bg); color: var(--ink); }
a { color: var(--navy); }
.site-header { background: #FFFFFF; border-bottom: 1px solid var(--border); }
.wordmark, .wordmark span { font-family: var(--font-display); font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.nav-link { color: var(--ink); font-weight: 500; }
.section-h2, .page-h1, .hero-title, .drawer-h2, .modal-h2 { font-family: var(--font-display); color: var(--navy); letter-spacing: -0.02em; }
.eyebrow { color: #5B6472; }
.card, .card-sub, .tender-card, .tender-list-card, .price-card { border-color: var(--border); border-radius: var(--radius); }
.btn { border-radius: var(--radius-sm); }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline-primary { background: #FFFFFF; border: 1.5px solid var(--navy); color: var(--navy); }
.btn-outline-primary:hover { background: var(--primary-soft); color: var(--navy); }
.btn-accent { background: var(--accent); border: 1px solid var(--accent); color: var(--navy); font-weight: 700; }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--navy); }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 17px; }
.chip-btn, .region-pill { border-radius: 999px; }
.region-pill.is-active { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.tab-btn.is-active { color: var(--navy); border-color: var(--navy); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--navy); text-decoration: underline; cursor: pointer; }
.text-center { text-align: center; }

/* Hero */
.hero-section.hero-centered { padding: 84px 0 64px; background: var(--bg); border-bottom: 0; }
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.hero-pill { display: inline-flex; background: var(--accent-soft); color: #5C4600; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.hero-centered .hero-title { margin: 0; font-size: clamp(34px, 6vw, 60px); line-height: 1.04; max-width: 900px; }
.hero-centered .hero-subtitle { margin: 0; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.5; color: var(--muted); max-width: 680px; }
.hero-search { width: 100%; max-width: 780px; display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.hero-search-row { display: flex; gap: 10px; flex-wrap: wrap; background: #FFFFFF; border: 1.5px solid var(--border-strong); border-radius: 16px; padding: 10px; box-shadow: var(--shadow-md); }
.hero-search-row input { flex: 1 1 320px; min-width: 0; border: 0; outline: none; font-size: 18px; padding: 12px; background: transparent; color: var(--ink); }
.hero-search-row:focus-within { border-color: var(--navy); }
.hero-search-row .btn { flex: 0 0 auto; }
.hero-chips { justify-content: center; }
.hero-filters { align-self: center; text-align: left; width: 100%; }
.hero-filters summary { cursor: pointer; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); list-style: none; }
.hero-filters summary::-webkit-details-marker { display: none; }
.hero-filters summary::after { content: ' ▾'; }
.hero-filters[open] summary::after { content: ' ▴'; }
.hero-filters .filter-bar { margin-top: 12px; justify-content: center; }
.hero-fineprint { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .hero-section.hero-centered { padding: 48px 0 40px; }
  .hero-search-row .btn { width: 100%; }
}

/* How it works */
.how-band { background: #FFFFFF; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }
.how-step { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.how-step h3 { margin: 0; font-size: 19px; color: var(--navy); }
.how-step p { margin: 0; color: var(--muted); line-height: 1.55; }
.how-num { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* AI band */
.ai-band { background: var(--navy); color: #FFFFFF; }
.ai-band .section-h2 { color: #FFFFFF; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.ai-card { background: #1B3550; border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.ai-card h3 { margin: 0; font-size: 18px; color: var(--accent); }
.ai-card p { margin: 0; color: #D5DDE8; line-height: 1.55; }

/* Bands and pricing */
.surface-band { background: var(--surface-alt); }
.free-alerts-card { background: var(--accent-soft); border-color: #F0DE8C; }
.price-card.is-popular { border: 2px solid var(--navy); }
.compare-table thead .compare-us { background: var(--navy); }
.compare-table .compare-us { background: #FFFBEA; }
.chip-fit { background: #E6F4EA; color: #1E6B3A; }
.live-dot { background: #1E9E5A; }

/* ---- Pages ---- */
[hidden] { display: none !important; }
.nav-link.is-current { color: var(--navy); font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.hero-section.hero-compact { padding: 28px 0 20px; }
.hero-compact .hero-pill, .hero-compact .hero-subtitle, .hero-compact .hero-fineprint { display: none; }
.hero-compact .hero-title { font-size: clamp(24px, 3.4vw, 34px); }
.hero-compact .hero-inner { gap: 12px; }

/* ---- Pricing: short cards + folded feature table ---- */
.price-tagline { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.price-card .price-features { font-size: 14px; }
.price-card .price-features li + li { margin-top: 4px; }
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan-details { margin-top: 18px; }
.plan-details summary { cursor: pointer; text-align: center; font-weight: 600; color: var(--navy); padding: 10px; list-style: none; }
.plan-details summary::-webkit-details-marker { display: none; }
.plan-details summary::after { content: ' ▾'; }
.plan-details[open] summary::after { content: ' ▴'; }
.plan-matrix { min-width: 560px; font-size: 13px; }
.plan-matrix td { text-align: center; color: var(--ink); }
.compare-two { min-width: 0; }
.compare-two .compare-us { width: 40%; }
.any-tender-band { background: #FFFFFF; border-bottom: 1px solid var(--border); }
.any-tender { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.any-tender-copy { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.any-tender-copy .section-h2, .any-tender-copy p { margin: 0; }
.any-tender-steps { margin: 0; padding: 22px 22px 22px 44px; background: var(--accent-soft); border-radius: 16px; display: flex; flex-direction: column; gap: 12px; line-height: 1.5; }
@media (max-width: 760px) { .any-tender { grid-template-columns: 1fr; } }
/* Feature table: fixed, even columns; plan names and values share the same centre line. */
.plan-matrix { table-layout: fixed; width: 100%; }
.plan-matrix thead th:first-child, .plan-matrix tbody th { width: 34%; text-align: left; }
.plan-matrix thead th:not(:first-child), .plan-matrix td { width: 22%; text-align: center; }
.plan-matrix th, .plan-matrix td { vertical-align: middle; }

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.checkout-summary, .checkout-pay { padding: 24px; }
.checkout-summary { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.checkout-plan-name { margin: 0; }
.checkout-price { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 700; color: var(--navy); }
.checkout-price .muted { font-size: 15px; font-weight: 500; margin-left: 4px; }
.checkout-trial { margin: 0; background: var(--accent-soft); color: #5C4600; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.checkout-trial:empty { display: none; }
#checkoutMount { min-height: 120px; }
.checkout-secure { margin: 12px 0 0; }
@media (max-width: 860px) { .checkout-grid { grid-template-columns: 1fr; } .checkout-summary { position: static; } }
