/* ==========================================================================
   Combined stylesheet. Source files: tokens.css, base.css, components.css,
   pages.css, print.css and assets/fonts/*/*.css. Edit the sources, then run
   tools/build_css.py (developer-only; not needed for content edits).
   ========================================================================== */


/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-000.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-001.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-002.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-003.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-004.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-000.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-001.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-002.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-003.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-004.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist/geist-000.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist/geist-001.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist/geist-002.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist/geist-003.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/geist/geist-004.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-005.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-006.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* symbols2 */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-007.woff2") format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
/* vietnamese */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-008.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-009.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/geist/geist-010.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-005.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-006.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* symbols2 */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-007.woff2") format('woff2');
  unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;
}
/* vietnamese */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-008.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-009.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/geist/geist-010.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;
}


/* Noto Sans TC — subset containing all characters currently used by this
   site plus ASCII/punctuation. Rare new characters fall back to the system
   Chinese font stack in tokens.css. Variable weight 400–600, SIL OFL. */
@font-face {
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 400 600;
  font-display: optional;
  src: url("../fonts/noto-sans-tc/NotoSansTC-Site.woff2") format("woff2");
}


/* ==========================================================================
   Design tokens — Ma Ko Pan Memorial College / Careers Guidance Unit
   Source of truth for the Bunorden-derived light design language.
   Extracted from https://www.bunorden.com/ (CSS e008ac9841cb84a3.css)
   on 2026-11-06/07, then extended for WCAG 2.2 AA and Chinese typography.

   Rules:
   - Do not hard-code colours, spacing, radii or durations in component CSS.
   - Use semantic tokens (--bg, --text, --accent) rather than primitives.
   - No dark mode. The site is intentionally light-only.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ------------------------------------------------------------------------
     Colour primitives — Bunorden palette
     ------------------------------------------------------------------------ */
  --color-obsidian: #faf9f7; /* page background (off-white, not pure white) */
  --color-carbon: #1d1a18;   /* primary text, strong rules */
  --color-ash: #e8e6e3;      /* hairlines, card borders */
  --color-graphite: #4d4947; /* secondary text */
  --color-granite: #6b6562;  /* muted text, nav links */
  --color-stone: #8a8380;    /* decorative labels only — 3.54:1, not for body */
  --color-bone: #ffffff;     /* cards / surfaces */
  --color-chalk: #fafafa;    /* subtle surface */
  --color-signal: #ee6018;   /* Bunorden orange — large text / icons only */
  --color-metric: #a0ca92;   /* decorative green — never text */

  /* Accessible additions (WCAG 2.2 AA) */
  --color-signal-ink: #c2470c;   /* 4.75:1 on obsidian; small links/buttons */
  --color-danger: #a3311f;
  --color-success: #2f6b3f;
  --color-overlay: rgb(29 26 24 / 0.72);
  --color-overlay-strong: rgb(29 26 24 / 0.86);
  --color-focus: var(--color-signal-ink);

  /* ------------------------------------------------------------------------
     Semantic colour
     ------------------------------------------------------------------------ */
  --bg: var(--color-obsidian);
  --surface: var(--color-bone);
  --surface-muted: var(--color-chalk);
  --text: var(--color-carbon);
  --text-muted: var(--color-granite);
  --text-subtle: var(--color-stone);       /* decorative / large only */
  --border: var(--color-ash);
  --border-strong: var(--color-carbon);
  --accent: var(--color-signal);
  --accent-ink: var(--color-signal-ink);
  --focus: var(--color-focus);
  --selection-bg: var(--color-signal);
  --selection-text: var(--color-carbon);

  /* ------------------------------------------------------------------------
     Typography
     ------------------------------------------------------------------------ */
  --font-sans:
    "Geist", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK TC",
    "Noto Sans TC", "Heiti TC", system-ui, -apple-system, sans-serif;
  --font-mono:
    "Geist Mono", "PingFang HK", "Microsoft JhengHei", "Noto Sans CJK TC",
    "Noto Sans TC", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  --font-display: var(--font-sans);

  /* Size scale — clamp() keeps mobile and ultra-wide in one rule. */
  --text-display: clamp(3rem, 8vw, 6rem);          /* 48px → 96px */
  --text-h1: clamp(2.5rem, 6vw, 4.5rem);           /* 40px → 72px */
  --text-h2: clamp(2rem, 4.5vw, 4rem);             /* 32px → 64px */
  --text-h3: clamp(1.25rem, 2vw, 1.5rem);          /* 20px → 24px */
  --text-body-lg: 1.125rem;                        /* 18px */
  --text-body: 1rem;                               /* 16px */
  --text-sm: 0.9375rem;                            /* 15px */
  --text-xs: 0.875rem;                             /* 14px */
  --text-caption: 0.75rem;                         /* 12px */
  --text-mono: 0.75rem;                            /* 12px */

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* Chinese headings use neutral tracking; Latin display can be tighter. */
  --tracking-display: -0.01em;
  --tracking-display-latin: -0.03em;
  --tracking-heading: -0.01em;
  --tracking-caption: 0.08em;
  --tracking-mono: 0.04em;

  --leading-display: 1.05;
  --leading-heading: 1.15;
  --leading-tight: 1.3;
  --leading-body: 1.7;
  --leading-body-en: 1.6;

  /* ------------------------------------------------------------------------
     Spacing — Bunorden 8px base + one 4px half-step
     ------------------------------------------------------------------------ */
  --space-0: 0;
  --space-0-5: 4px;
  --space-1: 8px;
  --space-1-5: 12px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 56px;
  --space-7: 80px;
  --space-8: 96px;
  --space-9: 120px;
  --space-10: 160px;

  /* ------------------------------------------------------------------------
     Layout
     ------------------------------------------------------------------------ */
  --container-max: 1200px;
  --container-wide: 1440px;
  --container-narrow: 720px;
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(56px, 8vw, 120px);
  --hero-min-height: clamp(560px, 78vh, 760px);
  --header-height: 64px;
  --header-height-mobile: 60px;
  --prose-width: 68ch;

  /* JS-readable breakpoints; media queries still need literal values. */
  --bp-xs: 480px;
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1536px;

  /* ------------------------------------------------------------------------
     Radii, borders, shadows
     ------------------------------------------------------------------------ */
  --radius-xs: 3px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --border-width: 1px;

  /* Bunorden cards are flat; shadows only on hover / overlays. */
  --shadow-sm: 0 1px 2px rgb(29 26 24 / 0.04);
  --shadow-md: 0 18px 40px -24px rgb(29 26 24 / 0.18);
  --shadow-lg: 0 32px 80px -32px rgb(29 26 24 / 0.24);

  /* ------------------------------------------------------------------------
     Motion
     ------------------------------------------------------------------------ */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration: 200ms;
  --duration-slow: 600ms;
  --stagger: 70ms;

  /* ------------------------------------------------------------------------
     Focus, targets, safe areas
     ------------------------------------------------------------------------ */
  --focus-width: 2px;
  --focus-offset: 3px;
  --tap-target: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* ------------------------------------------------------------------------
     Aspect ratios (prevents CLS while images load)
     ------------------------------------------------------------------------ */
  --aspect-cover: 4 / 3;
  --aspect-wide: 16 / 9;
  --aspect-gallery: 1 / 1;

  /* ------------------------------------------------------------------------
     Z-index
     ------------------------------------------------------------------------ */
  --z-base: 0;
  --z-sticky: 20;
  --z-nav: 50;
  --z-overlay: 100;
  --z-dialog: 110;
  --z-skip: 200;
}

