.jtp-transfer-guide {
  --jtp-red: #a61b1b;
  --jtp-yellow: #fbe6bd;
  --jtp-ink: #171717;
  --jtp-link: #075fcb;
  position: relative;
  overflow: visible;
  background: #fff;
  border: 2px solid #555;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(17, 17, 17, .10);
  color: var(--jtp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.jtp-transfer-guide,
.jtp-transfer-guide * { box-sizing: border-box; }
.jtp-transfer-guide [hidden] { display: none !important; }

.jtp-transfer-guide .jtp-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;
}

.jtp-transfer-guide__intro {
  padding: 24px 28px;
  background: radial-gradient(circle at 50% 0%, #fae1b1 0%, var(--jtp-yellow) 100%);
  border-bottom: 2px solid #555;
  border-radius: 16px 16px 0 0;
}

.jtp-transfer-guide__eyebrow {
  margin: 0 0 7px !important;
  color: var(--jtp-red);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.jtp-transfer-guide__title {
  margin: 0 !important;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
}

.jtp-transfer-guide__subtitle {
  margin: 8px 0 0 !important;
  color: #4c401d;
  font-size: 15px;
}

.jtp-transfer-guide__search {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 2px solid #555;
}

.jtp-transfer-guide__search-field {
  position: relative;
  flex: 1 1 auto;
}

.jtp-transfer-guide__search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 42px 10px 15px;
  color: var(--jtp-ink);
  background: #f8f8f8;
  border: 1px solid #aaa;
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
}

.jtp-transfer-guide__search input:focus {
  border-color: var(--jtp-red);
  box-shadow: 0 0 0 3px rgba(166, 27, 27, .12);
  outline: none;
}

.jtp-transfer-guide__search-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 20px;
  height: 20px;
  color: #555;
  transform: translateY(-50%);
  pointer-events: none;
}

.jtp-favorite-legend {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: #2c2c2c;
  background: #f5faf6;
  border: 1px solid #9dc9aa;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.jtp-favorite-legend:hover,
.jtp-favorite-legend:focus-visible {
  border-color: #3e9b5b;
  outline: none;
}

.jtp-favorite-legend.is-active {
  color: #fff;
  background: #16883b;
  border-color: #0f6f2f;
  box-shadow: 0 0 0 3px rgba(22, 136, 59, .16);
}

.jtp-favorite-legend.is-active .jtp-favorite {
  color: #16883b;
  background: #fff;
  border-color: #fff;
}

.jtp-transfer-guide__scroll { overflow: visible; }

/* When filtering returns no rows at all, clip inner borders/shadows to the
   guide's rounded outer border. This is safe because there is no sticky
   content to preserve in the empty state. */
.jtp-transfer-guide.is-empty-results { overflow: hidden; }

/* When filtering returns no desktop rows, the table header becomes the visual
   bottom edge. Clip its sticky shadow to the guide's rounded corners. */
.jtp-transfer-guide.is-empty-results .jtp-transfer-guide__scroll {
  overflow: hidden;
  border-radius: 0 0 16px 16px;
}

.jtp-transfer-guide.is-empty-results thead th:first-child { border-bottom-left-radius: 16px; }
.jtp-transfer-guide.is-empty-results thead th:last-child { border-bottom-right-radius: 16px; }

.jtp-transfer-guide table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: clamp(11px, .92vw, 14px);
}

.jtp-transfer-guide col.program { width: 22%; }
.jtp-transfer-guide col.bank { width: auto; }

.jtp-transfer-guide thead th {
  position: sticky;
  top: var(--jtp-sticky-offset);
  z-index: 3;
  padding: 12px 6px;
  color: #222;
  background: #fff;
  border-right: 1px solid #d5d5d5;
  border-bottom: 2px solid #222;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.jtp-transfer-guide thead th:first-child {
  left: 0;
  z-index: 5;
  border-right: 2px solid #222;
}

.jtp-transfer-guide thead th:last-child { border-right: 0; }
.jtp-transfer-guide thead th:not(:first-child) { padding: 0; }

.jtp-bank-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  padding: 24px 6px 9px;
  color: inherit;
  text-decoration: none;
}

.jtp-bank-label::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 28%;
  width: 44%;
  height: 4px;
  background: var(--bank-color);
}

