:root {
  --indigo-900: #312e81;
  --indigo-700: #4338ca;
  --indigo-600: #4f46e5;
  --indigo-100: #e0e7ff;
  --indigo-50: #eef2ff;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --ink: #1e1b4b;
  --body: #3f3d56;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f6fb;
  --card: #ffffff;
  --green: #059669;
  --green-bg: #ecfdf5;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(30, 27, 75, .08), 0 4px 14px rgba(30, 27, 75, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.65;
  font-size: 16px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 19px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-900));
  color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 800;
}
.brand-sep { color: var(--amber-500); }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a {
  text-decoration: none; color: var(--body); font-weight: 500; font-size: 15px;
  padding: 7px 13px; border-radius: 9px;
}
.nav a:hover { background: var(--indigo-50); color: var(--indigo-700); }
.nav a.active { background: var(--indigo-100); color: var(--indigo-700); }
.demo-pill {
  background: var(--amber-100); color: #92400e; font-size: 12.5px; font-weight: 700;
  padding: 3px 11px; border-radius: 99px; border: 1px solid #fcd34d;
}

/* ---------- hero ---------- */
.hero { padding: 54px 0 30px; text-align: center; }
.hero h1 { font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1.25; margin-bottom: 14px; }
.hero h1 .hl { color: var(--indigo-600); }
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 16px; font-size: 14.5px; font-weight: 500; color: var(--indigo-700);
  display: inline-flex; align-items: center; gap: 7px; box-shadow: var(--shadow);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500); }

.synthetic-banner {
  background: var(--amber-100); border: 1px solid #fcd34d; color: #92400e;
  border-radius: var(--radius); padding: 11px 18px; font-size: 14.5px; font-weight: 500;
  margin: 0 0 26px; text-align: center;
}

/* ---------- section titles ---------- */
.section-title { font-size: 24px; font-weight: 800; color: var(--ink); margin: 34px 0 6px; }
.section-sub { color: var(--muted); margin-bottom: 20px; font-size: 15.5px; }

/* ---------- tender cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; padding-bottom: 40px; }
.tcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tcard:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(30,27,75,.12); }
.tcard-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 11px; border-radius: 99px; }
.tag-field { background: var(--indigo-100); color: var(--indigo-700); }
.tag-synth { background: var(--amber-100); color: #92400e; }
.tcard h3 { font-size: 18.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.tcard .issuer { color: var(--muted); font-size: 14.5px; }
.tcard-meta { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; margin-top: 2px; }
.tcard-meta div { display: flex; align-items: center; gap: 8px; }
.tcard-meta .k { color: var(--muted); min-width: 82px; }
.tcard-meta .v { font-weight: 600; color: var(--ink); }
.tcard-meta .v.urgent { color: var(--red); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--indigo-600); color: #fff; font-weight: 700; font-size: 15.5px;
  border: none; border-radius: 10px; padding: 11px 20px; cursor: pointer;
  text-decoration: none; transition: background .15s ease; font-family: inherit;
}
.btn:hover { background: var(--indigo-700); }
.btn-block { width: 100%; margin-top: auto; }
.btn-ghost {
  background: var(--card); color: var(--indigo-700); border: 1.5px solid var(--indigo-600);
}
.btn-ghost:hover { background: var(--indigo-50); }
.btn-amber { background: var(--amber-500); color: #1e1b4b; }
.btn-amber:hover { background: #d97706; color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- upload card on home ---------- */
.upload-cta {
  background: linear-gradient(135deg, var(--indigo-900), var(--indigo-600));
  border-radius: var(--radius); color: #fff; padding: 30px 28px; margin: 6px 0 46px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; box-shadow: var(--shadow);
}
.upload-cta h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.upload-cta p { opacity: .88; font-size: 15.5px; max-width: 560px; }
.upload-cta .btn { margin-inline-start: auto; }

/* ---------- tender detail ---------- */
.detail-head { padding: 34px 0 0; }
.back-link { color: var(--indigo-600); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.detail-head h1 { font-size: 27px; font-weight: 800; color: var(--ink); margin: 12px 0 8px; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: 14.5px; margin-bottom: 4px; }
.detail-meta b { color: var(--ink); }

.tabs {
  display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--line);
  margin: 22px 0 24px; padding-bottom: 0; scrollbar-width: thin;
}
.tab {
  white-space: nowrap; padding: 10px 15px; font-weight: 600; font-size: 14.5px;
  color: var(--muted); background: none; border: none; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px; font-family: inherit;
}
.tab:hover { color: var(--indigo-700); }
.tab.active { color: var(--indigo-700); border-bottom-color: var(--amber-500); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); margin-bottom: 40px; }
.panel h2 { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.panel .panel-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* citation chip */
.cite {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--indigo-50); color: var(--indigo-700); border: 1px solid var(--indigo-100);
  font-size: 12.5px; font-weight: 600; border-radius: 7px; padding: 2px 9px;
  cursor: pointer; white-space: nowrap;
}
.cite:hover { background: var(--indigo-100); text-decoration: underline; }

