/* =========================================================================
   AI Safety India, brand.css  (v2.4)
   One stylesheet for every page: tokens first, then shared components.
   Type: Libre Baskerville (headlines) + Satoshi (everything else).
   ========================================================================= */
@import url("https://fonts.googleapis.com/css2?family=Baskervville:ital,wght@0,400..700;1,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Anek+Devanagari:wght@400..700&display=swap");
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400&display=swap");
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@500&display=swap");
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@700&display=swap");

:root {
  /* ---------- colour: paper and ink ---------- */
  --paper:      #F5F3EE;   /* page background */
  --paper-2:    #EDE9E1;   /* alternate section band */
  --card:       #FFFFFF;   /* light cards */
  --line:       #E3DED5;   /* hairlines and card borders */
  --ink:        #1C1A17;   /* headlines and body text   15.7:1 on paper */
  --ink-2:      #544F48;   /* secondary text             7.3:1 on paper, APCA 75+ on paper-2 */
  --ink-3:      #6B655C;   /* meta and captions          5.2:1 on paper */

  /* ---------- colour: the one red ---------- */
  --red:        #9B1C2E;   /* AI Safety India Crimson = Pantone 201 C (ΔE 1.7). Logo, buttons, labels, links. 7.3:1 on paper, white on it 8.1:1 */
  --red-hover:  #7E1725;
  --red-soft:   #F4E2E4;   /* tinted chips and highlights */
  --red-on-dark:#FF9AA3;   /* red TEXT on dark surfaces only, labels not body (fills stay --red) */

  /* ---------- colour: status (never the brand red; always paired with an icon or words) ---------- */
  --success:    #2C6938;  --success-bg: #E6F0E5;  /* 5.8:1 on paper */
  --warning:    #835300;  --warning-bg: #FBF0D9;  /* 5.3:1 */
  --error:      #B3401F;  --error-bg:   #FBE7E0;  /* 5.2:1  burnt orange, distinct from crimson */
  --info:       #2F5B8A;  --info-bg:    #E5EDF6;  /* 6.4:1 */

  /* ---------- colour: interface ---------- */
  --field:        #FFFFFF;
  --field-border: #8C857B;  /* 3.6:1 on white: meets the 3:1 rule for controls */
  --focus:        #9B1C2E;
  --scrim:        rgba(20,14,12,.55);  /* behind modals */

  /* ---------- colour: the levels (deepen as commitment grows) ----------
     One family, one recipe (v1.9):
     1. Every level is a 145° gradient from a dark top to a near-black bottom; only the hue changes.
     2. Coloured levels share one strength (OKLCH chroma 0.045–0.065); none is brighter than the others.
     3. Hues sit in wheel order: wine → plum → indigo → teal, with charcoal as the neutral start.
     4. Every accent is a pale tint of its own level at the same lightness (about L 0.84–0.87), 8:1 or more.
     5. Crimson stays outside the family: buttons, links and the logo only. Never blend two levels. */
  --level-1: linear-gradient(145deg, #2A2622 0%, #1F1D1A 50%, #151412 100%); /* Explore: open sessions, reading groups (v2.0: one step lighter, apart from ink) */
  --level-2a:linear-gradient(145deg, #260810 0%, #170509 50%, #0B0204 100%); /* Learn: Technical AI Safety (v2.0: one step deeper, crimson in shadow) */
  --level-2b:linear-gradient(145deg, #123B3D 0%, #0C2729 50%, #061416 100%); /* Learn: AI Governance, deep teal (v1.7, was umber) */
  --level-2c:linear-gradient(145deg, #1E2042 0%, #16182F 50%, #0F101E 100%); /* Learn: Technical AI Governance, RESERVED: do not use on pages until the course exists */
  --level-3: linear-gradient(145deg, #260A2B 0%, #19071C 50%, #0D040E 100%); /* Research: fellowships, plum moved towards violet (v1.9) so it no longer matches wine */
  --accent-1: #E5D0B5;  /* sand   on level 1  10.8:1 */
  --accent-2a:#FFBCCB;  /* pink   on level 2a  APCA 76 */
  --accent-2b:#A9E4DE;  /* aqua   on level 2b  APCA 77 */
  --accent-2c:#CACDFC;  /* lavender on level 2c APCA 75 */
  --accent-3: #ECC1E1;  /* orchid on level 3  APCA 75 */
  --on-dark:   #F8EFEC; /* headings on levels */
  --on-dark-2: #E2D9D5; /* body on levels      APCA 78+ on every level */
  --hair-dark: rgba(255,255,255,.09);

  /* ---------- type ---------- */
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;          /* text cut: headings up to ~36px, captions, cards */
  --serif-display: "Baskervville", "Libre Baskerville", Georgia, serif;   /* display cut (v2.2): hero and section titles, 40px and up.
     Libre Baskerville only comes in 400/700 and is drawn sturdy for small sizes, so it looks heavy when huge. */
  --sans:  "Satoshi", "Anek Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --deva:  "Anek Devanagari", "Noto Sans Devanagari", sans-serif;

  --t-display: clamp(2.6rem, 5vw, 4.5rem);   /* 42–72px  hero headline   */
  --t-h1:      clamp(2.1rem, 3.6vw, 3.25rem);/* 34–52px  section titles  */
  --t-h2:      clamp(1.6rem, 2.4vw, 2.125rem);/* 26–34px card titles (feature) */
  --t-h3:      1.375rem;                     /* 22px     card titles      */
  --t-lede:    clamp(1.125rem, 1.4vw, 1.25rem); /* 18–20px */
  --t-body:    1.0625rem;                    /* 17px */
  --t-small:   0.9375rem;                    /* 15px */
  --t-meta:    0.8125rem;                    /* 13px  labels, chips */

  /* ---------- space, shape, depth ---------- */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px; --s-6:32px; --s-7:48px; --s-8:64px; --s-9:96px; --s-10:128px;
  --wrap: 1200px;
  --r-sm: 8px;    /* chips, inputs, icon tiles */
  --r-md: 16px;   /* every card (levels, image, event) */
  --r-lg: 24px;   /* large photos and feature panels */
  --r-pill: 999px;/* buttons only */
  --shadow-card:  0 1px 2px rgba(28,26,23,.04), 0 12px 32px -18px rgba(28,26,23,.22);
  --shadow-level: 0 30px 60px -32px rgba(30,8,12,.55);
  --glass:        rgba(245,243,238,.9);
  --glass-dark:   rgba(18,12,12,.6);
  --blur:         blur(18px) saturate(1.4);
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ---------- dark mode (later): opt in with <html data-theme="dark"> ----------
   Same red fill in both modes; only red *text* switches to --red-on-dark. Levels stay as they are. */
:root[data-theme="dark"] {
  --paper:#141110; --paper-2:#1C1816; --card:#201B19; --line:#342D29;
  --ink:#F3ECE7; --ink-2:#C9BFB8; --ink-3:#A99E96;
  --red-soft:rgba(255,138,148,.12); --glass:rgba(20,17,16,.72);
  --shadow-card:0 1px 2px rgba(0,0,0,.3), 0 12px 32px -18px rgba(0,0,0,.6);
  --success:#7FC98A; --success-bg:rgba(127,201,138,.12); --warning:#E8B44A; --warning-bg:rgba(232,180,74,.12);
  --error:#FF9C7A; --error-bg:rgba(255,156,122,.12); --info:#8FB8E8; --info-bg:rgba(143,184,232,.12);
  --field:#1A1614; --field-border:#7A7069; --focus:#FF9AA3; --scrim:rgba(0,0,0,.65);
}
:root[data-theme="dark"] .label, :root[data-theme="dark"] .link, :root[data-theme="dark"] .event .where, :root[data-theme="dark"] .chip-red { color: var(--red-on-dark); }

/* ---------- increased contrast: darker inks, solid edges, no glass ---------- */
@media (prefers-contrast: more) {
  :root { --ink:#000000; --ink-2:#3D3934; --ink-3:#3D3934; --line:#8C857B; --field-border:#5C5750;
          --glass:#F5F3EE; --glass-dark:rgba(12,8,8,.88); --hair-dark:rgba(255,255,255,.35); --on-dark-2:#F3ECE7; }
  .card, .img-card, .event, .chip, .opt { border-width: 1.5px; }
}
/* ---------- reduced transparency: replace frosted glass with solid surfaces ---------- */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass:#F5F3EE; --glass-dark:rgba(18,12,12,.92); }
  .glass, .glass-dark, .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
:target { scroll-margin-top: 88px; }
/* visually hidden but read by screen readers */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--t-body); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:lang(hi), .hi { font-family: var(--deva); line-height: 1.75; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.level :focus-visible, .footer :focus-visible { outline-color: var(--red-on-dark); }

.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: var(--s-10); }
.section.tight { padding-block: var(--s-9); }
.band { background: var(--paper-2); }

/* ---------- type styles ---------- */
.display, .h1, .h2, .h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); margin: 0; text-wrap: balance; }
.display, .h1 { font-family: var(--serif-display); }
.display { font-size: var(--t-display); line-height: 1.1;  letter-spacing: -0.02em; }
.h1      { font-size: var(--t-h1);      line-height: 1.15; letter-spacing: -0.018em; }
.h2      { font-size: var(--t-h2);      line-height: 1.2;  letter-spacing: -0.012em; }
.h3      { font-size: var(--t-h3);      line-height: 1.3;  letter-spacing: -0.008em; }
.lede    { font-size: var(--t-lede); line-height: 1.6; color: var(--ink-2); max-width: 38em; margin: 0; text-wrap: pretty; }
.body    { font-size: var(--t-body); line-height: 1.6; color: var(--ink-2); max-width: 36em; margin: 0; }
.small   { font-size: var(--t-small); color: var(--ink-2); }
.meta    { font-size: var(--t-meta); color: var(--ink-3); }
.label   { font-family: var(--sans); font-size: var(--t-meta); font-weight: 700; color: var(--red); letter-spacing: .01em; margin: 0 0 var(--s-4); }
em.serif-i { font-family: var(--serif); font-style: italic; }

/* section header: label + title + optional lede.
   Alignment rule: left-aligned by default; .split for desktop intros; .center only for short single moments
   (newsletter, closing call to action, pull quote). Never centre paragraphs longer than two lines. */
.section-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); }
.section-head.center { text-align: center; justify-items: center; }
.section-head.center .lede { margin-inline: auto; max-width: 30em; }
.section-head.split { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s-7); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: var(--s-2); white-space: nowrap; font-family: var(--sans); font-weight: 700; font-size: var(--t-small);
  line-height: 1; padding: 14px 22px; border-radius: var(--r-pill); border: 0; cursor: pointer; text-decoration: none; transition: background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease); }
