:root {
  --ink: #193349;
  --muted: #607486;
  --brand: #246fa6;
  --brand-dark: #123f68;
  --accent: #e7b91d;
  --surface: #ffffff;
  --soft: #eaf4fb;
  --line: #d7e8f4;
  --danger: #b42318;
  --success: #16794b;
  --shadow: 0 15px 40px rgba(28, 79, 118, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #eaf4fb 0, #f7fbfe 52rem);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
}
button, input, select { font: inherit; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(102, 158, 203, .97);
  box-shadow: 0 5px 20px rgba(18, 63, 104, .15);
}
.brand { display: flex; align-items: center; gap: 16px; color: #fff; text-decoration: none; }
.brand img { display: block; width: 60px; height: 60px; object-fit: contain; }
.brand span { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.header-link { color: #fff; font-size: .95rem; font-weight: 700; line-height: 1.35; text-align: right; text-decoration: none; }
.header-link:hover { text-decoration: underline; text-underline-offset: 5px; }

main { padding-bottom: 80px; }
.hero {
  padding: 72px 20px 52px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(125deg, rgba(18,63,104,.97), rgba(36,111,166,.91) 58%, rgba(114,168,209,.9)),
    url("https://0d5388820c.clvaw-cdnwnd.com/a7098c99acb125c0ed1d4aefc117851d/200000432-b82f5b82f7/congreso.webp?ph=0d5388820c") center / cover no-repeat;
}
.eyebrow, .step {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font: 800 .78rem/1.3 Arial, Helvetica, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, legend { font-family: Georgia, "Times New Roman", serif; }
h1 { max-width: 920px; margin: 0 auto; font-size: clamp(2rem, 5vw, 3.8rem); line-height: 1.08; letter-spacing: -.035em; }
.hero .eyebrow { color: #cceaff; }
.hero-copy { max-width: 650px; margin: 22px auto 0; color: #e1f1fc; font-size: 1.08rem; }

.form-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 54px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.form-intro { margin-bottom: 28px; }
.form-intro h2, .success-panel h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; }
.form-intro > p:last-child { margin-bottom: 0; color: var(--muted); }

.card { margin: 0 0 20px; padding: 24px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 9px 28px rgba(29, 88, 133, .05); }
.card legend { padding: 0 8px; color: var(--ink); font-size: 1.05rem; font-weight: 700; }
legend span, .field b, .checkbox-field b { color: var(--danger); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field-wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-weight: 600; }
.field input, .field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b8c9ca;
  border-radius: 9px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,111,166,.13); }
.field input:disabled, .field select:disabled { color: #718187; background: #edf1f1; cursor: not-allowed; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field small { color: var(--muted); font-weight: 400; }
.field-error { min-height: 1.1em; margin: 0; color: var(--danger) !important; font-size: .82rem; font-weight: 600 !important; }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.choice { display: flex; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input { margin-top: 5px; accent-color: var(--brand); }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); }

.fee-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px; border-radius: 12px; background: var(--soft); }
.fee-box strong { color: var(--brand-dark); font: 700 1.35rem Georgia, "Times New Roman", serif; }
.alias-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.alias-row code { padding: 10px 14px; color: var(--ink); background: #f1f3f3; border-radius: 8px; font-size: 1.08rem; font-weight: 700; letter-spacing: .08em; }
.copy-button { padding: 9px 13px; color: var(--brand-dark); background: #fff; border: 1px solid var(--brand); border-radius: 8px; cursor: pointer; font-weight: 700; }
.file-control {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid #b8c9ca;
  border-radius: 9px;
  cursor: pointer;
}
.file-control:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(36,111,166,.13); }
.file-button { display: flex; align-items: center; padding: 10px 14px; color: #fff; background: var(--brand); font-weight: 700; }
.file-name { min-width: 0; display: flex; align-items: center; padding: 10px 13px; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-control input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.file-control:has(input:disabled) { background: #edf1f1; cursor: not-allowed; }
.file-control:has(input:disabled) .file-button { background: #7891a3; }
.file-control:has(input:disabled) input { cursor: not-allowed; }

.checkbox-field { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.checkbox-field input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--brand); flex: 0 0 auto; }
.privacy-copy { margin: 15px 0 0 30px; color: var(--muted); font-size: .88rem; }
.captcha-wrap { margin: 20px 0; }
.form-status { margin: 16px 0; padding: 13px 15px; border-radius: 10px; }
.form-status.error { color: var(--danger); background: #fff0ee; border: 1px solid #f2b8b3; }
.submit-button, .return-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  color: #fff;
  background: var(--brand-dark);
  border: 0;
  border-radius: 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.submit-button:hover, .return-button:hover { background: var(--brand); transform: translateY(-1px); }
.submit-button:disabled { opacity: .68; cursor: wait; transform: none; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.submit-button.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-panel { text-align: center; outline: none; }
.success-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 22px; color: #fff; background: var(--success); border-radius: 50%; font-size: 2rem; font-weight: 700; }
.success-panel > p:not(.step) { color: var(--muted); }
.summary { margin: 30px 0; text-align: left; border-top: 1px solid var(--line); }
.summary div { display: grid; grid-template-columns: minmax(130px, .7fr) 1.5fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.hidden-field { position: absolute; left: -9999px; }

.registration-home { text-align: center; }
.registration-home h2 { margin: 0; color: var(--brand-dark); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.registration-intro { margin: 14px auto 30px; color: var(--muted); }
.registration-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; text-align: left; }
.registration-option {
  min-height: 155px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 25px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 9px 28px rgba(29, 88, 133, .07);
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.registration-option:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 14px 32px rgba(29, 88, 133, .14); }
.registration-option:focus-visible { outline: 3px solid rgba(36,111,166,.3); outline-offset: 3px; }
.option-number { color: var(--celeste, #72a8d1); font-family: Georgia, "Times New Roman", serif; font-size: 1.25rem; font-weight: 700; }
.option-content { display: flex; flex-direction: column; gap: 7px; }
.option-content strong { color: var(--brand-dark); font-family: Georgia, "Times New Roman", serif; font-size: 1.38rem; line-height: 1.2; }
.option-content small { color: var(--muted); }
.option-arrow { color: var(--brand); font-size: 1.8rem; }
.back-to-congress { display: inline-block; margin-top: 30px; color: var(--brand-dark); font-weight: 700; text-underline-offset: 4px; }

footer { padding: 42px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: #d6e7f3; background: #102f49; }
footer strong { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.7rem; }
footer span { max-width: 760px; color: #d6e7f3; font-size: .88rem; }

@media (max-width: 680px) {
  .site-header { min-height: 70px; padding: 7px 16px; }
  .brand { gap: 9px; }
  .brand img { width: 44px; height: 44px; }
  .brand span { font-size: 1.7rem; }
  .header-link { max-width: 100px; font-size: .72rem; }
  .hero { padding-top: 48px; }
  .form-shell { width: min(100% - 20px, 920px); padding: 22px 14px; border-radius: 16px; }
  .card { padding: 18px 14px; }
  .field-grid, .choice-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .fee-box { align-items: flex-start; flex-direction: column; }
  .summary div { grid-template-columns: 1fr; gap: 3px; }
  .submit-button, .return-button { width: 100%; }
  .file-control { align-items: stretch; flex-direction: column; }
  .file-button { justify-content: center; }
  .registration-options { grid-template-columns: 1fr; }
  .registration-option { min-height: 130px; padding: 20px 16px; }
}

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