/* requirement rows */
.req-list { display: flex; flex-direction: column; gap: 12px; }
.req {
  border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; background: #fbfbfe;
}
.req-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.req-text { font-weight: 500; color: var(--ink); font-size: 15.5px; }
.req-cat { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.req-cat.tech { background: var(--indigo-100); color: var(--indigo-700); }
.req-cat.admin { background: var(--amber-100); color: #92400e; }
.req-cat.fin { background: var(--green-bg); color: var(--green); }

/* eligibility */
.elig { display: flex; flex-direction: column; gap: 10px; }
.elig-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 11px; background: #fbfbfe;
}
.elig-ic { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; margin-top: 1px; }
.elig-ic.must { background: var(--red-bg); color: var(--red); }
.elig-body { flex: 1; }
.elig-cond { font-weight: 600; color: var(--ink); font-size: 15.5px; }
.elig-note { font-size: 14px; color: var(--muted); margin-top: 3px; }

/* deadlines */
.tl { position: relative; padding-inline-start: 26px; display: flex; flex-direction: column; gap: 18px; }
.tl::before { content: ""; position: absolute; inset-inline-start: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--indigo-100); }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; inset-inline-start: -24px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--amber-500); border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--amber-100);
}
.tl-date { font-weight: 800; color: var(--indigo-700); font-size: 15.5px; }
.tl-what { color: var(--ink); font-size: 15px; }
.tl-item .cite { margin-top: 4px; }

/* docs table */
.docs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.docs-table th {
  text-align: start; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 8px 10px; border-bottom: 2px solid var(--line);
}
.docs-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-table tr:last-child td { border-bottom: none; }
.docs-table .doc-name { font-weight: 600; color: var(--ink); }
.badge-money { background: var(--green-bg); color: var(--green); font-weight: 700; font-size: 12.5px; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }

