:root {
  --bg-0: #030a14;
  --bg-1: #061424;
  --bg-2: #0a1f36;
  --surface: rgba(9, 26, 44, 0.86);
  --surface-strong: rgba(8, 24, 40, 0.96);
  --line: rgba(118, 195, 255, 0.35);
  --line-strong: rgba(118, 195, 255, 0.58);
  --text: #ebf6ff;
  --muted: #9ab6ce;
  --cyan: #3fd8ff;
  --cyan-2: #89f0ff;
  --amber: #ffc061;
  --pink: #ff7ac8;
  --good: #59e295;
  --warning: #ffd56f;
  --danger: #ff8d8d;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1300px 700px at 15% -10%, rgba(63, 216, 255, 0.22), transparent),
    radial-gradient(900px 540px at 84% 3%, rgba(255, 122, 200, 0.18), transparent),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  line-height: 1.48;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(125, 214, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 214, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
}

a {
  color: var(--cyan-2);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: #d9f9ff;
}

.wrap {
  width: min(1240px, 94vw);
  margin: 0 auto;
  padding: 20px 0 56px;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 80;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(6, 20, 34, 0.86);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 12px 16px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-orb {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  display: grid;
  place-items: center;
  color: var(--cyan-2);
  font-weight: 800;
  letter-spacing: 0.04em;
  background: radial-gradient(circle at 35% 30%, rgba(255, 192, 97, 0.55), rgba(31, 75, 119, 0.2));
  box-shadow: 0 0 25px rgba(63, 216, 255, 0.35);
}

.brand-copy .name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 780;
  letter-spacing: 0.05em;
}

.brand-copy .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.primary-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.8rem;
  padding: 8px 12px;
  font-weight: 650;
  white-space: nowrap;
}

.site-nav,
.surface-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-nav {
  margin-top: 12px;
}

.site-nav > a,
.surface-tabs > a,
.site-nav summary {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(12, 32, 52, 0.7);
  font-size: 0.9rem;
  transition: 140ms ease;
  cursor: pointer;
}

.site-nav > a:hover,
.surface-tabs > a:hover,
.site-nav > a:focus-visible,
.surface-tabs > a:focus-visible,
.site-nav summary:hover,
.site-nav summary:focus-visible {
  border-color: var(--line-strong);
  background: rgba(20, 49, 76, 0.88);
}

.surface-tabs {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(118, 195, 255, 0.2);
}

.surface-tabs a[aria-current="page"] {
  border-color: var(--cyan);
  color: #e7fcff;
  box-shadow: 0 0 0 1px rgba(63, 216, 255, 0.3) inset;
}

.site-nav details {
  position: relative;
}

.site-nav-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(5, 17, 30, 0.98);
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid;
  gap: 6px;
}

.site-nav-panel a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px;
  background: rgba(18, 42, 67, 0.64);
}

.site-nav-panel a:hover,
.site-nav-panel a:focus-visible {
  border-color: var(--line-strong);
}

.alert-strip {
  border: 1px solid rgba(255, 213, 111, 0.55);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  background: linear-gradient(90deg, rgba(255, 192, 97, 0.12), rgba(255, 122, 200, 0.12));
  color: #ffe9c6;
  margin: 0 0 18px;
}

.alert-strip strong {
  color: #fff4d8;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(7, 23, 39, 0.9);
}

.kpi .value {
  display: block;
  font-size: 1.18rem;
  font-weight: 700;
  color: #f6fdff;
}

.kpi .label {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
}

.section-title {
  margin: 26px 0 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 1.85rem);
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.arena {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
}

.arena-main {
  display: grid;
  gap: 14px;
}

.panel-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: rgba(7, 26, 42, 0.82);
}

