/* Static pages (landing, guide, legal). Same tokens as the app (app/style.css) so both read as one product. */
:root {
  --fg: #0f172a; --fg-2: #475569; --muted: #64748b; --faint: #94a3b8;
  --border: rgba(15, 23, 42, 0.1); --border-strong: rgba(15, 23, 42, 0.16);
  --surface: #fff; --canvas: #eef1f4; --hover: #f5f7f9;
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #eff4ff;
  --radius: 6px; --wide: 1080px; --prose: 700px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--surface); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
.wrap { width: min(var(--wide), 100% - 32px); margin-inline: auto; }

/* ---- Header / footer ---- */
.site-header { position: sticky; top: 0; z-index: 1; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 56px; }
.wordmark { font-weight: 650; font-size: 15px; letter-spacing: -0.01em; color: var(--fg); text-decoration: none; }
.wordmark:hover { color: var(--fg); }
.site-header nav { display: flex; align-items: center; gap: 20px; margin-left: auto; font-size: 14px; }
.site-header nav a:not(.button) { color: var(--fg-2); text-decoration: none; }
.site-header nav a:not(.button):hover { color: var(--fg); }
.site-footer { margin-top: 96px; padding: 32px 0 48px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--fg-2); text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.site-footer .copy { margin-left: auto; }

