/* ===== Venture Scout — styles ===== */
:root {
  --ink: #142433;
  --muted: #5b6b7c;
  --line: #dfe6ee;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --navy: #0f2a43;
  --teal: #0e7490;
  --teal-soft: #e0f2f8;
  --green: #0f7a4d;
  --green-soft: #e2f5ec;
  --amber: #b45309;
  --amber-soft: #fdf0dc;
  --red: #b42318;
  --red-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 42, 67, .08), 0 4px 14px rgba(15, 42, 67, .06);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}

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

/* ===== Header ===== */
.site-header {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 10px rgba(15, 42, 67, .35);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 28px; line-height: 1; }
.brand-name { margin: 0; font-size: 20px; letter-spacing: .3px; }
.brand-tag { margin: 0; font-size: 12.5px; color: #b8c9da; }

.main-nav { display: flex; gap: 6px; }
.nav-btn {
  background: transparent; color: #c9d8e6; border: 1px solid transparent;
  padding: 8px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-btn.is-active { background: var(--teal); color: #fff; }
.nav-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ===== Layout ===== */
.site-main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; }
.app-root { min-height: 55vh; }

/* ===== Hero / intro ===== */
.intro-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.intro-card h2 { margin: 0 0 6px; font-size: 19px; }
.intro-card p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; }
.constraint-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  display: inline-block; background: var(--teal-soft); color: var(--teal);
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.chip.is-ban { background: var(--red-soft); color: var(--red); }
.chip.is-goal { background: var(--green-soft); color: var(--green); }

/* ===== Stats ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px;
}
.stat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.stat-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 0 0 6px; }
.stat-value { font-size: 24px; font-weight: 700; margin: 0; color: var(--navy); }
.stat-sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }

/* ===== Filters ===== */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px;
}
.filters input[type="search"], .filters select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: var(--surface); color: var(--ink);
}
.filters input[type="search"] { flex: 1 1 220px; min-width: 180px; }
.filters select { cursor: pointer; }
.filters label { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.filters input:focus-visible, .filters select:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.filter-count { margin-left: auto; font-size: 13px; color: var(--muted); }

/* ===== Idea cards ===== */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px;
}
.idea-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  transition: transform .12s, box-shadow .12s;
}
.idea-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,42,67,.12); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.category-chip { font-size: 12px; font-weight: 700; color: var(--teal); background: var(--teal-soft); padding: 3px 9px; border-radius: 999px; }
.card-date { font-size: 12.5px; color: var(--muted); }
.idea-card h3 { margin: 0; font-size: 18px; }
.idea-card .one-liner { color: var(--muted); font-size: 14px; margin: 0; }

.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.metric { background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.metric-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.metric-value { font-size: 15px; font-weight: 700; color: var(--navy); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.badge-fit { background: var(--green-soft); color: var(--green); }
.badge-stretch { background: var(--amber-soft); color: var(--amber); }
.badge-over { background: var(--red-soft); color: var(--red); }
.badge-rating-strong { background: var(--green-soft); color: var(--green); }
.badge-rating-cautious { background: var(--amber-soft); color: var(--amber); }
.badge-rating-avoid { background: var(--red-soft); color: var(--red); }

.card-actions { margin-top: auto; }
.btn {
  display: inline-block; background: var(--navy); color: #fff; border: 0;
  padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--teal); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-back { margin-bottom: 18px; }

/* ===== Empty / error states ===== */
.empty-state {
  background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius);
  padding: 48px 24px; text-align: center; color: var(--muted);
}
.empty-state h3 { color: var(--ink); margin: 0 0 8px; }
.empty-state p { margin: 0; font-size: 14.5px; }

/* ===== Detail view ===== */
.detail-hero {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.detail-hero .category-chip { display: inline-block; margin-bottom: 10px; }
.detail-hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.detail-hero .one-liner { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; }
.verdict-banner {
  border-radius: 10px; padding: 14px 16px; font-size: 15px; font-weight: 600; margin-top: 4px;
}
.verdict-banner.strong { background: var(--green-soft); color: var(--green); }
.verdict-banner.cautious { background: var(--amber-soft); color: var(--amber); }
.verdict-banner.avoid { background: var(--red-soft); color: var(--red); }
.verdict-banner .verdict-dot { margin-right: 8px; }

.budget-note {
  margin-top: 12px; font-size: 13.5px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 10px;
}

.detail-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px;
}

.section {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.section h2 {
  margin: 0 0 14px; font-size: 19px; color: var(--navy);
  padding-bottom: 10px; border-bottom: 2px solid var(--teal-soft);
}
.section h3 { font-size: 15.5px; margin: 18px 0 8px; }
.section p { margin: 8px 0; }
.section ul, .section ol { margin: 8px 0; padding-left: 22px; }
.section li { margin-bottom: 6px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.list-group { margin: 0; }
.list-group h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--teal); }
.list-group ul { margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 10px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 420px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.total-row td { font-weight: 700; background: var(--teal-soft); }

/* cost bars */
.bar-track { background: var(--line); border-radius: 999px; height: 10px; overflow: hidden; min-width: 90px; }
.bar-fill { background: var(--teal); height: 100%; border-radius: 999px; }

/* scenario cards */
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.scenario-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--bg); }
.scenario-card h4 { margin: 0 0 10px; font-size: 15px; }
.scenario-card .scenario-num { font-size: 20px; font-weight: 700; color: var(--navy); }
.scenario-card .scenario-label { font-size: 12px; color: var(--muted); display: block; }
.scenario-card p { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.risk-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.risk-card strong { display: block; margin-bottom: 4px; }
.risk-card .mitigation { color: var(--muted); font-size: 13.5px; }
.risk-card .mitigation::before { content: "Mitigation: "; color: var(--green); font-weight: 700; }

.source-list { font-size: 13.5px; color: var(--muted); }

/* ===== Compare ===== */
.compare-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.compare-wrap h2 { margin: 0 0 14px; font-size: 19px; color: var(--navy); }
.compare-table td:first-child a { font-weight: 600; color: var(--teal); text-decoration: none; }
.compare-table td:first-child a:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 18px 20px; font-size: 13px; color: var(--muted); }
.footer-inner p { margin: 2px 0; }
.footer-note { font-size: 12px; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .header-inner { padding: 10px 14px; }
  .brand-name { font-size: 17px; }
  .site-main { padding: 16px 14px 40px; }
  .detail-hero { padding: 20px 16px; }
  .detail-hero h1 { font-size: 23px; }
  .section { padding: 18px 16px; }
  .two-col { grid-template-columns: 1fr; gap: 12px; }
  .metric-row { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .filters .filter-count { margin-left: 0; width: 100%; }
}