:root {
  --paper: #f3f7ff;
  --ink: #1d1f4d;
  --violet: #6c4bff;
  --violet-soft: #e4ddff;
  --mint: #2fd9a6;
  --mint-soft: #c8f6e6;
  --sun: #ffd23f;
  --sun-soft: #fff0a8;
  --pink: #ff5fa2;
  --pink-soft: #ffd5e8;
  --sky: #5cc8ff;
  --white: #fff;
  --text: #1d1f4d;
  --soft: #46497a;
  --line: 3px solid var(--ink);
  --pop: 5px 5px 0 var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text);
  background: var(--paper) radial-gradient(circle, #cfd9f7 1.6px, transparent 1.8px) 0 0 / 26px 26px;
  font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-size: 1.15rem; line-height: 1.6;
}
h1, h2, h3 { font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", sans-serif; font-weight: 700; line-height: 1.1; margin: 0; }
p { margin: 0 0 1rem; }
a { color: var(--violet); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: var(--pink); }
code, .mono { font-family: "JetBrains Mono", monospace; }
:focus-visible { outline: 4px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(740px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { padding: 14px 0; background: var(--white); border-bottom: var(--line); position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.7rem; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-nav a.plain { color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.site-nav a.plain:hover { color: var(--violet); }

.btn { display: inline-block; font: 700 1.15rem "Fredoka", ui-rounded, sans-serif; text-decoration: none; padding: 13px 28px; border-radius: 999px; border: var(--line); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-main { background: var(--sun); color: var(--ink); }
.btn-main:hover { color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); }
.btn-ghost:hover { color: var(--ink); }
.btn-small { padding: 8px 20px; font-size: 1.02rem; box-shadow: 3px 3px 0 var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 84px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 52px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); max-width: 15ch; }
.hero h1 mark { background: var(--sun); color: var(--ink); padding: 0 .18em; border-radius: .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lead { color: var(--soft); font-size: 1.25rem; margin: 22px 0 28px; max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.hero .fine { color: var(--soft); font-size: 1rem; margin: 0; }
.hero .fine b { background: var(--mint-soft); border-radius: 8px; padding: 1px 8px; }

.demo { background: var(--white); border: var(--line); border-radius: 28px; padding: 22px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(1.6deg); }
.demo-title { display: flex; gap: 7px; margin-bottom: 14px; }
.demo-title i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
.demo-title i:nth-child(1) { background: var(--pink); } .demo-title i:nth-child(2) { background: var(--sun); } .demo-title i:nth-child(3) { background: var(--mint); }
.demo-code { background: var(--ink); border-radius: 16px; padding: 14px 18px; font: 500 1rem/1.7 "JetBrains Mono", monospace; color: #dfe3ff; }
.c-sel { color: var(--sun); } .c-prop { color: var(--mint); } .c-val { color: var(--pink); }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 16px 0 4px; }
.demo-swatches { display: flex; gap: 10px; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: var(--line); background: var(--c); cursor: pointer; padding: 0; transition: transform .12s; }
.swatch:hover { transform: scale(1.12) rotate(-6deg); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--white), 0 0 0 7px var(--violet); }
.demo-hint { color: var(--violet); font-weight: 600; font-size: 1rem; }
.demo-stage { display: grid; place-items: center; padding: 14px 0 6px; min-height: 180px; }
.pizza { position: relative; width: 150px; height: 150px; border-radius: 50%; background: var(--cheese, #f2c14e); border: 7px solid #c1440e; outline: 3px solid var(--ink); transition: background-color .25s ease; }
.pizza i { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #c1440e; }
.pizza i:nth-child(1) { top: 26px; left: 40px; } .pizza i:nth-child(2) { top: 62px; left: 88px; } .pizza i:nth-child(3) { top: 92px; left: 42px; }
.demo-byte { display: flex; align-items: flex-end; gap: 14px; margin-top: 8px; }
.byte-mini { position: relative; flex: none; width: 66px; height: 62px; border-radius: 20px; background: var(--violet); border: var(--line); animation: bob 3.2s ease-in-out infinite; }
.byte-mini::before { content: ""; position: absolute; top: -13px; left: calc(50% - 1.5px); width: 3px; height: 11px; background: var(--ink); }
.byte-mini::after { content: ""; position: absolute; top: -22px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); }
.byte-mini .eyes { position: absolute; top: 17px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.byte-mini .eyes i { width: 14px; height: 16px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--ink); animation: blink 4.5s infinite; }
.byte-mini .mouth { position: absolute; bottom: 11px; left: calc(50% - 11px); width: 22px; height: 10px; border-bottom: 4px solid var(--sun); border-radius: 0 0 50% 50%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.bubble { position: relative; background: var(--sun-soft); border: var(--line); border-radius: 18px 18px 18px 4px; padding: 11px 16px; font-size: 1.05rem; font-weight: 500; flex: 1; }

/* floating stickers in the hero */
.sticker { position: absolute; font-size: 2.2rem; pointer-events: none; user-select: none; }
.s1 { top: -10px; left: 44%; transform: rotate(-12deg); } .s2 { bottom: 14px; left: 46%; transform: rotate(10deg); } .s3 { top: 52%; right: -6px; transform: rotate(14deg); }

/* ---------- sections: each its own color ---------- */
section.block { padding: 76px 0; border-top: var(--line); }
section.block.c-sun { background: var(--sun); }
section.block.c-white { background: var(--white); }
section.block.c-mint { background: var(--mint-soft); }
section.block.c-pink { background: var(--pink-soft); }
section.block.c-violet { background: var(--violet-soft); }
section.block.c-ink { background: var(--violet); color: #fff; }
.block h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); max-width: 18ch; margin-bottom: 14px; }
.block .intro { color: var(--soft); max-width: 38em; margin-bottom: 38px; font-size: 1.2rem; }
.c-sun .intro { color: var(--ink); }

/* steps: a sequence of colorful cards */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.steps li { counter-increment: step; position: relative; background: var(--white); border: var(--line); border-radius: 22px; box-shadow: var(--pop); padding: 40px 16px 18px; }
.steps li:nth-child(odd) { transform: rotate(-1.4deg); } .steps li:nth-child(even) { transform: rotate(1.4deg); }
.steps li::before { content: counter(step); position: absolute; top: -20px; left: 14px; width: 42px; height: 42px; border-radius: 50%; border: var(--line); display: grid; place-items: center; font: 700 1.25rem "Fredoka", sans-serif; background: var(--pink); color: var(--ink); }
.steps li:nth-child(2)::before { background: var(--mint); } .steps li:nth-child(3)::before { background: var(--sky); } .steps li:nth-child(4)::before { background: var(--violet); color: #fff; } .steps li:nth-child(5)::before { background: var(--sun); }
.steps .em { display: block; font-size: 2rem; line-height: 1; margin-bottom: 8px; }
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; }
.steps p { color: var(--soft); font-size: 1rem; margin: 0; line-height: 1.45; }

/* hint levels */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 52px; align-items: start; }
.levels3 { list-style: none; margin: 8px 0 24px; padding: 0; display: grid; gap: 12px; }
.levels3 li { display: flex; gap: 14px; align-items: center; background: var(--white); border: var(--line); border-radius: 16px; padding: 10px 16px; box-shadow: 3px 3px 0 var(--ink); font-size: 1.05rem; }
.levels3 b { flex: none; width: 38px; height: 38px; border-radius: 50%; border: var(--line); display: grid; place-items: center; background: var(--sun); }
.levels3 li:nth-child(2) b { background: var(--mint); } .levels3 li:nth-child(3) b { background: var(--pink); }
.chat { background: var(--violet-soft); border: var(--line); border-radius: 28px; padding: 22px; display: grid; gap: 14px; box-shadow: 8px 8px 0 var(--ink); }
.msg { max-width: 92%; padding: 11px 16px; border: var(--line); border-radius: 18px; font-size: 1.05rem; }
.msg small { display: block; font: 700 .9rem "Fredoka", sans-serif; margin-bottom: 2px; }
.msg code { background: rgba(29,31,77,.1); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.msg.kid { justify-self: end; background: var(--sun); border-bottom-right-radius: 4px; }
.msg.byte { background: var(--white); border-bottom-left-radius: 4px; }
.msg.byte small { color: var(--violet); }
.chat-note { color: var(--soft); font-size: .95rem; margin: 2px 4px 0; }

/* parents */
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 46em; }
.facts li { position: relative; background: var(--white); border: var(--line); border-radius: 18px; padding: 14px 18px 14px 62px; box-shadow: 3px 3px 0 var(--ink); }
.facts li::before { content: "✓"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: var(--line); background: var(--mint); display: grid; place-items: center; font-weight: 700; }
.facts strong { font-weight: 700; }
.facts span { color: var(--soft); }

/* levels: a staircase going up */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ladder li { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 16px; }
.ladder .name { font: 700 1.1rem "Fredoka", sans-serif; white-space: nowrap; }
.ladder .bar { height: 48px; border: var(--line); border-radius: 999px; width: var(--w); background: var(--sun); display: flex; align-items: center; padding: 0 18px; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
.ladder li:nth-child(4n+2) .bar { background: var(--mint); } .ladder li:nth-child(4n+3) .bar { background: var(--sky); } .ladder li:nth-child(4n) .bar { background: var(--violet); color: #fff; }
.ladder li:nth-child(4n+1) .bar { background: var(--sun); }
.ladder .lv { margin-right: 8px; font-size: 1.15rem; }

/* faq */
.faq { max-width: 48em; display: grid; gap: 12px; }
.faq details { background: var(--white); border: var(--line); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); padding: 0 20px; }
.faq summary { cursor: pointer; font: 700 1.15rem "Fredoka", sans-serif; padding: 15px 36px 15px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: var(--line); background: var(--sun); display: grid; place-items: center; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; background: var(--pink); }
.faq details p { color: var(--soft); padding: 0 0 16px; margin: 0; }

/* closing */
.closing .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.closing h2 { max-width: 16ch; margin: 0; color: #fff; }

/* article pages */
.article { padding: 44px 0 90px; }
.article h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); margin-bottom: 18px; }
.article h2 { font-size: 1.7rem; margin: 46px 0 12px; }
.article p, .article li { color: var(--soft); }
.article ul { padding-left: 1.2rem; }
.article li { margin-bottom: .55rem; }
.article li::marker { color: var(--violet); }
.article .lead { font-size: 1.25rem; color: var(--ink); }
.article .when { color: var(--soft); font-size: 1rem; }
.callout { background: var(--sun-soft); border: var(--line); border-radius: 18px; box-shadow: var(--pop); padding: 16px 22px; margin: 26px 0; }
.callout p { color: var(--ink); } .callout p:last-child { margin-bottom: 0; }

/* footer */
.site-footer { border-top: var(--line); background: var(--white); padding: 30px 0 44px; color: var(--soft); font-size: 1rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .demo { transform: none; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .steps li:nth-child(n) { transform: none; }
  .site-nav a.plain { display: none; }
  .ladder li { grid-template-columns: 1fr; gap: 6px; }
  .ladder .bar { width: max(var(--w), 70%); }
  section.block { padding: 56px 0; }
  .site-footer nav { margin-left: 0; }
  .s1, .s3 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
