/* ==========================================================================
   Astrosia Capital - Banking portal styles
   Navy · Bank red · White
   ========================================================================== */

:root {
  --navy: #0B2545;
  --navy-deep: #061830;
  --navy-mid: #14365F;
  --red: #C8102E;
  --red-hover: #A50D25;
  --red-soft: rgba(200, 16, 46, 0.08);
  --blue: #1B4F8A;
  --blue-light: #E8F0F8;
  --white: #FFFFFF;
  --off-white: #F4F6F9;
  --border: #D5DCE6;
  --border-soft: #E8ECF1;
  --text: #1A2332;
  --text-muted: #5A6577;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: #B8C4D4;
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(11, 37, 69, 0.08);
  --shadow-md: 0 6px 20px rgba(11, 37, 69, 0.1);
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Consolas", "Courier New", ui-monospace, monospace;
  --max: 1140px;
  --header-h: 70px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.font-mono,
.reg-token {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.reg-token {
  color: var(--text-on-dark-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 0.15em 0.45em;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-outline {
  background: var(--white);
  color: var(--navy);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(11, 37, 69, 0.04);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-text small {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-links a {
  color: var(--navy-mid);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 48%, var(--navy-mid) 100%);
  color: var(--text-on-dark);
  padding: 3.25rem 0 3.5rem;
  border-bottom: 4px solid var(--red);
}

.hero .container {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F0A8B2;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-on-dark-muted);
  line-height: 1.65;
  max-width: 48ch;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.25rem;
}

.hero-stats li {
  padding-right: 1.75rem;
  margin-right: 1.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stats li:last-child {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}

.hero-stats strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.hero-stats span {
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
}

.hero-panel {
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-md);
}

.hero-panel h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--red);
}

.hero-panel ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hero-panel li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--off-white);
}

.hero-panel li span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 640px;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.45rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1rem;
}

.section-alt {
  background: var(--off-white);
  border-block: 1px solid var(--border-soft);
}

.section-navy {
  background: var(--navy);
  color: var(--text-on-dark);
}

.section-navy .section-head h2 {
  color: var(--white);
}

.section-navy .section-head p {
  color: var(--text-on-dark-muted);
}

.section-navy .section-label {
  color: #F0A8B2;
}

/* Loan products */
.loan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.loan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.2rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.loan-card:hover {
  border-top-color: var(--red);
  box-shadow: var(--shadow-md);
}

.loan-card .loan-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.loan-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.loan-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.loan-card .loan-tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
}

/* Two-col support strip */
.support-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}

.support-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}

.support-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.55rem;
}

.support-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checklist li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.925rem;
  color: var(--text);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--red);
  border-radius: 1px;
}

.support-card.side {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--text-on-dark);
}

.support-card.side h3 {
  color: var(--white);
}

.support-card.side > p {
  color: var(--text-on-dark-muted);
}

.support-card.side .checklist li {
  color: var(--text-on-dark);
}

.support-card.side .checklist li::before {
  background: #F0A8B2;
}

/* Trust / partners */
.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.counter-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.35rem 1rem;
  text-align: center;
}

.counter-value {
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.3rem;
}

.counter-value .accent {
  color: #F5C6CB;
}

.counter-label {
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
}

.partners-block {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  background: rgba(0, 0, 0, 0.15);
}

.partners-block h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.partners-sub {
  font-size: 0.85rem;
  color: var(--text-on-dark-muted);
  margin-bottom: 1rem;
}

.partners-affiliate {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-on-dark-muted);
  font-weight: 400;
}

.partner-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.partner-badge {
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Complementary Corporate Solutions (cross-sell display) */
.xsell-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.xsell-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.25rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  box-shadow: var(--shadow);
}

.xsell-card:hover {
  border-top-color: var(--red);
}

.xsell-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

.xsell-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.xsell-card > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.xsell-card .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.xsell-disclaimer {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 78ch;
}

.xsell-disclaimer a {
  color: var(--blue);
  text-decoration: underline;
}

/* Post-submit success + optional ecosystem CTAs */
.success-panel {
  margin-top: 0.25rem;
  outline: none;
}

.success-panel-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.success-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}

.success-panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.3rem;
}

.success-panel-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.success-independence {
  font-size: 0.8rem;
  color: var(--text);
  background: var(--blue-light);
  border: 1px solid #B8CEE4;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.success-panel-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.65rem;
}

.success-xsell-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.success-xsell-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.success-xsell-item strong {
  font-size: 0.9rem;
  color: var(--navy);
}

.success-xsell-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.success-xsell-item .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.success-panel-note {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.success-panel-note a {
  color: var(--blue);
  text-decoration: underline;
}

/* Eligibility */
.eligibility-wrap {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2rem;
  align-items: start;
}

.eligibility-copy h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  color: var(--navy);
  letter-spacing: -0.015em;
  margin-bottom: 0.65rem;
}

.eligibility-copy > p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.eligibility-points {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.eligibility-points li {
  display: flex;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text);
}

.eligibility-points .dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 1px;
  background: var(--red);
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow);
}