.jtp-bank-label:hover,
.jtp-bank-label:focus-visible {
  color: #111;
  background: #f4f4f4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jtp-transfer-guide tbody th,
.jtp-transfer-guide tbody td {
  height: 42px;
  padding: 8px 6px;
  border-right: 1px solid rgba(60, 60, 60, .14);
  border-bottom: 1px solid rgba(60, 60, 60, .14);
  background: var(--group-bg);
  line-height: 1.25;
  vertical-align: middle;
}

.jtp-transfer-guide tbody td {
  font-size: clamp(11px, .88vw, 14px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.jtp-transfer-guide tbody .jtp-program {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 2px solid rgba(30, 30, 30, .68);
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  white-space: normal;
  padding-right: 10px;
}

.jtp-transfer-guide tbody .jtp-desktop-group th {
  position: relative;
  z-index: 2;
  height: 36px;
  padding: 8px 12px;
  color: #202020;
  background: var(--group-bg);
  border-top: 2px solid #222;
  border-right: 0;
  border-bottom: 1px solid rgba(0,0,0,.24);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .02em;
  text-align: left;
}

.jtp-transfer-guide tbody .jtp-desktop-group:first-child th { border-top: 0; }

.jtp-program__inner,
a.jtp-program__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

a.jtp-program__inner {
  color: var(--jtp-link);
}

a.jtp-program__inner:hover,
a.jtp-program__inner:focus-visible {
  color: #03489d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jtp-transfer-guide tbody tr:not(.jtp-desktop-group):hover > * {
  background: color-mix(in srgb, var(--group-bg) 62%, #fff 38%);
  box-shadow: inset 0 1px 0 rgba(166, 27, 27, .18), inset 0 -1px 0 rgba(166, 27, 27, .18);
}

.jtp-transfer-guide tbody tr:hover .jtp-program {
  box-shadow: inset 4px 0 0 var(--jtp-red);
}

.jtp-transfer-guide tbody tr:hover .jtp-bank-cell:not(.jtp-empty) {
  background: var(--bank-hover-color);
}

.jtp-transfer-guide tbody td:last-child { border-right: 0; }
.jtp-transfer-guide tbody tr:last-child .jtp-program,
.jtp-transfer-guide tbody tr.is-last-visible .jtp-program { border-bottom-left-radius: 16px; }
.jtp-transfer-guide tbody tr:last-child td:last-child,
.jtp-transfer-guide tbody tr.is-last-visible td:last-child { border-bottom-right-radius: 16px; }
.jtp-transfer-guide .jtp-empty { color: transparent; }

.jtp-favorite {
  display: inline-grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  margin-left: auto;
  place-items: center;
  color: #fff;
  background: #16a34a;
  border: 1px solid #11833c;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 15px;
  font-weight: 900;
}

.jtp-transfer-guide__mobile { display: none; }

@media (max-width: 1000px) {
  .jtp-transfer-guide { border-radius: 14px; }
  .jtp-transfer-guide__intro {
    padding: 20px;
    border-radius: 12px 12px 0 0;
  }
  .jtp-transfer-guide__search {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }
  .jtp-transfer-guide__search-field { min-width: 0; }
  .jtp-favorite-legend { align-self: auto; }
  .jtp-transfer-guide__scroll { display: none; }
  .jtp-transfer-guide__mobile { display: block; }
  .jtp-mobile-group {
    padding: 14px;
    background: var(--group-bg);
    border-top: 3px solid #222;
  }
  .jtp-mobile-group:first-child { border-top: 0; }
  .jtp-mobile-group:last-child,
  .jtp-mobile-group.is-last-visible { border-radius: 0 0 12px 12px; }
  .jtp-mobile-group__title {
    margin: 0 0 10px !important;
    font-size: 17px;
  }
  .jtp-mobile-card {
    margin-top: 10px;
    overflow: hidden;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 10px;
  }
  .jtp-mobile-card__program {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 9px 11px;
    color: var(--jtp-ink);
    border-bottom: 1px solid rgba(0,0,0,.12);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
  }
  a.jtp-mobile-card__program { color: var(--jtp-link); }
  a.jtp-mobile-card__program:hover,
  a.jtp-mobile-card__program:focus-visible {
    color: #03489d;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .jtp-mobile-card__banks {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
  .jtp-mobile-bank {
    grid-column: span 2;
    display: block;
    min-width: 0;
    min-height: 53px;
    padding: 7px 4px;
    color: inherit;
    border-right: 1px solid rgba(0,0,0,.10);
    border-bottom: 1px solid rgba(0,0,0,.10);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
    text-align: center;
    text-decoration: none;
  }
  .jtp-mobile-bank:hover,
  .jtp-mobile-bank:focus-visible {
    background: rgba(255,255,255,.72);
    box-shadow: inset 0 0 0 2px var(--jtp-link);
    outline: none;
  }
  .jtp-mobile-bank b {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .jtp-mobile-bank span {
    display: block;
    max-width: 100%;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: normal;
  }
}

@media (max-width: 650px) {
  .jtp-mobile-card__banks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jtp-mobile-bank { grid-column: span 1; }
  .jtp-mobile-bank span {
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
  }
}


/* Keep search + favorite side-by-side through tablet/zoomed desktop widths.
   Stack only when the viewport is genuinely too narrow for both controls. */
@media (max-width: 620px) {
  .jtp-transfer-guide__search {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .jtp-favorite-legend { align-self: flex-start; }
}