/* ---- Buttons ---- */
.button {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px;
  font: 600 15px/1 system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
}
.button:hover { background: var(--hover); color: var(--fg); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.button.small { height: 34px; padding: 0 14px; font-size: 14px; }

/* ---- Landing ---- */
/* Hero on millimetre paper: 5 mm and 1 cm lines, fading out towards the bottom */
.hero {
  position: relative; background-color: var(--canvas); border-bottom: 1px solid var(--border); overflow: hidden;
  background-image:
    linear-gradient(rgba(29, 78, 216, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 78, 216, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(29, 78, 216, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 78, 216, 0.035) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 35%; background: linear-gradient(transparent, var(--canvas)); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 64px 0 0; }
.hero-text { padding-bottom: 64px; }
.hero-text p.lead { margin-top: 20px; font-size: 19px; color: var(--fg-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.hero-sheet { position: relative; align-self: end; justify-self: center; width: min(440px, 100%); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.pills li {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--fg-2);
}
.pills svg { width: 15px; height: 15px; color: #16a34a; }
/* Callouts over the hero image; positions in % of the sheet (210 mm wide, cropped at 190 mm) */
.window-outline {
  position: absolute; z-index: 1; left: 7.14%; top: 24.47%; width: 42.86%; height: 23.68%;
  border: 2px dashed var(--accent); border-radius: 10px; pointer-events: none;
}
.callout {
  position: absolute; z-index: 2; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}
.callout-window { left: 4%; top: calc(24.47% - 30px); }
.callout-signature { right: 3%; top: 83%; background: var(--fg); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25); }
.hero-sheet img { border-radius: 4px 4px 0 0; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.12); }

.section { padding-top: 88px; }
.section > .wrap > h2 { max-width: 24em; }
.section-intro { margin-top: 12px; color: var(--fg-2); max-width: 40em; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; padding: 0; list-style: none; }
.features li { padding: 22px; border: 1px solid var(--border); border-radius: 10px; }
.features p { margin-top: 8px; color: var(--fg-2); font-size: 15px; }
.fact { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---- Privacy band ---- */
.privacy { margin-top: 96px; padding: 88px 0; background: #0f172a; color: #e2e8f0; }
.privacy .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.privacy .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #93b4ff; }
.privacy .kicker svg { width: 18px; height: 18px; }
.privacy h2 { margin-top: 12px; color: #fff; font-size: clamp(26px, 3.6vw, 36px); }
.privacy-lead { margin-top: 16px; font-size: 18px; color: #cbd5e1; }
.promises { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.promises li { display: flex; gap: 12px; align-items: flex-start; color: #cbd5e1; }
.promises svg { flex: none; width: 20px; height: 20px; margin-top: 2px; padding: 3px; border-radius: 50%; background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.promises strong { color: #fff; font-weight: 600; }
.try { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 15px; color: #94a3b8; }
.try a { color: #93b4ff; }
.try a:hover { color: #bfd0fb; }
.flow { margin: 0; display: flex; flex-direction: column; }
.node { padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.node-head { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #fff; }
.node-head svg { width: 22px; height: 22px; color: #93b4ff; }
.node p { margin-top: 6px; font-size: 14px; color: #94a3b8; }
.node-device { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.07); box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.06); }
.node-device .node-head svg { color: #4ade80; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); font-size: 13px; color: #e2e8f0; }
.links { display: grid; grid-template-columns: 1fr 1fr; height: 96px; }
.link { position: relative; display: flex; align-items: center; padding-left: 40px; font-size: 13px; }
.link .line { position: absolute; left: 22px; top: 6px; bottom: 6px; border-left: 2px solid #93b4ff; }
.link-down .line::after {
  content: ''; position: absolute; bottom: -1px; left: -6px; border: 5px solid transparent; border-top: 7px solid #93b4ff; border-bottom: 0;
}
.link-down .label { color: #93b4ff; }
.link-up .line { border-left: 2px dashed rgba(248, 113, 113, 0.6); }
.link-up .line::after {
  content: ''; position: absolute; top: -1px; left: -6px; border: 5px solid transparent; border-bottom: 7px solid rgba(248, 113, 113, 0.6); border-top: 0;
}
.link-up .label { color: #fca5a5; font-weight: 600; }
.stop {
  position: absolute; left: 13px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: #0f172a; border: 2px solid #f87171; color: #f87171; font: 700 14px/16px system-ui, sans-serif; text-align: center;
}
.link-up { padding-left: 44px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.privacy + .section { padding-top: 88px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 15px;
}
.steps p { margin-top: 6px; color: var(--fg-2); font-size: 15px; }

.faq { margin-top: 28px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { padding: 18px 28px 18px 0; font-weight: 600; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 16px; color: var(--muted); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: '–'; }
.faq details p { max-width: 70ch; padding-bottom: 18px; color: var(--fg-2); }

.cta { margin-top: 88px; padding: 40px; border-radius: 12px; background: var(--canvas); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta p { color: var(--fg-2); margin-top: 6px; }

/* ---- Prose pages (guide, legal) ---- */
.prose { width: min(var(--prose), 100% - 32px); margin: 56px auto 0; }
.prose .kicker { font-size: 14px; color: var(--muted); }
.prose h1 { margin-top: 8px; }
.prose .lead { margin-top: 20px; font-size: 19px; color: var(--fg-2); }
.prose h2 { margin-top: 48px; }
.prose h3 { margin-top: 28px; }
.prose p, .prose ul, .prose ol, .prose table, .prose figure { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose thead th { border-bottom-color: var(--border-strong); font-weight: 600; }
.prose td:not(:first-child), .prose th:not(:first-child) { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.sheet { width: min(560px, 100%); margin-inline: auto; padding: 16px; background: var(--canvas); border-radius: 10px; }
.example { padding: 16px 20px; border-left: 3px solid var(--border-strong); background: var(--hover); font-size: 15px; line-height: 1.5; }
.prose address { font-style: normal; }
.prose .meta { margin-top: 40px; font-size: 14px; color: var(--muted); }
mark.todo { background: #fde68a; padding: 0 3px; border-radius: 3px; }

/* ---- 404 ---- */
.notfound { padding: 96px 0 0; text-align: center; }
.notfound p { margin-top: 12px; color: var(--fg-2); }
.notfound .hero-actions { justify-content: center; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; padding-top: 40px; }
  .privacy .wrap { grid-template-columns: 1fr; gap: 40px; }
  .privacy { padding: 64px 0; }
  .hero-text { padding-bottom: 24px; }
  .hero-sheet { width: min(360px, 88%); }
  .features { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .site-header nav .hide-narrow { display: none; }
  .features { grid-template-columns: 1fr; }
  .section { padding-top: 64px; }
  .cta { padding: 28px 22px; }
  .site-footer .copy { margin-left: 0; width: 100%; }
  .callout { font-size: 11px; padding: 4px 8px; }
  .callout-signature { display: none; }
  .links { grid-template-columns: 1fr; height: auto; gap: 4px; }
  .link { height: 48px; }
}
