/* MathGusto site. Colours and type from the app theme
   (src/framework/design/theme/mathgusto.tsx); Greek falls back per glyph to
   M PLUS Rounded 1c / Commissioner, as the app does (theme/localize.ts). */
:root {
  --paper: #E9E7E0;
  --card: #F6F5F1;
  --white: #FFFFFF;
  --ink: #302F2D;
  --muted: #5B5955;
  --border: #D3D0C7;
  --coral: #D16A5D; --coral-tint: #F6E1DF; --coral-deep: #A94E42;
  --mustard: #D8A644; --mustard-tint: #F7EDDA; --mustard-deep: #996C13;
  --sage: #87A982; --sage-tint: #E7EEE6; --green: #577E51; --green-ink: #3D5C39;
  --sky: #7196B9; --sky-tint: #E3EAF1; --sky-deep: #4A78A3; --sky-ink: #325679;
  --lilac: #80618F; --lilac-tint: #E6DFE9;
  --display: Fredoka, 'M PLUS Rounded 1c', 'Trebuchet MS', sans-serif;
  --text: Lexend, Commissioner, 'Segoe UI', system-ui, sans-serif;
  --r-md: 16px; --r-lg: 24px; --r-xl: 30px;
  --wrap: 1160px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--text);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 700px) { .wrap { padding-left: 32px; padding-right: 32px; } }
.center { text-align: center; }
.small { font-size: .9rem; color: var(--muted); }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--ink); max-width: 38em; }
.lead-s { color: var(--muted); max-width: 40em; margin-left: auto; margin-right: auto; }
.eyebrow { font: 600 .95rem/1.2 var(--text); color: var(--coral-deep); letter-spacing: .04em; text-transform: uppercase; margin-bottom: .6em; }
:lang(el) .eyebrow { text-transform: none; letter-spacing: 0; } /* Greek uppercase would need accents dropped */
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(233, 231, 224, .94); border-bottom: 1px solid rgba(48, 47, 45, .08); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(233, 231, 224, .82); backdrop-filter: blur(8px); } }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo .word { font: 600 1.45rem/1 Fredoka, 'Trebuchet MS', sans-serif; letter-spacing: -.01em; }
.logo .g { color: #B9554A; } .logo .u { color: #A9802A; } .logo .s { color: #5E8A5A; } .logo .t { color: #4F78A0; } .logo .o { color: var(--lilac); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav .inline { display: none; gap: 4px; }
.main-nav a, .langs a { display: inline-block; padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.main-nav a:hover, .langs a:hover { background: var(--card); }
.main-nav a[aria-current="page"] { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--border); }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; font-weight: 500; min-height: 44px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--card); }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.menu[open] ul { position: absolute; right: 16px; left: 16px; top: 64px; background: var(--card); border-radius: var(--r-lg); padding: 8px; box-shadow: 0 10px 30px rgba(48, 47, 45, .15); }
.menu[open] li a { display: block; padding: 12px 16px; border-radius: 12px; }
.langs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.langs a { padding: 8px 8px; font-size: .95rem; min-height: 44px; display: inline-flex; align-items: center; }
.langs a[aria-current="true"] { background: var(--ink); color: var(--white); }
.lang-long { display: none; }
@media (min-width: 980px) {
  .menu { display: none; }
  .main-nav .inline { display: flex; }
}
@media (min-width: 1180px) {
  .lang-long { display: inline; } .lang-short { display: none; }
  .langs a { padding: 8px 12px; }
}

