:root {
  --bg: #fbfaf4;
  --paper: rgba(255, 255, 251, 0.94);
  --paper-strong: #fffffb;
  --ink: #111713;
  --muted: #747970;
  --line: rgba(17, 23, 19, 0.14);
  --line-strong: rgba(17, 23, 19, 0.24);
  --soft: #efeadf;
  --soft-green: #e8f0e7;
  --soft-blue: #e7eff6;
  --teal: #1e6f5c;
  --blue: #2e6fad;
  --red: #b75544;
  --gold: #d49a00;
  --violet: #7a6df0;
  --green: #1e6f5c;
  --shadow: 0 22px 70px rgba(20, 33, 43, 0.09);
  --tight-shadow: 0 10px 28px rgba(17, 23, 19, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, rgba(255, 129, 90, 0.16), transparent 22%, rgba(216, 77, 255, 0.14) 48%, transparent 72%, rgba(218, 235, 96, 0.18)),
    repeating-linear-gradient(88deg, rgba(255, 128, 91, 0.05) 0 2px, rgba(207, 81, 255, 0.045) 2px 4px, transparent 4px 9px),
    linear-gradient(rgba(17, 23, 19, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 19, 0.042) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg), #ffffff 58%, var(--bg));
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
  color: var(--ink);
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.landing-hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(122deg, rgba(255, 225, 140, 0.72), rgba(245, 253, 235, 0.92) 36%, rgba(180, 229, 211, 0.8) 72%, rgba(231, 226, 255, 0.7)),
    linear-gradient(180deg, #fffaf0 0%, #f5fbef 54%, #fbfaf4 100%);
  border-bottom: 1px solid var(--line);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(17, 23, 19, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 19, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 86%);
  pointer-events: none;
}

.landing-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 0;
}

.landing-brand,
.landing-nav-links {
  display: inline-flex;
  align-items: center;
}

.landing-brand {
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
}

.landing-brand span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--paper-strong);
  background: var(--ink);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 950;
}

.landing-brand strong {
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0;
}

.landing-nav-links {
  gap: 6px;
  min-width: 0;
  padding: 5px;
  background: rgba(255, 255, 251, 0.64);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 23, 19, 0.05);
}

.landing-nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  color: rgba(17, 23, 19, 0.72);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 850;
  text-decoration: none;
}

.landing-nav-links a:hover {
  color: var(--ink);
  background: rgba(17, 23, 19, 0.06);
}

.landing-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(520px, 1fr);
  gap: 46px;
  align-items: center;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.landing-copy {
  max-width: 520px;
  text-align: left;
}

.landing-copy h1 {
  margin: 0;
  max-width: 560px;
  font-size: 5.65rem;
  line-height: 0.88;
  letter-spacing: 0;
  font-weight: 620;
  overflow-wrap: break-word;
}

.landing-copy h1 span {
  display: block;
}

.landing-copy p:not(.eyebrow) {
  max-width: 510px;
  margin: 22px 0 0;
  color: rgba(17, 23, 19, 0.74);
  font-size: 1.18rem;
  line-height: 1.56;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-cta {
  color: var(--paper-strong);
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 0 16px 36px rgba(17, 23, 19, 0.16);
}

.secondary-cta {
  color: var(--ink);
  background: rgba(255, 255, 251, 0.74);
  border: 1px solid var(--line-strong);
}

.landing-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.landing-signal-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  color: rgba(17, 23, 19, 0.78);
  background: rgba(255, 255, 251, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
}

.debate-illustration {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 251, 0.86), rgba(240, 249, 235, 0.84) 45%, rgba(236, 244, 255, 0.88)),
    repeating-linear-gradient(90deg, rgba(17, 23, 19, 0.035) 0 1px, transparent 1px 8px);
  border: 1px solid rgba(17, 23, 19, 0.18);
  border-radius: 8px;
  box-shadow: 0 26px 82px rgba(17, 23, 19, 0.14);
}

.debate-stage-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  color: var(--paper-strong);
  background: var(--ink);
}

.debate-stage-top strong,
.debate-stage-top span {
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.debate-stage-top span {
  color: rgba(255, 255, 251, 0.7);
}

.debate-stage {
  position: relative;
  min-height: 548px;
  padding: 18px;
}

.debate-stage::before {
  content: "";
  position: absolute;
  left: 52px;
  right: 52px;
  bottom: 30px;
  height: 172px;
  background:
    linear-gradient(90deg, rgba(30, 111, 92, 0.16), rgba(212, 154, 0, 0.18), rgba(46, 111, 173, 0.16)),
    repeating-linear-gradient(0deg, rgba(17, 23, 19, 0.08) 0 1px, transparent 1px 16px);
  border: 1px solid rgba(17, 23, 19, 0.16);
  border-radius: 8px;
  transform: skewX(-7deg);
}

.topic-poster {
  position: absolute;
  z-index: 3;
  top: 34px;
  left: 50%;
  width: min(350px, calc(100% - 36px));
  padding: 18px;
  color: var(--paper-strong);
  background:
    linear-gradient(135deg, rgba(17, 23, 19, 0.96), rgba(31, 47, 39, 0.95));
  border: 1px solid rgba(255, 255, 251, 0.15);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(17, 23, 19, 0.18);
  transform: translateX(-50%) rotate(-1deg);
}

.topic-poster p,
.topic-poster h2,
.topic-poster span {
  margin: 0;
}

.topic-poster p {
  color: rgba(255, 255, 251, 0.7);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.topic-poster h2 {
  margin-top: 8px;
  font-size: 1.86rem;
  line-height: 1.02;
  font-weight: 660;
}

.topic-poster span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 251, 0.72);
  font-size: 0.82rem;
  font-weight: 850;
}

