/* Frosted-glass theme: translucent blurred cards over a deep indigo field lit by soft AISLE purple/blue glows.
   One dark look on purpose: glass only reads well against a rich dark backdrop. */
:root {
  --bg: #06182f;
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .11);
  --glass-hi: rgba(255, 255, 255, .16);
  --edge: rgba(255, 255, 255, .14);
  --edge-soft: rgba(255, 255, 255, .08);
  --fg: #f3f4ff; --muted: #b6bce0; --faint: #8a91bd;
  --accent: #b9a4ff; --accent-2: #7fb2ff; --accent-ink: #d9ceff;
  --good: #7fe0b0; --warn: #f2c96b; --crit: #ff8f8f;
  --grad: linear-gradient(100deg, #8f6dff 0%, #4a8fff 50%, #d873ac 100%);
  --grad-text: linear-gradient(90deg, #c7b2ff, #8fc4ff 55%, #f2a9cf);
  --radius: 16px;
  --blur: blur(22px) saturate(150%);
  --font-display: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tabbar: 64px; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  background: transparent; color: var(--fg); font: 15px/1.5 var(--font-body); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); min-height: 100dvh;
}
/* the lit backdrop the glass blurs */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  /* textured teal -> navy -> blue -> rose backdrop; the CSS layers underneath match it if the image hasn't loaded */
  background:
    url("bg.webp") 70% 100% / cover no-repeat,
    radial-gradient(60% 45% at 100% 100%, rgba(200, 110, 160, .75), transparent 70%),
    radial-gradient(70% 50% at 45% 100%, rgba(40, 100, 170, .8), transparent 70%),
    radial-gradient(50% 40% at 0% 30%, rgba(10, 70, 70, .7), transparent 70%),
    radial-gradient(30% 20% at 0% 0%, rgba(80, 30, 90, .7), transparent 70%),
    linear-gradient(180deg, #061a2e 0%, #05173a 50%, #123d73 100%);
}
/* a soft extra light so the glass has colour to pick up mid-screen */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 85% 92%, rgba(225, 120, 175, .28), transparent 70%),
    radial-gradient(45vmax 30vmax at 30% 70%, rgba(50, 130, 210, .22), transparent 70%),
    radial-gradient(35vmax 25vmax at 5% 20%, rgba(30, 140, 130, .18), transparent 70%);
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 300; line-height: 1.18; margin: 0; text-wrap: balance; letter-spacing: .01em; }
a { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* glass surface shared by cards, bars, inputs */
.card, .top, .tabbar, .seg, .toggle, .install, .hero, input, textarea, .btn, .bubble {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}

/* header */
.top {
  position: sticky; top: 0; z-index: 10; background: rgba(5, 20, 40, .5);
  border-bottom: 1px solid var(--edge-soft); padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  display: flex; align-items: center; gap: 10px;
}
.top::after { content: ""; position: absolute; inset: auto 0 -1px 0; height: 2px; background: var(--grad); opacity: .85; }
.top img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 1px var(--edge); }
.top .t { font-family: var(--font-display); font-size: 1.1rem; font-weight: 400; letter-spacing: .03em; }
.top .s { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-left: auto; text-align: right; }
.back { appearance: none; border: 0; background: none; color: var(--accent-ink); font-weight: 600; padding: 6px 4px; cursor: pointer; }

main { max-width: 720px; margin: 0 auto; padding: 18px 16px; }

/* tab bar */
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 10; background: rgba(5, 20, 40, .55); border-top: 1px solid var(--edge-soft);
  display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); text-decoration: none; font-size: .7rem; font-weight: 600; position: relative; letter-spacing: .02em;
}
.tabbar a[aria-current="page"] { color: var(--fg); }
.tabbar a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--grad);
}
.tabbar svg { width: 23px; height: 23px; }
.badge {
  position: absolute; top: 8px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; padding: 0 5px;
  background: #ff6b81; color: #fff; font-size: .65rem; line-height: 17px; text-align: center;
}

