* { box-sizing: border-box; }
:root { color-scheme: dark; --bg: #090e1e; --surface: #131d36; --line: #293754; --text: #f5f7ff; --muted: #bdc8df; --blue: #356df5; --light: #93b3ff; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.55 system-ui, sans-serif; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
header { border-bottom: 1px solid var(--line); }
.portal-header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
#programa { scroll-margin-top: 95px; }
.session-countdown { display: block; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.session-countdown[data-warning] { color: #ffca91; }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 73px; gap: 14px; }
.nav-identity { display: flex; align-items: center; min-width: 0; gap: 12px; }
.nav-member { font-weight: 650; overflow-wrap: anywhere; }
.nav nav { flex-wrap: wrap; justify-content: flex-end; }
.nav-operations { color: #c8daff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
nav { display: flex; align-items: center; gap: clamp(10px, 3vw, 28px); }
nav form { margin: 0; }
a, .quiet { color: var(--light); }
nav a { text-decoration: none; }
.brand-home { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; transition: background-color .15s; }
.brand-home:hover { background: var(--surface); }
.brand-home img { display: block; width: 60px; max-width: none; height: auto; margin: -6px; }
main { min-height: calc(100svh - 156px); padding-block: 40px; }
h1, h2, h3, p { margin: 0 0 .5em; }
h1, h2, h3 { line-height: 1.1; }
h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); letter-spacing: -.07em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); letter-spacing: -.035em; }
h3 { font-size: 1.35rem; }
p, li { color: var(--muted); }
.access { display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; gap: 24px; margin-block: clamp(0px, 8vh, 70px); }
.intro, .hero { background: radial-gradient(ellipse at 88% 9%, #386be8, transparent 72%), linear-gradient(135deg, #11234d, #171f41); border: 1px solid #39558b; border-radius: 24px; padding: clamp(24px, 5vw, 64px); }
.intro { display: grid; align-content: center; gap: 14px; background: radial-gradient(ellipse at 85% 5%, #a4b7df, #829dce); border-color: #a2b6dd; color-scheme: light; }
.intro p { color: #28241f; margin: 0; }
.intro .eyebrow { color: #25334e; }
.brand-logo { position: relative; width: min(100%, 360px); aspect-ratio: 1014 / 632; margin: 0; overflow: hidden; }
.brand-logo img { position: absolute; display: block; width: 189.35%; max-width: none; height: auto; left: -44.67%; top: -37.66%; }
.eyebrow { font-weight: 750; color: #a9c1ff; letter-spacing: .08em; font-size: .88rem; }
.card { background: var(--surface); padding: 24px; border: 1px solid var(--line); border-radius: 18px; }
.entry { padding: clamp(24px, 4vw, 40px); }
.entry form { display: grid; gap: 10px; margin-top: 24px; }
label { font-weight: 700; }
input { width: 100%; background: #090f21; border: 1px solid #63739b; border-radius: 9px; color: var(--text); padding: 12px; font: inherit; }
button, .button { font: inherit; cursor: pointer; }
.button { display: inline-block; background: var(--blue); color: white; border: 0; font-weight: 750; padding: 12px 20px; border-radius: 9px; text-decoration: none; }
.button:hover { background: #285ad4; }
#enable-audio[hidden] { display: none; }
.video-frame { position: relative; }
.video-floating-toggle {
  position: absolute;
  z-index: 1;
  inset: 10px 10px auto auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 10px;
  background: #090e1ed9;
  color: white;
  cursor: pointer;
}
.video-floating-toggle[hidden] { display: none; }
.video-floating-toggle::before { content: ""; width: 19px; height: 13px; border: 2px solid currentColor; border-radius: 3px; }
.video-floating-toggle::after { content: ""; position: absolute; width: 8px; height: 6px; margin: 5px 0 0 9px; border-radius: 1px; background: currentColor; }
.video-floating-toggle:focus-visible { outline: 2px solid white; outline-offset: 2px; }
.quiet { background: transparent; border: 0; padding: 4px; }
:focus-visible { outline: 3px solid #b5c9ff; outline-offset: 3px; }
.error { color: #ffb5ba; }
main > section + section { margin-top: 38px; }
.hero .button { margin-top: 10px; }
.greeting { color: var(--text); font-weight: 750; font-size: clamp(1.1rem, 3vw, 1.45rem); }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 280px),1fr)); gap: 14px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 16px; }
.hero-actions .button { margin-top: 0; }
.speaker-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.speaker-card { flex: 0 0 calc((100% - 32px) / 3); min-width: 0; display: block; color: inherit; background: var(--panel, #111b32); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; }
@media (max-width: 740px) { .speaker-card { flex-basis: calc((100% - 16px) / 2); } }
@media (max-width: 480px) { .speaker-card { flex-basis: 100%; } }
.speaker-card:is(:hover, :focus-visible) { border-color: #8ab4ff; }
.speaker-portrait { aspect-ratio: 4 / 3; background: radial-gradient(ellipse at 50% 25%, #345997, #162440 75%); }
.speaker-portrait img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center bottom; }
.speaker-label { padding: 16px 18px 20px; }
.speaker-label h2 { margin: 4px 0 10px; font-size: 1.24rem; }
.speaker-label > span { color: #bcd3ff; }
.speaker-profile { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(18px, 5vw, 42px); align-items: center; margin-top: 20px; }
.speaker-profile .speaker-portrait { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; }
.speaker-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: center; }
.speaker-event h2 { margin: 4px 0 8px; }
.speaker-event img { display: block; width: 100%; height: auto; border-radius: 12px; }
@media (max-width: 560px) {
  #programa { scroll-margin-top: 160px; }
  .nav { flex-wrap: wrap; padding-block: 12px; }
  .nav nav { justify-content: flex-start; }
  .speaker-profile { grid-template-columns: 1fr; }
  .speaker-event { grid-template-columns: 1fr; }
  .speaker-profile .speaker-portrait { max-width: 310px; }
}
.time { font-weight: 700; color: var(--text); }
ul { padding-left: 21px; margin-bottom: 0; }
li + li { margin-top: 5px; }
video { display: block; width: 100%; aspect-ratio: 16/9; background: #03050a; border: 1px solid var(--line); border-radius: 16px; margin-block: 20px 14px; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 24px; align-items: start; }
main.wrap:has(.live-layout):not(:has(.live-sidebar)) {
  width: min(1200px, calc(100% - 32px));
  padding-block: clamp(20px, 4vw, 44px);
}
.live:not(:has(.live-sidebar)) { text-align: center; }
.live-layout:not(:has(.live-sidebar)) { grid-template-columns: minmax(0, 1fr); }
.live-layout:not(:has(.live-sidebar)) video {
  margin-inline: auto;
  margin-block: 14px;
}
.public-live > :is(h1, .eyebrow) { text-align: center; }
.public-live .live-layout { grid-template-columns: minmax(0, 1fr); }
.public-live .live-sidebar { width: min(100%, 760px); margin-inline: auto; }
.public-live #chat-name { width: 100%; }
.admin-entry { width: min(100%, 440px); margin-inline: auto; }
.admin-entry h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
@media (max-width: 760px) { .public-live .live-sidebar { grid-template-columns: minmax(0, 1fr); } }
.live-sidebar { display: grid; gap: 16px; min-width: 0; }
.live-chat h2 { margin-top: 0; }
.chat-reactions { display: flex; gap: 8px; }
.chat-reactions button { font: inherit; color: inherit; cursor: pointer; min-height: 44px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.chat-reactions button[aria-pressed="true"] { border-color: #a3bcff; background: #243763; }
.chat-reactions button:disabled { opacity: .65; cursor: default; }
#chat-messages { list-style: none; padding: 0; margin: 12px 0; max-height: 275px; overflow-y: auto; }
#chat-messages li { padding: 8px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#chat-messages strong { color: #c8daff; }
.comment-heart { display: inline-flex; gap: 5px; align-items: center; min-height: 28px; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #c8daff; cursor: pointer; }
.comment-heart[aria-pressed="true"] { color: #ff9cad; border-color: currentColor; }
.comment-heart:disabled { cursor: default; }
#chat-form { display: grid; gap: 8px; }
#chat-message { width: 100%; resize: vertical; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
#chat-feedback:empty { display: none; }
#live-presence { color: #c8daff; font-weight: 650; }
.moderation-list { padding-inline-start: 20px; }
.moderation-list li { margin-block: 10px; overflow-wrap: anywhere; }
.moderation-list form { display: inline; margin-inline-start: 8px; }
.live-schedule h2, .live-schedule h3, .schedule-block h4 { margin: 0; }
.schedule-timezone, .schedule-block p { color: var(--muted); margin: 4px 0 10px; }
.schedule-block { border-inline-start: 2px solid var(--line); padding: 8px 0 8px 12px; margin-top: 12px; }
.schedule-block[data-active] { border-color: #9ebdff; }
.schedule-block ol { margin: 0; padding-inline-start: 20px; }
.schedule-block li { padding: 3px 0; }
.schedule-block li[aria-current="true"] { font-weight: 750; color: #c8daff; }
.schedule-badge { display: none; margin-inline-start: 4px; color: #c8daff; font-size: .8rem; }
.schedule-block[data-active] .schedule-badge { display: inline; }
.live-schedule [data-schedule-block="4"] { display: none; }
[data-schedule-block][data-completed] { color: #aeb2bc; border-color: #48505e; }
.card[data-completed] { background: #1b1f29; }
[data-completed] :is(.eyebrow, .time, h3, h4, p) { color: inherit; }
.schedule-completed { display: none; margin-inline-start: 4px; font-size: .8rem; }
[data-completed] .schedule-completed { display: inline; }
@media (max-width: 760px) { .live-layout { grid-template-columns: minmax(0, 1fr); } }
.live h1 { font-size: clamp(2.25rem, 5vw, 4rem); }
.live-home { margin-top: 10px; background: var(--surface); border: 1px solid var(--line); }
.access-help { margin-top: 20px; }
.access-help summary { color: var(--light); cursor: pointer; }
.access-help p { margin-top: 10px; }
#block-state:empty { display: none; }
.operation-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.operation-heading { margin-bottom: 24px; }
.operation-navigation { flex-wrap: wrap; }
.operation-navigation .live-home { margin-top: 0; }
.operation-form input { width: min(100%, 250px); }
.operation-form select { max-width: 100%; font: inherit; color: inherit; background: var(--bg); padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
footer { border-top: 1px solid var(--line); color: var(--muted); padding-block: 20px; }
.footer-meta, .footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.footer-social { margin-top: 12px; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.footer-social svg { width: 20px; height: 20px; flex: none; }
@media (max-width: 690px) { .access { grid-template-columns: 1fr; } main { padding-block: 24px; } }
@media (max-width: 380px) { .nav { flex-wrap: wrap; padding-block: 12px; } }

/* Operations dashboard */
main.wrap:has(.operation-heading) {
  --ops-border: #2b3650;
  --ops-panel: #111a2c;
  --ops-muted: #abb8d1;
  width: min(1040px, calc(100% - 40px));
  padding-block: clamp(24px, 5vw, 60px);
  display: grid;
  gap: 16px;
}
.operation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ops-border);
}
.operation-heading h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -.04em;
}
.operation-navigation { display: flex; align-items: center; gap: 8px; }
.operation-navigation form { margin: 0; }
.operation-navigation .button, #entry-sound {
  min-height: 40px;
  padding: 7px 13px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #111a2c;
  color: var(--text);
  box-shadow: none;
  font-size: .9rem;
}
#entry-sound[aria-pressed="true"] { color: #ace8c3; border-color: #335446; opacity: 1; }
#entry-sound[aria-pressed="true"]::before { content: "●"; margin-right: 8px; font-size: .68em; }
main.wrap:has(.operation-heading) > p { margin: 0; }
#entry-notice:empty { display: none; }
#entry-notice:not(:empty) { color: #ace8c3; font-size: .9rem; }
[data-operation-refresh="counts"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
main.wrap:has(.operation-heading) .card {
  margin: 0;
  padding: clamp(14px, 2.2vw, 22px);
  background: var(--ops-panel);
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  box-shadow: none;
}
main.wrap:has(.operation-heading) .card h2 { margin: 0 0 7px; font-size: 1.04rem; }
main.wrap:has(.operation-heading) .card p { color: var(--ops-muted); margin-block: 0 12px; }
main.wrap:has(.operation-heading) .card p:last-child { margin-bottom: 0; }
main.wrap [data-operation-refresh="counts"] .card h2 {
  min-height: 2.4em;
  color: var(--ops-muted);
  font-size: .84rem;
  line-height: 1.2;
  font-weight: 600;
}
main.wrap [data-operation-refresh="counts"] .card p {
  color: var(--text);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
[data-operation-refresh="counts"] .card:last-child {
  background: #172754;
  border-color: #415eaa;
}
main.wrap:has(.operation-heading) .operation-form {
  gap: 8px 12px;
  margin-top: 12px;
}
main.wrap:has(.operation-heading) .operation-form label { font-size: .9rem; color: var(--ops-muted); }
main.wrap:has(.operation-heading) .operation-form :is(input, select, .button) { min-height: 40px; border-radius: 10px; }
.operation-form button[name="clear_activity"] {
  background: transparent;
  color: var(--light);
  border: 1px solid var(--ops-border);
  box-shadow: none;
}
main.wrap:has(.operation-heading) .table-scroll {
  border: 1px solid var(--ops-border);
  border-radius: 12px;
}
main.wrap:has(.operation-heading) th { background: #16213a; color: var(--ops-muted); }
.entry-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid #3b465a;
  border-radius: 999px;
  background: #222b3d;
  color: #c0c9da;
  font-size: .8rem;
  white-space: nowrap;
}
.entry-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8792a6; }
.entry-status[data-online] { background: #15332a; border-color: #327455; color: #b4f4cb; }
.entry-status[data-online]::before { background: #59db91; }
@media (max-width: 740px) {
  [data-operation-refresh="counts"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  main.wrap:has(.operation-heading) { width: calc(100% - 24px); }
  [data-operation-refresh="counts"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-operation-refresh="counts"] .card:last-child { grid-column: 1 / -1; }
  main.wrap:has(.operation-heading) .operation-form label { flex-basis: 100%; }
  main.wrap:has(.operation-heading) .operation-form :is(input, select) { width: 100%; }
}