/* buttons, store badges */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 26px; border-radius: 999px; background: var(--green); color: var(--white); font: 600 1.05rem/1.2 var(--text); text-decoration: none; box-shadow: 0 4px 0 var(--green-ink); margin: 0 8px 8px 0; }
.button:hover { color: var(--white); filter: brightness(1.05); }
.button.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 12px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 14px; background: var(--ink); color: var(--white); font: 600 1.1rem/1.1 var(--text); opacity: .92; cursor: default; }
.store small { display: block; font-size: .72rem; font-weight: 500; color: #D6D3CB; letter-spacing: .02em; margin-bottom: 2px; }
.more { font-weight: 600; text-decoration: none; color: var(--green); }
.more::after { content: ' →'; }
.more:hover { text-decoration: underline; color: var(--green-ink); }

/* hero */
.hero { position: relative; overflow: hidden; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 80% 60%; }
.hero-text { padding-top: 24px; padding-bottom: 40px; }
@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column-reverse; }
  .hero-art img { aspect-ratio: 4 / 3; object-position: 92% 70%; }
}
@media (min-width: 900px) {
  .hero { min-height: min(820px, 64vw); display: flex; align-items: center; }
  .hero-art { position: absolute; inset: 0; }
  .hero-art img { height: 100%; aspect-ratio: auto; object-position: 70% 35%; }
  .hero-text { position: relative; width: 100%; padding-top: 48px; padding-bottom: 120px; }
  .hero-text > * { max-width: 30rem; }
  .hero-text h1 { max-width: 13em; }
}

