/* RAAS design system, with three themes chosen from the header (stored in the browser):
   nexus    – default. Futuristic: deep navy, cyan glow, hexagon grid (from the RAAS banners).
   daylight – the same futuristic shapes on a bright background.
   classic  – the academic look: vellum paper, crest ink and brass, serif headings.
   Tokens: --ink (dark bands), --brass (the accent), --lapis (links), --text, --muted, --bg, --surface, --line. */
:root, :root[data-theme="nexus"] {
  --ink: #061331; --ink-2: #0b1d45; --lapis: #5fd4ff; --lapis-soft: rgba(63, 208, 255, .12);
  --vellum: #040b1a; --paper: #0a1a36; --brass: #3fd0ff; --brass-2: #7ee2ff; --brass-soft: rgba(63, 208, 255, .12);
  --slate: #8fb3d4; --line: rgba(95, 212, 255, .2); --good: #5ef0b0; --good-bg: rgba(94, 240, 176, .1); --bad: #ff8a8a; --bad-bg: rgba(255, 138, 138, .1);
  --warn: #ffd27a; --warn-bg: rgba(255, 210, 122, .1); --info: #7fc8ff; --info-bg: rgba(127, 200, 255, .1);
  --text: #e6f4ff; --muted: #9dbbd8; --bg: #040b1a; --surface: rgba(11, 29, 64, .72); --on-accent: #021022;
  --serif: 'Exo 2', 'Segoe UI', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --glow: 0 0 18px rgba(63, 208, 255, .45), 0 0 2px rgba(63, 208, 255, .9);
  --shadow: 0 0 0 1px rgba(95, 212, 255, .12), 0 12px 40px rgba(0, 0, 0, .45);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16.2 V48.5 L28 64.7 L0 48.5 V16.2 Z M28 64.7 V97' fill='none' stroke='%2363d4ff' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root[data-theme="daylight"] {
  --ink: #06204a; --ink-2: #0b2d63; --lapis: #0a6fd1; --lapis-soft: #e2f1fd;
  --vellum: #f3f8fd; --paper: #ffffff; --brass: #0a8fd6; --brass-2: #087cbb; --brass-soft: #e0f3fd;
  --slate: #3f5a78; --line: #cfe0f0; --good: #157347; --good-bg: #e2f5ea; --bad: #b42318; --bad-bg: #fde8e6; --warn: #8a5a00; --warn-bg: #fff3d6; --info: #0a6fd1; --info-bg: #e2f1fd;
  --text: #071a33; --muted: #46617f; --bg: #f3f8fd; --surface: #ffffff; --on-accent: #ffffff;
  --serif: 'Exo 2', 'Segoe UI', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --glow: none; --shadow: 0 1px 2px rgba(7, 26, 51, .06), 0 10px 30px rgba(7, 26, 51, .08);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16.2 V48.5 L28 64.7 L0 48.5 V16.2 Z M28 64.7 V97' fill='none' stroke='%230a6fd1' stroke-opacity='.06' stroke-width='1'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="classic"] {
  --ink: #0e1a33; --ink-2: #16264a; --lapis: #1f5fbf; --lapis-soft: #dbe6f7;
  --vellum: #f2f4f7; --paper: #ffffff; --brass: #b5852a; --brass-2: #c99a3d; --brass-soft: #f3e7cc;
  --slate: #4a5568; --line: #d9dee7; --good: #1d7a46; --good-bg: #e3f4ea; --bad: #b42318; --bad-bg: #fde8e6; --warn: #8a5a00; --warn-bg: #fff3d6; --info: #1f5fbf; --info-bg: #e3edfb;
  --text: #0e1a33; --muted: #4a5568; --bg: #f2f4f7; --surface: #ffffff; --on-accent: #10182c;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif; --mono: 'Public Sans', system-ui, sans-serif;
  --glow: none; --shadow: 0 1px 2px rgba(14, 26, 51, .06), 0 8px 24px rgba(14, 26, 51, .06); --hex: none;
  color-scheme: light;
}
:root {
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-sm: .875rem; --t-base: 1.0625rem; --t-md: 1.25rem; --t-lg: 1.5625rem;
  --t-xl: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); --t-2xl: clamp(2.4rem, 1.5rem + 3.6vw, 4.4rem);
  --gutter: 16px; --wide: 1200px; --measure: 70ch; --radius: 14px; --ease: cubic-bezier(.2, .7, .1, 1);
}
@media (min-width: 700px) { :root { --gutter: clamp(16px, 4vw, 40px); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--t-base)/1.6 var(--sans); text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lapis); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--text); text-wrap: balance; }
h1 { font-size: var(--t-2xl); } h2, .h2 { font-size: var(--t-xl); } h3, .h3 { font-size: var(--t-lg); } h4, .h4 { font-size: var(--t-md); }
p { margin: 0 0 1em; } code { font-size: .92em; background: var(--lapis-soft); padding: .1em .35em; border-radius: 5px; }
.wrap { width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.small { font-size: var(--t-sm); } .meta { color: var(--muted); font-size: var(--t-sm); }
.lede { font-size: var(--t-md); color: var(--muted); max-width: 62ch; } .lede-sm { color: var(--muted); }
.kicker { font: 600 .78rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: .9em; }
.center { text-align: center; }
.hp { position: absolute; left: -5000px; }
.preview-bar { background: #ffd34d; color: #3a2a00; text-align: center; font: 600 var(--t-sm)/1.3 var(--sans); padding: 6px 16px; }
.notice-bar { background: var(--ink); color: #fff; text-align: center; font-size: var(--t-sm); padding: 8px 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.35em; border-radius: 999px; font: 600 var(--t-sm)/1.1 var(--sans);
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
  background: var(--surface); color: var(--text); border-color: var(--line); min-height: 44px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brass); color: var(--on-accent); border-color: var(--brass); }
.btn-primary:hover { background: var(--brass-2); border-color: var(--brass-2); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-small { padding: .55em 1em; min-height: 38px; font-size: .82rem; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn.danger, .linklike.danger { color: var(--bad); }
.linklike { background: none; border: 0; padding: 0; color: var(--lapis); font: inherit; text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 40px; height: auto; }
.brand span { display: grid; line-height: 1.1; }
.brand strong { font: 600 1.15rem/1 var(--serif); letter-spacing: .06em; }
.brand small { font-size: .72rem; color: var(--muted); }
.brand-light, .brand-light small { color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); position: relative; cursor: pointer; }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--text); content: ''; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle span:first-child { top: 21px; } .nav-toggle span:first-child::before { left: 0; top: -6px; } .nav-toggle span:first-child::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-6px) rotate(-45deg); }
.nav { display: flex; align-items: center; gap: 18px; }
.nav > ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 2px; }
.nav li { position: relative; }
.nav > ul > li > a { display: block; white-space: nowrap; padding: 10px 9px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; border-radius: 10px; }
.nav > ul > li > a:hover, .nav a[aria-current="page"] { color: var(--lapis); }
.sub-toggle { display: none; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; list-style: none; margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .sub-toggle[aria-expanded="true"] + .sub { display: block; }
.sub a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: .93rem; }
.sub a:hover { background: var(--lapis-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.search-link { display: grid; place-items: center; width: 40px; height: 40px; color: var(--text); border-radius: 10px; }
@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: fixed; inset: 69px 0 0; background: var(--bg); flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 40px; overflow-y: auto; gap: 12px; }
  .nav.open { display: flex; }
  .nav > ul { flex-direction: column; }
  .nav > ul > li { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; }
  .nav > ul > li > a { padding: 14px 4px; font-size: 1.05rem; }
  .sub-toggle { display: block; width: 48px; border: 0; background: none; cursor: pointer; position: relative; }
  .sub-toggle::after { content: ''; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); transition: transform .2s; }
  .sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .sub { position: static; grid-column: 1 / -1; box-shadow: none; border: 0; padding: 0 0 10px 8px; background: none; display: none !important; }
  .sub-toggle[aria-expanded="true"] + .sub { display: block !important; }
  .has-sub:hover > .sub { display: none; }
  .nav-actions { flex-wrap: wrap; } .nav-actions .btn { flex: 1; }
  body.menu-open { overflow: hidden; }
  /* The header's blur would trap the fixed menu inside the header's own 68px; drop it while the menu is open. */
  body.menu-open .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav.open { top: var(--menu-top, 69px); bottom: auto; height: calc(100dvh - var(--menu-top, 69px)); max-height: none; z-index: 60; }
}

