:root {
  --ink: #102a2c;
  --muted: #526669;
  --line: #d7e1df;
  --surface: #ffffff;
  --canvas: #f4f7f5;
  --teal: #0e6b62;
  --teal-dark: #084f49;
  --teal-soft: #e7f3f0;
  --lime: #c9f27b;
  --danger: #a7261b;
  --warning: #fff1cc;
  --focus: #175cd3;
  --shadow: 0 18px 55px rgba(16, 42, 44, 0.1);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 10% 5%, rgba(201, 242, 123, 0.2), transparent 28rem),
    var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: .75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

.customer-header {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  border-radius: 10px;
  font-size: .8rem;
  letter-spacing: .04em;
}

.header-action {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 42px;
  padding: .55rem .8rem;
  border-radius: 999px;
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: none;
}
.header-action:hover { background: var(--teal-soft); }

.test-banner {
  padding: .65rem 1rem;
  background: #7b241c;
  color: #fff;
  text-align: center;
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .01em;
}

.portal-main { padding-top: 1.25rem; padding-bottom: 4rem; }
.page-shell { max-width: 1050px; margin: 0 auto; }
.narrow-shell { max-width: 760px; margin: 0 auto; }

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--teal-dark);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: -.035em; }
.page-title { margin: 0; font-size: clamp(2rem, 4.2vw, 3.35rem); font-weight: 800; line-height: 1.06; }
.page-lead { max-width: 41rem; margin: .85rem 0 0; color: var(--muted); font-size: 1.08rem; }

