/*
 * Unburden 2026 surface.
 *
 * Retheme of the AYUS light surface for the Unburden symposium, so the staff
 * translation beta looks like the event app it is reached from rather than a
 * different product. Colours are the Inuspheresis CI values:
 *   Plasma Purple #5a3c7c · Mild Purple #a183c3 · Vital Violet #e3daed
 * Eluate Orange and Young Beige exist in the CI but are deliberately unused,
 * matching the event app.
 *
 * Type is Helvetica, as the event app uses — a system stack, since Helvetica
 * Neue is a licensed desktop face we cannot serve.
 */

:root {
  --ayus-red: #5a3c7c;        /* Plasma Purple — the brand anchor */
  --ayus-red-deep: #4a3265;
  --blue: #5a3c7c;
  --blue-dark: #180f24;
  --blue-light: #e3daed;      /* Vital Violet */
  --neo-light: #f6f3f9;
  --neo-warm: #ece5f2;
  --neo-gray: #a183c3;        /* Mild Purple */
  --neo-gray-dark: #4a3265;

  --bg: #fbfafc;
  --panel: #ffffff;
  --sunk: #f6f3f9;
  --line: #ece5f2;
  --line-strong: #d7c9e4;
  --fg: #1c1523;
  --fg-2: #382650;
  --dim: #5d5468;
  --dimmer: #78579c;

  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(24, 15, 36, .05), 0 8px 24px rgba(24, 15, 36, .06);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

/* the logo's arc motif, as a whisper of brand colour on white */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 46vh;
  background:
    radial-gradient(55% 62% at 18% 0%, rgba(247, 65, 56, .085), transparent 70%),
    radial-gradient(46% 55% at 86% 4%, rgba(45, 98, 255, .062), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 940px; margin: 0 auto; padding: 30px 22px 72px; }

/* ── masthead ─────────────────────────────────────────────── */
.mast { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 30px; }
/* The Unburden wordmark ships white-on-transparent — the only version that
   exists — so it needs a dark plate to sit on rather than the light page.
   Matches the purple hero the event app opens with. */
.mast img {
  /* content-box on purpose: the sheet sets border-box globally, which would
     make the padding below eat the declared height and squash the wordmark. */
  box-sizing: content-box;
  height: 20px;
  width: auto;
  display: block;
  background: #382650;
  padding: 10px 14px;
  border-radius: 10px;
}
.mast .div { width: 1px; height: 20px; background: var(--line-strong); }
.mast h1 { font-size: 15px; font-weight: 500; margin: 0; letter-spacing: .01em; color: var(--fg-2); }
.mast .role {
  margin-left: auto; font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; padding: 5px 11px; border-radius: 100px;
}
.role.listener { background: var(--blue-light); color: #4a3265; border: 1px solid #bcd0ff; }
.role.speaker  { background: #fdecea; color: var(--ayus-red-deep); border: 1px solid #f5c6c0; }

.lede { font-size: 28px; line-height: 1.16; font-weight: 500; letter-spacing: -.025em; margin: 0 0 8px; color: var(--fg); }
.lede em { font-style: normal; color: var(--ayus-red); }
.sub { color: var(--dim); font-size: 13.5px; margin: 0; }

/* ── surfaces ─────────────────────────────────────────────── */
/*
 * position:relative + a managed z-index, and deliberately NO backdrop-filter.
 * A filter/backdrop-filter here would create a stacking context and trap an
 * open dropdown inside its own card, letting the next card paint over it.
 */
.card {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 18px; }
/* whichever card holds an open dropdown wins the stacking order */
.card.picker-open { z-index: 300; }

label, .lbl {
  display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .11em; color: var(--dimmer); margin-bottom: 9px;
}

input[type=text], input[type=password] {
  width: 100%; padding: 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--sunk); color: var(--fg);
  font-family: var(--font); font-size: 15px;
}
input::placeholder { color: var(--dimmer); }
input:focus {
  outline: none; background: #fff;
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(90, 60, 124, .16);
}

button {
  font-family: var(--font); font-size: 15px; font-weight: 550;
  border: none; border-radius: var(--r-sm); cursor: pointer;
  padding: 13px 22px; background: var(--ayus-red); color: #fff;
  transition: filter .13s, transform .08s, box-shadow .13s;
  box-shadow: 0 1px 2px rgba(247, 65, 56, .2);
}
button:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 3px 12px rgba(247, 65, 56, .26); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }
button.big { width: 100%; padding: 16px; font-size: 16px; }
button.ghost {
  background: #fff; color: var(--fg-2); border: 1px solid var(--line-strong); box-shadow: none;
}
button.ghost:hover:not(:disabled) { background: var(--sunk); filter: none; box-shadow: none; }
button.mic { background: var(--ayus-red); }
button.mic.on { background: var(--neo-gray-dark); box-shadow: none; }

.row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ── status ───────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neo-gray); flex: none; }
.dot.live { background: var(--ayus-red); box-shadow: 0 0 0 4px rgba(247, 65, 56, .16); animation: pulse 2s ease-in-out infinite; }
.dot.busy { background: var(--neo-warm); }
.dot.err  { background: var(--ayus-red-deep); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(247, 65, 56, .16); }
  50%      { box-shadow: 0 0 0 8px rgba(247, 65, 56, .04); }
}

