:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --surface: #fffdf7;
  --ink: #162824;
  --muted: #4f6058;
  --forest: #12352e;
  --green: #355f50;
  --gold: #f1cd83;
  --line: #dcded2;
  --section-space: clamp(2.6rem, 6vw, 5.5rem);
  --card-space: clamp(1rem, 2.4vw, 1.6rem);
  --card-radius: .85rem;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; }
h1 { font-size: clamp(2.45rem, 6.6vw, 6.15rem); letter-spacing: -.066em; }
h1 em { display: block; color: var(--green); }
h2 { font-size: clamp(2rem, 4.5vw, 4rem); letter-spacing: -.052em; text-wrap: balance; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -.025em; }
h2 + p, h3 + p { margin-top: .85rem; }
.wrap { width: min(1240px, calc(100% - 4rem)); margin-inline: auto; }
.site-header, .footer { display: flex; align-items: center; justify-content: space-between; gap: .6rem 2rem; padding-block: 1rem; }
.site-header { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.1rem; text-decoration: none; font-size: .92rem; font-weight: 740; }
.brand-mark {
  flex: 0 0 1.15rem;
  aspect-ratio: 1;
  border: 1px solid var(--green);
  border-radius: .22rem;
  background: conic-gradient(var(--green) 25%, #c5d8cc 0 50%, var(--green) 0 75%, #c5d8cc 0);
}
nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.85rem, 3vw, 2rem); }
nav a { display: grid; align-items: center; min-height: 44px; text-decoration: none; font-size: .88rem; font-weight: 600; }
nav a:hover { text-decoration: underline; text-underline-offset: .25em; }

