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

:root {
  --ink:     #1A1A2E;
  --mid:     #555566;
  --light:   #888899;
  --rule:    #E8E8EE;
  --paper:   #FFFFFF;
  --accent:  #C8392B;
  --accent-d:#b5302a;
  --bg:      #FAFAFA;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  z-index: 100;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}
.nav__about {
  font-size: 14px;
  color: var(--mid);
  text-decoration: none;
  transition: color 150ms;
}
.nav__about:hover { color: var(--ink); }

/* ── Hero ── */
.hero {
  padding: 80px 24px 56px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 24px;
}
.hero__headline {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero__sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--mid);
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero__hook {
  background: #F4F4FA;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  max-width: 560px;
  margin: 0 auto 12px;
  text-align: left;
}
.hero__hook-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.hero__hook p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--mid);
  margin: 0;
}
.hero__free {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 32px;
}

/* ── Form ── */
.form-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 10px;
}
.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 16px;
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  resize: vertical;
  transition: border-color 200ms;
  display: block;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea::placeholder { color: #aaa; }
.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--light);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', monospace;
}
.char-counter.warn { color: var(--accent); }
.submit-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 200ms;
}
.submit-btn:hover:not(:disabled) { background: var(--accent-d); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }

/* ── Counter (social proof) ── */
.counter {
  text-align: center;
  font-size: 13px;
  color: var(--light);
  font-variant-numeric: tabular-nums;
  margin-top: 28px;
  padding-top: 20px;
  letter-spacing: 0.01em;
  border-top: 1px solid var(--rule);
}
.counter strong {
  font-weight: 600;
  color: var(--mid);
}

/* ── Status / error messages ── */
.status-box {
  max-width: 680px;
  margin: 24px auto 0;
  padding: 0 24px;
}
.status-message {
  display: none;
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.status-message.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.status-message.rate-limited { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.status-message.loading {
  background: #f0f9ff;
  color: var(--mid);
  border: 1px solid #bae6fd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.loading-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #bae6fd;
  border-top-color: #0284c7;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-wrap {
  width: 100%;
  height: 3px;
  background: #bae6fd;
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #0284c7;
  border-radius: 2px;
  transition: width 0.5s ease-out;
}
.progress-phase {
  font-size: 11px;
  color: #0284c7;
  letter-spacing: 0.02em;
  min-height: 14px;
}

/* ── Topics discovery strip ── */
.topics-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #F7F7F9;
  border: 1px solid #E4E4EE;
  border-radius: 8px;
  font-size: 12px;
}
.topics-strip__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: white;
  border: 1.5px solid #D8D8E8;
  border-radius: 20px;
  padding: 5px 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
}
.topic-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #FFF5F4;
}
.topics-strip__note {
  font-size: 11px;
  color: #999;
  font-style: italic;
  margin-left: 2px;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .topics-strip__note { display: none; }
}

