
/* ==============================================================
   Praevio wireframes — shared stylesheet
   Design tokens, layout, response block, editor, workbench
   ============================================================== */

:root {
  --bg: #FAF7F2;
  --panel: #FFFFFF;
  --panel-alt: #F4F0E8;
  --border: #E8E3DA;
  --border-strong: #D4CDC0;
  --text: #1A1814;
  --text-muted: #66625A;
  --text-subtle: #938E85;
  --accent: #0F4C4A;
  --accent-hover: #0a3a38;
  --accent-soft: #D6E5E3;
  --green: #4A7C59;
  --amber: #C08B3F;
  --red: #A0522D;
  --green-bg: #EAEFEA;
  --amber-bg: #F5ECDB;
  --red-bg: #F0E0D5;
  --grey-bg: #EEEAE2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Geist', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ TOP NAV ============ */
nav.top {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 24px;
}
.brand {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.brand::after { content: '.'; color: var(--amber); }
.nav-items { display: flex; gap: 2px; flex: 1; }
.nav-item {
  padding: 6px 12px;
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.nav-item.active { color: var(--text); background: var(--panel-alt); }
.nav-item:hover:not(.active) { color: var(--text); }
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 11px;
  font-family: 'Geist Mono', monospace;
}

/* ============ LANDING PAGE ============ */
main.landing {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}
.hero { margin-bottom: 56px; }
.eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 14px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 28px;
  color: var(--text);
}
.hero h1 em { font-style: italic; color: var(--accent); }

.dropzone {
  display: block;
  width: 100%;
  border: 1.5px dashed var(--border-strong);
  background: var(--panel);
  border-radius: 12px;
  padding: 44px 32px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.dropzone .title { font-weight: 500; margin-bottom: 4px; font-size: 15px; }
.dropzone .subtitle { color: var(--text-muted); font-size: 13px; }
.dropzone .accepts {
  margin-top: 14px;
  display: inline-flex;
  gap: 6px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dropzone .accepts span {
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
}
.hero-secondary {
  margin-top: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.hero-secondary a {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.section-head .count {
  font-family: 'Geist Mono', monospace;
  color: var(--text-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bid-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bid-item {
  background: var(--panel);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  transition: background 0.1s;
}
.bid-item:hover { background: var(--panel-alt); }

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.red { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.dot.green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot.grey { background: var(--text-subtle); box-shadow: 0 0 0 3px var(--grey-bg); }

.bid-main .title {
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 3px;
  letter-spacing: -0.005em;
}
.bid-main .meta {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
}
.bid-due {
  font-size: 11px;
  font-family: 'Geist Mono', monospace;
  text-align: right;
  color: var(--text-muted);
}
.bid-due .days { font-weight: 500; font-size: 13px; display: block; color: var(--text); letter-spacing: -0.01em; }
.bid-due.urgent .days { color: var(--red); }
.bid-due.soon .days { color: var(--amber); }
.bid-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
}
.status-drafting { background: var(--amber-bg); color: var(--amber); }
.status-review { background: var(--accent-soft); color: var(--accent); }
.status-qualifying { background: var(--grey-bg); color: var(--text-muted); }

aside.rail { display: flex; flex-direction: column; gap: 20px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.panel h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.alert-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.alert-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
}
.alert-item .alert-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.alert-item strong { font-weight: 500; }
.alert-item .muted { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.alert-item a { color: var(--accent); font-weight: 500; }
.alert-item a:hover { text-decoration: underline; }

.health-meter { margin: 2px 0 16px; }
.health-meter .track {
  height: 5px;
  background: var(--panel-alt);
  border-radius: 3px;
  overflow: hidden;
}
.health-meter .fill {
  height: 100%;
  background: var(--green);
  width: 82%;
  border-radius: 3px;
}
.health-label {
  display: flex;
  justify-content: space-between;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  margin-top: 8px;
  color: var(--text-muted);
}
.health-label strong { color: var(--text); font-weight: 500; }

/* ============ BID HEADER ============ */
.bid-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.back-link {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.back-link::before { content: '← '; }
.back-link:hover { color: var(--text); }
.bid-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.bid-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  flex: 1;
}
.bid-meta strong { color: var(--red); font-weight: 500; }
.actions { display: flex; gap: 6px; margin-left: auto; }
.btn {
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
}
.btn:hover { background: var(--panel-alt); }
.btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--text-subtle);
  cursor: not-allowed;
}

/* ============ WORKBENCH (two-column) ============ */
.workbench {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 52px - 57px);
}

/* sections sidebar */
aside.sections {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
}
.section-group { margin-bottom: 16px; }
.section-group-title {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  padding: 0 10px 6px;
}
.section-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.section-item:hover { background: var(--panel-alt); }
.section-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.section-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  justify-self: center;
  box-shadow: none;
}
.section-item .dot.red { background: var(--red); box-shadow: 0 0 0 2.5px var(--red-bg); }
.section-item .dot.amber { background: var(--amber); box-shadow: 0 0 0 2.5px var(--amber-bg); }
.section-item .dot.green { background: var(--green); box-shadow: 0 0 0 2.5px var(--green-bg); }
.section-item .dot.grey { background: var(--text-subtle); box-shadow: 0 0 0 2.5px var(--grey-bg); }
.section-item .badge {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--text-subtle);
}
.section-item.active .badge { color: var(--accent); }

.sidebar-foot {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--border);
}
.progress-label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.progress-label strong { color: var(--text); font-weight: 500; }
.progress-track {
  height: 4px;
  background: var(--panel-alt);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
}

/* ============ EDITOR AREA ============ */
main.editor {
  padding: 28px 40px 60px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}

/* ============ RESPONSE BLOCK PATTERN ============
   Consistent across every Response section:
   1. criterion-callout  — what you're responding to
   2. chips-row          — state, assignee, word count, sources, AI help
   ====================================================== */
.criterion-callout {
  background: var(--panel-alt);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 24px;
}
.criterion-callout .label {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.criterion-callout .label .weight {
  color: var(--accent);
  font-weight: 600;
}
.criterion-callout .text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}
.chip:hover { background: var(--panel-alt); color: var(--text); }
.chip.status { background: var(--amber-bg); color: var(--amber); border-color: transparent; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.chip.status.green { background: var(--green-bg); color: var(--green); }
.chip.status.red { background: var(--red-bg); color: var(--red); }
.chip.status.grey { background: var(--grey-bg); color: var(--text-muted); }
.chip.assignee { color: var(--text); }
.chip .mini-av {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}
.chip strong { color: var(--text); font-weight: 500; }
.chip.over-limit { background: var(--red-bg); color: var(--red); border-color: transparent; font-weight: 600; }
.chip.near-limit { background: var(--amber-bg); color: var(--amber); border-color: transparent; }

/* ── Assignee dropdown ── */
.assignee-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  min-width: 210px;
  overflow: hidden;
}
.assignee-dropdown:empty { display: none; }
.assignee-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  font-family: inherit;
}
.assignee-option:hover:not(:disabled) { background: var(--panel-alt); }
.assignee-option:disabled { opacity: 0.45; cursor: not-allowed; }
.assignee-name { flex: 1; }
.assignee-role { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.no-account { font-size: 10px; color: var(--amber); background: var(--amber-bg); padding: 1px 5px; border-radius: 3px; }
.assignee-option.unassign { color: var(--text-muted); border-top: 1px solid var(--border); font-size: 12px; }
.assignee-empty { padding: 12px 14px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.assignee-empty a { color: var(--accent); }

/* ── Bubble menu (floating selection toolbar) ── */
.bubble-menu {
  position: absolute;
  z-index: 200;
  display: none;
  gap: 2px;
  padding: 5px 6px;
  background: #1C2B2A;
  border-radius: 7px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  pointer-events: auto;
}
.bubble-menu button {
  padding: 4px 8px;
  border: none;
  background: none;
  color: #E8F4F0;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Geist Mono', monospace;
  white-space: nowrap;
  line-height: 1.4;
}
.bubble-menu button:hover { background: rgba(255,255,255,0.12); }
.bubble-menu button.legal-btn { color: #F4C07A; }
.bubble-menu button.legal-btn:hover { background: rgba(244,192,122,0.15); }
.bubble-sep { width: 1px; background: rgba(255,255,255,0.15); margin: 2px 2px; align-self: stretch; }
.chip.action {
  background: var(--panel);
  color: var(--accent);
  font-weight: 500;
}
.chip.action::before {
  content: '✦';
  color: var(--amber);
}
.chips-spacer { flex: 1; }

/* ============ EDITOR CANVAS (for prose sections) ============ */
.doc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.doc p { margin-bottom: 1em; }
.doc h3 {
  font-weight: 500;
  font-size: 15px;
  margin: 1.4em 0 0.5em;
  color: var(--text);
}
.needs-input {
  display: inline;
  background: var(--amber-bg);
  color: var(--amber);
  padding: 1px 7px 2px;
  border-radius: 3px;
  font-size: 13.5px;
  cursor: pointer;
}
.needs-input::before { content: '⚠ '; font-size: 11px; }
.cite {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: 3px;
  margin: 0 2px;
  cursor: pointer;
  vertical-align: baseline;
}

/* ============ SECTION FOOTER (navigation) ============ */
.section-foot {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.section-foot .saved {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-subtle);
}
.section-foot .group { display: flex; gap: 8px; }

/* ============ DRAWER (on-demand sources / AI / etc) ============ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 20, 0.2);
  display: none;
  z-index: 20;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 340px;
  background: var(--panel);
  border-left: 1px solid var(--border);
  padding: 24px 22px;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 21;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3 {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.drawer-close {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.drawer-close:hover { color: var(--text); }

.kb-match {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}
.kb-match:last-child { border-bottom: none; }
.kb-match .strength {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--green);
  font-weight: 500;
  min-width: 32px;
}
.kb-match.weak .strength { color: var(--amber); }
.kb-match .title-row .title { font-weight: 500; font-size: 13px; }
.kb-match .title-row .sub { color: var(--text-muted); font-size: 11px; font-family: 'Geist Mono', monospace; margin-top: 2px; }
.kb-match .insert {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

/* AI help drawer-specific */
.ai-action {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.ai-action:last-child { border-bottom: none; }
.ai-action:hover .ai-label { color: var(--accent); }
.ai-action .ai-icon {
  color: var(--amber);
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}
.ai-label { font-weight: 500; font-size: 13.5px; margin-bottom: 3px; }
.ai-sub { color: var(--text-muted); font-size: 12px; line-height: 1.4; }

/* ============ SECTION-SPECIFIC BITS ============ */

/* Past Performance: case study cards */
.case-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.case-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
  transition: border-color 0.1s;
}
.case-card.selected { border-color: var(--accent); background: var(--accent-soft); }
.case-card .case-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: var(--green);
  font-weight: 500;
}
.case-card.weak .case-badge { color: var(--amber); }
.case-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding-right: 40px;
  margin-bottom: 6px;
  line-height: 1.3;
}
.case-card .case-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.case-card .case-summary {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.case-card .case-actions {
  display: flex;
  gap: 6px;
}
.case-card .case-btn {
  flex: 1;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-weight: 500;
}
.case-card .case-btn.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.case-card.selected .case-btn.primary {
  background: var(--panel);
  color: var(--accent);
}

.case-section-head {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin: 24px 0 12px;
}

/* Pricing: team + rates + totals */
.price-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.price-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.price-block-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.price-block-head h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.price-block-head .link-inline {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.price-table th,
.price-table td {
  padding: 10px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.price-table th {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  font-weight: 500;
  background: var(--panel-alt);
}
.price-table td.num,
.price-table th.num {
  text-align: right;
  font-family: 'Geist Mono', monospace;
  font-variant-numeric: tabular-nums;
}
.price-table tr:last-child td { border-bottom: none; }
.price-table .panel-ceiling {
  color: var(--text-subtle);
  font-size: 11px;
  font-family: 'Geist Mono', monospace;
}
.price-table .panel-ceiling.over {
  color: var(--red);
}

.price-totals {
  padding: 16px 18px;
  background: var(--panel-alt);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 13px;
}
.price-totals .label { color: var(--text-muted); }
.price-totals .value { font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; font-weight: 500; }
.price-totals .grand {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
}
.price-totals .grand .label {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.price-totals .grand .value {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--accent);
  font-weight: 500;
}

.effort-grid {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 0;
}
.effort-grid > * {
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.effort-grid .h {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  background: var(--panel-alt);
  font-weight: 500;
}
.effort-grid .n {
  text-align: right;
  font-family: 'Geist Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Delivery Team placeholder */
.placeholder-card {
  background: var(--panel);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 36px 32px;
  text-align: center;
}
.placeholder-card .placeholder-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 12px;
}
.placeholder-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.placeholder-card p {
  color: var(--text-muted);
  font-size: 13.5px;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============ NOTES BLOCK (annotations for designer handoff) ============ */
.annotations {
  grid-column: 1 / -1;
  padding: 28px 40px 40px;
  border-top: 1px dashed var(--border-strong);
  background: var(--bg);
}
.annotations h4 {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 14px;
}
.annotations ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .annotations ul { grid-template-columns: 1fr; }
}
.annotations li {
  font-size: 12.5px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.55;
}
.annotations li::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: 'Geist Mono', monospace;
}

/* Landing annotations use a slightly different container */
main.landing .annotations {
  margin-top: 64px;
  padding: 28px 0 0;
  background: transparent;
  border-top: 1px dashed var(--border-strong);
}
/* ==============================================================
   Compatibility layer
   Aliases for legacy auth-shell / insights / messages screens
   that were written against the old --color-* tokens.
   ============================================================== */
:root {
  --color-primary: var(--accent);
  --color-primary-light: var(--accent-hover);
  --color-accent: var(--accent);
  --color-success: var(--green);
  --color-warning: var(--amber);
  --color-danger: var(--red);
  --color-bg: var(--bg);
  --color-surface: var(--panel);
  --color-text: var(--text);
  --color-text-muted: var(--text-muted);
  --color-border: var(--border);
  --font-sans: 'Geist', -apple-system, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
}

/* --- Messages / Alerts (preserved) --- */
.messages { padding: 1rem 1.5rem; }
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid var(--green); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber); }
.alert-error   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red); }
.alert-info    { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.alert-close { background: none; border: none; font-size: 1.25rem; cursor: pointer; opacity: 0.6; }
.alert-close:hover { opacity: 1; }

/* --- HTMX indicator --- */
.htmx-indicator { opacity: 0; transition: opacity 200ms ease-in; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* --- Auth shell (login) --- */
.auth-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 52px);
  padding: 3rem 1rem;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(26,24,20,0.06);
}
.auth-icon { display: flex; justify-content: center; margin-bottom: 1rem; color: var(--accent); }
.auth-card input.pin-input {
  letter-spacing: 0.75em;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Geist Mono', monospace;
  padding: 0.75rem;
}
.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.auth-card p.muted { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 0.9375rem; }
.auth-card label {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--text-subtle);
  margin: 0.75rem 0 0.25rem;
}
.auth-card input[type="email"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--panel);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-card .btn { margin-top: 1rem; width: 100%; padding: 0.75rem; font-size: 0.9375rem; }
.auth-card .error { color: var(--red); font-size: 0.875rem; margin-top: 0.5rem; }
.auth-result p { margin-bottom: 0.75rem; }