/* --------------------------------------------------------------------------
   Accessibility overrides
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0.01ms;
    --duration: 0.01ms;
    --duration-slow: 0.01ms;
    --stagger: 0ms;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: var(--color-carbon);
    --text-subtle: var(--color-graphite);
    --border: var(--color-graphite);
  }
}

/* Windows High Contrast / forced colours: let the OS palette win. */
@media (forced-colors: active) {
  :root {
    --border: CanvasText;
    --focus: Highlight;
  }
}


/* ==========================================================================
   Base — reset, typography, accessibility, layout primitives
   Depends on tokens.css. Keep component-specific rules out of this file.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

main {
  display: block;
  min-height: 50vh;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--weight-regular);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

figure,
blockquote {
  margin: 0;
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--border);
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

:focus-visible {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

/* Remove the default focus ring only when :focus-visible is supported. */
:focus:not(:focus-visible) {
  outline: none;
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: var(--space-7);
}

.section--rule {
  border-top: var(--border-width) solid var(--border-strong);
}

.stack > * + * {
  margin-top: var(--space-3);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5, 12px);
  align-items: center;
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid--2 {
  grid-template-columns: 1fr;
}

.grid--3 {
  grid-template-columns: 1fr;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  font-weight: var(--weight-regular);
}

.h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
}

