/* ==========================================================================
   CryptoFlow by lag0: shared design system for the public pages
   (guides, Signal Ledger, legal pages, risk notice, 404).

   Loaded LAST in every public <head>, after seo.css or signals.css, so it
   wins by cascade order. It maps those page variables onto the app tokens
   and holds the one shared header, footer, CTA and lockup.
   ========================================================================== */

/* Fonts: same files and family names as the app (public/fonts, WP-A). */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* App tokens (src/index.css) */
  --bg-primary: #050912;
  --bg-secondary: #09111d;
  --bg-tertiary: #0f1a29;
  --buy-color: #00e676;
  --sell-color: #ff1744;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #7f8ea3;
  --neutral-light: #94a3b8;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-15: 15px; --fs-18: 18px; --track-caps: .04em;
  --surface-1: #09111d; --surface-2: #0f1a29; --surface-3: #16233a; --surface-inset: #070d17;
  --line-1: rgba(148, 163, 184, .12); --line-2: rgba(148, 163, 184, .22);
  --accent-primary: #38bdf8; --accent-hover: #7dd3fc; --on-accent: #07111f; --focus-ring: #7dd3fc;
  --select-bg: rgba(56, 189, 248, .16); --select-fg: #bae6fd; --select-ring: rgba(56, 189, 248, .45);
  --good: #34d399; --warn: #f59e0b; --bad: #f87171; --neutral: #64748b; --premium: #a78bfa;
  --radius-xs: 4px; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 12px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --ctl-sm: 28px; --ctl-md: 32px; --ctl-lg: 40px; --tap: 44px;
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, .5);
  --glass-blur: none;
  --accent-gradient: linear-gradient(var(--accent-primary), var(--accent-primary));

  /* Public-page layout */
  --site-max: 1160px;
  --site-bar-h: 60px;
  --ink: #eef2f7;

  /* seo.css (learn + guides) mapped onto the tokens */
  --bg: var(--bg-primary);
  --bg-soft: var(--surface-1);
  --panel: var(--surface-1);
  --panel-strong: var(--surface-2);
  --text: var(--ink);
  --accent: var(--accent-primary);
  --accent-2: var(--buy-color);
  --shadow: none;
  --radius: var(--radius-lg);
  --max: var(--site-max);

  /* signals.css (Signal Ledger) mapped onto the tokens */
  --surface: var(--surface-1);
  --surface-strong: var(--surface-2);
  --faint: var(--text-muted);
  --cyan: var(--accent-primary);
  --cyan-strong: var(--accent-primary);
  --long: var(--buy-color);
  --short: var(--sell-color);
  --gold: var(--warn);
  --page: var(--bg-primary);

  /* Shared by both page styles */
  --muted: var(--neutral-light);
  --line: var(--line-1);
}

/* --------------------------------------------------------------------------
   Base: one flat background, one type family
   -------------------------------------------------------------------------- */

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

html,
body {
  background: var(--bg-primary);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  /* signals.css sets tnum + ss01 on body; in Inter that widens hyphens
     ("rule - based"). Tabular figures are applied per numeric element. */
  font-feature-settings: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* signals.css decorative grid overlay */
body::before {
  content: none;
}

/* In-page anchors (#guides, #de) land below the sticky header */
[id] {
  scroll-margin-top: calc(var(--site-bar-h) + 16px);
}

h1,
h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
}

strong,
b {
  font-weight: 600;
}

code,
kbd,
samp {
  font-family: var(--font-mono);
}

:where(button, select, input, textarea, summary, a[href], [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

::selection {
  background: rgba(56, 189, 248, .3);
}

/* --------------------------------------------------------------------------
   Buttons and CTA: one solid primary, one secondary
   -------------------------------------------------------------------------- */

.site-cta,
.seo-nav .seo-cta,
.hero-actions .hero-primary,
.cta-strip a,
.button.button-primary,
.site-nav .nav-primary,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--ctl-lg);
  min-height: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--on-accent);
  background: var(--accent-primary);
  box-shadow: none;
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transform: none;
  transition: background-color .12s, border-color .12s, color .12s;
}

