/* OTW Signal — component styles, built on top of the existing styles.css
   brand variables (--ink, --paper, --signal, etc.) so it matches the rest
   of the site. */

.signal-hero {
  padding: 64px 0 48px;
}
.signal-hero .wrap {
  max-width: 760px;
}
.signal-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 16px;
}
.signal-hero h1 {
  font-family: 'Archivo Expanded', sans-serif;
  font-weight: 900;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.signal-hero .sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.55;
  margin: 0 0 40px;
}

/* --- Auth bar (top right of nav) --- */
.auth-bar { display: flex; align-items: center; gap: 12px; }
.auth-bar button, .auth-bar .auth-email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}
.auth-link-btn {
  background: none; border: none; color: var(--ink); cursor: pointer;
  font-weight: 600; text-decoration: underline; padding: 0;
}
.auth-email { color: var(--muted); }

/* --- Modal (signup/login) --- */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(21,24,28,0.55);
  z-index: 100; align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.active { display: flex; }
.modal-card {
  background: var(--paper); border-radius: 14px; padding: 36px;
  max-width: 420px; width: 100%; position: relative;
}
.modal-close {
  position: absolute; top: 18px; right: 18px; background: none; border: none;
  font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1;
}
.modal-card h2 {
  font-family: 'Archivo Expanded', sans-serif; font-weight: 900; font-size: 24px; margin: 0 0 6px;
}
.modal-card .modal-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.modal-tabs { display: flex; gap: 6px; margin-bottom: 24px; }
.modal-tab {
  flex: 1; padding: 10px; text-align: center; border-radius: 8px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600;
  background: var(--paper-dim); color: var(--muted); border: none;
}
.modal-tab.active { background: var(--ink); color: var(--paper); }