/* Sections */
.section { padding-block: clamp(48px, 8vw, 104px); }
.section + .section { padding-top: 0; }
.band-paper { background: var(--surface); border-block: 1px solid var(--line); }
.band-paper + .section, .band-ink + .section, .cta-band + .section { padding-top: clamp(48px, 8vw, 104px); }
.band-ink { background: var(--ink); color: #e8ecf4; } .band-ink h2, .band-ink strong { color: #fff; } .band-ink .kicker { color: var(--brass-2); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head h2 { margin: 0; max-width: 22ch; }

/* Hero */
.hero { padding-block: clamp(36px, 7vw, 96px); background: radial-gradient(1200px 500px at 85% -10%, var(--lapis-soft), transparent 60%), radial-gradient(800px 400px at -10% 110%, var(--brass-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: italic; color: var(--brass); }
.hero-art img { border-radius: 24px; box-shadow: var(--shadow); aspect-ratio: 4 / 4.2; object-fit: cover; width: 100%; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 2em 0 0; color: var(--muted); font-size: var(--t-sm); }
.hero-facts strong { display: block; color: var(--text); font: 500 1.35rem/1.2 var(--serif); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; } .hero-art img { aspect-ratio: 16 / 9; } }

/* Pathway finder */
.finder { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 500 .9rem/1.2 var(--sans); cursor: pointer; text-decoration: none; min-height: 40px; }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip small { opacity: .65; }
.finder-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.finder-results a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s var(--ease); }
.finder-results a:hover { border-color: var(--brass); transform: translateX(3px); }
.finder-results span { color: var(--muted); font-size: var(--t-sm); }
@media (max-width: 860px) { .finder { grid-template-columns: 1fr; } }

/* Programmes */
.prog-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.prog a { display: flex; flex-direction: column; height: 100%; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.prog a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brass); }
.prog h3 { font-size: 1.45rem; margin: 10px 0 8px; }
.prog p { color: var(--muted); flex: 1; }
.prog-n { font: 500 .85rem/1 var(--serif); color: var(--brass); letter-spacing: .1em; }
.prog-meta { font-size: .8rem; font-weight: 600; color: var(--lapis); }

/* Steps */
.steps-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 2px 16px; padding: 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); }
.steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: var(--on-accent); font: 600 1.05rem/1 var(--serif); }
.steps span { color: #b9c3d6; font-size: var(--t-sm); }
@media (max-width: 860px) { .steps-wrap { grid-template-columns: 1fr; } }

/* Founder */
.founder { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.founder img { border-radius: 20px; box-shadow: var(--shadow); }
.big-quote { font: italic 400 clamp(1.35rem, 1.1rem + 1vw, 1.9rem)/1.35 var(--serif); margin: 0 0 .8em; border-left: 3px solid var(--brass); padding-left: 1em; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; } .founder figure { max-width: 280px; } }
figure { margin: 0; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-img img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .4s var(--ease); }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 20px; }
.card h3 { font-size: 1.3rem; } .card h3 a { color: var(--text); text-decoration: none; } .card h3 a:hover { color: var(--lapis); }
.card p:last-child { color: var(--muted); font-size: var(--t-sm); margin: 0; }