/* --- Insights / KPI dashboard --- */
.insights-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.insights-page h1 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.insights-page h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  margin: 1.5rem 0 0.75rem;
  font-size: 1.125rem;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.kpi-label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}
.kpi-value {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 0.25rem 0;
}
.kpi-sub { font-size: 0.8125rem; color: var(--text-muted); }
.funnel { list-style: none; padding: 0; margin: 0.5rem 0 0; font-size: 0.875rem; }
.funnel li {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--border);
}
.funnel li:last-child { border-bottom: none; }
.timeline-table,
.invite-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.875rem;
}
.timeline-table th, .timeline-table td,
.invite-table th, .invite-table td {
  text-align: left;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
.timeline-table th, .invite-table th {
  background: var(--panel-alt);
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
}
.badge-success { background: var(--green-bg); color: var(--green); padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; display: inline-block; }
.badge-muted   { background: var(--grey-bg);  color: var(--text-muted); padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; display: inline-block; }
.invite-form {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.invite-form label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.invite-form input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 0.9375rem;
}
.insights-page .muted { color: var(--text-muted); }
.insights-page .error { color: var(--red); font-size: 0.875rem; }

/* --- Onboarding drop-zone (BuyICT upload — re-skinned) --- */
.drop-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s, background 0.15s;
  background: var(--panel);
  cursor: pointer;
}
.drop-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone-icon { color: var(--accent); margin-bottom: 0.75rem; }
.drop-zone-text { font-size: 0.9375rem; color: var(--text); font-weight: 500; margin-bottom: 0.25rem; }
.drop-zone-hint { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 1rem; }
.drop-zone-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dz-spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}
@keyframes dz-spin { to { transform: rotate(360deg); } }

/* --- Status badges (legacy bid status pills) --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-badge.qualifying { background: var(--grey-bg);   color: var(--text-muted); }
.status-badge.drafting   { background: var(--amber-bg);  color: var(--amber); }
.status-badge.review     { background: var(--accent-soft); color: var(--accent); }
.status-badge.submitted  { background: var(--green-bg);  color: var(--green); }
.status-badge.outcome    { background: var(--grey-bg);   color: var(--text-muted); }

/* ============ APP PAGE WRAPPER ============ */
.app-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}
.app-page h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.app-page h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.005em;
}