.form-field { margin-bottom: 16px; }
.form-field label {
  display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.form-field input {
  width: 100%; background: #fff; border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 11px 13px; font-family: 'Archivo', sans-serif;
  font-size: 15px; color: var(--ink); outline: none;
}
.form-field input:focus { border-color: var(--signal); }
.modal-submit {
  width: 100%; background: var(--signal); color: #fff; border: none;
  border-radius: 8px; padding: 13px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  cursor: pointer; margin-top: 6px;
}
.modal-submit:hover { background: #256D68; }
.modal-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.modal-error {
  display: none; background: #F7E9E3; border: 1px solid #E0B79C; color: #7A3B1D;
  border-radius: 8px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
}
.modal-error.active { display: block; }

/* --- The business-input + pricing card --- */
.signal-card {
  background: var(--ink); border-radius: 14px; padding: 36px; color: var(--paper);
}
.signal-card .form-field label { color: var(--signal-bright); }
.signal-card .form-field input, .signal-card .form-field textarea {
  background: var(--ink-soft); border: 1px solid #2E333A; color: var(--paper);
}
.signal-card textarea { resize: vertical; min-height: 70px; line-height: 1.5; width: 100%; padding: 11px 13px; border-radius: 8px; font-family: 'Archivo', sans-serif; font-size: 15px; }
.price-row {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 1px solid #2E333A; margin-top: 24px; padding-top: 20px;
}
.price-label { font-size: 14px; color: #9AA6A3; }
.price-amount { font-family: 'Archivo Expanded', sans-serif; font-weight: 900; font-size: 28px; }
.signal-submit {
  width: 100%; margin-top: 20px; background: var(--signal); color: #fff; border: none;
  border-radius: 8px; padding: 15px 20px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer;
}
.signal-submit:hover:not(:disabled) { background: #256D68; }
.signal-submit:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- How it works --- */
.how-it-works { padding: 60px 0; border-top: 1px solid var(--line-soft); }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.how-step .how-num {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  color: var(--signal); margin-bottom: 10px;
}
.how-step h3 { font-family: 'Archivo Expanded', sans-serif; font-size: 17px; margin: 0 0 8px; }
.how-step p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }

@media (max-width: 700px) {
  .how-grid { grid-template-columns: 1fr; }
}

/* --- Evidence ledger (report page) --- */
.ledger { position: relative; padding-left: 34px; margin-top: 40px; }
.ledger::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line-soft);
}
.layer { position: relative; margin-bottom: 44px; }
.layer:last-child { margin-bottom: 0; }
.layer-node {
  position: absolute; left: -34px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--signal); display: flex; align-items: center; justify-content: center;
}
.layer-node span { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.layer-label {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); margin-bottom: 10px;
}
.fact-card {
  background: var(--ink); color: #D8DCD9; border-radius: 10px; padding: 18px 20px;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.7;
  max-height: 320px; overflow-y: auto;
}
.fact-card .fk { color: var(--signal-bright); }
.fact-card div { margin-bottom: 4px; }
.interp-text, .impact-text { font-size: 15.5px; line-height: 1.65; color: var(--ink); }
.cite {
  display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px;
  padding: 0 4px; background: #E4EEEC; color: var(--signal); border-radius: 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; vertical-align: 2px; margin: 0 2px;
}
.rec-item { background: var(--paper-dim); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.rec-item:last-child { margin-bottom: 0; }
.rec-action { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.rec-evidence { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 8px; }
.impact-hypothesis { background: #F0F4F3; border-radius: 10px; padding: 18px 20px; }
.impact-caveat { margin-top: 14px; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* --- Verdict banner --- */
.verdict-banner {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 24px 26px; border-radius: 12px; margin: 28px 0 24px;
}
.verdict-banner.not-mentioned { background: #F7E9E3; border: 1px solid #E0B79C; }
.verdict-banner.mentioned { background: #E4EEEC; border: 1px solid #A9CFC9; }
.verdict-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; color: #fff;
}
.verdict-banner.not-mentioned .verdict-icon { background: #B9552C; }
.verdict-banner.mentioned .verdict-icon { background: var(--signal); }
.verdict-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; display: block;
}
.verdict-banner.not-mentioned .verdict-tag { color: #B9552C; }
.verdict-banner.mentioned .verdict-tag { color: var(--signal); }
.verdict-text {
  font-family: 'Archivo Expanded', sans-serif; font-weight: 700; font-size: 18px;
  line-height: 1.4; color: var(--ink); margin: 0;
}

/* --- Summary callout --- */
.summary-callout {
  font-size: 17px; line-height: 1.6; color: var(--ink); margin: 0 0 8px;
  padding-bottom: 24px; border-bottom: 1px solid var(--line-soft);
}

/* --- Ranked competitor list --- */
.competitor-list { display: flex; flex-direction: column; gap: 6px; }
.competitor-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--paper-dim); border-radius: 8px; }
.competitor-rank { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; }
.competitor-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.competitor-freq { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--muted); }

/* --- Categorized facts grid (replaces raw monospace dump) --- */
.facts-grid { display: flex; flex-direction: column; gap: 8px; }
.fact-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
  background: var(--ink); border-radius: 8px; font-size: 13px; line-height: 1.5;
}
.fact-row .fk {
  flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  font-weight: 700; color: var(--signal-bright); background: rgba(127,184,175,0.15);
  border-radius: 4px; padding: 1px 6px; margin-top: 1px;
}
.fact-row .fv { color: #D8DCD9; }
.fact-row .fcat {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--signal-bright); margin-right: 6px;
}
.fact-row.mentioned { border-left: 3px solid var(--signal-bright); }
.fact-row.not-mentioned-row { border-left: 3px solid #B9552C; }

/* --- Interpretation with paragraph breaks --- */
.interp-text p { margin: 0 0 14px; }
.interp-text p:last-child { margin-bottom: 0; }

/* --- Numbered recommendation cards --- */
.rec-item.numbered { display: flex; gap: 16px; }
.rec-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink);
  color: var(--paper); display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
}
.rec-body { flex: 1; }
.rec-why { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 6px 0 0; }
  margin-top: 60px; padding: 32px; background: var(--paper-dim); border-radius: 14px;
}
.consulting-cta h3 { font-family: 'Archivo Expanded', sans-serif; font-size: 20px; margin: 0 0 10px; }
.consulting-cta p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 18px; max-width: 560px; }

