/* Praktisk svenska – shared styles for the public pages (/, /kursen/, /grammatik/, /larare/). */

@font-face {
  font-family: Lexend;
  src: url(/fonts/Lexend.ttf) format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --blue: #006AA7;
  --blue-deep: #00507f;
  --blue-soft: #e8f2f9;
  --blue-mist: #f4f9fc;
  --yellow: #FECC02;
  --yellow-soft: #fff5c7;
  --cream: #FFF8EC;
  --ink: #18252f;
  --muted: #52626e;
  --line: #dbe5ec;
  --white: #ffffff;
  --ok: #1b7f3b;
  --err: #b3261e;
  --radius: 28px;
  --gutter: 16px;
  --max: 1100px;
  --shadow: 0 1px 2px rgba(16, 42, 60, .06), 0 8px 24px rgba(16, 42, 60, .07);
}

@media (min-width: 720px) { :root { --gutter: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.6 Lexend, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; margin: 0; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p, ul, ol, dl, figure { margin: 0; }
strong, b { font-weight: 500; }
a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.section { padding-block: 56px; }
.section + .section { padding-top: 16px; }
@media (min-width: 900px) { .section { padding-block: 88px; } .section + .section { padding-top: 24px; } }

.eyebrow { display: inline-block; font-size: 14px; font-weight: 500; color: var(--blue); background: var(--blue-soft); padding: 4px 12px; border-radius: 999px; }
.h-section { font-size: clamp(26px, 5.4vw, 38px); color: var(--ink); margin-top: 12px; }
.lead { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); margin-top: 14px; max-width: 60ch; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Header ---------- */

.site-header { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 8px; flex: none; min-height: 44px; text-decoration: none; color: var(--blue); font-weight: 500; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 52px; height: auto; }
.site-nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; font-size: 14px; margin-top: -8px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--yellow); }
.lang-picker { flex: none; margin-left: auto; align-self: center; max-width: 9.5em; font: 500 14px/1.2 Lexend, system-ui, sans-serif; color: var(--blue-deep);
  background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 5px 10px; min-height: 44px; }
