.ai {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}

.ai__list {
  display: flex;
  flex-direction: column;
  gap: 96px;
}

/* Zigzag rows */
.ai__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.ai__row--reverse .ai__copy { order: 2; }
.ai__row--reverse .ai__visual { order: 1; }

.ai__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mythic-deep);
  background: var(--mythic-tint);
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
}

.ai__copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-weight: 800;
  max-width: 18ch;
}
.ai__copy p {
  margin-top: 18px;
  font-size: 1.02rem;
  line-height: 1.55;
}

.ai__points {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai__points li {
  position: relative;
  padding-left: 26px;
  font-size: 0.95rem;
  color: var(--ink);
}
.ai__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 14px; height: 2px;
  background: var(--mythic);
}

/* Visuals */
.ai__visual {
  position: relative;
  aspect-ratio: 1 / 0.82;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Prompt + generation */
.prompt {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.prompt__caret { color: var(--mythic-soft); }
.prompt__cursor {
  display: inline-block;
  width: 8px; height: 16px;
  background: var(--mythic-soft);
  margin-left: -2px;
  animation: blink 1.1s steps(1) infinite;
}

.gen {
  flex: 1;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.gen__row {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
  animation: rowSlide .6s var(--ease) both;
}
.gen__row:nth-child(1) { animation-delay: .1s; }
.gen__row:nth-child(2) { animation-delay: .25s; }
.gen__row:nth-child(3) { animation-delay: .4s; }
.gen__row:nth-child(4) { animation-delay: .55s; }
.gen__row em {
  font-family: var(--font-mono);
  color: var(--muted);
}
.gen__row--last {
  background: var(--paper-2);
  border-bottom: 0;
  color: var(--mythic-deep);
}
@keyframes rowSlide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

/* Curve card */
.curve-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}
.curve-card__head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.curve-card__head span { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; }
.curve-card__head strong { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 500; }

.bars--big { height: 180px; }
.bars--big span { background: var(--mythic-grad); }
.bars--big span::after {
  content: attr(data-l);
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.legend {
  display: flex; gap: 18px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sw--w { background: #F4ECC8; border: 1px solid #DCD5B0; }
.sw--u { background: #4A7BFF; }
.sw--r { background: #D8554A; }
.sw--c { background: #C9C2B9; }

/* Ring + buildable list */
.ring {
  position: relative;
  width: 160px; height: 160px;
  margin: 4px auto 8px;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); animation: ringDraw 1.4s var(--ease) both; }
@keyframes ringDraw {
  from { stroke-dashoffset: 327; }
}
.ring__num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring__num strong { font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; }
.ring__num span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }

.buildable {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.buildable li {
  display: flex; justify-content: space-between;
  padding: 12px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.buildable li:last-child { border-bottom: 0; }
.buildable em { font-family: var(--font-mono); font-weight: 500; color: var(--mythic-deep); }

/* Chat */
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.chat__msg {
  max-width: 90%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
  animation: msgIn .5s var(--ease) both;
}
.chat__msg em { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); display: block; margin-top: 6px; }
.chat__msg--u {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
  border-bottom-right-radius: 4px;
  animation-delay: .1s;
}
.chat__msg--b {
  align-self: flex-start;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  animation-delay: .4s;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.chat__typing {
  align-self: flex-start;
  display: inline-flex; gap: 5px;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.chat__typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  animation: bounce 1.2s ease-in-out infinite;
}
.chat__typing span:nth-child(2) { animation-delay: .15s; }
.chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

/* Scanner */
.scan {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}
.scan__frame {
  position: relative;
  flex: 1;
  background:
    linear-gradient(135deg, #1A1A1D 0%, #0E0E10 100%);
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 140px;
}
.scan__corners {
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid var(--mythic);
}
.c1 { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.c2 { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.c3 { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.c4 { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.scan__line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mythic), transparent);
  animation: scanline 2.4s ease-in-out infinite;
  box-shadow: 0 0 24px var(--mythic);
}
@keyframes scanline {
  0%, 100% { top: 14px; }
  50% { top: calc(100% - 16px); }
}

.scan__feed {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.scan__feed li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.scan__feed li:last-child { border-bottom: 0; color: var(--muted); }

/* VS / Matchup */
.vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: var(--paper-2);
  border-radius: var(--r-md);
}
.vs__side { display: flex; flex-direction: column; gap: 4px; }
.vs__side--alt { text-align: right; }
.vs__name { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.vs__side strong { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 500; letter-spacing: -0.02em; }
.vs__side--alt strong { color: var(--muted); }
.vs__sep {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--mythic);
  letter-spacing: -0.02em;
}

.vs__bar {
  margin-top: 14px;
  height: 8px;
  background: var(--paper-3);
  border-radius: 999px;
  overflow: hidden;
}
.vs__bar span {
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--mythic-grad);
  border-radius: 999px;
  animation: barFill 1.4s var(--ease) both;
}
@keyframes barFill { from { width: 0; } }

.sb {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.sb li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sb li:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .ai__row, .ai__row--reverse { grid-template-columns: 1fr; gap: 36px; }
  .ai__row--reverse .ai__copy { order: 1; }
  .ai__row--reverse .ai__visual { order: 2; }
  .ai__list { gap: 80px; }
  .ai__visual { aspect-ratio: auto; min-height: 360px; }
}