.hero-agent {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 240px;
  padding: 12px;
  background: rgba(255, 255, 251, 0.9);
  border: 1px solid rgba(17, 23, 19, 0.18);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(17, 23, 19, 0.12);
}

.hero-agent strong,
.hero-agent span {
  display: block;
}

.hero-agent strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.hero-agent span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-agent-ij {
  left: 24px;
  top: 232px;
  width: 286px;
  border-left: 5px solid var(--teal);
  transform: rotate(-2deg);
}

.hero-agent-rc {
  right: 18px;
  top: 252px;
  width: 280px;
  border-left: 5px solid var(--red);
  transform: rotate(2deg);
}

.hero-agent-do {
  left: 156px;
  bottom: 36px;
  width: 310px;
  border-left: 5px solid var(--blue);
  transform: rotate(1deg);
}

.hero-portrait {
  position: relative;
  width: 88px;
  height: 82px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(255, 222, 153, 0.8), rgba(209, 238, 218, 0.7), rgba(228, 222, 255, 0.74));
  border: 1px solid rgba(17, 23, 19, 0.16);
  border-radius: 8px;
}

.hero-portrait .head {
  position: absolute;
  left: 31px;
  top: 23px;
  width: 34px;
  height: 38px;
  background: #ba764b;
  border-radius: 45% 45% 50% 50%;
}

.hero-portrait .hair {
  position: absolute;
  z-index: 2;
  left: 22px;
  top: 17px;
  width: 50px;
  height: 19px;
  background: #121714;
  border-radius: 999px 999px 12px 16px;
  transform: rotate(-5deg);
}

.hero-portrait .eye {
  position: absolute;
  z-index: 3;
  top: 41px;
  width: 4px;
  height: 4px;
  background: #111713;
  border-radius: 999px;
}

.hero-portrait .eye-left {
  left: 42px;
}

.hero-portrait .eye-right {
  left: 56px;
}

.hero-portrait .mouth {
  position: absolute;
  z-index: 3;
  left: 45px;
  top: 52px;
  width: 15px;
  height: 7px;
  border-bottom: 2px solid rgba(17, 23, 19, 0.72);
  border-radius: 0 0 999px 999px;
}

.hero-portrait .jacket {
  position: absolute;
  left: 25px;
  bottom: -7px;
  width: 52px;
  height: 31px;
  background: var(--teal);
  border-radius: 18px 18px 0 0;
}

.portrait-ij .hair {
  left: 18px;
  top: 16px;
  width: 55px;
  height: 16px;
  border-radius: 999px 999px 10px 10px;
}

.portrait-rc .hair {
  left: 31px;
  top: 14px;
  width: 45px;
  height: 22px;
  background: #d9a432;
  transform: rotate(6deg);
}

.portrait-rc .jacket {
  background: var(--red);
}

.portrait-do .hair {
  left: 27px;
  top: 16px;
  width: 48px;
  height: 23px;
  background: #202733;
  transform: rotate(-7deg);
}

.portrait-do .jacket {
  background: var(--blue);
}

.hero-bubble,
.source-ticket {
  position: absolute;
  z-index: 5;
  background: rgba(255, 255, 251, 0.94);
  border: 1px solid rgba(17, 23, 19, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 23, 19, 0.1);
}

.hero-bubble {
  max-width: 190px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.22;
}

.bubble-ij {
  left: 58px;
  top: 164px;
  color: var(--teal);
}

.bubble-rc {
  right: 42px;
  top: 174px;
  color: var(--red);
}

.bubble-do {
  right: 112px;
  bottom: 132px;
  color: var(--blue);
}

.source-ticket {
  display: grid;
  gap: 3px;
  min-width: 130px;
  padding: 10px;
  background: rgba(255, 252, 237, 0.94);
}

.source-ticket span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.source-ticket strong {
  font-size: 0.86rem;
}

.ticket-iaea {
  left: 28px;
  bottom: 136px;
  transform: rotate(2deg);
}

.ticket-ap {
  right: 36px;
  bottom: 42px;
  transform: rotate(-2deg);
}

.ticket-ledger {
  left: 48%;
  bottom: 132px;
  transform: rotate(-1deg);
}

.shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.app-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: 24px;
  align-items: end;
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--line);
}

.title-block h2 {
  margin: 0;
  max-width: 940px;
  font-size: clamp(2.25rem, 4.6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 560;
}

.question {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.site-intro {
  max-width: 720px;
}

.header-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.header-pill-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--ink);
  background: rgba(255, 255, 251, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(78px, 1fr));
  gap: 10px;
  align-content: end;
}