.panel-row h3 {
  margin: 0 0 10px;
  font-size: 0.94rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.persona-orbs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.persona-orb {
  display: grid;
  place-items: center;
  height: 66px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  background: radial-gradient(circle at 30% 30%, rgba(63, 216, 255, 0.25), rgba(6, 22, 38, 0.95));
}

.persona-orb.lead {
  height: 76px;
  border-color: rgba(255, 192, 97, 0.85);
  box-shadow: 0 0 25px rgba(255, 192, 97, 0.32);
}

.debate-window {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(5, 18, 31, 0.86);
  padding: 16px;
  min-height: 340px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.topic-orb {
  width: min(340px, 76vw);
  aspect-ratio: 1;
  margin: 6px auto 0;
  border-radius: 50%;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--surface-strong), var(--surface-strong)) padding-box,
    linear-gradient(130deg, var(--cyan), var(--amber), var(--pink)) border-box;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 0 35px rgba(63, 216, 255, 0.26);
}

.topic-orb strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.topic-orb span {
  color: var(--muted);
  font-size: 0.94rem;
}

.debate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.debate-bubble {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  font-size: 0.92rem;
  color: #ccf3ff;
  background: rgba(14, 39, 62, 0.78);
}

.debate-bubble .speaker {
  display: block;
  font-size: 0.76rem;
  color: var(--amber);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arena-side {
  display: grid;
  gap: 10px;
}

.side-chat,
.fact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(9, 30, 49, 0.9);
  padding: 12px;
}

.side-chat h4,
.fact-card h4 {
  margin: 0 0 7px;
  font-size: 0.86rem;
  color: var(--cyan-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.side-chat p,
.fact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.fact-row {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: #dbf6ff;
}

.fact-tag {
  border-radius: 999px;
  border: 1px solid rgba(89, 226, 149, 0.45);
  background: rgba(89, 226, 149, 0.12);
  color: #b6f6d2;
  padding: 3px 8px;
}

.scoreboard {
  margin-top: 16px;
  padding: 16px;
}

.score-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.score-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: rgba(8, 24, 40, 0.8);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
}

.score-list strong {
  color: var(--warning);
}

.comments {
  margin-top: 16px;
  padding: 16px;
}

.comment-stream {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(6, 23, 38, 0.9);
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}

.comment {
  border-left: 2px solid var(--cyan);
  padding: 6px 0 6px 10px;
  color: #cbeeff;
  font-size: 0.9rem;
}

.comment small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.profiles {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(6, 21, 35, 0.9);
  padding: 12px;
}

.profile-card h3 {
  margin: 0;
  font-size: 0.94rem;
}

.profile-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(8, 25, 42, 0.88);
  padding: 14px;
}

.contact-card h3 {
  margin: 0 0 8px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.checklist {
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
}

.checklist li {
  margin: 5px 0;
}

.footer {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(6, 21, 36, 0.88);
}

.footer a {
  color: var(--cyan-2);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 14px;
  top: 14px;
  width: auto;
  height: auto;
  background: #fff;
  color: #00121f;
  border-radius: 8px;
  padding: 10px;
  z-index: 200;
}

.page-shell {
  margin-top: 18px;
  padding: 24px;
}

.page-shell h1 {
  margin-top: 0;
}

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

  .arena-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .persona-orbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .score-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(96vw, 100%);
    padding-top: 14px;
  }

  .home-header {
    border-radius: var(--radius-lg);
  }

  .header-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-pill {
    width: 100%;
    justify-content: center;
  }

  .site-nav-panel {
    position: static;
    width: 100%;
    margin-top: 7px;
  }

  .hero,
  .arena,
  .scoreboard,
  .comments,
  .page-shell {
    padding: 14px;
  }

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

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

  .topic-orb {
    width: min(278px, 84vw);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: cardIn 360ms ease both;
  }

  .persona-orb,
  .topic-orb {
    animation: pulseGlow 4.5s ease-in-out infinite;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(63, 216, 255, 0);
  }
  50% {
    box-shadow: 0 0 24px rgba(63, 216, 255, 0.24);
  }
}
