/* ===========================================================================
   RESONANCE LOUNGE - EVENT SITES (Spec 14 section 8)
   The default theme of every hosted event site. Same-origin, embedded in the
   assembly, nothing third-party. A tenant overrides the tokens below with a
   <style> block the server writes from validated values (ThemeCss); it never
   ships a stylesheet of its own, which is what keeps one description rendering
   on a festival's site and a company's alike.

   Tokens from Docs/Specs/ResonanceLounge_Colors_02_System.html: Void ground,
   Cosmic cards, one hero, Cyan links, Amber the rare accent, body text only in
   Starlight or Muted Lilac. Poppins, self-hosted.
   =========================================================================== */
@font-face { font-family: 'Poppins'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/Poppins-Regular.707fdc5c8b.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/Poppins-Medium.8d909883de.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/Poppins-SemiBold.248c0244b3.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/Poppins-Bold.7219547ee2.ttf') format('truetype'); }

:root {
  --ground: #080410;
  --card: #0C0618;
  --hero: #EC2B8A;
  --link: #29E0E6;
  --accent: #F0A020;
  --text: #F2ECFA;
  --muted: #B9A8D8;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --hairline: color-mix(in srgb, var(--muted) 16%, transparent);
  --hairline-strong: color-mix(in srgb, var(--muted) 30%, transparent);
  --hero-soft: color-mix(in srgb, var(--hero) 14%, transparent);
  --measure: 1040px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* The ambient ground of the full register; the restrained register drops it. */
body::before {
  content: '';
  position: fixed; inset: -20vh -10vw; z-index: 0; pointer-events: none;
  background:
    radial-gradient(48vw 48vw at 18% 8%, color-mix(in srgb, var(--hero) 16%, transparent), transparent 62%),
    radial-gradient(52vw 52vw at 86% 22%, color-mix(in srgb, var(--link) 8%, transparent), transparent 64%);
}
body.restrained::before { display: none; }
header, main, footer { position: relative; z-index: 1; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(20px, 3vw, 26px); margin-top: 8px; }
p { margin: 0; }
code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; color: var(--muted); }
img { max-width: 100%; height: auto; }
button { font: inherit; }

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; left: 16px; background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--hairline); backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: var(--text); font-weight: 600; font-size: 18px; display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { max-height: 44px; width: auto; }
.site-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); }
.nav-who { color: var(--muted); font-size: 13px; }
.inline-form { display: inline-flex; gap: 10px; align-items: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-size: inherit; }
.linkish:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 40px 0 24px; border-bottom: 1px solid var(--hairline); }
.hero-image { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.hero-where, .lede { color: var(--muted); margin-top: 10px; font-size: 18px; }
.chips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 12px; letter-spacing: 0.04em; padding: 3px 10px; border: 1px solid var(--hairline-strong); border-radius: 999px; color: var(--muted); }

/* The organizer's content: only tags from the allow-list, styled here alone. */
.rich { margin-top: 18px; max-width: 72ch; }
.rich p { margin: 0 0 12px; }
.rich h2, .rich h3 { margin: 22px 0 8px; }
.rich ul, .rich ol { margin: 0 0 12px; padding-inline-start: 22px; }
.rich blockquote { margin: 16px 0; padding: 4px 18px; border-inline-start: 3px solid var(--hero); color: var(--muted); }
.rich hr { border: 0; border-top: 1px solid var(--hairline); margin: 20px 0; }
.rich img { display: block; border-radius: 10px; margin: 12px 0; }
.rich a { text-decoration: underline; text-underline-offset: 3px; }
.bio { font-size: 15px; color: var(--muted); }
.bio p:last-child { margin-bottom: 0; }

