.fd-debate-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background:
    radial-gradient(circle at 80% 0%, rgba(198, 93, 53, 0.14), transparent 32rem),
    radial-gradient(circle at 10% 20%, rgba(79, 142, 170, 0.18), transparent 36rem),
    #05080a;
}

.fd-debate-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 16px;
  border-right: 1px solid rgba(214, 168, 79, 0.28);
  background: rgba(4, 9, 12, 0.88);
}

.fd-debate-brand {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 4px 12px;
  align-items: center;
  color: var(--fd-text-main);
  text-decoration: none;
  margin-bottom: 18px;
}

.fd-debate-brand span {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fd-border-gold);
  border-radius: 50%;
  color: var(--fd-gold-soft);
  background: rgba(214, 168, 79, 0.12);
}

.fd-debate-brand strong,
.fd-debate-brand small,
.fd-kicker,
.fd-debate-search span,
.fd-builder-panel label span,
.fd-topic-card small,
.fd-topic-panel p,
.fd-tools-panel dd {
  color: var(--fd-text-muted);
}

.fd-debate-brand strong {
  color: var(--fd-gold-soft);
  text-transform: uppercase;
}

.fd-debate-search {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.fd-debate-search input,
.fd-builder-panel textarea {
  width: 100%;
  border: 1px solid rgba(216, 192, 154, 0.22);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text-main);
  background: rgba(0, 0, 0, 0.28);
}

.fd-debate-search input {
  min-height: 40px;
  padding: 8px 10px;
}

.fd-instructor-panel {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  margin-bottom: 14px;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: var(--fd-radius-sm);
  background: rgba(214, 168, 79, 0.06);
}

.fd-instructor-portrait {
  grid-row: span 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(214, 168, 79, 0.14) center / cover;
  border: 1px solid var(--fd-border-gold);
}

.fd-instructor-panel strong {
  display: block;
  color: var(--fd-gold-soft);
  font-size: 0.85rem;
}

.fd-instructor-panel small {
  color: var(--fd-text-muted);
  font-size: 0.72rem;
}

.fd-instructor-commentary {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(216, 192, 154, 0.16);
  color: var(--fd-text-main);
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.5;
}

.fd-planet-list {
  display: grid;
  gap: 7px;
}

.fd-debate-status {
  margin: 0;
  color: var(--fd-text-muted);
}

.fd-planet-list button,
.fd-topic-card,
.fd-debate-actions button,
.fd-tools-panel button,
.fd-position-row button,
.fd-tool-row button {
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text-main);
  background: rgba(214, 168, 79, 0.08);
}

.fd-planet-list button {
  width: 100%;
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 11px;
  text-align: left;
}

.fd-planet-list button.is-active,
.fd-topic-card.is-active,
.fd-position-row button.is-active {
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

.fd-debate-main {
  min-width: 0;
  padding: 18px;
}

.fd-debate-topbar,
.fd-builder-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.fd-kicker {
  margin: 0 0 4px;
  color: var(--fd-gold-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.fd-debate-topbar h1,
.fd-builder-panel h2,
.fd-tools-panel h2,
.fd-topic-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.fd-debate-actions,
.fd-position-row,
.fd-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fd-debate-actions button,
.fd-tools-panel button,
.fd-position-row button,
.fd-tool-row button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--fd-gold-soft);
}

.fd-debate-actions button:last-child,
.fd-tools-panel button:first-of-type {
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

.fd-topic-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.fd-mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  background: rgba(0, 0, 0, 0.25);
}

.fd-mode-toggle button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  color: var(--fd-text-muted);
  background: transparent;
}

.fd-mode-toggle button.is-active {
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

.fd-arena-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr);
  gap: 14px;
  margin-bottom: 18px;
}

.fd-arena-vote,
.fd-arena-thread {
  border: 1px solid rgba(214, 168, 79, 0.25);
  border-radius: var(--fd-radius-md);
  background: rgba(5, 17, 24, 0.72);
  box-shadow: var(--fd-shadow-panel);
  padding: 14px;
}

.fd-arena-vote header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--fd-text-muted);
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.fd-arena-status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.fd-arena-status-pill.is-active {
  color: #16321f;
  background: #8ee7a8;
}

.fd-arena-status-pill.is-closed {
  color: var(--fd-text-muted);
  background: rgba(255, 255, 255, 0.1);
}

.fd-arena-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.fd-arena-vs div:first-child {
  text-align: left;
}

.fd-arena-vs div:last-child {
  text-align: right;
}

.fd-arena-vs strong {
  display: block;
  font-size: 0.85rem;
}

.fd-arena-vs span {
  color: var(--fd-gold-soft);
  font-size: 1.2rem;
  font-weight: 700;
}

.fd-arena-vs em {
  color: var(--fd-text-dim);
  font-style: normal;
}

