@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap");

:root {
  color-scheme: light;
  --background: #e9edef;
  --ink: #283137;
  --muted: #626d74;
  --line: #bcc7cd;
  --surface: #f2f5f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 82% 4%, #fff 0, transparent 46%), var(--background);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #507582;
  outline-offset: 5px;
}
.shell { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-block: 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(145deg, #fff, #dce1e4);
  box-shadow: 5px 6px 12px #c8cfd5, -5px -5px 12px #fff;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-size: 19px; font-weight: 650; letter-spacing: -.6px; }
.brand-name span { font-weight: 450; color: var(--muted); }
.topbar-link {
  display: inline-flex; align-items: center; gap: 20px;
  font-size: 12px; text-decoration: none; color: var(--muted);
}
.topbar-link svg { width: 16px; height: 16px; }
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr;
  align-items: center; gap: 28px; min-height: 360px; padding-block: 18px 44px;
}
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.hero h1 {
  margin: 20px 0 20px; font-size: clamp(40px, 4.8vw, 62px);
  font-weight: 450; line-height: 1.08; letter-spacing: -3px;
}
.hero h1 span { color: #727d84; }
.subhead { max-width: 415px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.85; }
.hero-notes { display: flex; align-items: center; gap: 16px; margin-top: 24px; color: #647078; font-size: 11px; }
.hero-notes span { display: inline-flex; align-items: center; gap: 6px; }
.hero-notes svg { width: 13px; height: 13px; }
.hero-notes i { height: 12px; width: 1px; background: #c7d0d5; }
.sculpture { position: relative; height: 332px; max-width: 480px; width: 100%; justify-self: end; }
.disc {
  position: absolute; border-radius: 50%;
  background: linear-gradient(140deg, #d0d8dc 3%, #e7ecee 45%, #fafcfc 90%);
  border: 1px solid #ffffff80;
  box-shadow: -14px 19px 22px #77858e40, -3px 4px 6px #64747c24, inset -2px -2px 4px #ffffffd9;
}
.disc-main { width: 246px; height: 246px; left: 92px; top: 62px; z-index: 2; display: grid; place-items: center; }
.disc-label { text-align: center; color: #626c73; }
.disc-label strong { display: block; font-size: 14px; font-weight: 450; letter-spacing: 6px; padding-left: 6px; }
.disc-label span { display: block; margin-top: 10px; font-size: 6px; letter-spacing: 3px; }
.disc-back { width: 149px; height: 149px; left: 108px; top: 206px; }
.disc-top { width: 150px; height: 150px; right: 28px; top: 2px; z-index: 3; }
.disc-left { width: 66px; height: 66px; left: 60px; top: 70px; z-index: 3; }
.disc-right { width: 72px; height: 72px; right: 0; top: 174px; z-index: 3; }
.disc-small-a { width: 34px; height: 34px; left: 24px; top: 152px; }
.disc-small-b { width: 26px; height: 26px; right: 37px; top: 286px; }
.disc-small-c { width: 22px; height: 22px; left: 176px; top: 13px; }
.disc-small-d { width: 42px; height: 42px; right: 94px; top: 287px; z-index: 4; }
.disc-small-e { width: 23px; height: 23px; right: 5px; top: 28px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0; }
.workspace-heading h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.workspace-heading p { margin: 0; font-size: 11px; color: var(--muted); }
.layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; scroll-margin-top: 24px; }
.panel {
  min-width: 0; padding: 28px; border-radius: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.panel-head { display: flex; align-items: flex-start; gap: 13px; }
.step {
  flex-shrink: 0; display: grid; place-items: center; width: 35px; height: 35px;
  border-radius: 50%; background: #eef2f3; border: 1px solid var(--line);
  color: #64727a; font-size: 10px;
}
.panel-head h3 { margin: 0 0 6px; font-size: 19px; font-weight: 550; letter-spacing: -.5px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.form { display: grid; gap: 20px; margin-top: 26px; }
label { display: grid; gap: 9px; font-size: 12px; font-weight: 600; color: #4e5c64; }
.label-note { font-size: 10px; font-weight: 400; color: var(--muted); }
input, textarea, select {
  width: 100%; min-width: 0; padding: 13px 15px; border: 1px solid var(--line);
  border-radius: 12px; background: #e9eef0; color: var(--ink);
  outline: none; font-size: 14px; font-weight: 400;
  transition: border-color .18s;
}
input::placeholder, textarea::placeholder { color: #77828a; opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: #6a8794; outline: 2px solid #6a8794; outline-offset: 2px; }
textarea { min-height: 98px; resize: vertical; line-height: 1.6; }
select { min-height: 44px; cursor: pointer; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: -10px; }
.topic {
  border: 1px solid #d4dde1; border-radius: 20px; background: transparent;
  min-height: 30px; padding: 6px 11px; color: #626f77; font-size: 11px;
  transition: background .18s, border-color .18s;
}
.topic:hover { background: #fff9; border-color: #9bafb9; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
details { border: 1px solid var(--line); border-radius: 12px; padding-inline: 14px; }
summary {
  cursor: pointer; list-style: none; padding-block: 15px; font-size: 11px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 16px; font-weight: 400; }
details[open] summary::after { content: "−"; }
.advanced-fields { display: grid; gap: 16px; padding-bottom: 16px; }
.advanced-fields p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.primary {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 47px; padding: 13px 18px; border: 1px solid #47545d; border-radius: 13px;
  background: #35434c; color: #fff;
  font-size: 12px; font-weight: 550; letter-spacing: .2px;
  transition: background .18s, border-color .18s;
}
.primary svg { width: 15px; height: 15px; }
.primary:hover:not(:disabled) { background: #465964; border-color: #465964; }
.primary:disabled { opacity: .55; cursor: wait; }
.form[aria-busy="true"] .primary svg { display: none; }
.form[aria-busy="true"] .primary::after { content: ""; width: 14px; height: 14px; border: 2px solid #ffffff50; border-top-color: #fff; border-radius: 50%; animation: spin .9s linear infinite; }
.status { display: flex; justify-content: center; gap: 7px; margin: -5px 0 0; font-size: 10px; color: var(--muted); text-align: center; line-height: 1.6; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #71858a; margin-top: 5px; flex-shrink: 0; }
.answer { margin-top: 24px; padding: 23px; border-radius: 17px; background: #eaf0f2a8; border: 1px solid var(--line); color: #3e4b53; line-height: 1.85; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer.empty { display: grid; place-items: center; min-height: 275px; text-align: center; white-space: normal; color: var(--muted); }
.empty-content { max-width: 270px; }
.empty-orbit { width: 88px; height: 88px; position: relative; margin: 0 auto 26px; }
.empty-orbit::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: linear-gradient(140deg, #d8e0e4, #fafcfd); }
.empty-orbit::after { content: ""; position: absolute; width: 27px; height: 27px; top: 4px; right: 0; border-radius: 50%; background: linear-gradient(140deg, #dde4e7, #fff); }
.empty-content h4 { font-size: 15px; font-weight: 500; color: #4a5962; margin: 0 0 10px; letter-spacing: -.2px; }
.empty-content p { font-size: 11px; line-height: 1.8; margin: 0; }
.answer.empty:empty::after { content: "Buscando el contexto de tu pregunta…"; font-size: 12px; }
.sources-heading { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 21px; }
.sources-heading h4 { margin: 0; font-weight: 550; font-size: 12px; }
.source-count { margin: 0; font-size: 10px; color: #60717b; padding: 5px 9px; border-radius: 20px; background: #e1e8eb; }
.articles { display: grid; gap: 12px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; counter-reset: source; }
.articles:empty::after { content: "Los artículos consultados aparecerán aquí."; font-size: 11px; color: var(--muted); padding: 12px 0 4px; }
.article { position: relative; border: 1px solid var(--line); background: #f6f8f9b8; border-radius: 14px; padding: 16px 18px 16px 47px; overflow-wrap: anywhere; counter-increment: source; }
.article::before { content: counter(source, decimal-leading-zero); position: absolute; top: 19px; left: 16px; font-size: 10px; color: #798990; }
.article h4 { font-size: 14px; font-weight: 550; line-height: 1.6; margin: 0 0 7px; }
.article p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.article a { font-size: 12px; font-weight: 600; color: #466574; text-underline-offset: 3px; }
.article a::after { content: " ↗"; }
.result-note { margin: 18px 0 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
.footer { display: flex; justify-content: space-between; align-items: center; padding-block: 32px 35px; color: #6f7d85; font-size: 10px; }
.footer p { margin: 0; }
.footer span { letter-spacing: 2px; font-size: 9px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1440px) { .hero { min-height: 395px; } }
@media (max-width: 1000px) {
  .shell { width: calc(100% - 56px); }
  .hero h1 { font-size: 47px; letter-spacing: -2px; }
  .sculpture { transform: scale(.85); transform-origin: right center; }
  .layout { gap: 20px; grid-template-columns: 1fr 1.1fr; }
  .panel { padding: 23px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .topbar { padding-block: 24px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 28px 30px; }
  .hero h1 { max-width: 530px; font-size: clamp(40px, 7vw, 52px); }
  .sculpture { display: none; }
  .hero-notes { margin-top: 20px; }
  .layout { grid-template-columns: 1fr; }
  .workspace-heading { margin-top: 10px; }
  .workspace-heading p { display: none; }
  .panel { padding: 25px; }
  .answer.empty { min-height: 245px; }
}
@media (max-width: 400px) {
  .shell { width: calc(100% - 28px); }
  .panel { padding: 20px; }
  .topbar-link { gap: 8px; }
  .hero h1 { font-size: 39px; letter-spacing: -2px; }
  .row { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