.status-strip > div {
  min-width: 94px;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.metric-value,
.metric-label {
  display: block;
}

.metric-value {
  font-weight: 850;
  font-size: 1.25rem;
  color: var(--teal);
}

.metric-label {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.tabs {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 8px;
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.tabs > span {
  margin: 0 8px 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tab-button {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.04);
}

.tab-button.active {
  color: var(--paper-strong);
  background: var(--ink);
  border-color: var(--ink);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.thread-op {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1fr);
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 251, 0.66);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(17, 23, 19, 0.045);
  position: relative;
  overflow: hidden;
}

.thread-op::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 128, 91, 0.07), transparent 32%, rgba(207, 81, 255, 0.06) 58%, rgba(218, 235, 96, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.thread-op > * {
  position: relative;
  z-index: 1;
}

.thread-op-copy {
  display: grid;
  gap: 7px;
  align-content: start;
}

.thread-op h2,
.section-heading h2,
.drawer-header h2 {
  margin: 0;
}

.thread-op h2 {
  max-width: 620px;
  font-size: clamp(1rem, 1.35vw, 1.28rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 650;
}

.thread-op p {
  max-width: 670px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.context-copy {
  color: rgba(17, 23, 19, 0.7) !important;
  font-size: 0.86rem;
}

.thread-op-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-op-topline span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 4px 8px;
  color: rgba(17, 23, 19, 0.76);
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 840;
}

.topic-infographic {
  align-self: stretch;
  display: grid;
  grid-template-columns: minmax(180px, 0.74fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 251, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.topic-infographic::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(133, 195, 176, 0.08), transparent 44%, rgba(245, 130, 92, 0.06)),
    repeating-linear-gradient(90deg, rgba(17, 23, 19, 0.025) 0 1px, transparent 1px 5px);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.topic-infographic > * {
  position: relative;
  z-index: 1;
}

.topic-infographic-title {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 9px;
  color: var(--ink);
  background: rgba(232, 240, 231, 0.72);
  border: 1px solid rgba(17, 23, 19, 0.08);
  border-radius: 8px;
}

.topic-infographic-title strong {
  font-size: 0.88rem;
  letter-spacing: 0;
}

.topic-infographic-title span {
  color: rgba(17, 23, 19, 0.66);
  font-size: 0.7rem;
  font-weight: 730;
  line-height: 1.34;
}

.context-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.context-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 8px;
  background: rgba(255, 255, 251, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.context-step > span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: var(--paper-strong);
  background: var(--ink);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
}

.context-step strong {
  display: block;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.28;
}

.context-step p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.32;
}

.thread-op .enrichment-scale {
  display: none;
}

.enrichment-scale {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 10px;
  background: rgba(232, 240, 231, 0.76);
  border: 1px solid rgba(17, 23, 19, 0.1);
  border-radius: 8px;
}

.enrichment-scale span {
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.enrichment-scale i {
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--red));
  border-radius: 999px;
}

.debate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  margin-top: 30px;
}

.section-heading {
  margin: 28px 0 16px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.7rem);
  letter-spacing: -0.045em;
  font-weight: 560;
}

.section-heading.split {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.section-heading.compact {
  margin-top: 0;
}

.section-intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.round-list,
.agent-grid,
.claim-sections,
.source-grid {
  display: grid;
  gap: 14px;
}

.round-list {
  position: relative;
  gap: 18px;
  padding: 4px 0 8px;
  overflow: visible;
}

.thread-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.thread-toolbar span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  background: rgba(255, 255, 251, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.round-card,
.agent-card,
.claim-card,
.source-card,
.rail-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.05);
}

.round-card {
  --thread-indent: 0px;
  --thread-indent-mobile: 0px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  width: min(920px, calc(100% - var(--thread-indent)));
  margin-left: var(--thread-indent);
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.99);
  transition:
    opacity 520ms ease,
    transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.round-card.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.round-card.nested-comment {
  margin-top: -4px;
}

.round-card.nested-comment .thread-bubble {
  box-shadow: 0 8px 22px rgba(17, 23, 19, 0.06);
}

.round-card[data-depth="2"],
.round-card[data-depth="3"] {
  grid-template-columns: 48px minmax(0, 1fr);
}

.round-card[data-depth="2"] .avatar,
.round-card[data-depth="3"] .avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 12px;
}

.thread-avatar-column {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding-top: 2px;
}