.btn-primary   { background: var(--red); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(28,26,23,.45); }
.btn-light     { background: var(--on-dark); color: #1C1A17; }
.btn-ghost-dark{ background: rgba(255,255,255,.06); color: var(--on-dark); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.btn-sm { padding: 10px 16px; font-size: var(--t-meta); min-height: 40px; position: relative; }
.btn { min-height: 44px; }
/* small controls keep a 44px hit area without looking bigger */
.btn-sm::after, .chip[role=button]::after, .chip a::after { content: ""; position: absolute; inset: -4px; }
/* ACTIONS RULE (v2.1)
   - Every standalone action is a pill button. On paper: .btn-primary (crimson, one per section) and .btn-secondary (ink outline).
     On dark levels and the footer: .btn-light (primary) and .btn-ghost-dark (secondary).
   - Coloured text links appear only inside sentences (underlined). Never a free-standing red, pink or accent text link.
   - Level accent colours are for labels only, never for anything clickable. Crimson never sits on a dark surface. */
.btn .arr { width: 16px; height: 16px; flex: none; transition: transform var(--dur-fast, 150ms) var(--ease); }
@media (hover: hover) { .btn:hover .arr { transform: translateX(3px); } }
/* BUTTON STATES (v2.4). Every button has the same six states; only colour and shadow change, never size or border width (no layout shift).
   rest -> hover (pointer devices only, 150ms) -> press (98%, 80ms) -> focus (2px ring, 3px gap; keyboard only)
   disabled (45%, no pointer events) -> loading (label kept for width, spinner over it, aria-busy) */
.btn { position: relative; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
@media (hover: hover) {
  .btn-primary:hover    { background: var(--red-hover); }
  .btn-secondary:hover  { box-shadow: inset 0 0 0 1.5px var(--ink); background: rgba(28,26,23,.03); }
  .btn-light:hover      { background: #FFFFFF; }
  .btn-ghost-dark:hover { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.32); }
}
.btn:active:not([disabled]):not([aria-disabled="true"]) { transform: scale(.98); transition-duration: 80ms; }
.btn-primary:active   { background: #6E1420; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.level .btn:focus-visible, .footer .btn:focus-visible { outline-color: var(--red-on-dark); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) rgba(255,255,255,.9) transparent; animation: btn-spin .7s linear infinite; }
.btn-secondary.is-loading::before, .btn-light.is-loading::before { border-color: var(--ink) var(--ink) var(--ink) transparent; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } .btn.is-loading::before { animation-duration: 2s; } }
/* tertiary text link (inline contexts only): label + arrow as one unit */
.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--t-small); line-height: 1; color: var(--red); text-decoration: none; min-height: 44px; }
.link .label { padding-top: 2px; } /* Satoshi sits high in its line box; this centres it on the arrow */
.link .arr { width: 16px; height: 16px; flex: none; transition: transform var(--dur-fast, 150ms) var(--ease); }
.link:hover .label, .link:focus-visible .label { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover .arr { transform: translateX(3px); }
.level .link, .footer .link { color: var(--on-dark); } /* never the accent: accents are labels */
.level p a:not(.btn), .footer p a:not(.btn) { color: var(--on-dark); text-decoration-color: rgba(248,239,236,.45); }
/* links inside running text are always underlined, so colour is never the only signal */
.prose a, .body a, .lede a, p a:not(.btn):not(.link) { color: var(--red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.level p a:not(.btn) { color: var(--accent); }

/* ---------- chips and tags ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-meta); font-weight: 500; line-height: 1; padding: 7px 11px; border-radius: var(--r-sm);
  background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.chip-red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.chip-dark { background: rgba(255,255,255,.05); color: var(--on-dark); border-color: rgba(255,255,255,.14); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- icon tile ---------- */
.icon-tile { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.icon-tile.dark { background: rgba(255,255,255,.06); border: 1px solid var(--hair-dark); color: var(--accent, var(--accent-2a)); }
.icon-tile svg { width: 22px; height: 22px; }

/* ---------- level card: the signature ---------- */
.level { --bg: var(--level-2a); --accent: var(--accent-2a);
  position: relative; border-radius: var(--r-md); background: var(--bg); color: var(--on-dark); border: 1px solid var(--hair-dark); box-shadow: var(--shadow-level);
  display: flex; flex-direction: column; overflow: hidden; }
.level.l1  { --bg: var(--level-1);  --accent: var(--accent-1); }
.level.l2a { --bg: var(--level-2a); --accent: var(--accent-2a); }
.level.l2b { --bg: var(--level-2b); --accent: var(--accent-2b); }
/* Learn: Technical AI Governance (PLANNED, no course yet). Deep indigo, the clean hue between teal and the red side of the wheel.
   Always show both track tags; never blend wine and teal into a new colour. */
.level.l2c { --bg: var(--level-2c); --accent: var(--accent-2c); }
.level.l3  { --bg: var(--level-3);  --accent: var(--accent-3); }
.level .in { padding: var(--s-6) var(--s-6) 0; display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.level .top { display: flex; justify-content: space-between; align-items: flex-start; }
.level .badge { font-size: var(--t-meta); font-weight: 700; color: var(--accent); padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.level .title { font-family: var(--serif); font-weight: 400; font-size: var(--t-h2); line-height: 1.2; letter-spacing: -0.012em; color: var(--on-dark); margin: var(--s-2) 0 0; }
.level .title.accent { color: var(--accent); }
.level p { color: var(--on-dark-2); margin: 0; max-width: 34em; }
.level .foot { margin-top: var(--s-6); padding: var(--s-4) var(--s-6); display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  border-top: 1px solid var(--hair-dark); background: rgba(255,255,255,.035); font-size: var(--t-small); font-weight: 500; }
.level .foot .go { color: var(--accent); font-weight: 700; text-decoration: none; }
.level .step { font-size: var(--t-meta); font-weight: 700; color: var(--accent); }
.level .label, .footer .label { color: var(--red-on-dark); }

/* ---------- track tags: which Learn track(s) a thing belongs to. Words always carry the meaning; the dot only echoes the level. ---------- */
.track-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.track { --dot: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-meta); font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); background: var(--card); border: 1px solid var(--line); }
.track::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }
.track.technical  { --dot: #5A1A2A; }
.track.governance { --dot: #123B3D; }
.level .track { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); color: var(--on-dark); }
.level .track.technical  { --dot: var(--accent-2a); color: var(--accent-2a); }
.level .track.governance { --dot: var(--accent-2b); color: var(--accent-2b); }

/* ---------- light card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--s-6); }
.card.hoverable { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card.hoverable:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,26,23,.05), 0 24px 48px -24px rgba(28,26,23,.3); }

/* ---------- image card (gallery, stories, recaps) ---------- */
.img-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.img-card .ph { aspect-ratio: 3 / 2; background: #ddd center / cover no-repeat; }
.img-card .bd { padding: var(--s-5) var(--s-5) var(--s-5); display: grid; gap: var(--s-3); }
.img-card .h3 { font-size: 1.25rem; }
.img-card .row { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--t-meta); color: var(--ink-3); padding-top: var(--s-3); border-top: 1px solid var(--line); }
.img-card .row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- photo tile (category, event types): label over a dark fade ---------- */
.photo-tile { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: #333 center / cover no-repeat; color: #fff; }
.photo-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,8,8,.82) 0%, rgba(12,8,8,.35) 38%, rgba(12,8,8,0) 62%); }
/* text sits bottom-left; title and subtitle share one left edge, 24px in (same as card padding) */
.photo-tile .cap { position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-5); z-index: 1; display: grid; gap: 4px; text-align: left; }
.photo-tile .cap b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.2; margin-left: -1px; /* optical: serif side-bearing */ }
.photo-tile .cap span { font-size: var(--t-meta); opacity: .9; }
/* hero photos only: frosted caption panel */
.photo-caption { position: absolute; left: var(--s-5); top: var(--s-5); max-width: 440px; padding: 16px 20px; border-radius: var(--r-md); display: grid; gap: 2px; }

/* ---------- event card ---------- */
/* one left edge for everything; the date is the only red; the action sits on a hairline at the foot */
.event { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3);
  box-shadow: var(--shadow-card); color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.event:hover, .event.hoverable:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,26,23,.05), 0 24px 48px -24px rgba(28,26,23,.3); }
