:root {
  --blue-950: #00274d;
  --blue-900: #003366;
  --blue-800: #00447d;
  --blue-700: #0759a6;
  --blue-100: #eaf2fb;
  --blue-50: #f4f8fd;
  --gold: #c4a35a;
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #172235;
  --muted: #66768a;
  --line: #d7e1ec;
  --line-strong: #c4d2e0;
  --ok: #1d7a46;
  --ok-bg: #eef9f2;
  --err: #a22b2b;
  --err-bg: #fff1f1;
  --warn: #8a6500;
  --warn-bg: #fff8df;
  --shadow: 0 24px 60px rgba(0, 39, 77, 0.14);
  --shadow-soft: 0 10px 30px rgba(0, 39, 77, 0.08);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 16%, rgba(7, 89, 166, 0.10), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(196, 163, 90, 0.10), transparent 24rem),
    var(--bg);
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 285px;
  padding: 2.2rem 1.25rem 5.4rem;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(0, 39, 77, 0.98), rgba(0, 73, 145, 0.92)),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.12), transparent 22rem);
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
}

.hero::before {
  width: 34rem;
  height: 34rem;
  right: -13rem;
  top: -18rem;
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 0 0 3rem rgba(255,255,255,.025), 0 0 0 7rem rgba(255,255,255,.018);
}

.hero::after {
  width: 24rem;
  height: 24rem;
  left: -10rem;
  bottom: -16rem;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 68%);
}

.hero__content {
  width: min(1040px, 100%);
  margin: 0 auto;
  text-align: center;
}

.logo {
  display: block;
  width: min(255px, 72vw);
  height: auto;
  margin: 0 auto 1.1rem;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.22));
}

h1 {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lede {
  max-width: 760px;
  margin: 0.85rem auto 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(.98rem, 2vw, 1.08rem);
  line-height: 1.55;
}

.page-shell {
  width: min(1080px, calc(100% - 2rem));
  margin: -4.2rem auto 0;
  padding-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.form-card {
  overflow: hidden;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(197, 211, 225, 0.85);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.form-section { padding: 2rem 2.2rem 2.15rem; }
.form-section--bordered { border-top: 1px solid #e7edf4; }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: 1.45rem;
}

.step-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--blue-700), var(--blue-900));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 51, 102, .20);
}

.section-heading h2 {
  margin: .1rem 0 0;
  color: var(--blue-900);
  font-size: 1.18rem;
  line-height: 1.2;
}

.section-heading p {
  margin: .3rem 0 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.35rem;
}

.field-grid--top { align-items: start; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }

label,
.field-label {
  display: block;
  margin: 0 0 .38rem;
  color: #14243a;
  font-size: .94rem;
  font-weight: 650;
}

.hint {
  display: block;
  margin: -.18rem 0 .45rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.35;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: .78rem .9rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #fbfdff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input::placeholder,
textarea::placeholder { color: #8a97a7; }

textarea {
  min-height: 92px;
  resize: vertical;
}

select {
  appearance: auto;
  cursor: pointer;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--blue-700);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(7, 89, 166, 0.12);
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.input-shell input { padding-left: 3.15rem; }

.input-badge {
  position: absolute;
  left: .78rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #a6ce39;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.03em;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  padding: .3rem;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #f7faff;
}

.segmented__option { margin: 0; cursor: pointer; }
.segmented__option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__option span {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 38px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 700;
  transition: .18s ease;
}
.segmented__option input:checked + span {
  color: var(--blue-900);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 51, 102, .10);
}
.segmented__option input:focus-visible + span {
  outline: 3px solid rgba(7,89,166,.18);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

.actions--validation { margin-top: 1rem; }

button {
  appearance: none;
  border: 0;
  border-radius: 11px;
  padding: .8rem 1.12rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, opacity .14s ease;
}

button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .48; cursor: not-allowed; }

.button-icon { margin-right: .35rem; font-weight: 700; }

.secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  box-shadow: 0 8px 18px rgba(0, 51, 102, .18);
}

.secondary:hover:not(:disabled) {
  box-shadow: 0 11px 22px rgba(0, 51, 102, .24);
}

.primary {
  min-width: 175px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-900));
  box-shadow: 0 9px 20px rgba(0, 51, 102, .20);
}

.checks {
  list-style: none;
  padding: 0;
  margin: 1.15rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.status-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 74px;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfdff;
  box-shadow: 0 4px 12px rgba(0, 39, 77, .035);
}

.status-card strong,
.status-card small { display: block; }
.status-card strong { color: #24334a; font-size: .86rem; line-height: 1.2; }
.status-card small { margin-top: .17rem; color: var(--muted); font-size: .78rem; line-height: 1.2; }

.status-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  color: #748498;
  background: #edf2f7;
  font-weight: 800;
}