.thread-vote {
  display: grid;
  justify-items: center;
  gap: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.thread-vote strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.thread-line {
  display: block;
  width: 2px;
  min-height: calc(100% - 12px);
  flex: 1;
  background: linear-gradient(180deg, var(--line-strong), transparent);
  border-radius: 999px;
}

.thread-body {
  min-width: 0;
}

.thread-bubble {
  position: relative;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 251, 0.95);
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.round-card.nested-comment .thread-bubble::after {
  content: "";
  position: absolute;
  left: -46px;
  top: 26px;
  width: 32px;
  height: 2px;
  background: var(--line-strong);
  border-radius: 999px;
  opacity: 0.72;
}

.message-paragraphs {
  display: grid;
  gap: 12px;
}

.message-paragraphs p {
  margin: 0;
}

.thread-bubble::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 18px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.round-card[data-speaker="arbiter"] .thread-bubble {
  background: #eef5ed;
}

.round-card[data-speaker="republican"] .thread-bubble {
  background: #f8ede8;
}

.round-card[data-speaker="democratic"] .thread-bubble {
  background: #edf4fb;
}

.thread-collapse {
  display: grid;
  gap: 10px;
}

.thread-collapse > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  min-height: 56px;
  padding: 12px 14px;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 251, 0.96), rgba(236, 247, 236, 0.9)),
    var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(17, 23, 19, 0.06);
  cursor: pointer;
  list-style: none;
}

.thread-collapse > summary::-webkit-details-marker {
  display: none;
}

.thread-collapse > summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--paper-strong);
  background: var(--ink);
  border-radius: 999px;
  font-weight: 900;
}

.thread-collapse[open] > summary::before {
  content: "-";
}

.thread-collapse > summary strong,
.thread-collapse > summary span:last-child {
  min-width: 0;
}

.thread-collapse > summary strong {
  font-size: 0.98rem;
}

.thread-collapse > summary span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.deep-tag {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 24px;
  padding: 4px 8px;
  color: var(--violet);
  background: rgba(235, 221, 255, 0.72);
  border: 1px solid rgba(111, 66, 193, 0.22);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9), transparent 20%),
    linear-gradient(135deg, #d8f6cf, #fbd36f 42%, #f48cc9 74%, #8bd4ff);
  border: 2px solid rgba(17, 23, 19, 0.22);
  border-radius: 14px;
  font-weight: 900;
  box-shadow:
    inset 0 -8px 18px rgba(0, 0, 0, 0.12),
    0 10px 24px rgba(17, 23, 19, 0.14);
  position: relative;
  z-index: 2;
  overflow: visible;
}

.portrait {
  isolation: isolate;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(17, 23, 19, 0.08) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.portrait-scene,
.portrait-scene span {
  position: absolute;
  display: block;
}

.portrait-scene {
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
}

.portrait-sky {
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 242, 122, 0.96) 0 10%, transparent 11%),
    linear-gradient(160deg, rgba(195, 238, 225, 0.96), rgba(244, 207, 255, 0.9) 52%, rgba(255, 175, 102, 0.84));
}

.portrait-sun {
  left: 6px;
  bottom: 5px;
  width: 44px;
  height: 14px;
  background: linear-gradient(90deg, rgba(34, 111, 92, 0.65), rgba(217, 154, 0, 0.52));
  border-radius: 50% 50% 0 0;
}

.portrait-shoulders {
  left: 10px;
  bottom: 0;
  width: 36px;
  height: 18px;
  background: var(--agent-color);
  border-radius: 18px 18px 6px 6px;
}

.portrait-neck {
  left: 24px;
  bottom: 16px;
  width: 8px;
  height: 8px;
  background: #b66f49;
  border-radius: 4px;
}

.portrait-face {
  left: 17px;
  top: 14px;
  width: 24px;
  height: 28px;
  background: #c88458;
  border-radius: 45% 45% 48% 48%;
  box-shadow: inset -4px -3px 0 rgba(83, 42, 32, 0.14);
}

.portrait-hair {
  left: 14px;
  top: 9px;
  width: 30px;
  height: 15px;
  background: #2b211c;
  border-radius: 55% 45% 35% 35%;
  transform: rotate(-5deg);
}

.portrait-eyes {
  left: 23px;
  top: 25px;
  width: 13px;
  height: 3px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 2px 1.5px, #111713 0 1.2px, transparent 1.3px),
    radial-gradient(circle at 11px 1.5px, #111713 0 1.2px, transparent 1.3px);
}

.portrait-mouth {
  left: 26px;
  top: 34px;
  width: 9px;
  height: 4px;
  border-bottom: 2px solid rgba(17, 23, 19, 0.55);
  border-radius: 0 0 999px 999px;
}

.portrait-prop {
  right: 7px;
  bottom: 12px;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 251, 0.84);
  box-shadow: 0 0 0 1px rgba(17, 23, 19, 0.16);
  transform: rotate(8deg);
}

.portrait-arbiter .portrait-prop {
  right: 8px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  background: transparent;
  border: 2px solid rgba(17, 23, 19, 0.72);
  border-radius: 50%;
}

.portrait-arbiter .portrait-prop::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: rgba(17, 23, 19, 0.72);
  transform: rotate(45deg);
}

.portrait-republican .portrait-sky {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 230, 94, 0.96) 0 10%, transparent 11%),
    linear-gradient(160deg, rgba(255, 214, 161, 0.95), rgba(255, 143, 92, 0.82) 52%, rgba(141, 217, 255, 0.72));
}

.portrait-republican .portrait-hair {
  background: #d89432;
  width: 32px;
  height: 16px;
  transform: rotate(8deg);
}