.event .top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); font-size: var(--t-meta); }
.event .when { font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
.event .where { font-size: var(--t-meta); font-weight: 500; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.event .where svg { width: 14px; height: 14px; flex: none; }
.event .h3 { font-size: 1.25rem; line-height: 1.3; margin: 0; }
.event .foot { margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); font-size: var(--t-meta); color: var(--ink-3); }
.event .foot .link { min-height: 32px; font-size: var(--t-meta); }

/* ---------- glass ---------- */
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid rgba(255,255,255,.7); }
.glass-dark { background: var(--glass-dark); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid rgba(255,255,255,.18); color: #fff; }

/* ---------- nav and footer ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-bottom: 1px solid rgba(28,26,23,.07); }
.nav .wrap { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.125rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.nav .links { display: flex; gap: var(--s-5); font-size: var(--t-small); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 1100px) { .nav .links { gap: var(--s-4); } }
.nav .links a { text-decoration: none; } .nav .links a:hover { color: var(--ink); }
.footer { background: var(--level-1); color: var(--on-dark-2); padding-block: var(--s-9) var(--s-7); }
.footer .wordmark { color: var(--on-dark); }
.footer h4, .footer .fh { font-family: var(--sans); font-size: var(--t-meta); font-weight: 700; line-height: 1.4; letter-spacing: normal; color: var(--accent-1); margin: 0 0 var(--s-3); }  /* h2: the footer follows h2 sections */
.footer a { text-decoration: none; } .footer a:hover { color: var(--on-dark); }


/* =========================================================================
   Components added in v1.2: forms, status, tabs, accordion, breadcrumb, modal, empty state
   ========================================================================= */

/* ---------- forms ---------- */
.form { display: grid; gap: var(--s-5); }                     /* 24px between fields */
.field { display: grid; gap: var(--s-2); }                    /* 8px label to control */
.field label, .field .lbl { font-size: var(--t-small); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--t-meta); color: var(--ink-3); margin-top: -2px; }
.input, .select, .textarea { width: 100%; font: inherit; font-size: var(--t-body); color: var(--ink); background: var(--field);
  border: 1px solid var(--field-border); border-radius: 12px; padding: 14px 16px; min-height: 52px; box-shadow: 0 1px 2px rgba(28,26,23,.04);
  transition: border-color .15s, box-shadow .15s; }
.textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23544F48' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.input::placeholder, .textarea::placeholder { color: #9A938A; }  /* hint only, never the label; real labels sit above */
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 16%, transparent); }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 10%, transparent); }
.field .error { display: flex; gap: 8px; align-items: center; font-size: var(--t-meta); font-weight: 500; color: var(--error); }
.field .error::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--paper-2); color: var(--ink-3); cursor: not-allowed; box-shadow: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-small); color: var(--ink-2); cursor: pointer; min-height: 44px; padding-top: 10px; line-height: 1.5; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex: none; border: 1px solid var(--field-border); border-radius: 6px; background: var(--field) center / 14px no-repeat;
  cursor: pointer; transition: background-color .15s, border-color .15s; }
.check input:checked { background-color: var(--red); border-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.form .actions { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-2); }
.form .actions .btn { min-height: 52px; padding-inline: 28px; }
.form .actions .small { color: var(--ink-3); }

/* ---------- status messages (alerts) ---------- */
.alert { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); font-size: var(--t-small); line-height: 1.5; color: var(--ink); border: 1px solid transparent; }
.alert .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.alert b { display: block; font-size: var(--t-body); }
.alert.success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 25%, transparent); } .alert.success .ic { background: var(--success); }
.alert.warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 25%, transparent); } .alert.warning .ic { background: var(--warning); }
.alert.error   { background: var(--error-bg);   border-color: color-mix(in srgb, var(--error) 25%, transparent); }   .alert.error .ic   { background: var(--error); }
.alert.info    { background: var(--info-bg);    border-color: color-mix(in srgb, var(--info) 25%, transparent); }    .alert.info .ic    { background: var(--info); }