.steps-wrap { margin: .35rem 0 2rem; overflow-x: auto; scrollbar-width: none; }
.steps-wrap::-webkit-scrollbar { display: none; }
.steps {
  min-width: 690px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: portal-step;
}
.steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .55rem .9rem 0;
  color: #6d7d7f;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  counter-increment: portal-step;
}
.steps li::before {
  content: counter(portal-step);
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  border: 2px solid #a8b8b6;
  border-radius: 50%;
  background: var(--surface);
  color: #657573;
  font-size: .72rem;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #d5dfdd;
}
.steps li.complete, .steps li.current { color: var(--ink); }
.steps li.complete::before { content: "✓"; border-color: var(--teal); background: var(--teal); color: #fff; }
.steps li.complete::after, .steps li.current::after { background: var(--teal); }
.steps li.current::before { border-color: var(--teal); color: var(--teal-dark); box-shadow: 0 0 0 4px var(--teal-soft); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .86fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: center;
  min-height: 590px;
}

.hero-copy { padding: 1rem 0; }
.hero-points { display: grid; gap: .8rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: flex-start; gap: .7rem; color: var(--muted); }
.hero-points li::before { content: "✓"; width: 23px; height: 23px; display: grid; flex: 0 0 23px; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: .76rem; font-weight: 900; }

.money-card, .surface-card {
  border: 1px solid rgba(14, 107, 98, .13);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.money-card { padding: clamp(1.25rem, 3vw, 2rem); }
.surface-card { padding: clamp(1.15rem, 3vw, 2rem); }

.money-label { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.money-card .form-control {
  min-height: 72px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding: .2rem 0;
  color: var(--ink);
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -.045em;
  box-shadow: none;
}
.money-card .form-control:focus { border-color: var(--focus); box-shadow: 0 3px 0 rgba(23, 92, 211, .12); }

.form-label { color: var(--ink); font-size: .88rem; font-weight: 750; }
.form-control, .form-select {
  min-height: 52px;
  border: 1.5px solid #aebdba;
  border-radius: 11px;
  background-color: #fff;
  color: var(--ink);
  font-size: 1rem;
}
.form-control:focus, .form-select:focus, .form-check-input:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(23, 92, 211, .3);
  outline-offset: 2px;
  border-color: var(--focus);
  box-shadow: none;
}
.field-help { margin-top: .4rem; color: var(--muted); font-size: .78rem; }
.field-error { display: flex; gap: .4rem; margin-top: .45rem; color: var(--danger); font-size: .86rem; font-weight: 700; }

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 34px;
  padding: .34rem .65rem;
  border: 2px solid var(--teal-dark);
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-size: .8rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.network-badge::before { content: "NETWORK"; color: var(--muted); font-size: .6rem; letter-spacing: .08em; }

.direction-box { margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.direction-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; }
.direction-row + .direction-row { border-top: 1px solid var(--line); }
.direction-row span { color: var(--muted); font-size: .82rem; font-weight: 700; }
.direction-row strong { font-size: 1.05rem; }

.primary-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(14, 107, 98, .2);
}
.primary-button:hover { background: var(--teal-dark); color: #fff; }
.secondary-button { min-height: 48px; border: 1.5px solid var(--teal); border-radius: 11px; background: #fff; color: var(--teal-dark); font-weight: 800; }

.quote-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border-radius: 22px 22px 0 0;
  background: var(--ink);
  color: #fff;
}
.quote-amount span { display: block; color: #c6d5d3; font-size: .82rem; font-weight: 750; }
.quote-amount strong { display: block; margin-top: .15rem; font-size: clamp(1.7rem, 5vw, 2.8rem); line-height: 1.1; }
.quote-amount:last-child { text-align: right; }
.quote-arrow { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 1.35rem; font-weight: 900; }
.quote-breakdown { padding: .6rem clamp(1.25rem, 4vw, 2.5rem) 1.2rem; }
.breakdown-row { display: flex; justify-content: space-between; gap: 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.breakdown-row span { color: var(--muted); }
.breakdown-row strong { text-align: right; }
.breakdown-row.total { border-bottom: 0; font-size: 1.07rem; }

.recovery-details { margin-top: 1.25rem; border: 1px solid #e6c573; border-radius: 14px; background: var(--warning); }
.recovery-details summary { padding: 1rem 1.15rem; cursor: pointer; font-weight: 800; }
.recovery-inner { padding: 0 1.15rem 1.15rem; }
.recovery-code { display: block; padding: .9rem; border: 1px dashed #99752d; border-radius: 10px; background: #fff; color: var(--ink); font-size: 1rem; overflow-wrap: anywhere; user-select: all; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 1.4rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  overflow: hidden;
}
.summary-strip > div { padding: .85rem 1rem; background: var(--surface); }
.summary-strip span { display: block; color: var(--muted); font-size: .73rem; font-weight: 700; }
.summary-strip strong { display: block; margin-top: .16rem; font-size: .95rem; }

.form-section { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1rem; }
.form-section .full-width { grid-column: 1 / -1; }

.recipient-check { display: grid; grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr); gap: 1.5rem; align-items: start; }
.recipient-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; margin: 0; }
.recipient-check-grid div { min-width: 0; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.recipient-check-grid dt { color: var(--muted); font-size: .74rem; font-weight: 700; }
.recipient-check-grid dd { margin: .15rem 0 0; font-weight: 800; overflow-wrap: anywhere; }

.payment-grid { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: stretch; }
.payment-primary-header { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 1.25rem; }
.qr-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.5rem; border-radius: 18px; background: #f8faf9; border: 1px solid var(--line); text-align: center; }
.qr-frame { width: min(100%, 270px); padding: .85rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.qr { display: block; width: 100%; height: auto; }
.payment-amount { margin: .6rem 0 1.25rem; font-size: clamp(2.1rem, 6vw, 3.3rem); font-weight: 850; letter-spacing: -.045em; line-height: 1; }
.address-box { margin-top: 1.2rem; padding: 1rem; border: 2px solid var(--teal); border-radius: 13px; background: var(--teal-soft); }
.address-box code { display: block; margin-bottom: .85rem; color: var(--ink); font-size: .97rem; overflow-wrap: anywhere; user-select: all; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.copy-help { color: var(--muted); font-size: .75rem; }
.copy-status { min-height: 1.2em; color: var(--teal-dark); font-size: .8rem; font-weight: 800; }

.notice { display: flex; gap: .8rem; padding: .9rem 1rem; border-radius: 12px; background: var(--teal-soft); color: var(--ink); }
.notice::before { content: "i"; width: 23px; height: 23px; display: grid; flex: 0 0 23px; place-items: center; border: 2px solid var(--teal); border-radius: 50%; color: var(--teal-dark); font-size: .75rem; font-weight: 900; }
.notice-danger { background: #fbe9e7; }
.notice-danger::before { content: "!"; border-color: var(--danger); color: var(--danger); }

.status-hero { padding: clamp(1.3rem, 4vw, 2.25rem); border-radius: 22px; background: var(--ink); color: #fff; }
.status-kicker { color: #c6d5d3; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.status-title { margin: .35rem 0 .5rem; font-size: clamp(1.7rem, 5vw, 2.7rem); font-weight: 850; }
.status-reference { color: #c6d5d3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; overflow-wrap: anywhere; }

.status-track { display: grid; grid-template-columns: repeat(5, 1fr); margin: 1.5rem 0 0; padding: 0; list-style: none; }
.status-track li { position: relative; padding: 2.4rem .4rem 0; color: #c3d0ce; font-size: .72rem; font-weight: 700; text-align: center; }
.status-track li::before { content: "○"; position: absolute; z-index: 2; top: 0; left: 50%; width: 27px; height: 27px; display: grid; place-items: center; transform: translateX(-50%); border: 2px solid #8ba09c; border-radius: 50%; background: var(--ink); color: #c3d0ce; }
.status-track li::after { content: ""; position: absolute; z-index: 1; top: 13px; left: -50%; width: 100%; height: 2px; background: #516b67; }
.status-track li:first-child::after { display: none; }
.status-track li.done, .status-track li.current { color: #fff; }
.status-track li.done::before { content: "✓"; border-color: var(--lime); background: var(--lime); color: var(--ink); }
.status-track li.current::before { content: "•"; border-color: var(--lime); color: var(--lime); box-shadow: 0 0 0 5px rgba(201, 242, 123, .13); }
.status-track li.done::after, .status-track li.current::after { background: var(--lime); }

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.detail-card { padding: 1.15rem; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.detail-card h2 { margin: 0 0 .8rem; font-size: 1rem; }
.detail-list { margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 1rem; padding: .62rem 0; border-top: 1px solid var(--line); }
.detail-list div:first-child { border-top: 0; padding-top: 0; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { margin: 0; text-align: right; font-weight: 750; }

.portal-footer { padding: 1.3rem 0 2.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; gap: 1.2rem; }
  .hero-copy { padding-bottom: 0; }
  .hero-points { grid-template-columns: repeat(3, 1fr); }
  .payment-grid { grid-template-columns: 1fr; }
  .payment-primary-header { align-items: flex-start; flex-direction: column; }
  .recipient-check { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .portal-main { padding-top: .8rem; }
  .header-inner { min-height: 60px; }
  .header-action span { display: none; }
  .page-title { font-size: 2.15rem; }
  .hero-points { grid-template-columns: 1fr; margin-top: 1.3rem; }
  .money-card, .surface-card { border-radius: 17px; padding: 1.1rem; }
  .money-card .form-control { min-height: 60px; font-size: 2.45rem; }
  .quote-hero { grid-template-columns: 1fr auto; gap: .75rem; }
  .quote-amount:last-child { grid-column: 1 / -1; text-align: left; padding-top: .8rem; border-top: 1px solid #46615e; }
  .quote-arrow { grid-column: 2; grid-row: 1; }
  .summary-strip { grid-template-columns: 1fr; }
  .form-section { grid-template-columns: 1fr; }
  .form-section .full-width { grid-column: auto; }
  .recipient-check-grid { grid-template-columns: 1fr; }
  .payment-amount { font-size: 2.45rem; }
  .copy-row { align-items: stretch; flex-direction: column; }
  .status-track li { padding-left: .1rem; padding-right: .1rem; font-size: .62rem; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button, .secondary-button, .header-action { transition: background-color .16s ease, color .16s ease, transform .16s ease; }
  .primary-button:hover { transform: translateY(-1px); }
}

.route-selector select {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
