/*
 * ZŠ a MŠ Kopretinov – the stylesheet of the school's design (the same file as in the mockup of the school alone). The quiet look: a white page, one blue, plain
 * photos; lists sit on hairlines instead of in cards, and every section is a rail with
 * its heading next to its content.
 * 1 tokens · 2 base · 3 pieces · 4 bar and menu · 5 sections · 6 home · 7 inner pages
 * 8 footer · 9 smaller screens · 10 motion and print
 */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2"); 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"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2"); 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: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("../fonts/dm-sans-latin-ext.woff2") format("woff2"); 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: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap; src: url("../fonts/dm-sans-latin.woff2") format("woff2"); 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; }

/* ---------- 1 Tokens ---------- */
:root {
    --bg: #FFFFFF;
    --tint: #F4F5F9;
    --ink: #12141C;
    --ink-2: #474C5C;
    --ink-3: #676C7D;
    --line: #E2E4EB;
    --line-2: #C6CAD6;
    --solid: #12141C;
    --on-solid: #F3F4F8;

    --blue: #2440E8;
    --blue-deep: #1A31C4;
    --blue-text: #2440E8;
    --blue-soft: #EDF0FF;
    --yellow: #FFCB1F;
    --focus: #2440E8;
    --shadow: 0 0 0 1px var(--line), 0 18px 40px -18px rgba(18, 20, 28, .22);

    --map-bg: #EEF0F5;
    --map-green: #DCE9DA;
    --map-water: #D3E2F8;
    --map-road: #FFFFFF;
    --map-block: #DDE0E9;

    --font-head: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
    --font-text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --wrap: 1240px;
    --gutter: clamp(20px, 4vw, 48px);
    --cg: clamp(24px, 4vw, 56px);          /* the gap between the rail and the content, and between columns */
    --sec: clamp(48px, 6.4vw, 88px);       /* the space above and under a section */
    --r: 10px;
    --r-lg: 16px;
    --bar-h: 72px;
}
[data-theme="dark"] {
    --bg: #0E1016;
    --tint: #171A23;
    --ink: #F1F2F6;
    --ink-2: #BBBFCC;
    --ink-3: #9094A5;
    --line: #262A36;
    --line-2: #3B4050;
    --solid: #090A0E;
    --on-solid: #F1F2F6;

    --blue: #3550F0;
    --blue-deep: #4763FF;
    --blue-text: #9AABFF;
    --blue-soft: #1B2247;
    --focus: #9AABFF;
    --shadow: 0 0 0 1px var(--line-2), 0 18px 40px -18px rgba(0, 0, 0, .7);

    --map-bg: #171A23;
    --map-green: #1B2C22;
    --map-water: #1B2F4B;
    --map-road: #2A2F3F;
    --map-block: #212532;
}

/* The nine years of the school; A and B of a year share its colour. A class is always a dot of its colour and its name. */
.g1 { --g: #FFCB1F; } .g2 { --g: #FFA552; } .g3 { --g: #FF7D69; } .g4 { --g: #F893C6; } .g5 { --g: #B59DFF; }
.g6 { --g: #709DFF; } .g7 { --g: #52D1DE; } .g8 { --g: #52D79E; } .g9 { --g: #BEE35A; }

/* ---------- 2 Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 24px); -webkit-text-size-adjust: 100%; }
html:has(.subnav) { scroll-padding-top: calc(var(--bar-h) + 76px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue-soft); color: var(--ink); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: var(--r); background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- 3 Pieces ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: var(--r); font: 600 1rem/1 var(--font-text); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .18s, border-color .18s, color .18s; }
.btn .ico { transition: transform .2s; }
.btn:hover .ico { transform: translateX(3px); }
.btn--sm { min-height: 42px; padding: 0 16px; font-size: .9375rem; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-deep); }
.btn--line { border-color: var(--line-2); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); }
.btn--white { background: #fff; color: #12141C; }
.btn--white:hover { background: #E8ECFF; }
.btn--onblue, .btn--ondark { border-color: rgba(255, 255, 255, .42); color: #fff; }
.btn--onblue:hover, .btn--ondark:hover { border-color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* a link that leads on: the arrow moves, the words get a line */
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--blue-text); text-decoration: none; }
.more .ico { width: 1.1em; height: 1.1em; transition: transform .2s; }
.more:hover { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1.5px; }
.more:hover .ico { transform: translateX(3px); }