/* sections */
main > section { padding: 56px 0; }
main > section.hero { padding: 0; }
@media (min-width: 900px) { main > section { padding: 80px 0; } }
.band { background: var(--card); }
.band .card { background: var(--white); }
.card { background: var(--card); border-radius: var(--r-lg); padding: 24px; }
.features { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 800px) { .features { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.features h3 { color: var(--ink); }
.features p { margin: 0; color: var(--muted); }

.showcase-row { display: flex; gap: 24px; align-items: flex-end; justify-content: center; }
.showcase-row .tablet { flex: 1 1 auto; max-width: 760px; }
.showcase-row .phone { flex: 0 0 auto; width: 210px; }
@media (max-width: 699px) { .showcase-row .phone { display: none; } }
.caption { text-align: center; color: var(--muted); margin-top: 16px; font-size: .95rem; }
.device { margin: 0; background: var(--ink); padding: 10px; border-radius: 26px; box-shadow: 0 18px 40px -18px rgba(48, 47, 45, .45); }
.device img { border-radius: 16px; width: 100%; }
.device.phone { padding: 7px; border-radius: 30px; }
.device.phone img { border-radius: 24px; }
.two { display: grid; gap: 24px; }
@media (min-width: 800px) { .two { grid-template-columns: 1fr 1fr; gap: 32px; } }

.split { display: grid; gap: 24px; align-items: center; margin: 0 0 56px; }
.split:last-child { margin-bottom: 0; }
.split-art img { border-radius: var(--r-xl); width: 100%; }
.split-art .device { max-width: 640px; margin: 0 auto; }
.split-text > :last-child { margin-bottom: 0; }
@media (min-width: 860px) {
  .split { grid-template-columns: 5fr 6fr; gap: 56px; margin-bottom: 80px; }
  .split.reverse .split-art { order: 2; }
}
.split-text p, .split-text li { color: var(--ink); }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 34px; margin-bottom: .7em; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .22em; width: 22px; height: 22px; border-radius: 50%; background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }

.grade-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
@media (min-width: 700px) { .grade-list { grid-template-columns: 1fr 1fr; } }
.grade-list li { display: flex; gap: 18px; align-items: flex-start; }
.grade-list .badge { width: 72px; height: 72px; flex: none; border-radius: 18px; }
.grade-list p { margin: 0; color: var(--muted); }

/* CTA */
.cta { background: var(--sage-tint); }
.cta-inner { display: flex; gap: 24px; align-items: center; }
.cta-inner .gus { flex: none; }
.cta h2 { margin-bottom: .3em; }
@media (max-width: 600px) { .cta-inner { flex-direction: column; align-items: flex-start; } }

/* inner pages */
.page-head { padding-top: 48px; }
main > section.page-head { padding-bottom: 24px; }
.with-art { display: grid; gap: 24px; align-items: center; }
.with-art .head-art { border-radius: var(--r-xl); max-width: 380px; width: 100%; }
@media (min-width: 860px) { .with-art { grid-template-columns: 3fr 2fr; } .with-art .head-art { justify-self: end; } }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 800px) { .steps { grid-template-columns: 1fr 1fr; gap: 24px; } }
.steps li { counter-increment: step; position: relative; padding-top: 72px; }
.steps li::before { content: counter(step); position: absolute; top: 22px; left: 24px; width: 38px; height: 38px; border-radius: 50%; background: var(--coral); color: var(--white); font: 600 1.15rem/38px var(--display); text-align: center; }
.steps h2 { font-size: 1.45rem; }
.steps p:last-child { margin-bottom: 0; }
.levels { list-style: none; padding: 0; margin: 32px 0 16px; display: grid; gap: 16px; }
@media (min-width: 700px) { .levels { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .levels { grid-template-columns: repeat(4, 1fr); } }
.levels svg { margin-bottom: 12px; }
.levels p { margin: 0; color: var(--muted); font-size: .95rem; }
.curricula { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 16px; }
@media (min-width: 900px) { .curricula { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.curricula li { border-top: 8px solid var(--sky); }
.curricula .cur-cy { border-top-color: var(--coral); }
.curricula .cur-us { border-top-color: var(--sky); }
.curricula .cur-own { border-top-color: var(--sage); }
.tag { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .4em; }
.curricula h2 { font-size: 1.5rem; }
.curricula p:last-child { margin-bottom: 0; }
.lang-cards { list-style: none; padding: 0; margin: 32px 0 16px; display: grid; gap: 16px; }
@media (min-width: 800px) { .lang-cards { grid-template-columns: repeat(3, 1fr); } }
.lang-cards p { margin: 0; color: var(--muted); }
.faq h2 { margin-bottom: 24px; }
.faq details { margin-bottom: 12px; padding: 0; }
.faq summary { cursor: pointer; padding: 18px 24px; font-weight: 600; list-style: none; position: relative; padding-right: 56px; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font: 600 1.5rem/1 var(--display); color: var(--green); }
.faq details[open] summary::after { content: '–'; }
.faq details > p { padding: 0 24px; color: var(--ink); }
.faq details > p:last-child { padding-bottom: 20px; margin-bottom: 0; }
.nf .gus { margin: 0 auto 16px; }
.nf .lead { margin-left: auto; margin-right: auto; }

/* legal */
.draft { background: var(--mustard-tint); border-bottom: 2px solid var(--mustard); padding: 14px 0; font-size: .98rem; }
.draft strong { color: var(--mustard-deep); margin-right: .3em; }
.legal { max-width: 820px; padding-top: 40px; padding-bottom: 64px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2em; }
.legal h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: .4em; }
.legal .summary { margin: 24px 0; }
.legal .summary > :last-child { margin-bottom: 0; }
.legal .summary ul { margin: 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 0 0 1em; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { font-weight: 600; background: var(--card); }
.toc ol { columns: 2 220px; padding-left: 1.4em; margin: 0 0 1em; }
.toc li { margin-bottom: .3em; }
.todo { background: var(--mustard-tint); border-radius: 6px; padding: 0 4px; font-style: normal; }

/* footer */
.site-footer { background: var(--ink); color: #D6D3CB; padding: 48px 0 32px; font-size: .95rem; }
.site-footer a { color: var(--white); }
.site-footer .logo { color: var(--white); }
.site-footer .logo .g { color: #F0A79C; } .site-footer .logo .u { color: #F2C96B; } .site-footer .logo .s { color: #A9C8A4; } .site-footer .logo .t { color: #A7C3DE; } .site-footer .logo .o { color: #C3A9CF; }
.foot-top { display: grid; gap: 32px; }
@media (min-width: 800px) { .foot-top { grid-template-columns: 2fr 1.4fr 1.6fr; } }
.foot-brand p { margin-top: 12px; max-width: 22em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer nav li { margin-bottom: 4px; }
.site-footer nav a, .foot-langs a { display: inline-block; padding: 6px 0; text-decoration: none; }
.site-footer nav a:hover, .foot-langs a:hover { text-decoration: underline; }
.foot-langs { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.fine { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid #4A4946; font-size: .85rem; color: #BDBAB2; }
.fine a { color: #D6D3CB; }

@media (prefers-reduced-motion: no-preference) {
  .button, .store, .main-nav a, .langs a { transition: background-color .15s, filter .15s; }
}
@media print {
  .site-header, .site-footer, .cta, .stores { display: none; }
  body { background: #fff; }
}