/* ── Expert domain banner ── */
.expert-banner {
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.expert-banner__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.jurisdiction-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: white;
  border-radius: 20px;
  padding: 3px 10px;
}
.domain-disclaimer {
  font-size: 12px;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 20px;
  line-height: 1.6;
}
/* ── Tier 1 site-wide disclaimer ── */
.tier1-disclaimer {
  font-size: 11px;
  color: var(--mid);
  text-align: center;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  line-height: 1.6;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
/* ── Clarification gate ── */
.gate-card {
  background: #FFFBF0;
  border: 1px solid #F0CC70;
  border-left: 3px solid #D4A017;
  border-radius: 0 8px 8px 0;
  padding: 18px 20px;
  margin: 0 auto 20px;
  max-width: 680px;
}
.gate-card__intro {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: 0.04em;
}
.gate-card__body {
  font-size: 14px;
  color: var(--mid);
  margin: 0 0 16px;
  line-height: 1.55;
  font-style: italic;
}
.gate-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.gate-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.gate-btn--yes { color: #087F5B; }
.gate-btn--yes:hover { background: #087F5B; color: white; }
.gate-btn--no { color: var(--mid); }
.gate-btn--no:hover { background: var(--mid); color: white; }
.gate-clarify-input {
  margin-top: 14px;
  display: none;
}
.gate-clarify-input textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #D4A017;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
}
.gate-clarify-input .gate-submit {
  margin-top: 8px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
/* ── Scope confirmation ── */
.scope-card {
  background: #F8F9FF;
  border: 1px solid #C7D7FC;
  border-left: 3px solid #4C6EF5;
  border-radius: 0 8px 8px 0;
  padding: 18px 20px;
  margin: 0 auto 20px;
  max-width: 680px;
}
.scope-card__question {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  line-height: 1.5;
}
.scope-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scope-btn {
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #4C6EF5;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  background: transparent;
  color: #4C6EF5;
  transition: background 0.15s, color 0.15s;
}
.scope-btn:hover { background: #4C6EF5; color: white; }
.scope-other-input {
  margin-top: 12px;
  display: none;
}
.scope-other-input input {
  border: 1.5px solid #4C6EF5;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 260px;
  max-width: 100%;
}
.scope-other-input button {
  margin-left: 8px;
  background: #4C6EF5;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ── Results ── */
.results {
  display: none;
  max-width: 680px;
  margin: 36px auto 0;
  padding: 0 24px 80px;
}
.results__divider {
  border: none;
  border-top: 1px solid var(--rule);
  margin-bottom: 32px;
}
.unavailable-note {
  font-size: 13px;
  color: var(--light);
  margin-bottom: 20px;
  font-style: italic;
}

/* Confidence badge */
.confidence-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.confidence-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
}
.confidence-badge {
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
}
.confidence-badge.high   { background: #d1fae5; color: #065f46; }
.confidence-badge.medium { background: #fef3c7; color: #92400e; }
.confidence-badge.low    { background: #fee2e2; color: #991b1b; }

/* Model cards */
.models-section { margin-bottom: 32px; }
.models-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 16px;
}
.model-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.model-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #F7F7FA;
  cursor: pointer;
  user-select: none;
}
.model-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.model-card__position {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}
.pos-agree    { background: #d1fae5; color: #065f46; }
.pos-partial  { background: #fef3c7; color: #92400e; }
.pos-disagree { background: #fee2e2; color: #991b1b; }
.pos-unknown  { background: #f3f4f6; color: #6b7280; }
.model-card__body {
  display: none;
  padding: 16px;
}
.model-card__body.open { display: block; }
.model-card__phase-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 6px;
  margin-top: 14px;
}
.model-card__phase-label:first-child { margin-top: 0; }
.model-card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mid);
  white-space: pre-wrap;
}

/* Question card */
.question-card {
  background: #F7F7FA;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.question-card__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 6px;
}
.question-card__text {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}

/* Consensus / BLUF */
.consensus-section { margin-bottom: 32px; }
.consensus-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light);
  margin-bottom: 14px;
}
.consensus-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: #fff8f8;
  border: 1px solid #f0cece;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  white-space: pre-wrap;
}
.consensus-text.guidance {
  background: #fffdf5;
  border-color: #e8d5a0;
  border-left-color: var(--gold, #B8922A);
}

/* Contribution cards (TYPE B) */
.contrib-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
}
.contrib-card__model {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 70px;
  padding-top: 1px;
}
.contrib-card__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--mid);
}

/* Feedback */
.feedback-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.feedback-prompt {
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 12px;
}
.feedback-buttons { display: flex; gap: 12px; justify-content: center; }
.feedback-btn {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 10px 24px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 150ms;
  font-family: inherit;
}
.feedback-btn:hover { border-color: var(--accent); }
.feedback-thanks {
  display: none;
  font-size: 13px;
  color: var(--light);
  margin-top: 12px;
}

/* CTA at bottom of results */
.results__cta {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.results__cta-prompt {
  font-size: 14px;
  color: var(--mid);
  margin-bottom: 14px;
}
.results__cta-btn {
  display: inline-block;
  padding: 15px 36px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 200ms;
}
.results__cta-btn:hover { background: var(--accent-d); }

/* ── How it works ── */
.how-section {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  padding: 80px 24px;
  margin-top: 80px;
  scroll-margin-top: 52px;
}
.how-inner { max-width: 900px; margin: 0 auto; }
.how-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--light);
  text-align: center;
  margin-bottom: 16px;
}
.how-heading {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
  margin-bottom: 56px;
  letter-spacing: -0.01em;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.how-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px 24px;
  background: var(--bg);
}
.how-card__phase {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.how-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.how-card__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--mid);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--light);
  border-top: 1px solid var(--rule);
}

/* Confidence agreement sub-label */
.confidence-agreement {
  font-size: 13px;
  color: var(--mid);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero { padding: 56px 24px 40px; }
  .hero__sub { font-size: 16px; }
  .how-grid { grid-template-columns: 1fr; }
  .results { padding-bottom: 60px; }
  .question-card,
  .consensus-section,
  .confidence-row,
  .models-section,
  .feedback-section,
  .results__cta { margin-bottom: 28px; }
}