.label { font: 500 .875rem/1.3 var(--font-text); letter-spacing: 0; color: var(--ink-3); }
.meta { font-size: .875rem; line-height: 1.3; color: var(--ink-3); }

/* a class: a dot of its colour and its name */
.cdot { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .875rem; line-height: 1.3; white-space: nowrap; }
.cdot::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--g, var(--line-2)); }

.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; font: 600 .8125rem/1 var(--font-text); color: var(--ink-2); white-space: nowrap; }
.tag--now { border-color: transparent; background: var(--blue-soft); color: var(--blue-text); }

.avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); color: var(--ink-2); font: 700 .875rem/1 var(--font-text); letter-spacing: .01em; }

/* name and value rows: an address, office hours, who teaches the class */
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: .9375rem; color: var(--ink-3); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.facts dd small { display: block; font-size: .9375rem; font-weight: 400; color: var(--ink-2); }
.facts a { text-decoration: none; }
.facts a:hover { text-decoration: underline; text-underline-offset: .2em; }
.facts--hours > div { grid-template-columns: minmax(0, 1fr) auto; }
.facts--hours dd { font-variant-numeric: tabular-nums; text-align: right; }
.sub { margin: 32px 0 12px; font: 600 1.0625rem/1.3 var(--font-text); letter-spacing: 0; }
.sub:first-child { margin-top: 0; }

/* The mockup's own switch: quiet, so that nobody takes it for a part of the site. */
.demo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: .8125rem; line-height: 1.4; color: var(--ink-3); }
.demo > span { flex-basis: 100%; }
.demo button { padding: 2px 0; border: 0; background: none; color: var(--ink-3); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: .22em; }
.demo button[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: none; }

/* ---------- 4 Bar and menu ---------- */
.bar { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--bar-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.logo-bg { fill: var(--blue); } .logo-petals { fill: #fff; } .logo-eye { fill: var(--yellow); }
.brand-text b { display: block; font: 700 1.125rem/1 var(--font-head); letter-spacing: -.025em; }
.brand-text small { display: block; margin-top: 4px; font-size: .75rem; line-height: 1; color: var(--ink-3); }

.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 13px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 .9375rem/1 var(--font-text); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--tint); }
.nav-link[data-current] { color: var(--blue-text); font-weight: 600; }
.chev { width: 1em; height: 1em; color: var(--ink-3); transition: transform .2s; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-extra { display: none; }

.panel { display: none; position: absolute; top: calc(100% + 16px); left: -12px; z-index: 60; padding: 12px; border-radius: 14px; background: var(--bg); box-shadow: var(--shadow); }
.nav-link[aria-expanded="true"] + .panel { display: block; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.panel--classes { width: 372px; padding: 16px; }
.panel--links { width: 600px; }
.panel--list { width: 280px; }
.panel-title { margin: 0 0 6px; padding: 0 10px; font: 500 .8125rem/1.3 var(--font-text); color: var(--ink-3); }
.panel-classes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin-bottom: 14px; }
.ctile { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 8px; font: 600 .9375rem/1 var(--font-text); text-decoration: none; }
.ctile::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--g); }
.ctile:hover, .ctile[aria-current] { background: var(--tint); }
.panel-more { display: inline-flex; align-items: center; gap: 8px; margin: 0 10px 2px; font: 600 .9375rem/1.2 var(--font-text); color: var(--blue-text); text-decoration: none; }
.panel-more:hover { text-decoration: underline; text-underline-offset: .2em; }
.panel-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.panel-links a { display: flex; align-items: center; gap: 13px; padding: 10px; border-radius: 10px; text-decoration: none; }
.panel-links a:hover, .panel-list a:hover, .panel-links a[aria-current] { background: var(--tint); }
.panel-links b { display: block; font: 600 .9688rem/1.25 var(--font-text); }
.panel-links small { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.35; color: var(--ink-3); }
.pico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); }
.panel-list a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .9688rem; font-weight: 500; text-decoration: none; }