/* Events */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.event { display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.event h3 { font-size: 1.25rem; margin-bottom: 4px; }
.event-date { text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 0; align-self: start; }
.event-date span { display: block; font: 500 1.6rem/1 var(--serif); } .event-date small { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.event-more { list-style: none; margin: -6px 0 6px 90px; } .events-past { opacity: .75; }

/* CTA */
.cta-band { background: linear-gradient(120deg, var(--ink), #1d3570); color: #fff; padding-block: clamp(40px, 6vw, 72px); }
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.cta h2 { color: #fff; margin-bottom: .2em; } .cta p { color: #c8d1e3; margin: 0; } .cta .btn-ghost { color: #fff; } .cta .actions { margin: 0; }

/* Page heads */
.page-head { position: relative; padding-block: clamp(36px, 6vw, 80px) clamp(28px, 4vw, 48px); background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head h1 { max-width: 22ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-bottom: .3em; }
.page-head.has-image { color: #fff; background: var(--ink); }
.page-head.has-image h1, .page-head.has-image .lede, .page-head.has-image .crumbs, .page-head.has-image .crumbs a { color: #fff; }
.page-head-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; }
.page-head-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 15%, transparent); }
.page-head .wrap { position: relative; }
.crumbs { font-size: var(--t-sm); color: var(--muted); margin-bottom: 1em; }
.crumbs a { color: var(--muted); }

/* Long-form content (imported and Studio-edited) */
.prose { max-width: var(--measure); }
.prose-page, .prose-article { margin-inline: auto; }
.prose-article { font-size: 1.12rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.7em; font-size: var(--t-lg); } .prose h3 { margin-top: 1.5em; font-size: var(--t-md); } .prose h4 { margin-top: 1.3em; font-size: 1.1rem; }
.prose img { border-radius: 12px; margin-inline: auto; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li + li { margin-top: .35em; }
.prose blockquote { margin: 1.6em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--brass); font: italic 1.2rem/1.5 var(--serif); }
.prose .pull blockquote { font-size: 1.35rem; }
.prose .table-wrap, .table-scroll { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
.prose td, .prose th { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.prose details, .acc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.prose summary { cursor: pointer; font-weight: 600; }
.prose .actions { margin-top: 1em; }
.prose a.btn { text-decoration: none; }
.prose .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.prose .media-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: center; }
@media (max-width: 700px) { .prose .media-text { grid-template-columns: 1fr; } }
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prose .rule, .prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .cover { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.embed { position: relative; aspect-ratio: 16 / 9; margin: 1.2em 0; border-radius: 14px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2em; } .share { color: var(--muted); font-size: var(--t-sm); }

/* Layout helpers */
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.aside-card { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
@media (max-width: 900px) { .with-aside { grid-template-columns: 1fr; } .aside-card { position: static; } }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: var(--t-sm); }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.callout { margin-top: 40px; padding: 28px; border-radius: var(--radius); background: var(--brass-soft); }
.plain { list-style: none; padding: 0; } .plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pager { display: flex; justify-content: space-between; margin-top: 32px; }
.empty { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: 12px; }

/* Search and Ask */
.search-form { display: flex; gap: 8px; margin-bottom: 20px; }
.search-form input { flex: 1; }
.results { list-style: none; padding: 0; } .results li { padding: 16px 0; border-bottom: 1px solid var(--line); } .results li p { margin: 4px 0 0; color: var(--muted); }
.results .meta { display: block; }
.ask-form { display: grid; gap: 10px; } .ask-form label { font-weight: 600; }
.ask-answer { margin-top: 20px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }

/* Forms */
input, select, textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 46px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lapis); outline-offset: 1px; border-color: var(--lapis); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--ink); }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; } .field label { font-weight: 600; font-size: .95rem; } .hint { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.req { color: var(--bad); font-weight: 500; font-size: .85em; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0; display: grid; gap: 14px; background: var(--surface); min-width: 0; }
legend { font: 500 1.2rem/1 var(--serif); padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; cursor: pointer; } .check input { margin-top: 4px; }
.chip-check { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
.row2, .row3 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; } .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .row2, .row3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
.inline, .inline-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; } .inline-form select { flex: 1; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; } .filters input, .filters select { width: auto; flex: 1 1 180px; }
.upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label.btn { position: relative; overflow: hidden; } label.btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
label.btn.chosen { border-style: solid; border-color: var(--good); color: var(--good); }
.alert { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; border: 1px solid; }
.alert-good { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 40%, transparent); color: var(--good); }
.alert-bad { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.alert-warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }

/* Booking */
.choice-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.choice-list a { display: grid; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.choice-list a:hover { border-color: var(--brass); } .choice-list span { color: var(--muted); font-size: var(--t-sm); }
.slots { gap: 8px; } .day { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg); } .day summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 10px 0 6px; }
.slot input { position: absolute; opacity: 0; }
.slot span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 500; }
.slot input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot input:focus-visible + span { outline: 3px solid var(--brass); }
.slot small { display: block; font-weight: 400; font-size: .72rem; opacity: .75; }

/* Auth */
.auth { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 32px var(--gutter); }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(22px, 5vw, 36px); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 2rem; margin-bottom: .2em; } .auth-brand img { width: 46px; margin-bottom: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 12px; margin: 14px 0 18px; }
.tabs a { text-align: center; padding: 9px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.tabs a[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; color: var(--muted); font-size: var(--t-sm); margin: 16px 0 4px; }
.or::before, .or::after { content: ''; border-top: 1px solid var(--line); }
.google-wrap { display: grid; justify-items: center; min-height: 44px; margin-top: 14px; }
.split { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.code-input { font: 600 1.6rem/1 var(--sans); letter-spacing: .4em; text-align: center; }

/* Portal and Studio */
.shell-app main { padding-block: 28px 64px; }
.app-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.side { position: sticky; top: 90px; display: grid; gap: 2px; }
.side a { padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.side a:hover { background: var(--surface); } .side a[aria-current="page"] { background: var(--ink); color: #fff; }
.side .side-staff { margin-top: 10px; color: var(--lapis); } .side form { padding: 10px 14px; }
.app-who { color: var(--muted); font-size: var(--t-sm); }
.app-main h1 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); }
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; gap: 16px; }
  .side { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; scrollbar-width: thin; }
  .side a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); } .side form { white-space: nowrap; }
}
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel > summary { cursor: pointer; } .panel-warn { border-color: var(--warn); background: var(--warn-bg); } .panel-good { border-color: var(--good); background: var(--good-bg); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; } .panel-head h1, .panel-head h2 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: grid; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--muted); font-size: var(--t-sm); }
.tile-n { font: 500 2rem/1 var(--serif); color: var(--text); } .tile-sm { font-size: 1.2rem; } .tile-warn { border-color: var(--brass); background: var(--brass-soft); }
.tiles-quiet .tile-n { font-size: 1.5rem; }
.list { list-style: none; padding: 0; margin: 0; } .list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .list li:last-child { border: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 .75rem/1.5 var(--sans); white-space: nowrap; }
.tone-good { background: var(--good-bg); color: var(--good); } .tone-bad { background: var(--bad-bg); color: var(--bad); } .tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-info { background: var(--info-bg); color: var(--info); } .tone-muted { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.data th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); }
table.data th, table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
.progress { display: inline-block; width: 120px; height: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; vertical-align: middle; }
.progress span { display: block; height: 100%; background: var(--good); }
.app-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .app-cols { grid-template-columns: 1fr; } }
.answers { display: grid; gap: 4px 0; margin: 0; } .answers dt { color: var(--muted); font-size: var(--t-sm); margin-top: 10px; } .answers dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; } .doc-list > li { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.doc { font-size: var(--t-sm); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); } .timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--brass); }
.timeline .meta { display: block; } .timeline p { margin: 4px 0 0; white-space: pre-wrap; }
.amount { font: 500 2.6rem/1 var(--serif); margin: 6px 0 20px; }
.pay-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.pay-option { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.bank { background: var(--bg); padding: 12px; border-radius: 10px; }
.course-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.course-card a { display: grid; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; height: 100%; }
.course-card p { color: var(--muted); font-size: var(--t-sm); margin: 0; }
.lesson-list { padding-left: 1.4em; } .lesson-list li { padding: 6px 0; } .lesson-list li.done a { color: var(--muted); } .tick { color: var(--good); font-weight: 700; }
.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.thread { display: grid; gap: 10px; margin-bottom: 20px; }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg p { margin: 0; } .msg .meta { margin-bottom: 4px; } .msg-me { justify-self: end; background: var(--lapis-soft); }
.note { background: var(--bg); padding: 10px 12px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.booking.cancelled { opacity: .6; }
.media-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.media-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 6px; }
.media-grid img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; } .media-grid input { font-size: .75rem; min-height: 34px; padding: 6px; }
.file-icon { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--bg); border-radius: 8px; font-weight: 700; color: var(--bad); }
.announcement + .announcement { border-top: 1px solid var(--line); padding-top: 12px; }

