/* ==========================================================
   IA + CIA · Estilos principales
   Proyecto estático listo para Hostinger
   ========================================================== */

:root {
  --bg: #08111f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.92);
  --card-dark: rgba(13, 26, 46, 0.92);
  --text: #edf5ff;
  --muted: #aebfd4;
  --ink: #122033;
  --ink-soft: #526174;
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --secondary: #22c55e;
  --accent: #f59e0b;
  --danger: #ef4444;
  --purple: #a855f7;
  --border: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(59, 130, 246, 0.25), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(168, 85, 247, 0.22), transparent 26%),
    linear-gradient(135deg, #07111f 0%, #0c172a 45%, #101c34 100%);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 92%);
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.42;
  pointer-events: none;
  z-index: -2;
  animation: float 9s ease-in-out infinite;
}

.orb-a {
  left: -150px;
  top: 160px;
  background: #3b82f6;
}

.orb-b {
  right: -180px;
  top: 520px;
  background: #22c55e;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-28px); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  background: rgba(8, 17, 31, 0.78);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  min-width: 230px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.35);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topnav a {
  color: #d7e6f8;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: 180ms ease;
}

.topnav a:hover,
.topnav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 26px auto 0;
}

.section-card {
  margin: 28px 0;
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 28px;
}

.eyebrow,
.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bbf7d0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.77rem;
}

.section-heading h2,
.hero h1 {
  margin: 10px 0 12px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading p,
.hero-lead {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: clamp(26px, 4vw, 48px);
  min-height: calc(100vh - 128px);
  overflow: hidden;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(2.6rem, 6vw, 5.7rem);
}

.chat-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
  box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.13);
}

.assistant-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 26px 0;
  border-radius: 28px;
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  box-shadow: 0 24px 50px rgba(59, 130, 246, 0.28);
}

.assistant-mark strong {
  font-size: 1.5rem;
}

.pulse-ring {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 34px;
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.22); opacity: 0; }
}

.chat-prompts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.prompt-card {
  text-align: left;
  color: var(--text);
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
  transition: 180ms ease;
}

.prompt-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.14);
}

.prompt-card span {
  font-size: 1.55rem;
}

.prompt-card strong,
.prompt-card small {
  display: block;
  margin-top: 8px;
}

.prompt-card small {
  color: var(--muted);
  line-height: 1.45;
}

.fake-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 760px;
  margin-top: 20px;
  padding: 14px 14px 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 24px;
  color: #c7d7ea;
  background: rgba(255, 255, 255, 0.1);
}

.fake-input button,
.send-button {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.34);
}

.hero-visual {
  display: grid;
  gap: 20px;
}

.orbit-diagram {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  border: 1px solid var(--border);
  border-radius: 36px;
  background:
    radial-gradient(circle at center, rgba(59, 130, 246, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.orbit-diagram::before,
.orbit-diagram::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.orbit-diagram::before {
  width: 310px;
  height: 310px;
}

.orbit-diagram::after {
  width: 220px;
  height: 220px;
}

.orbit-center {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #3b82f6);
  font-size: 1.8rem;
  font-weight: 900;
  box-shadow: 0 24px 50px rgba(34, 197, 94, 0.26);
}

.node {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 800;
}

.node-1 { top: 48px; left: 50%; transform: translateX(-50%); }
.node-2 { right: 32px; top: 50%; transform: translateY(-50%); }
.node-3 { bottom: 52px; left: 50%; transform: translateX(-50%); }
.node-4 { left: 32px; top: 50%; transform: translateY(-50%); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-stats article {
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.09);
}

.hero-stats strong {
  display: block;
  font-size: 2rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.86rem;
}

.tabs,
.tool-filters,
.workshop-actions,
.wizard-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button,
.filter,
.secondary,
.primary {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 800;
  transition: 180ms ease;
}

.tab-button,
.filter,
.secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tab-button.active,
.filter.active,
.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.28);
}

.tab-panels {
  margin-top: 18px;
}

.tab-panel {
  display: none;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
}

.tab-panel.active {
  display: block;
  animation: fadeUp 260ms ease;
}

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

.slide-grid,
.diagnostic-layout,
.connector-layout,
.activity-builder,
.bridge-graphic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  gap: 24px;
  align-items: stretch;
}

.slide-number {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  font-weight: 900;
}

.slide-grid h3,
.tab-panel h3 {
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  margin: 16px 0 12px;
}

.tab-panel p,
.tab-panel li {
  color: #d6e3f4;
  line-height: 1.65;
}