.bar-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.tool { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); cursor: pointer; }
.tool:hover { background: var(--tint); color: var(--ink); }
.ico-sun, [data-theme="dark"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: block; }
.menu-toggle { display: none; align-items: center; gap: 9px; height: 42px; padding: 0 13px 0 15px; border: 1px solid var(--line-2); border-radius: var(--r); background: none; color: var(--ink); font: 600 .9375rem/1 var(--font-text); cursor: pointer; }
.menu-toggle .ico-close, .menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }

/* ---------- 5 Sections: a rail with the heading, the content next to it ---------- */
.sec-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--cg); padding-block: var(--sec); border-top: 1px solid var(--line); }
.sec-head { position: sticky; top: calc(var(--bar-h) + 28px); align-self: start; display: grid; gap: 14px; justify-items: start; min-width: 0; }
html:has(.subnav) .sec-head { top: calc(var(--bar-h) + 82px); }
.sec-head h2 { font-size: clamp(1.625rem, 1.25rem + 1.2vw, 2.125rem); }
.sec-head p { max-width: 24em; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.sec-head .demo { justify-self: stretch; max-width: 16em; }
.sec-body { min-width: 0; }
.sec-links { display: grid; gap: 8px; justify-items: start; }

/* ---------- 6 Home ---------- */
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--cg); align-items: center; padding-block: clamp(28px, 4.4vw, 60px); }
.notice { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-bottom: clamp(18px, 2.4vw, 28px); padding: 7px 12px 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9375rem; font-weight: 500; line-height: 1.3; color: var(--ink); text-decoration: none; transition: border-color .15s, background-color .15s; }
.notice::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-text); }
.notice .ico { width: 1em; height: 1em; color: var(--ink-3); transition: transform .2s; }
.notice:hover { border-color: var(--line-2); background: var(--tint); }
.notice:hover .ico { transform: translateX(3px); }
.hero h1 { font-size: clamp(2.75rem, 1.3rem + 4.7vw, 5.25rem); line-height: 1; letter-spacing: -.042em; }
.hero h1 em { font-style: normal; color: var(--blue-text); }
.hero .lead { max-width: 29em; margin-top: clamp(16px, 2vw, 24px); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); }
.hero .actions { margin-top: clamp(22px, 2.6vw, 32px); }
.hero-photo { aspect-ratio: 3 / 2; border-radius: var(--r-lg); overflow: hidden; background: var(--tint); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* What holds today: the nearest event, lunch, what the classes wrote. Three columns of plain text. */
.today { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: var(--cg); border-top: 1px solid var(--line); }
.today-rest { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--cg); }
.today-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-block: clamp(22px, 2.6vw, 30px) clamp(24px, 2.8vw, 34px); }
.today-rest::before, .today-rest .today-col + .today-col::before { content: ""; position: absolute; top: clamp(22px, 2.6vw, 30px); bottom: clamp(24px, 2.8vw, 34px); width: 1px; background: var(--line); }
.today-rest::before { left: calc(var(--cg) / -2); }
.today-rest .today-col + .today-col::before { left: 50%; }
.today-col > .label { margin-bottom: 14px; }
.today-col > .more, .today-links { margin-top: auto; padding-top: 16px; font-size: .9375rem; }
.today-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.next { display: grid; gap: 2px; text-decoration: none; }
.next-date { font: 700 clamp(2rem, 1.6rem + 1.2vw, 2.5rem)/1 var(--font-head); letter-spacing: -.035em; }
.next-when { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); }
.next-name { margin-top: 10px; font: 600 1.125rem/1.3 var(--font-head); letter-spacing: -.015em; }
.next:hover .next-name { color: var(--blue-text); }
.menu, .feed { align-self: stretch; }
.menu li, .feed li { display: grid; gap: 0 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .9688rem; line-height: 1.4; }
.menu li:first-child, .feed li:first-child { padding-top: 0; border-top: 0; }
.menu li { grid-template-columns: 1.2em minmax(0, 1fr); }
.menu-n { font-weight: 600; color: var(--ink-3); }
.menu b { font-weight: 500; }
.menu small, .feed small { display: block; font-size: .8125rem; color: var(--ink-3); }
.feed li { grid-template-columns: 3.3em minmax(0, 1fr) auto; align-items: baseline; }
.feed a { font-weight: 500; text-decoration: none; }
.feed a:hover { color: var(--blue-text); text-decoration: underline; text-underline-offset: .2em; }
.feed small { white-space: nowrap; }