.status-card.yes {
  border-color: #c5e7d1;
  background: var(--ok-bg);
}
.status-card.yes .status-icon { background: #2ca75e; color: #fff; }
.status-card.yes small { color: var(--ok); }

.status-card.no {
  border-color: #f0c7c7;
  background: var(--err-bg);
}
.status-card.no .status-icon { background: #c94a4a; color: #fff; }
.status-card.no small { color: var(--err); }

.status-card.na { color: var(--muted); }

.banner {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 12px;
  font-size: .9rem;
  line-height: 1.45;
}

.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe0cb; }
.err { background: var(--err-bg); color: var(--err); border: 1px solid #efc5c5; }
.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #ead78b; }
.hidden { display: none !important; }

.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.question-card {
  padding: 1.1rem;
  border: 1px solid #dfe7f0;
  border-radius: 14px;
  background: var(--blue-50);
}

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .65rem;
}

.choice label {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--blue-700);
}

.conditional-block {
  margin-top: .95rem;
  padding-top: .9rem;
  border-top: 1px solid #d9e3ee;
}

.declaration-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin: 1.35rem 0 0;
  padding: 1rem 1.05rem;
  border: 1px solid #cbd9e8;
  border-radius: 14px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.declaration-card:hover {
  border-color: #aebfd2;
  background: #f3f8fd;
}

.declaration-card:has(input:checked) {
  border-color: #8eb7e5;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(7,89,166,.06);
}

.declaration-card input {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: .15rem;
}

.declaration-card strong,
.declaration-card small { display: block; }
.declaration-card strong { color: var(--blue-900); font-size: .94rem; }
.declaration-card small { margin-top: .17rem; color: var(--muted); font-size: .84rem; font-weight: 400; line-height: 1.4; }

.submit-area {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid #e5ecf3;
}

.submit-area .banner {
  flex: 1;
  margin: 0;
}

footer {
  max-width: 760px;
  margin: 1rem auto 0;
  text-align: center;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.5;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255,255,255,.95);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -.14em;
  margin-right: .4em;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .hero {
    min-height: 250px;
    padding: 1.6rem 1rem 4.8rem;
  }

  .page-shell {
    width: min(100% - 1rem, 1080px);
    margin-top: -3.6rem;
  }

  .form-card { border-radius: 18px; }
  .form-section { padding: 1.4rem 1.05rem 1.55rem; }
  .field-grid { grid-template-columns: 1fr; gap: 1rem; }
  .field--full { grid-column: auto; }
  .submit-area { align-items: stretch; flex-direction: column; }
  .primary { width: 100%; }
}

@media (max-width: 480px) {
  .checks { grid-template-columns: 1fr; }
  .section-heading p { display: none; }
  .segmented { grid-template-columns: 1fr 1fr; }
}
/* ===== Enriquecimiento de validación / prellenado ===== */
.publication-panel {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid #cfe0f1;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #f1f7fd);
  box-shadow: 0 5px 16px rgba(0, 51, 102, .05);
}

.publication-panel__eyebrow {
  margin-bottom: .35rem;
  color: var(--blue-700);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.publication-panel__title {
  display: block;
  color: var(--blue-950);
  font-size: 1rem;
  line-height: 1.38;
}

.publication-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .65rem;
  margin-top: .6rem;
}

.publication-panel__meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: .25rem .55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d8e4ef;
  color: #42536a;
  font-size: .78rem;
}

.publication-panel__source {
  display: block;
  margin-top: .55rem;
  color: var(--muted);
  font-size: .75rem;
}

.author-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr);
  gap: 1rem 1.25rem;
  align-items: end;
  margin: 0 0 1.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid #d4e1ee;
  border-radius: 14px;
  background: var(--blue-50);
}

.author-selection__copy strong,
.author-selection__copy small {
  display: block;
}

.author-selection__copy strong {
  color: var(--blue-900);
  font-size: .95rem;
}