/* Studio editor */
.editor { border: 1px solid #b9c2d2; border-radius: 12px; overflow: hidden; background: var(--surface); }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 68px; z-index: 3; }
.ed-toolbar button { font: 600 .82rem/1 var(--sans); padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; cursor: pointer; min-height: 34px; }
.ed-toolbar button.on { background: var(--ink); color: #fff; }
.ed-area { min-height: 320px; padding: 16px 18px; max-width: none; outline: none; }
.ed-source { border: 0; border-radius: 0; font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; min-height: 320px; }

/* Certificate verification and certificate */
.cert-check { margin-top: 20px; padding: 24px; border-radius: var(--radius); border: 2px solid; }
.cert-check.good { border-color: var(--good); background: var(--good-bg); } .cert-check.bad { border-color: var(--bad); background: var(--bad-bg); }
.certificate { background: #fffdf7; color: #0e1a33; border: 10px double var(--brass); padding: clamp(18px, 4vw, 48px); margin: 16px 0; aspect-ratio: 1.414; display: grid; place-items: center; text-align: center; }
.cert-inner { display: grid; justify-items: center; gap: 4px; width: 100%; }
.cert-org { font: 600 1rem/1.2 var(--serif); letter-spacing: .2em; text-transform: uppercase; margin: 8px 0 0; }
.cert-kind { font: italic 400 clamp(1.4rem, 3vw, 2.3rem)/1.2 var(--serif); color: var(--brass); margin: 6px 0 10px; }
.cert-this { margin: 0; color: #4a5568; } .cert-name { font: 500 clamp(1.6rem, 4vw, 2.8rem)/1.2 var(--serif); margin: 6px 0; border-bottom: 1px solid #c9b47d; padding: 0 24px 6px; }
.cert-title { font: 600 clamp(1.1rem, 2.4vw, 1.5rem)/1.3 var(--serif); margin: 6px 0; } .cert-cpd { font-weight: 600; margin: 0; }
.cert-foot { display: grid; grid-template-columns: 1fr 90px 1fr; gap: 18px; align-items: end; width: 100%; margin-top: 18px; font-size: .85rem; }
.cert-foot p { margin: 0; } .cert-sign { font: italic 1.2rem/1 var(--serif); border-top: 1px solid #0e1a33; padding-top: 6px; }
.cert-qr svg { width: 90px; height: 90px; }
.receipt { max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }

/* Footer */
.foot { background: var(--ink); color: #c8d1e3; padding-block: 56px 28px; margin-top: 0; }
.foot a { color: #fff; text-decoration: none; } .foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .95rem; }
.foot-h { font: 600 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass-2); margin-bottom: 14px; }
.foot-motto { font: italic 1.05rem/1.4 var(--serif); color: #fff; margin-top: 14px; } .foot small { color: #8e9ab3; }
.social { display: flex; gap: 14px; margin-top: 14px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.mini-foot { padding: 24px 0; color: var(--muted); font-size: var(--t-sm); border-top: 1px solid var(--line); }

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  @supports (animation-timeline: view()) {
    .prog, .card, .steps li, .event { animation: settle-in linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes settle-in { from { transform: translateY(18px); } }
  }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media print {
  .top, .foot, .mini-foot, .side, .no-print, .app-who, .preview-bar, .notice-bar { display: none !important; }
  body { background: #fff; } .app-grid { display: block; } .certificate { border-width: 8px; margin: 0; page-break-inside: avoid; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* ---------- Futuristic layer (Nexus and Daylight themes) ---------- */
:root:not([data-theme="classic"]) body { background-color: var(--bg); background-image: var(--hex); background-size: 56px 97px; background-attachment: fixed; }
:root[data-theme="nexus"] body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 600px at 15% 10%, rgba(43, 123, 255, .16), transparent 60%), radial-gradient(700px 500px at 90% 30%, rgba(63, 208, 255, .10), transparent 60%), radial-gradient(900px 700px at 50% 110%, rgba(43, 123, 255, .14), transparent 60%); }
:root:not([data-theme="classic"]) h1, :root:not([data-theme="classic"]) h2 { font-weight: 700; letter-spacing: .01em; }
:root[data-theme="nexus"] h1, :root[data-theme="nexus"] .page-head h1 { text-shadow: 0 0 28px rgba(63, 208, 255, .35); }
:root:not([data-theme="classic"]) .kicker { font: 600 .74rem/1.2 var(--mono); letter-spacing: .22em; color: var(--brass); }
:root:not([data-theme="classic"]) .kicker::after { content: ''; display: block; width: 44px; height: 2px; margin-top: 10px; background: var(--brass); box-shadow: var(--glow); }
:root:not([data-theme="classic"]) .btn { border-radius: 10px; letter-spacing: .04em; }
:root[data-theme="nexus"] .btn-primary { box-shadow: 0 0 20px rgba(63, 208, 255, .35); }
:root[data-theme="nexus"] .btn-primary:hover { box-shadow: 0 0 30px rgba(63, 208, 255, .6); }
:root[data-theme="nexus"] .btn-ghost { border-color: rgba(95, 212, 255, .55); color: var(--text); }
:root[data-theme="nexus"] .top { background: rgba(4, 11, 26, .78); }
:root[data-theme="nexus"] .sub, :root[data-theme="nexus"] .nav-toggle { background: #0a1a36; }
:root[data-theme="nexus"] .band-paper, :root[data-theme="nexus"] .page-head { background: rgba(6, 19, 49, .55); }
:root[data-theme="nexus"] .page-head.has-image { background: #061331; }
:root[data-theme="nexus"] .page-head-img::after { background: linear-gradient(90deg, #061331 20%, transparent); }
:root[data-theme="nexus"] .cta-band { background: linear-gradient(120deg, #061331, #0b2d63 60%, #08385e); border-block: 1px solid var(--line); }
:root[data-theme="nexus"] .foot { background: #030915; border-top: 1px solid var(--line); }
:root[data-theme="nexus"] .chip[aria-pressed="true"], :root[data-theme="nexus"] .chip[aria-current="page"], :root[data-theme="nexus"] .slot input:checked + span { background: var(--brass); color: var(--on-accent); border-color: var(--brass); }
:root[data-theme="nexus"] .event-date { background: transparent; border: 1px solid var(--brass); color: var(--brass); box-shadow: var(--glow); }
:root[data-theme="nexus"] .prose blockquote, :root[data-theme="nexus"] .big-quote { border-left-color: var(--brass); }
:root[data-theme="nexus"] input, :root[data-theme="nexus"] select, :root[data-theme="nexus"] textarea { background: rgba(4, 11, 26, .7); }
:root[data-theme="nexus"] .prose img { box-shadow: 0 0 0 1px var(--line); }
:root[data-theme="nexus"] .certificate, :root[data-theme="nexus"] .cert-check { color: inherit; }

/* Panels with corner brackets, like the frames on the banners. */
:root:not([data-theme="classic"]) .prog a, :root:not([data-theme="classic"]) .card, :root:not([data-theme="classic"]) .aside-card, :root:not([data-theme="classic"]) .event, :root:not([data-theme="classic"]) .finder-results a, :root:not([data-theme="classic"]) .choice-list a {
  border-radius: 6px; backdrop-filter: blur(6px);
  background-image: linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass));
  background-repeat: no-repeat; background-size: 14px 2px, 2px 14px, 14px 2px, 2px 14px; background-position: 0 0, 0 0, 100% 100%, 100% 100%;
  background-color: var(--surface);
}
:root[data-theme="nexus"] .prog a:hover, :root[data-theme="nexus"] .card:hover, :root[data-theme="nexus"] .finder-results a:hover, :root[data-theme="nexus"] .choice-list a:hover { box-shadow: 0 0 0 1px var(--brass), 0 0 30px rgba(63, 208, 255, .22); }
:root:not([data-theme="classic"]) .prog h3 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; }
.prog-n { font-family: var(--mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; }
.prog-n::after { content: ''; display: block; width: 36px; height: 2px; margin-top: 8px; background: currentColor; }
:root[data-theme="nexus"] .prog-n { text-shadow: var(--glow); }

/* Hero emblem: the crest with orbiting rings. */
.hero-grid--emblem { grid-template-columns: minmax(240px, .8fr) 1.2fr; }
.emblem { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 440px; width: 100%; margin-inline: auto; }
.emblem img { position: relative; z-index: 2; width: 62%; height: auto; filter: drop-shadow(0 0 24px rgba(63, 208, 255, .55)); }
.emblem .crest-dark { width: 78%; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }
.emblem .crest-light { display: none; width: 44%; filter: drop-shadow(0 8px 24px rgba(7, 26, 51, .25)); }
:root[data-theme="daylight"] .emblem .crest-dark, :root[data-theme="classic"] .emblem .crest-dark { display: none; }
:root[data-theme="daylight"] .emblem .crest-light, :root[data-theme="classic"] .emblem .crest-light { display: block; }
.orbit { position: absolute; inset: 6%; border-radius: 50%; border: 1px solid var(--line); transform: rotateX(72deg); }
.orbit::before { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); box-shadow: var(--glow); }
.orbit-2 { inset: 0; border-style: dashed; opacity: .7; } .orbit-3 { inset: 14%; border-color: var(--brass); opacity: .5; }
.emblem-floor { position: absolute; bottom: 4%; left: 12%; right: 12%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(63, 208, 255, .35), transparent); filter: blur(6px); }
:root[data-theme="classic"] .orbit, :root[data-theme="classic"] .emblem-floor { display: none; }
.wordmark { display: block; font: 800 clamp(3.4rem, 2rem + 7vw, 7.2rem)/.9 var(--serif); letter-spacing: .12em; margin: 0 0 .1em; color: var(--brass);
  background: linear-gradient(180deg, var(--brass-2), var(--brass)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
:root[data-theme="nexus"] .wordmark { filter: drop-shadow(0 0 22px rgba(63, 208, 255, .45)); }
:root[data-theme="classic"] .wordmark { letter-spacing: .06em; font-weight: 600; }
.hero-name { font: 600 clamp(.95rem, .8rem + .6vw, 1.25rem)/1.3 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin: 0 0 .7em; }
:root[data-theme="classic"] .hero-name { letter-spacing: .04em; text-transform: none; }
.hero-motto { font: 600 clamp(1.4rem, 1rem + 1.6vw, 2.2rem)/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .6em; }
:root[data-theme="classic"] .hero-motto { text-transform: none; letter-spacing: 0; font-style: italic; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1.4em 0 0; }
.hero-chips a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font: 600 .74rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-decoration: none; background: var(--surface); }
.hero-chips a:hover, .hero-chips li:first-child a { border-color: var(--brass); color: var(--brass); box-shadow: inset 0 0 12px var(--brass-soft); }
.hero--emblem { background: none; }
:root[data-theme="classic"] .hero--emblem { background: radial-gradient(1200px 500px at 85% -10%, var(--lapis-soft), transparent 60%); }
@media (max-width: 860px) { .hero-grid--emblem { grid-template-columns: 1fr; } .emblem { max-width: 300px; } }

/* Floating particles (decorative, Nexus only). */
.particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.particles i { position: absolute; width: 3px; height: 3px; border-radius: 1px; background: var(--brass); opacity: .5; box-shadow: var(--glow); animation: drift 14s linear infinite; }
.particles i:nth-child(odd) { width: 2px; height: 2px; animation-duration: 19s; opacity: .35; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-120px); opacity: 0; } }
:root:not([data-theme="nexus"]) .particles { display: none; }
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }

/* Theme switcher. */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.theme-switch button { width: 32px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.theme-switch button[aria-pressed="true"] { background: var(--brass); color: var(--on-accent); }
.theme-switch svg { width: 16px; height: 16px; }
@media (max-width: 1240px) { .theme-switch { align-self: flex-start; } }

/* ---------- 3D globe (home hero) ---------- */
.globe { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin-inline: auto; touch-action: pan-y; }
.globe .emblem { position: absolute; inset: 0; max-width: none; }
.globe-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; z-index: 1; }
.globe.dragging .globe-canvas { cursor: grabbing; }
.globe.globe-ready .emblem { display: none; }
.globe-crest, .globe-caption, .globe-hint { display: none; }
.globe.globe-ready .globe-crest { display: block; position: absolute; z-index: 2; right: 4%; bottom: 8%; width: 17%; height: auto; filter: drop-shadow(0 0 14px rgba(63, 208, 255, .55)); animation: hover-float 6s ease-in-out infinite; pointer-events: none; }
.globe.globe-ready .globe-caption { display: block; position: absolute; z-index: 2; left: 0; top: 6%; margin: 0; font: 700 .72rem/1.5 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--brass); pointer-events: none; }
.globe-caption span { display: block; }
.globe-caption span:last-child { color: var(--text); }
.globe.globe-ready .globe-hint { display: block; position: absolute; z-index: 2; left: 50%; bottom: -2%; transform: translateX(-50%); margin: 0; font: 500 .7rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .8; pointer-events: none; white-space: nowrap; }
@keyframes hover-float { 50% { transform: translateY(-8px); } }
@media (max-width: 860px) { .globe { max-width: 360px; } }

/* ---------- 3D tilt on cards (mouse and trackpad only) ---------- */
.tilt { transform-style: preserve-3d; transition: transform .35s var(--ease), box-shadow .25s; will-change: transform; }
.tilt.tilting { transition: transform .08s linear, box-shadow .25s; }
.tilt .tilt-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(126, 226, 255, .18), transparent 45%); }
.tilt.tilting .tilt-glare { opacity: 1; }
:root[data-theme="classic"] .tilt .tilt-glare { background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 50%), rgba(181, 133, 42, .12), transparent 45%); }
.prog a, .card, .course-card a { position: relative; }
.foot-reach { font: 700 .74rem/1.4 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--brass-2); margin: 16px 0 0; }
:root[data-theme="classic"] .foot-reach { font-family: var(--sans); letter-spacing: .12em; }

/* Profile header (Founder page): portrait beside the name. */
.profile-grid { display: grid; grid-template-columns: 1.2fr minmax(220px, 380px); gap: clamp(24px, 5vw, 64px); align-items: center; }
.profile-head h1 { margin-bottom: .25em; }

.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); }
:root[data-theme="nexus"] .portrait img { box-shadow: 0 0 0 1px var(--line), 0 0 40px rgba(63, 208, 255, .25); }
:root:not([data-theme="classic"]) .portrait::before, :root:not([data-theme="classic"]) .portrait::after { content: ''; position: absolute; width: 28px; height: 28px; border: 2px solid var(--brass); z-index: 1; }
:root:not([data-theme="classic"]) .portrait::before { top: -8px; left: -8px; border-right: 0; border-bottom: 0; }
:root:not([data-theme="classic"]) .portrait::after { bottom: -8px; right: -8px; border-left: 0; border-top: 0; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } .portrait { max-width: 320px; order: -1; } }

/* ---------- Open Shelf ---------- */
.shelf-search { display: flex; gap: 8px; max-width: 640px; margin: 0 0 16px; } .shelf-search input { flex: 1; }
.shelf-chips { margin: 0 0 12px; } .shelf-chips .chip { text-decoration: none; } .shelf-chips .chip.on { background: var(--brass); color: #0e1a33; border-color: var(--brass); }
.shelf-grid { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.shelf-card a { position: relative; display: grid; gap: 8px; height: 100%; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: var(--surface, var(--paper));
  overflow: hidden; }
.shelf-card a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--brass), transparent); }
.shelf-card h3 { margin: 0; font-size: 1.15rem; }
.shelf-card p { margin: 0; }
.shelf-kind { display: inline-flex; gap: 8px; align-items: center; font: 600 .72rem/1 var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.shelf-kind b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brass-soft, rgba(181, 133, 42, .15)); color: var(--brass); font-size: .9rem; letter-spacing: 0; }
.shelf-go { margin-top: auto; font-weight: 600; color: var(--brass); }

