:root {
  color-scheme: light;
  --ink: #172b24;
  --quiet: #4b6257;
  --paper: #f7faf6;
  --line: #cfdad0;
  --forest: #204d3e;
  --brass: #ffdb91;
  --display: Georgia, "Times New Roman", serif;
  font: 16px/1.5 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #9f4e30; outline-offset: 4px; }
.atlas :focus-visible { outline-color: #fff; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: absolute; top: 8px; left: 8px; padding: 10px 14px; color: #fff; background: #183b30; transform: translateY(-160%); z-index: 3; }
.skip-link:focus { transform: none; }
.site-header { background: #fcfdfb; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; }
.brand { display: inline-flex; align-items: center; min-width: 0; min-height: 44px; }
.brand img { display: block; width: min(100%, 260px); height: auto; }
.site-header nav, .site-footer a:not(.brand) { flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; gap: 23px; }
.site-header nav a, .site-footer a:not(.brand) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 680; text-decoration: none; }
.site-header nav a:hover, .site-footer a:not(.brand):hover { text-decoration: underline; }
.header-catalog { color: #285e4a; }
.school-link { color: #526457; }

.atlas { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 470px; padding-block: 46px 55px; color: #fffdf4; background: #102923; overflow: clip; }
.atlas-art, .atlas::after { position: absolute; inset: 0; z-index: -2; }
.atlas-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 60% 13%; }
.atlas::after { content: ""; z-index: -1; background: linear-gradient(90deg, #092620ef, #092620b0 33%, #09262021 62%, transparent 80%); }
.atlas-inner { display: grid; gap: 16px; justify-items: start; }
.atlas-kicker, .overline { text-transform: uppercase; font-size: 12px; font-weight: 760; }
.atlas-kicker { color: #ffe0a5; display: flex; align-items: center; gap: 9px; }
.atlas-kicker::before { content: ""; width: 25px; height: 1px; background: currentColor; }
.atlas h1 { font: 82px/.99 var(--display); }
.atlas h1 em { display: block; color: #ffdfa4; font-weight: 400; }
.atlas-summary { max-width: 32ch; font-size: 20px; color: #fffbef; }
.atlas-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 5px; }
.atlas-actions > span { color: #ffefcc; font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 9px 14px; border-radius: 6px; border: 1px solid transparent; text-decoration: none; text-align: center; font-weight: 730; }
.button-brass { background: var(--brass); color: #2e2718; }
.button-brass:hover { background: #ffebba; }
.button-outline { background: transparent; border-color: #587e67; color: #1f4d37; }
.button-outline:hover { background: #dcebe0; }
.atlas-caption { position: absolute; inset: auto max(32px, calc((100% - 1200px) / 2)) 18px auto; display: flex; gap: 8px; align-items: center; padding: 4px 9px; background: #102923e8; border: 1px solid #d1c39d70; border-radius: 5px; font-size: 12px; color: #fbe3b0; }
.atlas-caption span { width: 6px; height: 6px; background: #fbcf82; transform: rotate(45deg); }

.catalog { padding-block: 31px 48px; scroll-margin-top: 14px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px 18px; margin-bottom: 17px; }
.overline { color: #536d5c; margin-bottom: 4px; }
.catalog h2, .school-band h2 { font: 44px/1.06 var(--display); }
.catalog-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #ebf2eb; }
.catalog-views button, .catalog-subjects button, .catalog-pages button { min-height: 44px; min-width: 44px; padding: 7px 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 14px; font-weight: 720; }
.catalog-views button { white-space: nowrap; }
.catalog-views button span { font-variant-numeric: tabular-nums; opacity: .78; margin-left: 2px; }
.catalog-views button[aria-pressed="true"], .catalog-pages [aria-current="page"] { background: var(--forest); color: #fff; }
.catalog-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px 16px; border-block: 1px solid var(--line); padding: 9px 0; }
.catalog-subjects { display: flex; flex-wrap: wrap; gap: 3px; }
.subject-short { display: none; }
.catalog-subjects button { color: #3d594a; }
.catalog-subjects button:hover, .catalog-views button:hover:not([aria-pressed="true"]), .catalog-pages button:hover:not([aria-current="page"], :disabled) { background: #ddebe0; }
.catalog-subjects button[aria-pressed="true"] { background: #dceadf; border-color: #a7bcad; color: #184530; }
.catalog-search { position: relative; width: min(100%, 260px); }
.catalog-search input { display: block; width: 100%; min-height: 44px; padding: 7px 10px 7px 37px; border: 1px solid #adbdaf; border-radius: 5px; background: #fff; }
.catalog-search input::placeholder { color: #596d60; }
.search-icon { position: absolute; inset: 13px auto auto 12px; width: 13px; height: 13px; border: 1.7px solid #526a5b; border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ""; width: 6px; height: 1.7px; background: #526a5b; transform: rotate(45deg); position: absolute; left: 9px; top: 10px; }
.results-count { margin: 10px 0 12px; color: var(--quiet); font-size: 13px; font-variant-numeric: tabular-nums; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.trainer { min-width: 0; border: 1px solid #cfdcd1; border-radius: 8px; background: #fff; transition: border-color .2s; }
.trainer:hover { border-color: #6a987d; }
.trainer-link { display: flex; flex-direction: column; height: 100%; min-width: 0; text-decoration: none; border-radius: 7px; }
.trainer-art { position: relative; overflow: hidden; height: 168px; flex: none; border-radius: 7px 7px 0 0; background: #d1e2d9; }
.trainer-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.trainer-link:hover img { transform: scale(1.035); }
.trainer-number { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 760; }
.trainer-art .trainer-number { position: absolute; top: 9px; left: 9px; padding: 3px 6px; border-radius: 4px; color: #fff4dc; background: #183830e8; }
.trainer-copy { flex: 1; display: grid; align-content: start; grid-template-rows: auto auto 1fr auto; gap: 5px; padding: 13px; min-width: 0; }
.trainer-subject { color: #70402b; font-size: 12px; font-weight: 740; }
[data-subject="reading"] .trainer-subject { color: #25634f; }
[data-subject="words"] .trainer-subject { color: #764748; }
[data-subject="logic"] .trainer-subject { color: #4c547c; }
.trainer-title { font: 26px/1.08 var(--display); overflow-wrap: anywhere; }
.trainer-description { color: #455c4f; font-size: 14px; }
.trainer-cta { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 34px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #e0e8e0; color: #23563f; font-size: 14px; font-weight: 740; }
.trainer-cta span { font-size: 19px; }
.catalog-grid[data-view="plan"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; border-top: 1px solid var(--line); }
.planned-trainer { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 75px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.planned-trainer .trainer-number { color: #526f5f; }
.planned-trainer .trainer-title { font-size: 21px; }
.planned-status { color: #53675b; font-size: 13px; }
.catalog-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 20px; }
.catalog-pages button { border-color: #aebfb2; }
.catalog-pages button:disabled { opacity: .44; }
.catalog-empty { display: grid; gap: 10px; justify-items: start; padding: 22px 0; }
.catalog-empty h3 { font: 25px/1.2 var(--display); }

.school-band { background: #dfede2; border-block: 1px solid #c1d7c6; }
.school-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-block: 30px; }
.school-band h2 { font-size: 35px; }
.site-footer { background: #102923; color: #fff9e9; }
.site-footer .brand img { width: min(100%, 224px); }
.site-footer :focus-visible { outline-color: #ffdb91; }

@media (min-width: 1000px) {
  .catalog-opening .trainer:first-child, .catalog-opening .trainer:last-child { grid-column: span 2; }
  .catalog-opening .trainer:first-child .trainer-art, .catalog-opening .trainer:last-child .trainer-art { height: 185px; }
  .catalog-opening .trainer:last-child .trainer-art img { object-position: 50% 49% !important; }
}
@media (max-width: 999px) {
  .wrap { width: min(1200px, calc(100% - 36px)); }
  .atlas { min-height: 437px; }
  .atlas h1 { font-size: 66px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { min-height: 58px; }
  .site-header .brand img { width: min(100%, 205px); }
  .site-footer .brand img { width: min(100%, 180px); }
  .header-catalog { display: none !important; }
  .atlas { min-height: 405px; min-height: min(405px, calc(100svh - 155px)); padding-block: 77px 25px; align-items: end; }
  .atlas-art img { object-position: 50% 37%; }
  .atlas::after { background: linear-gradient(0deg, #0a2a24fb 1%, #0a2a24c9 49%, #0a2a2414 84%, transparent); }
  .atlas h1 { font-size: 49px; }
  .atlas-inner { gap: 10px; }
  .atlas-summary { font-size: 17px; }
  .atlas-actions { gap: 8px 10px; }
  .atlas-caption { display: none; }
  .catalog { padding-block: 22px 30px; }
  .catalog h2 { font-size: 34px; }
  .catalog-heading { flex-direction: column; align-items: start; margin-bottom: 12px; }
  .catalog-tools { gap: 6px; }
  .catalog-subjects { width: 100%; justify-content: space-between; gap: 2px; }
  .catalog-subjects button { padding-inline: 6px; font-size: 13px; }
  .subject-full { display: none; }
  .subject-short { display: inline; }
  .catalog-search { width: 100%; }
  .catalog-grid, .catalog-grid[data-view="plan"] { grid-template-columns: minmax(0, 1fr); }
  .trainer-art { height: 173px; }
  .school-inner { flex-direction: column; align-items: start; padding-block: 21px; }
  .school-band h2 { font-size: 29px; }
}
@media (max-width: 345px) {
  .atlas h1 { font-size: 42px; }
  .atlas-actions > span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.header-stamps { color: #6e432b; white-space: nowrap; }
.header-stamps span { color: #995725; }
.stamp-band { background: #f2ebda; border-top: 1px solid #d9cbad; }
.stamp-album { padding-block: 30px 36px; scroll-margin-top: 16px; }
.stamp-album:focus { outline: none; }
.stamp-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.stamp-heading h2 { font: clamp(32px, 5.2vw, 44px)/1.06 var(--display); color: #283d32; }
.stamp-total { background: #f6dd9d; color: #55391f; padding: 4px 10px; border: 1px solid #c69858; border-radius: 5px; font-size: 14px; font-weight: 750; }
.stamp-intro { margin-top: 9px; color: #574b37; }
.stamp-empty { margin-top: 16px; padding: 11px 14px; border: 1px dashed #ad9673; border-radius: 8px; color: #574b37; }
.stamp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0; margin: 16px 0 0; list-style: none; }
.stamp-list:empty { display: none; }
.stamp-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 11px;
  padding: 9px; border: 1px solid #d3c2a2; border-radius: 8px; background: #fffaf0;
}
.stamp-medallion { border: 2px solid #a16a34; border-radius: 50%; padding: 2px; background: #ffdb91; }
.stamp-medallion img { display: block; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.stamp-title { color: #55391f; font-weight: 750; }
.stamp-card a { display: inline-flex; align-items: center; min-height: 30px; color: #225842; font-size: 13px; }
.stamp-count { color: #665133; font-size: 13px; font-weight: 700; }
@media (max-width: 600px) {
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 13px; gap: 4px; }
  .site-header .brand img { width: min(100%, 190px); }
  .stamp-album { padding-block: 24px; }
  .stamp-list { grid-template-columns: minmax(0, 1fr); }
}

.atlas-winter { color: #ffe6a7; font-size: .9rem; font-weight: 750; text-underline-offset: 4px; }
.atlas-winter span { margin-right: 4px; }
.winter-invite {
  display: grid; align-items: center; min-height: 315px; margin-block: 28px; border: 1px solid #c6a56a;
  border-radius: 10px; color: #fff4d7;
  background: linear-gradient(90deg, #142b26fc 4%, #172c27d8 34%, #1c2f2a18 76%), url('winter/art/fair.webp') center 52% / cover, #21372c;
}
.winter-invite-copy { padding: 24px clamp(18px, 4vw, 46px); }
.winter-invite .overline { color: #ffdf96; letter-spacing: .09em; }
.winter-invite h2 { margin: 7px 0; font: 400 clamp(2.35rem, 5vw, 4.4rem)/1 var(--display); letter-spacing: -.045em; }
.winter-invite-copy p:not(.overline) { max-width: 32ch; }
.winter-invite .button { margin-top: 16px; }
@media (max-width: 600px) {
  .winter-invite { min-height: 315px; align-items: end; background: linear-gradient(0deg, #142b26fa 3%, #172c27b3 44%, #172c270f 86%), url('winter/art/fair.webp') 58% 50% / cover, #21372c; }
}