.portrait-republican .portrait-prop {
  right: 6px;
  bottom: 8px;
  width: 12px;
  height: 18px;
  background: linear-gradient(180deg, #b75544, #fffffb 48%, #2e6fad);
  border-radius: 2px;
}

.portrait-democratic .portrait-sky {
  background:
    radial-gradient(circle at 72% 18%, rgba(217, 232, 102, 0.9) 0 10%, transparent 11%),
    linear-gradient(160deg, rgba(202, 235, 255, 0.96), rgba(210, 202, 255, 0.82) 52%, rgba(162, 230, 192, 0.8));
}

.portrait-democratic .portrait-hair {
  background: #2d3340;
  border-radius: 45% 55% 45% 45%;
}

.portrait-democratic .portrait-eyes {
  height: 5px;
  background:
    linear-gradient(90deg, transparent 0 1px, #2e6fad 1px 5px, transparent 5px 8px, #2e6fad 8px 12px, transparent 12px),
    radial-gradient(circle at 3px 3px, #111713 0 1px, transparent 1.2px),
    radial-gradient(circle at 10px 3px, #111713 0 1px, transparent 1.2px);
}

.portrait-democratic .portrait-prop {
  right: 5px;
  bottom: 11px;
  width: 12px;
  height: 15px;
  background: #edf4fb;
  border-left: 3px solid #2e6fad;
}

.avatar-initials {
  position: absolute;
  z-index: 5;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  color: var(--paper-strong);
  background: var(--ink);
  border: 1px solid rgba(255, 255, 251, 0.9);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
}

.avatar-popover {
  position: absolute;
  left: calc(100% + 10px);
  top: 0;
  z-index: 8;
  display: none;
  width: min(320px, 78vw);
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.avatar-popover strong {
  display: block;
  font-size: 0.96rem;
  line-height: 1.2;
}

.avatar-popover p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.avatar:hover .avatar-popover,
.avatar:focus .avatar-popover,
.avatar:focus-within .avatar-popover {
  display: block;
}

.thread-bubble h3,
.agent-card h3,
.rail-panel h3,
.claim-card h3,
.source-card h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

.thread-bubble p,
.round-card p,
.rail-panel p,
.claim-card p,
.source-card p,
.agent-card p {
  color: var(--muted);
  line-height: 1.6;
}

.thread-bubble p {
  margin: 10px 0 0;
  color: rgba(17, 23, 19, 0.78);
}

.thread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.thread-handle {
  color: var(--ink);
  font-weight: 850;
}

.round-card[data-speaker="arbiter"] .thread-handle {
  color: var(--teal);
}

.round-card[data-speaker="republican"] .thread-handle {
  color: var(--red);
}

.round-card[data-speaker="democratic"] .thread-handle {
  color: var(--blue);
}

.thread-flair {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  color: var(--paper-strong);
  background: var(--ink);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.round-card[data-speaker="arbiter"] .thread-flair {
  background: var(--teal);
}

.round-card[data-speaker="republican"] .thread-flair {
  background: var(--red);
}

.round-card[data-speaker="democratic"] .thread-flair {
  background: var(--blue);
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: lowercase;
}

.thread-action-button {
  position: relative;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-weight: inherit;
  text-transform: inherit;
}

.thread-action-button:hover,
.thread-action-button:focus,
.thread-action-button.active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thread-action-button:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -8px;
  color: var(--line-strong);
}

.round-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 251, 0.72);
}

.reply-context {
  display: block;
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.reply-context::before {
  content: "↳ ";
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 12px;
}

.source-receipts {
  margin-top: 10px;
  padding-left: 12px;
}

.source-receipts summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--ink);
  background: rgba(255, 255, 251, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.source-receipts summary::-webkit-details-marker {
  display: none;
}

.source-receipts summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--paper-strong);
  background: var(--ink);
  border-radius: 50%;
  font-weight: 900;
}

.source-receipts[open] summary::before {
  content: "-";
}

.source-receipts summary strong {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.receipt-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  background: rgba(255, 255, 251, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.receipt-claim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.receipt-claim p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(17, 23, 19, 0.82);
  font-size: 0.9rem;
  line-height: 1.45;
}

.receipt-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-links a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  background: var(--soft-green);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 12px;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--ink);
  background: rgba(255, 255, 251, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.05);
}

.reaction-button:hover,
.reaction-button:focus {
  border-color: var(--line-strong);
  background: var(--paper-strong);
}

.reply-stack {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding-left: 12px;
}

.reply-list {
  display: grid;
  gap: 8px;
}

.reply-card {
  padding: 10px 12px;
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reply-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
}

.reply-meta strong {
  color: var(--ink);
}

.reply-card p {
  margin: 6px 0 0;
  color: rgba(17, 23, 19, 0.8);
  line-height: 1.5;
}

.reply-composer {
  display: none;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 251, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reply-composer.open {
  display: grid;
}

.reply-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 86px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.primary-button,
.secondary-button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 820;
}

.primary-button {
  color: var(--paper-strong);
  background: var(--ink);
  border: 1px solid var(--ink);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
}

.claim-chip,
.mini-chip,
.source-link-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 251, 0.74);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.claim-chip {
  background: #fffffb;
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.05);
}