/* ---------- Open Shelf: resource-centre tablets ---------- */
.shelf-centres-head { margin-top: 48px; }
.centre-sub { margin: 28px 0 12px; font-size: 1.1rem; }
.centre-grid { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
.centre-card a { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; padding: 10px; border-radius: 22px; color: inherit; text-decoration: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--text) 14%, var(--surface)), var(--surface)); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 18px 34px -24px rgba(0, 0, 0, .7); }
.centre-card a::after { content: ''; position: absolute; top: 5px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: color-mix(in srgb, var(--text) 30%, transparent); }
.tablet-screen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; margin-top: 6px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 10%, hsl(var(--hue) 75% 62% / .55), transparent 60%), linear-gradient(140deg, hsl(var(--hue) 55% 22%), hsl(calc(var(--hue) + 40) 50% 12%)); }
.tablet-screen::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .18), transparent 35%); pointer-events: none; }
.tablet-mono { font: 800 2rem/1 var(--serif); letter-spacing: .04em; color: #fff; text-shadow: 0 2px 14px hsl(var(--hue) 80% 50% / .6); }
.tablet-topic { position: absolute; left: 10px; bottom: 8px; padding: 2px 8px; border-radius: 999px; font: 600 .68rem/1.4 var(--mono, monospace); letter-spacing: .06em; color: #fff; background: rgba(0, 0, 0, .35); }
.tablet-body { display: grid; gap: 6px; align-content: start; padding: 12px 6px 4px; }
.tablet-body strong { font-size: 1rem; line-height: 1.25; }
.tablet-body > span:nth-child(2) { font-size: .9rem; color: var(--muted); }
.tablet-host { margin-top: auto; font-size: .8rem; font-weight: 600; color: var(--lapis); }
.centre-card a:hover .tablet-mono { transform: scale(1.06); } .tablet-mono { transition: transform .3s ease; }
@media (prefers-reduced-motion: reduce) { .tablet-mono { transition: none; } }

/* Careers: search and filters, the list of roles, one role */
.careers-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin: 0 0 12px; }
.careers-filters .field { margin: 0; } .careers-filters input, .careers-filters select { height: 48px; box-sizing: border-box; } .careers-go .btn { height: 48px; }
.careers-go { display: flex; gap: 8px; }
.careers-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.job-card a { position: relative; display: grid; gap: 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: var(--surface, var(--paper)); transition: border-color .2s, transform .2s; }
.job-card a::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius); background: linear-gradient(180deg, var(--brass), transparent); }
.job-card a:hover, .job-card a:focus-visible { border-color: var(--brass); transform: translateY(-2px); }
.job-card h2 { margin: 0; }
.job-card p { margin: 0; color: var(--muted); }
.job-meta, .job-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--muted); }
.job-meta span + span::before, .job-foot span + span::before { content: '·'; margin-right: 14px; }
.job-foot { align-items: center; } .job-foot .shelf-go { margin-left: auto; } .job-foot .shelf-go::before { content: none; }
.job-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.job-aside { position: sticky; top: 96px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface, var(--paper)); }
.job-aside dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; } .job-aside dt { color: var(--muted); } .job-aside dd { margin: 0; }
.job-aside .actions { display: grid; gap: 8px; }
@media (max-width: 860px) { .careers-filters { grid-template-columns: 1fr 1fr; } .careers-q, .careers-go { grid-column: 1 / -1; } .job-grid { grid-template-columns: 1fr; } .job-aside { position: static; } }
@media (prefers-reduced-motion: reduce) { .job-card a { transition: none; } .job-card a:hover { transform: none; } }

