/* The living organiser. Dark glass stage; everything that moves does so on one easing. */
[data-organiser] {
  --ease: cubic-bezier(0.22, 0.9, 0.24, 1);
  --glass: rgba(255, 255, 255, 0.055);
  --hair: rgba(255, 255, 255, 0.1);
  --text: #f3f4f7;
  --soft: rgba(243, 244, 247, 0.62);
  position: relative;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 18% -10%, rgba(92, 116, 255, 0.2), transparent 60%),
    radial-gradient(700px 380px at 96% 110%, rgba(111, 211, 160, 0.12), transparent 60%),
    #0e1016;
  border: 1px solid var(--hair);
  border-radius: 30px;
  padding: 26px;
  box-shadow: 0 60px 140px -60px rgba(10, 12, 20, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-family: var(--body, system-ui, sans-serif);
  text-align: left;
  overflow: hidden;
}

.org-face { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #0e1016; background: var(--tint, #8fb4ff); }

/* Who is speaking */
.org-voice { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 14px; min-height: 64px; padding: 12px 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--hair); transition: border-color 0.4s, background 0.4s; }
.org-voice.is-speaking { border-color: color-mix(in srgb, var(--tint) 55%, transparent); background: color-mix(in srgb, var(--tint) 9%, rgba(255, 255, 255, 0.04)); }
.org-voice.is-idle .org-speaker { background: transparent; border: 1.5px dashed var(--hair); }
.org-who b { display: block; font-size: 15px; line-height: 1.2; }
.org-who span { font-size: 13px; color: var(--soft); white-space: nowrap; }
.org-wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.org-wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--tint, #8fb4ff); opacity: 0.35; }
.is-speaking .org-wave i { opacity: 1; animation: org-wave 0.9s ease-in-out infinite; }
.org-wave i:nth-child(3n) { animation-delay: -0.2s; }
.org-wave i:nth-child(3n + 1) { animation-delay: -0.45s; }
.org-wave i:nth-child(4n) { animation-delay: -0.7s; }
.org-wave i:nth-child(5n) { animation-delay: -0.1s; }
@keyframes org-wave { 0%, 100% { height: 4px; } 50% { height: 26px; } }
.org-said { margin: 0; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.3; font-weight: 500; min-height: 1.3em; }

/* The team and how full each person is */
.org-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 18px; }
.org-person { display: flex; align-items: center; gap: 10px; padding: 4px 2px; transition: opacity 0.6s; }
.org-person b { display: block; font-size: 14.5px; line-height: 1.2; }
.org-role { font-size: 12.5px; color: var(--soft); }
.org-meter { display: flex; gap: 3px; margin-top: 6px; }
.org-meter i { width: 18px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); transition: background 0.5s var(--ease); }
.org-meter i.on { background: var(--tint); }
.org-person.is-off { opacity: 0.38; }

/* The work */
.org-stage { position: relative; transition: height 0.8s var(--ease), filter 0.3s; min-height: 200px; }
.org-stage.is-thinking { filter: saturate(0.6) brightness(0.86); }
.org-b { position: absolute; left: 0; top: 0; border-radius: 22px; background: color-mix(in srgb, var(--tint) 13%, #141722); border: 1px solid color-mix(in srgb, var(--tint) 34%, transparent); transition: transform 0.85s var(--ease), width 0.85s var(--ease), height 0.85s var(--ease), opacity 0.5s, background 0.6s, border-color 0.6s; will-change: transform; }
.org-b.is-urgent { box-shadow: 0 0 0 1px color-mix(in srgb, var(--tint) 50%, transparent), 0 24px 60px -30px var(--tint); }
.org-b.is-waiting { background: transparent; border-style: dashed; border-color: rgba(255, 255, 255, 0.22); }
.org-bh { padding: 14px 14px 0; }
.org-bh > b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-bh > b.org-swap { animation: org-swap 0.7s var(--ease); }
@keyframes org-swap { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.org-by { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 13px; color: var(--soft); }
.org-by .org-face { width: 20px; height: 20px; font-size: 8.5px; }
.is-urgent .org-when { color: #ff9c88; font-weight: 600; }

.org-t { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.09); transition: transform 0.85s var(--ease), width 0.85s var(--ease), opacity 0.45s, box-shadow 0.6s, background 0.6s; will-change: transform; z-index: 2; overflow: hidden; }
.org-t b { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.org-t b em { font-style: normal; font-size: 12.5px; color: #ffb38a; margin-left: 6px; }
.org-t span { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-t.is-fresh { background: color-mix(in srgb, var(--tint) 22%, rgba(255, 255, 255, 0.06)); box-shadow: 0 0 0 1.5px var(--tint), 0 14px 34px -14px var(--tint); }
.org-t.is-waiting { background: rgba(255, 255, 255, 0.04); }
.org-t.is-done { opacity: 0 !important; transform: translate(var(--x, 0), -12px) scale(0.9); transition: opacity 0.6s, filter 0.6s; filter: blur(3px); }

/* What just happened, and the controls */
.org-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 22px; flex-wrap: wrap; }
.org-note { min-height: 56px; max-width: 34em; opacity: 0; }
.org-note.show { animation: org-note 0.7s var(--ease) forwards; }
@keyframes org-note { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.org-note b { display: block; font-family: var(--display, inherit); font-size: clamp(19px, 2.1vw, 25px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.org-note span { display: block; margin-top: 5px; color: var(--soft); font-size: 15px; }
.org-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.org-chips button { font: inherit; font-size: 13.5px; color: var(--soft); background: transparent; border: 1px solid var(--hair); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.org-chips button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.org-chips button[aria-pressed="true"] { color: #0e1016; background: var(--text); border-color: var(--text); }
.org-play { width: 36px; padding: 0 !important; height: 36px; display: grid; place-items: center; position: relative; }
.org-play::before { content: ""; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; box-sizing: border-box; }
.org-play.is-paused::before { width: 0; height: 0; border: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px; }

@media (max-width: 760px) {
  [data-organiser] { padding: 16px; border-radius: 22px; }
  .org-voice { grid-template-columns: auto 1fr auto; row-gap: 8px; }
  .org-said { grid-column: 1 / -1; min-height: 2.6em; }
  .org-team { grid-template-columns: repeat(2, 1fr); }
  .org-meter i { width: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-organiser] * { animation: none !important; transition: none !important; }
  .org-note { opacity: 1; }
}
