/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--cream); border-bottom: var(--edge); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 800 1.2rem/1 var(--display); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; }
.topbar nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 4px 22px; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }

.top-actions { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; font-weight: 700; }

/* Academy home */
.academy { --paper: #fffaf0; background: var(--paper); }
.academy .wrap { max-width: 1240px; padding-inline: max(clamp(18px, 4vw, 54px), env(safe-area-inset-left, 0px)); }
.academy .topbar { background: var(--paper); border-bottom: 1px solid var(--ink); }
.academy .brand { gap: 9px; letter-spacing: -.05em; }
.academy-mark { display: grid; place-items: center; width: 38px; height: 36px; background: var(--ink); color: var(--mark); font: 800 1.15rem/1 var(--display); letter-spacing: -.12em; border-radius: 2px 11px 2px 2px; }
.academy .btn { border: 1px solid var(--ink); box-shadow: none; border-radius: 4px; gap: 14px; min-height: 52px; padding: 13px 20px; font: 700 1rem/1.2 var(--body); }
.academy .btn:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.academy .btn.small { min-height: 44px; padding: 8px 14px; background: var(--ink); color: var(--white); }
.academy .go { text-decoration-thickness: 1px; text-underline-offset: .23em; }
.academy .section-title { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: .99; letter-spacing: -.05em; }
.eyebrow, .course-label, .exhibit-label { font: 700 .74rem/1.35 var(--body); text-transform: uppercase; letter-spacing: .12em; }
.eyebrow { color: var(--btn); }

.hero { border-bottom: 1px solid var(--ink); }
.hero > .wrap { display: grid; align-items: center; gap: clamp(22px, 4vw, 60px); padding-block: clamp(30px, 5vw, 74px); }
.hero-copy { display: grid; justify-items: start; gap: clamp(16px, 2.1vw, 28px); }
.course-label { display: flex; gap: 10px; align-items: center; }
.course-label::before { content: ""; width: 24px; height: 6px; background: var(--btn); }
.hero h1 { font: 800 clamp(3.7rem, 7.9vw, 7.3rem)/.89 var(--display); letter-spacing: -.07em; }
.hero h1 em { display: block; font-style: normal; color: var(--btn); }
.hero-sub { max-width: 32em; color: #463f38; font-size: clamp(1.03rem, 1.6vw, 1.22rem); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.hero-actions .go { font-size: .98rem; }
.exhibit { overflow: hidden; min-width: 0; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--ink); background: var(--ink); color: var(--cream); }
.exhibit-link { display: block; text-decoration: none; }
.exhibit-link:focus-visible { outline: 4px solid var(--mark); outline-offset: -5px; }
.exhibit-art { position: relative; isolation: isolate; display: grid; place-items: center; height: clamp(240px, 25vw, 340px); background-color: #26145c; background-image: linear-gradient(transparent 95%, #674c9e66 95%), linear-gradient(90deg, transparent 95%, #674c9e66 95%); background-size: 27px 27px; overflow: hidden; border-bottom: 1px solid #7a756a; }
.exhibit-art::before, .exhibit-art::after { content: ""; z-index: -1; position: absolute; width: 130%; height: 50%; border: 1px solid #cab7ff9c; border-radius: 50%; transform: rotate(-26deg); }
.exhibit-art::after { width: 96%; height: 77%; transform: rotate(34deg); border-color: #a999d270; }
.exhibit-label { position: absolute; z-index: 1; left: 12px; top: 12px; padding: 6px 9px; color: var(--ink); background: var(--mark); }
.exhibit-cross { position: absolute; right: 12px; bottom: 4px; font: 300 1.9rem/1 monospace; color: var(--mark); }
.game-window { width: clamp(168px, 18.5vw, 230px); aspect-ratio: 360/341; border: 2px solid #bc9dff; border-radius: 6px; background: #061726; overflow: hidden; box-shadow: 7px 7px 0 #120b27; transform: rotate(-4deg); transition: transform .2s ease; }
.game-window img { display: block; width: 100%; height: auto; }
.exhibit-link:hover .game-window, .exhibit-link:focus-visible .game-window { transform: rotate(-1deg) translateY(-2px); }
.exhibit-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 8px; }
.exhibit-caption h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -.05em; line-height: 1; }
.exhibit-caption p, .game-note { color: #ede6d9; font-size: .93rem; line-height: 1.45; }
.exhibit-caption p { margin-top: 6px; }
.play-game { display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; padding: 10px 12px; border: 1px solid var(--mark); border-radius: 3px; color: var(--mark); font-weight: 700; font-size: .9rem; }
.exhibit-link:hover .play-game { background: var(--mark); color: var(--ink); }
.game-note { padding: 0 20px 18px; color: #c8c0b4; }

.ideas, .classes, .about { padding-block: clamp(42px, 6vw, 80px); border-bottom: 1px solid var(--ink); }
.ideas { background: #ece5ff; }
.ideas-layout, .course-layout { display: grid; gap: clamp(22px, 4vw, 62px); }
.ideas-intro, .course-intro, .teacher-intro > div { display: grid; align-content: start; justify-items: start; gap: 14px; }
.ideas-intro > p:last-child, .course-intro > p:last-child, .teacher-intro p { max-width: 48ch; }
.idea-picker { align-self: center; min-width: 0; }
.idea-picker fieldset { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; padding: 0; border: 0; margin: 0 0 16px; }
.idea-picker [hidden] { display: none; }
.idea-picker label { position: relative; cursor: pointer; }
.idea-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.idea-picker label span { display: grid; place-items: center; min-height: 44px; padding: 8px 16px; border-radius: 100px; border: 1px solid var(--ink); background: transparent; font: 700 .95rem/1.2 var(--body); }
.idea-picker input:checked + span { background: var(--ink); color: white; }
.idea-picker input:focus-visible + span { outline: 3px solid var(--btn); outline-offset: 3px; }
.idea-results { background: var(--paper); padding: 2px 22px; border-left: 5px solid var(--btn); }
.idea-result { display: grid; align-content: start; justify-items: start; gap: 9px; padding: 18px 0 12px; }
.idea-result + .idea-result { border-top: 1px solid #a79aaa; }
.idea-picker:has(fieldset:not([hidden])) .idea-result { border-top: 0; }
.idea-result h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.idea-result p { font-size: 1rem; }
.idea-result .go { color: var(--btn); font-size: .96rem; }
.course-facts { margin: 0; align-self: center; }
.course-facts > div { display: grid; grid-template-columns: minmax(90px, .65fr) 1.35fr; gap: 12px; padding: 13px 0; border-top: 1px solid #beb5a6; }
.course-facts dt { font-weight: 700; }
.course-facts dd { margin: 0; color: var(--muted); }
.course-facts dd a { color: var(--btn); font-weight: 700; }
.about { background: #f3efe5; }
.teacher-intro { display: grid; align-items: start; gap: 24px; }
.teacher-portrait { width: clamp(100px, 14vw, 168px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.teacher-intro p { max-width: 60ch; }
.about .logo-note { margin-top: 16px; color: var(--muted); font-size: .96rem; }
.academy .logo-row { background: transparent; border: 0; border-top: 1px solid #beb5a6; box-shadow: none; border-radius: 0; padding: 24px 0 0; }
@media (min-width: 740px) {
  .hero > .wrap { grid-template-columns: 1.04fr minmax(0, 1fr); }
  .ideas-layout, .course-layout { grid-template-columns: 1fr 1.05fr; }
  .teacher-intro { grid-template-columns: auto 1fr; gap: 38px; }
  .academy .logo-row { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 739px) {
  .hero > .wrap { max-width: 600px; }
  .hero h1 { font-size: clamp(3.4rem, 11.5vw, 5.5rem); }
  .exhibit-art { height: clamp(180px, 46vw, 255px); }
  .game-window { width: clamp(142px, 38vw, 196px); }
  .hero-actions .btn { min-height: 46px; }
}
@media (max-width: 999px) {
  .academy .topbar nav { display: none; }
  .academy .topbar .wrap, .academy .top-actions { gap: 10px; }
}
@media (max-width: 520px) {
  .brand-academy { display: none; }
}
@media (max-width: 440px) {
  .exhibit-caption { padding: 14px 12px 6px; }
  .game-note { padding-inline: 12px; }
  .exhibit-caption p, .game-note { font-size: .86rem; }
  .play-game { font-size: .8rem; padding: 9px; }
}

/* Parents FAQ */
.parents { padding-block: 64px; border-top: var(--edge); }
.parents .wrap { display: grid; gap: 22px; }
.faq { display: grid; gap: 16px; margin-top: 8px; }
.faq details { background: var(--white); border: var(--edge); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 20px; font: 800 clamp(1.15rem, 3.6vw, 1.4rem)/1.2 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.8rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 20px 20px; max-width: 40em; }

/* Contact */
.contact { background: var(--close); color: var(--on-close); text-align: center; border-top: var(--edge); padding-block: 72px 64px; }
.contact .wrap { display: grid; justify-items: center; gap: 24px; }
.contact h2 { font-size: clamp(3rem, 13vw, 7rem); font-weight: 800; line-height: .9; letter-spacing: -.04em; }
.contact p { max-width: 30em; font-weight: 500; }
.contact small { font-size: .98rem; font-weight: 500; max-width: 30em; }

@media (min-width: 1000px) { .topbar nav ul { display: flex; } }

/* Link cards: guides under the parents FAQ and "Keep reading" on guide pages. */
.related { display: grid; gap: 12px; }
.related a { display: block; padding: 16px 18px; background: var(--white); border: var(--edge); border-radius: 16px; box-shadow: 5px 5px 0 var(--ink); text-decoration: none; font: 800 1.15rem/1.25 var(--display); }
.related a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.guides { margin-top: 12px; }

/* Small phones: keep the top bar on one line */
.lang, .btn.small, .brand { white-space: nowrap; }
@media (max-width: 420px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Site assistant */
.ask { padding-block: 64px; border-top: var(--edge); background: var(--b3); color: var(--on-b3); }
.ask .wrap { display: grid; gap: 18px; }
.ask-lead { max-width: 36em; font-size: 1.12rem; }
.chat { display: grid; background: var(--white); color: var(--ink); border: var(--edge); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 220px; max-height: min(60vh, 520px); overflow-y: auto; padding: 20px; scroll-behavior: smooth; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 16px; }
.chat-chips[hidden] { display: none; }
.chip { min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); color: var(--ink); font: 700 .95rem/1.2 var(--body); cursor: pointer; text-align: left; }
.chip:hover { background: var(--mark); color: var(--on-mark); }
.bubble { display: grid; gap: 4px; max-width: 88%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 16px; }
.bubble .who { font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; opacity: .75; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble a { font-weight: 700; }
.bubble.user { align-self: flex-end; background: var(--btn); color: var(--on-btn); border-bottom-right-radius: 4px; }
.bubble.assistant { align-self: flex-start; background: var(--cream); border-bottom-left-radius: 4px; }
.bubble.error { background: #FFE9E3; }
.bubble p.pending { opacity: .65; }
.chat-note { align-self: center; font-size: .9rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream); }
.chat-note.ok { background: var(--mark); color: var(--on-mark); }
.chat-note.warn { background: #FFE9E3; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 14px; border-top: var(--edge); background: var(--cream); }
.chat-form textarea { flex: 1; min-height: 68px; max-height: 160px; resize: vertical; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; font: 400 1rem/1.4 var(--body); background: var(--white); color: var(--ink); }
.chat-form textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.chat-form .btn { min-height: 52px; padding: 10px 18px; box-shadow: 4px 4px 0 var(--ink); }
.chat-form .btn:disabled { opacity: .55; cursor: progress; transform: none; }
.chat-fine { font-size: .9rem; max-width: 46em; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .chat-log { scroll-behavior: auto; } }

/* Enquiry form (contact section) */
.enquiry { display: grid; gap: 14px; width: min(100%, 620px); padding: 22px; text-align: left; background: var(--white); color: var(--ink); border: var(--edge); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); }
.enquiry .field { display: grid; gap: 6px; font-weight: 700; font-size: .98rem; }
.enquiry input, .enquiry select, .enquiry textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--cream); color: var(--ink); font: 400 1rem/1.4 var(--body); }
.enquiry textarea { resize: vertical; }
.enquiry input:focus-visible, .enquiry select:focus-visible, .enquiry textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.enquiry [aria-invalid="true"] { border-color: #C2361A; background: #FFE9E3; }
.enquiry .field-row { display: grid; gap: 14px; }
.enquiry .age input { max-width: 140px; }
.who-field { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; border: 0; font-weight: 500; }
.who-field legend { font-weight: 700; margin-bottom: 6px; width: 100%; }
.who-field label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.who-field input { width: 20px; height: 20px; min-height: 0; accent-color: var(--ink); }
.enquiry .btn { justify-self: start; }
.enquiry .btn:disabled { opacity: .55; cursor: progress; transform: none; }
.enquiry small { color: var(--muted); font-size: .9rem; }
.enquiry-status { font-weight: 700; min-height: 1.4em; }
.enquiry-status.ok { color: #13663F; }
.enquiry-status.err { color: #A62A12; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.or-linkedin { font-weight: 500; }
.or-linkedin a { font-weight: 700; }
@media (min-width: 640px) { .enquiry .field-row { grid-template-columns: 200px 1fr; } }

.academy .parents, .academy .ask, .academy .contact { border-top: 0; }
.academy .ask, .academy .contact { border-top: 1px solid var(--ink); }
.academy .faq details, .academy .related a, .academy .chat, .academy .enquiry { border: 1px solid var(--ink); border-radius: 5px; box-shadow: none; }
.academy .faq { gap: 8px; }
.academy .contact h2 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
.academy .chat { grid-template-columns: minmax(0, 1fr); }
.academy .chat > * { min-width: 0; }
.academy .chat-form textarea { width: 0; min-width: 0; }
@media (min-width: 740px) and (max-width: 999px), (max-width: 360px) {
  .exhibit-caption { align-items: start; flex-direction: column; }
}
.academy .enquiry .field-row { grid-template-columns: 1fr; }
@media (min-width: 640px) { .academy .enquiry .field-row { grid-template-columns: 200px 1fr; } }
