:root {
  /* Estacio: visual theme only. Existing selectors and behavior are preserved. */
  --estacio-turquoise: #2bc7c3;
  --estacio-mint: #91faf3;
  --estacio-navy: #0c1830;
  --page-purple: #0c1830;
  --page-purple-dark: #081323;
  --page-purple-light: #123f49;
  --card-white: #ffffff;
  --brand-blue: #00757a;
  --brand-blue-dark: #005d63;
  --brand-blue-soft: #526c77;
  --ink: #0c1830;
  --muted: #526574;
  --border: #d1e4e6;
  --soft-background: #f2faf9;
  --danger: #9f1239;
  --success: #166534;
  --inaesp-blue: #006c76;
  --inaesp-blue-strong: #0c1830;
  --inaesp-yellow: #2bc7c3;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(ellipse at 4% 0%, rgba(43, 199, 195, 0.22), transparent 55%),
    linear-gradient(135deg, var(--page-purple-dark) 0%, var(--page-purple) 55%, var(--page-purple-light) 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.page-frame {
  min-height: 100vh;
}

.public-main {
  width: 100%;
}

.public-hero {
  width: min(1280px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  align-items: center;
  gap: clamp(56px, 7vw, 108px);
}

.public-hero__brand {
  color: #fff;
  transform: translateY(-8px);
}

.public-hero__eyebrow,
.search-card__eyebrow {
  margin: 0;
  color: #91faf3;
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1.3;
  text-transform: uppercase;
}

.public-hero__eyebrow {
  margin-left: 0;
  margin-bottom: 24px;
}

.public-hero__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
}

.inaesp-signature {
  flex: 0 0 auto;
  width: clamp(240px, 25vw, 330px);
  max-width: 100%;
}

.inaesp-signature img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(4, 16, 31, 0.16));
}