/* hero: the big quiet headline */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 26px 20px 22px; margin-bottom: 18px; text-align: center;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(120, 100, 255, .32), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(220, 115, 172, .30), transparent 60%),
    linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 20px 50px rgba(5, 6, 20, .45);
}
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.hero::after {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(74, 143, 255, .3), transparent); z-index: -1;
}
.hero .k { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: #d6c8ff; }
.hero h2 { font-size: 1.85rem; font-weight: 300; margin-top: 8px; letter-spacing: .015em; }
.hero h2 a { color: inherit; }
.hero .m { font-size: .92rem; color: var(--muted); margin-top: 8px; }
.hero a { color: var(--fg); }
.hero .btn { margin-top: 4px; }
.hero .row { justify-content: center; }

/* segmented day switcher */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--glass); border: 1px solid var(--edge-soft); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { appearance: none; border: 0; background: none; border-radius: 10px; padding: 8px 4px; font-size: .85rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: linear-gradient(135deg, rgba(143,109,255,.55), rgba(74,143,255,.45) 60%, rgba(216,115,172,.45)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 18px rgba(106, 108, 255, .35); }
.seg small { display: block; font-weight: 500; font-size: .68rem; font-family: var(--font-mono); letter-spacing: .04em; opacity: .85; }

/* cards */
.list { display: grid; gap: 10px; }
.card {
  display: block; position: relative; color: inherit; text-decoration: none; min-width: 0; padding: 15px;
  border-radius: var(--radius); border: 1px solid var(--edge);
  background: linear-gradient(165deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.06) 55%, rgba(255,255,255,.04) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 10px 30px rgba(5, 6, 20, .28);
}
a.card { transition: background .15s, border-color .15s, transform .15s; }
a.card:hover { border-color: rgba(255,255,255,.24); }
a.card:active { transform: scale(.99); background: var(--glass-2); }
.sess { display: grid; grid-template-columns: 74px 1fr; gap: 12px; }
.sess .time { white-space: pre-line; font-family: var(--font-mono); font-size: .72rem; font-weight: 500; color: var(--muted); line-height: 1.4; letter-spacing: .01em; }
.sess .kick { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; margin-bottom: 2px;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sess .role { display: flex; align-items: baseline; gap: 8px; margin-top: 7px; font-size: .8rem; color: #d3d7f2; line-height: 1.35; }
.sess .role .pill { flex: 0 0 auto; }
.sess .ttl { font-family: var(--font-display); font-weight: 400; font-size: 1.04rem; line-height: 1.3; letter-spacing: .01em; }
.sess .ppl { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.sess.break { background: rgba(255,255,255,.025); border-style: dashed; border-color: var(--edge-soft); box-shadow: none; }
.sess.break .ttl { font-weight: 500; color: var(--muted); }
.sess.live { border-color: rgba(185, 164, 255, .6); box-shadow: 0 0 0 1px rgba(185,164,255,.35), 0 0 34px rgba(138, 92, 240, .35); }
/* small mono label in a glass chip, e.g. room */
.tag {
  display: inline-block; margin-top: 9px; font-family: var(--font-mono); font-size: .62rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: #8fe6f0; padding: 4px 9px; border-radius: 7px;
  background: rgba(64, 200, 225, .12); border: 1px solid rgba(64, 200, 225, .28);
}
.pill { display: inline-block; font-family: var(--font-mono); font-size: .62rem; font-weight: 500; padding: 3px 8px; border-radius: 20px; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.p-live { background: var(--grad); color: #fff; box-shadow: 0 0 14px rgba(138, 92, 240, .6); }
.p-mute { background: rgba(255,255,255,.08); color: var(--muted); border: 1px solid var(--edge-soft); }
.p-good { background: rgba(127, 224, 176, .16); color: var(--good); border: 1px solid rgba(127,224,176,.3); }
.p-info { background: rgba(110, 170, 255, .16); color: #a9cbff; border: 1px solid rgba(110,170,255,.32); }
.p-spk { background: rgba(155, 107, 255, .22); color: #d9ccff; border: 1px solid rgba(170, 130, 255, .45); }
.p-mod { background: rgba(255, 176, 92, .18); color: #ffcf9a; border: 1px solid rgba(255, 176, 92, .42); }
.p-aud { background: rgba(255, 110, 170, .16); color: #ffb3d1; border: 1px solid rgba(255, 110, 170, .38); }
.p-warn { background: rgba(242, 201, 107, .16); color: var(--warn); border: 1px solid rgba(242,201,107,.32); }
.star { appearance: none; border: 0; background: none; color: var(--faint); font-size: 1.2rem; padding: 0 2px; cursor: pointer; line-height: 1; }
.star[aria-pressed="true"] { color: #f6c453; }

/* detail */
.detail h2 { font-size: 1.65rem; font-weight: 300; margin: 6px 0 10px; letter-spacing: .01em; }
.meta { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px; }
.meta span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px; background: rgba(155,107,255,.14); border: 1px solid rgba(170,130,255,.3); color: #ddd2ff; }
.prose { white-space: pre-line; line-height: 1.65; margin: 16px 0; color: #d9dcf0; }
.section-h { font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #cfd3f5; font-weight: 500; margin: 24px 2px 10px; display: flex; align-items: center; gap: 8px; }
.section-h::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--grad); }
.person { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(138,92,240,.55), rgba(63,134,240,.45)); color: #fff; font-weight: 600; font-size: .85rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.person .n { font-family: var(--font-display); font-weight: 500; font-size: 1rem; letter-spacing: .01em; }
.person .c { font-size: .8rem; color: var(--muted); line-height: 1.3; }
.person .r { margin-left: auto; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* forms & buttons */
.btn {
  appearance: none; border: 1px solid var(--edge); background: rgba(255,255,255,.08); color: var(--fg); border-radius: 12px;
  padding: 10px 15px; font-weight: 600; font-size: .88rem; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.btn:hover { background: rgba(255,255,255,.12); }
.btn.primary { background: var(--grad); border-color: rgba(255,255,255,.25); color: #fff; box-shadow: 0 8px 24px rgba(91, 99, 232, .4), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 7px 12px; font-size: .8rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
label { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
input, textarea {
  width: 100%; border: 1px solid var(--edge); background: rgba(255,255,255,.06); color: var(--fg); border-radius: 12px;
  padding: 12px 13px; font: inherit; font-size: 16px;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 80px; }
.search { margin-bottom: 12px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--glass); border: 1px solid var(--edge-soft); border-radius: 14px; margin-top: 14px; }
.toggle input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: #8a5cf0; }
.toggle div { font-size: .88rem; }
.note { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.err { color: var(--crit); font-size: .85rem; margin-top: 8px; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: .9rem; }

/* info */
.kv { display: grid; gap: 2px; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--edge-soft); font-size: .9rem; }
.kv div:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
details.faq { border-bottom: 1px solid var(--edge-soft); padding: 11px 0; }
details.faq:last-child { border-bottom: 0; }
details.faq summary { font-weight: 600; cursor: pointer; }
details.faq p { margin: 6px 0 0; color: var(--muted); }
.sponsors { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sponsors .card { display: grid; place-items: center; min-height: 92px; text-align: center; font-weight: 600; font-size: .85rem; padding: 14px; }
/* logos are made for white, so they sit on a frosted-white plate */
.sponsors .card.logo { background: rgba(255,255,255,.92); border-color: rgba(255,255,255,.6); }
.sponsors .card.logo img { max-height: 54px; max-width: 100%; object-fit: contain; }

/* chat */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - 140px - var(--tabbar)); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 18px; background: rgba(255,255,255,.09); border: 1px solid var(--edge-soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--grad); border-color: rgba(255,255,255,.2); color: #fff; }
.bubble time { display: block; font-size: .64rem; opacity: .7; margin-top: 2px; font-family: var(--font-mono); }
.composer {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 8px 0;
  display: flex; gap: 8px; align-items: flex-end;
  background: linear-gradient(180deg, transparent, rgba(5,20,40,.85) 35%);
}
.composer textarea { min-height: 44px; max-height: 140px; }
.unread { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; box-shadow: 0 0 10px var(--accent); }

.install {
  display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.05); border: 1px solid var(--edge-soft); border-radius: 14px;
  padding: 9px 10px 9px 13px; margin-bottom: 14px; font-size: .8rem; color: var(--muted);
}
.install .btn { flex: 0 0 auto; background: rgba(255,255,255,.08); border-color: var(--edge); color: var(--fg); box-shadow: none; font-weight: 500; }
.install .btn:hover { background: rgba(255,255,255,.14); }
.install .x { margin-left: auto; appearance: none; border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 12px);
  background: rgba(238,240,251,.95); color: #0c0f22; padding: 9px 14px; border-radius: 12px; font-size: .85rem; z-index: 50; max-width: calc(100% - 32px);
}

/* browsers without backdrop-filter: make glass a bit more opaque so text stays legible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .seg, .toggle, .install { background: #13294a; }
  .top, .tabbar { background: #071a33; }
}
@media (prefers-reduced-transparency: reduce) {
  .card, .seg, .toggle, .install { background: #13294a; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* MATTERS wordmark in the header (white logo) */
.top img.wordmark { width: auto; height: 22px; border-radius: 0; box-shadow: none; }
.top .t.sep { font-size: 1rem; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--edge); }

/* session Q&A */
.qa-cta { display: grid; gap: 12px; justify-items: start; font-size: .9rem; color: #d3d7f2;
  background: linear-gradient(135deg, rgba(155,107,255,.20), rgba(63,160,255,.12)); }
.qa-form textarea { min-height: 72px; }
.qa-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qa-anon { display: flex; align-items: center; gap: 7px; margin: 0; font-family: var(--font-body); font-size: .8rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.qa-anon input { width: 18px; height: 18px; accent-color: #9b6bff; }
.qa-count { margin-left: auto; font-family: var(--font-mono); font-size: .66rem; color: var(--faint); }
#qa-list { margin-top: 10px; }
.qa-q { display: flex; gap: 12px; align-items: flex-start; padding: 13px; }
.qa-q.done { opacity: .65; }
.qa-vote {
  appearance: none; flex: 0 0 auto; width: 46px; display: grid; justify-items: center; gap: 1px; padding: 7px 0; cursor: pointer;
  border-radius: 12px; border: 1px solid rgba(170,130,255,.35); background: rgba(155,107,255,.12); color: #d9ccff;
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500;
}
.qa-vote[aria-pressed="true"] { background: var(--grad); border-color: rgba(255,255,255,.3); color: #fff; box-shadow: 0 6px 16px rgba(106,108,255,.4); }
.qa-vote:disabled { cursor: default; opacity: .6; }
.qa-main { min-width: 0; flex: 1; }
.qa-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.qa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; font-size: .78rem; color: var(--muted); }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; color: var(--crit); font-size: .78rem; cursor: pointer; text-decoration: underline; }