/* Library: hero with the 3D round of shelves, the sub-tabs with search, the CSS shelf without WebGL */
.lib-hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 64px) 0 clamp(20px, 3vw, 36px); background: radial-gradient(120% 90% at 80% 40%, var(--brass-soft), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.lib-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.lib-hero h1 { font-size: var(--t-2xl); line-height: 1.05; margin: 6px 0 14px; max-width: 16ch; }
.lib-hero .lede { max-width: 46ch; }
.lib-hero-search { display: flex; gap: 8px; margin: 22px 0 18px; max-width: 560px; } .lib-hero-search input { flex: 1; min-height: 50px; font-size: 1.05rem; }
.lib-hero-search .btn { min-height: 50px; }
.lib-counts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lib-counts a { display: grid; padding: 10px 16px; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: var(--surface); min-width: 120px; transition: border-color .2s; }
.lib-counts a:hover, .lib-counts a:focus-visible { border-color: var(--brass); }
.lib-counts strong { font: 700 1.6rem/1.1 var(--serif); color: var(--brass); } .lib-counts span { font-size: .85rem; color: var(--muted); }
.lib-stage { position: relative; height: clamp(320px, 42vw, 520px); border-radius: 28px; }
.lib-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; display: block; }
.lib-stage:not(.is-3d) .lib-hint { display: none; }
.lib-stage.is-3d .css-shelf { display: none; }
.lib-hint { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 80%, transparent); white-space: nowrap; font: 500 .75rem/1.4 var(--mono); letter-spacing: .03em; color: var(--muted); pointer-events: none; }
.lib-tip { position: absolute; z-index: 2; transform: translate(-50%, -100%); max-width: min(320px, 80%); margin: 0; padding: 6px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .85rem; line-height: 1.35; pointer-events: none; box-shadow: var(--shadow); }
/* The shelf without WebGL: real links, as spines in a row on a lit shelf seen slightly from below. */
.css-shelf { list-style: none; margin: 0; padding: 0 18px; position: absolute; inset: 12% 0 18%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; perspective: 900px;
  border-bottom: 14px solid color-mix(in srgb, var(--ink) 80%, var(--brass)); box-shadow: 0 18px 24px -18px var(--brass); }
