:root {
  --ink: #0a1b2e; --muted: #5a6b7e; --line: #dde4ec; --bg: #f4f7fb; --card: #ffffff;
  --navy: #071a2f; --navy-2: #0c2a47; --brand: #0b3b5c; --brand-ink: #ffffff;
  --accent: #00b8c8; --accent-ink: #04222b; --live: #2ee6a6; --soft: #e3f6f8; --warn: #b4540a; --ok: #15803d;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 56px; }
h1 { font-size: 1.75rem; line-height: 1.15; margin: 24px 0 8px; letter-spacing: -0.02em; }
h2 { font-size: 0.85rem; margin: 28px 0 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
p { margin: 0 0 12px; }
a { color: var(--brand); }
.muted { color: var(--muted); } .center { text-align: center; } .small { font-size: 0.875rem; }
.top { display: flex; justify-content: space-between; align-items: center; max-width: 1120px; margin: 0 auto; padding: 16px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.foot { max-width: 1120px; margin: 0 auto; padding: 20px 16px 32px; color: var(--muted); font-size: 0.8rem; border-top: 1px solid var(--line); }

button, input { font: inherit; }
.btn { border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); padding: 12px 18px; border-radius: 10px; font-weight: 650; cursor: pointer; transition: transform 0.08s, background 0.15s; }
.btn:hover { background: #0e4a73; } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.accent:hover { background: #19cfdd; }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.plain { border-color: var(--line); background: var(--card); color: var(--ink); font-weight: 500; padding: 8px 12px; }
.btn.danger { border-color: var(--line); background: var(--card); color: #a12626; font-weight: 500; padding: 8px 12px; }
.link { background: none; border: 0; color: var(--brand); padding: 0; cursor: pointer; text-decoration: underline; }
input[type=email], input[type=text] { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
input:focus-visible, button:focus-visible, .chip:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 8px; } .row > input { flex: 1; min-width: 0; }
.error { color: #a12626; margin-top: 8px; min-height: 1.5em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(10, 27, 46, 0.04); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 14px; border-radius: 999px; cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stat { border: 1px solid var(--line); background: var(--card); padding: 8px 12px; border-radius: 10px; font-size: 0.95rem; }
.stat b { color: var(--brand); margin-left: 6px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; background: var(--soft); color: var(--brand); border-radius: 6px; padding: 2px 8px; font-size: 0.8rem; margin: 0 6px 6px 0; }
.tag.any { background: #eef1f5; color: var(--muted); }
.badge { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.badge.active { background: #e3f4ea; color: var(--ok); } .badge.draft { background: #fdf0e1; color: var(--warn); }

.tender { border-top: 1px solid var(--line); padding: 12px 0; }
.tender:first-child { border-top: 0; padding-top: 0; }
.tender .title { font-weight: 600; overflow-wrap: anywhere; }
.tender .meta { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.due { font-weight: 600; } .due.soon { color: var(--warn); }
.score { float: right; font-weight: 700; color: var(--ok); margin-left: 8px; font-variant-numeric: tabular-nums; }

.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 11px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.bubble.bot { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.me { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble.note { background: var(--soft); border: 0; align-self: flex-start; font-size: 0.95rem; }
.progress { height: 4px; background: var(--line); border-radius: 4px; margin: 4px 0 14px; }
.progress > div { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.2s; }
.answer { margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.field { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.field:first-of-type { border-top: 0; }
.field .label { color: var(--muted); font-size: 0.875rem; min-width: 76px; }
.field .edit { color: var(--brand); font-size: 0.875rem; white-space: nowrap; }
.count { font-size: 1.05rem; font-weight: 700; color: var(--brand); }
.hint { background: #fdf6e7; border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; margin-top: 10px; }

/* ---------- chat screen ---------- */
.chat-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: var(--accent); font-weight: 800; font-size: 0.95rem; letter-spacing: -0.03em; flex: none; }
.avatar.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 0.7rem; margin-top: 2px; }
.turn { display: flex; gap: 8px; align-items: flex-start; max-width: 92%; }
.turn .bubble { max-width: none; }
.card.step { margin-top: 8px; padding: 16px; border-color: #c9d6e3; box-shadow: 0 6px 20px rgba(10, 27, 46, 0.07); }
.card.step .chip { padding: 10px 15px; }
.card.review { box-shadow: 0 6px 20px rgba(10, 27, 46, 0.07); }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #e9f8f1; border: 1px solid #bfe8d5; color: #0f4c36; border-radius: 12px; padding: 12px 14px; margin: 10px 0 14px; font-size: 0.95rem; }
.notice .dot { margin-top: 7px; }

/* ---------- matches ---------- */
.matches { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.matches-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.legend { background: var(--bg); border-radius: 10px; padding: 9px 12px; font-size: 0.85rem; color: var(--muted); margin: 8px 0 12px; }
.match { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: var(--card); }
.fit { flex: none; width: 64px; height: 64px; border-radius: 14px; display: grid; place-content: center; text-align: center; color: #fff; background: #64748b; }
.fit b { font-size: 1.45rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fit span { font-size: 0.62rem; opacity: 0.9; margin-top: 3px; }
.fit.strong { background: #15803d; } .fit.good { background: #0b6a8a; } .fit.fair { background: #64748b; }
.match-body { flex: 1; min-width: 0; }
.match-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 0.85rem; margin-bottom: 4px; }
.fit-word { font-weight: 700; color: var(--brand); }
.match .title { font-weight: 650; overflow-wrap: anywhere; }
.match .meta { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.match .why { font-size: 0.9rem; margin-top: 4px; }
.match-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.small-btn { padding: 8px 12px; font-size: 0.9rem; text-decoration: none; display: inline-block; }
@media (max-width: 480px) { .match { flex-direction: column; gap: 10px; } .fit { width: auto; height: auto; padding: 8px 12px; display: flex; align-items: baseline; gap: 6px; align-self: flex-start; } .fit span { margin: 0; font-size: 0.75rem; } }

/* ---------- landing page ---------- */
body.landing { background: var(--navy); }
body.landing main { max-width: none; padding: 0; }
body.landing .top { position: absolute; inset: 0 0 auto 0; z-index: 3; }
body.landing .top .brand { color: #fff; }
body.landing .top .link { color: #dff6fa; }
body.landing .foot { color: #8fa3b8; border-top-color: rgba(255, 255, 255, 0.12); }
body.landing .foot a { color: #b9e9f0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.hero { position: relative; min-height: 640px; display: flex; align-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.slides, .slide, .hero::after { position: absolute; inset: 0; }
.slides { z-index: -2; }
.slide { background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 7s linear; }
.slide.on { opacity: 1; transform: scale(1); }
.hero::after { content: ""; z-index: -1; background:
  linear-gradient(90deg, rgba(4, 16, 31, 0.92) 0%, rgba(4, 16, 31, 0.72) 42%, rgba(4, 16, 31, 0.25) 100%),
  linear-gradient(0deg, rgba(7, 26, 47, 1) 0%, rgba(7, 26, 47, 0) 30%); }
.hero-body { width: 100%; padding: 104px 0 72px; }
.hero-copy { max-width: 620px; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); font: 500 0.78rem/1.3 var(--mono); color: #d7f5fa; backdrop-filter: blur(6px); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(46, 230, 166, 0.7); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(46, 230, 166, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 230, 166, 0); } }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.04; margin: 18px 0 16px; letter-spacing: -0.035em; }
.hero h1 { min-height: 3.2em; transition: opacity 0.35s ease, transform 0.35s ease; }
.hero h1.swap { opacity: 0; transform: translateY(8px); }
.hero h1 em { font-style: normal; color: #5fe3ee; }
.hero .lede { font-size: 1.1rem; color: #cfdbe8; max-width: 540px; margin-bottom: 24px; }
.signup { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); border-radius: 16px; padding: 10px; max-width: 520px; }
.signup input[type=email] { background: #fff; border-color: transparent; }
.signup .error { color: #ffc9c9; margin: 6px 6px 0; min-height: 0; }
.signup-note { font-size: 0.85rem; color: #a9bccf; margin-top: 10px; max-width: 520px; }
.signup-note a { color: #b9e9f0; }
.slide-nav { position: absolute; right: 16px; bottom: 64px; display: flex; align-items: center; gap: 10px; font: 500 0.75rem var(--mono); color: #d7e6f2; }
.slide-nav button { width: 22px; height: 4px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.35); cursor: pointer; }
.slide-nav button.on { background: var(--accent); width: 34px; }

.band { padding: 56px 0; }
.band.dark { background: var(--navy); color: #e8f0f8; }
.band.light { background: var(--bg); color: var(--ink); }
.band h2.big { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; text-transform: none; color: inherit; margin: 6px 0 10px; font-weight: 750; }
.kicker { font: 600 0.75rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.band .sub { max-width: 640px; color: #a9bccf; margin-bottom: 28px; }
.band.light .sub { color: var(--muted); }

.numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: -44px; position: relative; z-index: 2; }
.number { background: linear-gradient(180deg, #0f3050, #0b2540); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); padding: 16px; }
.number b { display: block; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.number span { font-size: 0.82rem; color: #a9bccf; }

.agents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.agent { position: relative; background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: var(--radius); padding: 18px; }
.agent::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 200% 100%; animation: scan 3.2s linear infinite; }
@keyframes scan { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.agent .step { font: 600 0.72rem var(--mono); color: var(--accent); letter-spacing: 0.1em; }
.agent h3 { margin: 6px 0 6px; font-size: 1.1rem; color: #fff; }
.agent p { color: #b8c8d8; font-size: 0.93rem; margin-bottom: 12px; }
.agent .log { display: flex; gap: 8px; align-items: flex-start; font: 0.76rem/1.45 var(--mono); color: #9fe9d0; background: rgba(0, 0, 0, 0.28); border-radius: 8px; padding: 8px 10px; }
.agent .log .dot { margin-top: 5px; }
.honest { margin-top: 18px; font-size: 0.88rem; color: #93a8bd; max-width: 760px; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .tender { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps div::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 4px; }
.cta { text-align: center; }
.cta .signup { margin: 0 auto; }
.cta .sub { margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
  .agents { grid-template-columns: 1fr 1fr; }
  .two, .grid2, .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero { min-height: 600px; }
  .hero-body { padding: 92px 0 84px; }
  .hero::after { background: linear-gradient(0deg, rgba(7, 26, 47, 1) 0%, rgba(4, 16, 31, 0.74) 40%, rgba(4, 16, 31, 0.5) 100%); }
  .agents { grid-template-columns: 1fr; }
  .numbers { gap: 8px; } .number { padding: 12px; }
  .signup .row { flex-direction: column; }
}
@media (min-width: 600px) { main > h1 { font-size: 2.1rem; } main { padding-top: 24px; } }
@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity 0.2s; transform: none; }
  .dot, .agent::before { animation: none; }
  .hero h1 { transition: none; }
  html { scroll-behavior: auto; }
}