.h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-tight);
}

.lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-body);
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: var(--tracking-caption);
  font-weight: var(--weight-regular);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-caption);
  color: var(--text-muted);
  text-transform: uppercase;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.section-head__copy {
  max-width: 60ch;
}

.section-head__title {
  margin-top: var(--space-2);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap-target);
  color: var(--accent-ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

.section-link:hover {
  color: var(--text);
}

.section-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration) var(--ease-standard);
}

.section-link:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.noscript {
  padding-top: calc(var(--header-height) + var(--space-5));
  padding-bottom: var(--space-5);
}

.noscript p {
  max-width: 70ch;
  margin-bottom: var(--space-2);
  color: var(--text-muted);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: calc(var(--safe-left) + 8px);
  z-index: var(--z-skip);
  padding: 12px 18px;
  border-radius: var(--radius-xs);
  background: var(--text);
  color: var(--bg);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Scroll margin for fixed header + in-page anchors. */
:target {
  scroll-margin-top: calc(var(--header-height) + var(--space-3));
}

/* --------------------------------------------------------------------------
   Motion primitives
   -------------------------------------------------------------------------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes node-pulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.fade-up {
  animation: fade-up var(--duration-slow) var(--ease-standard) both;
}

.fade-in {
  animation: fade-in var(--duration-slow) var(--ease-standard) both;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 160ms;
}

.delay-3 {
  animation-delay: 240ms;
}

.delay-4 {
  animation-delay: 320ms;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--duration-slow) var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Reduced motion — keep content visible, remove movement.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive grid helpers
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* --------------------------------------------------------------------------
   Cross-document page transition (progressive enhancement)
   -------------------------------------------------------------------------- */

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}


/* QA / print: disable reveal hiding without changing the DOM. */
.no-anim .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

.no-anim .fade-up,
.no-anim .fade-in {
  animation: none;
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   Components — header, nav, hero, buttons, cards, filters, gallery, footer
   Depends on tokens.css and base.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  padding-top: var(--safe-top);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--duration) var(--ease-standard),
    border-color var(--duration) var(--ease-standard),
    backdrop-filter var(--duration) var(--ease-standard);
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgb(250 249 247 / 0.9);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--header-height-mobile);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-target);
  color: var(--text);
}

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--text);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand__school {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
}

.brand__unit {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.primary-nav {
  display: none;
  align-items: center;
  gap: var(--space-1);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: 0 12px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-standard);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 2px;
  background: var(--accent);
}

.nav-school {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  margin-left: var(--space-1);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition:
    color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.nav-school:hover {
  color: var(--text);
  border-color: var(--text);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
}

.nav-toggle__line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition:
    transform var(--duration) var(--ease-standard),
    opacity var(--duration) var(--ease-standard);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile navigation panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-height-mobile) + var(--safe-top) + var(--space-5)) var(--gutter)
    calc(var(--safe-bottom) + var(--space-5));
  background: var(--bg);
  transform: translateY(-100%);
  visibility: hidden;
  transition:
    transform var(--duration-slow) var(--ease-standard),
    visibility var(--duration-slow) var(--ease-standard);
  overflow-y: auto;
}

.mobile-nav.is-open {
  transform: translateY(0);
  visibility: visible;
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-h3);
  color: var(--text);
}

.mobile-nav__link[aria-current="page"] {
  color: var(--accent-ink);
}

.mobile-nav__school {
  margin-top: var(--space-5);
}

.mobile-nav__note {
  margin-top: auto;
  padding-top: var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--hero-min-height);
  padding-top: calc(var(--header-height-mobile) + var(--safe-top) + var(--space-7));
  padding-bottom: var(--space-7);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-carbon) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-carbon) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.025;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--space-7);
  align-items: center;
  width: 100%;
}

.hero__copy {
  max-width: 680px;
}

.hero__eyebrow {
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  color: var(--text);
}

.hero__line {
  display: block;
}

.hero__line.is-accent {
  color: var(--accent);
}

.hero__intro {
  max-width: 54ch;
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-body-lg);
  line-height: var(--leading-body);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
  margin-top: var(--space-5);
}

.hero__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
}

.hero__note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-metric);
}

