:root {
  --ink: #0f172a;
  --ink-secondary: #334155;
  --muted: #64748b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --line: #e2e8f0;
  --navy: #0b192c;
  --accent: #0f4c81;
  --accent-hover: #0a365c;
  --wa-green: #0d7a5f;
  --wa-green-bright: #128c7e;
  --up: #0d7a5f;
  --down: #b42318;
  --amber: #d97706;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 48px rgba(11, 25, 44, 0.09);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(15, 76, 129, 0.08), transparent 32rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.container,
.site-header,
.site-footer,
.hero,
.progress-panel,
.fallback-panel,
.result-shell,
.workbench-section,
.directory-section,
.playbook-section,
.movers-section,
.scope-section,
.doc-main {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

/* Top Benchmark Strip */
.benchmark-bar {
  background: var(--navy);
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
}

.benchmark-bar-inner {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  min-height: 40px;
  padding-block: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.benchmark-tag {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.benchmark-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.benchmark-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  font-size: 0.8rem;
  min-height: 30px;
}

.benchmark-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.benchmark-pill em {
  font-style: normal;
  font-weight: 600;
}

.chg-up {
  color: #34d399;
}

.chg-down {
  color: #fca5a5;
}

.mover-badge.chg-up {
  color: var(--up);
  background: rgba(13, 122, 95, 0.1);
}

.mover-badge.chg-down {
  color: var(--down);
  background: rgba(180, 35, 24, 0.1);
}

/* Header */
.site-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--navy);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--navy);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.header-nav a {
  padding-block: 8px;
}

.header-nav a:hover {
  color: var(--accent);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-block: 44px 56px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.22;
  margin-top: 0;
}

h1 {
  font-size: clamp(1.85rem, 3.3vw, 2.65rem);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 20px;
  color: var(--ink-secondary);
  font-size: 1.04rem;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}

.trust-list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.94rem;
  color: var(--ink-secondary);
}

.trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--up);
  font-weight: 800;
}

.community-value {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.community-value h2 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.community-value ul {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--ink-secondary);
  font-size: 0.91rem;
}

.community-value p.boundary-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Tool Card */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.tool-card label {
  display: block;
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-size: 1rem;
  color: var(--ink);
}

.input-row input:focus {
  border-color: var(--accent);
}

.primary-button {
  min-height: 50px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-hover);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.secondary-button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
}

.secondary-button:hover {
  background: var(--surface-alt);
}

.quick-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.chips-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.chip-btn {
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-alt);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #ffffff;
}

.data-limitation-note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--down);
  font-size: 0.88rem;
  font-weight: 600;
}

.submit-guidance {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent);
  font-size: 0.88rem;
}

/* Subtle Passive WhatsApp Bar inside Hero Card */
.passive-wa-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.passive-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13, 122, 95, 0.1);
  color: var(--wa-green);
  font-weight: 700;
  font-size: 0.86rem;
}

.passive-wa-link:hover {
  background: rgba(13, 122, 95, 0.16);
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  background: var(--wa-green);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.96rem;
  box-shadow: 0 6px 20px rgba(13, 122, 95, 0.25);
}

.whatsapp-button:hover {
  background: var(--wa-green-bright);
}

.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* 0-Second Pre-Rendered SSOT Snapshot & Cohort Comparison Card */
.ssot-instant-card {
  margin: 0 0 18px;
  padding: 15px 16px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.ssot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.ssot-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.ssot-card-title {
  margin: 0;
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.25;
}

.ssot-mode-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.ssot-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ssot-kpi-tile {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}

.ssot-kpi-tile span {
  display: block;
  font-size: 0.71rem;
  color: var(--muted);
  margin-bottom: 2px;
}

.ssot-kpi-tile strong {
  display: block;
  font-size: 0.91rem;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ssot-card-foot {
  margin: 9px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.cohort-list {
  display: grid;
  gap: 6px;
}

.cohort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.cohort-ident {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.cohort-ident strong {
  font-size: 0.88rem;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cohort-ident span {
  font-size: 0.77rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.cohort-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cohort-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.cohort-mcap {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-alt);
  padding: 2px 7px;
  border-radius: 999px;
}

.cohort-load-btn {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.cohort-load-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

/* Preview Grid below Tool Card */
.preview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
}

.preview-card h3 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.preview-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .container,
  .site-header,
  .site-footer,
  .hero,
  .progress-panel,
  .fallback-panel,
  .result-shell,
  .workbench-section,
  .directory-section,
  .playbook-section,
  .movers-section,
  .scope-section,
  .doc-main {
    width: calc(100% - 24px);
  }

  .benchmark-bar-inner {
    width: calc(100% - 24px);
    min-height: 36px;
    padding-block: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .benchmark-bar-inner::-webkit-scrollbar {
    display: none;
  }

  .benchmark-tag {
    display: none;
  }

  .benchmark-items {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .benchmark-pill {
    white-space: nowrap;
    padding: 3px 9px;
    font-size: 0.76rem;
    min-height: 26px;
  }

  .site-header {
    min-height: 50px;
    gap: 10px;
  }

  .brand {
    font-size: 0.94rem;
    gap: 8px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .header-nav {
    gap: 10px;
    font-size: 0.78rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-block: 14px 24px;
    gap: 14px;
  }

  .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 5px;
  }

  h1 {
    font-size: clamp(1.32rem, 5.1vw, 1.72rem);
    line-height: 1.2;
    margin-bottom: 8px;
  }

  .hero-lead {
    font-size: 0.89rem;
    line-height: 1.44;
    margin-bottom: 12px;
  }

  .ssot-instant-card {
    margin-bottom: 12px;
    padding: 12px 13px;
  }

  .ssot-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }

  .cohort-ident span {
    max-width: 145px;
  }

  .trust-list {
    gap: 6px;
    margin-bottom: 0;
  }

  .trust-list li {
    font-size: 0.82rem;
    line-height: 1.38;
    padding-left: 20px;
  }

  .tool-card {
    padding: 15px;
  }

  .tool-card label {
    font-size: 0.86rem;
    margin-bottom: 6px;
  }

  .input-row {
    flex-direction: row;
    gap: 8px;
  }

  .input-row input {
    min-height: 46px;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .primary-button {
    width: auto;
    min-height: 46px;
    padding: 10px 15px;
    font-size: 0.88rem;
  }

  .quick-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 10px;
    padding-bottom: 2px;
  }

  .quick-chips::-webkit-scrollbar {
    display: none;
  }

  .chip-btn {
    flex-shrink: 0;
    min-height: 31px;
    padding: 4px 10px;
    font-size: 0.79rem;
  }

  .passive-wa-strip {
    margin-top: 12px;
    padding-top: 11px;
    gap: 8px;
  }

  .passive-wa-link {
    width: 100%;
    justify-content: center;
    background: var(--wa-green);
    color: #ffffff;
    min-height: 46px;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .passive-wa-link:hover {
    background: var(--wa-green-bright);
  }

  .preview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
}