.claim-chip:hover,
.claim-chip:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(52, 84, 209, 0.18);
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.reader-rail {
  display: grid;
  align-content: start;
  gap: 14px;
  position: sticky;
  top: 80px;
}

.rail-panel {
  padding: 16px;
  background: rgba(255, 255, 251, 0.82);
}

.legend-grid {
  display: grid;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.agent-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.agent-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(255, 129, 90, 0.2), transparent 35%, rgba(207, 81, 255, 0.12) 66%, rgba(218, 235, 96, 0.2)),
    var(--paper);
  min-height: 660px;
}

.agent-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 4px;
  background: currentColor;
  border-radius: 999px 999px 0 0;
}

.agent-portrait-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(247, 111, 94, 0.28), transparent 30%, rgba(215, 74, 255, 0.24) 68%, rgba(218, 235, 96, 0.28)),
    repeating-linear-gradient(88deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 6px),
    #eef5ed;
}

.agent-portrait-stage::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(17, 23, 19, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 251, 0.62), rgba(255, 255, 251, 0.08)),
    linear-gradient(90deg, rgba(30, 111, 92, 0.22), rgba(212, 154, 0, 0.18));
}

.agent-portrait-stage .avatar {
  width: 148px;
  height: 148px;
  border-radius: 28px;
  transform: rotate(-2deg);
}

.agent-card[data-agent-id="republican"] .agent-portrait-stage .avatar {
  transform: rotate(2deg);
}

.agent-portrait-stage .avatar-initials {
  min-width: 38px;
  height: 38px;
  font-size: 0.92rem;
}

.agent-portrait-stage .portrait-face {
  left: 45px;
  top: 38px;
  width: 62px;
  height: 72px;
}

.agent-portrait-stage .portrait-hair {
  left: 35px;
  top: 24px;
  width: 78px;
  height: 38px;
}