/* the pages people open most: one line of links, no tiles */
.quick { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 20px; border-top: 1px solid var(--line); }
.quick a { display: inline-flex; align-items: center; gap: 9px; padding: 17px 0; font-size: .9375rem; font-weight: 600; text-decoration: none; }
.quick .ico { color: var(--ink-3); transition: color .15s; }
.quick a:hover, .quick a:hover .ico { color: var(--blue-text); }

/* News: the lead item, then rows. A photo is optional everywhere. */
.lead-news { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.lead-news-img { display: block; aspect-ratio: 3 / 2; border-radius: var(--r-lg); overflow: hidden; background: var(--tint); }
.lead-news-img img, .nrow-img img, .album-img img, .photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.lead-news:hover .lead-news-img img, .nrow:hover .nrow-img img, .album:hover .album-img img { transform: scale(1.03); }
.lead-news-body { display: grid; gap: 12px; justify-items: start; }
.lead-news h3 { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem); }
.lead-news h3 a, .nrow h3 a { text-decoration: none; }
.lead-news h3 a::after, .nrow h3 a::after { content: ""; position: absolute; inset: 0; }
.lead-news:hover h3, .nrow:hover h3 { color: var(--blue-text); }
.lead-news-body > p:not(.meta) { color: var(--ink-2); }
.news[data-lead="plain"] .lead-news { grid-template-columns: minmax(0, 1fr); }
.news[data-lead="plain"] .lead-news-img { display: none; }
.news[data-lead="plain"] .lead-news h3 { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.5rem); max-width: 18em; }
.news[data-lead="plain"] .lead-news-body > p:not(.meta) { max-width: 40em; }
.nrows { margin-top: clamp(24px, 3vw, 40px); }
.nrow { position: relative; display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.nrow h3 { font: 600 1.125rem/1.35 var(--font-text); letter-spacing: -.005em; }
.nrow p:not(.meta) { margin-top: 3px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.nrow-img { width: 108px; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--tint); }

/* Events: the day, the name, when and where */
.ev { display: grid; grid-template-columns: 8.5em minmax(0, 1fr) auto auto; gap: 8px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); text-decoration: none; }
.events > li:first-child .ev, .nrows > li:first-child, .nrows > .nrow:first-child { border-top: 0; padding-top: 0; }
.nrows--lined > li:first-child, .nrows--lined > .nrow:first-child { border-top: 1px solid var(--line); padding-top: 18px; }
.ev-date { display: flex; align-items: baseline; gap: 10px; }
.ev-date b { min-width: 1.25em; font: 700 1.75rem/1 var(--font-head); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.ev-date span { font-size: .875rem; color: var(--ink-3); white-space: nowrap; }
.ev-body strong { display: block; font: 600 1.125rem/1.35 var(--font-text); }
.ev-body small { display: block; margin-top: 2px; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.ev-classes { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ev-arrow { color: var(--ink-3); transition: transform .2s, color .2s; }
.ev:hover strong { color: var(--blue-text); }
.ev:hover .ev-arrow { color: var(--blue-text); transform: translateX(4px); }

/* Classes: an index, not tiles */
.classes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 32px); }
.klass { display: grid; gap: 5px; padding: 16px 0 18px; border-top: 1px solid var(--line); text-decoration: none; }
.klass b { display: flex; align-items: center; gap: 10px; font: 700 1.5rem/1.1 var(--font-head); letter-spacing: -.03em; }
.klass b::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--g); }
.klass span { font-size: .9375rem; line-height: 1.35; color: var(--ink-2); }
.klass:hover b { color: var(--blue-text); }

