/* brainbirthday.com: the app's sticker look (flat loud colours, 3px ink outlines, hard shadows), scaled for the web. */
@font-face { font-family: 'Fredoka'; src: url('/static/fonts/FredokaBB-W500.woff2') format('woff2'); font-weight: 400 549; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/static/fonts/FredokaBB-W600.woff2') format('woff2'); font-weight: 550 649; font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/static/fonts/FredokaBB-W700.woff2') format('woff2'); font-weight: 650 900; font-display: swap; }

:root {
  --ink: #24183F; --cream: #FFF1D6; --paper: #FFFAF0; --pink: #FF8AB8; --pinkd: #E0568F; --sun: #FFD23F; --tang: #FF8C42;
  --mint: #3DDC97; --sky: #4CC9F0; --grape: #9D6BFF; --coral: #FF5D73; --lilac: #E9DDFF;
  --memory: #9D6BFF; --speed: #FFD23F; --focus: #FF5D73; --logic: #4CC9F0; --coordination: #3DDC97;
  --t-memory: #EADFFF; --t-speed: #FFF2BF; --t-focus: #FFDDE1; --t-logic: #D9F2FF; --t-coordination: #D5F7E8;
  --fun: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --line: 3px solid var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fun); font-weight: 500; color: var(--ink); background-color: var(--cream);
  background-image: radial-gradient(rgba(36, 24, 63, .06) 2.5px, transparent 3px), radial-gradient(rgba(36, 24, 63, .045) 2px, transparent 2.5px);
  background-size: 46px 46px, 31px 31px; background-position: 0 0, 15px 21px; line-height: 1.4; }
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-weight: 700; line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.center { text-align: center; }
.lede { font-size: clamp(18px, 2vw, 22px); max-width: 720px; margin: 0 0 28px; }
.kicker { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin: 0 0 8px; }
.fine { font-size: 15px; opacity: .7; }
.link { font-weight: 700; font-size: 19px; }
.sub { font-size: clamp(18px, 2vw, 23px); }

/* buttons: sit on a hard shadow, sink into it when pressed */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: 700 21px/1.1 var(--fun); color: var(--ink); text-decoration: none; cursor: pointer;
  padding: 16px 28px; border: var(--line); border-radius: 22px; background: var(--sun); box-shadow: 0 6px 0 var(--ink); transition: transform .08s, box-shadow .08s;
  user-select: none; -webkit-tap-highlight-color: transparent; text-align: center; }