.css-shelf li { height: var(--h); flex: 0 0 var(--w); }
.css-shelf a { display: flex; align-items: center; justify-content: center; height: 100%; border-radius: 3px 3px 1px 1px; color: #f4ecd8; text-decoration: none; overflow: hidden;
  background: linear-gradient(90deg, hsl(var(--hue) 45% 16%), hsl(var(--hue) 55% 30%) 50%, hsl(var(--hue) 45% 15%));
  box-shadow: inset 0 10px 0 -6px rgba(232, 200, 120, .8), inset 0 -10px 0 -6px rgba(232, 200, 120, .8), 0 6px 14px rgba(0, 0, 0, .35);
  transform-origin: bottom; transition: transform .25s ease, filter .25s; }
.css-shelf a span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 .72rem/1.1 var(--serif); padding: 12px 0; max-height: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.css-shelf a:hover, .css-shelf a:focus-visible { transform: translateY(-14px) rotateX(-6deg); filter: brightness(1.2); }
.lib-tabs { position: sticky; top: var(--top-h, 64px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lib-tabs-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-top: 10px; padding-bottom: 10px; }
.lib-tab-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; }
.lib-tab-list a { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.lib-tab-list a:hover { background: var(--brass-soft); }
.lib-tab-list a[aria-current="page"] { background: var(--brass); color: var(--on-accent); }
.lib-search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; } .lib-search input { flex: 1; min-width: 0; }
.lib-res-head { margin: 28px 0 4px; } .lib-res-head h2 { margin: 0; }
.lib-help { margin-top: 28px; color: var(--muted); }
@media (max-width: 860px) {
  .lib-hero-grid { grid-template-columns: 1fr; }
  .lib-stage { height: 320px; order: -1; margin: 0 -8px; }
  .lib-hint { white-space: normal; text-align: center; width: max-content; max-width: 90%; }
  .lib-search { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .css-shelf a, .lib-counts a { transition: none; } .css-shelf a:hover, .css-shelf a:focus-visible { transform: none; } }

/* ---------- Sections (About, Programmes, Study abroad, Research, Admissions, Contact): hero, sub-tabs, blocks ---------- */
.sec-hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(28px, 5vw, 72px) 0 clamp(26px, 4vw, 56px); border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 80% at 85% 30%, var(--brass-soft), transparent 60%), radial-gradient(60% 60% at 5% 100%, var(--lapis-soft, transparent), transparent 70%), var(--bg); }
.sec-hero-img { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center; opacity: .1; filter: saturate(.8) blur(1px); }
.sec-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.sec-hero h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 4rem); line-height: 1.04; margin: 14px 0 14px; max-width: 18ch; letter-spacing: -.01em; }
.sec-hero .lede { max-width: 52ch; }
.sec-hero .actions { margin-top: 22px; }
.sec-hero .fx-pill { margin: 10px 0 0; }
.sec-pill-sep { color: var(--muted); }
.sec-stage { position: relative; height: clamp(300px, 36vw, 460px); display: grid; place-items: center; }
.sec-stage .sec-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: grab; }
.sec-stage .sec-canvas:active { cursor: grabbing; }
.sec-stage-crest { position: relative; z-index: 0; opacity: .9; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--brass) 35%, transparent)); }
.sec-stage.is-3d .sec-stage-crest { opacity: .18; filter: blur(.5px); }
.sec-stats { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sec-stats li { display: grid; min-width: 128px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(6px); }
.sec-stats strong { font: 700 1.9rem/1.1 var(--serif); color: var(--brass); } .sec-stats span { font-size: .84rem; color: var(--muted); }
.sec-tabs .lib-tab-list { scrollbar-width: thin; }
.sec-body { position: relative; }
@media (max-width: 860px) { .sec-hero-grid { grid-template-columns: 1fr; } .sec-stage { height: 260px; order: -1; margin: -10px -8px 0; } }

/* Blocks inside pages edited in Nexus (prose-x): cards with a moving light, banners, accordions, quotes */
.prose-x { max-width: 78ch; }
.prose-x .cols { gap: 18px; margin: 1.4em 0; }
.prose-x .col, .prose-x .cover, .prose-x .media-text, .prose-x details, .prose-x .acc { border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s; }
.prose-x .col { padding: 22px; }
.prose-x .col:hover, .prose-x .media-text:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brass) 55%, var(--line)); }
.prose-x .col img, .prose-x figure img { border-radius: 12px; }
.prose-x .cover { position: relative; overflow: hidden; padding: clamp(22px, 4vw, 40px); margin: 1.6em 0; background: linear-gradient(135deg, color-mix(in srgb, var(--brass) 10%, var(--surface)), var(--surface) 55%); }
.prose-x .cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; z-index: -1; border-radius: 0; }
.prose-x .media-text { padding: 18px; margin: 1.6em 0; overflow: hidden; }
.prose-x .media-text figure { margin: 0; overflow: hidden; border-radius: 12px; } .prose-x .media-text figure img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.prose-x .media-text:hover figure img { transform: scale(1.04); }
.prose-x details, .prose-x .acc { padding: 0; margin: 12px 0; overflow: hidden; }
.prose-x details > summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; position: relative; }
.prose-x details > summary::-webkit-details-marker { display: none; }
.prose-x details > summary::after { content: ''; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--brass); border-bottom: 2px solid var(--brass); transform: rotate(45deg); transition: transform .3s; }
.prose-x details[open] > summary::after { transform: rotate(225deg); margin-top: -2px; }
.prose-x details > :not(summary) { padding: 0 20px; } .prose-x details[open] > :last-child { padding-bottom: 16px; }
.prose-x .acc:not(details) { padding: 18px 20px; }
.prose-x blockquote { position: relative; padding: 24px 26px 22px 56px; border: 0; border-radius: 18px; background: var(--surface); font-size: 1.25rem; }
.prose-x blockquote::after { content: '“'; position: absolute; left: 16px; top: 2px; font: 700 3.6rem/1 var(--serif); color: var(--brass); opacity: .8; }
.prose-x h2 { margin-top: 1.8em; }
.prose-x hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); margin: 2em 0; }