.fd-arena-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

.fd-arena-vote-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fd-arena-vote-row button {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text-main);
  background: rgba(214, 168, 79, 0.08);
}

.fd-arena-vote-row button.is-active {
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

.fd-arena-hint {
  margin: 10px 0 0;
  color: var(--fd-text-muted);
  font-size: 0.82rem;
}

.fd-arena-thread header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.fd-arena-thread header button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-gold-soft);
  background: rgba(214, 168, 79, 0.08);
}

.fd-arena-create-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(214, 168, 79, 0.28);
  border-radius: var(--fd-radius-sm);
  background: rgba(0, 0, 0, 0.2);
}

.fd-arena-create-form label {
  display: grid;
  gap: 4px;
  color: var(--fd-text-muted);
  font-size: 0.82rem;
}

.fd-arena-create-form input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(216, 192, 154, 0.22);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text-main);
  background: rgba(0, 0, 0, 0.28);
}

.fd-arena-create-form [data-arena-create-submit] {
  justify-self: start;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

.fd-arena-comments {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.fd-arena-comment {
  padding: 10px 12px;
  border: 1px solid rgba(216, 192, 154, 0.16);
  border-radius: var(--fd-radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.fd-arena-comment header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fd-arena-comment small {
  color: var(--fd-text-dim);
}

.fd-arena-comment p {
  margin: 0;
  color: var(--fd-text-main);
  font-size: 0.88rem;
  line-height: 1.5;
}

.fd-arena-compose {
  display: grid;
  gap: 8px;
}

.fd-arena-compose textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(216, 192, 154, 0.22);
  border-radius: var(--fd-radius-sm);
  color: var(--fd-text-main);
  background: rgba(0, 0, 0, 0.28);
  resize: vertical;
}

.fd-arena-compose-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.fd-arena-compose-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fd-text-muted);
  font-size: 0.85rem;
}

.fd-arena-compose-row button {
  margin-left: auto;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(214, 168, 79, 0.32);
  border-radius: var(--fd-radius-sm);
  color: #15100a;
  background: linear-gradient(180deg, var(--fd-gold-soft), var(--fd-gold));
}

@media (max-width: 1180px) {
  .fd-arena-panel {
    grid-template-columns: 1fr;
  }
}

.fd-topic-card {
  min-height: 118px;
  padding: 14px;
  text-align: left;
}

.fd-topic-card strong,
.fd-topic-card small {
  display: block;
}

.fd-topic-card small {
  margin-top: 8px;
}

.fd-arena {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(360px, 1.22fr) 280px;
  gap: 14px;
  align-items: start;
}

.fd-topic-panel,
.fd-builder-panel,
.fd-tools-panel section {
  border: 1px solid rgba(214, 168, 79, 0.25);
  border-radius: var(--fd-radius-md);
  background: rgba(5, 17, 24, 0.72);
  box-shadow: var(--fd-shadow-panel);
}

.fd-topic-panel,
.fd-builder-panel,
.fd-tools-panel section {
  padding: 14px;
}

.fd-topic-panel ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.fd-topic-panel li {
  margin-bottom: 8px;
}

.fd-builder-panel {
  display: grid;
  gap: 12px;
}

.fd-builder-panel header > span {
  border: 1px solid rgba(79, 142, 170, 0.5);
  border-radius: 999px;
  padding: 5px 10px;
  color: #8ed7f2;
}

.fd-builder-panel label,
.fd-evidence-list label {
  display: grid;
  gap: 6px;
}

.fd-builder-panel textarea {
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
}

.fd-evidence-list {
  display: grid;
  gap: 10px;
}

.fd-fallacy-list {
  border: 1px solid rgba(216, 192, 154, 0.18);
  border-radius: var(--fd-radius-sm);
  margin: 0;
  padding: 12px;
}

.fd-fallacy-list legend {
  color: var(--fd-gold-soft);
}

.fd-fallacy-list div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fd-fallacy-list label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fd-tools-panel {
  display: grid;
  gap: 14px;
}

.fd-tools-panel section {
  display: grid;
  gap: 10px;
}

.fd-timer {
  font-size: 2.35rem;
  color: var(--fd-gold-soft);
  font-variant-numeric: tabular-nums;
}

.fd-tools-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.fd-tools-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.fd-tools-panel dt,
.fd-tools-panel dd {
  margin: 0;
}

@media (max-width: 1180px) {
  .fd-debate-shell {
    grid-template-columns: 1fr;
  }

  .fd-debate-sidebar {
    position: static;
    height: auto;
  }

  .fd-topic-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fd-arena {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .fd-debate-topbar,
  .fd-builder-panel header {
    align-items: stretch;
    flex-direction: column;
  }

  .fd-topic-strip,
  .fd-fallacy-list div {
    grid-template-columns: 1fr;
  }
}
