:root {
  --ink: #1d1a3b;
  --muted: #655f7b;
  --paper: #fffdf8;
  --page: #f3f0ff;
  --purple: #4438a7;
  --purple-dark: #2f2772;
  --purple-light: #e8e4ff;
  --yellow: #ffd84d;
  --coral: #ff8066;
  --mint: #55d6b2;
  --blue: #65b7ff;
  --red: #d94a58;
  --green: #198760;
  --border: #dcd7ef;
  --shadow: 0 10px 0 rgba(47, 39, 114, .08);
  --radius: 24px;
  --page-accent-one: rgba(255, 216, 77, .22);
  --page-accent-two: rgba(101, 183, 255, .18);
  --home-background: #211a59;
  --home-accent-one: rgba(255, 216, 77, .16);
  --home-accent-two: rgba(85, 214, 178, .12);
  --home-text: #ffffff;
  --home-muted: #ded9ff;
  --home-panel: #17123f;
  --home-panel-border: rgba(232, 228, 255, .22);
  --home-logo-background: #ffffff;
  --home-logo-text: var(--purple-dark);
  --control-surface: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, var(--page-accent-one), transparent 20rem),
    radial-gradient(circle at 90% 35%, var(--page-accent-two), transparent 22rem),
    var(--page);
  font: 1rem/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* Mörk startsida – övningskort och räknedel behåller sina ljusa ytor. */
body.home-page {
  background:
    radial-gradient(circle at 8% 8%, var(--home-accent-one), transparent 24rem),
    radial-gradient(circle at 92% 30%, var(--home-accent-two), transparent 26rem),
    var(--home-background);
}
body.home-page .welcome { color: var(--home-text); }
body.home-page .site-header .brand { color: var(--home-text); }
body.home-page .brand-mark {
  color: var(--home-logo-text);
  background: var(--home-logo-background);
  border-color: var(--home-logo-background);
}
body.home-page .site-header .main-nav a { color: var(--home-muted); }
body.home-page .site-header .main-nav a:hover,
body.home-page .site-header .main-nav a:focus-visible,
body.home-page .site-header .main-nav a.is-current {
  color: white;
  background: rgba(255, 255, 255, .12);
}
body.home-page .welcome .eyebrow,
body.home-page .journey .eyebrow { color: var(--yellow); }
body.home-page .journey .section-heading h2 { color: var(--home-text); }
body.home-page .journey .section-heading > p { color: var(--home-muted); }
body.home-page .practice-pep {
  border: 1px solid var(--home-panel-border);
  background: var(--home-panel);
  box-shadow: 0 10px 0 rgba(10, 7, 32, .28);
}
body.home-page footer {
  border-top-color: rgba(222, 217, 255, .28);
  color: var(--home-muted);
}
body.home-page footer .brand { color: var(--home-text); }

html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .skill-term-primary,
html[dir="rtl"] .friend-picker,
html[dir="rtl"] .friend-choice-grid,
html[dir="rtl"] .number-pad,
html[dir="rtl"] .daily-rainbow-progress,
html[dir="rtl"] .round-progress,
html[dir="rtl"] .analog-clock,
html[dir="rtl"] .problem:not(.is-concept),
html[dir="rtl"] input[type="number"] { direction: ltr; }
html[dir="rtl"] .skill-term-primary,
html[dir="rtl"] .skill-term-translation { unicode-bidi: isolate; }

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-180%);
  padding: .75rem 1rem;
  border-radius: 10px;
  color: white;
  background: var(--purple-dark);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font: 800 1.25rem/1 "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  color: white;
  background: var(--purple);
  border: 2px solid var(--purple-dark);
  border-radius: 12px 12px 12px 4px;
  font-size: .95rem;
  transform: rotate(-3deg);
}
.brand-small { font-size: 1.1rem; }
.brand-small .brand-mark { width: 2.1rem; height: 2.1rem; }