.author-selection__copy small {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.field-feedback {
  display: block;
  margin-top: .42rem;
  padding-left: .15rem;
  font-size: .78rem;
  line-height: 1.35;
}

.field-feedback.ok { color: var(--ok); background: transparent; border: 0; }
.field-feedback.info { color: var(--blue-700); }
.field-feedback.warn { color: var(--warn); background: transparent; border: 0; }

/* ===== Resultado institucional posterior al envío ===== */
.validation-result {
  margin-top: 1.35rem;
  padding: 1.3rem 1.4rem;
  border-radius: 18px;
  color: #eaf3ff;
  background:
    radial-gradient(circle at 92% 5%, rgba(255,255,255,.08), transparent 16rem),
    linear-gradient(145deg, #071426, #10233a);
  border: 1px solid rgba(130, 174, 220, .28);
  box-shadow: 0 16px 34px rgba(0, 28, 58, .18);
}

.validation-result__heading {
  margin-bottom: .65rem;
}

.validation-result__kicker {
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.validation-result__heading h3 {
  margin: .28rem 0 0;
  color: #fff;
  font-size: 1.05rem;
}

.validation-result__steps {
  list-style: none;
  padding: 0;
  margin: .55rem 0 0;
}

.validation-result__steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: .7rem;
  align-items: start;
  padding: .78rem 0;
  border-bottom: 1px solid rgba(187, 211, 237, .15);
}

.validation-result__number {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9px;
  background: rgba(68, 123, 181, .20);
  color: #cfe6ff;
  font-size: .78rem;
  font-weight: 800;
}

.validation-result__steps strong,
.validation-result__steps small {
  display: block;
}

.validation-result__steps strong {
  color: #fff;
  font-size: .91rem;
}

.validation-result__steps small {
  margin-top: .27rem;
  color: #a9c9eb;
  font-size: .8rem;
  line-height: 1.45;
}

.validation-result__steps .validation-result__warning {
  color: #ffd987;
}

.validation-result__summary {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(82, 163, 236, .40);
  border-radius: 14px;
  background: rgba(18, 66, 106, .45);
}

.validation-result__summary span,
.validation-result__summary strong,
.validation-result__summary small {
  display: block;
}

.validation-result__summary span {
  color: #d7ebff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.validation-result__summary strong {
  margin-top: .35rem;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.2;
}

.validation-result__summary small {
  margin-top: .45rem;
  color: #b7d6f4;
  font-size: .78rem;
}

.validation-result__note {
  margin: .85rem 0 0;
  color: #a9c9eb;
  font-size: .78rem;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .author-selection { grid-template-columns: 1fr; }
  .validation-result { padding: 1.1rem 1rem; border-radius: 15px; }
}

/* Cierre visual 2026-08-25: ORCID aporta evidencia institucional, no confirma la afiliación de la publicación. */
.field-feedback.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid #ead78b;
  border-radius: 8px;
  padding: .5rem .65rem;
}

#resultIdentidad {
  white-space: pre-line;
  line-height: 1.55;
}

/* Identificadores múltiples */
#tipoCodigoPublicacion {
  width: 100%;
  min-height: 46px;
}

/* Identificador válido pero no verificable automáticamente: revisión, no error. */
.status-card.review {
  border-color: #ead78b;
  background: var(--warn-bg);
}
.status-card.review .status-icon {
  background: #b7791f;
  color: #fff;
}
.status-card.review small {
  color: var(--warn);
}


/* ===== Acciones de reinicio del formulario ===== */
.form-card {
  position: relative;
}

.form-top-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid #cdd9e6;
  border-radius: 999px;
  color: var(--blue-800);
  background: rgba(255,255,255,.95);
  box-shadow: 0 5px 14px rgba(0, 51, 102, .08);
  font-size: 1.28rem;
  line-height: 1;
}

.icon-button:hover:not(:disabled),
.icon-button:focus-visible {
  color: var(--blue-950);
  background: var(--blue-50);
  border-color: #aebfd1;
  box-shadow: 0 7px 18px rgba(0, 51, 102, .14);
}

.icon-button:focus-visible {
  outline: 3px solid rgba(7, 89, 166, .18);
  outline-offset: 2px;
}

.icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  width: max-content;
  max-width: 230px;
  padding: .45rem .6rem;
  border-radius: 8px;
  color: #fff;
  background: #10233a;
  box-shadow: 0 8px 22px rgba(0, 28, 58, .18);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  pointer-events: none;
}

.icon-button:hover::after,
.icon-button:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.new-response-area {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e3ebf3;
}

.secondary--outline {
  color: var(--blue-900);
  background: #fff;
  border: 1px solid #b9cadb;
  box-shadow: 0 6px 16px rgba(0, 51, 102, .07);
}

.secondary--outline:hover:not(:disabled) {
  background: var(--blue-50);
  box-shadow: 0 9px 20px rgba(0, 51, 102, .11);
}

@media (max-width: 480px) {
  .form-top-actions {
    top: .75rem;
    right: .75rem;
  }

  .icon-button::after {
    right: -.2rem;
    white-space: normal;
    min-width: 190px;
  }

  .new-response-area .secondary--outline {
    width: 100%;
  }
}