.form-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.form-card .form-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 79, 138, 0.15);
}

.form-field .error-msg {
  font-size: 0.75rem;
  color: var(--red);
  min-height: 1em;
}

.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--red);
}

.form-actions {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-actions .btn {
  width: 100%;
}

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-disclaimer a {
  color: var(--blue);
  text-decoration: underline;
}

.form-status {
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  display: none;
}

.form-status.is-visible {
  display: block;
}

.form-status.success {
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
}

.form-status.error {
  background: #FFEBEE;
  color: #B71C1C;
  border: 1px solid #EF9A9A;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 24, 48, 0.65);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.35rem;
  border-top: 4px solid var(--red);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-close:hover {
  color: var(--navy);
}

body.modal-open {
  overflow: hidden;
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: var(--text-on-dark-muted);
  border-top: 3px solid var(--red);
  font-size: 0.75rem;
  line-height: 1.65;
}

.footer-main {
  padding: 2.25rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 2rem 2.5rem;
  align-items: start;
}

.footer-disclosure h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #CBD5E1;
  margin-bottom: 0.75rem;
}

.footer-disclosure p {
  margin: 0 0 0.75rem;
  max-width: 68ch;
  font-weight: 400;
  color: var(--text-on-dark-muted);
}

.footer-disclosure p:last-child {
  margin-bottom: 0;
}

.footer-disclosure a {
  color: #94A3B8;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 400;
}

.footer-disclosure a:hover {
  color: #CBD5E1;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #CBD5E1;
  margin-bottom: 0.65rem;
}

.footer-col a {
  display: block;
  color: var(--text-on-dark-muted);
  padding: 0.2rem 0;
  font-weight: 400;
}

.footer-col a:hover {
  color: #CBD5E1;
}

.footer-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
}

.footer-bottom {
  padding: 1rem 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  margin: 0;
  font-weight: 400;
  color: var(--text-on-dark-muted);
}

.footer-bottom a {
  color: #94A3B8;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 400;
}

.footer-bottom a:hover {
  color: #CBD5E1;
}

.footer-bottom .domain {
  font-size: 0.72rem;
  color: #7A8BA0;
  font-weight: 400;
}

/* Legal page */
.legal-hero {
  background: var(--navy);
  color: var(--text-on-dark);
  padding: 2.5rem 0 2.15rem;
  border-bottom: 4px solid var(--red);
}

.legal-hero h1 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.legal-hero p {
  color: var(--text-on-dark-muted);
  max-width: 56ch;
  font-size: 1rem;
}

.legal-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.legal-jump a {
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text-on-dark-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.legal-jump a:hover {
  color: var(--white);
  border-color: #F0A8B2;
}

.legal-body {
  padding: 2.5rem 0 3rem;
  background: var(--off-white);
}

.legal-section {
  margin-bottom: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section > h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.legal-section > h2 .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 700;
}

.legal-section > .lead {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  max-width: 65ch;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.875rem;
}

.matrix-table th,
.matrix-table td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.matrix-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.matrix-table tbody tr:last-child td {
  border-bottom: 0;
}

.matrix-table tbody tr:nth-child(even) {
  background: var(--off-white);
}

.matrix-table td:first-child {
  font-weight: 700;
  color: var(--navy);
  min-width: 140px;
}

.matrix-table td {
  color: var(--text-muted);
  line-height: 1.5;
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.compliance-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.05rem;
}

.compliance-card .tier {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.4rem;
}

.compliance-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.compliance-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Terms of Service blocks */
.terms-block {
  margin-bottom: 1.15rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--border-soft);
}

.terms-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.terms-block h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.terms-block p,
.terms-block li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.terms-block a {
  color: var(--blue);
  text-decoration: underline;
}

.terms-block .checklist {
  margin-top: 0.55rem;
}

.terms-block .checklist li {
  color: var(--text);
}

/* RBI circular reference box */
.rbi-refs-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.2rem;
}

.rbi-refs-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

.rbi-refs-box ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 0 0.85rem;
}

.rbi-refs-box li {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border);
}

.rbi-refs-box .reg-token {
  display: inline-block;
  margin: 0 0.25rem 0.25rem 0;
  font-size: 0.72rem;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15em 0.4em;
  font-family: var(--font-mono);
}

.rbi-refs-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.alert-trust {
  background: var(--blue-light);
  border: 1px solid #B8CEE4;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.2rem;
}

.alert-trust-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.alert-trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 1px solid #B8CEE4;
}

.alert-trust h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.alert-trust > p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.alert-trust ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.alert-trust li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.alert-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 5px;
  height: 5px;
  background: var(--blue);
}

.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;
}

/* Responsive */
@media (max-width: 1000px) {
  .loan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .xsell-grid {
    grid-template-columns: 1fr;
  }

  .hero .container,
  .support-grid,
  .eligibility-wrap,
  .compliance-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.15rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.15s ease;
    box-shadow: var(--shadow-md);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav .btn {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .counters {
    grid-template-columns: 1fr;
  }

  .hero-stats li {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
    margin-bottom: 0.65rem;
    width: 45%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .loan-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .brand-text small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
