/* Savolio web. Tokens mirror the app (native/Savolio/EducationView.swift Style):
   paper #FFFDF9, ink #142139, orange #FF641E, muted #768092.
   No webfonts: Apple devices get SF Pro Rounded via ui-rounded, like the app. */
:root {
  --paper: #FFFDF9;
  --paper-2: #FBF5EC;
  --card: #FFFFFF;
  --ink: #142139;
  --ink-2: #3D4860;
  --muted: #5F687B;          /* darker than app muted #768092 so body text passes 4.5:1 on paper */
  --line: rgba(20, 33, 57, 0.09);
  --line-2: rgba(20, 33, 57, 0.16);
  --orange: #FF641E;
  --orange-ink: #D8480A;     /* orange for text on paper, 4.6:1 */
  --orange-soft: #FFF0E6;
  --ok: #1F7A4D;
  --err: #B42318;
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 57, 0.05), 0 8px 24px -8px rgba(20, 33, 57, 0.12);
  --shadow-lift: 0 2px 4px rgba(20, 33, 57, 0.04), 0 24px 48px -16px rgba(20, 33, 57, 0.22);
  --round: ui-rounded, "SF Pro Rounded", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: rgba(255, 100, 30, 0.55); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
::selection { background: #FFD9C4; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--card); padding: 8px 14px; border-radius: 10px; z-index: 10; }

/* Header */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; gap: 4px; }
.nav a { font: 600 15px/1 var(--round); text-decoration: none; color: var(--ink-2); padding: 10px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: rgba(20, 33, 57, 0.06); color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--round); color: var(--ink); margin: 0; }
h1 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.12; }
h3 { font-weight: 700; letter-spacing: -0.012em; line-height: 1.25; }
.dot { color: var(--orange); }
.eyebrow { font: 700 13px/1 var(--round); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }

/* Landing hero */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; gap: 48px; }
.hero-copy { max-width: 560px; }
.app-icon { width: 88px; height: 88px; border-radius: 22.5%; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 14px 30px -10px rgba(240, 80, 30, 0.55), 0 4px 10px -4px rgba(20, 33, 57, 0.2); margin-bottom: 28px; }
.hero h1 { font-size: clamp(44px, 11.5vw, 84px); }
.lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin: 22px 0 30px; max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #0B0F17; color: #fff; text-decoration: none;
  padding: 11px 20px 11px 16px; border-radius: 14px; min-height: 56px;
  cursor: default; user-select: none;
  box-shadow: 0 10px 24px -12px rgba(11, 15, 23, 0.6);
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge small { font: 500 11px/1.2 var(--text); letter-spacing: 0.02em; opacity: 0.8; }
.store-badge b { font: 700 19px/1.15 var(--round); letter-spacing: -0.01em; }
.cta-note { font-size: 14px; color: var(--muted); }

/* Product vignette */
.vignette { position: relative; min-height: 470px; max-width: 420px; width: 100%; margin: 0 auto; }
.vignette::before {
  content: ""; position: absolute; inset: 6% 2% 4% 8%;
  background: radial-gradient(120% 90% at 70% 20%, #FFE3D1 0%, #FFF3EA 45%, rgba(255, 253, 249, 0) 72%);
  border-radius: 48px; z-index: 0;
}
.save-card {
  position: absolute; width: 272px; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-lift); border: 1px solid var(--line); overflow: hidden; z-index: 1;
}
.save-card .ph { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--paper-2); }
.save-card .body { padding: 12px 14px 14px; }
.save-card .src { display: flex; align-items: center; gap: 7px; font: 600 12.5px/1 var(--round); color: var(--muted); }
.save-card .src img { width: 18px; height: 18px; border-radius: 5px; }
.save-card h3 { font-size: 16px; margin: 8px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 12px/1 var(--round); padding: 6px 9px; border-radius: 999px; background: #F3F4F6; color: var(--ink-2); }
.chip.o { background: var(--orange-soft); color: #B53D06; }
.note { margin-top: 10px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); background: #FFF8E8; border-radius: 10px; padding: 8px 10px; }
.card-a { top: 0; left: 4%; width: 236px; transform: rotate(-7deg); z-index: 0; opacity: 0.96; }
.card-a .body { display: none; }
.card-b { top: 64px; left: 50%; margin-left: -140px; width: 280px; transform: rotate(2deg); }
.toast {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--ink); color: #fff; font: 700 14px/1 var(--round);
  padding: 12px 16px 12px 12px; border-radius: 999px; box-shadow: var(--shadow-lift);
}
.toast i { width: 22px; height: 22px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; font-style: normal; }
.toast i svg { width: 12px; height: 12px; }

/* Points */
.points { padding: 40px 0 24px; border-top: 1px solid var(--line); }
.points h2 { font-size: clamp(28px, 6vw, 40px); max-width: 16em; }
.grid { display: grid; gap: 14px; margin-top: 28px; }
.point { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 22px; display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; align-items: start; align-content: start; box-shadow: var(--shadow); }
.point img { width: 56px; height: 56px; grid-row: span 2; }
.point h3 { font-size: 18px; margin-top: 4px; }
.point p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }

.pledge { margin: 40px 0 72px; background: var(--ink); color: #fff; border-radius: 28px; padding: 32px 24px; display: grid; gap: 18px; position: relative; overflow: hidden; }
.pledge::after { content: ""; position: absolute; width: 300px; height: 300px; right: -120px; bottom: -170px; background: radial-gradient(circle, rgba(255, 100, 30, 0.45), rgba(255, 100, 30, 0) 70%); }
.pledge h2 { color: #fff; font-size: clamp(26px, 6vw, 38px); position: relative; }
.pledge p { margin: 0; color: rgba(255, 255, 255, 0.78); max-width: 34em; position: relative; }
.pledge a { color: #fff; font-weight: 600; }

/* Documents (privacy, terms) */
.doc { padding: 24px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(38px, 9vw, 56px); }
.meta { margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.summary { margin: 28px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.summary h2 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 6px 0; }
.toc { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { display: inline-block; font: 600 14px/1 var(--round); text-decoration: none; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--card); }
.toc a:hover { border-color: var(--orange); color: var(--ink); }
.doc section { padding-top: 36px; scroll-margin-top: 16px; }
.doc section h2 { font-size: 26px; margin-bottom: 12px; }
.doc h3 { font-size: 18px; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc .toc { padding-left: 0; }
.doc li { margin: 6px 0; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 15px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 700 13px/1.3 var(--round); color: var(--ink); background: var(--paper-2); letter-spacing: 0.01em; }
.table td:first-child { font-weight: 600; color: var(--ink); }
.caps { text-transform: uppercase; font-size: 15px; letter-spacing: 0.01em; }

/* Support */
.support-head { padding: 24px 0 8px; }
.support-head h1 { font-size: clamp(40px, 9.5vw, 60px); }
.support-head p { color: var(--ink-2); font-size: 18px; margin: 16px 0 0; max-width: 34em; }
.support-body { padding-top: 24px; padding-bottom: 72px; display: grid; gap: 40px; }
.faq h2, .contact h2 { font-size: 26px; margin-bottom: 14px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin: 0 0 10px; box-shadow: 0 1px 2px rgba(20,33,57,.04); }
.faq summary { list-style: none; cursor: pointer; padding: 17px 52px 17px 18px; font: 700 17px/1.35 var(--round); letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--orange-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23D8480A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .a { padding: 0 18px 16px; color: var(--ink-2); }
.faq .a p { margin: 0 0 10px; }
.faq .a ol, .faq .a ul { margin: 0 0 10px; padding-left: 22px; }
.faq .a li { margin: 4px 0; }

.contact .panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font: 700 14.5px/1.2 var(--round); }
.field label span { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 400 17px/1.4 var(--text); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--radius-s);
  padding: 13px 14px; min-height: 50px; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%23142139' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; padding-right: 40px; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 100, 30, 0.16); background: #fff; }
.hint { font-size: 13.5px; color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts { min-height: 65px; margin: 4px 0 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: 800 17px/1 var(--round); letter-spacing: -0.005em; cursor: pointer; box-shadow: 0 10px 22px -10px rgba(255, 100, 30, 0.8); transition: transform .12s ease, background .12s ease; }
.btn:hover { background: #F25710; }
.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.form-status { margin: 14px 0 0; font-size: 15px; min-height: 1.4em; }
.form-status.err { color: var(--err); }
.sent { text-align: center; padding: 18px 6px 8px; }
.sent img { width: 88px; height: 88px; margin: 0 auto 10px; }
.sent h3 { font-size: 24px; }
.sent p { color: var(--ink-2); margin: 8px auto 0; max-width: 26em; }
.fine { font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14.5px; color: var(--muted); }
.foot .wrap { display: grid; gap: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.foot p { margin: 0; }

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .top { padding: 24px 0; }
  .brand img { height: 30px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .pledge { padding: 44px 44px; grid-template-columns: 1.1fr 1fr; align-items: end; }
  .contact .panel { padding: 30px; }
  .foot .wrap { grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1000px) {
  .hero { padding: 56px 0 96px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px; }
  .app-icon { width: 104px; height: 104px; }
  .lede { font-size: 21px; }
  .vignette { min-height: 480px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .point { grid-template-columns: 1fr; padding: 24px; }
  .point img { grid-row: auto; width: 76px; height: 76px; margin: -6px 0 8px -6px; }
  .support-body { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
  .contact { position: sticky; top: 24px; }
}
/* Turnstile's iframe needs 300px. Below 380px drop the panel chrome so the form gets the full width. */
@media (max-width: 379px) {
  :root { --gutter: 16px; }
  .contact .panel { background: none; border: 0; box-shadow: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