.status-line {
  display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--muted); margin-top: 24px;
}
.spinner {
  width: 15px; height: 15px; border: 2px solid var(--line-soft); border-top-color: var(--signal);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Pricing tier cards --- */
.pricing-section { padding: 20px 0 60px; }
.pricing-h2 { font-family: 'Archivo Expanded', sans-serif; font-weight: 900; font-size: 26px; margin: 0 0 28px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; max-width: 780px; }
.pricing-badge.muted { background: var(--muted); }
.preview-link {
  display: block; text-align: center; margin-top: 12px; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; color: var(--muted); text-decoration: underline;
}
.pricing-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: 14px; padding: 26px;
  display: flex; flex-direction: column; position: relative;
}
.pricing-card.featured { border: 2px solid var(--signal); box-shadow: 0 8px 24px rgba(31,95,91,0.12); }
.pricing-card.disabled { opacity: 0.7; }
.pricing-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--signal); color: #fff; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 700; padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.pricing-tier-name { font-family: 'Archivo Expanded', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.pricing-price { font-family: 'Archivo Expanded', sans-serif; font-weight: 900; font-size: 30px; margin-bottom: 10px; color: var(--ink); }
.pricing-price span { font-family: 'Archivo', sans-serif; font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }
.pricing-desc { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.pricing-features li {
  font-size: 13px; padding: 7px 0 7px 22px; position: relative; color: var(--ink); border-bottom: 1px solid var(--paper-dim);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: "✓"; position: absolute; left: 0; color: var(--signal); font-weight: 700; }
.pricing-cta {
  width: 100%; background: var(--ink); color: var(--paper); border: none; border-radius: 8px;
  padding: 13px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
}
.pricing-cta.primary { background: var(--signal); }
.pricing-cta.primary:hover { background: #256D68; }
.pricing-cta:hover:not(:disabled) { opacity: 0.9; }
.pricing-cta:disabled { background: var(--paper-dim); color: var(--muted); cursor: not-allowed; }

.plan-toggle { display: flex; gap: 4px; background: var(--paper-dim); border-radius: 8px; padding: 4px; margin-bottom: 14px; }
.plan-toggle-btn {
  flex: 1; background: none; border: none; padding: 7px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.plan-toggle-btn.active { background: var(--ink); color: #fff; }
.save-tag { display: block; font-size: 9px; opacity: 0.8; }

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* --- Dashboard upsell (on report page) --- */
.dashboard-upsell {
  margin-top: 48px; padding: 28px; background: var(--ink); border-radius: 14px; color: var(--paper); position: relative;
}
.upsell-badge {
  display: inline-block; background: var(--signal-bright); color: var(--ink); font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.dashboard-upsell h3 { font-family: 'Archivo Expanded', sans-serif; font-size: 19px; margin: 0 0 10px; }
.dashboard-upsell p { font-size: 14px; color: #C7CCC9; line-height: 1.55; margin: 0 0 20px; max-width: 560px; }
.upsell-cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upsell-annual-note { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #9AA6A3; }

/* --- NPS feedback form --- */
.feedback-block { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line-soft); }
.feedback-block h3 { font-family: 'Archivo Expanded', sans-serif; font-size: 16px; margin: 0 0 14px; }
.nps-scale { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.nps-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-soft); background: #fff;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.nps-btn.selected { background: var(--signal); color: #fff; border-color: var(--signal); }
.nps-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 18px; max-width: 400px; }
.feedback-block textarea {
  width: 100%; min-height: 70px; border: 1px solid var(--line-soft); border-radius: 8px; padding: 11px 13px;
  font-family: 'Archivo', sans-serif; font-size: 14px; margin-bottom: 14px; resize: vertical;
}
.feedback-submit {
  background: var(--ink); color: var(--paper); border: none; border-radius: 8px; padding: 11px 20px;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.feedback-thanks { margin-top: 12px; font-size: 13.5px; color: var(--signal); font-weight: 600; }

/* --- Continue-to-pricing prompt --- */
.continue-to-pricing {
  width: 100%; margin-top: 20px; background: none; border: 1px dashed var(--signal-bright);
  color: var(--signal-bright); border-radius: 8px; padding: 13px;
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
}
.continue-to-pricing:hover { background: rgba(127,184,175,0.1); }