.main-nav { display: flex; gap: .25rem; }
.main-nav a {
  padding: .6rem .85rem;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a.is-current {
  color: var(--purple-dark);
  background: var(--purple-light);
}
.account-status { display: flex; align-items: center; gap: .75rem; }
.account-status > span { display: grid; line-height: 1.15; text-align: right; }
.account-status small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.account-status strong { max-width: 14rem; overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.account-status form { margin: 0; }
.account-status button { padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 10px; color: var(--purple-dark); background: var(--paper); font-size: .82rem; font-weight: 800; cursor: pointer; }
.account-status button:hover, .account-status button:focus-visible { border-color: var(--purple); background: var(--purple-light); }
body.home-page .account-status small { color: var(--home-muted); }
body.home-page .account-status strong { color: var(--home-text); }
.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  margin-left: auto;
}
.language-picker, .theme-picker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--muted);
  font-weight: 700;
}
.language-picker select, .theme-picker select {
  max-width: 9.5rem;
  min-height: 40px;
  padding: .4rem 2rem .4rem .65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  background: var(--control-surface);
  font: inherit;
  font-weight: 700;
}
.theme-picker select { max-width: 11.75rem; }
.language-picker select:focus-visible, .theme-picker select:focus-visible { outline: 3px solid rgba(255, 216, 77, .7); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

main { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }

.welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 3.5rem 0 1.5rem;
}
.eyebrow {
  margin: 0 0 .25rem;
  color: var(--purple);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1, h2, h3 {
  margin: 0;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  line-height: 1.12;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }

.today-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem .9rem;
  border: 1px solid #e2cc2d;
  border-radius: 999px;
  color: var(--ink);
  background: #fff6bf;
}
.today-chip > span:first-child { color: #9e7100; font-size: 1.25rem; }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .8rem;
  margin-bottom: 1.25rem;
}
.skill-card {
  min-width: 0;
  min-height: 148px;
  position: relative;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 2px solid transparent;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 5px 0 rgba(47, 39, 114, .09);
  cursor: pointer;
  text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.skill-card[hidden] { display: none; }
.skill-card:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(47, 39, 114, .11); }
.skill-card:focus-visible { outline: 4px solid rgba(68, 56, 167, .25); outline-offset: 2px; }
.skill-card.is-selected { border-color: var(--purple); box-shadow: 0 5px 0 var(--purple-dark); }
.skill-card.is-mastered { border-color: var(--green); }
.skill-card.is-mastered .skill-meter span { width: 100% !important; background: var(--green); }
.skill-card.is-progress-complete::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 18px;
  background: rgba(255, 255, 255, .64);
  pointer-events: none;
}
.skill-card.is-progress-complete .completion-badge { z-index: 3; }
.skill-symbol {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-bottom: .8rem;
  border-radius: 14px;
  font: 800 1.55rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
.skill-friends .skill-symbol { background: #fff0a7; color: #7d5900; font-size: 1.05rem; }
.skill-twenty-friends .skill-symbol { background: #ffe1b8; color: #8a4b00; font-size: 1.05rem; }
.skill-hundred-friends .skill-symbol { background: #dff0c5; color: #376316; font-size: .92rem; }
.skill-plus .skill-symbol { background: #cdeaff; color: #145b95; }
.skill-minus .skill-symbol { background: #d2f5eb; color: #126d55; }
.skill-times .skill-symbol { background: #ffd9d1; color: #9b3925; }
.skill-divide .skill-symbol { background: #e7e2f7; color: #5e5875; }
.skill-riddles .skill-symbol { background: #f2dcff; color: #73369a; }
.skill-length .skill-symbol { background: #dce8ff; color: #2c4f92; }
.skill-weight .skill-symbol { background: #ffe4b8; color: #7a4a00; font-size: 1rem; }
.skill-volume .skill-symbol { background: #d5f2ff; color: #176285; font-size: 1.1rem; }
.skill-time .skill-symbol { background: #e8e4ff; color: var(--purple-dark); }
.skill-shapes .skill-symbol { background: #ffe0eb; color: #8a3152; }
.skill-calendar .skill-symbol { background: #fff0a7; color: #735200; font-size: .95rem; }
.skill-charts .skill-symbol { background: #dbe9ff; color: #24558a; }
.skill-tables .skill-symbol { background: #ffe6bd; color: #7a4b08; }
.skill-statistics .skill-symbol { background: #e9ddff; color: #57318d; }
.skill-test { border-color: #d7c8ee; background: linear-gradient(145deg, #fffdf8, #f3edff); }
.skill-test .skill-symbol { color: white; background: var(--purple); box-shadow: 0 0 0 7px rgba(84, 63, 170, .1); }
.skill-test .skill-copy strong { color: var(--purple-dark); }
.skill-copy { display: grid; align-content: start; }
.skill-copy strong { font: 700 1.14rem/1.2 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.skill-term.has-translation {
  min-height: 3.15rem;
  display: flex;
  flex-direction: column;
  gap: .08rem;
  margin-bottom: .16rem;
}
.skill-term-primary { font: inherit; }
.skill-term-translation {
  color: var(--muted);
  font: 600 .76rem/1.15 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .01em;
}
.skill-copy small { color: var(--muted); font-size: .9rem; line-height: 1.2; }
.skill-meter {
  width: calc(100% - 2rem);
  height: 5px;
  position: absolute;
  left: 1rem;
  bottom: .8rem;
  overflow: hidden;
  border-radius: 999px;
  background: #ebe8f2;
}
.skill-meter span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--purple); transition: width .3s ease; }
.skill-card.is-locked { color: #7b758e; background: rgba(255,255,255,.58); }
.lock-badge {
  position: absolute;
  right: .65rem;
  top: .65rem;
  padding: .2rem .45rem;
  border-radius: 999px;
  background: #e5e1ed;
  font-size: .72rem;
  font-weight: 700;
}
.completion-badge {
  position: absolute;
  right: .65rem;
  top: .65rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  color: #105f47;
  background: #dff8ed;
  font-size: .72rem;
  font-weight: 800;
}

.exercise-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.exercise-shell::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -95px;
  bottom: -100px;
  border: 28px solid rgba(255, 216, 77, .6);
  border-radius: 50%;
  pointer-events: none;
}
.exercise-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; position: relative; }

.test-intro {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}
.test-intro[hidden] { display: none; }
.test-intro img { width: 100%; aspect-ratio: 3 / 2; display: block; object-fit: cover; border-radius: 24px; box-shadow: 0 8px 28px rgba(47, 39, 114, .14); }
.test-intro-copy { padding-right: .5rem; }
.test-intro-copy h3 { margin: .25rem 0 .75rem; font: 800 clamp(1.55rem, 3vw, 2.2rem)/1.08 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.test-intro-copy > p:not(.eyebrow) { margin: .65rem 0 0; color: var(--muted); line-height: 1.55; }
.test-intro-copy .test-areas-label { color: var(--ink); font-weight: 800; }
.test-areas { margin: .55rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; }
.test-areas li { padding: .35rem .65rem; border-radius: 999px; color: var(--purple-dark); background: var(--purple-light); font-size: .88rem; font-weight: 800; }
.test-intro-actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .65rem; }

.round-progress { height: 9px; overflow: hidden; margin: 2rem 0 .35rem; border-radius: 99px; background: #ece9f3; }
.round-progress span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--blue)); transition: width .3s ease; }
.question-count { margin: 0; color: var(--muted); text-align: right; font-size: .9rem; }

.problem-area { width: min(680px, 100%); margin: 2rem auto .5rem; }
.problem {
  margin: 0 0 1.25rem;
  text-align: center;
  font: 800 clamp(2.75rem, 9vw, 5.5rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-variant-numeric: tabular-nums;
}
.problem.is-story {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 2px solid #d9c5ed;
  border-radius: 18px 18px 18px 6px;
  color: var(--ink);
  background: #faf3ff;
  font: 700 clamp(1.1rem, 2.5vw, 1.4rem)/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  text-align: left;
  white-space: normal;
}
.problem.is-measurement {
  margin-bottom: 1.5rem;
  font: 700 1rem/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: normal;
  white-space: normal;
}
.measurement-scene { display: grid; gap: 1.25rem; }
.measurement-visual { width: min(540px, 100%); min-height: 180px; display: grid; place-items: center; margin: 0 auto; padding: clamp(1rem, 3vw, 1.5rem); border-radius: 22px; background: #f3f0ff; }
.measurement-question { display: block; color: var(--ink); font: 700 clamp(1.15rem, 2.6vw, 1.4rem)/1.35 "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; text-align: center; }

.measure-ruler { width: min(460px, 100%); height: 105px; position: relative; display: block; border-bottom: 8px solid #d9b84b; background: linear-gradient(to bottom, transparent 72%, #fff0a7 72%); }
.ruler-object { width: var(--measure); height: 22px; position: absolute; left: 0; top: 16px; display: block; border: 3px solid var(--purple-dark); border-radius: 999px 8px 8px 999px; background: var(--purple); box-shadow: 0 4px 0 rgba(47, 39, 114, .14); }
.ruler-object::after { content: ""; width: 10px; height: 10px; position: absolute; right: -5px; top: 3px; border-radius: 50%; background: white; }
.ruler-ticks { position: absolute; inset: 54px 0 0; display: block; background: repeating-linear-gradient(90deg, var(--purple-dark) 0 2px, transparent 2px 10%); }
.ruler-labels { width: min(460px, 100%); display: flex; justify-content: space-between; margin-top: -.75rem; color: var(--muted); font-size: .9rem; font-weight: 700; }

.measure-segments { width: min(460px, 100%); display: grid; grid-template-columns: 2fr 1fr; gap: .6rem; align-items: stretch; }
.measure-segment { min-height: 82px; display: grid; place-items: center; padding: .75rem; border-radius: 18px; font: 800 clamp(1.25rem, 4vw, 2rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.measure-segment.is-long { color: white; background: var(--purple); }
.measure-segment.is-short { color: #115c49; background: #bff1e3; }
.weight-segments .is-long { background: #9b5b19; }
.weight-segments .is-short { color: #724500; background: #ffe1a8; }
.volume-segments .is-long { background: #237ea8; }
.volume-segments .is-short { color: #145b79; background: #ccefff; }

.comparison-bars { width: min(460px, 100%); display: grid; gap: 1rem; }
.comparison-bars > span { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: .65rem; }
.comparison-bars small { color: var(--ink); font-size: .92rem; text-align: right; }
.comparison-bars i { width: var(--bar-size); height: 34px; display: block; border-radius: 8px; background: var(--purple); box-shadow: inset 0 -4px 0 rgba(47, 39, 114, .18); }
.comparison-bars > span:nth-child(2) i { background: var(--blue); }
.weight-bars i { background: #9b5b19; }
.weight-bars > span:nth-child(2) i { background: #e3a847; }

.balance-visual { width: min(480px, 100%); position: relative; display: grid; gap: .2rem; padding-top: 2rem; }
.balance-beam { height: 8px; display: block; border-radius: 999px; background: var(--purple-dark); }
.balance-beam::after { content: ""; width: 0; height: 0; position: absolute; left: 50%; top: 2.4rem; transform: translateX(-50%); border-left: 25px solid transparent; border-right: 25px solid transparent; border-bottom: 54px solid #b9b3d1; }
.balance-pans { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; position: relative; z-index: 1; }
.balance-pan { min-height: 92px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: .35rem; padding: .75rem .5rem; border-bottom: 7px solid #77708d; border-radius: 0 0 45% 45%; }
.mystery-bag { width: 62px; height: 64px; display: grid; place-items: center; border-radius: 18px 18px 25px 25px; color: white; background: var(--purple); font: 800 1.7rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-style: normal; }
.weight-chip { min-width: 48px; min-height: 48px; display: grid; place-items: center; padding: .3rem; border: 2px solid #8a5610; border-radius: 10px 10px 5px 5px; color: #6d4100; background: #ffd58c; font: 800 .85rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-style: normal; }
.weight-chip small { display: block; font-size: .66rem; }

.jug-wrap { display: grid; grid-template-columns: auto 42px; align-items: stretch; gap: .55rem; }
.measure-jug { width: 150px; height: 190px; position: relative; display: block; border: 6px solid var(--purple-dark); border-top-width: 3px; border-radius: 8px 8px 34px 34px; background: white; }
.measure-jug::after { content: ""; width: 40px; height: 75px; position: absolute; right: -34px; top: 42px; border: 6px solid var(--purple-dark); border-left: 0; border-radius: 0 28px 28px 0; }
.jug-water { height: var(--fill); position: absolute; inset: auto 0 0; display: block; background: linear-gradient(#83d4ff, #3aa8df); }
.jug-ticks { position: absolute; inset: 0; display: block; background: repeating-linear-gradient(to top, rgba(47,39,114,.65) 0 2px, transparent 2px 10%); }
.jug-labels { display: flex; flex-direction: column; justify-content: space-between; padding: .1rem 0; color: var(--muted); font-size: .85rem; text-align: left; }

.volume-change { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 5vw, 2.5rem); }
.volume-change > span:not(.volume-arrow) { display: grid; justify-items: center; gap: .55rem; }
.volume-change small { max-width: 110px; color: var(--muted); font-size: .82rem; }
.volume-arrow { color: var(--purple); font-size: 2rem; font-weight: 800; }
.mini-jug { width: 92px; height: 120px; position: relative; display: block; overflow: hidden; border: 4px solid var(--purple-dark); border-radius: 6px 6px 24px 24px; background: white; font-style: normal; }
.mini-jug b { height: var(--fill); position: absolute; inset: auto 0 0; display: block; background: #65b7ff; }

.problem.is-time, .problem.is-concept { margin-bottom: 1.5rem; font: 700 1rem/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: normal; white-space: normal; }
.time-scene, .concept-scene { display: grid; justify-items: center; gap: 1rem; }
.time-visual, .concept-visual { width: min(540px, 100%); min-height: 190px; display: grid; place-items: center; margin: 0 auto; padding: 1rem; border-radius: 22px; background: #f3f0ff; }
.time-question, .concept-question { display: block; color: var(--ink); font: 700 clamp(1.15rem, 2.6vw, 1.4rem)/1.35 "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif; text-align: center; }
.data-scene { width: 100%; }
.data-bar-chart { width: min(540px, 100%); height: 250px; display: grid; grid-template-columns: 2.5rem 1fr; gap: .6rem; padding: 1.1rem 1rem .8rem; border-radius: 22px; background: #f3f0ff; }
.data-chart-axis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 2rem; color: var(--muted); font-size: .78rem; text-align: right; }
.data-chart-axis i { font-style: normal; }
.data-chart-plot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: clamp(.55rem, 3vw, 1.2rem); align-items: stretch; border-left: 2px solid var(--purple-dark); border-bottom: 2px solid var(--purple-dark); background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), rgba(68,56,167,.14) calc(25% - 1px) 25%); }
.data-bar-item { min-width: 0; display: grid; grid-template-rows: 1fr 1.8rem; align-items: end; justify-items: center; }
.data-bar-item i { width: min(58px, 78%); height: var(--bar-size); display: block; align-self: end; border-radius: 10px 10px 2px 2px; background: #6657cf; box-shadow: inset 0 -5px 0 rgba(47,39,114,.18); }
.data-bar-item:nth-child(2) i { background: #e98b55; }
.data-bar-item:nth-child(3) i { background: #d3aa22; }
.data-bar-item:nth-child(4) i { background: #9a65bd; }
.data-bar-item small { max-width: 100%; overflow: hidden; color: var(--ink); font-size: clamp(.7rem, 2.4vw, .86rem); text-overflow: ellipsis; white-space: nowrap; }
.data-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; background: white; }
.data-table { width: 100%; min-width: 470px; border-collapse: collapse; color: var(--ink); font-size: clamp(.78rem, 2.6vw, .95rem); text-align: center; }
.data-table caption { padding: .75rem; color: var(--purple-dark); background: #eee9ff; font-weight: 800; }
.data-table th, .data-table td { padding: .7rem .6rem; border: 1px solid var(--border); }
.data-table thead th, .data-table tbody th { background: #f7f4ff; font-weight: 800; }
.data-table-total { color: var(--purple-dark); background: #fff3bd; font-weight: 800; }
.data-series { width: min(540px, 100%); display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; padding: clamp(1.2rem, 4vw, 2rem); border-radius: 22px; background: #f3f0ff; }
.data-series i { min-width: 3.4rem; min-height: 3.4rem; display: grid; place-items: center; border: 3px solid var(--purple); border-radius: 14px; color: var(--purple-dark); background: white; font: 800 clamp(1.25rem, 4vw, 1.75rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-style: normal; box-shadow: 0 4px 0 rgba(47,39,114,.12); }
.digital-clock { display: inline-grid; place-items: center; padding: .75rem 1.2rem; border: 4px solid var(--purple-dark); border-radius: 14px; color: #b8ffde; background: #17123f; font: 800 clamp(2rem, 7vw, 3.3rem)/1 "Courier New", monospace; font-variant-numeric: tabular-nums; letter-spacing: .08em; box-shadow: inset 0 0 0 4px rgba(255,255,255,.08); }
.analog-clock { width: 220px; height: 220px; position: relative; display: block; border: 8px solid var(--purple-dark); border-radius: 50%; color: var(--ink); background: white; box-shadow: 0 6px 0 #cbc5df; touch-action: none; }
.clock-number { position: absolute; left: 50%; top: 50%; color: var(--purple-dark); font: 800 .9rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-style: normal; transform: translate(-50%, -50%) rotate(calc(var(--clock-index) * 30deg)) translateY(-82px) rotate(calc(var(--clock-index) * -30deg)); }
.clock-hand { width: 28px; position: absolute; left: calc(50% - 14px); bottom: 50%; z-index: 2; display: block; transform-origin: 50% 100%; border-radius: 999px; background: linear-gradient(90deg, transparent 0 11px, var(--purple-dark) 11px 17px, transparent 17px); font-style: normal; }
.hour-hand { height: 62px; transform: rotate(var(--hour-angle)); }
.minute-hand { height: 84px; transform: rotate(var(--minute-angle)); background: linear-gradient(90deg, transparent 0 12px, var(--coral) 12px 16px, transparent 16px); }
.clock-center { width: 18px; height: 18px; position: absolute; left: calc(50% - 9px); top: calc(50% - 9px); z-index: 3; display: block; border: 4px solid white; border-radius: 50%; background: var(--purple-dark); box-shadow: 0 0 0 2px var(--purple-dark); }
.analog-clock.is-interactive .clock-hand { cursor: grab; }
.analog-clock.is-interactive .clock-hand:focus-visible { outline: 4px solid rgba(68,56,167,.25); outline-offset: 3px; }
.analog-clock.is-interactive .clock-hand:active { cursor: grabbing; }
.analog-clock.is-answered .clock-hand { cursor: default; }
.now-symbol { min-width: 4.5rem; display: inline-grid; place-items: center; padding: .5rem .8rem; border-radius: 999px; color: white; background: var(--coral); font: 800 1rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.time-hint-button { min-height: 44px; padding: .55rem .85rem; border: 2px solid var(--purple); border-radius: 11px; color: var(--purple-dark); background: white; font-weight: 700; cursor: pointer; }
.time-hint { display: grid; place-items: center; }
.time-hint[hidden] { display: none; }
.time-hint .analog-clock { transform: scale(.72); margin: -1.7rem; }
.digital-hint { padding: .65rem 1rem; border-radius: 10px; color: #b8ffde; background: #17123f; font: 800 1.7rem/1 "Courier New", monospace; }
.problem-area.is-clock-mode #answer-input, .problem-area.is-clock-mode #answer-form > label, .problem-area.is-clock-mode .number-pad { display: none; }
.problem-area.is-clock-mode .answer-row { grid-template-columns: 1fr; }
.problem-area.is-choice-mode #answer-form, .problem-area.is-choice-mode .number-pad { display: none; }
.problem-area.is-text-mode .number-pad { display: none; }

.choice-grid { width: min(540px, 100%); display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.choice-grid button { min-height: 58px; padding: .65rem; border: 2px solid var(--border); border-radius: 14px; color: var(--purple-dark); background: white; font: 700 1rem/1.25 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; cursor: pointer; box-shadow: 0 3px 0 var(--border); }
.choice-grid button:hover, .choice-grid button:focus-visible { border-color: var(--purple); background: var(--purple-light); }
.choice-grid button:disabled { cursor: default; opacity: .72; }

.friend-scene { display: grid; justify-items: center; gap: 1rem; }
.friend-instruction {
  color: var(--ink);
  font: 700 clamp(1.15rem, 2.6vw, 1.4rem)/1.25 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
.friend-picker {
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: minmax(96px, 120px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(.7rem, 3vw, 1.25rem);
}
.friend-given {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 4px solid #d9b84b;
  border-radius: 24px;
  color: var(--purple-dark);
  background: #fff0a7;
  font: 800 clamp(2.8rem, 9vw, 4.6rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  box-shadow: 0 6px 0 rgba(125, 89, 0, .18);
}
.friend-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.friend-choice-grid button {
  min-height: 62px;
  padding: .4rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--purple-dark);
  background: white;
  font: 800 clamp(1.15rem, 4vw, 1.55rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  box-shadow: 0 3px 0 var(--border);
  cursor: pointer;
}
.friend-choice-grid button:hover, .friend-choice-grid button:focus-visible { border-color: var(--purple); background: var(--purple-light); }
.friend-choice-grid button.is-chosen { border-color: var(--purple); background: var(--purple-light); box-shadow: inset 0 2px 5px rgba(47,39,114,.2); }
.friend-choice-grid button.is-match { border-color: #4a9b7b; color: #105f47; background: #dff8ed; box-shadow: inset 0 0 0 2px rgba(74,155,123,.16); }
.friend-choice-grid button.is-tried { border-color: #d9b84b; color: #6b4a00; background: #fff6bf; box-shadow: none; }
.friend-choice-grid button:disabled { cursor: default; }

.shape-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem; }
.shape-figure { width: 86px; height: 86px; display: block; background: #6b4fd3; font-style: normal; }
.shape-circle { border-radius: 50%; }
.shape-triangle { clip-path: polygon(50% 2%, 98% 96%, 2% 96%); background: #df5a4f; }
.shape-square { background: #376fd1; }
.shape-rectangle { width: 126px; height: 78px; background: #d84f91; }
.shape-pentagon { clip-path: polygon(50% 0, 98% 36%, 80% 100%, 20% 100%, 2% 36%); background: #9b5bc4; }
.shape-hexagon { clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); background: #d99a1b; }
.mixed-shapes { align-content: center; gap: 1rem; }
.mixed-shapes .shape-figure { width: 58px; height: 58px; }
.mixed-shapes .shape-rectangle { width: 86px; height: 52px; }

.calendar-strip { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.calendar-strip i { min-height: 78px; display: grid; place-items: center; padding: .6rem; border-radius: 14px; color: var(--purple-dark); background: white; font: 700 clamp(.85rem, 2.5vw, 1.15rem)/1.2 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-style: normal; text-transform: capitalize; box-shadow: 0 3px 0 #d7d1ec; }
.calendar-strip .is-missing { color: white; background: var(--purple); font-size: 1.5rem; }
.calendar-page { width: min(250px, 100%); overflow: hidden; display: grid; border: 3px solid var(--purple-dark); border-radius: 18px; background: white; box-shadow: 0 6px 0 #cbc5df; }
.calendar-page small { padding: .5rem; color: white; background: var(--purple); font-weight: 800; letter-spacing: .12em; }
.calendar-page strong { padding: 2rem .75rem; color: var(--purple-dark); font: 800 1.7rem/1.1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; text-transform: capitalize; }
.today-date-scene { width: min(620px, 100%); margin: 0 auto; }
.calendar-today-card { width: min(330px, 100%); overflow: hidden; display: grid; justify-items: center; border: 3px solid var(--purple-dark); border-radius: 20px; background: white; box-shadow: 0 7px 0 #cbc5df; }
.calendar-today-card small { width: 100%; padding: .6rem; color: white; background: var(--purple); font-weight: 800; letter-spacing: .14em; }
.calendar-today-card strong { padding: 1.3rem .5rem .65rem; color: var(--purple-dark); font: 800 3.6rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.calendar-today-card span { padding: 0 .75rem 1.2rem; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.leap-day-surprise { width: min(540px, 100%); padding: .85rem 1rem; border: 2px dashed #d09b00; border-radius: 14px; color: #6b4a00; background: #fff3ae; font-size: 1rem; text-align: center; }
.leap-day-surprise b { display: block; color: #503600; font-size: 1.12rem; }
.mystery { display: inline-grid; min-width: 1.15em; place-items: center; color: var(--purple); border-bottom: .12em solid var(--yellow); }
label { display: block; margin-bottom: .35rem; font-weight: 700; }
.answer-row { display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
#answer-input {
  width: 100%;
  min-height: 58px;
  padding: .55rem 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--ink);
  background: white;
  font: 700 1.6rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
#answer-input::-webkit-inner-spin-button,
#answer-input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
#answer-input:focus { outline: 4px solid rgba(68, 56, 167, .15); border-color: var(--purple); }
.primary-button, .secondary-button, .feedback button {
  min-height: 52px;
  padding: .7rem 1.25rem;
  border: 2px solid var(--purple-dark);
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
}
.primary-button { color: white; background: var(--purple); box-shadow: 0 4px 0 var(--purple-dark); }
.primary-button:hover { background: var(--purple-dark); }
.primary-button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--purple-dark); }
.secondary-button { color: var(--purple-dark); background: white; }
.helper-text { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; }

.number-pad { display: none; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: 1rem; }
.number-pad button {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  font: 700 1.2rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  box-shadow: 0 2px 0 var(--border);
  cursor: pointer;
}
.number-pad button:active { transform: translateY(2px); box-shadow: none; }
.number-pad .pad-action { color: var(--purple); font: 700 .95rem/1 system-ui, sans-serif; background: #f3f0fa; }

body[data-pwa="true"] .number-pad { display: grid; }

@media (display-mode: standalone), (display-mode: fullscreen) {
  .number-pad { display: grid; }
}

@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  .number-pad { display: grid; }
}

.feedback {
  margin-top: 1rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .8rem;
  border-radius: 16px;
}
.feedback.is-correct { background: #dff8ed; color: #105f47; }
.feedback.is-learning { background: #ece9ff; color: var(--purple-dark); }
.feedback-icon { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-weight: 700; }
.feedback strong { font-size: 1.08rem; }
.feedback p { margin: 0; }
.feedback button { min-height: 44px; border-color: currentColor; color: inherit; background: white; }

.locked-message { min-height: 410px; display: grid; place-items: center; align-content: center; gap: 1rem; text-align: center; }
.large-lock { width: 5rem; height: 5rem; display: grid; place-items: center; border-radius: 24px; color: var(--purple-dark); background: var(--yellow); font: 800 2.6rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; transform: rotate(-4deg); }
.locked-message p { max-width: 550px; margin: .5rem auto; color: var(--muted); }
.unlock-progress { width: min(380px, 100%); height: 10px; margin: 1rem auto .4rem; overflow: hidden; border-radius: 999px; background: #e7e3ef; }
.unlock-progress span { height: 100%; display: block; width: 0; border-radius: inherit; background: var(--coral); }

.round-complete { min-height: 430px; display: grid; place-items: center; align-content: center; text-align: center; }
.round-complete > p:not(.eyebrow) { margin: .5rem 0 1.25rem; color: var(--muted); }
.celebration { width: 5.5rem; height: 5.5rem; display: grid; place-items: center; margin-bottom: 1rem; border: 3px solid #9b7200; border-radius: 50%; color: #8b6500; background: var(--yellow); font-size: 2.8rem; box-shadow: 0 0 0 12px #fff4b5; }
.celebration.brand-celebration { border-color: var(--purple-dark); color: white; background: var(--purple); box-shadow: 0 0 0 12px var(--purple-light); font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; font-weight: 800; }
.complete-actions { display: flex; gap: .75rem; }

.journey { padding: 5rem 0 3rem; scroll-margin-top: 1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-heading > p { max-width: 360px; margin: 0; color: var(--muted); text-align: right; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.stat-grid article { padding: 1.25rem; border: 1px solid var(--border); border-radius: 18px; background: var(--paper); }
.stat-grid article > span { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 10px; color: var(--purple-dark); background: var(--purple-light); font-weight: 700; }
.stat-grid article > strong { display: block; font: 800 2rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.stat-grid p { margin: .25rem 0 0; color: var(--muted); }
.stat-grid .daily-rainbow-card { display: flex; flex-direction: column; justify-content: center; }
.stat-grid .daily-rainbow-title { margin: 0 0 .85rem; color: var(--text); font-size: 1rem; font-weight: 800; }
.daily-rainbow-progress { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; width: 100%; }
.daily-rainbow-progress span { height: 1.3rem; border-radius: .4rem; background: var(--rainbow-colour); opacity: .16; transform: scaleY(.62); transform-origin: center; transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease; }
.daily-rainbow-progress span:nth-child(1) { --rainbow-colour: #e53935; }
.daily-rainbow-progress span:nth-child(2) { --rainbow-colour: #f57c00; }
.daily-rainbow-progress span:nth-child(3) { --rainbow-colour: #fbc02d; }
.daily-rainbow-progress span:nth-child(4) { --rainbow-colour: #43a047; }
.daily-rainbow-progress span:nth-child(5) { --rainbow-colour: #1e88e5; }
.daily-rainbow-progress span:nth-child(6) { --rainbow-colour: #3949ab; }
.daily-rainbow-progress span:nth-child(7) { --rainbow-colour: #8e24aa; }
.daily-rainbow-progress span.is-complete { opacity: 1; transform: scaleY(1); box-shadow: 0 3px 0 color-mix(in srgb, var(--rainbow-colour), black 18%); }
.stat-grid .daily-rainbow-copy { margin-top: .65rem; font-size: .86rem; }
.stat-grid .learning-level-card { display: flex; flex-direction: column; justify-content: center; }
.learning-level-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.stat-grid .learning-level-heading p { margin: 0; color: var(--text); font-size: 1rem; font-weight: 800; }
.learning-level-heading span { padding: .22rem .5rem; border-radius: 999px; color: var(--purple-dark); background: var(--purple-light); font-size: .72rem; font-weight: 800; }
.stat-grid .learning-level-card > strong { margin-top: .85rem; color: var(--purple-dark); font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
.learning-level-progress { height: 9px; overflow: hidden; margin-top: .85rem; border-radius: 999px; background: #ebe8f2; }
.learning-level-progress span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--blue)); transition: width .3s ease; }
.stat-grid .learning-level-copy { margin-top: .65rem; font-size: .86rem; }
.learning-level-copy strong, .learning-level-copy b { color: var(--purple-dark); font-weight: 800; }
.stat-grid .learning-level-future { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--border); font-size: .72rem; line-height: 1.35; }

.practice-pep {
  position: relative;
  overflow: hidden;
  margin: 1rem 0 5rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border-radius: 28px;
  color: white;
  background: var(--purple-dark);
  box-shadow: 0 10px 0 rgba(47, 39, 114, .14);
}
.practice-pep::after {
  content: "★";
  position: absolute;
  right: -1rem;
  top: -2.5rem;
  color: rgba(255, 216, 77, .16);
  font-size: 12rem;
  line-height: 1;
  transform: rotate(10deg);
}
.practice-pep > * { position: relative; z-index: 1; }
.practice-pep .eyebrow { color: var(--yellow); }
.practice-pep h2 { max-width: 700px; font-size: clamp(2rem, 5vw, 3.6rem); }
.practice-pep p { max-width: 780px; margin: .9rem 0 0; color: #e5e1ff; font-size: 1.05rem; }
.practice-pep .practice-lead { color: white; font-size: clamp(1.15rem, 2.5vw, 1.4rem); font-weight: 700; }
.practice-chant { display: flex; flex-wrap: wrap; gap: .45rem .55rem; margin: 1.5rem 0; }
.practice-chant span {
  display: inline-block;
  padding: .22rem .5rem;
  border-radius: 8px;
  color: var(--purple-dark);
  background: white;
  font: 800 clamp(1rem, 2.5vw, 1.35rem)/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
.practice-chant span:nth-child(3n) { color: #734d00; background: var(--yellow); transform: rotate(-2deg); }
.practice-chant span:nth-child(5n) { color: #0b614b; background: #bff1e3; transform: rotate(2deg); }
.practice-chant span:nth-child(7n) { color: #145b95; background: #cdeaff; }
.practice-pep .practice-finish { margin-top: 1.5rem; color: white; font: 700 clamp(1.35rem, 3.5vw, 2rem)/1.35 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.practice-finish strong { color: var(--yellow); font-size: 1.2em; }

footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
footer p { margin: 0; flex: 1; }
footer div { display: flex; gap: 1rem; }
footer > .language-picker, footer > .theme-picker { flex-shrink: 0; }
/* Informationssidor */
.info-main { width: min(1000px, calc(100% - 2rem)); }
.info-hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; align-items: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.info-hero h1 { max-width: 780px; }
.info-hero .lead { max-width: 650px; margin: 1rem 0 1.5rem; color: var(--muted); font-size: 1.2rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .7rem 1.25rem; border: 2px solid var(--purple-dark); border-radius: 13px; font-weight: 700; text-decoration: none; }
.button-link.primary { color: white; background: var(--purple); box-shadow: 0 4px 0 var(--purple-dark); }
.button-link.secondary { color: var(--purple-dark); background: white; }
.math-orbit { width: min(280px, 100%); aspect-ratio: 1; position: relative; display: grid; place-items: center; justify-self: center; border: 3px dashed rgba(68,56,167,.3); border-radius: 50%; }
.math-orbit::before { content: "M"; width: 7rem; height: 7rem; display: grid; place-items: center; border: 3px solid var(--purple-dark); border-radius: 30px 30px 30px 10px; color: white; background: var(--purple); font: 800 2.8rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; transform: rotate(-5deg); }
.math-orbit span { position: absolute; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 15px; font: 800 1.7rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.math-orbit span:nth-child(1) { top: 3%; left: 15%; background: #cdeaff; transform: rotate(-10deg); }
.math-orbit span:nth-child(2) { top: 16%; right: 2%; background: #d2f5eb; transform: rotate(8deg); }
.math-orbit span:nth-child(3) { bottom: 8%; right: 12%; background: #ffd9d1; transform: rotate(-6deg); }
.math-orbit span:nth-child(4) { bottom: 3%; left: 9%; background: #e8e4ff; transform: rotate(9deg); }
.content-section { margin-bottom: 4.5rem; }
.feature-grid, .principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.5rem; }
.feature-grid article, .principle-grid article { padding: 1.5rem; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); }
.feature-grid .feature-symbol { width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 14px; color: var(--purple-dark); background: var(--yellow); font: 800 1.4rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.feature-grid h3, .principle-grid h3 { font-size: 1.25rem; }
.feature-grid p, .principle-grid p { margin: .5rem 0 0; color: var(--muted); }
.unlock-callout { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; padding: 1.5rem; border: 2px solid #e4cb35; border-radius: 22px; background: #fff7c9; }
.unlock-callout .large-lock { width: 4rem; height: 4rem; border-radius: 17px; background: white; font-size: 2rem; }
.unlock-callout p { margin: .35rem 0 0; color: #5f5224; }
.privacy-card { padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 26px; color: white; background: var(--purple-dark); }
.privacy-card p { max-width: 700px; color: #ded9ff; }
.privacy-card a { color: var(--yellow); }

/* Installation */
.install-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2rem; padding: 4rem 0 5rem; }
.install-intro { position: sticky; top: 1rem; align-self: start; }
.install-intro .app-icon { width: 6rem; height: 6rem; display: grid; place-items: center; margin-bottom: 1.5rem; border: 3px solid var(--purple-dark); border-radius: 26px 26px 26px 9px; color: white; background: var(--purple); font: 800 2rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; transform: rotate(-3deg); }
.install-intro .lead { color: var(--muted); }
.install-state { margin: 1.5rem 0; padding: 1rem; border-radius: 14px; color: #175f49; background: #dff8ed; }
#install-app-button[hidden] { display: none; }
.install-steps { display: grid; gap: 1rem; }
.install-card { padding: 1.5rem; border: 1px solid var(--border); border-radius: 22px; background: var(--paper); }
.install-card h2 { font-size: 1.55rem; }
.install-card ol { margin: 1rem 0 0; padding-left: 1.5rem; }
.install-card li { min-height: 2.2rem; margin: .8rem 0; padding-left: .4rem; color: var(--muted); }
.install-card li::marker { color: var(--purple); font-weight: 700; }
.tip { margin-top: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--yellow); background: #fff9d8; }

/* Intresselista för framtida konton */
.waitlist-main { width: min(1080px, calc(100% - 2rem)); }
.waitlist-intro {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 4rem;
}
.waitlist-intro h1 { max-width: 760px; }
.waitlist-intro .lead { max-width: 720px; margin: 1rem 0; color: var(--muted); font-size: clamp(1.1rem, 2.3vw, 1.3rem); }
.interest-notice { max-width: 700px; margin: 1.25rem 0 0; padding: 1rem 1.2rem; border-left: 5px solid var(--yellow); border-radius: 0 14px 14px 0; background: #fff7ca; }
.account-preview {
  min-height: 250px;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.25rem;
  border: 2px solid var(--purple-dark);
  border-radius: 36px 36px 36px 12px;
  color: white;
  background: var(--purple);
  box-shadow: 12px 12px 0 var(--yellow);
  text-align: center;
}
.account-preview .preview-profile { width: 4.25rem; height: 4.25rem; display: inline-grid; place-items: center; margin: 0 -.35rem; border: 4px solid white; border-radius: 50%; color: var(--purple-dark); background: var(--yellow); font: 800 1.5rem/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.account-preview .preview-profile + .preview-profile { background: var(--mint); }
.account-preview strong, .account-preview small { display: block; }
.account-preview strong { font: 700 1.35rem/1.2 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.account-preview small { margin-top: .25rem; color: #e1ddff; font-size: .95rem; }
.account-benefits { padding-bottom: 4.5rem; }
.benefit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1.5rem; }
.benefit-grid article { padding: 1.5rem; border: 1px solid var(--border); border-radius: 20px; background: var(--paper); }
.benefit-grid article > span { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; margin-bottom: 1rem; border-radius: 12px; color: var(--purple-dark); background: var(--yellow); font-weight: 800; }
.benefit-grid h3 { font-size: 1.2rem; }
.benefit-grid p { margin: .5rem 0 0; color: var(--muted); }
.waitlist-form-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; padding: clamp(2rem, 5vw, 4rem); margin-bottom: 5rem; border-radius: 30px; background: #e7e3ff; }
.form-context > p:not(.eyebrow) { color: var(--muted); }
.privacy-points { display: grid; gap: .55rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.privacy-points li { position: relative; padding-left: 1.75rem; }
.privacy-points li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.waitlist-card { padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid #c8c1e8; border-radius: 22px; background: var(--paper); box-shadow: 0 8px 0 rgba(47, 39, 114, .1); }
.waitlist-form { display: grid; gap: 1rem; }
.waitlist-form > label:not(.check-row) { margin-bottom: -.65rem; }
.waitlist-form input[type="email"] { width: 100%; min-height: 54px; padding: .75rem .9rem; border: 2px solid var(--border); border-radius: 12px; color: var(--ink); background: white; font-size: 1rem; }
.waitlist-form input[type="email"]:focus { outline: 4px solid rgba(68, 56, 167, .15); border-color: var(--purple); }
.waitlist-form fieldset { display: grid; gap: .65rem; margin: .25rem 0 0; padding: 1rem; border: 1px solid var(--border); border-radius: 14px; }
.waitlist-form legend { padding: 0 .3rem; font-weight: 700; }
.waitlist-form legend span { color: var(--muted); font-size: .9rem; font-weight: 400; }
.check-row { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; margin: 0; color: var(--ink); cursor: pointer; }
.check-row input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--purple); }
.consent-row { padding: .9rem; border-radius: 12px; background: #f3f0ff; font-weight: 700; }
.waitlist-submit { width: 100%; }
.form-fineprint { margin: -.25rem 0 0; color: var(--muted); font-size: .9rem; }
.form-errors { margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid #eaa2aa; border-radius: 12px; color: #85222e; background: #ffe9eb; }
.form-errors ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.website-field { width: 1px; height: 1px; position: absolute; left: -10000px; overflow: hidden; }
.waitlist-success { display: grid; justify-items: start; gap: .65rem; }
.waitlist-success > span { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 1.5rem; font-weight: 800; }
.waitlist-success p { margin: 0; color: var(--muted); }
.waitlist-success .eyebrow { color: var(--green); }
.waitlist-success .button-link { margin-top: .5rem; }

/* Inloggning för tidiga testkonton */
.login-page { background: radial-gradient(circle at 85% 10%, rgba(255, 224, 112, .28), transparent 24rem), var(--page); }
.login-main { min-height: calc(100vh - 6rem); display: grid; place-items: center; padding: 3rem 0 5rem; }
.login-card { width: min(470px, 100%); padding: clamp(1.5rem, 6vw, 2.5rem); border: 1px solid var(--border); border-radius: 28px 28px 28px 10px; background: var(--paper); box-shadow: 0 10px 0 rgba(47, 39, 114, .12); }
.login-card h1 { margin-top: .2rem; font-size: clamp(2rem, 7vw, 3rem); }
.login-card > p:not(.eyebrow) { color: var(--muted); }
.login-form { display: grid; gap: .8rem; margin-top: 1.5rem; }
.login-form label { margin-bottom: -.5rem; font-weight: 800; }
.login-form input { width: 100%; min-height: 54px; padding: .7rem .9rem; border: 2px solid var(--border); border-radius: 12px; color: var(--ink); background: white; }
.login-form input:focus { outline: 4px solid rgba(68, 56, 167, .15); border-color: var(--purple); }
.login-form .primary-button { margin-top: .4rem; }
.login-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.login-actions .primary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.login-actions form { margin: 0; }
.login-error, .login-notice { margin-top: 1rem; padding: .85rem 1rem; border-radius: 12px; }
.login-error { border: 1px solid #eaa2aa; color: #85222e; background: #ffe9eb; }
.login-error p { margin: 0; }
.login-notice { color: #175f49 !important; background: #dff8ed; }

/* Färgteman. Standardtemat använder variablerna i :root ovan. */
:root[data-theme="cozy"] {
  --ink: #3a281f;
  --muted: #765e50;
  --paper: #fff8e9;
  --page: #ead8bc;
  --purple: #85583d;
  --purple-dark: #523524;
  --purple-light: #f2dfc5;
  --yellow: #e8b75d;
  --coral: #c8795b;
  --mint: #9fbc8c;
  --blue: #8ba9b6;
  --red: #9d4c3c;
  --green: #4f7650;
  --border: #cfbda5;
  --page-accent-one: rgba(170, 104, 54, .2);
  --page-accent-two: rgba(255, 244, 218, .42);
  --home-background: #3b281f;
  --home-accent-one: rgba(232, 183, 93, .15);
  --home-accent-two: rgba(159, 188, 140, .12);
  --home-text: #fff8e9;
  --home-muted: #ead8c5;
  --home-panel: #2d1e18;
  --home-panel-border: rgba(255, 248, 233, .2);
  --home-logo-background: #fff8e9;
  --home-logo-text: #523524;
  --control-surface: #fffaf0;
}

:root[data-theme="minimal"] {
  --ink: #111111;
  --muted: #595959;
  --paper: #ffffff;
  --page: #eeeeee;
  --purple: #242424;
  --purple-dark: #000000;
  --purple-light: #e5e5e5;
  --yellow: #d6d6d6;
  --coral: #777777;
  --mint: #b8b8b8;
  --blue: #969696;
  --red: #333333;
  --green: #222222;
  --border: #bcbcbc;
  --shadow: none;
  --page-accent-one: transparent;
  --page-accent-two: transparent;
  --home-background: #f4f4f4;
  --home-accent-one: transparent;
  --home-accent-two: transparent;
  --home-text: #111111;
  --home-muted: #4d4d4d;
  --home-panel: #151515;
  --home-panel-border: #000000;
  --home-logo-background: #111111;
  --home-logo-text: #ffffff;
  --control-surface: #ffffff;
}

:root[data-theme="rainbow"] {
  --ink: #241735;
  --muted: #685b78;
  --paper: #fffefe;
  --page: #fff5fc;
  --purple: #7040c8;
  --purple-dark: #3f226f;
  --purple-light: #eee2ff;
  --yellow: #ffd83d;
  --coral: #f04e45;
  --mint: #31ad69;
  --blue: #3478d4;
  --red: #d93036;
  --green: #17854c;
  --border: #dfcee9;
  --home-background: #35225f;
  --home-accent-one: rgba(255, 216, 61, .17);
  --home-accent-two: rgba(50, 187, 101, .14);
  --home-text: #ffffff;
  --home-muted: #eee4ff;
  --home-panel: #251743;
  --home-panel-border: rgba(255, 255, 255, .2);
  --home-logo-background: #ffffff;
  --home-logo-text: #4e287f;
}

:root[data-theme="summer"] {
  --ink: #172f3d;
  --muted: #526973;
  --paper: #ffffff;
  --page: #bfeaff;
  --purple: #1879ad;
  --purple-dark: #0b537b;
  --purple-light: #dff5ff;
  --yellow: #ffd84d;
  --coral: #ff8a58;
  --mint: #68caa4;
  --blue: #52b9eb;
  --red: #bc493f;
  --green: #20765b;
  --border: #9ccfe5;
  --page-accent-one: rgba(255, 216, 77, .3);
  --page-accent-two: rgba(255, 255, 255, .45);
  --home-background: #9edfff;
  --home-accent-one: rgba(255, 216, 77, .26);
  --home-accent-two: rgba(255, 255, 255, .35);
  --home-text: #172f3d;
  --home-muted: #345563;
  --home-panel: #0b5d87;
  --home-panel-border: rgba(255, 255, 255, .48);
  --home-logo-background: #ffd84d;
  --home-logo-text: #172f3d;
  --control-surface: #ffffff;
}

:root[data-theme="rainforest"] {
  --ink: #173326;
  --muted: #52705f;
  --paper: #f5fbf4;
  --page: #d8ead7;
  --purple: #2d7650;
  --purple-dark: #174d35;
  --purple-light: #d4ebd8;
  --yellow: #e6cc58;
  --coral: #d37852;
  --mint: #5eaa75;
  --blue: #5b9a8d;
  --red: #a84c3c;
  --green: #17643f;
  --border: #abc8ad;
  --page-accent-one: rgba(230, 204, 88, .18);
  --page-accent-two: rgba(45, 118, 80, .18);
  --home-background: #123e2c;
  --home-accent-one: rgba(230, 204, 88, .12);
  --home-accent-two: rgba(94, 170, 117, .19);
  --home-text: #f5fbf4;
  --home-muted: #cfe6d2;
  --home-panel: #0c3021;
  --home-panel-border: rgba(207, 230, 210, .23);
  --home-logo-background: #f5fbf4;
  --home-logo-text: #174d35;
  --control-surface: #f9fff8;
}

body.home-page .language-picker,
body.home-page .theme-picker { color: var(--home-text); }

:root[data-theme="cozy"] .skill-symbol { color: #563723 !important; background: #ead6b7 !important; }
:root[data-theme="cozy"] .today-chip { border-color: #b99362; background: #f8e6c7; }
:root[data-theme="cozy"] .today-chip > span:first-child { color: #6f472c; }
:root[data-theme="cozy"] .exercise-shell::before { border-color: rgba(133, 88, 61, .24); }

:root[data-theme="minimal"] .skill-card,
:root[data-theme="minimal"] .exercise-shell,
:root[data-theme="minimal"] .stat-grid article,
:root[data-theme="minimal"] .feature-grid article,
:root[data-theme="minimal"] .principle-grid article,
:root[data-theme="minimal"] .install-card,
:root[data-theme="minimal"] .waitlist-card {
  border-radius: 5px;
  box-shadow: none;
}
:root[data-theme="minimal"] .skill-symbol { filter: grayscale(1); border-radius: 4px; }
:root[data-theme="minimal"] .skill-card:hover { box-shadow: none; }
:root[data-theme="minimal"] .practice-pep { border-radius: 5px; box-shadow: none; }
:root[data-theme="minimal"] .today-chip { border-color: #777; background: #fff; }
:root[data-theme="minimal"] .today-chip > span:first-child { color: #333; }
:root[data-theme="minimal"] .exercise-shell::before { border-color: rgba(0, 0, 0, .12); }
:root[data-theme="minimal"] .lock-badge { color: #333; background: #ddd; }

:root[data-theme="rainbow"] body {
  background:
    linear-gradient(90deg, #e53935 0 14.28%, #f28c28 14.28% 28.56%, #f5cf3b 28.56% 42.84%, #39a852 42.84% 57.12%, #3478d4 57.12% 71.4%, #4350a8 71.4% 85.68%, #873c9d 85.68%) top / 100% 10px no-repeat,
    radial-gradient(circle at 10% 10%, var(--page-accent-one), transparent 20rem),
    radial-gradient(circle at 90% 35%, var(--page-accent-two), transparent 22rem),
    var(--page);
}
:root[data-theme="rainbow"] body.home-page {
  background:
    linear-gradient(90deg, #e53935 0 14.28%, #f28c28 14.28% 28.56%, #f5cf3b 28.56% 42.84%, #39a852 42.84% 57.12%, #3478d4 57.12% 71.4%, #4350a8 71.4% 85.68%, #873c9d 85.68%) top / 100% 10px no-repeat,
    radial-gradient(circle at 8% 8%, var(--home-accent-one), transparent 24rem),
    radial-gradient(circle at 92% 30%, var(--home-accent-two), transparent 26rem),
    var(--home-background);
}
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 1) { border-top-color: #e53935; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 2) { border-top-color: #f28c28; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 3) { border-top-color: #f5cf3b; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 4) { border-top-color: #39a852; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 5) { border-top-color: #3478d4; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n + 6) { border-top-color: #4350a8; }
:root[data-theme="rainbow"] .skill-card:nth-child(7n) { border-top-color: #873c9d; }

:root[data-theme="summer"] body,
:root[data-theme="summer"] body.home-page {
  background:
    url("https://kottegott.se/images/sun-background-top.png?v=3") top right / min(29vw, 330px) auto no-repeat,
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, .5), transparent 20rem),
    linear-gradient(#9edfff, #d9f4ff 48%, #fffdf7);
  background-attachment: scroll, fixed, fixed;
}
:root[data-theme="summer"] .exercise-shell,
:root[data-theme="summer"] .skill-card,
:root[data-theme="summer"] .stat-grid article { color: #172f3d; background: #ffffff; }
:root[data-theme="summer"] .practice-pep { color: white; }
:root[data-theme="summer"] .site-header { position: relative; z-index: 2; }
:root[data-theme="summer"] .skill-card:nth-child(odd) .skill-symbol { color: #6e5500; background: #fff0a3; }
:root[data-theme="summer"] .skill-card:nth-child(even) .skill-symbol { color: #145b79; background: #d4f2ff; }
:root[data-theme="summer"] .exercise-shell::before { border-color: rgba(255, 216, 77, .58); }

:root[data-theme="rainforest"] body.home-page {
  background:
    radial-gradient(ellipse at 8% 5%, rgba(126, 184, 101, .24), transparent 25rem),
    radial-gradient(ellipse at 95% 25%, rgba(230, 204, 88, .11), transparent 23rem),
    linear-gradient(145deg, #174d35, #0e3424 70%);
}
:root[data-theme="rainforest"] .skill-card { border-bottom-color: rgba(45, 118, 80, .35); }
:root[data-theme="rainforest"] .skill-symbol { color: #174d35 !important; background: #d5ead7 !important; }
:root[data-theme="rainforest"] .today-chip { border-color: #8aa66d; background: #eef2bb; }
:root[data-theme="rainforest"] .today-chip > span:first-child { color: #3e642f; }
:root[data-theme="rainforest"] .exercise-shell::before { border-color: rgba(45, 118, 80, .2); }

:root[data-theme]:not([data-theme="default"]) .measurement-visual,
:root[data-theme]:not([data-theme="default"]) .time-visual,
:root[data-theme]:not([data-theme="default"]) .concept-visual { background: var(--purple-light); }
:root[data-theme]:not([data-theme="default"]) .feedback.is-learning,
:root[data-theme]:not([data-theme="default"]) .consent-row,
:root[data-theme]:not([data-theme="default"]) .waitlist-form-section { background: var(--purple-light); }
:root[data-theme]:not([data-theme="default"]) .skill-meter,
:root[data-theme]:not([data-theme="default"]) .round-progress { background: var(--border); }

@media (max-width: 1200px), (hover: none) and (pointer: coarse) {
  .skill-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1200px) {
  .today-chip-label {
    width: 1px;
    height: 1px;
    position: absolute;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 850px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .learning-level-card { grid-column: 1 / -1; }
  .info-hero { grid-template-columns: 1fr; }
  .math-orbit { grid-row: 1; width: 210px; }
  .feature-grid, .principle-grid { grid-template-columns: 1fr 1fr; }
  .install-layout { grid-template-columns: 1fr; padding-top: 3rem; }
  .install-intro { position: static; }
  .waitlist-intro { grid-template-columns: 1fr; }
  .account-preview { width: min(390px, 100%); min-height: 220px; justify-self: center; }
  .waitlist-form-section { grid-template-columns: 1fr; }
  .test-intro { grid-template-columns: 1fr; }
  .test-intro img { max-height: 430px; }
}

@media (max-width: 620px) {
  .site-header { width: 100%; margin-top: 0; flex-wrap: wrap; border-width: 0 0 1px; border-radius: 0; }
  .main-nav a:not(.is-current) { display: none; }
  .header-controls { width: 100%; justify-content: flex-start; margin-left: 0; }
  .header-controls > .language-picker, .header-controls > .theme-picker { flex: 1; }
  .header-controls select { width: 100%; max-width: none; }
  .account-status { margin-left: auto; }
  .account-status > span { display: none; }
  :root[data-theme="summer"] body,
  :root[data-theme="summer"] body.home-page { background-size: 190px auto, auto, auto; }
  main, footer { width: min(100% - 1rem, 1100px); }
  .welcome { align-items: flex-start; padding-top: 2.3rem; }
  .today-chip { padding: .5rem .7rem; font-size: .88rem; }
  .skill-grid { display: flex; margin-right: -.5rem; padding: 0 .5rem .7rem 0; overflow-x: auto; scroll-snap-type: x mandatory; }
  .skill-card { min-width: 148px; min-height: 138px; scroll-snap-align: start; }
  .skill-card[data-mobile-supported="false"] { display: none; }
  .exercise-shell { padding: 1rem; border-radius: 22px; }
  .exercise-topbar { align-items: flex-start; }
  .problem-area { margin-top: 1.25rem; }
  .answer-row { grid-template-columns: 1fr; }
  .measurement-visual { min-height: 165px; padding: .85rem; }
  .time-visual, .concept-visual { min-height: 170px; padding: .75rem; }
  .analog-clock { width: 205px; height: 205px; }
  .clock-number { transform: translate(-50%, -50%) rotate(calc(var(--clock-index) * 30deg)) translateY(-75px) rotate(calc(var(--clock-index) * -30deg)); }
  .choice-grid { grid-template-columns: 1fr; }
  .calendar-strip { grid-template-columns: 1fr; }
  .calendar-strip i { min-height: 52px; }
  .balance-pans { gap: 1rem; }
  .comparison-bars > span { grid-template-columns: 64px 1fr; }
  .volume-change { gap: 1rem; }
  .feedback { grid-template-columns: auto 1fr; }
  .feedback button { grid-column: 1 / -1; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: .5rem; text-align: left; }
  footer { align-items: flex-start; flex-direction: column; }
  footer div { flex-wrap: wrap; }
  .feature-grid, .principle-grid { grid-template-columns: 1fr; }
  .unlock-callout { grid-template-columns: 1fr; }
  .complete-actions { flex-direction: column; width: 100%; }
  .practice-pep { margin-bottom: 3rem; border-radius: 22px; }
  .practice-chant { gap: .35rem; }
  .waitlist-main { width: min(100% - 1rem, 1080px); }
  .waitlist-intro { padding-top: 2.5rem; }
  .benefit-grid { grid-template-columns: 1fr; }
  .waitlist-form-section { padding: 1rem; margin-bottom: 3rem; border-radius: 22px; }
}

@media (max-width: 480px) {
  .main-nav { display: none; }
}

@media (max-width: 380px) {
  .site-header { gap: .5rem; }
  .welcome { align-items: flex-start; flex-direction: column; padding-top: 1.8rem; }
  .today-chip { align-self: flex-start; }
  .skill-card { min-width: 138px; }
  .exercise-topbar { align-items: stretch; flex-direction: column; }
  .problem { font-size: clamp(1.95rem, 10vw, 2.6rem); white-space: nowrap; }
  .stat-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-contrast: more) {
  :root { --border: #6b6680; --muted: #3e3950; }
  .skill-card, .exercise-shell, .stat-grid article { border-width: 2px; }
}