.btn:hover { filter: brightness(1.03); }
.btn:active, .btn.pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--sky); outline-offset: 4px; }
.btn-pink { background: var(--pink); } .btn-sun { background: var(--sun); } .btn-paper { background: var(--paper); } .btn-sky { background: var(--sky); }
.btn-mint { background: var(--mint); } .btn-coral { background: var(--coral); } .btn-lilac { background: var(--lilac); } .btn-grape { background: var(--grape); }
.btn-big { font-size: clamp(24px, 3vw, 32px); padding: 22px 42px; border-radius: 26px; box-shadow: 0 8px 0 var(--ink); }
.btn-big:active { transform: translateY(7px); box-shadow: 0 1px 0 var(--ink); }
.btn-small { font-size: 16px; padding: 10px 16px; border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.btn-small:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.card { background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 4px 6px 0 var(--ink); }

/* header and footer */
.top { padding: 14px 0; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; text-decoration: none; }
.brand svg { flex: none; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-weight: 600; font-size: 17px; padding: 8px 14px; border-radius: 14px; }
.nav a:hover { background: rgba(36, 24, 63, .07); }
.nav .nav-test { background: var(--pink); border: var(--line); box-shadow: 0 4px 0 var(--ink); }
.nav .lang { border: 2.5px solid var(--ink); font-size: 14px; padding: 5px 10px; }
body:not(.page-test) { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.page-test) > main { flex: 1 0 auto; }
.foot { margin-top: 80px; padding: 40px 0 60px; background: var(--paper); border-top: var(--line); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; font-weight: 600; }
.foot .fine { grid-column: 1 / -1; }

/* home */
.hero { padding: 30px 0 20px; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: center; }
.hero-in > *, .scale-row > *, .area-grid > *, .share-in > *, .app-in > *, .foot-in > *, .cards > * { min-width: 0; }
.hero h1 { font-size: clamp(54px, 8.4vw, 116px); line-height: .95; margin-bottom: 18px; }
.hero .sub { max-width: 600px; margin: 0 0 30px; }
.hero .fine { margin-top: 18px; }
.hero-art { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-art > svg { width: min(400px, 100%); height: auto; }
.bubbles { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: 8px; }
.bubble { position: relative; margin: 0; background: var(--paper); border: var(--line); border-radius: 22px; padding: 12px 20px; font-size: 20px; font-weight: 600; box-shadow: 3px 4px 0 var(--ink); text-align: center; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -13px; width: 18px; height: 18px; background: var(--paper); border-right: var(--line); border-bottom: var(--line); transform: translateX(-50%) rotate(45deg); }
.bubble.b1 { transform: rotate(-2deg); } .bubble.b2 { transform: rotate(1.5deg); }
/* the hero bubbles drift slowly, each on its own beat */
.bubble.b1 { animation: bubble-a 6.4s ease-in-out -1.1s infinite; } .bubble.b2 { animation: bubble-b 7.9s ease-in-out -3.7s infinite; }
@keyframes bubble-a { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(-1deg); } }
@keyframes bubble-b { 0%, 100% { transform: translateY(0) rotate(1.5deg); } 50% { transform: translateY(4px) rotate(2.4deg); } }
.scale { padding: 26px 0; }
.scale-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; background: var(--paper); border: var(--line); border-radius: 30px; box-shadow: 5px 7px 0 var(--ink); padding: 22px; }
.scale figure { margin: 0; text-align: center; }
.scale figure svg { width: min(150px, 100%); height: auto; }
.scale figcaption { font-size: 18px; font-weight: 600; }
.scale figcaption b { display: block; font-size: 44px; line-height: 1; }
.areas { padding: 50px 0; }
.area-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.area { background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 4px 6px 0 var(--ink); padding: 18px; }
.area h3 { font-size: 24px; margin: 10px 0 4px; }
.area p { margin: 0 0 12px; font-size: 16px; opacity: .8; }
.area ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.area li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 6px 8px; border-radius: 14px; }
.area-memory li { background: var(--t-memory); } .area-speed li { background: var(--t-speed); } .area-focus li { background: var(--t-focus); }
.area-logic li { background: var(--t-logic); } .area-coordination li { background: var(--t-coordination); }
.areas .center { margin-top: 34px; }
.app { padding: 40px 0; }
.app-in { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; background: var(--grape); color: var(--ink); border: var(--line); border-radius: 34px; box-shadow: 6px 8px 0 var(--ink); padding: 40px; }
.app-in h2 { color: #fff; text-shadow: 3px 4px 0 var(--ink); }
.app-in .lede { color: #fff; }
.app-icon { border-radius: 48px; border: var(--line); box-shadow: 5px 7px 0 var(--ink); }
.stores { display: flex; gap: 14px; flex-wrap: wrap; }
.store { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 18px 10px 14px; text-decoration: none; font-weight: 700; font-size: 20px; border: 3px solid var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
.store small { display: block; font-size: 12px; font-weight: 600; opacity: .8; }
.store.soon { background: var(--paper); color: var(--ink); }
.store.soon small { color: var(--pinkd); opacity: 1; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.latest, .list { padding: 40px 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.art-card { display: flex; flex-direction: column; text-decoration: none; background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 4px 6px 0 var(--ink); overflow: hidden; transition: transform .12s; }
.art-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.art-card img { aspect-ratio: 1200 / 630; width: 100%; height: auto; object-fit: cover; border-bottom: var(--line); }
.art-card > div { padding: 18px 20px 20px; }
.art-card h3 { font-size: 23px; }
.art-card p { margin: 0 0 8px; }
.art-card .meta { font-size: 14px; font-weight: 700; opacity: .65; }

/* share page */
.share { padding: 30px 0; }
.share-in { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 50px; align-items: center; }
.share-card { width: 100%; height: auto; border: var(--line); border-radius: 26px; box-shadow: 6px 8px 0 var(--ink); background: #FFE27A; }
.share-copy h1 { font-size: clamp(40px, 5.6vw, 72px); }
.band-line { font-size: 21px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 26px; padding: 0; }
.chip-area { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 6px; padding: 8px 12px; border: var(--line); border-radius: 16px; box-shadow: 2px 3px 0 var(--ink); }
.chip-area b { font-size: 26px; line-height: 1; } .chip-area small { grid-column: 2; font-size: 11px; opacity: .8; margin-top: -2px; }
.chip-area img { grid-row: span 2; } .chip-area span { grid-column: 1 / -1; font-size: 13px; font-weight: 700; }
.chip-memory { background: var(--memory); } .chip-speed { background: var(--speed); } .chip-focus { background: var(--focus); } .chip-logic { background: var(--logic); } .chip-coordination { background: var(--coordination); }

/* articles */
.post { padding: 20px 0 40px; }
.post-in { width: min(760px, 100% - 40px); }
.post h1 { font-size: clamp(38px, 5.4vw, 62px); }
.post .kicker a { text-decoration: none; }
.byline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
.byline a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; }
.byline img { border-radius: 50%; border: 2.5px solid var(--ink); }
.src-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--sun); text-decoration: none; font-weight: 700; }
.cover { width: 100%; height: auto; border: var(--line); border-radius: 26px; box-shadow: 5px 7px 0 var(--ink); margin: 18px 0 8px; }
.prose { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 19px; line-height: 1.68; font-weight: 400; }
.prose h2 { font-family: var(--fun); font-size: clamp(28px, 3.4vw, 36px); margin-top: 1.7em; }
.prose h3 { font-family: var(--fun); font-size: 24px; margin-top: 1.4em; }
.prose a { color: #5B2FD6; text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 16px 22px; background: var(--t-logic); border: var(--line); border-radius: 20px; box-shadow: 3px 4px 0 var(--ink); font-family: var(--fun); font-size: 22px; font-weight: 600; }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 1.2em 0; background: var(--paper); border: var(--line); border-radius: 16px; overflow: hidden; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 2px solid rgba(36, 24, 63, .15); text-align: left; vertical-align: top; }
.prose th { background: var(--sun); font-family: var(--fun); }
.prose h2[id^="sources"] { margin-top: 2.2em; }
.prose h2[id^="sources"] + ol, .prose h2[id^="sources"] + ul { background: var(--lilac); border: var(--line); border-radius: 22px; box-shadow: 4px 6px 0 var(--ink); padding: 22px 26px 22px 50px; font-size: 16px; line-height: 1.55; }
.prose h2[id^="sources"] + ol li { margin-bottom: 8px; }
.post-cta { margin: 50px 0 10px; padding: 30px; text-align: center; background: var(--pink); border: var(--line); border-radius: 30px; box-shadow: 5px 7px 0 var(--ink); }
.post-cta h2 { font-size: 34px; }
.related { margin-top: 50px; }
.related .cards { grid-template-columns: repeat(2, 1fr); }
.doctor { padding: 30px 0; }
.doctor-in { display: flex; gap: 30px; align-items: center; margin-bottom: 40px; }
.doctor-in img { border-radius: 50%; border: var(--line); box-shadow: 4px 6px 0 var(--ink); background: #D9F2FF; flex: none; }
.nf { padding: 60px 0; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 620px; margin: 0 auto; display: flex; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: 4px 6px 0 var(--ink); padding: 14px 16px; font-size: 15px; }
.consent p { margin: 0; } .consent div { display: flex; gap: 8px; flex: none; }

svg.bb { overflow: visible; }
/* mascot animation: each mascot's tempo and phase come from /static/js/life.js (its data-energy), blinks too */
.bb-anim .bb-bob { animation: bb-bob var(--bob-dur, 1.3s) ease-in-out var(--bob-delay, 0s) infinite alternate; transform-box: fill-box; }
.bb-anim .bb-eyes { transform-origin: 0.5px 0.55px; transform-box: view-box; }
.bb-anim .bb-pupil { animation: bb-look var(--look-dur, 6s) ease-in-out var(--look-delay, 0s) infinite; }
.bb-anim .bb-spin { animation: bb-spin .14s linear var(--t0, 0s) infinite alternate; transform-origin: 50% 0; transform-box: fill-box; }
.bb-anim .bb-twinkle { animation: bb-twinkle 1.6s ease-in-out var(--t0, 0s) infinite alternate; transform-box: fill-box; transform-origin: center; }
.bb-anim .bb-t1 { animation-delay: calc(var(--t0, 0s) - .5s); } .bb-anim .bb-t2 { animation-delay: calc(var(--t0, 0s) - 1s); } .bb-anim .bb-t3 { animation-delay: calc(var(--t0, 0s) - 1.3s); }
.bb-anim .bb-fly { animation: bb-orbit 2.6s linear var(--t0, 0s) infinite; transform-origin: 0.5px 0.45px; transform-box: view-box; } .bb-anim .bb-f1 { animation-duration: 3.4s; animation-direction: reverse; }
.bb-anim .bb-z { animation: bb-zz 3.6s ease-out var(--t0, 0s) infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
.bb-anim .bb-z1 { animation-delay: calc(var(--t0, 0s) - 1.2s); } .bb-anim .bb-z2 { animation-delay: calc(var(--t0, 0s) - 2.4s); }
.bb-anim .bb-dust { animation: bb-float 3s ease-in var(--t0, 0s) infinite; } .bb-anim .bb-d1 { animation-delay: calc(var(--t0, 0s) - .6s); } .bb-anim .bb-d2 { animation-delay: calc(var(--t0, 0s) - 1.2s); } .bb-anim .bb-d3 { animation-delay: calc(var(--t0, 0s) - 1.8s); } .bb-anim .bb-d4 { animation-delay: calc(var(--t0, 0s) - 2.4s); }
@keyframes bb-bob { from { transform: translateY(var(--bob-amp, 0.012px)); } to { transform: translateY(calc(var(--bob-amp, 0.012px) * -1)); } }
@keyframes bb-look { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-0.02px, -0.006px); } 60% { transform: translate(0.018px, 0.01px); } }
@keyframes bb-spin { from { transform: scaleX(1); } to { transform: scaleX(.08); } }
@keyframes bb-twinkle { from { transform: scale(.6); } to { transform: scale(1.15); } }
@keyframes bb-orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bb-float { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-0.2px); opacity: 0; } }
@keyframes bb-zz { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(0.06px, -0.15px) scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bb-anim * { animation: none !important; } .bb-anim .bb-z0 { opacity: 1; } .bubble { animation: none !important; } }

/* ------------------------------------------------------------------ the test app */
.page-test { background-color: var(--stage, var(--cream)); transition: background-color .3s; min-height: 100vh; }
.app-root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.boot-wait { margin: auto; }
.bar { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; padding: 12px 16px 6px; width: min(860px, 100%); margin: 0 auto; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: var(--line); background: var(--paper); box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; color: var(--ink); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.dots { display: flex; gap: 6px; justify-content: center; align-items: center; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(36, 24, 63, .15); }
.dots i.done { border: 2.5px solid var(--ink); } .dots i.now { width: 16px; height: 16px; background: var(--paper); border: 2.5px solid var(--ink); }
.screen { flex: 1; display: flex; flex-direction: column; align-items: center; width: min(860px, 100%); margin: 0 auto; padding: 4px 18px 22px; }
.intro { gap: 12px; text-align: center; }
.intro .chips-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: 14px; letter-spacing: .05em; background: var(--paper); }
.chip img { width: 18px; height: 18px; }
.intro h1 { font-size: clamp(38px, 5vw, 56px); margin: 0; }
.demo-window { position: relative; width: 100%; aspect-ratio: 560 / 400; border: var(--line); border-radius: 26px; box-shadow: 4px 6px 0 var(--ink); overflow: hidden; background: var(--tint, var(--paper)); }
.demo-window .demo-scale { position: absolute; left: 0; top: 0; width: 560px; height: 400px; transform-origin: 0 0; }
.demo-badge { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; z-index: 2; }
.demo-wrap { position: relative; width: min(680px, 100%, calc((100svh - 440px) * 1.4)); min-width: min(300px, 100%); margin-bottom: 8px; }
.rule { font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; max-width: 560px; margin: 8px 0 0; }
.keys-hint { font-size: 15px; opacity: .75; margin: 18px 0 0; }
.kb-pick { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; opacity: .6; margin-top: 8px; }
.kb-select { font: inherit; font-weight: 600; color: var(--ink); background: transparent; border: 1.5px solid currentColor; border-radius: 8px; padding: 1px 6px; cursor: pointer; }
.go-row { margin-top: auto; padding-top: 12px; width: min(560px, 100%); }
.go-row .btn { width: 100%; }
.stage { position: relative; flex: 1; width: 100%; min-height: 380px; display: flex; flex-direction: column; align-items: center; user-select: none; -webkit-user-select: none; touch-action: manipulation; contain: size; --sw: 560px; --sh: 400px; }
/* a safe inset: the window's rounded edge and the HOW TO PLAY badge never cut the demo's bottom buttons or keycaps */
.demo-scale .stage { min-height: 0; height: 100%; padding: 8px 14px 40px; }
.hud { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 600px; min-height: 30px; margin: 4px auto 6px; font-weight: 700; font-size: 20px; }
.hud .lbl { min-width: 48px; font-variant-numeric: tabular-nums; }
.timer { flex: 1; height: 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: rgba(36, 24, 63, .12); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--fill, var(--mint)); border-radius: 999px; transform-origin: 0 50%; }
.status { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; margin: 4px 0 8px; min-height: 1.2em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.substatus { font-size: 17px; font-weight: 600; opacity: .6; min-height: 1.2em; }
.keycaps { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.kc { min-width: 40px; height: 40px; padding: 0 10px; display: inline-grid; place-items: center; border: 2.5px solid var(--ink); border-radius: 10px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); font-weight: 700; font-size: 17px; transition: transform .06s, box-shadow .06s, background .06s; }
.kc.down { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); background: var(--sun); }
/* right/wrong mark on the answer just given (never a full-screen flash) */
.cost-pop { position: absolute; left: 0; top: 100%; z-index: 4; padding: 1px 8px; border-radius: 999px; border: 2px solid var(--ink); background: var(--coral); color: var(--ink); font: 700 16px/1.2 var(--font, inherit); white-space: nowrap; pointer-events: none; animation: bb-cost .95s ease-out forwards; }
@keyframes bb-cost { 0% { opacity: 0; transform: translateY(4px); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-24px); } }
@media (prefers-reduced-motion: reduce) { .cost-pop { animation: bb-cost-still .95s linear forwards; } @keyframes bb-cost-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }
.cost-host { position: relative; }
.mark { position: absolute; top: -16px; left: 50%; width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink); display: grid; place-items: center; opacity: 0; pointer-events: none; z-index: 3; transform: translateX(-50%); }
.mark svg { width: 18px; height: 18px; } .mark.ok { background: var(--mint); } .mark.no { background: var(--coral); }
.ghost { position: absolute; left: 0; top: 0; width: 40px; height: 40px; pointer-events: none; z-index: 10; transition: transform .38s ease-in-out; filter: drop-shadow(2px 3px 0 var(--ink)); }
.ghost.press svg { transform: scale(.82); transform-origin: 0 0; }
.ghost svg { width: 40px; height: 40px; transition: transform .1s; }
.tile, .pad, .swatch, .answer, .pick, .dot, .drum { -webkit-tap-highlight-color: transparent; cursor: pointer; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 600px; margin-top: auto; padding-top: 14px; }
.answer { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; border: var(--line); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); font: 700 24px/1 var(--fun); color: var(--ink); background: var(--paper); transition: transform .06s, box-shadow .06s; padding: 8px; }
.answer .lbl { line-height: 1; }
@supports (text-box: trim-both cap alphabetic) { .answer .lbl { text-box: trim-both cap alphabetic; } }
.answer .kcap { position: absolute; top: 50%; transform: translateY(-50%); min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); background: var(--paper); font: 700 15px/1 var(--fun); opacity: .8; }
.answer.side-left .kcap { left: 14px; } .answer.side-right .kcap { right: 14px; }
@media (hover: none) and (pointer: coarse) { .answer .kcap { display: none; } }
.answer:active, .answer.down { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.answer svg { width: 30px; height: 30px; }
.countdown { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(36, 24, 63, .3); z-index: 20; }
.countdown .ball { position: relative; width: 190px; height: 190px; border-radius: 50%; background: var(--fill, var(--sun)); border: 4px solid var(--ink); box-shadow: 0 8px 0 var(--ink); display: grid; place-items: center; animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.countdown .ball span { font-size: 118px; font-weight: 700; color: var(--paper); text-shadow: 3px 4px 0 var(--ink); line-height: 1; transform: translateY(-2px); white-space: nowrap; }
.countdown .ball span.word { font-size: 64px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.stamp-wrap { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(36, 24, 63, .22); z-index: 20; }
.stamp { width: min(340px, 86vw); padding: 26px 30px; text-align: center; border: 4px solid var(--ink); border-radius: 32px; box-shadow: 4px 8px 0 var(--ink); background: var(--fill, var(--sun)); transform: rotate(-4deg); animation: stamp .35s cubic-bezier(.3, 1.5, .5, 1); }
.stamp b { display: block; font-size: 60px; line-height: 1; margin-bottom: 8px; }
.stamp span { font-size: 22px; font-weight: 600; }
@keyframes stamp { from { transform: rotate(-20deg) scale(.4); opacity: 0; } to { transform: rotate(-4deg) scale(1); opacity: 1; } }
.modal-wrap { position: fixed; inset: 0; background: rgba(36, 24, 63, .35); display: grid; place-items: center; z-index: 30; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--paper); border: var(--line); border-radius: 28px; box-shadow: 5px 7px 0 var(--ink); padding: 22px; position: relative; }
.modal h2 { font-size: 30px; }
.modal .close { position: absolute; right: 14px; top: 14px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; } .row-btns .btn { flex: 1; }

/* games */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 4%; width: min(400px, calc(var(--sw) * .86), calc(var(--sh) - 120px)); aspect-ratio: 1; margin: auto 0; }
.tile { border: var(--line); border-radius: 20%; background: var(--paper); box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; transition: transform .1s, background .08s; position: relative; }
.tile.lit { background: var(--grape); transform: scale(1.06); } .tile.ok { background: var(--grape); } .tile.bad { background: var(--coral); }
.tile.lit::after { content: '✦'; color: #fff; font-size: 36px; position: absolute; inset: 0; display: grid; place-items: center; }
.tile .k { position: absolute; right: 8px; bottom: 6px; font-size: 13px; font-weight: 700; opacity: .35; }
.progress-pips { display: flex; gap: 5px; min-height: 14px; }
.progress-pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); } .progress-pips i.on { background: var(--grape); }
.pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--sw) * .03); width: min(620px, calc(var(--sw) * .94), calc((var(--sh) - 150px) * 4.2)); margin: auto 0; }
.pad { aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); background: var(--paper); box-shadow: 0 6px 0 var(--ink); display: grid; place-items: center; position: relative; transition: background .06s, transform .06s; }
.pad svg { width: 42%; height: 42%; opacity: .2; }
.pad.on { background: var(--sun); transform: scale(1.06); box-shadow: 0 6px 0 var(--ink), 0 0 40px var(--sun); } .pad.on svg { opacity: 1; }
.pad.bad { background: var(--coral); }
.pad .k { position: absolute; bottom: -34px; }
.word-card { width: min(520px, 100%); margin: auto 0; padding: calc(var(--sh) * .04) 16px; text-align: center; font-size: clamp(36px, min(calc(var(--sw) * .13), calc(var(--sh) * .18)), 92px); font-weight: 700; letter-spacing: .02em; text-shadow: 2px 3px 0 var(--ink); white-space: nowrap; overflow: hidden; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%; max-width: 620px; margin-top: auto; padding-bottom: 46px; }
@media (hover: none) and (pointer: coarse) { .swatches { padding-bottom: 8px; } }
.swatch { height: clamp(56px, calc(var(--sh) * .18), 92px); border-radius: 22px; border: 3.5px solid var(--ink); box-shadow: 0 6px 0 var(--ink); position: relative; transition: transform .06s, box-shadow .06s; }
.swatch:active, .swatch.down { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.swatch .k { position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%); }
.trail { position: relative; width: 100%; max-width: 640px; flex: 1; min-height: 0; }
.trail svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dot { position: absolute; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; border: var(--line); background: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 25px; line-height: 1; transition: background .1s; }
.dot span { transform: translateY(-1px); }
.dot.done { background: var(--logic); } .dot.bad { background: var(--coral); animation: shake .3s; }
.dot .flag { position: absolute; right: -8px; top: -10px; font-size: 16px; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.tray { position: relative; width: min(440px, calc(var(--sw) * .88), calc(var(--sh) - 130px)); aspect-ratio: 1; margin: auto 0; background: rgba(255, 250, 240, .85); border: var(--line); border-radius: 30px; touch-action: none; }
.ring { position: absolute; border-radius: 50%; border: 4px dashed var(--ink); background: rgba(61, 220, 151, .18); transform: translate(-50%, -50%); }
.ring.on { border-style: solid; background: rgba(61, 220, 151, .5); }
.marble { position: absolute; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 32% 30%, #fff 0, #9D6BFF 38%, #4B2A99 100%); transform: translate(-50%, -50%); }
.tilt-help { font-size: 18px; font-weight: 600; text-align: center; max-width: 420px; }
.snap-grid { display: grid; gap: 12px; margin: auto 0; justify-content: center; }
.pick { width: var(--cell, 96px); height: var(--cell, 96px); display: grid; place-items: center; font-size: calc(var(--cell, 96px) * .5); border: var(--line); border-radius: 20px; background: var(--paper); transition: transform .08s, background .08s; line-height: 1; }
.pick.chosen { background: var(--grape); } .pick.hit { background: var(--mint); } .pick.miss { background: var(--coral); } .pick.missed { border-style: dashed; }
.twins { display: flex; gap: 16px; width: 100%; max-width: 560px; margin: auto 0; height: min(330px, calc(var(--sh) - 190px), calc((var(--sw) - 16px) / 2 / .86)); justify-content: center; }
.twins .mcard { flex: 0 1 auto; height: 100%; aspect-ratio: .86; background: var(--paper); border: var(--line); border-radius: 26px; box-shadow: 4px 6px 0 var(--ink); padding: 14px; }
.fish-row { display: flex; gap: 8px; margin: auto 0; transition: transform .2s; }
.fish-row svg { width: clamp(40px, calc(var(--sw) * .15), 84px); height: auto; }
.fixation { font-size: 40px; font-weight: 700; opacity: .5; margin: auto 0; }
.shapes { display: flex; gap: 16px; width: 100%; max-width: 560px; margin: auto 0; height: min(270px, calc(var(--sh) - 190px), calc((var(--sw) - 16px) / 2)); justify-content: center; }
.shapes .scard { flex: 0 1 auto; height: 100%; aspect-ratio: 1; background: var(--paper); border: var(--line); border-radius: 26px; box-shadow: 4px 6px 0 var(--ink); display: grid; place-items: center; }
.shapes svg { width: 78%; height: 78%; }
.drums { display: flex; gap: 6%; width: min(600px, calc(var(--sw) * .94), calc((var(--sh) - 210px) * 2.6)); margin: auto 0 0; justify-content: center; }
.drum { width: 44%; aspect-ratio: 1.25; border-radius: 50%; border: 4px solid var(--ink); background: var(--coral); box-shadow: 0 12px 0 var(--ink); display: grid; place-items: center; transition: transform .05s; position: relative; }
.drum::before { content: ''; position: absolute; inset: 10%; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.drum.r { background: var(--sky); } .drum.hit { transform: scale(.93); }
.drum .k { position: relative; font-size: 30px; font-weight: 700; opacity: .35; }
.big-count { font-size: clamp(56px, min(calc(var(--sw) * .16), calc(var(--sh) * .16)), 120px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }

/* results */
.results { gap: 14px; text-align: center; width: min(640px, 100%); }
.weigh { margin: auto; text-align: center; }
.weigh svg { width: 220px; animation: wobble .28s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: rotate(-6deg) translateY(4px); } to { transform: rotate(6deg) translateY(-4px); } }
.big-age { font-size: clamp(110px, 18vw, 150px); font-weight: 700; line-height: .9; text-shadow: 6px 7px 0 var(--accent, var(--mint)); font-variant-numeric: tabular-nums; }
.age-unit { font-size: 22px; font-weight: 600; opacity: .7; }
.res-head svg { width: 190px; height: auto; }
.band-head { font-size: 36px; margin: 6px 0 2px; }
.band-text { font-size: 20px; margin: 0 0 8px; text-wrap: balance; }
.delta { display: inline-block; padding: 5px 12px; border: 2.5px solid var(--ink); border-radius: 999px; font-weight: 700; background: var(--mint); }
.area-rows { display: grid; gap: 10px; width: 100%; text-align: left; }
.area-row { display: grid; grid-template-columns: 46px 1fr auto 20px; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: 3px 4px 0 var(--ink); cursor: pointer; font: inherit; color: inherit; text-align: left; width: 100%; }
.area-row:hover { transform: translateY(-1px); } .area-row:active { transform: translateY(3px); box-shadow: 1px 1px 0 var(--ink); }
.area-row img { width: 46px; height: 46px; }
.area-row .nm { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.area-row .bar-out { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: rgba(36, 24, 63, .1); margin-top: 6px; overflow: hidden; }
.area-row .bar-out i { display: block; height: 100%; border-radius: 999px; }
.area-row .age { text-align: right; line-height: .95; } .area-row .age b { display: block; font-size: 30px; } .area-row .age small { font-size: 12px; font-weight: 700; opacity: .7; }
.area-row .chev { opacity: .45; font-weight: 700; font-size: 22px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 7px; border: 1.5px solid var(--ink); border-radius: 999px; }
.tag.best { background: var(--mint); } .tag.train { background: var(--sun); }
.tap-hint { font-size: 15px; opacity: .65; margin: 6px 0 0; }
.scroll-hint { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 8; animation: bob 1.1s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translate(-50%, 0); } to { transform: translate(-50%, 8px); } }
.share-box { width: 100%; padding: 18px; background: var(--paper); border: var(--line); border-radius: 24px; box-shadow: 4px 6px 0 var(--ink); }
.share-box img.preview { width: 140px; border: var(--line); border-radius: 16px; float: left; margin: 0 16px 8px 0; }
.share-box h3 { font-size: 24px; text-align: left; }
.share-box .row-btns { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.share-box .row-btns .btn { font-size: 16px; line-height: 1.15; padding: 13px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; text-align: center; }
.share-box .row-btns .btn-sky { grid-column: 1 / -1; font-size: 20px; padding: 16px 18px; white-space: nowrap; }
.band-q { width: 100%; padding: 18px; background: var(--t-logic); border: var(--line); border-radius: 24px; }
.band-q p { margin: 0 0 10px; font-weight: 600; }
.band-q .opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.detail-games { display: grid; gap: 10px; margin: 12px 0; }
.detail-games > div > div { min-width: 0; }
.detail-games > div { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 2.5px solid var(--ink); border-radius: 18px; background: var(--paper); }
.detail-games img { width: 52px; height: 52px; }
.detail-games b { display: block; font-size: 18px; } .detail-games span { font-size: 15px; opacity: .8; }
.detail-games em { font-style: normal; font-weight: 700; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { order: -1; } .hero-art > svg { width: 210px; } .bubbles { display: none; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; } .related .cards { grid-template-columns: 1fr; }
  .share-in { grid-template-columns: 1fr; } .share-card { max-width: 300px; margin: 0 auto; }
  .app-in { grid-template-columns: 1fr; padding: 26px; } .app-icon { display: none; }
  .scale-row { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr; } .foot nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .nav a:not(.nav-test):not(.lang) { display: none; }
  .nav .nav-test { font-size: 15px; padding: 7px 11px; }
  .top-in { gap: 8px; } .brand { font-size: 20px; } .brand svg { width: 34px; height: 34px; }
  .brand span { font-size: 20px; }
  .area-grid { grid-template-columns: 1fr; }
  .pads { gap: 10px; } .pad .k { display: none; }
  .swatches { gap: 8px; } .swatch { height: 76px; } .swatch .k, .tile .k { display: none; }
  .answers { gap: 10px; } .answer { min-height: 78px; font-size: 21px; }
  .doctor-in { flex-direction: column; text-align: center; }
  .consent { flex-direction: column; align-items: stretch; }
}

/* brain-fun extras (English): "on par with" sticker and the brain's birthday */
@keyframes bb-fade-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.fade-up { animation: bb-fade-up .45s ease-out both; }
.par { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; max-width: min(460px, 94%); margin: 8px auto 6px; padding: 10px 18px 12px; background: var(--sun); border: 3px solid var(--ink); border-radius: 18px; transform: rotate(-2deg); text-align: center; color: var(--ink); }
.par small { font-size: 12px; font-weight: 700; letter-spacing: .1em; opacity: .7; }
.par b { font-size: 19px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
.bday { width: 100%; text-align: left; background: var(--paper); border: var(--line); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 16px 18px; display: grid; gap: 10px; }
.bday-top { display: flex; align-items: center; gap: 12px; }
.bday .cake { font-size: 38px; line-height: 1; }
.bday-top small { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; opacity: .65; }
.bday-top b { font-size: 21px; font-weight: 700; line-height: 1.2; }
.bday .era { margin: 0; font-size: 17px; font-weight: 500; }
.bday .fact { margin: 0; padding: 10px 12px; border-radius: 14px; background: rgba(255, 210, 63, .35); font-size: 16px; }
.share-copy .par { margin: 2px 0 14px; }
.share-copy .bday { max-width: 560px; margin: 4px 0 18px; }
@media (max-width: 900px) { .share-copy .par { margin: 2px auto 14px; } .share-copy .bday { margin: 4px auto 18px; } }
.intro-keys { margin: -6px 0 0; font-size: 16px; font-weight: 600; }
@media (hover: none) and (pointer: coarse) { .keys-hint:not(.touch-ok) { display: none; } }

/* ---------------------------------------------------------------- Math Age (/math) */
.math-stage { display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; min-height: 0; }
.math-problem { font-size: clamp(44px, min(calc(var(--sw, 560px) * .12), calc(var(--sh, 600px) * .11)), 72px); font-weight: 700; font-variant-numeric: tabular-nums; margin: auto 0 10px; white-space: nowrap; }
.math-answer { position: relative; min-width: 170px; padding: 10px 22px; text-align: center; font-size: 46px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; background: var(--paper); border: var(--line); border-radius: 20px; box-shadow: 2px 5px 0 var(--ink); }
.math-answer.empty span { opacity: .25; }
.math-answer.miss { background: #FFC6CE; }
.math-reveal { min-height: 36px; margin: 10px 0 0; padding: 2px 12px; font-size: 24px; font-weight: 700; border: 2px solid transparent; border-radius: 999px; visibility: hidden; }
.math-reveal.on { visibility: visible; background: var(--sun); border-color: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(420px, 100%); margin: auto 0 0; padding-top: 12px; }
.key { position: relative; height: clamp(46px, calc(var(--sh, 600px) * .085), 62px); border: var(--line); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); background: var(--paper); font: 700 26px/1 var(--fun); color: var(--ink); cursor: pointer; transition: transform .06s, box-shadow .06s; }
.key-alt { background: var(--lilac); font-size: 21px; }
.key:active, .key.down { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.key .kcap { position: absolute; right: 6px; bottom: 4px; font: 700 10px/1 var(--fun); opacity: .6; }
.ladder { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-weight: 700; font-size: 16px; }
.ladder i { width: 30px; height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.ladder i.on { background: var(--coral); }
.ladder span { margin-left: 4px; }
/* the intro card's demo window is 560x400: a compact copy, so the whole pad shows with room for its shadows */
.math-demo .stage { padding: 6px 14px 40px; }
.math-demo .math-problem { font-size: 46px; margin: 10px 0 8px; }
.math-demo .math-answer { font-size: 34px; padding: 4px 18px; min-width: 140px; }
.math-demo .math-reveal { display: none; }
.math-demo .keypad { width: 330px; gap: 8px; padding-top: 0; margin-top: 16px; }
.math-demo .key { height: 40px; font-size: 22px; box-shadow: 0 4px 0 var(--ink); }
.scale-strip { width: min(260px, 72%); margin: -2px auto 6px; }
.scale-strip .track { position: relative; height: 14px; margin: 4px 0; border: 2px solid var(--ink); border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--sun), var(--coral)); }
.scale-strip .knob { position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); }
.scale-strip .ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; font-weight: 700; opacity: .75; }
.math-row { grid-template-columns: 46px 1fr auto; cursor: default; }
.math-row:hover { transform: none; }
.math-row .badge { display: grid; place-items: center; width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 14px; font-weight: 700; font-size: 17px; }
.math-row .stat { font-size: 15px; opacity: .75; }
.math-signs { display: flex; gap: 12px; justify-content: center; }
.math-signs span { display: grid; place-items: center; width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); font-size: 28px; font-weight: 700; }
.ages-more { padding: 10px 0 30px; }
.math-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; background: #FFE6CF; border: var(--line); border-radius: 26px; box-shadow: 4px 6px 0 var(--ink); color: var(--ink); text-decoration: none; }
.math-card:hover { transform: translateY(-1px); }
.math-card h3 { margin: 0 0 4px; font-size: 28px; }
.math-card p { margin: 0; opacity: .8; }
.math-glyph { display: grid; grid-template-columns: 1fr 1fr; width: 72px; height: 72px; border: var(--line); border-radius: 18px; overflow: hidden; }
.math-glyph span { display: grid; place-items: center; font-size: 24px; font-weight: 700; }
@media (max-width: 640px) { .math-card { grid-template-columns: auto 1fr; } .math-card .btn { grid-column: 1 / -1; } }