/* Programmes: a moving strip of names, then a bento grid with the first programme large */
.prog-marquee { margin-bottom: 22px; } .prog-marquee .chip { white-space: nowrap; }
.prog-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: dense; }
.prog-bento > li { grid-column: span 2; }
.prog-bento > li.prog-feature { grid-column: span 4; grid-row: span 2; }
.prog-bento > li.prog-feature a { padding: clamp(26px, 3vw, 40px); background: radial-gradient(120% 90% at 100% 0%, var(--brass-soft), transparent 55%), var(--surface); }
.prog-bento > li.prog-feature h3 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); }
.prog-go { margin-top: 14px; font-weight: 700; color: var(--brass); }
@media (max-width: 1000px) { .prog-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prog-bento > li, .prog-bento > li.prog-feature { grid-column: span 1; grid-row: auto; } .prog-bento > li.prog-feature { grid-column: 1 / -1; } }
@media (max-width: 620px) { .prog-bento { grid-template-columns: 1fr; } }

/* Admissions: four steps along a line of light that fills as you scroll */
.journey { list-style: none; margin: 0; padding: 0 0 0 0; position: relative; display: grid; gap: 18px; }
.journey::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: var(--line); }
.journey::after { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: linear-gradient(var(--brass), var(--lapis, var(--brass-2))); transform-origin: top;
  box-shadow: 0 0 12px var(--brass); animation: journey-fill linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
@keyframes journey-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@supports not (animation-timeline: view()) { .journey::after { transform: none; } }
.journey-step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.journey-n { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brass); color: var(--on-accent); font: 800 1.1rem/1 var(--serif); box-shadow: 0 0 0 6px var(--bg), 0 0 22px color-mix(in srgb, var(--brass) 55%, transparent); }
.journey-card { padding: 18px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.journey-card h2 { margin: 2px 0 6px; } .journey-card h2 small { font: 500 .85rem/1 var(--sans); color: var(--muted); }
.journey-card .prose > :last-child { margin-bottom: 0; }

/* Contact: a card for each way to reach us */
.contact-ways { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.contact-ways a { display: grid; gap: 4px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.contact-ways a:hover, .contact-ways a:focus-visible { transform: translateY(-3px); }
.cw-icon { font-size: 1.5rem; } .cw-l { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; } .contact-ways strong { overflow-wrap: anywhere; }
.contact-form { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .journey::after { animation: none; transform: none; } .prose-x .col, .prose-x .media-text, .contact-ways a { transition: none; } .prose-x .col:hover, .prose-x .media-text:hover, .contact-ways a:hover { transform: none; } }
.prog-feature a { position: relative; overflow: hidden; }
.prog-feature .prog-orbit { position: absolute; right: -10px; top: 50%; width: 300px; margin-top: -150px; opacity: .95; pointer-events: none; }
.prog-feature a > :not(.prog-orbit) { position: relative; z-index: 1; max-width: 58%; }
@media (max-width: 1000px) { .prog-orbit { display: none; } .prog-feature a > :not(.prog-orbit) { max-width: none; } }