.hero__visual {
  position: relative;
  width: min(100%, 420px);
  margin-inline: auto;
  color: var(--text);
}

.hero__visual svg {
  width: 100%;
  height: auto;
}

.hero-node {
  transform-box: fill-box;
  transform-origin: center;
  animation: node-pulse 5s var(--ease-standard) infinite;
}

.hero-node--delay {
  animation-delay: 1.8s;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-target);
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.2;
  text-align: center;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
}

.btn--secondary {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--text);
  color: var(--bg);
}

.btn--ghost {
  min-height: var(--tap-target);
  padding-inline: 0;
  color: var(--accent-ink);
}

.btn--ghost:hover {
  color: var(--text);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--text);
}

/* --------------------------------------------------------------------------
   Activity cards
   -------------------------------------------------------------------------- */

.activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.activity-card {
  container-type: inline-size;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform var(--duration) var(--ease-standard),
    border-color var(--duration) var(--ease-standard),
    box-shadow var(--duration) var(--ease-standard);
}

.activity-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: var(--tap-target);
}

.activity-card__media {
  position: relative;
  aspect-ratio: var(--aspect-cover);
  overflow: hidden;
  background: var(--color-ash);
}

.activity-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 400ms var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
}

.activity-card__media img.is-loaded {
  opacity: 1;
}

.activity-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-1-5);
  padding: var(--space-3);
}

.activity-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.03em;
}

.activity-card__meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.activity-card__title {
  font-size: var(--text-h3);
  line-height: var(--leading-tight);
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.activity-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  margin-top: auto;
  padding-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-caption);
}

.activity-card__footer svg {
  width: 16px;
  height: 16px;
  color: var(--text);
  transition: transform var(--duration) var(--ease-standard);
}

@media (hover: hover) and (pointer: fine) {
  .activity-card:hover {
    transform: translateY(-3px);
    border-color: var(--text);
    box-shadow: var(--shadow-md);
  }

  .activity-card:hover .activity-card__media img {
    transform: scale(1.03);
  }

  .activity-card:hover .activity-card__footer svg {
    transform: translateX(3px);
  }
}

/* --------------------------------------------------------------------------
   Explore / category cards
   -------------------------------------------------------------------------- */

.explore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.explore-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-height: 150px;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.explore-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.explore-card__index {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--accent-ink);
}

.explore-card__title {
  font-size: var(--text-h3);
}