#meter { height: 4px; background: var(--sunk); border-radius: 3px; overflow: hidden; flex: 1; min-width: 100px; }
#meterFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--ayus-red), #ff8a84); transition: width .07s linear; }

/* ── language picker ──────────────────────────────────────── */
.lp { position: relative; }
.lp-input {
  width: 100%; padding: 13px 15px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--sunk); color: var(--fg); font-size: 15px; font-weight: 400;
  cursor: pointer; text-align: left; display: flex; align-items: center; gap: 9px; box-shadow: none;
}
.lp-input::after { content: "▾"; margin-left: auto; color: var(--dimmer); font-size: 12px; }
.lp-input:hover { background: #ececec; border-color: var(--neo-gray); filter: none; box-shadow: none; }
.lp-list {
  position: absolute; z-index: 400; left: 0; right: 0; top: calc(100% + 7px);
  max-height: 300px; overflow-y: auto; background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 4px 12px rgba(8, 3, 49, .08), 0 20px 48px rgba(8, 3, 49, .14);
  display: none;
}
.lp-list.open { display: block; }
/* flip upwards when there is more room above than below */
.lp-list.up { top: auto; bottom: calc(100% + 7px); }
.lp-search { position: sticky; top: 0; background: #fff; padding: 9px; border-bottom: 1px solid var(--line); }
.lp-search input { padding: 10px 12px; font-size: 14px; }
.lp-opt { padding: 10px 15px; cursor: pointer; display: flex; align-items: baseline; gap: 10px; }
.lp-opt:hover { background: var(--blue-light); }
.lp-opt.cur { background: #fdecea; }
.lp-opt .nat { font-weight: 550; }
.lp-opt .en { color: var(--dim); font-size: 12.5px; }
.lp-opt .cd { margin-left: auto; color: var(--dimmer); font-size: 11px; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.lp-none { padding: 16px; color: var(--dim); font-size: 13.5px; text-align: center; }

/* ── people ───────────────────────────────────────────────── */
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person {
  background: var(--sunk); border: 1px solid var(--line-strong); border-radius: 100px;
  padding: 6px 14px; font-size: 13px; display: flex; align-items: center; gap: 8px; color: var(--fg-2);
}
.person.me { border-color: var(--ayus-red); background: #fdecea; }
.person.spk { border-color: #f5c6c0; }
.person .l { color: var(--dim); font-size: 12px; }
.person .mic { color: var(--ayus-red); }

/* ── transcript feed ──────────────────────────────────────── */
/*
  The transcript scrolls inside its own box.

  Reported 2026-09-28: while somebody is speaking the transcript grows several
  times a second, and every new fragment used to scroll the whole PAGE to the
  bottom, so the Stop button at the top could not be reached. A speaker at a
  lectern trying to end the session was fighting the page for it.

  Two things fix it and both are needed. This caps the height so the page stops
  growing at all, and app.js now scrolls this element rather than the window,
  and only when the reader is already at the bottom. 46vh leaves the controls
  and the people list on screen on a laptop; on a phone it is most of the
  screen, which is right, because on a phone the transcript is the reason you
  are looking.

  overscroll-contain, so flicking to the end of the transcript does not carry on
  and drag the page. That is the opposite of the call made in the Unburden app
  for its vertical scrollers, and deliberately: there the page is the thing you
  want to keep scrolling, here the page is a control panel you want to stay put.
*/
#feed {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 46vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.line { padding: 13px 16px; border-radius: var(--r-sm); background: var(--sunk); border-left: 3px solid var(--line-strong); }
.line .who { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--dimmer); margin-bottom: 5px; }
.line.src { border-left-color: var(--neo-gray); }
.line.src .txt { color: var(--dim); font-size: 14px; }
.line.tr { border-left-color: var(--ayus-red); background: #fff4f3; }
.line.tr .txt { font-size: 18px; line-height: 1.42; color: var(--fg); }
.line.note { border-left-color: var(--blue); background: #f6f3f9; }
.line.note .txt { color: var(--dim); font-size: 13px; }
.empty { color: var(--dimmer); font-size: 13.5px; text-align: center; padding: 34px 0; }

/* ── notices ──────────────────────────────────────────────── */
.banner { padding: 13px 16px; border-radius: var(--r-sm); font-size: 13.5px; margin-bottom: 16px; display: none; }
.banner.show { display: block; }
.banner.err { background: #fff1f0; border: 1px solid #f5c6c0; color: #8f1d15; }
.note {
  background: #f6f3f9; border: 1px solid var(--line-strong);
  color: var(--dim); font-size: 12.5px; padding: 11px 14px; border-radius: var(--r-sm); margin-top: 15px;
}
.note b { color: #4a3265; font-weight: 600; }
.hidden { display: none !important; }
code {
  background: var(--sunk); border: 1px solid var(--line); padding: 1.5px 6px; border-radius: 5px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg-2);
}

@media (max-width: 620px) {
  .lede { font-size: 23px; }
  .wrap { padding: 22px 16px 60px; }
}

/* ---------------------------------------------------------------------------
   Input selection on the speaker page.

   A native <select> and a native checkbox look like a different application
   sitting next to these inputs, which on a page somebody opens at a lectern is
   exactly the wrong impression. The select matches input[type=text] down to the
   focus ring and carries its own chevron, because the platform one cannot be
   styled; the switch reads as a mode rather than a form field, which is what it
   is.
   --------------------------------------------------------------------------- */

.input-row {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-top: 18px;
}
.input-field { flex: 1 1 260px; min-width: 0; }

select {
  width: 100%; padding: 13px 38px 13px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background-color: var(--sunk); color: var(--fg);
  font-family: var(--font); font-size: 15px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%2378579c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:focus {
  outline: none; background-color: #fff;
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(90, 60, 124, .16);
}

/* The label rule above is block, uppercase and letterspaced, which is right for
   a field label and wrong for a switch you read as a sentence. */
.switch {
  display: inline-flex; align-items: center; gap: 11px; margin: 0 0 3px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--fg-2); cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px;
  background: var(--line-strong); transition: background .15s;
}
.switch .knob {
  position: absolute; top: 2.5px; left: 2.5px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28, 21, 35, .28);
  transition: transform .15s;
}
.switch input:checked + .track { background: var(--ayus-red); }
.switch input:checked + .track .knob { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(90, 60, 124, .22); }

/* ── BRAND=ayus ───────────────────────────────────────────── */
/*
 * The Ayus theme, for rooms that are not Unburden (first: the Teams webinar of
 * November 2026). Ayus red and blue are the two colours of the logo's arc motif
 * that body::before already whispers. The pink tints elsewhere in this sheet
 * (#fdecea, #fff4f3, #f5c6c0) were Ayus-red tints all along, so they stay.
 * Selected by <html class="brand-ayus">, which the server writes from BRAND.
 */
:root.brand-ayus {
  --ayus-red: #f74138;
  --ayus-red-deep: #c62f27;
  --blue: #2d62ff;
  --blue-dark: #0f1a33;
  --blue-light: #e8eeff;
  --neo-light: #f5f6f8;
  --neo-warm: #eceef2;
  --neo-gray: #9aa3b5;
  --neo-gray-dark: #3a4356;

  --bg: #fafbfc;
  --sunk: #f5f6f8;
  --line: #eceef2;
  --line-strong: #d5d9e2;
  --fg: #151a24;
  --fg-2: #262e3d;
  --dim: #555d6c;
  --dimmer: #6b7385;
}
/* The Ayus logo is red on transparent and wants the light page, not a plate. */
.brand-ayus .mast img { background: none; padding: 10px 0; height: 22px; border-radius: 0; }
.brand-ayus .role.listener { color: #1f46c4; border-color: #c9d6ff; }
.brand-ayus .line.note, .brand-ayus .note { background: var(--sunk); }
.brand-ayus .note b { color: var(--fg-2); }

.mast h1 .event { color: var(--dim); font-weight: 400; }

/* ── the webinar bar (any brand; shown only when WEBINAR_URL is set) ── */
.webinar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin: -12px 0 22px; padding: 11px 16px;
  background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--fg-2);
}
.webinar a { margin-left: auto; color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }

/* ── BRAND=inuspheresis ───────────────────────────────────── */
/*
 * INUSPHERESIS_DESIGN_SYSTEM, "Quiet Authority"
 * (https://claude.ai/artifact/5a64ezM5ZVZrCRQxQdqsDT, tokens/colors.css), read
 * 2026-11-17. What it asks of a screen like this one:
 *   - white page; Vital Violet #E3DAED secondary surface; Plasma Purple #5A3C7C
 *     the dark brand colour; neutrals #777776 / #303030 / #000 for text only
 *   - Eluate Orange #FF5C00 is THE accent: one orange element per layout. Here
 *     that is the main button of each state (Join / Start speaking session /
 *     Start speaking). Everything --ayus-red used to colour becomes purple.
 *   - radius 0, no shadows, hairline 1px rules, focus darkens the border,
 *     120ms linear colour transitions, no transforms on press
 *   - the black wordmark on light surfaces, small, once
 *   - Roobert is the typeface, but only TRIAL files exist, which the system
 *     says must not be used externally; its named fallback (Helvetica Neue,
 *     Arial) is what this sheet already uses.
 */
:root.brand-inuspheresis {
  --ayus-red: #5a3c7c;          /* Plasma Purple for every non-accent highlight */
  --ayus-red-deep: #5a3c7c;
  --blue: #5a3c7c;
  --blue-dark: #000000;
  --blue-light: #e3daed;        /* Vital Violet */
  --neo-light: #ffffff;
  --neo-warm: #e3daed;
  --neo-gray: #777776;          /* Neutral grey */
  --neo-gray-dark: #303030;     /* Black soft */
  --accent: #ff5c00;            /* Eluate Orange, one element per layout */

  --bg: #ffffff;
  --panel: #ffffff;
  --sunk: #f7f4fa;              /* Vital Violet at a whisper, for inputs and lines */
  --line: #e3daed;
  --line-strong: #777776;
  --fg: #000000;
  --fg-2: #303030;
  --dim: #303030;
  --dimmer: #777776;

  --r: 0;
  --r-sm: 0;
  --shadow: none;
}
.brand-inuspheresis body::before { display: none; }
.brand-inuspheresis .mast img { background: none; padding: 8px 0; height: 13px; border-radius: 0; }
.brand-inuspheresis .mast .div { background: #777776; }
.brand-inuspheresis .mast h1 { color: #000; font-weight: 500; }
.brand-inuspheresis .card { box-shadow: none; border: 1px solid var(--line); }

/* labels: micro label, square, structural colours */
.brand-inuspheresis .mast .role { border-radius: 0; }
.brand-inuspheresis .role.listener,
.brand-inuspheresis .role.speaker { background: #e3daed; color: #5a3c7c; border: 1px solid #e3daed; }

/* controls */
.brand-inuspheresis input[type=text], .brand-inuspheresis input[type=password],
.brand-inuspheresis .lp-input, .brand-inuspheresis select {
  background-color: #fff; border: 1px solid #777776; border-radius: 0; box-shadow: none;
}
.brand-inuspheresis input:focus, .brand-inuspheresis select:focus,
.brand-inuspheresis .lp-input:focus { border-color: #000; box-shadow: none; outline: none; }
.brand-inuspheresis .lp-input:hover { background-color: #fff; border-color: #303030; }
.brand-inuspheresis .lp-list { border-radius: 0; box-shadow: none; border-color: #777776; }
.brand-inuspheresis .lp-opt.cur { background: #e3daed; }

/* buttons: secondary ones Black soft, the one main action orange */
.brand-inuspheresis button {
  background: #303030; color: #fff; border-radius: 0; box-shadow: none;
  font-weight: 500; transition: background 120ms linear, opacity 120ms linear, border-color 120ms linear;
}
.brand-inuspheresis button:hover:not(:disabled) { background: #000; filter: none; box-shadow: none; }
.brand-inuspheresis button:active:not(:disabled) { transform: none; }
.brand-inuspheresis button.big,
.brand-inuspheresis button.mic { background: var(--accent); }
.brand-inuspheresis button.big:hover:not(:disabled),
.brand-inuspheresis button.mic:hover:not(:disabled) { background: var(--accent); opacity: .86; }
.brand-inuspheresis button.mic.on { background: #303030; }
.brand-inuspheresis button.ghost { background: #fff; color: #000; border: 1px solid #777776; }
.brand-inuspheresis button.ghost:hover:not(:disabled) { background: #fff; border-color: #303030; }

/* state and level: purple, no glow */
.brand-inuspheresis .dot.live { background: #5a3c7c; box-shadow: none; animation: none; }
.brand-inuspheresis #meter { border-radius: 0; background: #e3daed; }
.brand-inuspheresis #meterFill { background: #5a3c7c; }
.brand-inuspheresis .switch input:checked + .track { background: #5a3c7c; }
.brand-inuspheresis .pill, .brand-inuspheresis .person { border-radius: 0; }
.brand-inuspheresis .person.me { border-color: #5a3c7c; background: #e3daed; }
.brand-inuspheresis .person.spk { border-color: #a183c3; }

/* transcript: the translation on Vital Violet, the source neutral */
.brand-inuspheresis .line { border-radius: 0; }
.brand-inuspheresis .line.tr { border-left-color: #5a3c7c; background: #e3daed; }
.brand-inuspheresis .line.note { border-left-color: #a183c3; background: #f7f4fa; }

/* an error takes the layout's single accent */
.brand-inuspheresis .banner { border-radius: 0; }
.brand-inuspheresis .banner.err { background: #fff; border: 1px solid #ff5c00; color: #000; }
.brand-inuspheresis .note { border-radius: 0; background: #f7f4fa; border-color: #e3daed; }
.brand-inuspheresis .note b { color: #000; }
.brand-inuspheresis .lede em { color: #5a3c7c; }
.brand-inuspheresis .webinar { background: #fff; border-color: #e3daed; }
/* The language picker is a <button>, so it must opt out of the button colours. */
.brand-inuspheresis .lp-input { color: #000; font-weight: 400; }

/* On a phone the header wraps after the logo, and the divider would dangle. */
@media (max-width: 520px) { .mast .div { display: none; } }
