:root {
  --navy-dark: #262a6b;
  --navy: #2f3a8f;
  --teal: #3fb6c4;
  --header-gradient: linear-gradient(90deg, var(--navy-dark) 0%, var(--navy) 45%, var(--teal) 100%);
  --bg: #eef0f7;
  --card-bg: #ffffff;
  --text-primary: #1e2559;
  --text-secondary: #5a5f7a;
  --border: #dfe2ee;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(38, 42, 107, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 8px 12px; border-radius: 8px; }

header.app-header {
  background: var(--header-gradient);
  color: #fff;
  padding: 18px 28px;
}
.app-header .brand-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.app-header .brand {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1.1rem;
}
.app-header .brand-logo {
  height: 26px;
  width: auto;
  display: block;
}
.app-header .subtitle {
  font-weight: 400;
  opacity: 0.9;
  font-size: 0.95rem;
}
.progressbar {
  margin-top: 12px;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  overflow: hidden;
}
.progressbar > div {
  height: 100%;
  background: #fff;
  transition: width 0.3s ease;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.owl { font-size: 2.5rem; text-align: center; display: block; margin-bottom: 12px; }
.scout-img {
  display: block;
  margin: 0 auto 14px;
  max-height: 120px;
  width: auto;
}
.scout-img.scout-thumbs-up { max-height: 150px; }

h1 { font-size: 1.5rem; text-align: center; margin: 0 0 14px; }
h2 { font-size: 1.15rem; margin: 0 0 6px; }

.lede { text-align: center; color: var(--text-secondary); margin: 0 0 8px; line-height: 1.5; }
.fine-print { text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin: 4px 0 20px; }

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}
.btn-primary:hover { background: var(--navy-dark); }

.btn-secondary {
  display: block;
  width: 100%;
  padding: 12px 18px;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
}
.btn-secondary:hover { border-color: var(--navy); }

.option-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

.option-btn {
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-primary);
  font-size: 0.98rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.option-btn:hover { border-color: var(--teal); }
.option-btn.selected {
  border-color: var(--navy);
  background: #f1f2fb;
  font-weight: 600;
}
.option-btn .check {
  float: right;
  opacity: 0;
}
.option-btn.selected .check { opacity: 1; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  text-align: center;
  margin-bottom: 6px;
}

.step-question { text-align: center; font-weight: 700; font-size: 1.1rem; margin: 8px 0 4px; }
.step-hint { text-align: center; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; }

.back-link {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 0 12px;
}

textarea, input[type="text"], input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 0.98rem;
  font-family: inherit;
  margin-bottom: 6px;
}
textarea:focus, input:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

label { display: block; font-weight: 600; font-size: 0.9rem; margin: 12px 0 6px; }
.required { color: #c0392b; }

.link-btn {
  background: none;
  border: none;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  display: block;
  margin: 14px auto 0;
}

.footer-note { text-align: center; color: var(--text-secondary); font-size: 0.8rem; margin-top: 28px; }
.footer-note a { color: var(--navy); }

.overlay {
  position: fixed; inset: 0;
  background: rgba(38, 42, 107, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 50;
}
.overlay[hidden] { display: none; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
}
.modal h2 { margin-bottom: 6px; }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-secondary);
}

.error-text { color: #c0392b; font-size: 0.85rem; margin: 4px 0 0; }

.results h2 { text-align: center; }
.result-block { margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--border); }
.result-block:first-of-type { border-top: none; padding-top: 0; }
.result-block h3 { font-size: 1rem; margin: 0 0 8px; color: var(--navy); }
.pill-row { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #eef0f7;
  color: var(--navy);
}
.pill.value-High, .pill.difficulty-Low { background: #e3f6e8; color: #1c7c3f; }
.pill.value-Medium, .pill.difficulty-Medium { background: #fff3d6; color: #92650a; }
.pill.value-Low, .pill.difficulty-High { background: #fbe4e1; color: #a3352a; }

.cost-callout {
  background: #f6f7fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-top: 10px;
}
.cost-callout .amount { font-size: 1.4rem; font-weight: 800; color: var(--navy-dark); }
.cost-callout .sources { font-size: 0.75rem; color: var(--text-secondary); margin-top: 8px; }

ul.result-list { margin: 0; padding-left: 20px; }
ul.result-list li { margin-bottom: 6px; }

/* Use-case tabs (up to 3 ranked candidates) */
.usecase-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.usecase-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
}
.usecase-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eef0f7;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.usecase-tab.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.usecase-tab.active .usecase-tab-num { background: rgba(255,255,255,0.25); color: #fff; }

.result-block--hero { border-top: none; padding-top: 0; }

/* Icon-led result sections */
.result-block--icon .result-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.result-block--icon h3 { margin: 0; }
.result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  flex-shrink: 0;
}
.result-icon svg { width: 18px; height: 18px; }
.result-icon-img { width: 22px; height: 22px; object-fit: contain; }

.result-list--metrics { list-style: none; padding-left: 0; }
.result-list--metrics li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
}
.result-list--metrics li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: -1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e3f6e8;
  color: #1c7c3f;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list { list-style: none; padding-left: 0; margin: 0; counter-reset: none; }
.step-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: #eef0f7;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
}

.risk-list { display: flex; flex-direction: column; gap: 10px; }
.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf3ed;
  border-left: 3px solid #d17a3a;
  font-size: 0.92rem;
  color: var(--text-primary);
}
.risk-item .risk-icon {
  flex-shrink: 0;
  color: #c0752f;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.risk-item .risk-icon svg { width: 18px; height: 18px; display: block; }

/* POC Lite CTA */
.poc-cta {
  margin: 26px 0;
  padding: 24px 20px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal) 100%);
  color: #fff;
}
.poc-cta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  margin-bottom: 10px;
}
.poc-cta-icon svg { width: 22px; height: 22px; }
.poc-cta-icon .result-icon-img { width: 26px; height: 26px; }
.poc-cta h3 { color: #fff; margin: 4px 0 8px; }
.poc-cta p { color: rgba(255,255,255,0.9); margin: 0 0 16px; font-size: 0.92rem; }
.poc-cta .poc-btn { background: #fff; color: var(--navy-dark); margin-bottom: 0; }
.poc-cta .poc-btn:hover { background: #eef0f7; }
.poc-cta-confirm { color: #fff; font-size: 0.85rem; margin: 12px 0 0; }

.loading-text { text-align: center; color: var(--text-secondary); padding: 30px 0; }

@media (max-width: 480px) {
  main { padding: 20px 12px 60px; }
  .card { padding: 24px 18px; }
}
