@font-face {
  font-family: Nunito;
  src: url("/assets/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  --ink: #193329;
  --muted: #52655a;
  --green: #006b36;
  --line: #d2dcd0;
  --paper: #fafaf5;
  --mint: #e2eddc;
  color-scheme: light;
  font: 100%/1.55 Nunito, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.wrap { width: min(100% - 3rem, 74rem); margin-inline: auto; }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #005ab5; outline-offset: 4px; }
.skip { position: absolute; z-index: 5; background: white; left: .75rem; top: .75rem; padding: .5rem; transform: translateY(-180%); }
.skip:focus { transform: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; text-wrap: balance; }
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap, .site-header nav, .site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.site-header .wrap { min-height: 5rem; padding-block: .7rem; }
.logo { display: block; max-width: 100%; width: 8.8rem; height: auto; }
.site-header a { font-weight: 800; color: var(--ink); text-decoration: none; }
.site-header a:hover, .crumb a:hover { text-decoration: underline; }
.nav-lesson { padding: .52rem .9rem; border: 1px solid var(--green); border-radius: 2rem; }
.nav-lesson span { margin-left: .2rem; }
.hero { margin-top: 1.75rem; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border: 1px solid var(--line); background: #e4efe0; border-radius: 1.4rem; }
.hero > div:first-child { padding: clamp(2rem, 5vw, 4.5rem); align-self: center; }
.hero h1 { font-size: clamp(3.4rem, 6.8vw, 6.3rem); letter-spacing: -.065em; line-height: .94; }
.hero p { max-width: 31rem; margin: 1.4rem 0; font-size: 1.1rem; }
.primary { display: inline-flex; gap: 1rem; border-radius: 2rem; padding: .78rem 1.15rem; background: #05572c; color: white; text-decoration: none; font-weight: 750; }
.illustration { display: grid; place-items: center; background: #e8edb8; }
.illustration img { width: min(90%, 33rem); height: auto; }
#catalogue { padding: clamp(2.25rem, 5vw, 4rem) 0 3rem; }
.catalogue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.catalogue-head h2, .catalogue-head h1 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.045em; }
.result-count, .card-meta { color: var(--muted); }
.result-count { flex-shrink: 0; font-weight: 700; }
.filters { display: flex; align-items: flex-start; gap: 1rem; margin-block: 1.5rem; }
.search { flex: 1; max-width: 33rem; }
.search label { display: block; font-weight: 800; font-size: .91rem; margin-bottom: .3rem; }
.search input, .subjects summary { border: 1px solid #8ea394; border-radius: .65rem; background: white; color: var(--ink); font: inherit; padding: .66rem .9rem; }
.search input { width: 100%; }
.subjects { flex: 1; max-width: 32rem; position: relative; }
.search:not([hidden]) + .subjects { margin-top: 1.71rem; }
.subjects summary { cursor: pointer; font-weight: 750; }
.subjects nav { position: absolute; z-index: 2; inset: calc(100% + .35rem) 0 auto; max-height: 22rem; overflow: auto; background: white; border: 1px solid var(--line); padding: .45rem; border-radius: .65rem; box-shadow: 0 8px 20px #173d271a; }
.subjects a { display: flex; justify-content: space-between; gap: .6rem; text-decoration: none; padding: .55rem .65rem; }
.subjects a:hover { background: var(--mint); }
.subjects small { color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { border: 1px solid var(--line); background: #fff; border-radius: .95rem; }
.card:has(a:hover) { border-color: var(--green); }
.card a { height: 100%; border-radius: inherit; display: flex; flex-direction: column; padding: 1.3rem; text-decoration: none; color: var(--ink); }
.subject-name { font-size: .81rem; color: var(--green); font-weight: 850; }
.card h3 { margin: .8rem 0 .55rem; font-size: 1.45rem; letter-spacing: -.025em; }
.card a:hover h3 { text-decoration: underline; text-decoration-thickness: .08em; }
.card p { color: var(--muted); margin: 0 0 1.25rem; }
.card-meta { display: flex; justify-content: space-between; margin-top: auto; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .88rem; font-weight: 700; }
.card-meta span { color: var(--green); }
#empty { margin: 1.5rem 0; }
#clear { font: inherit; padding: .3rem .7rem; margin: .2rem; border: 1px solid var(--green); border-radius: .4rem; color: var(--green); background: white; cursor: pointer; }
.crumb { margin-top: 2rem; display: flex; gap: .55rem; flex-wrap: wrap; }
.crumb a { color: var(--green); }
.course-header, .message { padding: 2.5rem 0; max-width: 54rem; }
.course-header h1, .sample-lesson h1, .message h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); letter-spacing: -.055em; }
.course-header > p { margin: 1rem 0; font-size: 1.25rem; color: var(--muted); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 0; padding: 0; }
.facts li { font-size: .9rem; font-weight: 750; padding: .32rem .75rem; background: var(--mint); border-radius: 1.2rem; }
.course-body { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.course-body section { margin-bottom: 1.8rem; }
.course-body h2, .sample-lesson h2 { font-size: 1.72rem; margin-bottom: .75rem; }
.course-body ul, .modules { padding-left: 1.45rem; }
.course-body li { margin-block: .48rem; }
.modules li { padding-left: .25rem; padding-bottom: .8rem; }
.modules h3 { font-size: 1.1rem; margin: .2rem 0 .35rem; }
.sample-lesson { max-width: 45rem; margin: 3.5rem auto; }
.sample-lesson h1 { margin: .55rem 0 1.2rem; }
.sample-lesson h2 { margin-top: 2.4rem; }
.sample-lesson p { margin: .8rem 0; }
.sample-lesson pre { padding: 1rem 1.3rem; background: #182d24; color: #f5fff2; border-radius: .65rem; overflow-x: auto; }
.sample-lesson details { border: 1px solid var(--line); background: white; border-radius: .65rem; padding: .8rem 1rem; margin: .75rem 0; }
.sample-lesson summary { cursor: pointer; font-weight: 800; }
.message p { margin: 1rem 0; }
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.site-footer .wrap { padding: 1.6rem 0; color: var(--muted); font-size: .88rem; flex-wrap: wrap; }
.site-footer .wrap span:first-child { font-size: 1rem; font-weight: 850; color: var(--ink); }
@media (max-width: 56rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-body { grid-template-columns: 1fr; gap: .5rem; }
}
@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2rem); }
  .site-header .wrap, .site-header nav { gap: .65rem; }
  .site-header .wrap { min-height: 4rem; }
  .logo { width: 6.7rem; }
  .site-header nav { font-size: .88rem; }
  .nav-lesson { padding: .4rem .65rem; }
  .hero { grid-template-columns: 1fr; }
  .hero > div:first-child { padding: 1.65rem; }
  .illustration img { width: min(55%, 13rem); }
  .filters { flex-direction: column; gap: .65rem; }
  .search, .subjects { width: 100%; max-width: none; }
  .search:not([hidden]) + .subjects { margin-top: 0; }
  .catalogue-head { flex-wrap: wrap; gap: .4rem 1rem; }
  .cards { grid-template-columns: 1fr; }
}

/* Public catalogue and free reader. */
:root {--ink:#eff5e9;--muted:#becbb8;--line:#3e4d40;--paper:#111611;--mint:#28382a;--green:#c4ee8a;color-scheme:dark}
.site-header {background:#101510}.site-header .logo {filter:brightness(0) invert(1)}
.card a,.subjects nav,.subjects summary,.search input,.sample-lesson details,.illustration {background:#1f2a21;color:var(--ink)}
.primary {background:#b3ee52;color:#17230f}
.sample-lesson {max-width:47rem;padding:clamp(22px,5vw,52px);background:#1b231d;border:1px solid var(--line);border-radius:14px}
.sample-lesson h1 {font-size:clamp(2.3rem,5vw,4rem);letter-spacing:-.052em;line-height:1.06}
.sample-lesson p {font-size:1.08rem;line-height:1.7;color:#dce5d7}
.sample-lesson>p:first-child {font-size:.88rem;color:var(--green);font-weight:750}
.sample-lesson pre {background:#0d1510;border:1px solid #415345;color:#dcf5c7}
