/* Shared design tokens — extends frontend/src/styles/theme.css so the
   public site and the logged-in app read as one product, not two. */
:root {
  --navy: #14273f;
  --navy-deep: #0d1b2e;
  --steel: #3f6a95;
  --steel-light: #6d92b8;
  --accent: #2f7dc4;
  --confirmed: #0e7a4e;
  --urgent: #b3382e;

  --bg: #f5f8fb;
  --bg-alt: #e8eef5;
  --surface: #ffffff;
  --line: #d3dee9;
  --text: #1c2b3a;
  --text-soft: #5b6f83;

  --radius: 8px;
  --sans: -apple-system, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  --measure: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1420;
    --bg-alt: #111a2b;
    --surface: #16223a;
    --line: #263752;
    --text: #e6ecf5;
    --text-soft: #93a5bd;
    --urgent: #d8594a;
    --confirmed: #22a273;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-light);
}

h1, h2, h3 { text-wrap: balance; margin: 0; }

.overflow-x { overflow-x: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy);
  border-bottom: 1px solid var(--navy-deep);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.brand-mark { font-size: 20px; }
.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--steel-light);
  text-decoration: none;
  font-size: 14px;
}
.site-nav a:hover { color: #fff; }
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 9px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #2a6fac; }
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-ghost:hover { border-color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 72px 0 88px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 14px 0 20px;
}
.hero .accent-word { color: #7fb4e8; }
.hero p.lede {
  font-size: 18px;
  color: #c3d3e6;
  max-width: 52ch;
  margin: 0 0 28px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}
.stat-num {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 12.5px;
  color: #9db2c9;
}

/* Signal-card mockup — mirrors the real app's row styling */
.feed-mock {
  background: var(--surface);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 24px 60px -20px rgba(3, 10, 22, 0.55);
}
.feed-card {
  display: flex;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.feed-card:last-child { border-bottom: none; }
.feed-icon { font-size: 17px; line-height: 1.3; }
.feed-body { min-width: 0; }
.feed-headline {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.feed-meta {
  color: var(--text-soft);
  font-size: 12.5px;
  margin-top: 3px;
}
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.tag-urgent { background: rgba(179, 56, 46, 0.12); color: var(--urgent); }
.tag-confirmed { background: rgba(14, 122, 78, 0.12); color: var(--confirmed); }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.01em;
  margin-top: 10px;
}
.section-head p {
  color: var(--text-soft);
  font-size: 16px;
  margin: 12px 0 0;
}

/* Trust / how-it-thinks */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 860px) {
  .trust-grid { grid-template-columns: 1fr; }
}
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.trust-card .glyph {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--confirmed);
  margin-bottom: 10px;
}
.trust-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.trust-card p { color: var(--text-soft); font-size: 14.5px; margin: 0; }

/* Signal type grid */
.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.signal-item {
  background: var(--surface);
  padding: 20px;
}
.signal-item .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.signal-item .icon { font-size: 16px; }
.signal-item .name { font-weight: 700; font-size: 14.5px; }
.signal-item .urgency {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  text-transform: uppercase;
}
.signal-item p { color: var(--text-soft); font-size: 13.5px; margin: 0; line-height: 1.5; }

/* Sources */
.sources-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
}
@media (max-width: 700px) {
  .sources-list { grid-template-columns: 1fr; }
}
.source-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.source-row .kind { color: var(--text-soft); font-family: var(--mono); font-size: 12px; }

/* Product surfaces */
.surface-list { display: flex; flex-direction: column; gap: 0; }
.surface-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.surface-row:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 700px) {
  .surface-row { grid-template-columns: 1fr; gap: 6px; }
}
.surface-row h3 { font-size: 15.5px; }
.surface-row p { color: var(--text-soft); font-size: 14.5px; margin: 0; max-width: 60ch; }

/* Pricing */
.pricing-card {
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
@media (max-width: 700px) {
  .pricing-card { grid-template-columns: 1fr; text-align: left; }
}
.pricing-card .price {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pricing-card .price small { font-size: 15px; font-weight: 500; color: #a9bed6; }
.pricing-card p { color: #c3d3e6; margin: 10px 0 0; max-width: 46ch; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #9db2c9;
  padding: 40px 0;
  font-size: 13.5px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer a { color: #c3d3e6; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Legal documents (privacy / terms) ---------- */
.legal-page { background: var(--bg); }
.legal-hero {
  background: var(--navy);
  color: #fff;
  padding: 52px 0 40px;
}
.legal-hero .eyebrow { color: #7fb4e8; }
.legal-hero h1 { font-size: clamp(26px, 3.4vw, 34px); margin: 10px 0 8px; }
.legal-hero .updated { color: #9db2c9; font-size: 13.5px; font-family: var(--mono); }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}
.legal-notice {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 40px;
}
.legal-notice strong { display: block; margin-bottom: 4px; }

.legal-body h2 {
  font-size: 19px;
  margin-top: 44px;
  margin-bottom: 12px;
  padding-top: 4px;
}
.legal-body h2 .num {
  font-family: var(--mono);
  color: var(--steel-light);
  font-size: 15px;
  margin-right: 10px;
}
.legal-body h3 {
  font-size: 15.5px;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-body p, .legal-body li {
  font-size: 15px;
  color: var(--text);
  max-width: var(--measure);
}
.legal-body p { margin: 0 0 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--accent); }
.legal-toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 8px;
  background: var(--surface);
}
.legal-toc .eyebrow { display: block; margin-bottom: 10px; }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.legal-toc li { font-size: 14px; margin-bottom: 6px; break-inside: avoid; }
.legal-toc a { color: var(--text); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); }

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--text-soft);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }

/* ---------- Responsive overrides (kept last so equal-specificity
   component rules above don't win the cascade by source order) ---------- */
@media (max-width: 780px) {
  .site-nav { display: none; }
  .site-header .wrap { padding-top: 14px; padding-bottom: 14px; }
  .site-header .btn-ghost { display: none; }
}