.infographic-card,
.agreement-card,
.connector-panel,
.connector-result,
.builder-form,
.activity-output,
.diagnostic-preview,
.wizard,
.bridge-side,
.visual-timeline article,
.tool-card,
.workshop-grid label {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.14);
}

.infographic-card {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.donut {
  --p: calc(var(--value) * 1%);
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: conic-gradient(var(--secondary) var(--p), rgba(255,255,255,.16) 0);
}

.donut span {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: #101c34;
  font-size: 2rem;
  font-weight: 900;
}

.use-flow,
.risk-dashboard,
.timeline-compact,
.visual-timeline,
.tools-grid,
.workshop-grid {
  display: grid;
  gap: 16px;
}

.use-flow {
  grid-template-columns: repeat(4, 1fr);
}

.use-flow div,
.risk-dashboard article,
.timeline-compact article {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.use-flow span,
.timeline-dot {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  font-weight: 900;
}

.panel-note {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
}

.risk-dashboard {
  grid-template-columns: repeat(4, 1fr);
}

.risk-dashboard span {
  font-size: 2rem;
}

.timeline-compact,
.visual-timeline {
  grid-template-columns: repeat(3, 1fr);
}

.timeline-compact article span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  font-weight: 900;
}

.agreement-card {
  padding: 26px;
}

.agreement-card ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

.wizard,
.connector-panel,
.builder-form {
  padding: 24px;
}

.progress-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.progress-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
}

.progress-bar span {
  display: block;
  width: 14.28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transition: 240ms ease;
}

.step {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
}

.step.active {
  display: block;
  animation: fadeUp 240ms ease;
}

legend {
  margin-bottom: 18px;
  font-size: 1.35rem;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  border: 1px solid rgba(12, 25, 42, 0.12);
  border-radius: 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

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

.option-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.option-grid label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: 180ms ease;
}

.option-grid label:hover {
  background: rgba(255, 255, 255, 0.15);
}

.option-grid input {
  width: auto;
  accent-color: var(--primary);
}

.wizard-actions {
  margin-top: 22px;
}

.hidden {
  display: none !important;
}

.full {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.diagnostic-preview {
  padding: 24px;
}

.preview-flow {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.preview-flow div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
}

.preview-flow span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary);
  font-weight: 900;
}

.recommendations {
  margin-top: 26px;
}

.recommendation-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(34, 197, 94, 0.12);
}

.recommendation-head p {
  margin: 6px 0 0;
  color: #d8eadf;
}

.reco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.reco-card {
  padding: 20px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.reco-card .tool-icon {
  font-size: 2rem;
}

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

.reco-card p,
.reco-card li {
  color: var(--ink-soft);
  line-height: 1.55;
}

.reco-card ul {
  padding-left: 18px;
}

.bridge-graphic {
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.6fr) minmax(0, 0.9fr);
  align-items: center;
}

.bridge-side {
  padding: 26px;
}

.big-icon {
  font-size: 3rem;
}

.bridge-side h3 {
  font-size: 1.4rem;
  margin: 12px 0;
}

.bridge-side p,
.bridge-side li {
  color: #d7e6f8;
  line-height: 1.55;
}

.bridge-center {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 260px;
}

.bridge-line {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--purple));
  box-shadow: 0 0 34px rgba(59, 130, 246, 0.35);
}

.bridge-pill {
  z-index: 2;
  padding: 18px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.bridge-steps {
  position: absolute;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.bridge-steps span,
.program-cloud span,
.tag {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #e6f0ff;
  font-size: 0.84rem;
  font-weight: 800;
}

.program-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.visual-timeline {
  margin-top: 24px;
}

.visual-timeline article {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.visual-timeline article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.visual-timeline h3 {
  margin: 14px 0 8px;
}

.visual-timeline p {
  color: #d6e3f4;
  line-height: 1.58;
}

.connector-layout,
.activity-builder {
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
}

.connector-panel label,
.builder-form label,
.workshop-grid label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #e7f0fb;
  font-weight: 800;
}

.connector-result,
.activity-output {
  min-height: 420px;
  padding: 24px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 300px;
  text-align: center;
  color: var(--muted);
}

.empty-state span {
  font-size: 3rem;
}

.output-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.93);
  color: var(--ink);
}

.output-card + .output-card {
  margin-top: 14px;
}

.output-card p,
.output-card li {
  color: var(--ink-soft);
  line-height: 1.55;
}

.output-card h3,
.output-card h4 {
  color: var(--ink);
}

