:root {
  color-scheme: light;
  --bg-shell: #000000;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.7);
  --ink: #111111;
  --ink-muted: rgba(17, 17, 17, 0.7);
  --ink-soft: rgba(17, 17, 17, 0.48);
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.28);
  --accent: #15803d;
  --accent-soft: rgba(21, 128, 61, 0.14);
  --danger: #b91c1c;
  --danger-soft: rgba(185, 28, 28, 0.14);
  --radius: 24px;
  --shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg-shell);
  color: var(--ink);
  font-family: "IBM Plex Sans", Arial, sans-serif;
}

body[data-view="display"] {
  background: #000000;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  padding: 0.95rem 1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

textarea {
  resize: vertical;
  min-height: 7rem;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg-shell);
  padding: 0;
}

.site-surface {
  min-height: 100vh;
  background-color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 0),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 1px, transparent 0);
  background-size: 120px 120px;
}

.topbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 220px;
  height: 42px;
  flex: none;
}

.brand-title,
h1,
h2,
.current-speaker,
.time-display {
  font-family: "Barlow Condensed", Arial, sans-serif;
}

.brand-title {
  font-size: 1.5rem;
  line-height: 1;
  margin: 0.15rem 0 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.72);
}

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel--setup {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}

.panel--stage {
  background: var(--bg-shell);
  color: #ffffff;
}

.panel__header h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 4.5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 38rem;
  color: var(--ink-muted);
}

.accent-rule {
  width: 82px;
  height: 4px;
  background: var(--accent);
}

.stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field--grow {
  flex: 1;
}

.field__label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field__inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.field__inline input {
  max-width: 120px;
}

.field__inline--duration input {
  max-width: 92px;
}

.field__suffix {
  color: var(--ink-muted);
  font-weight: 500;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 1.4rem 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin: 0.15rem 0 0;
  font-size: 2rem;
  line-height: 1;
  text-transform: uppercase;
}

.muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bulk-entry {
  display: grid;
  gap: 0.75rem;
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.82rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button--solid {
  background: var(--ink);
  color: #ffffff;
}

.button--solid:hover {
  background: rgba(17, 17, 17, 0.88);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-color: var(--line);
}

.button--ghost:hover {
  background: #ffffff;
  border-color: var(--line-strong);
}


.button--light {
  background: #ffffff;
  color: var(--ink);
}

.button--outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.button--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  padding: 1rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.5);
}

.speaker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.speaker-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.speaker-item--active {
  border-color: rgba(21, 128, 61, 0.45);
  background: linear-gradient(180deg, rgba(21, 128, 61, 0.06), rgba(255, 255, 255, 0.96));
}

.speaker-item--done {
  background: rgba(17, 17, 17, 0.04);
}

.speaker-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.speaker-item__name {
  font-weight: 600;
  word-break: break-word;
}

.speaker-item__meta {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.speaker-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.speaker-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.speaker-action:hover {
  border-color: var(--line-strong);
  background: rgba(17, 17, 17, 0.04);
}

.stage {
  display: grid;
  gap: 1.25rem;
  min-height: 100%;
  padding: 1.5rem;
}

.stage__header,
.stage__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.stage__meeting-title {
  margin: 0.2rem 0 0;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.status-badge {
  padding: 0.62rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.status-badge--running {
  background: var(--accent-soft);
  color: #9cf0b7;
}

.status-badge--paused {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.status-badge--overtime {
  background: var(--danger-soft);
  color: #fca5a5;
}

.stage__body {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.timer-ring {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}

.timer-ring__svg {
  width: 100%;
  height: auto;
  transform: rotate(-90deg);
}

.timer-ring__track,
.timer-ring__progress {
  fill: none;
  stroke-width: 14;
}

.timer-ring__track {
  stroke: rgba(255, 255, 255, 0.12);
}

.timer-ring__progress {
  stroke: #ffffff;
  stroke-linecap: round;
  transition: stroke-dashoffset 200ms linear, stroke 200ms ease;
}

.timer-ring__progress--warning {
  stroke: #fca5a5;
}

.timer-ring__content {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2rem;
}

.time-display {
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.03em;
}

.stage__detail {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.5;
}

.stage__speaker {
  display: grid;
  gap: 0.5rem;
  text-align: center;
}

.current-speaker {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stage__footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stage__metric {
  display: grid;
  gap: 0.25rem;
}

.stage__metric-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.stage__metric strong {
  font-size: 1.15rem;
}

.hidden {
  display: none;
}

body[data-view="display"] .site-surface {
  min-height: 100vh;
  background: #000000;
}

body[data-view="display"] .topbar,
body[data-view="display"] .panel--setup {
  display: none;
}

body[data-view="display"] .layout {
  max-width: none;
  min-height: 100vh;
  padding: 0;
  display: block;
}

body[data-view="display"] .panel--stage {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 100vh;
}

body[data-view="display"] .stage {
  min-height: 100vh;
  padding: 2rem;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: minmax(360px, 0.92fr) minmax(400px, 1.08fr);
    align-items: start;
  }

  .panel--stage {
    min-height: calc(100vh - 7.5rem);
  }

  .field-row {
    flex-direction: row;
    align-items: end;
  }
}

@media (max-width: 699px) {
  .topbar,
  .layout {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .topbar {
    padding-top: 1rem;
  }

  .brand-logo {
    width: 178px;
    height: 34px;
  }

  .controls,
  .stage__footer {
    grid-template-columns: 1fr;
  }

  .stage__header {
    grid-template-columns: 1fr;
  }

  .status-badge {
    justify-self: start;
  }
}