.hero { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6.5vw, 6.5rem); }
.eyebrow { margin-bottom: .9rem; color: var(--green); font-size: .73rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.lede { max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.hero .lede { margin-block: 1.45rem 1.7rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.3rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.35rem; min-height: 50px; padding: .7rem 1.05rem; border-radius: .65rem; background: var(--forest); color: var(--surface); font-weight: 690; text-decoration: none; transition: background-color .2s, transform .2s; }
.button span { color: var(--gold); }
.button:hover { background: #215145; transform: translateY(-2px); }
.text-link { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding-block: .5rem; font-size: .92rem; font-weight: 690; text-underline-offset: .25em; }
.hero-proof { display: inline-block; margin-top: 1.35rem; color: var(--muted); font-size: .82rem; text-decoration-color: #8d9b8d; text-underline-offset: .25em; }
.dark-panel {
  border-radius: 1.35rem;
  background: radial-gradient(ellipse at top right, #28564a, transparent 75%), var(--forest);
  color: var(--surface);
}
.grid-panel {
  --grid-line: #ffffff0d;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
}
.showcase { display: grid; gap: 1.15rem; padding: clamp(1.25rem, 3.3vw, 2.65rem); box-shadow: 0 22px 50px #122d2425; }
.showcase .eyebrow { margin: 0; color: var(--gold); }
.board-frame { display: grid; place-items: center; padding: clamp(.6rem, 2vw, 1.3rem); border: 1px solid #ffffff28; border-radius: .85rem; background-color: #45766532; }
.showcase img { width: min(75%, 252px); transition: filter .25s; }
.showcase:has(.hint[open]) img { filter: drop-shadow(0 0 8px #f1cd8370); }
.showcase h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); text-wrap: initial; }
.showcase h2 + p { margin-top: .55rem; color: #e2e9dc; }

.section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 5rem);
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}
.section h2 { text-wrap: initial; }
.section .lede { margin-top: 1.1rem; }
#about { align-items: center; }
.credentials, .topics { list-style: none; margin: 0; padding: 0; }
.credentials {
  --grid-line: #355f5012;
  display: grid;
  gap: .7rem;
  padding: clamp(.65rem, 1.6vw, 1rem);
  border: 1px solid #cbd6c9;
  border-radius: 1.1rem;
  background-color: #edf0e7;
}
.content-card {
  padding: var(--card-space);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
}
.credentials .content-card { border-inline-start: 3px solid #a77b35; }
.credentials strong { display: block; font: 400 clamp(1.4rem, 2.5vw, 2rem)/1.12 var(--serif); letter-spacing: -.025em; }
.credentials p { margin-top: .45rem; color: var(--muted); font-size: .88rem; }
#lessons {
  align-items: center;
  padding: clamp(1.35rem, 5vw, 4rem);
  border-top: 0;
}
#lessons .lede, .formats article p { color: #e2e9dc; }
.formats {
  display: grid;
  gap: .7rem;
  padding: clamp(.6rem, 2vw, 1.2rem);
  border: 1px solid #ffffff28;
  border-radius: 1rem;
}
.formats .content-card { border-color: #ffffff35; background: #173b34; }
.topics { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.topics li { padding: .2rem .65rem; border: 1px solid #b5d0be55; border-radius: 2rem; color: #e2e9dc; font-size: .84rem; }
#problems { grid-template-columns: minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2rem); border-top: 0; }
.problems { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.problems .content-card {
  border-top: 3px solid #759383;
  box-shadow: 0 8px 24px #16282408;
}
.problems article > .eyebrow { margin-bottom: .65rem; }
.problems article > h3 + p { margin-bottom: 1.05rem; color: var(--muted); }
@media (max-width: 870px) {
  .problems { grid-template-columns: minmax(0, 1fr); }
}
.reveal {
  --reveal-border: #dcd2ba;
  --reveal-fill: #f9f4e8;
  --reveal-hover: #f4ead4;
  --reveal-ink: #594718;
  --reveal-rule: #a77b35;
  margin-top: .5rem;
  border: 1px solid var(--reveal-border);
  border-radius: .7rem;
  background: var(--reveal-fill);
  color: var(--reveal-ink);
  transition: border-color .2s, background-color .2s;
}
.reveal.solution {
  --reveal-border: #cddbd0;
  --reveal-fill: #f0f5ef;
  --reveal-hover: #e6efe5;
  --reveal-ink: #254b3b;
  --reveal-rule: #648d73;
}
.showcase .reveal {
  --reveal-border: #f1cd8352;
  --reveal-fill: #ffffff0a;
  --reveal-hover: #ffffff14;
  --reveal-ink: var(--gold);
  --reveal-rule: var(--gold);
  margin-top: 1rem;
}
.reveal[open] { border-color: var(--reveal-rule); }
.reveal:has(summary:hover) { background: var(--reveal-hover); }
.reveal summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  min-height: 46px;
  padding: .5rem .7rem .5rem .9rem;
  border-radius: inherit;
  list-style: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::after {
  content: "";
  width: 1.65rem;
  aspect-ratio: 1;
  border: 1px solid var(--reveal-border);
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / .55rem 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px .55rem no-repeat;
  transition: background-size .22s, transform .22s;
}
.reveal[open] summary::after {
  background-size: .55rem 1px, 1px 0;
  transform: rotate(180deg);
}
.reveal-body { padding: 0 .9rem .9rem; }
.reveal-body p {
  padding: .1rem 0 .1rem .75rem;
  border-inline-start: 2px solid var(--reveal-rule);
  color: var(--ink);
  font-size: .94rem;
}
.showcase .reveal-body p { color: #e2e9dc; }

@supports selector(details::details-content) and (interpolate-size: allow-keywords) {
  .reveal { interpolate-size: allow-keywords; }
  .reveal::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: block-size .28s cubic-bezier(.2, .75, .25, 1), opacity .2s ease,
      content-visibility .28s allow-discrete;
  }
  .reveal[open]::details-content { block-size: auto; opacity: 1; }
}
.contact {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3.5rem);
  margin-block: .5rem 2rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}
#schools .lede { margin-top: 0; }
.contact-intro h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); text-wrap: initial; }
.contact-intro p { color: #e2e9dc; }
.contact-links { display: grid; gap: .75rem; }
.contact-telegram { border: 1px solid #f1cd8352; background: #ffffff0d; }
.contact-telegram:hover { background: #ffffff19; }
.contact-details {
  display: grid;
  gap: .55rem;
  margin: 0;
}
.contact-details div {
  display: grid;
  gap: .18rem;
  min-width: 0;
  padding: .65rem 1.05rem .75rem;
  border: 1px solid #ffffff26;
  border-radius: .65rem;
  background: #ffffff08;
}
.contact-details dt { color: #c5d8cc; font-size: .78rem; font-weight: 650; }
.contact-details dd { margin: 0; overflow-wrap: anywhere; font-size: .95rem; font-weight: 550; }
@media (max-width: 960px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
}
.footer { border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 2rem); }
  .hero, .section { grid-template-columns: 1fr; }
  .about-copy, #schools, .contact-intro { text-align: center; }
  .about-copy .lede, #schools .lede { margin-inline: auto; }
  .about-copy h2, #schools h2 { text-wrap: balance; }
  #schools { gap: 1rem; }
  .hero { padding-top: 2.65rem; }
  h1 { max-width: 13ch; font-size: clamp(2.55rem, 8.5vw, 4.5rem); }
  h2 { text-wrap: initial; }
  .showcase img { width: min(66%, 220px); }
}
@media (max-width: 420px) {
  .site-header { gap: .45rem; padding-bottom: .35rem; }
  nav { width: 100%; justify-content: space-between; gap: .35rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .button { width: 100%; }
  .hero-proof { margin-top: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, .reveal::details-content { transition: none !important; }
}
