body.editorial-page .llm-demo-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

body.editorial-page .llm-demo-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 18px 54px;
  align-items: start;
  margin-bottom: 34px;
}

body.editorial-page .llm-demo-intro .eyebrow { grid-column: 1 / -1; }

body.editorial-page .llm-demo-intro h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
}

body.editorial-page .llm-demo-intro > p {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.7;
}

body.editorial-page .llm-demo-disclaimer {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

body.editorial-page .llm-demo {
  --llm-bg: #101820;
  --llm-card: #18242d;
  --llm-line: rgba(121, 215, 205, 0.2);
  --llm-accent: #79d7cd;
  --llm-text: #f8f5ee;
  --llm-muted: #9cb0b8;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0, rgba(121, 215, 205, 0.09), transparent 26%),
    var(--llm-bg);
  box-shadow: 0 38px 90px -52px rgba(20, 24, 31, 0.82);
  color: var(--llm-text);
}

body.editorial-page .llm-pipeline {
  display: grid;
  grid-template-columns: repeat(7, auto);
  gap: 10px;
  align-items: stretch;
}

body.editorial-page .llm-pipeline > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--llm-line);
  border-radius: 10px;
  background: var(--llm-card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

body.editorial-page .llm-pipeline > div.active {
  border-color: var(--llm-accent);
  box-shadow: 0 0 22px rgba(121, 215, 205, 0.13);
  transform: translateY(-2px);
}

body.editorial-page .llm-pipeline span {
  display: block;
  margin-bottom: 3px;
  color: var(--llm-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.editorial-page .llm-pipeline small {
  color: var(--llm-muted);
  font-size: 11px;
  line-height: 1.35;
}

body.editorial-page .llm-pipeline > b {
  align-self: center;
  color: rgba(121, 215, 205, 0.55);
  font-size: 18px;
}

body.editorial-page .llm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 14px;
}

body.editorial-page .llm-tabs button,
body.editorial-page .llm-mode button,
body.editorial-page .llm-btn {
  border: 1px solid var(--llm-line);
  background: transparent;
  color: var(--llm-muted);
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  transition: 0.18s ease;
}

body.editorial-page .llm-tabs button {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

body.editorial-page .llm-tabs button:hover,
body.editorial-page .llm-tabs button.active,
body.editorial-page .llm-mode button.active {
  border-color: var(--llm-accent);
  background: var(--llm-accent);
  color: var(--llm-bg);
}

body.editorial-page .llm-demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
}

body.editorial-page .llm-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--llm-line);
  border-radius: 13px;
  background: var(--llm-card);
}

body.editorial-page .llm-panel-label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--llm-accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.editorial-page .llm-panel-label span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

body.editorial-page .llm-context {
  min-height: 118px;
  color: var(--llm-text);
  font: 20px/1.8 "Playfair Display", serif;
}

body.editorial-page .llm-token {
  display: inline-block;
  margin: 2px 1px;
  padding: 1px 6px 2px;
  border-radius: 5px;
  transition: background 0.2s, box-shadow 0.2s;
}

body.editorial-page .llm-token.relevant {
  background: rgba(121, 215, 205, 0.12);
  box-shadow: inset 0 0 0 1px rgba(121, 215, 205, 0.24);
}

body.editorial-page .llm-token.recent {
  background: rgba(121, 215, 205, 0.25);
  box-shadow: inset 0 0 0 1px var(--llm-accent);
}

body.editorial-page .llm-cursor {
  display: inline-block;
  width: 9px;
  height: 21px;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--llm-accent);
  vertical-align: -3px;
  animation: llm-blink 1s steps(1) infinite;
}

@keyframes llm-blink { 50% { opacity: 0.2; } }

body.editorial-page .llm-patterns {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--llm-line);
}

body.editorial-page .llm-patterns > small {
  display: block;
  margin-bottom: 9px;
  color: var(--llm-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.editorial-page .llm-patterns > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body.editorial-page .llm-chip {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: var(--llm-muted);
  font-size: 10px;
}

body.editorial-page .llm-chip.active {
  border-color: var(--llm-accent);
  color: var(--llm-text);
}

body.editorial-page .llm-status {
  min-height: 42px;
  margin-bottom: 12px;
  padding-left: 11px;
  border-left: 2px solid var(--llm-accent);
  color: var(--llm-muted);
  font-size: 12px;
  line-height: 1.5;
}

body.editorial-page .llm-status strong { color: var(--llm-accent); }

body.editorial-page .llm-candidates {
  display: grid;
  gap: 7px;
}

body.editorial-page .llm-candidate {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  overflow: hidden;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--llm-text);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

body.editorial-page .llm-candidate i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  background: rgba(121, 215, 205, 0.12);
  transition: width 0.45s ease;
}

body.editorial-page .llm-candidate span,
body.editorial-page .llm-candidate b { position: relative; z-index: 1; }
body.editorial-page .llm-candidate b { color: var(--llm-accent); }
body.editorial-page .llm-candidate:hover,
body.editorial-page .llm-candidate.selected { border-color: var(--llm-accent); }

body.editorial-page .llm-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--llm-line);
  border-radius: 11px;
  background: var(--llm-card);
}

body.editorial-page .llm-btn {
  padding: 10px 13px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

body.editorial-page .llm-btn:hover { border-color: var(--llm-accent); color: var(--llm-text); }
body.editorial-page .llm-btn.primary { border-color: var(--llm-accent); background: var(--llm-accent); color: var(--llm-bg); }
body.editorial-page .llm-btn:disabled { opacity: 0.45; cursor: not-allowed; }

body.editorial-page .llm-mode {
  display: flex;
  overflow: hidden;
  margin-left: auto;
  border: 1px solid var(--llm-line);
  border-radius: 7px;
}

body.editorial-page .llm-mode button {
  padding: 9px 11px;
  border: 0;
  font-size: 10px;
  font-weight: 800;
}

body.editorial-page .llm-temperature {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--llm-muted);
  font-size: 10px;
  font-weight: 700;
}

body.editorial-page .llm-temperature input { width: 100px; accent-color: var(--llm-accent); }
body.editorial-page .llm-temperature output { min-width: 22px; color: var(--llm-accent); }

body.editorial-page .llm-hint {
  margin: 10px 0 0;
  color: var(--llm-muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 900px) {
  body.editorial-page .llm-demo-intro,
  body.editorial-page .llm-demo-grid { grid-template-columns: 1fr; }
  body.editorial-page .llm-pipeline { grid-template-columns: 1fr; }
  body.editorial-page .llm-pipeline > b { justify-self: center; transform: rotate(90deg); }
  body.editorial-page .llm-mode { margin-left: 0; }
}

@media (max-width: 620px) {
  body.editorial-page .llm-demo-section { padding: 62px 0; }
  body.editorial-page .llm-demo { padding: 14px; border-radius: 13px; }
  body.editorial-page .llm-panel { padding: 14px; }
  body.editorial-page .llm-context { min-height: 100px; font-size: 17px; }
  body.editorial-page .llm-controls { align-items: stretch; flex-direction: column; }
  body.editorial-page .llm-btn { width: 100%; }
  body.editorial-page .llm-mode { width: 100%; }
  body.editorial-page .llm-mode button { flex: 1; }
  body.editorial-page .llm-temperature { justify-content: space-between; }
  body.editorial-page .llm-temperature input { flex: 1; }
}