/* gaps */
.gap-list { display: flex; flex-direction: column; gap: 10px; }
.gap {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px;
  background: var(--orange-bg); border: 1px solid #fed7aa; border-radius: 11px;
}
.gap-ic { color: var(--orange); font-size: 18px; line-height: 1.4; }
.gap b { color: var(--ink); }
.gap .gap-act { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* risks */
.risk { border: 1px solid var(--line); border-radius: 11px; padding: 15px 17px; background: #fbfbfe; display: flex; flex-direction: column; gap: 9px; }
.risk-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.risk-title { font-weight: 700; color: var(--ink); font-size: 15.5px; }
.sev { font-size: 12px; font-weight: 800; padding: 2.5px 11px; border-radius: 99px; }
.sev.high { background: var(--red-bg); color: var(--red); }
.sev.mid { background: var(--orange-bg); color: var(--orange); }
.sev.low { background: var(--green-bg); color: var(--green); }
.risk-q { background: var(--indigo-50); border-inline-start: 3px solid var(--indigo-600); border-radius: 8px; padding: 9px 13px; font-size: 14px; color: var(--indigo-900); }
.risk-q .q-label { font-weight: 700; font-size: 12.5px; color: var(--indigo-600); display: block; margin-bottom: 2px; }

/* proposal */
.prop-section { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; overflow: hidden; }
.prop-head {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: #fbfbfe; border: none; cursor: pointer; font-family: inherit; text-align: start;
}
.prop-num {
  width: 26px; height: 26px; border-radius: 8px; background: var(--indigo-600); color: #fff;
  display: grid; place-items: center; font-size: 13.5px; font-weight: 800; flex-shrink: 0;
}
.prop-title { font-weight: 700; color: var(--ink); font-size: 15.5px; flex: 1; }
.prop-arrow { color: var(--muted); transition: transform .15s ease; font-size: 13px; }
.prop-section.open .prop-arrow { transform: rotate(180deg); }
.prop-body { display: none; padding: 4px 16px 16px; font-size: 15px; color: var(--body); white-space: pre-line; }
.prop-section.open .prop-body { display: block; }

/* source doc */
.srcdoc { display: flex; flex-direction: column; gap: 16px; }
.srcpage { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.srcpage-head {
  background: var(--indigo-900); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 15px; display: flex; justify-content: space-between;
}
.srcpage-body { padding: 16px 18px; background: #fff; }
.srcsec { margin-bottom: 14px; scroll-margin-top: 90px; border-radius: 8px; transition: background .3s ease; padding: 6px 8px; margin-inline: -8px; }
.srcsec:target, .srcsec.flash { background: var(--amber-100); }
.srcsec h4 { font-size: 15px; font-weight: 800; color: var(--indigo-700); margin-bottom: 4px; }
.srcsec p { font-size: 14.5px; white-space: pre-line; }

/* fit score */
.fit-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.fit-ring {
  width: 108px; height: 108px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; position: relative;
}
.fit-ring::before { content: ""; position: absolute; inset: 9px; background: var(--card); border-radius: 50%; }
.fit-ring span { position: relative; font-size: 25px; font-weight: 800; color: var(--ink); }
.fit-why { flex: 1; min-width: 240px; font-size: 15px; }
.fit-why b { color: var(--ink); }

/* summary bullets */
.sum-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.sum-list li { margin-inline-start: 20px; font-size: 15px; }
.sum-list li::marker { color: var(--amber-500); }

/* ---------- upload ---------- */
.dropzone {
  border: 2.5px dashed var(--indigo-100); border-radius: var(--radius);
  background: var(--indigo-50); padding: 46px 24px; text-align: center;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--indigo-600); background: var(--indigo-100); }
.dropzone .dz-ic { font-size: 40px; margin-bottom: 10px; }
.dropzone h3 { color: var(--ink); font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.dropzone p { color: var(--muted); font-size: 14.5px; }
.dropzone .formats { margin-top: 12px; font-size: 13px; color: var(--indigo-700); font-weight: 600; }

.up-steps { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.up-step { display: flex; align-items: center; gap: 11px; font-size: 15px; color: var(--muted); }
.up-step .st-ic {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line);
  display: grid; place-items: center; font-size: 13px; flex-shrink: 0; background: #fff;
}
.up-step.doing { color: var(--indigo-700); font-weight: 600; }
.up-step.doing .st-ic { border-color: var(--indigo-600); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.up-step.done { color: var(--green); }
.up-step.done .st-ic { background: var(--green); border-color: var(--green); color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.note-box {
  border-radius: 11px; padding: 15px 18px; font-size: 14.5px; margin-top: 16px;
  border: 1px solid var(--line); background: #fbfbfe;
}
.note-box.warn { background: var(--amber-100); border-color: #fcd34d; color: #78350f; }
.note-box.info { background: var(--indigo-50); border-color: var(--indigo-100); color: var(--indigo-900); }
.note-box b { display: block; margin-bottom: 4px; color: inherit; }

.privacy-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin-top: 14px; }

/* how it works */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 40px; }
.how-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.how-card .how-num {
  width: 32px; height: 32px; border-radius: 9px; background: var(--amber-500); color: var(--ink);
  display: grid; place-items: center; font-weight: 800; margin-bottom: 10px;
}
.how-card h3 { font-size: 16.5px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.how-card p { font-size: 14.5px; color: var(--muted); }

.footer { border-top: 1px solid var(--line); background: var(--card); padding: 22px 0 30px; margin-top: 30px; }
.footer p { font-size: 13px; color: var(--muted); text-align: center; }

.loading-skel { display: flex; flex-direction: column; gap: 12px; }
.skel { height: 64px; border-radius: 11px; background: linear-gradient(90deg, #eee, #f7f7fb, #eee); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 720px) {
  .hero { padding: 36px 0 20px; }
  .hero h1 { font-size: 27px; }
  .hero p.sub { font-size: 16px; }
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 9px 16px 4px; row-gap: 2px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-inline-start: 0; scrollbar-width: none; }
  .nav a { padding: 6px 9px; font-size: 14px; white-space: nowrap; }
  .demo-pill { margin-inline-start: auto; }
  .brand-text { font-size: 16.5px; white-space: nowrap; }
  .panel { padding: 18px; }
  .upload-cta .btn { margin-inline-start: 0; width: 100%; }
  .detail-head h1 { font-size: 21px; }
  .docs-table { font-size: 13.5px; }
}

/* consent gate */
.consent-box{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:14px 16px;margin-top:14px;font-size:14px;line-height:1.65}
.consent-box p{margin:0 0 10px}
.consent-check{display:flex;align-items:flex-start;gap:10px;cursor:pointer;font-weight:600}
.consent-check input{margin-top:3px;width:18px;height:18px;flex-shrink:0;accent-color:#4f46e5}
button[disabled]{opacity:.45;cursor:not-allowed}