.public-hero__title {
  display: flex;
  flex-direction: column;
  color: #fff;
  font-size: clamp(3rem, 5.5vw, 5.15rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.98;
  white-space: nowrap;
}

.public-hero__title strong {
  color: var(--estacio-turquoise);
  margin-top: 0.08em;
  font-weight: 750;
}

.search-card {
  width: 100%;
  max-width: 590px;
  justify-self: end;
  padding: clamp(40px, 4.2vw, 62px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  background: var(--card-white);
  box-shadow:
    0 32px 70px rgba(4, 16, 31, 0.2),
    0 4px 15px rgba(4, 16, 31, 0.08);
}

.search-card__header {
  margin-bottom: 36px;
}

.search-card__eyebrow {
  color: var(--brand-blue);
  letter-spacing: 0.13em;
}

.search-card h1 {
  margin: 24px 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 450;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.search-card__description {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.55;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-field-group label {
  color: #203746;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.45;
}

.search-field-group input {
  width: 100%;
  height: 64px;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.search-field-group input:hover {
  border-color: #8cbbc0;
}

.search-field-group input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(0, 117, 122, 0.13);
}

.captcha-simulation {
  width: 100%;
  min-height: 78px;
  border: 1px solid #d3e1e3;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 1px 4px rgba(12, 24, 48, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px 12px 18px;
}

.captcha-simulation__check {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #2d2d35;
  font-size: 0.94rem;
  font-weight: 500;
}

.captcha-simulation__check input {
  width: 27px;
  height: 27px;
  margin: 0;
  accent-color: var(--brand-blue);
  cursor: pointer;
}

.captcha-simulation__mark {
  width: 66px;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0;
  color: #00757a;
  font-size: 0.47rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.captcha-simulation__mark svg {
  width: 34px;
  height: 34px;
}

.captcha-simulation__mark small {
  color: #838383;
  font-size: 0.43rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: lowercase;
}

.consult-button {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 13px;
  padding: 14px 24px;
  color: var(--estacio-navy);
  background: var(--estacio-turquoise);
  box-shadow: 0 10px 22px rgba(0, 117, 122, 0.18);
  font-size: 1.08rem;
  font-weight: 800;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    filter 150ms ease;
}

.consult-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(0, 117, 122, 0.31);
  background: #55ded7;
  filter: none;
}

.consult-button:active {
  transform: translateY(0);
}

.consult-button:focus-visible {
  outline: 3px solid rgba(0, 117, 122, 0.3);
  outline-offset: 3px;
}

.feedback {
  margin: 18px 0 0;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.45;
}

.feedback[data-kind="error"] {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

.feedback[data-kind="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--success);
}

.search-card__notice {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid #dceaea;
  color: var(--brand-blue-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.search-card__notice strong {
  font-weight: 500;
}

.results-section,
.details-section {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto 54px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(4, 16, 31, 0.22);
  scroll-margin-top: 24px;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 14px;
}

.section-heading-row h2 {
  margin: 0;
  color: #334155;
  font-size: 1rem;
  font-weight: 750;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--brand-blue-dark);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.results-table-wrap {
  border: 1px solid #cbdfe1;
  border-radius: 10px 10px 0 0;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.results-table thead {
  background: #e4f4f3;
  color: var(--inaesp-blue);
  text-align: left;
}

.results-table th,
.results-table td {
  border-right: 1px solid #cbdfe1;
  border-bottom: 1px solid #cbdfe1;
  padding: 0.78rem 0.82rem;
  vertical-align: middle;
}

.results-table th:last-child,
.results-table td:last-child {
  border-right: 0;
}

.results-table tbody tr:nth-child(odd) {
  background: #fff;
}

.results-table tbody tr:nth-child(even) {
  background: #f2faf9;
}

.results-table tbody tr:hover {
  background: #e0f9f6;
}

.results-table__action {
  width: 46px;
  text-align: center;
}

.open-detail-button {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 50%;
  background: var(--inaesp-yellow);
  color: #0c1830;
}

.open-detail-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.pagination {
  min-height: 2.55rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid #cbdfe1;
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.pagination button {
  min-width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--inaesp-blue);
  font-weight: 700;
  font-size: 0.8rem;
}

.pagination button[aria-current="page"] {
  border-color: #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #1e293b;
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.details-titlebar {
  min-height: 3.15rem;
  padding: 0.65rem 1rem;
  border-radius: 10px 10px 0 0;
  background: var(--inaesp-blue-strong);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.details-titlebar h2 {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
}

.details-titlebar button {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  color: var(--estacio-mint);
}

.details-titlebar button:hover,
.details-titlebar button:focus-visible {
  color: #fff;
  outline: none;
}

.details-pattern {
  padding: 1.3rem;
  border-radius: 0 0 10px 10px;
  background-color: #eef8f7;
  background-image:
    radial-gradient(circle at 15px 15px, rgba(0, 117, 122, 0.07) 0 2px, transparent 2.5px),
    linear-gradient(45deg, transparent 47%, rgba(0, 117, 122, 0.04) 48% 52%, transparent 53%);
  background-size: 30px 30px, 45px 45px;
}

.details-card {
  border: 3px double #bcd9da;
  background: rgba(255, 255, 255, 0.97);
  padding: clamp(1.35rem, 4vw, 2.1rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 6vw, 4.5rem);
  box-shadow: inset 0 0 0 1px #e4f2f1;
}

.details-column {
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
}

.detail-item {
  position: relative;
  padding-left: 0.9rem;
}

.detail-item::before {
  content: "⌄";
  position: absolute;
  left: 0;
  top: -0.1rem;
  color: #a3a3a3;
  font-size: 0.8rem;
}

.detail-item span {
  display: block;
  color: #586c77;
  font-size: 0.78rem;
  line-height: 1.35;
}

.detail-item strong {
  display: block;
  margin-top: 0.25rem;
  color: #006c76;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1060px) {
  .public-hero {
    width: min(760px, calc(100% - 40px));
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 46px;
    padding: 68px 0;
  }

  .public-hero__identity {
    align-items: center;
  }

  .public-hero__title {
    text-align: center;
  }

  .public-hero__brand {
    justify-self: center;
    transform: none;
  }

  .public-hero__eyebrow {
    margin-left: 0;
    text-align: center;
  }

  .search-card {
    max-width: 620px;
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .public-hero {
    width: min(100% - 28px, 620px);
    gap: 34px;
    padding: 40px 0;
  }

  .public-hero__eyebrow {
    margin-bottom: 18px;
    font-size: 0.74rem;
  }

  .public-hero__identity {
    justify-content: center;
    gap: 20px;
  }

  .inaesp-signature {
    width: 220px;
  }

  .public-hero__title {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
    white-space: normal;
  }

  .search-card {
    padding: 30px 24px;
    border-radius: 22px;
  }

  .search-card__header {
    margin-bottom: 28px;
  }

  .search-card__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.105em;
  }

  .search-card h1 {
    margin-top: 18px;
    font-size: 2rem;
  }

  .search-form {
    gap: 20px;
  }

  .search-field-group label {
    font-size: 0.9rem;
  }

  .search-field-group input,
  .consult-button {
    min-height: 58px;
    height: 58px;
  }

  .captcha-simulation {
    min-height: 74px;
  }

  .results-section,
  .details-section {
    width: calc(100% - 28px);
    padding: 14px;
    border-radius: 16px;
  }

  .results-table {
    min-width: 520px;
  }

  .details-pattern {
    padding: 0.7rem;
  }

  .details-card {
    grid-template-columns: 1fr;
    gap: 1.45rem;
  }
}

@media (max-width: 440px) {
  .public-hero__identity {
    align-items: center;
  }

  .inaesp-signature {
    width: 192px;
  }

  .public-hero__title {
    font-size: 2.2rem;
  }

  .search-card {
    padding: 27px 20px;
  }

  .captcha-simulation {
    padding-left: 13px;
  }

  .captcha-simulation__check {
    gap: 9px;
    font-size: 0.86rem;
  }
}

/* Visible keyboard focus and reduced motion are presentation-only. */
.text-action:focus-visible,
.open-detail-button:focus-visible,
.pagination button:focus-visible,
.details-titlebar button:focus-visible {
  outline: 3px solid var(--estacio-turquoise);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