.prompt-box {
  padding: 14px;
  border-radius: 16px;
  background: #edf5ff;
  color: #1e3a5f;
  border-left: 4px solid var(--primary);
  white-space: pre-wrap;
}

.tools-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.tool-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  transition: 180ms ease;
}

.tool-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.13);
}

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

.tool-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.7rem;
}

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

.tool-card p,
.tool-card li {
  color: #d7e6f8;
  line-height: 1.55;
}

.tool-card ul {
  padding-left: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

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

.workshop-grid label {
  padding: 18px;
}

.workshop-actions {
  margin-top: 16px;
}

.footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 40px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.footer-small {
  font-size: 0.86rem;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.back-to-top.show {
  display: grid;
  place-items: center;
}

@media (max-width: 1080px) {
  .topnav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-width: 260px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(8, 17, 31, 0.96);
  }

  .topnav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero,
  .slide-grid,
  .diagnostic-layout,
  .connector-layout,
  .activity-builder,
  .bridge-graphic {
    grid-template-columns: 1fr;
  }

  .use-flow,
  .risk-dashboard,
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bridge-line {
    left: 20%;
    right: 20%;
    transform: rotate(90deg);
  }
}

@media (max-width: 720px) {
  main,
  .topbar,
  .footer {
    width: min(100% - 20px, var(--max));
  }

  .topbar {
    border-radius: 22px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .chat-prompts,
  .option-grid,
  .option-grid.three,
  .use-flow,
  .risk-dashboard,
  .timeline-compact,
  .visual-timeline,
  .tools-grid,
  .workshop-grid,
  .hero-stats,
  .reco-grid {
    grid-template-columns: 1fr;
  }

  .orbit-diagram {
    min-height: 330px;
  }

  .orbit-diagram::before {
    width: 250px;
    height: 250px;
  }

  .orbit-diagram::after {
    width: 170px;
    height: 170px;
  }

  .node {
    font-size: 0.78rem;
  }

  .fake-input {
    align-items: stretch;
  }

  .fake-input span {
    font-size: 0.9rem;
  }

  .recommendation-head {
    grid-template-columns: 1fr;
  }
}


/* =============================================================
   Sección ChatGPT guiado y encuesta IA
   ============================================================= */
.integration-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.9fr;
  gap: 1rem;
}

.integration-card,
.survey-card,
.survey-results {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  padding: 1.35rem;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.strong-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(79, 70, 229, 0.92));
  color: #ffffff;
}

.alert-card {
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.98), rgba(254, 226, 226, 0.9));
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.12);
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
}

.strong-card .card-icon {
  background: rgba(255, 255, 255, 0.16);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.link-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prompt-box {
  white-space: pre-wrap;
  font-family: inherit;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 18px;
  padding: 1rem;
  line-height: 1.55;
  max-height: 260px;
  overflow: auto;
}

.copy-status,
.muted {
  color: #64748b;
}

.survey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.survey-questions {
  display: grid;
  gap: 1rem;
}

.survey-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.survey-options button {
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.survey-options button:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-2px);
}

.survey-results {
  position: sticky;
  top: 92px;
  background: #0f172a;
  color: #ffffff;
}

.analysis-grid {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.analysis-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.9rem;
}

.analysis-item strong {
  display: block;
  color: #bfdbfe;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.analysis-item span {
  font-weight: 900;
}

.chart-box {
  display: grid;
  gap: 0.55rem;
}

.chart-box h4 {
  margin: 0.9rem 0 0.25rem;
  color: #e0f2fe;
}

.mini-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.18rem;
}

.mini-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mini-bar-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}

.recommendation-box {
  margin-top: 1rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.34);
  border-radius: 18px;
  padding: 0.95rem;
}

.recommendation-box p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .integration-grid,
  .survey-layout {
    grid-template-columns: 1fr;
  }

  .survey-results {
    position: static;
  }
}


.api-card textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 18px;
  padding: 0.9rem;
  resize: vertical;
  min-height: 120px;
  margin: 0.75rem 0;
  font: inherit;
}

.api-answer {
  margin-top: 0.85rem;
  background: #f8fafc;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 18px;
  padding: 1rem;
  color: #0f172a;
  line-height: 1.55;
  max-height: 320px;
  overflow: auto;
}

/* Estado técnico del chat integrado */
.api-status {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  font-size: 0.92rem;
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.api-status[data-type="ok"] {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.28);
}

.api-status[data-type="warning"] {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.32);
}

.api-status[data-type="error"] {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.28);
}

.stacked-mobile {
  flex-wrap: wrap;
}