/* ---------- tabs and filter pills ---------- */
/* segmented control: a soft white thumb on a quiet track (no outline ring). Weight stays the same so nothing jumps. */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: rgba(28,26,23,.05); box-shadow: inset 0 0 0 1px rgba(28,26,23,.05); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { font: 600 var(--t-small) var(--sans); color: var(--ink-2); background: transparent; border: 0; border-radius: var(--r-pill); padding: 10px 18px; min-height: 44px; cursor: pointer; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; transition: color .15s, background-color .2s var(--ease), box-shadow .2s var(--ease); }
.tabs :focus-visible { outline-offset: -3px; }
.tabs button:hover, .tabs a:hover { color: var(--ink); background: rgba(28,26,23,.04); }
.tabs [aria-selected="true"], .tabs [aria-pressed="true"], .tabs .on { background: var(--card); color: var(--ink);
  box-shadow: 0 0 0 1px rgba(28,26,23,.08), 0 1px 2px rgba(28,26,23,.08), 0 4px 12px -4px rgba(28,26,23,.18); }
.tabs .count { margin-left: 6px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs [aria-selected="true"] .count, .tabs [aria-pressed="true"] .count, .tabs .on .count { color: var(--red); }
@media (prefers-contrast: more) { .tabs [aria-selected="true"], .tabs [aria-pressed="true"], .tabs .on { box-shadow: inset 0 0 0 2px var(--ink); } }

/* ---------- accordion (FAQ) ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: 20px 0; min-height: 44px;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; color: var(--ink); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg) translate(-3px,-3px); transition: transform .2s var(--ease); }
.accordion details[open] summary::after { transform: rotate(225deg) translate(-3px,-3px); }
.accordion .ans { padding: 0 0 22px; color: var(--ink-2); max-width: 44em; }

/* ---------- breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--t-meta); color: var(--ink-3); margin: 0 0 var(--s-5); padding: 0; list-style: none; }
.breadcrumb a { color: var(--ink-2); text-decoration: none; } .breadcrumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.breadcrumb [aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- modal / dialog ---------- */
.modal-scrim { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; padding: var(--s-5); z-index: 100; }
.modal { width: min(520px, 100%); background: var(--card); border-radius: var(--r-lg); padding: var(--s-6); box-shadow: 0 40px 90px rgba(0,0,0,.35); display: grid; gap: var(--s-4); }
.modal .actions { display: flex; justify-content: flex-end; gap: var(--s-3); margin-top: var(--s-2); flex-wrap: wrap; }
dialog.modal { border: 0; } dialog.modal::backdrop { background: var(--scrim); }

/* ---------- empty state ---------- */
.empty { border: 1px dashed var(--field-border); border-radius: var(--r-md); padding: var(--s-7) var(--s-6); display: grid; gap: var(--s-3); justify-items: start; background: color-mix(in srgb, var(--card) 60%, transparent); }
.empty .h3 { font-size: 1.25rem; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.table th { text-align: left; font-weight: 700; color: var(--ink-2); padding: 12px; border-bottom: 1.5px solid var(--ink); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---------- skip link ---------- */
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- motion ----------
   Principles: motion explains a change, it never decorates. Brief, quiet, and never on things people
   do many times (typing, scrolling, tab switching). Allowed: hover/press feedback (fast), opening and
   closing (base), one entrance per page for the hero or a newly loaded list (slow). Not allowed:
   parallax, auto-playing carousels, looping or bouncing elements, scroll-jacking.
   Everything respects "reduce motion": movement is removed, only short fades remain. */
:root { --dur-fast: 150ms; --dur-base: 220ms; --dur-slow: 600ms; }
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise var(--dur-slow) var(--ease) both; }
  .rise-2 { animation: rise var(--dur-slow) var(--ease) 80ms both; }
  .rise-3 { animation: rise var(--dur-slow) var(--ease) 160ms both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .card.hoverable:hover, .door:hover { transform: none; }
}

/* ---------- images ----------
   Formats: photos as AVIF with WebP and JPEG fallback (use <picture>); logos and icons as SVG; PNG only
   where a raster is required. Sizes: export at 1x and 2x of the displayed width (hero 1200/2400,
   card 600/1200, tile 400/800). Quality ~70 (AVIF) / ~80 (JPEG). Embed sRGB. Name files
   kebab-case: <event>-<city>-<what>.jpg, never spaces. Always set width, height and meaningful alt text;
   lazy-load anything below the first screen. */
img[loading="lazy"] { content-visibility: auto; }
.logo-tile { background: #fff; border-radius: var(--r-sm); padding: 14px 18px; display: grid; place-items: center; }
.logo-tile img { max-height: 36px; width: auto; }
/* dark mode: dim bright photos slightly; partner logos and screenshots keep a white tile */
:root[data-theme="dark"] .photo-tile, :root[data-theme="dark"] .img-card .ph { filter: brightness(.9); }
:root[data-theme="dark"] .logo-tile { background: #F3ECE7; }
:root[data-theme="dark"] img.invert-on-dark { filter: invert(1) hue-rotate(180deg); }

/* ---------- breakpoints ----------
   sm 640px (large phones), md 860px (tablets: one column), lg 1100px (small laptops). Design at 375, 768,
   1024 and 1440; content never wider than 1200px. */
@media (max-width: 1100px) {
  .section-head.split { gap: var(--s-6); }
}

@media (max-width: 860px) {
  .section { padding-block: var(--s-9); }
  .wrap { width: min(var(--wrap), calc(100% - 40px)); }
  .event { grid-template-columns: 56px 1fr; }
  .level .in { padding: var(--s-5) var(--s-5) 0; } .level .foot { padding: var(--s-4) var(--s-5); }
  .section-head.split { grid-template-columns: 1fr; }
  .nav .links { display: none; }
}
@media (max-width: 640px) {
  .section { padding-block: var(--s-8); }
  .card { padding: var(--s-5); }
  .section-head { margin-bottom: var(--s-6); }
}
.accordion .ans > p:first-child { margin-top: 0; }
.accordion .ans > p:last-child { margin-bottom: 0; }