/* Galleries */
.albums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(16px, 2.4vw, 28px); }
.album { display: block; text-decoration: none; }
.album-img { display: block; aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: 12px; overflow: hidden; background: var(--tint); }
.album b { display: block; font-weight: 600; line-height: 1.35; }
.album small { display: block; margin-top: 2px; font-size: .875rem; color: var(--ink-3); }
.album:hover b { color: var(--blue-text); }

/* Clubs: a table */
.tbl { width: 100%; }
.tbl th { padding: 0 20px 10px 0; font: 500 .875rem/1.3 var(--font-text); color: var(--ink-3); text-align: left; white-space: nowrap; }
.tbl td { padding: 15px 20px 15px 0; border-top: 1px solid var(--line); color: var(--ink-2); vertical-align: baseline; }
.tbl td:first-child { color: var(--ink); font-size: 1.125rem; font-weight: 600; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 28px; padding: 22px 26px; border-radius: var(--r-lg); background: var(--tint); }
.callout h3 { font: 600 1.125rem/1.3 var(--font-text); letter-spacing: 0; }
.callout p { margin-top: 3px; font-size: .9375rem; color: var(--ink-2); }
.callout + .callout { margin-top: 12px; }

/* Enrolment: the one filled block of the page */
.sec--panel { padding-bottom: var(--sec); }
.enrol { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(28px, 5vw, 64px); border-radius: 20px; background: var(--blue); color: #fff; }
.enrol :focus-visible { outline-color: #fff; }
.enrol .label { color: rgba(255, 255, 255, .8); }
.enrol h2 { margin-top: 12px; font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.875rem); line-height: 1.06; letter-spacing: -.035em; }
.enrol .actions { margin-top: clamp(22px, 3vw, 36px); }
.steps li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .24); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps li:last-child { padding-bottom: 0; }
.steps b { font: 700 1.25rem/1.3 var(--font-head); opacity: .7; }
.steps strong { display: block; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.steps span span, .steps li > span { color: rgba(255, 255, 255, .88); font-size: .9688rem; line-height: 1.5; }
.steps strong { color: #fff; margin-bottom: 2px; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--cg); align-items: stretch; }
/* a map on its own keeps its height (taller, it would crop its own labels); with office hours under it, it takes what is left of the column */
.contact > .map-card { align-self: start; }
.contact-side { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.contact-side .map-card { flex: 1 1 auto; min-height: 300px; }
.contact .facts > div:first-child, .phead-side .facts > div:first-child { border-top: 0; padding-top: 0; }
.people { display: grid; gap: 14px; }
.people li, .staff li { display: flex; align-items: center; gap: 14px; min-width: 0; }
.people b, .staff b { display: block; font-weight: 600; line-height: 1.3; }
.people small, .staff small { display: block; font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.map-card { position: relative; min-height: 440px; border-radius: var(--r-lg); overflow: hidden; background: var(--map-bg); }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-bg { fill: var(--map-bg); } .m-green { fill: var(--map-green); } .m-water { fill: var(--map-water); }
.m-stream { fill: none; stroke: var(--map-water); stroke-width: 12; stroke-linecap: round; }
.m-block rect { fill: var(--map-block); }
.m-road path { fill: none; stroke: var(--map-road); stroke-width: 13; stroke-linecap: round; }
.m-road .m-road--main { stroke-width: 20; }
.m-square { fill: var(--map-road); }
.m-pitch { fill: none; stroke: var(--map-road); stroke-width: 3; }
.m-school { fill: var(--blue); }
.m-route { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: .1 8; stroke-linecap: round; }
.m-text text { font: 500 13px var(--font-text); letter-spacing: .01em; fill: var(--ink-3); }
.m-text .m-text--soft { font-style: italic; opacity: .9; }
.m-label rect { fill: var(--ink); } .m-label text { font: 600 13px var(--font-text); fill: var(--bg); }
.m-stop circle { fill: var(--ink); } .m-stop path { fill: none; stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.m-pin-halo { fill: #fff; opacity: .3; } .m-pin-dot { fill: #fff; } .m-pin-eye { fill: var(--blue); }
.map-btn { position: absolute; right: 14px; bottom: 14px; background: var(--bg); }

/* ---------- 7 Inner pages: a class, a part of the school, contacts ---------- */
.phead-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--cg); align-items: end; padding-block: clamp(24px, 3.4vw, 44px) clamp(28px, 4vw, 52px); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; line-height: 1.3; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .2em; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.phead h1 { margin-top: clamp(18px, 2.6vw, 32px); font-size: clamp(2.75rem, 1.6rem + 4.4vw, 5rem); line-height: 1; letter-spacing: -.045em; }
.phead--class h1 { display: flex; align-items: center; gap: .2em; }
.phead--class h1::before { content: ""; flex: none; width: .24em; height: .24em; border-radius: 50%; background: var(--g); }
.phead .lead { max-width: 32em; margin-top: clamp(14px, 1.8vw, 20px); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.55; color: var(--ink-2); }
.phead-side { display: grid; gap: 18px; justify-items: start; }
.phead-side .facts { justify-self: stretch; }

.subnav { position: sticky; top: var(--bar-h); z-index: 40; background: var(--bg); border-block: 1px solid var(--line); }
.subnav ul { display: flex; gap: clamp(18px, 2.4vw, 30px); overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: 15px 0 13px; border-bottom: 2px solid transparent; font-size: .9375rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { border-bottom-color: var(--blue-text); color: var(--ink); font-weight: 600; }
.subnav + .sec .sec-in { border-top: 0; }

.photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px); }
.photos figure { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--tint); }

.staff { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--cg); }
.staff li { padding: 14px 0; border-top: 1px solid var(--line); }
.staff small a { text-decoration: none; overflow-wrap: anywhere; }
.staff small a:hover { text-decoration: underline; text-underline-offset: .2em; }

.docs > li:first-child .doc { border-top: 0; padding-top: 0; }
.doc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); text-decoration: none; }
.doc > .ico { color: var(--ink-3); }
.doc b { display: block; font-weight: 600; line-height: 1.35; }
.doc small { display: block; font-size: .875rem; color: var(--ink-3); }
.doc:hover b, .doc:hover > .ico:last-child { color: var(--blue-text); }