.explore-card__text {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.explore-card__arrow {
  margin-top: auto;
  align-self: flex-end;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Filters / archive toolbar
   -------------------------------------------------------------------------- */

.filter-panel {
  padding: var(--space-2);
  margin-bottom: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.filter-grid {
  display: grid;
  gap: var(--space-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.input,
.select {
  width: 100%;
  min-height: var(--tap-target);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-size: var(--text-sm);
}

.input::placeholder {
  color: var(--text-subtle);
}

.input:hover,
.select:hover {
  border-color: var(--text-muted);
}

.search-field {
  position: relative;
}

.search-field .input {
  padding-left: 40px;
  padding-right: 44px;
}

.search-field__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  color: var(--text-muted);
  transform: translateY(-50%);
}

.search-clear:hover {
  color: var(--text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: var(--text-xs);
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.chip:hover {
  border-color: var(--text);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.filter-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.results-count {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.clear-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--accent-ink);
  font-size: var(--text-sm);
}

.clear-filters:hover {
  color: var(--text);
}

.load-more {
  display: flex;
  justify-content: center;
  margin-top: var(--space-5);
}

.all-shown {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Page header / breadcrumb
   -------------------------------------------------------------------------- */

.page-head {
  padding-top: calc(var(--header-height-mobile) + var(--safe-top) + var(--space-7));
  padding-bottom: var(--space-5);
}

.page-head__title {
  max-width: 16ch;
  margin-top: var(--space-2);
  font-size: var(--text-h1);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

.page-head__intro {
  max-width: 60ch;
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-body-lg);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

.breadcrumb .sep {
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   Activity detail
   -------------------------------------------------------------------------- */

.activity-header {
  max-width: 900px;
}

.activity-title {
  margin-top: var(--space-2);
  font-size: var(--text-h1);
  line-height: 1.12;
  letter-spacing: var(--tracking-display);
}

.activity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.activity-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.activity-meta svg {
  width: 16px;
  height: 16px;
}

.activity-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.activity-cover {
  margin-top: var(--space-5);
  overflow: hidden;
  background: var(--color-ash);
  border-radius: var(--radius-lg);
  aspect-ratio: var(--aspect-wide);
}

.activity-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prose {
  max-width: var(--prose-width);
  font-size: var(--text-body-lg);
  line-height: 1.85;
  color: var(--text);
}

.prose p + p {
  margin-top: 1.1em;
}

.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--text);
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  font-size: var(--text-h3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: var(--aspect-gallery);
  overflow: hidden;
  background: var(--color-ash);
  border-radius: var(--radius-xs);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition:
    opacity 400ms var(--ease-standard),
    transform var(--duration) var(--ease-standard);
}

.gallery-item img.is-loaded {
  opacity: 1;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(29 26 24 / 0);
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item:hover::after {
  background: rgb(29 26 24 / 0.08);
}

.gallery-item:focus-visible {
  outline-offset: 2px;
}

.gallery-empty {
  padding: var(--space-5);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

.attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  min-height: 56px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.attachment:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.attachment__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: none;
  color: var(--accent-ink);
  background: var(--surface-muted);
  border-radius: var(--radius-xs);
}

.attachment__icon svg {
  width: 18px;
  height: 18px;
}

.attachment__body {
  min-width: 0;
  flex: 1;
}

.attachment__name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: var(--text-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment__meta {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--text-caption);
}

.attachment__arrow {
  flex: none;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--color-carbon);
  color: var(--bg);
}

.lightbox::backdrop {
  background: var(--color-overlay-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox__inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  padding:
    calc(var(--safe-top) + 12px)
    calc(var(--safe-right) + 16px)
    calc(var(--safe-bottom) + 12px)
    calc(var(--safe-left) + 16px);
}

.lightbox__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--bg);
}

.lightbox__counter {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.08em;
  color: rgb(250 249 247 / 0.72);
}

.lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid rgb(250 249 247 / 0.28);
  border-radius: 50%;
  color: var(--bg);
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.lightbox__close:hover {
  background: rgb(250 249 247 / 0.12);
}

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 0;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-height: 0;
}

.lightbox__img {
  max-width: min(92vw, 1400px);
  max-height: calc(100dvh - 190px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xs);
  background: rgb(250 249 247 / 0.04);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-standard);
}

.lightbox__img.is-loaded {
  opacity: 1;
}

.lightbox__caption {
  max-width: 70ch;
  color: rgb(250 249 247 / 0.8);
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  border: 1px solid rgb(250 249 247 / 0.24);
  border-radius: 50%;
  background: rgb(29 26 24 / 0.4);
  color: var(--bg);
  transform: translateY(-50%);
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard);
}

.lightbox__nav:hover {
  background: rgb(250 249 247 / 0.14);
}

.lightbox__nav:disabled {
  opacity: 0.3;
}

.lightbox__nav--prev {
  left: 0;
}

.lightbox__nav--next {
  right: 0;
}

.lightbox__bottom {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  padding-top: 8px;
  color: rgb(250 249 247 / 0.6);
  font-size: var(--text-caption);
}

.lightbox :focus-visible {
  outline-color: var(--bg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border-strong);
  padding-top: var(--space-7);
  padding-bottom: calc(var(--safe-bottom) + var(--space-4));
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
}

.footer-brand {
  max-width: 320px;
}

.footer-brand__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-body);
  font-weight: var(--weight-medium);
}

.footer-brand__name svg {
  width: 26px;
  height: 26px;
}

.footer-brand__tagline {
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.footer-col__title {
  margin-bottom: var(--space-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  font-weight: var(--weight-regular);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-standard);
}

.footer-link:hover {
  color: var(--text);
}

.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-caption);
}

.site-footer__bottom a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom a:hover {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   States: loading, empty, error, skeleton
   -------------------------------------------------------------------------- */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-7) var(--space-3);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--accent-ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
}

.state__title {
  font-size: var(--text-h3);
}

.state__text {
  max-width: 46ch;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.state--error {
  border-style: solid;
  border-color: var(--color-danger);
}

.skeleton {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.skeleton__media {
  aspect-ratio: var(--aspect-cover);
  background: var(--color-ash);
}

.skeleton__body {
  padding: var(--space-3);
}

.skeleton__line {
  height: 12px;
  margin-bottom: 10px;
  background: var(--color-ash);
  border-radius: var(--radius-xs);
}

.skeleton__line--short {
  width: 45%;
}

.skeleton__line--title {
  width: 82%;
  height: 20px;
}

.skeleton::after {
  content: "";
  display: block;
  height: 0;
}

.is-loading .skeleton__media,
.is-loading .skeleton__line {
  position: relative;
}

.is-loading .skeleton__media::after,
.is-loading .skeleton__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.45), transparent);
  animation: shimmer 1.4s infinite;
}

