/* Swiss Signal — public site stylesheet. System fonts, one column, brand red accents.
   Theme: CSS custom properties on :root, light by default. Dark applies via
   prefers-color-scheme when no explicit choice is stored, or via
   :root[data-theme="dark"]/"light" when the header toggle has been used
   (see assets/theme.js + the inline no-flash snippet in each page's <head>). */

:root {
  /* Light (default) */
  --bg: #ffffff;
  --text: #2a2a2a;
  --ink: #141414;
  --muted: #666666;
  --surface: #ffffff;
  --surface-soft: #faf9f8;
  --border: #e5e5e5;
  --red: #DA291C;       /* brand red — buttons, borders, the footer baseline rule. Same in both themes. */
  --red-text: #DA291C;  /* red used AS text/links — lightened in dark mode for contrast, see below. */
  --success: #1a7a3c;

  --max: 720px;
  font-size: 16px;
}

/* System preference, only when the visitor hasn't made an explicit choice
   (that choice, once made, sets data-theme and always wins — see the
   :root[data-theme] blocks below). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --text: #E8E8E8;
    --ink: #F2F2F2;
    --muted: #9A9A9A;
    --surface: #1B1C1E;
    --surface-soft: #202124;
    --border: #303338;
    --red: #DA291C;
    --red-text: #FF5A46; /* DA291C on #111214 is ~3.85:1, below AA text contrast; this hits ~6:1. */
    --success: #34D399;
  }
}

/* Explicit override from the header toggle, wins over system preference either way. */
:root[data-theme="dark"] {
  --bg: #111214;
  --text: #E8E8E8;
  --ink: #F2F2F2;
  --muted: #9A9A9A;
  --surface: #1B1C1E;
  --surface-soft: #202124;
  --border: #303338;
  --red: #DA291C;
  --red-text: #FF5A46;
  --success: #34D399;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

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

a { color: var(--red-text); }
a:hover { text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.site-header .lockup { height: 28px; width: auto; }
.site-header nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
}
.site-header nav a.nav-link {
  color: var(--ink);
  text-decoration: none;
}
.site-header nav a.nav-link:hover { color: var(--red-text); }

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle svg { display: block; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  white-space: nowrap;
}
.btn:hover { background: #b8210f; color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--ink); background: transparent; color: var(--ink); }

/* Hero */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.hero .sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 56ch;
}
.hero .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Generic section rhythm */
section { padding: 44px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
section h2 {
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 24px;
}
section .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--red-text);
  font-weight: 700;
  margin: 0 0 8px;
}

/* Who it serves */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px;
}
@media (min-width: 640px) {
  .audience-grid { grid-template-columns: repeat(4, 1fr); }
}
.audience-grid .item h3 {
  font-size: 0.98rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.audience-grid .item p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* What you get */
.get-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.get-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.98rem;
}
.get-list li:first-child { border-top: none; }
.get-list li .num {
  flex: none;
  width: 1.6rem;
  color: var(--red-text);
  font-weight: 700;
}

/* Digest preview card — stands in for a screenshot; mirrors the real
   rendered-digest look (see data/digests/*.html) with redacted entities.
   This is regular themed markup (site classes, no inline styles carried
   over from the digest template), so it just follows the tokens above. */
.digest-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.digest-preview .dp-head {
  background: var(--surface-soft);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.digest-preview .dp-head strong {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.digest-preview .dp-head span {
  font-size: 0.82rem;
  color: var(--muted);
}
.digest-preview .dp-body {
  padding: 16px 18px 18px;
  font-family: Georgia, 'Times New Roman', serif;
}
.digest-preview h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 18px 0 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.digest-preview h4:first-child { margin-top: 0; }
.dp-metrics {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.dp-metrics td { padding: 2px 8px 2px 0; color: var(--text); }
.dp-event {
  font-size: 0.88rem;
  margin: 5px 0;
  color: var(--text);
}
.dp-event .tag { color: var(--muted); }

/* Sample teaser */
.teaser-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.teaser-card p { margin: 4px 0 0; color: var(--muted); }
.teaser-card h3 { margin: 0; color: var(--ink); }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}
.price-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.price-card.pro { border-color: var(--red); }
.price-card .plan-name { font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.price-card .plan-price { font-size: 1.9rem; color: var(--ink); margin: 0 0 4px; }
.price-card .plan-price span { font-size: 0.95rem; color: var(--muted); font-weight: 400; }
.price-card .plan-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red-text);
  font-weight: 700;
  margin-bottom: 10px;
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 20px;
  flex: 1;
}
.price-card li {
  font-size: 0.92rem;
  padding: 6px 0;
  color: var(--text);
}
.price-card li::before { content: "\2022  "; color: var(--red-text); }
.founding-note {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.founding-note a { font-weight: 600; }

/* Free list form */
.free-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 460px;
}
.free-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.free-form input[type="email"]::placeholder { color: var(--muted); }
.form-note { font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.form-status { margin-top: 12px; font-size: 0.92rem; display: none; }
.form-status.ok { display: block; color: var(--success); }
.form-status.err { display: block; color: var(--red-text); }

/* FAQ */
.faq-item { padding: 16px 0; border-top: 1px solid var(--border); }
.faq-item:first-child { border-top: none; }
.faq-item h3 { font-size: 1rem; color: var(--ink); margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* Footer */
footer.site-footer {
  border-top: 8px solid var(--red);
  padding: 32px 0 40px;
  font-size: 0.85rem;
  color: var(--muted);
}
footer.site-footer p { margin: 0 0 8px; }
footer.site-footer a { color: var(--muted); }
footer.site-footer a:hover { color: var(--red-text); }
footer.site-footer .imprint { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Sample page specific */
.sample-note {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 32px;
}
.digest-full {
  font-family: Georgia, 'Times New Roman', serif;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 24px 8px;
  background: var(--surface);
  color: var(--text);
}
.digest-full h2 { color: var(--ink); font-size: 1.15rem; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.digest-full .meta { color: var(--muted); font-size: 0.85rem; }
.digest-full table.metrics-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.digest-full table.metrics-table td { padding: 3px 6px 3px 0; }
.digest-full .event-line { font-size: 0.92rem; margin: 6px 0; }
.digest-full .event-line .entity { font-weight: bold; color: var(--text); }
.digest-full .event-line .tag { color: var(--muted); }
