/* The app's brand tokens (tuitto/web/src/styles.css), so the website and
   the app look like one product. Follows the system's light or dark setting. */
@font-face {
  font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree Variable"; font-style: normal; font-display: swap; font-weight: 300 900;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url(/fonts/bricolage-grotesque-latin-ext-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque Variable"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url(/fonts/bricolage-grotesque-latin-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #1d6b55;
  --brand-strong: #165644;
  --brand-ink: #ffffff;
  --brand-soft: #e1efe9;
  --highlight: #f2c94c;
  --highlight-soft: #fdf3d3;
  --star: #d39200;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --sunken: #eef2f0;
  --ink: #15201c;
  --muted: #4f5c57;
  --line: #dbe3df;
  --shadow: 0 1px 2px rgba(21, 32, 28, 0.06), 0 8px 24px rgba(21, 32, 28, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --font: "Figtree Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque Variable", var(--font);
  --page: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #5cc19f;
    --brand-strong: #7dd3b5;
    --brand-ink: #0c1311;
    --brand-soft: #173029;
    --highlight-soft: #3a3214;
    --star: #f2c94c;
    --bg: #0d1311;
    --surface: #151d1a;
    --sunken: #111916;
    --ink: #e8efec;
    --muted: #a3b2ac;
    --line: #26322d;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1.125rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand-soft); }

h1, h2 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-stretch: 92%;
  line-height: 1.1; margin: 0 0 1rem; text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
/* Long words (Russian, Ukrainian, Polish) mustn't push a heading wider than a phone; only long ones are hyphenated. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; hyphenate-limit-chars: 12 5 5; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 0.4rem; font-weight: 700; }
p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; border-radius: var(--radius-sm); z-index: 20; }
.skip:focus { left: 0.5rem; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 1.25rem; }
.lead { font-size: 1.3rem; line-height: 1.55; color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.eyebrow { display: inline-block; font-weight: 700; color: var(--brand); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.5rem; border-radius: 999px; border: 2px solid var(--brand);
  font: inherit; font-weight: 700; font-size: 1.08rem; text-decoration: none; white-space: nowrap;
  color: var(--brand); background: transparent; transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.btn.small { min-height: 44px; padding: 0 1.1rem; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.brand { font-family: var(--font-display); font-weight: 750; font-size: 1.55rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 999px; }
.nav a:not(.btn):hover { background: var(--sunken); }
body[data-page="tutors"] .nav [data-nav="tutors"] { color: var(--brand); background: var(--brand-soft); }
.nav .end { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.menu { display: none; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { border-color: var(--brand); color: var(--brand); }
.menu .panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); padding: 0.75rem 1.25rem 1.25rem; display: grid; gap: 0.25rem; }
.menu .panel a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.15rem; padding: 0.75rem 0.5rem; border-bottom: 1px solid var(--line); }
.menu .panel .btn { margin-top: 0.75rem; }
@media (max-width: 820px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Sections */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 2.5rem; }
.section-head.center { text-align: center; margin-inline: auto; }

/* Hero */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .photo { position: relative; }
.photo img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero .badge {
  position: absolute; left: -1rem; bottom: -1.25rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 0.75rem 1rem; display: flex; gap: 0.75rem; align-items: center; font-weight: 600; font-size: 1rem; line-height: 1.35;
}
.badge .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); flex: none; }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.5rem; }
.checks li { display: flex; gap: 0.65rem; align-items: baseline; }
.checks li::before { content: "✓"; color: var(--brand); font-weight: 800; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .badge { left: 0.75rem; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; counter-increment: step; }
.alt .steps li { background: var(--bg); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem;
}
.steps.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .steps.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) { .steps, .steps.four { grid-template-columns: 1fr; } }

/* Text beside a photo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip .photo { order: 2; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .photo { order: 0; }
}

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.alt .feature { background: var(--bg); }
.feature .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.feature .icon svg { width: 26px; height: 26px; }
.feature p { color: var(--muted); font-size: 1.05rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }

/* Subjects */
.subjects { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.subjects a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.25rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
}
.subjects a:hover { border-color: var(--brand); color: var(--brand); }
.note { text-align: center; margin-top: 1.5rem; }

/* Trust list */
.points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.1rem; }
.points li { padding-left: 1.1rem; border-left: 4px solid var(--brand); }
.points strong { display: block; }
.points span { color: var(--muted); }

/* Questions */
.faq { max-width: 46rem; margin: 0 auto; display: grid; gap: 0.75rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 1.25rem; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--brand); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.25rem 1.2rem; color: var(--muted); }

/* Call to action */
.cta { text-align: center; background: var(--brand); color: var(--brand-ink); border-radius: var(--radius); padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.cta p { max-width: 34em; margin-inline: auto; font-size: 1.2rem; opacity: 0.92; }
.cta .actions { justify-content: center; }
.cta .btn { border-color: var(--brand-ink); color: var(--brand-ink); }
.cta .btn:hover { background: color-mix(in srgb, var(--brand-ink) 14%, transparent); color: var(--brand-ink); }
.cta .btn.primary { background: var(--brand-ink); color: var(--brand); }
.cta .btn.primary:hover { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; font-size: 1rem; color: var(--muted); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2rem 4rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }
.site-footer .credits { margin-top: 2rem; font-size: 0.9rem; }
.site-footer .switch { margin-top: 2rem; display: grid; gap: 0.6rem; font-size: 0.95rem; }
.site-footer .switch nav { gap: 0.35rem 1rem; align-items: baseline; }
.site-footer .switch span { color: var(--muted); font-weight: 600; margin-right: 0.25rem; }
.site-footer .switch a { font-weight: 500; }
.site-footer .switch a[aria-current] { font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 0.2em; }

/* 404 */
.notfound { min-height: 55vh; display: grid; place-items: center; text-align: center; }

/* Legal pages: one readable column */
.legal .wrap { max-width: 50rem; }
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0 4rem; }
.legal-head { margin-bottom: 2rem; }
.legal section { padding: 0; margin-top: 2.75rem; }
.legal h2 { font-size: 1.6rem; }
.legal li { margin-bottom: 0.4rem; }
.legal ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.summary { background: var(--brand-soft); border-radius: var(--radius); padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; }
.summary h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.summary.kids { background: var(--highlight-soft); }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.75rem; margin-top: 2rem; background: var(--surface); }
.toc h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.toc ol { columns: 2 16rem; column-gap: 2rem; margin: 0; padding-left: 1.3rem; }
.toc li { margin-bottom: 0.2rem; break-inside: avoid; }
.table { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.table table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { background: var(--sunken); font-weight: 700; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; padding: 0.15rem 0; border: 0; }
  .table td + td { color: var(--muted); }
}
mark.todo { background: #ffe08a; color: #4a3500; padding: 0 0.3em; border-radius: 4px; font-weight: 600; }