.login-link { flex: none; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--blue); border: 2px solid var(--blue); border-radius: 999px; padding: 5px 14px; }
.login-link:hover { background: var(--blue); color: #fff; }
/* Narrowest phones: brand and login button still fit on one row. */
@media (max-width: 359px) {
  .brand { font-size: 16px; gap: 6px; }
  .brand img { width: 42px; }
  .login-link { padding-inline: 12px; }
}
@media (min-width: 860px) {
  .brand { font-size: 23px; gap: 10px; }
  .brand img { width: 70px; }
  .site-nav { order: 0; width: auto; margin: 0 0 0 auto; gap: 26px; font-size: 15px; }
}

/* ---------- Buttons and forms ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 12px 24px; border-radius: 999px;
  border: 2px solid var(--blue); background: var(--blue); color: #fff; font: 500 17px/1.2 Lexend, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn.secondary { background: transparent; color: var(--blue); }
.btn.secondary:hover { background: var(--blue-soft); color: var(--blue-deep); }
.btn.yellow, .bubble.blue a.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--blue-deep); }
.btn.yellow:hover { background: #f3c200; border-color: #f3c200; color: var(--blue-deep); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.wide { width: 100%; }
.link-btn { background: none; border: 0; padding: 4px 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.signup { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 460px; min-width: 0; }
.signup > *, .signup .row > * { min-width: 0; }
.signup label { font-size: 15px; font-weight: 500; }
.signup .row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.signup .row .btn { width: 100%; }
.signup input { width: 100%; min-height: 56px; font: 400 18px/1.3 Lexend, system-ui, sans-serif; color: var(--ink); background: #fff;
  border: 2px solid #c6d4de; border-radius: 16px; padding: 12px 16px; outline: none; }
.signup input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.signup input.code { letter-spacing: .35em; text-align: center; font-size: 26px; }
.signup .error { color: var(--err); font-size: 15px; min-height: 0; }
.signup .error:empty { display: none; }
.signup .note { font-size: 14px; color: var(--muted); }
.signup .sent-title { font-size: 22px; }
.signup .sent-to { overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .signup .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .signup .row .btn { width: auto; }
}

/* ---------- Speech bubbles: the recurring frame ---------- */
/* Oval-ish boxes with a tail, like the two bubbles in the logo.
   Blue = listen (tail bottom left), yellow = speak (tail bottom right). */

.bubble { position: relative; border-radius: var(--radius); padding: 24px; background: var(--blue-soft); }
.bubble::after { content: ""; position: absolute; width: 46px; height: 28px; background: inherit; bottom: -24px; left: 40px;
  clip-path: polygon(38% 0, 100% 0, 0 100%); }
.bubble.tail-right::after { left: auto; right: 40px; clip-path: polygon(0 0, 62% 0, 100% 100%); }
.bubble.tail-up::after { bottom: auto; top: -22px; left: 34px; clip-path: polygon(0 0, 100% 100%, 30% 100%); }
.bubble.no-tail::after { display: none; }
.bubble.blue { background: var(--blue); color: #fff; }
.bubble.blue a:not(.btn) { color: #fff; }
.bubble.yellow { background: var(--yellow); color: var(--blue-deep); }
.bubble.white { background: #fff; box-shadow: var(--shadow); }
.bubble.cream { background: var(--cream); }
.bubble.mist { background: var(--blue-mist); }
@media (min-width: 720px) { .bubble { padding: 32px; } }
.bubble-gap { margin-bottom: 24px; }

/* Oval number badge, the logo's bubble shape in small. */
.oval { display: inline-grid; place-items: center; flex: none; width: 52px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff;
  font-weight: 500; font-size: 18px; position: relative; }
.oval::after { content: ""; position: absolute; width: 14px; height: 10px; background: inherit; left: 6px; bottom: -6px; clip-path: polygon(45% 0, 100% 0, 0 100%); }
.oval.yellow { background: var(--yellow); color: var(--blue-deep); }
.oval.yellow::after { left: auto; right: 6px; clip-path: polygon(0 0, 55% 0, 100% 100%); }
.oval.ghost { background: var(--blue-soft); color: var(--blue); }

/* Word highlight like the yellow karaoke marker in the app. */
.w { border-radius: 6px; padding: 0 2px; margin: 0 -2px; transition: background-color .15s; }
.w.hl, mark { background: var(--yellow); color: inherit; border-radius: 6px; padding: 0 3px; }
mark.blue { background: var(--blue-soft); color: var(--blue-deep); }

/* ---------- Hero ---------- */

.hero { padding-block: 22px 48px; background:
  radial-gradient(ellipse 60% 45% at 100% 0%, var(--yellow-soft), transparent 70%),
  radial-gradient(ellipse 70% 55% at 0% 100%, var(--blue-mist), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero h1 { font-size: clamp(30px, 7.6vw, 54px); color: var(--blue); letter-spacing: -.01em; }
.hero .lead { margin-top: 12px; }
.hero [data-signup] { margin-top: 20px; }
@media (min-width: 900px) {
  .hero { padding-block: 64px 88px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; }
}
.page-hero { padding-block: 36px 40px; background: radial-gradient(ellipse 70% 60% at 100% 0%, var(--yellow-soft), transparent 70%); }
.page-hero h1 { font-size: clamp(26px, 7vw, 50px); color: var(--blue); margin-top: 12px; }
@media (min-width: 900px) { .page-hero { padding-block: 64px 56px; } }
.page-hero .wrap.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 900px) { .page-hero .wrap.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; } }

/* Hero art: one large sentence card with two round illustrations peeking out. */
.hero-art { position: relative; max-width: 420px; width: 100%; margin: 0 auto; padding: 18px 28px 30px; }
.hero-art .say { position: relative; z-index: 1; }
.hero-art .peek { position: absolute; width: 38%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--cream);
  box-shadow: var(--shadow); border: 4px solid #fff; z-index: 2; }
.hero-art .peek img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .peek.a { top: 0; right: 0; }
.hero-art .peek.b { top: 46%; left: -2%; width: 34%; }

/* ---------- Sentence cards (illustration + sentence bubble) ---------- */

.say { background: var(--cream); border-radius: var(--radius); padding: 14px 14px 16px; display: flex; flex-direction: column; }
.say .illo { aspect-ratio: 1; border-radius: 20px; overflow: hidden; }
.say .illo img { width: 100%; height: 100%; object-fit: cover; }
.say .line { unicode-bidi: plaintext; position: relative; margin-top: 10px; background: #fff; border-radius: 20px; padding: 12px 14px; font-size: 17px; line-height: 1.4; font-weight: 500; }
.say .line::before { content: ""; position: absolute; top: -12px; left: 22px; width: 24px; height: 14px; background: #fff; clip-path: polygon(0 0, 100% 100%, 20% 100%); }
.say .tag { align-self: flex-start; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--blue-deep); background: #fff; border-radius: 999px; padding: 3px 12px; }
.say.big .line { font-size: clamp(20px, 4.6vw, 24px); padding: 16px 18px; }
.say-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 14px; margin: 32px -16px 0; padding: 0 16px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; -webkit-overflow-scrolling: touch; }
.say-grid > .say { scroll-snap-align: start; }
@media (min-width: 720px) { .say-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 32px 0 0; padding: 0; overflow: visible; } }
@media (min-width: 1080px) { .say-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.say-grid.three { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-inline: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
@media (min-width: 600px) { .say-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .say-grid.three { gap: 20px; } }
@media (min-width: 1080px) { .split > .say-grid.three { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* Row card: picture left, sentence bubble right (tail pointing at the picture).
   Used where a column is too narrow for a picture with the sentence underneath. */
@media (max-width: 599px) {
  .say-grid.three > .say { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 16px; align-items: center; }
}
@media (max-width: 359px) {
  .levels .level .examples { grid-template-columns: minmax(0, 1fr); }
  .level .examples > .say { display: grid; grid-template-columns: minmax(96px, 40%) minmax(0, 1fr); gap: 16px; align-items: center; }
}
@media (min-width: 1080px) {
  .split > .say-grid.three > .say { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
}
@media (max-width: 599px) {
  .say-grid.three > .say .line { margin-top: 0; }
  .say-grid.three > .say .line::before { top: 50%; left: -12px; width: 14px; height: 22px; transform: translateY(-50%); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
  [dir="rtl"] .say-grid.three > .say .line::before { left: auto; right: -12px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
}
@media (max-width: 359px) {
  .level .examples > .say .line { margin-top: 0; }
  .level .examples > .say .line::before { top: 50%; left: -12px; width: 14px; height: 22px; transform: translateY(-50%); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
  [dir="rtl"] .level .examples > .say .line::before { left: auto; right: -12px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
}
@media (min-width: 1080px) {
  .split > .say-grid.three > .say .line { margin-top: 0; }
  .split > .say-grid.three > .say .line::before { top: 50%; left: -12px; width: 14px; height: 22px; transform: translateY(-50%); clip-path: polygon(100% 0, 0 50%, 100% 100%); }
  [dir="rtl"] .split > .say-grid.three > .say .line::before { left: auto; right: -12px; clip-path: polygon(0 0, 100% 50%, 0 100%); }
}

/* ---------- Feature cards ---------- */

.features { display: grid; gap: 40px 24px; margin-top: 36px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature .thumb { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 26px; border: 0; object-fit: cover; }
.feature h3 { font-size: 20px; margin-top: 18px; }
.feature p { margin-top: 8px; }
.feature .icon { width: 56px; height: 52px; }
.feature.blue .icon-fill { fill: #fff; }

/* ---------- Steps (how a lesson works) ---------- */

.steps { display: grid; gap: 18px; margin-top: 32px; counter-reset: step; }
@media (min-width: 720px) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; }
.step img.ic { width: 64px; height: auto; }
.step h3 { font-size: 18px; }
.step p { margin-top: 4px; color: var(--muted); font-size: 16px; }

/* Long step walkthrough with phone screenshots. */
.walk { display: grid; gap: 56px; margin-top: 40px; }
.walk-item { display: grid; gap: 24px; align-items: center; }
.walk-item .text h3 { font-size: clamp(22px, 4.6vw, 28px); margin-top: 10px; }
.walk-item .text p { margin-top: 10px; }
.walk-item .num { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; }
@media (min-width: 820px) {
  .walk-item { grid-template-columns: 300px 1fr; gap: 56px; }
  .walk-item:nth-child(even) { grid-template-columns: 1fr 300px; }
  .walk-item:nth-child(even) .shot { order: 2; }
}

/* ---------- Phone frame for screenshots ---------- */

.shot { margin: 0 auto; width: 100%; max-width: 270px; }
.phone { position: relative; aspect-ratio: 9 / 19.5; border-radius: 38px; padding: 9px; background: #17232c; box-shadow: var(--shadow); }
.phone .screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background:
  linear-gradient(var(--blue) 0 0) 16px 64px / calc(100% - 32px) 46px no-repeat,
  linear-gradient(#dfe8ef 0 0) 16px 140px / 70% 14px no-repeat,
  linear-gradient(#dfe8ef 0 0) 16px 166px / 52% 14px no-repeat,
  linear-gradient(180deg, #f6f9fb, #eef3f7); }
.phone .screen::after { content: ""; position: absolute; left: 50%; bottom: 40px; width: 46%; aspect-ratio: 304 / 196; transform: translateX(-50%);
  background: url(/icons/symbol.svg) center / contain no-repeat; opacity: .35; }
.phone .screen img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone.is-empty .screen img { display: none; }
.shot figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- 14 days ---------- */

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 28px; max-width: 560px; }
.day { aspect-ratio: 1.2; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 500; position: relative; }
.day.on { background: var(--blue); color: #fff; }
.day.on.mem { background: var(--yellow); color: var(--blue-deep); }
.day.rest { background: transparent; color: #95a6b2; border: 2px dashed #c9d6df; }
.days-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.days-legend span { display: inline-flex; align-items: center; gap: 8px; }
.days-legend i { width: 20px; height: 16px; border-radius: 50%; display: inline-block; }
.days-legend i.on { background: var(--blue); }
.days-legend i.mem { background: var(--yellow); }
.days-legend i.rest { border: 2px dashed #c9d6df; }

.daylist { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 820px) { .daylist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.daylist li { list-style: none; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; background: var(--blue-mist); border-radius: 22px; padding: 16px; }
.daylist h3 { font-size: 17px; }
.daylist p { font-size: 15px; color: var(--muted); margin-top: 2px; }
.daylist .phase { font-size: 13px; color: var(--blue); font-weight: 500; }
.daylist-wrap { padding: 0; }

/* ---------- Levels ---------- */

.levels { display: grid; gap: 22px; margin-top: 36px; }
.level { display: grid; gap: 18px; background: var(--blue-mist); border-radius: var(--radius); padding: 20px; }
.level-head { display: flex; gap: 14px; align-items: center; }
.level-head h3 { font-size: 21px; }
.level-head .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.level .new { color: var(--ink); }
.level .examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.level .say { padding: 10px 10px 12px; background: #fff; }
.level .say .line { background: var(--cream); font-size: 15px; padding: 10px 12px; }
.level .say .line::before { background: var(--cream); }
@media (min-width: 820px) {
  .level { grid-template-columns: 1fr 1fr; align-items: center; padding: 28px; gap: 28px; }
}
.track-label { margin-top: 40px; font-size: 15px; font-weight: 500; color: var(--muted); text-transform: none; display: flex; align-items: center; gap: 12px; }
.track-label::after { content: ""; flex: 1; height: 2px; background: var(--line); }

/* ---------- Split layout and misc blocks ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 860px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } .split.wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); } }
/* The start page's "who is it for" text and its three cards stack until both fit side by side. */
@media (min-width: 860px) and (max-width: 1079px) { .split:has(> .say-grid.three) { grid-template-columns: minmax(0, 1fr); gap: 32px; } .split:has(> .say-grid.three) .prose { max-width: 70ch; } }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.fact { background: var(--blue-mist); border-radius: 24px; padding: 18px 16px; }
.fact b { display: block; font-size: clamp(26px, 6vw, 36px); line-height: 1.1; color: var(--blue); font-weight: 500; }
.fact span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

.choice-demo { display: grid; gap: 10px; margin-top: 18px; }
.choice-demo .opt { border: 2px solid var(--blue); border-radius: 16px; padding: 12px 16px; color: var(--blue); font-weight: 500; background: #fff; font-size: 16px; }
.choice-demo .opt.primary { background: var(--blue); color: #fff; }

.mail-demo { background: #fff; border-radius: 22px; padding: 20px; box-shadow: var(--shadow); max-width: 420px; }
.mail-demo .from { font-size: 13px; color: var(--muted); }
.mail-demo .subj { font-weight: 500; margin-top: 4px; }
.mail-demo p { margin-top: 10px; font-size: 15px; }
.mail-demo .fake-btn { display: inline-block; margin-top: 12px; background: var(--blue); color: #fff; border-radius: 10px; padding: 10px 16px; font-size: 15px; font-weight: 500; }

.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; }
.topics li { list-style: none; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; border: 1px solid var(--line); }

.callout { border-left: 4px solid var(--yellow); background: var(--yellow-soft); border-radius: 0 18px 18px 0; padding: 14px 18px; font-size: 16px; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details { background: var(--blue-mist); border-radius: 20px; padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 24px; color: var(--blue); line-height: 1.2; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 18px; }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Grammar and research ---------- */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; }
.toc li { list-style: none; }
.toc a { display: inline-block; padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-size: 15px; color: var(--ink); }
.toc a:hover { border-color: var(--blue); color: var(--blue); }

.stair { display: grid; gap: 8px; margin-top: 28px; padding: 0; }
.stair li { list-style: none; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; }
.stair .bar { background: var(--blue-mist); border-radius: 18px; padding: 10px 16px; }
.stair .bar b { display: block; font-size: 16px; }
.stair .bar span { font-size: 14px; color: var(--muted); }
@media (min-width: 720px) {
  .stair li:nth-child(1) .bar { margin-right: 36%; } .stair li:nth-child(2) .bar { margin-right: 32%; }
  .stair li:nth-child(3) .bar { margin-right: 28%; } .stair li:nth-child(4) .bar { margin-right: 24%; }
  .stair li:nth-child(5) .bar { margin-right: 20%; } .stair li:nth-child(6) .bar { margin-right: 16%; }
  .stair li:nth-child(7) .bar { margin-right: 12%; } .stair li:nth-child(8) .bar { margin-right: 8%; }
  .stair li:nth-child(9) .bar { margin-right: 4%; }
}

.gram { display: grid; gap: 20px; padding-block: 28px; border-top: 1px solid var(--line); }
.gram:first-of-type { border-top: 0; }
.gram .head { display: flex; gap: 14px; align-items: center; }
.gram h3 { font-size: clamp(21px, 4.4vw, 26px); }
.gram .body p + p, .gram .body ul { margin-top: 12px; }
.gram .body ul { padding-left: 1.2em; }
.gram .body li + li { margin-top: 4px; }
.gram .pic { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--cream); border-radius: 22px; padding: 10px; }
.gram .pic img { border-radius: 16px; width: 96px; height: 96px; }
.gram .pic p { font-size: 18px; font-weight: 500; line-height: 1.4; }
.gram .pics { display: grid; gap: 10px; }
.pair { display: grid; gap: 6px; margin-top: 12px; font-size: 17px; }
.pair div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.pair .lbl { font-size: 13px; color: var(--muted); display: block; }
@media (min-width: 860px) { .gram { grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; } .gram .head { grid-column: 1 / -1; } }

.research { display: grid; gap: 44px; margin-top: 36px; }
.research article h3 { font-size: clamp(21px, 4.4vw, 26px); }
.research article .what { margin-top: 12px; }
.research article .what p + p { margin-top: 12px; }
.research .in-app { margin-top: 16px; }
.research .in-app h4 { font-size: 15px; color: var(--blue-deep); }
.research .in-app p { margin-top: 4px; font-size: 16px; }
.research .limits { margin-top: 14px; font-size: 15px; color: var(--muted); }
sup.ref { font-size: 12px; line-height: 0; }
sup.ref a { text-decoration: none; font-weight: 500; padding: 0 1px; }

.memory-steps { display: grid; gap: 10px; margin-top: 20px; padding: 0; counter-reset: m; }
.memory-steps li { list-style: none; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; }
.memory-steps .bar { border-radius: 18px; padding: 10px 16px; background: var(--blue-mist); }
.memory-steps .bar b { display: block; font-size: 16px; }
.memory-steps .bar span { display: block; font-size: 14px; color: var(--muted); }
.support { display: flex; gap: 4px; margin-top: 6px; }
.support i { width: 22px; height: 8px; border-radius: 4px; background: var(--blue); }
.support i.off { background: #d4e0e8; }

.refs { margin-top: 24px; padding-left: 1.6em; display: grid; gap: 12px; font-size: 15px; }
.refs li { padding-left: 4px; }
.refs li:target { background: var(--yellow-soft); border-radius: 8px; }
.refs a { overflow-wrap: anywhere; }
.refs-group { margin-top: 28px; font-size: 16px; color: var(--blue-deep); }

/* ---------- CTA band ---------- */

.cta-band { text-align: center; }
.cta-band .bubble { max-width: 760px; margin: 0 auto; padding: 36px 24px; }
.cta-band h2 { font-size: clamp(24px, 5vw, 34px); }
.cta-band p { margin-top: 10px; }
.cta-band .btn { margin-top: 22px; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 64px; background: var(--blue-mist); border-top: 1px solid var(--line); padding-block: 40px calc(96px + env(safe-area-inset-bottom)); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 24px; }
.site-footer .symbol { width: 132px; height: auto; }
.site-footer .tagline { color: var(--blue); font-weight: 500; margin-top: 10px; max-width: 28ch; }
.site-footer nav ul { padding: 0; display: grid; gap: 0; }
.site-footer nav li { list-style: none; }
.site-footer nav a { color: var(--ink); text-decoration: none; display: inline-block; padding-block: 11px; }
.site-footer nav a:hover { color: var(--blue); text-decoration: underline; }
.site-footer .fine { color: var(--muted); font-size: 13px; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } .site-footer .fine { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
  .hero-art .peek.a { animation: bob 3.6s ease-in-out infinite; }
  .hero-art .peek.b { animation: bob-b 4.2s ease-in-out -1.4s infinite; }
  @keyframes bob { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-22px) rotate(5deg) scale(1.06); } }
  @keyframes bob-b { 0%, 100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-18px) rotate(-6deg) scale(1.05); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.thumb { width: 120px; height: 120px; border-radius: 50%; border: 3px solid #fff; background: var(--cream); }
.bubble .daylist li, .bubble .stair .bar, .bubble .memory-steps .bar { background: #fff; }
.memory-steps .bar .support { display: flex; }
.support i { display: block; }
.walk-item .text .daylist h3 { font-size: 17px; margin-top: 0; }
.walk-item .text .daylist p { margin-top: 2px; }
.site-footer .lang-links { grid-column: 1 / -1; }
.site-footer .lang-links ul { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 14px; }
.site-footer .lang-links a { color: var(--muted); }
/* Translated start pages: the subpages exist only in Swedish, so hide links to them. */
html[data-site-lang]:not([lang="sv"]) .site-nav > a,
html[data-site-lang]:not([lang="sv"]) .site-footer .wrap > nav:first-of-type { display: none; }
.signup .remember { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; cursor: pointer; }
.signup .remember input { width: 20px; height: 20px; accent-color: var(--blue); margin: 0; }
.prose h2 { margin: 34px 0 10px; font-size: 22px; line-height: 1.3; }
.prose h2:first-child { margin-top: 0; }
.site-footer .credits { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin-top: -12px; }
.site-footer .credits a { color: inherit; }
/* Back to top */
.to-top { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; width: 46px; height: 46px;
  border-radius: 50%; border: 0; background: #FECC02; color: #006AA7; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 18px rgb(0 0 0 / .18); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #ffd83a; }
.to-top:focus-visible { outline: 3px solid #006AA7; outline-offset: 3px; }
@media (min-width: 720px) { .to-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 54px; height: 54px; } }
@media print { .to-top { display: none; } }

/* Nothing may make the page wider than the screen (iOS Safari then lets the whole page pan and zoom out). */
main, .site-header, .site-footer { overflow-x: clip; }
/* A stand-alone text link (a paragraph holding just the link) gets a finger-sized hit area without moving the layout. */
main p[style] > a:only-child:not(.btn) { display: inline-block; padding-block: 12px; margin-block: -12px; }

.signup .ts:empty { display: none; }
.signup .ts { margin-top: 10px; max-width: 100%; overflow: hidden; }
.signup .ts iframe { max-width: 100%; }