.site-cta:hover,
.seo-nav .seo-cta:hover,
.hero-actions .hero-primary:hover,
.cta-strip a:hover,
.button.button-primary:hover,
.site-nav .nav-primary:hover,
.btn-cta:hover {
  color: var(--on-accent);
  background: var(--accent-hover);
  border-color: transparent;
  transform: none;
}

.hero-actions .hero-secondary,
.button.button-secondary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--ctl-lg);
  min-height: 0;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: #e2e8f0;
  background: var(--surface-2);
  box-shadow: none;
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transform: none;
  transition: background-color .12s, border-color .12s, color .12s;
}

.hero-actions .hero-secondary:hover,
.button.button-secondary:hover,
.btn-secondary:hover {
  color: #f8fafc;
  background: var(--surface-3);
  border-color: var(--line-2);
  transform: none;
}

.button {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Brand lockup: mark + "CryptoFlow" + small "by lag0" (matches the app)
   -------------------------------------------------------------------------- */

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand-lockup img {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
}

.brand-lockup__text {
  white-space: nowrap;
}

.brand-lockup__name {
  font: 600 15px/1 var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand-lockup__by {
  margin-left: 4px;
  font: 500 12px/1 var(--font-sans);
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Shared header (identical markup on every public page)
   -------------------------------------------------------------------------- */

.site-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line-1);
}

.site-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(var(--site-max), calc(100% - 32px));
  min-height: var(--site-bar-h);
  margin: 0 auto;
}

.site-bar .brand-lockup {
  margin-right: auto;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font: 500 13px/1 var(--font-sans);
  text-decoration: none;
  transition: background-color .12s, color .12s;
}

.site-links a:hover {
  color: var(--ink);
  background: rgba(148, 163, 184, .08);
}

.site-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-bar .site-cta {
  height: 36px;
  padding: 0 14px;
}

/* Phone menu: only shown at <=640px */
.site-menu {
  display: none;
}

.site-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  list-style: none;
}

.site-menu > summary::-webkit-details-marker {
  display: none;
}

.site-menu > summary svg {
  width: 18px;
  height: 18px;
}

.site-menu[open] > summary {
  color: var(--ink);
  background: var(--surface-2);
}

.site-menu__panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 4px 16px 8px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  box-shadow: var(--shadow-pop);
}

.site-menu__panel a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text-secondary);
  font: 500 15px/1 var(--font-sans);
  text-decoration: none;
  border-bottom: 1px solid var(--line-1);
}

.site-menu__panel a:last-child {
  border-bottom: 0;
}

.site-menu__panel a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .site-links {
    display: none;
  }

  .site-menu {
    display: block;
  }

  .site-bar__inner {
    gap: 8px;
    width: calc(100% - 32px);
    min-height: 56px;
  }

  .site-bar .site-cta {
    height: 40px;
    padding: 0 14px;
  }
}

@media (max-width: 420px) {
  .site-bar .brand-lockup__by {
    display: none;
  }
}

@media (max-width: 360px) {
  .site-bar__inner {
    gap: 6px;
  }

  .site-bar .brand-lockup {
    gap: 8px;
  }

  .site-bar .site-cta {
    padding: 0 10px;
    font-size: 12px;
  }
}

/* --------------------------------------------------------------------------
   Shared footer (identical markup on every public page)
   -------------------------------------------------------------------------- */

.site-foot {
  margin-top: 48px;
  background: var(--surface-1);
  border-top: 1px solid var(--line-1);
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: min(var(--site-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.site-foot__note {
  margin: 0;
  color: var(--text-muted);
  font: 400 13px/1.5 var(--font-sans);
}

.site-foot__note strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.site-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -10px;
}

.site-foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font: 500 13px/1 var(--font-sans);
  text-decoration: none;
}

.site-foot__links a:hover {
  color: var(--ink);
  background: rgba(148, 163, 184, .08);
}

@media (max-width: 640px) {
  .site-foot__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0 24px;
  }
}