.agent-portrait-stage .portrait-eyes {
  left: 59px;
  top: 68px;
  width: 36px;
  height: 8px;
  background:
    radial-gradient(circle at 6px 4px, #111713 0 3px, transparent 3.2px),
    radial-gradient(circle at 30px 4px, #111713 0 3px, transparent 3.2px);
}

.agent-portrait-stage .portrait-mouth {
  left: 66px;
  top: 91px;
  width: 24px;
  height: 9px;
  border-bottom-width: 4px;
}

.agent-portrait-stage .portrait-neck {
  left: 69px;
  bottom: 42px;
  width: 20px;
  height: 18px;
}

.agent-portrait-stage .portrait-shoulders {
  left: 28px;
  bottom: 0;
  width: 94px;
  height: 48px;
  border-radius: 42px 42px 10px 10px;
}

.agent-portrait-stage .portrait-prop {
  transform: scale(2.1) rotate(8deg);
  transform-origin: center;
}

.agent-card-body h3 {
  margin-bottom: 4px;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.agent-real-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-alias {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 780;
  line-height: 1.45;
}

.agent-one-line {
  margin: 10px 0 0;
}

.agent-belief {
  margin: 10px 0 0;
  padding: 12px 12px 12px 34px;
  color: rgba(17, 23, 19, 0.84);
  background: rgba(255, 255, 251, 0.64);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.45;
  position: relative;
}

.agent-belief::before {
  content: "\201C";
  position: absolute;
  left: 10px;
  top: 4px;
  color: currentColor;
  font-size: 2rem;
  font-style: normal;
  line-height: 1;
  opacity: 0.48;
}

.agent-belief::after {
  content: "\201D";
}

.attribute-grid {
  display: grid;
  gap: 8px;
}

.attribute-card {
  display: grid;
  gap: 5px;
  padding: 11px;
  color: var(--ink);
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.04);
}

.attribute-card span,
.agent-correction span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.attribute-card strong {
  font-size: 0.88rem;
  line-height: 1.35;
}

.attribute-card:nth-child(1) {
  background: rgba(232, 240, 231, 0.76);
}

.attribute-card:nth-child(2),
.attribute-card:nth-child(3) {
  background: rgba(243, 236, 213, 0.78);
}

.value-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-card-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.agent-correction {
  padding: 10px;
  background: rgba(255, 255, 251, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.agent-correction p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.agent-room-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  min-width: min(360px, 100%);
}

.agent-room-stats span {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 12px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
  font-weight: 780;
}

.agent-room-stats strong {
  color: var(--teal);
  font-size: 1.45rem;
  line-height: 1;
}

.agent-room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  margin-top: 16px;
}

.agent-builder-panel,
.agent-invite-panel,
.agent-room-column {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.agent-builder-panel,
.agent-invite-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.agent-builder-panel h3,
.agent-invite-panel h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.agent-invite-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.agent-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agent-form label,
.agent-invite-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.agent-form input,
.agent-form select,
.agent-form textarea,
.agent-invite-panel select,
.invite-output {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.agent-form textarea,
.invite-output {
  resize: vertical;
  line-height: 1.45;
}

.wide-field {
  grid-column: 1 / -1;
}

.invite-output {
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.agent-room-live {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.agent-room-column {
  padding: 16px;
}

.v2-agent-roster,
.agent-room-feed {
  display: grid;
  gap: 12px;
}

.v2-agent-card,
.agent-room-message {
  border: 1px solid var(--line);
  border-left: 5px solid var(--agent-color, var(--teal));
  border-radius: 8px;
  background: rgba(255, 255, 251, 0.88);
  box-shadow: 0 8px 22px rgba(17, 23, 19, 0.06);
}

.v2-agent-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.v2-agent-top {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.v2-agent-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--paper-strong);
  background: var(--agent-color, var(--ink));
  border-radius: 8px;
  font-weight: 950;
}

.v2-agent-top h3 {
  margin: 0;
  font-size: 1rem;
}

.v2-agent-top p,
.v2-agent-prompt {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.v2-agent-prompt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.v2-source-diet {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v2-source-diet span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 8px;
  color: var(--ink);
  background: var(--soft-green);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 780;
}

.v2-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-room-message {
  padding: 14px;
}

.agent-room-message .message-paragraphs {
  margin-top: 10px;
}

.agent-room-message p {
  color: var(--ink);
}

.compass {
  position: relative;
  height: 150px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to right, transparent 49.5%, rgba(17, 23, 19, 0.18) 49.5%, rgba(17, 23, 19, 0.18) 50.5%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(17, 23, 19, 0.18) 49.5%, rgba(17, 23, 19, 0.18) 50.5%, transparent 50.5%),
    linear-gradient(rgba(17, 23, 19, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 23, 19, 0.04) 1px, transparent 1px),
    #fbfcfe;
  background-size: auto, auto, 24px 24px, 24px 24px, auto;
  overflow: hidden;
}

.compass-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
  transform: translate(-50%, -50%);
}

.axis-label {
  position: absolute;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.axis-left {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.axis-right {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.axis-top {
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
}

.axis-bottom {
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.stack-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.stack-list li {
  padding-left: 14px;
  border-left: 3px solid var(--teal);
  color: var(--muted);
  line-height: 1.5;
}

.agent-claims {
  display: grid;
  gap: 10px;
}

.claim-section {
  display: grid;
  gap: 10px;
}

.claim-section h3 {
  margin: 24px 0 0;
}

.claim-card {
  padding: 16px;
  position: relative;
}

.claim-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  background: var(--line-strong);
  border-radius: 999px;
}

.claim-card:has([data-status="verified"])::before {
  background: var(--green);
}

.claim-card:has([data-status="likely"])::before {
  background: var(--blue);
}

.claim-card:has([data-status="contested"])::before {
  background: var(--gold);
}

.claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.source-heading {
  margin-top: 36px;
}

.source-submit-panel {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.source-submit-panel h2 {
  margin: 0;
  letter-spacing: -0.035em;
  font-weight: 560;
}

.source-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr) 170px;
  gap: 10px;
  align-items: end;
}

.source-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.source-form input,
.source-form select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.source-note {
  grid-column: 1 / span 2;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.source-queue {
  display: grid;
  gap: 10px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.submitted-source-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--soft-blue);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.submitted-source-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.submitted-source-card h3 {
  margin: 0;
  font-size: 1rem;
}

.submitted-source-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.source-card {
  padding: 16px;
  background: var(--soft-green);
}

.source-card:nth-child(3n + 2) {
  background: #f3ecd5;
}

.source-card:nth-child(3n) {
  background: var(--soft-blue);
}

.source-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.search-box {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-transform: none;
}

.claim-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: -2px 0 18px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.claim-filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.claim-filter-panel select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  letter-spacing: 0;
  text-transform: none;
}

.filter-summary {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.stance-chip,
.believer-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
}

.believer-chip {
  background: #fffffb;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: 0 1px 0 rgba(17, 23, 19, 0.06);
}

.stance-arbiter {
  background: var(--soft-green);
  color: var(--teal);
}

.stance-republican {
  background: #f8ede8;
  color: var(--red);
}

.stance-democratic {
  background: #edf4fb;
  color: var(--blue);
}

.stance-both {
  background: #f3ecd5;
  color: #7b5608;
}

.claim-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  width: min(520px, 100vw);
  height: 100vh;
  overflow: auto;
  padding: 22px;
  background: var(--paper-strong);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(102%);
  transition: transform 180ms ease;
}

.claim-drawer.open {
  transform: translateX(0);
}

.drawer-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(21, 23, 26, 0.28);
}

.drawer-scrim.open {
  display: block;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.drawer-body {
  padding: 18px 0;
}

.drawer-section {
  margin-top: 22px;
}

.drawer-section h3 {
  margin: 0 0 10px;
}

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

.source-list a {
  display: block;
  padding: 12px;
  background: var(--soft-green);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.source-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

[data-status="verified"] .status-dot,
.status-verified {
  background: var(--green);
}

[data-status="likely"] .status-dot,
.status-likely {
  background: var(--blue);
}

[data-status="contested"] .status-dot,
.status-contested {
  background: var(--gold);
}

[data-status="unsupported"] .status-dot,
.status-unsupported {
  background: var(--red);
}

[data-status="superseded"] .status-dot,
.status-superseded {
  background: var(--violet);
}

[data-status="opinion"] .status-dot,
.status-opinion {
  background: var(--muted);
}

@media (max-width: 960px) {
  .app-header,
  .thread-op,
  .debate-layout,
  .source-grid,
  .agent-grid,
  .agent-room-layout,
  .agent-room-live,
  .source-form,
  .agent-form,
  .claim-filter-panel {
    grid-template-columns: 1fr;
  }

  .landing-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 56px 0 64px;
  }

  .landing-copy {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
  }

  .landing-copy h1 {
    font-size: 5.6rem;
  }

  .landing-copy p:not(.eyebrow) {
    margin-right: auto;
    margin-left: auto;
  }

  .landing-actions,
  .landing-signal-row {
    justify-content: center;
  }

  .debate-illustration {
    width: min(760px, 100%);
    margin: 0 auto;
  }

  .status-strip {
    width: 100%;
  }

  .topic-infographic {
    grid-template-columns: 1fr;
  }

  .reader-rail {
    position: static;
  }

  .source-note {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(1280px, calc(100vw - 32px));
    padding-top: 10px;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 12px 0 14px;
  }

  .tab-button {
    white-space: nowrap;
  }

  .tabs > span {
    white-space: nowrap;
  }

  .landing-topbar {
    display: grid;
    grid-template-columns: 1fr;
    width: min(1280px, calc(100vw - 32px));
    align-items: stretch;
    gap: 10px;
    padding-top: 14px;
  }

  .landing-nav-links {
    display: none;
  }

  .landing-inner {
    width: min(1280px, calc(100vw - 32px));
    padding: 34px 0 42px;
    gap: 22px;
  }

  .landing-copy h1 {
    font-size: 2.55rem;
    line-height: 0.98;
  }

  .landing-copy p:not(.eyebrow) {
    font-size: 1rem;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .agent-room-stats {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .agent-builder-panel,
  .agent-invite-panel,
  .agent-room-column {
    padding: 14px;
  }

  .landing-signal-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .landing-signal-row span {
    justify-content: center;
  }

  .debate-illustration {
    min-height: 0;
    border-radius: 8px;
  }

  .debate-stage-top {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    min-height: 0;
    padding: 12px;
  }

  .debate-stage-top span {
    display: none;
  }

  .debate-stage {
    display: grid;
    gap: 10px;
    min-height: 0;
    padding: 10px;
  }

  .debate-stage::before {
    display: none;
  }

  .topic-poster,
  .hero-agent,
  .hero-bubble,
  .source-ticket {
    position: relative;
    inset: auto;
    width: auto;
    min-width: 0;
    max-width: 100%;
    transform: none;
  }

  .topic-poster {
    order: 1;
    padding: 14px;
  }

  .topic-poster h2 {
    font-size: 1.82rem;
    line-height: 1.06;
  }

  .hero-agent {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .hero-agent-ij {
    order: 3;
  }

  .hero-agent-rc {
    order: 5;
  }

  .hero-agent-do {
    order: 7;
  }

  .hero-portrait {
    width: 70px;
    height: 66px;
  }

  .hero-portrait .head {
    left: 24px;
    top: 18px;
    width: 30px;
    height: 34px;
  }

  .hero-portrait .hair {
    left: 18px;
    top: 13px;
    width: 44px;
    height: 17px;
  }

  .hero-portrait .eye {
    top: 34px;
  }

  .hero-portrait .eye-left {
    left: 34px;
  }

  .hero-portrait .eye-right {
    left: 46px;
  }

  .hero-portrait .mouth {
    left: 36px;
    top: 44px;
  }

  .hero-portrait .jacket {
    left: 18px;
    width: 46px;
  }

  .hero-bubble {
    max-width: none;
    padding: 9px 10px;
  }

  .bubble-ij {
    order: 2;
  }

  .bubble-rc {
    order: 4;
  }

  .bubble-do {
    order: 6;
  }

  .ticket-iaea,
  .ticket-ap,
  .ticket-ledger {
    order: 8;
  }

  .thread-op {
    padding: 12px;
  }

  .context-steps {
    grid-template-columns: 1fr;
  }

  .enrichment-scale {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .enrichment-scale i {
    width: 100%;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    display: grid;
  }

  .round-topline {
    display: grid;
  }

  .round-card {
    grid-template-columns: 44px minmax(0, 1fr);
    width: min(100%, calc(100% - var(--thread-indent-mobile)));
    margin-left: var(--thread-indent-mobile);
    gap: 9px;
  }

  .round-card[data-depth="2"],
  .round-card[data-depth="3"] {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .round-card .avatar,
  .round-card[data-depth="2"] .avatar,
  .round-card[data-depth="3"] .avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
  }

  .round-card.nested-comment .thread-bubble::after {
    left: -28px;
    width: 18px;
  }

  .thread-bubble {
    padding: 14px;
  }
}