/* The two-click card: nothing from the provider until the tap. */
.embed { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px 16px; margin: 14px 0; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); }
.embed-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.embed-provider { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.embed-title { font-weight: 500; overflow-wrap: anywhere; }
.embed-note { font-size: 12px; color: var(--muted); }
.embed-play { background: var(--hero); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer; }
.embed-open { font-size: 13px; grid-column: 1 / -1; }
.embed iframe { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.embed[data-provider="soundcloud"] iframe { aspect-ratio: auto; height: 166px; }

/* ---------------------------------------------------------------- programme */
.programme { padding: 24px 0 40px; }
.controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; }
.tabs { display: inline-flex; border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 3px; }
.tabs a { padding: 6px 16px; border-radius: 999px; color: var(--muted); font-size: 14px; }
.tabs a[aria-selected="true"] { background: var(--hero); color: #fff; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search input { background: var(--card); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 999px; padding: 8px 16px; min-width: 220px; font: inherit; font-size: 15px; }
.search button, .form button, .join-form button { background: var(--hero); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 600; cursor: pointer; }
.search .clear { font-size: 13px; }
.zone-line { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.day-strip { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: thin; }
.day-strip a { white-space: nowrap; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--hairline); color: var(--muted); font-size: 14px; }
.day-strip a[aria-current="page"] { border-color: var(--hero); color: var(--text); background: var(--hero-soft); }
.day, .room { margin-top: 26px; }
.room-summary { color: var(--muted); font-size: 15px; }
.empty { color: var(--muted); margin-top: 24px; }

.sessions { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.session { display: grid; grid-template-columns: 112px 1fr auto; gap: 6px 16px; align-items: start; padding: 14px 16px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); }
.session.open { border-color: var(--hero); }
.session-time { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; }
.session-time .dash { opacity: 0.6; }
.untimed { font-size: 13px; }
.badge { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hero); border: 1px solid var(--hero); border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; }
.session-body { min-width: 0; }
.session-name { color: var(--text); font-weight: 600; font-size: 17px; display: block; }
.session-room, .session-people { display: inline-block; color: var(--muted); font-size: 14px; margin-inline-end: 12px; }
.session-summary { color: var(--muted); font-size: 14px; margin-top: 4px; }
.session .chips { margin-top: 6px; }
.bookmark { background: none; border: 1px solid var(--hairline-strong); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.bookmark[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.mine-mark { font-size: 12px; color: var(--accent); white-space: nowrap; }

/* ---------------------------------------------------------------- a session, a person */
.back { padding-top: 22px; font-size: 14px; }
.session-page, .person-page, .sign-in, .not-found { padding: 16px 0 40px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 20px 0; }
.facts dt { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
.facts .zone, .facts .address { display: block; color: var(--muted); font-size: 14px; }
.interest { margin: 8px 0 20px; padding: 16px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); }
.interest-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.choice { background: none; border: 1px solid var(--hairline-strong); color: var(--text); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.choice.lit { background: var(--hero); border-color: var(--hero); color: #fff; }
.error { color: var(--accent); margin-top: 10px; font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; margin-top: 10px; }
.join-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.people-section { margin-top: 28px; }
.people { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 16px; }
.person { display: grid; grid-template-columns: 56px 1fr; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--card); }
.avatar.large { width: 96px; height: 96px; }
.avatar.placeholder { display: block; border: 1px solid var(--hairline-strong); }
.person-name { color: var(--text); font-weight: 600; }
.person-role { display: inline-block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-inline-start: 8px; }
.person-head { display: flex; gap: 20px; align-items: center; margin-bottom: 18px; }
.open-in-app { margin-top: 28px; font-size: 14px; }

/* ---------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 6px; max-width: 420px; margin-top: 20px; }
.form label { font-size: 13px; color: var(--muted); margin-top: 10px; }
.form input { background: var(--card); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: 10px; padding: 10px 14px; font: inherit; }
.form button { margin-top: 16px; align-self: flex-start; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: auto; border-top: 1px solid var(--hairline); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer p { margin-top: 8px; }
.languages { margin-top: 12px; }
.languages summary { cursor: pointer; }
.languages ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.languages a[aria-current="true"] { color: var(--text); font-weight: 600; }
.powered a { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .session { grid-template-columns: 1fr; }
  .bookmark { justify-self: start; }
  .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dd { margin-bottom: 10px; }
  .controls { flex-direction: column; align-items: stretch; }
  .search input { flex: 1; min-width: 0; }
}
@media print {
  body::before { display: none; }
  .site-header, .site-footer, .bookmark, .interest, .search, .tabs { display: none; }
  .session { break-inside: avoid; }
}

/* ---------------------------------------------------------------- the landing page (our own branding) */
.brand-accent { color: var(--hero); }
.landing { border-bottom: 0; }
.event-cards { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.event-card a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); color: var(--text); }
.event-card a:hover { text-decoration: none; border-color: var(--hero); }
.event-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.event-name { font-weight: 600; font-size: 18px; }
.event-when, .event-where { color: var(--muted); font-size: 14px; }
.event-summary { color: var(--muted); font-size: 14px; margin-top: 6px; }
.events.past { margin-top: 30px; padding-bottom: 40px; }
.events.past .event-card a { opacity: 0.8; }

/* the session's intent links: two links into the app, the second the committed one */
.interest-links { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
a.choice { display: inline-block; text-decoration: none; }
a.choice:hover { text-decoration: none; border-color: var(--hero); }