/* --------------------------------------------------------------------------
   Learn + guides (seo.css): flat surfaces, Inter headings, 11px floor
   -------------------------------------------------------------------------- */

.seo-shell {
  width: min(var(--site-max), calc(100% - 32px));
}

.seo-shell .hero {
  padding: 56px 0 32px;
}

.seo-shell .hero-grid {
  gap: 32px;
  align-items: start;
}

.seo-shell .hero h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.08;
}

.seo-shell .hero p {
  color: var(--neutral-light);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.hero-copy {
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.hero-card,
.content-card,
.faq-item,
.route-card,
.compare-card,
.guide-figure,
.article-note,
.cta-strip {
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: none;
}

.hero-card {
  justify-content: flex-start;
  gap: 16px;
  padding: 24px;
}

.hero-card h2 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.stats-grid {
  gap: 16px 20px;
}

.stat {
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid var(--line-1);
  border-radius: 0;
  background: none;
  color: var(--neutral-light);
  font-size: 14px;
  line-height: 1.5;
}

.stat strong {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow,
.section-kicker,
.trust-kicker {
  color: var(--neutral-light);
  font: 600 11px/1.3 var(--font-sans);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}

.seo-shell .eyebrow {
  margin-bottom: 14px;
}

.section-title {
  color: var(--ink);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  line-height: 1.15;
}

.section-head {
  margin-bottom: 16px;
}

.section-head p {
  color: var(--neutral-light);
}

.content-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.route-card h3,
.compare-card h3,
.faq-item h3 {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.content-card p,
.route-card p,
.compare-card p,
.faq-item p,
.content-card li,
.compare-card li,
.route-card li {
  color: var(--neutral-light);
}

.article-meta span,
.muted-chip {
  padding: 6px 10px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--neutral-light);
  font-size: 12px;
}

.guide-figure figcaption {
  border-top-color: var(--line-1);
  color: var(--neutral-light);
}

.guide-figure img {
  background: var(--bg-primary);
}

.article-note {
  border-left: 2px solid var(--neutral);
}

.inline-link {
  color: var(--accent-primary);
}

.signal-up {
  color: var(--buy-color);
}

.signal-down {
  color: var(--sell-color);
}

.cta-strip {
  margin: 32px 0 16px;
  padding: 24px;
}

.cta-strip h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.3;
}

.cta-strip p {
  margin: 0;
  color: var(--neutral-light);
}

@media (max-width: 640px) {
  .seo-shell {
    width: calc(100% - 32px);
  }

  .seo-shell .hero {
    padding-top: 32px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-actions .hero-primary,
  .hero-actions .hero-secondary {
    flex: 1 1 auto;
  }
}

/* --------------------------------------------------------------------------
   learn.html: product intro and clickable guide cards
   -------------------------------------------------------------------------- */

.intro-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
  padding: 56px 0 40px;
}

.intro-hero h1 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

.intro-hero__lead {
  margin: 0;
  color: var(--neutral-light);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

.fact-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line-1);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.fact-list li:last-child {
  border-bottom: 1px solid var(--line-1);
}

.fact-list__label {
  color: var(--text-muted);
  font: 600 11px/1.3 var(--font-sans);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}

.intro-hero .hero-actions {
  margin-top: 24px;
}

.intro-hero__shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.intro-hero__shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.intro-hero__shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line-1);
  color: var(--text-muted);
  font-size: 13px;
}

.route-card--link {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 0 20px;
  overflow: hidden;
  transition: border-color .12s, background-color .12s;
}

.route-card--link > :not(.route-card__media) {
  margin-right: 20px;
  margin-left: 20px;
}

.route-card--link > h3:first-child {
  margin-top: 20px;
}

.route-card__media {
  margin-bottom: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-primary);
}

.route-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Same source image as another card: show a zoomed detail instead */
.route-card__media--zoom img {
  transform: scale(1.9);
  transform-origin: 30% 42%;
}