.notice {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-xs);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------------------
   Responsive component adjustments
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: end;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .site-header__inner {
    min-height: var(--header-height);
  }

  .mobile-nav {
    padding-top: calc(var(--header-height) + var(--safe-top) + var(--space-5));
  }

  .hero {
    padding-top: calc(var(--header-height) + var(--safe-top) + var(--space-8));
  }

  .page-head {
    padding-top: calc(var(--header-height) + var(--safe-top) + var(--space-8));
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}

@media (min-width: 1024px) {
  .primary-nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: var(--space-8);
  }

  .activity-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .explore-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Icon sizing for inline SVGs injected by JS
   -------------------------------------------------------------------------- */

.brand__mark svg {
  width: 100%;
  height: 100%;
}

.nav-school svg,
.search-field__icon svg,
.search-clear svg,
.clear-filters svg,
.explore-card__arrow svg,
.state__icon svg,
.attachment__arrow svg,
.detail__back svg,
.lightbox__close svg,
.lightbox__nav svg,
.footer-link svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.search-field__icon svg {
  width: 18px;
  height: 18px;
}

.state__icon svg {
  width: 20px;
  height: 20px;
}

.lightbox__close svg,
.lightbox__nav svg {
  width: 18px;
  height: 18px;
}

.clear-filters svg {
  width: 14px;
  height: 14px;
}

.footer-link svg {
  margin-top: 2px;
}

/* Keyboard focus is visible on the whole card, not clipped by overflow. */
.activity-card:focus-within {
  outline: var(--focus-width) solid var(--focus);
  outline-offset: var(--focus-offset);
}

.activity-card__link:focus-visible {
  outline: none;
}


/* Container query: tighten the card on very narrow columns. */
@container (max-width: 330px) {
  .activity-card__body {
    padding: var(--space-2);
  }

  .activity-card__title {
    font-size: 1.15rem;
  }
}

/* --------------------------------------------------------------------------
   Event modal (mobile / tablet)
   -------------------------------------------------------------------------- */

.event-modal {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--text);
}

.event-modal[open] {
  animation: modal-in 520ms var(--ease-apple) both;
}

.event-modal::backdrop {
  background: rgb(29 26 24 / 0.36);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 320ms var(--ease-standard) both;
}

.event-modal__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding:
    calc(var(--safe-top) + 10px)
    calc(var(--gutter) + var(--safe-right))
    10px
    calc(var(--gutter) + var(--safe-left));
  background: rgb(250 249 247 / 0.9);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.event-modal__label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-caption);
}

.event-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-target);
  height: var(--tap-target);
  flex: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.event-modal__close:hover {
  background: var(--surface);
  border-color: var(--text);
}

.event-modal__close svg {
  width: 18px;
  height: 18px;
}