/* ---------- 8 Footer ---------- */
.foot { background: var(--solid); color: var(--on-solid); }
[data-theme="dark"] .foot { border-top: 1px solid var(--line); }
.foot :focus-visible { outline-color: #fff; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 3fr); gap: var(--cg); padding-block: clamp(40px, 5.6vw, 72px) clamp(32px, 4.4vw, 56px); }
.foot-brand { display: grid; gap: 18px; justify-items: start; align-content: start; }
.foot-brand p { max-width: 24em; font-size: .9688rem; color: rgba(243, 244, 248, .7); }
.foot .brand-text small { color: rgba(243, 244, 248, .6); }
.foot-col h2 { margin-bottom: 14px; font: 500 .875rem/1.3 var(--font-text); letter-spacing: 0; color: rgba(243, 244, 248, .6); }
.foot-col ul { display: grid; gap: 9px; font-size: .9688rem; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { text-decoration: underline; text-underline-offset: .2em; }
.foot-contact li { display: flex; align-items: flex-start; gap: 10px; }
.foot-contact .ico { margin-top: 3px; opacity: .6; }
.foot-contact a, .foot-contact span { min-width: 0; overflow-wrap: anywhere; }
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; padding: 20px 0 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .875rem; }
.foot-legal ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { text-decoration: underline; }
.foot-legal p { color: rgba(243, 244, 248, .6); }

/* ---------- 9 Smaller screens ---------- */
@media (max-width: 1259.98px) {
    .nav-link { padding: 0 10px; }
    .bar-in { gap: 12px; }
}
/* the menu becomes a sheet over the whole screen */
@media (max-width: 1099.98px) {
    :root { --bar-h: 64px; }
    .bar-edookit { display: none; }
    .menu-toggle { display: inline-flex; }
    html.menu-open { overflow: hidden; }
    .nav { position: fixed; inset: calc(var(--bar-h) + 1px) 0 0; z-index: 49; padding: 4px var(--gutter) 48px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
    .menu-open .nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; max-width: 640px; margin-inline: auto; }
    .nav-item { border-bottom: 1px solid var(--line); }
    .nav-link { justify-content: space-between; width: 100%; height: 60px; padding: 0; border-radius: 0; font: 600 1.3125rem/1 var(--font-head); letter-spacing: -.02em; }
    .nav-link:hover, .nav-link[aria-expanded="true"] { background: none; }
    .panel { position: static; width: auto; padding: 0 0 18px; border-radius: 0; background: none; box-shadow: none; }
    .nav-link[aria-expanded="true"] + .panel { animation: none; }
    .panel-title, .panel-more { margin-inline: 0; padding-inline: 0; }
    .panel-classes { margin-inline: -10px; }
    .panel-links { grid-template-columns: 1fr; }
    .panel-links a { padding: 8px 0; }
    .panel-links a:hover, .panel-list a:hover, .panel-links a[aria-current] { background: none; }
    .panel-list a { padding: 8px 0; }
    .nav-extra { display: grid; gap: 16px; justify-items: start; max-width: 640px; margin: 28px auto 0; }
    .nav-extra p { font-size: .9375rem; color: var(--ink-2); }
    .nav-extra p a { text-decoration: none; }
    .classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 959.98px) {
    .sec-in { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
    .sec-head, html:has(.subnav) .sec-head { position: static; }
    .sec-head p, .sec-head .demo { max-width: 34em; }
    .today { grid-template-columns: minmax(0, 1fr); }
    .today-rest { border-top: 1px solid var(--line); }
    .today-rest::before { content: none; }
    .quick { justify-content: flex-start; gap: 0 28px; }
    .enrol, .contact, .phead-in { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .map-card, .contact-side .map-card { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
    .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 759.98px) {
    .hero-in { grid-template-columns: minmax(0, 1fr); }
    .lead-news { grid-template-columns: minmax(0, 1fr); }
    .albums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .staff { grid-template-columns: minmax(0, 1fr); }
    /* the table of clubs: each club a block, its facts under the name */
    .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; }
    .tbl tr { padding: 14px 0; border-top: 1px solid var(--line); }
    .tbl tr:first-child { border-top: 0; padding-top: 0; }
    .tbl td { padding: 0; border: 0; }
    .tbl td:not(:first-child) { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); margin-top: 4px; font-size: .9375rem; }
    .tbl td:not(:first-child)::before { content: attr(data-label); color: var(--ink-3); }
}
@media (max-width: 639.98px) {
    .brand-mark { width: 36px; height: 36px; }
    .today-rest { grid-template-columns: minmax(0, 1fr); }
    .today-rest .today-col + .today-col { border-top: 1px solid var(--line); }
    .today-rest .today-col + .today-col::before { content: none; }
    .quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding-block: 6px; }
    .quick a { padding: 11px 0; }
    .nrow { grid-template-columns: minmax(0, 1fr) auto; }
    .nrow > .meta { grid-column: 1 / -1; }
    .nrow-img { width: 84px; }
    .ev { grid-template-columns: 4.7em minmax(0, 1fr) auto; gap: 6px 14px; }
    .ev-date { display: grid; gap: 4px; }
    .ev-date b { font-size: 1.5rem; }
    .ev-date span { font-size: .75rem; }
    .ev-classes { grid-column: 2 / -1; grid-row: 2; }
    .ev-arrow { display: none; }
    .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts > div { grid-template-columns: minmax(0, 1fr); }
    .facts--hours > div { grid-template-columns: minmax(0, 1fr) auto; }
    .callout { padding: 18px 20px; }
    .map-card, .contact-side .map-card { aspect-ratio: 4 / 4.2; }
    .foot-grid { grid-template-columns: minmax(0, 1fr); }
    .hero .actions .btn { flex: 1 1 auto; }
}
@media (max-width: 379.98px) {
    .brand-text small { display: none; }
}

/* ---------- 10 Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .bar, .subnav, .skip, .demo { display: none; }
    .sec-head { position: static; }
}