.route-card--link h3 {
  margin-bottom: 6px;
}

.route-card--link h3 a {
  color: var(--ink);
  text-decoration: none;
}

.route-card--link h3 a::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: var(--radius-md);
}

.route-card--link h3 a:focus-visible {
  outline: none;
}

.route-card--link h3 a:focus-visible::after {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.route-card--link:hover {
  border-color: var(--line-2);
  background: var(--surface-2);
}

.route-card--link:hover h3 a {
  color: var(--accent-hover);
}

.route-card--link p {
  margin: 0;
}

.route-card--link ul {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .intro-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }
}

@media (max-width: 640px) {
  .intro-hero {
    padding: 28px 0 24px;
  }

  .fact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* --------------------------------------------------------------------------
   Signal Ledger (signals.css): Inter headings, flat panels, 11px floor.
   The ledger sections are unchanged; only their styling is normalised.
   -------------------------------------------------------------------------- */

.page-shell {
  width: auto;
  margin: 0;
}

.page-shell > main {
  width: min(var(--site-max), calc(100% - 32px));
  margin: 0 auto;
}

.page-shell .hero {
  padding: clamp(48px, 7vw, 96px) 0 56px;
}

.page-shell .hero h1 {
  margin: 20px 0 20px;
  font-family: var(--font-sans);
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.page-shell .hero h1 em {
  color: var(--neutral-light);
  font-style: normal;
  font-weight: 600;
}

.hero-lead {
  color: var(--neutral-light);
}

.live-dot {
  background: var(--good);
  box-shadow: none;
}

.trust-panel {
  min-height: 0;
  padding: 28px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: none;
}

.trust-panel::before,
.trust-panel::after {
  content: none;
}

.trust-panel__scan {
  display: none;
}

.trust-panel strong {
  font: 600 15px/1.35 var(--font-sans);
  letter-spacing: -0.01em;
}

.feed-state {
  color: var(--text-muted);
  font: 600 11px/1.3 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.feed-state__dot {
  width: 6px;
  height: 6px;
  background: var(--warn);
}

.feed-state__dot.connected {
  background: var(--good);
  box-shadow: none;
}

.feed-state__dot.error {
  background: var(--bad);
}

.beta-notice {
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: rgba(245, 158, 11, .07);
}

.beta-notice strong {
  color: var(--warn);
  font: 600 11px/1.5 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.section-heading h2,
.method-section h2 {
  font-family: var(--font-sans);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-heading p {
  color: var(--neutral-light);
}

.metric-grid {
  margin-top: 24px;
}

.metric-card strong,
.signal-levels,
.ft-now strong,
.ft-kv dd,
.ft-table td {
  font-variant-numeric: tabular-nums;
}

.metric-card {
  min-height: 0;
  padding: 18px 20px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.metric-card::before {
  content: none;
}

.metric-card span {
  color: var(--text-muted);
  font: 600 11px/1.3 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.metric-card small {
  color: var(--text-muted);
  font: 400 12px/1.4 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
}

.metric-card strong {
  margin: 12px 0 6px;
  font: 600 clamp(26px, 2.6vw, 36px)/1.05 var(--font-mono);
  letter-spacing: -0.02em;
}

.definition-grid {
  border-radius: var(--radius-md);
}

.definition-grid article {
  min-height: 0;
  padding: 20px;
  background: var(--surface-1);
}

.definition-index {
  color: var(--text-muted);
  font: 600 11px/1 var(--font-mono);
}

.definition-grid h3 {
  margin: 12px 0 8px;
  font-size: 15px;
}

.definition-grid p {
  color: var(--neutral-light);
}

.archive-count {
  color: var(--neutral-light);
  font: 400 13px/1.5 var(--font-sans);
}

.signal-card {
  border-radius: var(--radius-md);
}

.signal-card:hover {
  transform: none;
}

.signal-badge {
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  font: 600 11px/1 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.signal-identity strong {
  font: 600 18px/1.2 var(--font-mono);
}

.signal-identity small {
  font-size: 12px;
}

.signal-level span {
  font: 600 11px/1 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.signal-level strong {
  font: 600 14px/1.2 var(--font-mono);
}

.signal-context {
  font-size: 12px;
}

.signal-status {
  font: 600 12px/1.35 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.signal-empty,
.signal-error {
  border-radius: var(--radius-md);
}

.method-section > p {
  color: var(--neutral-light);
}

.ft-card {
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.ft-card h3 {
  color: var(--text-muted);
  font: 600 11px/1.3 var(--font-sans);
  letter-spacing: var(--track-caps);
}

.ft-now strong {
  font-family: var(--font-mono);
  font-weight: 600;
}

.ft-table-wrap {
  border-radius: var(--radius-md);
}

.ft-table th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--track-caps);
  background: var(--surface-1);
}

.ft-status {
  border-radius: var(--radius-xs);
  font-size: 12px;
}

.toast {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  box-shadow: var(--shadow-pop);
}

@media (max-width: 760px) {
  .page-shell .hero {
    padding: 40px 0 40px;
  }
}

/* --------------------------------------------------------------------------
   Legal pages and risk notice: one reading column
   -------------------------------------------------------------------------- */

.legal {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 16px;
}

.legal h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
}

.legal .legal-stand {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.legal .lead {
  margin: 0 0 24px;
  color: var(--neutral-light);
  font-size: 16px;
  line-height: 1.6;
}

.legal .grid {
  display: block;
}

.legal .card {
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-top: 1px solid var(--line-1);
  border-radius: 0;
  background: none;
}

.legal h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.legal h3 {
  margin: 20px 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}

.legal p,
.legal li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.legal p {
  margin: 0;
}

.legal p + p,
.legal ul + p,
.legal p + ul,
.legal h3 + p,
.legal h3 + ul {
  margin-top: 10px;
}

.legal ul {
  margin: 0;
  padding-left: 20px;
}

.legal li + li {
  margin-top: 2px;
}

.legal a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, .4);
  text-underline-offset: 2px;
}

.legal a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

.legal .label {
  color: var(--ink);
  font-weight: 600;
}

.legal .muted-box {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.legal .notice {
  margin-bottom: 24px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: rgba(245, 158, 11, .07);
}

.legal code {
  color: var(--ink);
  font-size: .9em;
}

.legal .legal-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

/* The pills are spaced by the flex gap; the body-list rhythm
   (.legal li + li) would push the second pill 2px down. */
.legal .legal-toc li + li {
  margin-top: 0;
}

.legal .legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface-1);
  font: 500 13px/1 var(--font-sans);
  text-decoration: none;
}

.legal .legal-toc a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.legal-part {
  scroll-margin-top: calc(var(--site-bar-h) + 16px);
}

.legal-part + .legal-part {
  margin-top: 32px;
}

.legal .legal-part__title {
  margin: 0 0 8px;
  padding-top: 32px;
  border-top: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
}

/* Risk notice, German part: h3 section titles look like the English h2 */
.legal-part .card > h3:first-child {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .legal {
    width: calc(100% - 32px);
    padding-top: 32px;
  }
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

body:has(> .notfound) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body:has(> .notfound) .site-foot {
  margin-top: 0;
}

.notfound {
  display: grid;
  flex: 1 0 auto;
  place-items: center;
  width: min(var(--site-max), calc(100% - 32px));
  min-height: 420px;
  margin: 0 auto;
  padding: 64px 0;
  text-align: center;
}

.notfound__code {
  margin: 0 0 12px;
  color: var(--text-muted);
  font: 600 11px/1.3 var(--font-mono);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
}

.notfound h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
}

.notfound p {
  max-width: 460px;
  margin: 0 auto;
  color: var(--neutral-light);
  font-size: 16px;
  line-height: 1.6;
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .site-links a,
  .site-cta,
  .route-card--link {
    transition: none;
  }
}