.event-modal__content {
  height: calc(100dvh - 65px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
}

.event-modal .event-detail__body {
  padding: 20px var(--gutter) calc(var(--safe-bottom) + 48px);
}

.event-modal .activity-title {
  font-size: clamp(1.9rem, 8vw, 2.8rem);
}

.event-modal .activity-cover {
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-modal[open] {
    animation: none;
  }
}


/* ==========================================================================
   Page layouts — home, archive, detail, info, about, 404
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.home-latest {
  border-top: 1px solid var(--border-strong);
}

.home-latest__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.home-explore {
  border-top: 1px solid var(--border);
}

.home-info {
  border-top: 1px solid var(--border-strong);
  background: var(--surface-muted);
}

.home-info__inner {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.home-info__copy {
  max-width: 620px;
}

.home-info__title {
  margin-top: var(--space-2);
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
}

.home-info__text {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-body-lg);
  line-height: var(--leading-body);
}

.home-info__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
  margin-top: var(--space-4);
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: var(--text-sm);
}

.link-list__item:hover {
  color: var(--accent-ink);
}

.link-list__item span:last-child {
  color: var(--text-muted);
}

.home-about {
  border-top: 1px solid var(--border);
}

.home-about__inner {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

.home-about__title {
  margin-top: var(--space-2);
  font-size: var(--text-h2);
}

.home-about__text {
  margin-top: var(--space-3);
  color: var(--text-muted);
  line-height: var(--leading-body);
}

.home-about__mark {
  width: min(100%, 360px);
  margin-inline: auto;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Archive
   -------------------------------------------------------------------------- */

.archive-head {
  padding-bottom: var(--space-4);
}

.archive-toolbar {
  margin-bottom: var(--space-5);
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.archive-empty {
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   Activity detail
   -------------------------------------------------------------------------- */

.detail {
  padding-top: calc(var(--header-height-mobile) + var(--safe-top) + var(--space-5));
  padding-bottom: var(--section-y);
}

.detail__section {
  margin-top: var(--space-7);
}

.detail__section-title {
  margin-bottom: var(--space-3);
  font-size: var(--text-h3);
}

.detail__section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.detail__section-head .detail__section-title {
  margin-bottom: 0;
}

.detail__count {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
}

.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-target);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.detail__back:hover {
  color: var(--text);
}

.detail__related {
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   Info page
   -------------------------------------------------------------------------- */

.info-layout {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.info-nav {
  display: none;
}

.info-nav__list {
  position: sticky;
  top: calc(var(--header-height) + var(--space-3));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.info-nav__link:hover {
  color: var(--text);
  border-left-color: var(--border);
}

.info-section {
  padding-block: var(--space-5);
  border-top: 1px solid var(--border);
}

.info-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.info-section__title {
  margin-bottom: var(--space-2);
  font-size: var(--text-h3);
}

.info-section__text {
  max-width: var(--prose-width);
  color: var(--text-muted);
  line-height: var(--leading-body);
}

.info-section__text p + p {
  margin-top: 0.9em;
}

.info-section__links {
  display: grid;
  gap: 8px;
  margin-top: var(--space-3);
}

.info-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 52px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.info-link:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.info-link__label {
  font-size: var(--text-sm);
}

.info-link__meta {
  color: var(--text-muted);
  font-size: var(--text-caption);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

.about-copy {
  max-width: var(--prose-width);
}

.about-copy p + p {
  margin-top: 0.9em;
}

.about-photo {
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-photo img {
  width: 100%;
  height: auto;
}

.about-photo__caption {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: var(--text-caption);
}

.contact-card {
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.contact-card__title {
  margin-bottom: var(--space-2);
  font-size: var(--text-h3);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.contact-list__item svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
  color: var(--accent-ink);
}

.contact-list__item a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.error-page {
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding-top: calc(var(--header-height) + var(--space-7));
  padding-bottom: var(--space-7);
}

.error-page__code {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  letter-spacing: 0.12em;
  color: var(--accent-ink);
}

.error-page__title {
  max-width: 14ch;
  margin-top: var(--space-2);
  font-size: var(--text-h1);
  line-height: var(--leading-display);
}

.error-page__text {
  max-width: 50ch;
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-body-lg);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   Responsive page layouts
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .home-latest__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-section__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .detail {
    padding-top: calc(var(--header-height) + var(--safe-top) + var(--space-6));
  }

  .info-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: var(--space-5);
  }

  .info-nav {
    display: block;
  }

  .about-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .home-info__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  }

  .home-about__inner {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  }
}

@media (min-width: 1024px) {
  .home-latest__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   CLS guards: reserve layout before JS renders dynamic content
   -------------------------------------------------------------------------- */

body[data-page="activity"] main,
body[data-page="info"] main,
body[data-page="about"] main {
  min-height: 100vh;
}

[data-archive-toolbar]:empty {
  min-height: 300px;
}

[data-archive-grid]:empty {
  min-height: 420px;
}

[data-info-content]:empty {
  min-height: 700px;
}

@media (min-width: 640px) {
  [data-archive-toolbar]:empty {
    min-height: 160px;
  }
}

/* --------------------------------------------------------------------------
   Events workspace — desktop split view / mobile list
   -------------------------------------------------------------------------- */

.events-page {
  padding-top: calc(var(--header-height-mobile) + var(--safe-top));
}

.events-shell {
  display: block;
}

.events-sidebar {
  padding-block: var(--space-5) var(--space-7);
}

.events-sidebar__head {
  margin-bottom: var(--space-4);
}

.events-title {
  margin-top: var(--space-1);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
}

.events-intro {
  max-width: 48ch;
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.events-detail {
  display: none;
}

.events-detail__empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
  padding: var(--space-7) var(--space-5);
}

.events-detail__empty-title {
  margin-top: var(--space-2);
  font-size: var(--text-h3);
}

.events-detail__empty-text {
  max-width: 42ch;
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Embedded detail (right pane / modal) */
.detail--embedded {
  padding: 0;
}

.event-detail__body {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 56px);
}

.detail--embedded .activity-header {
  max-width: none;
}

.detail--embedded .activity-title {
  margin-top: var(--space-1);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.detail--embedded .activity-cover {
  margin-top: var(--space-4);
  border-radius: var(--radius-md);
  aspect-ratio: var(--aspect-wide);
}

.detail--embedded .detail__section {
  margin-top: var(--space-6);
}

.event-loading {
  margin: var(--space-5);
}

@media (min-width: 768px) {
  .events-page {
    padding-top: calc(var(--header-height) + var(--safe-top));
  }
}

@media (min-width: 1024px) {
  .events-page {
    padding-top: calc(var(--header-height) + var(--safe-top));
  }

  .events-shell {
    display: grid;
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    width: 100%;
    max-width: none;
    padding-inline: 0;
    height: calc(100dvh - var(--header-height) - var(--safe-top));
  }

  .events-sidebar {
    padding: var(--space-4) var(--space-3) var(--space-5);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: pane-in 700ms var(--ease-apple) both;
  }

  .events-detail {
    display: block;
    min-width: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    animation: pane-in 700ms 80ms var(--ease-apple) both;
  }

  .events-detail__empty {
    min-height: 100%;
  }

  .events-sidebar .filter-grid {
    grid-template-columns: 1fr 1fr;
  }

  .events-sidebar .field:first-child {
    grid-column: 1 / -1;
  }

  .events-sidebar .archive-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .events-sidebar .activity-card__link {
    flex-direction: row;
    align-items: stretch;
  }

  .events-sidebar .activity-card__media {
    width: 88px;
    flex: 0 0 88px;
    aspect-ratio: 1;
  }

  .events-sidebar .activity-card__body {
    gap: 4px;
    padding: 10px 12px;
  }

  .events-sidebar .activity-card__title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
  }

  .events-sidebar .activity-card__excerpt,
  .events-sidebar .activity-card__footer {
    display: none;
  }

  .events-sidebar .activity-card__meta {
    font-size: 10px;
  }

  .events-sidebar .chip {
    min-height: 36px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .events-sidebar .activity-card.is-active {
    border-color: var(--text);
    box-shadow: var(--shadow-sm);
  }

  .events-sidebar .activity-card.is-active .activity-card__title {
    color: var(--accent-ink);
  }

  .events-sidebar .activity-card.is-active .activity-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(238 96 24 / 0.12);
  }
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   Print — clean, readable, no navigation or decoration
   ========================================================================== */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --surface-muted: #fff;
    --text: #000;
    --text-muted: #333;
    --border: #ccc;
    --border-strong: #000;
    --accent-ink: #000;
  }

  * {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  @page {
    margin: 18mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .mobile-nav,
  .filter-panel,
  .hero__bg,
  .hero__visual,
  .hero__actions,
  .load-more,
  .all-shown,
  .lightbox,
  .no-print {
    display: none !important;
  }

  main {
    min-height: 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .hero,
  .page-head,
  .detail,
  .error-page {
    min-height: 0;
    padding: 0 !important;
  }

  .hero__title,
  .page-head__title,
  .activity-title,
  .error-page__title {
    font-size: 28pt;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .activity-title {
    margin-top: 0;
  }

  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    font-weight: 400;
  }

  /* Attachment links already show a visible label; give the URL too. */
  .attachment a[href]::after,
  .info-link a[href]::after {
    content: " (" attr(href) ")";
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .activity-cover,
  .about-photo {
    margin-top: 8mm;
    border: 1px solid #ccc;
    border-radius: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4mm;
  }

  .gallery-item {
    break-inside: avoid;
  }

  .prose {
    max-width: none;
    font-size: 11pt;
    line-height: 1.5;
  }

  .activity-card,
  .info-section,
  .attachment,
  figure {
    break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
    color: #000;
  }

  p {
    orphans: 3;
    widows: 3;
  }
}
