.loan-page {
  background: #fff;
}

.loan-page .directory-container {
  width: min(100% - 64px, 1376px);
}

.loan-page main {
  background:
    radial-gradient(circle at 10% 14%, rgba(8, 174, 100, .08), transparent 250px),
    radial-gradient(circle at 88% 24%, rgba(47, 125, 242, .07), transparent 280px),
    linear-gradient(180deg, #fff 0%, #fbfdff 48%, #fff 100%);
}

.loan-hero {
  padding: 16px 0 18px;
  border-bottom: 1px solid #dfe7f1;
}

.loan-breadcrumb,
.loan-title-row,
.loan-tabs,
.loan-scenario-strip,
.loan-actions-row,
.loan-summary-grid,
.summary-card,
.breakdown-legend,
.chart-legend,
.loan-side-card a,
.loan-related-grid,
.loan-related-grid a {
  display: flex;
  align-items: center;
}

.loan-breadcrumb {
  gap: 10px;
  color: #49617f;
  font-size: 13px;
  font-weight: 650;
}

.loan-breadcrumb a:first-child {
  color: #005dbb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.loan-breadcrumb svg {
  width: 13px;
  height: 13px;
}

.loan-title-row {
  gap: 34px;
  margin-top: 14px;
}

.loan-mark {
  position: relative;
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f8f0 0%, #d3efe2 100%);
  box-shadow: 0 18px 38px rgba(8, 174, 100, .16);
}

.loan-money,
.loan-paper,
.loan-calc {
  position: absolute;
  display: block;
}

.loan-money {
  left: 24px;
  top: 24px;
  width: 50px;
  height: 30px;
  border: 4px solid #087a47;
  border-radius: 6px;
  background: #28b76d;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .72);
}

.loan-money::after {
  content: "$";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.loan-paper {
  left: 38px;
  top: 48px;
  width: 34px;
  height: 40px;
  border: 3px solid #aec2d5;
  border-radius: 4px;
  background: #fff;
}

.loan-paper::before,
.loan-paper::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 8px;
  background: #dce6f2;
}

.loan-paper::before {
  top: 13px;
}

.loan-paper::after {
  top: 25px;
}

.loan-calc {
  right: 20px;
  bottom: 16px;
  width: 32px;
  height: 42px;
  border: 4px solid #0b2146;
  border-radius: 7px;
  background: linear-gradient(180deg, #255e74, #0a3345);
}

.loan-calc::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 7px;
  height: 7px;
  border-radius: 3px;
  background: #d8f7e4;
  box-shadow: 0 13px 0 #9ad6c0, 0 26px 0 #12bd72;
}

.loan-title-row h1 {
  margin: 0;
  color: #061738;
  font-size: clamp(36px, 3.4vw, 46px);
  line-height: 1.05;
}

.loan-title-row p {
  max-width: 690px;
  margin: 10px 0 0;
  color: #263b5f;
  font-size: 17px;
  line-height: 1.55;
}

.loan-workspace {
  padding: 20px 0 0;
}

.loan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.loan-tool,
.loan-side-card,
.loan-guide-card,
.loan-related-card {
  min-width: 0;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 28px rgba(17, 40, 77, .06);
}

.loan-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #dfe7f1;
}

.loan-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  border: 0;
  border-right: 1px solid #dfe7f1;
  background: #fff;
  color: #10264c;
  font-weight: 850;
}

.loan-tabs button:last-child {
  border-right: 0;
}

.loan-tabs button.is-active {
  color: #087a47;
  box-shadow: inset 0 -4px 0 #08ae64;
}

.loan-mode-hint {
  margin: 0;
  padding: 9px 24px;
  border-bottom: 1px solid #dfe7f1;
  background: linear-gradient(90deg, rgba(8, 174, 100, .07), rgba(47, 125, 242, .04));
  color: #49617f;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.45;
}

.loan-scenario-strip {
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid #dfe7f1;
  background:
    radial-gradient(circle at 12% 45%, rgba(8, 174, 100, .12), transparent 110px),
    linear-gradient(90deg, #fbfffd, #f7fbff);
}

.loan-scenario-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d6e6f3;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #263b5f;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(17, 40, 77, .05);
}

.loan-scenario-strip i {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #08ae64;
}

.loan-tool-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
}

.loan-form {
  display: grid;
  gap: 8px;
  padding: 18px 24px;
  border-right: 1px solid #dfe7f1;
}

.loan-form label {
  display: grid;
  gap: 5px;
  color: #0b2146;
  font-size: 14px;
  font-weight: 850;
}

.loan-form label > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tiny-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid #9eb0c7;
  border-radius: 50%;
  color: #49617f;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.loan-field,
.loan-form select {
  min-height: 36px;
  border: 1px solid #d5e0ee;
  border-radius: 6px;
  background: #fff;
}

.loan-field {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.loan-field input,
.loan-form select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #061738;
  font-size: 15px;
  font-weight: 760;
  outline: 0;
}

.loan-field:focus-within,
.loan-form select:focus {
  border-color: #08ae64;
  box-shadow: 0 0 0 3px rgba(8, 174, 100, .12);
}

.loan-field input {
  padding: 0 12px;
}

.loan-field > span {
  display: inline-flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 0 10px;
  border-color: #dce6f2;
  color: #49617f;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 850;
}

.prefix-field > span:first-child {
  border-right: 1px solid #dce6f2;
}

.suffix-field > span:last-child,
.prefix-field > span:last-child {
  border-left: 1px solid #dce6f2;
}

.loan-form select {
  appearance: none;
  padding: 0 38px 0 14px;
  background:
    linear-gradient(45deg, transparent 50%, #49617f 50%) calc(100% - 20px) 17px / 6px 6px no-repeat,
    linear-gradient(135deg, #49617f 50%, transparent 50%) calc(100% - 14px) 17px / 6px 6px no-repeat,
    #fff;
}

.loan-actions-row {
  display: grid;
  grid-template-columns: 1fr 138px;
  gap: 10px;
  margin-top: 2px;
}

.loan-primary,
.loan-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 7px;
  font-weight: 900;
}

.loan-primary {
  border: 0;
  background: linear-gradient(180deg, #12bd72 0%, #009e57 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 166, 87, .24);
}

.loan-secondary {
  border: 1px solid #d5e0ee;
  background: #fff;
  color: #10264c;
}

.loan-form-insight {
  display: flex;
  gap: 12px;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid #cfe6dc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(232, 250, 243, .98), rgba(255, 255, 255, .95) 62%),
    radial-gradient(circle at 8% 12%, rgba(18, 189, 114, .18), transparent 90px);
}

.loan-form-insight > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #087a47;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 174, 100, .12);
}

.loan-form-insight p {
  margin: 0;
  color: #263b5f;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.5;
}

.loan-results {
  padding: 18px 18px 18px;
}

.loan-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summary-card {
  gap: 12px;
  min-height: 66px;
  padding: 12px;
  border: 1px solid #dfe7f1;
  border-radius: 7px;
  background: #fff;
}

.summary-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  color: #08ae64;
  background: #eafaf3;
}

.summary-card small {
  display: block;
  color: #49617f;
  font-size: 12px;
  font-weight: 750;
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  color: #061738;
  font-size: 20px;
  line-height: 1;
}

.loan-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.loan-insight-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #dfe7f1;
  border-radius: 7px;
  background: linear-gradient(145deg, #fff, #f7fbff);
}

.loan-insight-grid div:nth-child(1) {
  background: linear-gradient(145deg, #fff, #eef7ff);
}

.loan-insight-grid div:nth-child(2) {
  background: linear-gradient(145deg, #fff, #fff6e6);
}

.loan-insight-grid div:nth-child(3) {
  background: linear-gradient(145deg, #fff, #ecfbf4);
}

.loan-insight-grid small {
  display: block;
  color: #49617f;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.loan-insight-grid strong {
  display: block;
  margin-top: 6px;
  color: #061738;
  font-size: 23px;
  line-height: 1;
}

.loan-insight-grid span {
  display: block;
  margin-top: 6px;
  color: #49617f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.payment-breakdown,
.amortization-card {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #dfe7f1;
  border-radius: 7px;
  background: #fff;
}

.payment-breakdown h2,
.amortization-card h2,
.loan-side-card h2,
.loan-related-card h2 {
  margin: 0;
  color: #061738;
  font-size: 17px;
}

.breakdown-legend,
.chart-legend {
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: #263b5f;
  font-size: 13px;
  font-weight: 750;
}

.breakdown-legend span,
.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.principal-dot,
.interest-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.principal-dot {
  background: #18b96e;
}

.interest-dot {
  background: #3578de;
}

.breakdown-bar {
  display: grid;
  grid-template-columns: var(--principal-share, 83fr) var(--interest-share, 17fr);
  height: 36px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 6px;
  background: #eef5fb;
}

.principal-fill {
  background: linear-gradient(180deg, #23c876, #079a57);
}

.interest-fill {
  background: linear-gradient(180deg, #4a86f0, #2b63c8);
}

.directory-page .loan-chart {
  display: block;
  width: 100%;
  height: 168px;
  margin-top: 10px;
  overflow: visible;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(248, 252, 255, .96), rgba(255, 255, 255, .9));
}

.directory-page .loan-chart text {
  fill: #49617f;
  font-size: 10.5px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, .86);
  stroke-width: 2px;
}

.directory-page .loan-chart .chart-grid-line {
  stroke: #e4edf7;
  stroke-width: 1;
  stroke-dasharray: 4 6;
}

.directory-page .loan-chart .chart-axis {
  stroke: #b9c9dc;
  stroke-width: 1.25;
  stroke-dasharray: 0;
}

.principal-area {
  fill: rgba(18, 189, 114, .22);
}

.interest-area {
  fill: rgba(47, 125, 242, .18);
}

.principal-line {
  fill: none;
  stroke: #07985b;
  stroke-width: 2.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.balance-line {
  fill: none;
  stroke: #246bd6;
  stroke-width: 2.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.principal-point,
.balance-point {
  stroke: #fff;
  stroke-width: 2;
}

.principal-point {
  fill: #07985b;
}

.balance-point {
  fill: #246bd6;
}

.amortization-card p {
  margin: 6px 0 0;
  color: #49617f;
  font-size: 12px;
  line-height: 1.45;
}

.loan-side {
  display: grid;
  gap: 10px;
}

.loan-side-card {
  padding: 18px;
}

.examples-panel {
  display: grid;
  gap: 0;
}

.examples-panel h2 {
  margin-bottom: 8px;
}

.examples-panel button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #dfe7f1;
  background: transparent;
  color: #061738;
  text-align: left;
}

.examples-panel button:last-child {
  border-bottom: 0;
}

.example-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--badge-color, #08ae64);
  background: color-mix(in srgb, var(--badge-color, #08ae64) 15%, white);
}

.example-badge.debt {
  --badge-color: #8a67df;
}

.example-badge.auto {
  --badge-color: #2f7df2;
}

.example-badge.home {
  --badge-color: #ff880e;
}

.example-badge.student {
  --badge-color: #08ae64;
}

.examples-panel strong,
.similar-panel a,
.loan-related-grid strong {
  color: #061738;
  font-size: 14px;
  font-weight: 850;
}

.examples-panel small {
  display: block;
  margin-top: 3px;
  color: #49617f;
  font-size: 12px;
  font-weight: 700;
}

.checklist-panel ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.checklist-panel li {
  position: relative;
  padding-left: 24px;
  color: #263b5f;
  font-size: 13px;
  font-weight: 750;
}

.checklist-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #08ae64;
}

.checklist-panel li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.similar-panel {
  display: grid;
  gap: 0;
}

.similar-panel h2 {
  margin-bottom: 8px;
}

.similar-panel a {
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #dfe7f1;
  color: #005dbb;
}

.similar-panel a:last-child {
  border-bottom: 0;
}

.loan-guide {
  padding: 18px 0;
}

.loan-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 510px;
  gap: 16px;
}

.loan-guide-card {
  overflow: hidden;
}

.loan-guide-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #dfe7f1;
}

.loan-guide-tabs button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid #e6edf6;
  background: #fff;
  color: #263b5f;
  font-weight: 850;
}

.loan-guide-tabs button:last-child {
  border-right: 0;
}

.loan-guide-tabs button.is-active {
  color: #008f55;
  box-shadow: inset 0 -3px 0 #08ae64;
}

.loan-guide-body {
  padding: 18px 20px;
}

.loan-guide-body section[hidden] {
  display: none;
}

.loan-guide-body p,
.loan-guide-body li {
  color: #263b5f;
  font-size: 14px;
  line-height: 1.55;
}

.loan-guide-body p {
  margin: 0 0 10px;
}

.formula-box {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid #dce6f2;
  border-radius: 7px;
  background: linear-gradient(135deg, #f6fffb, #fff);
  color: #061738;
  font-size: 22px;
  font-weight: 850;
  text-align: center;
}

.loan-related-card {
  padding: 18px;
}

.loan-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.loan-related-grid a {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.loan-related-grid a > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #08ae64;
  background: #eafaf3;
}

@media (max-width: 1180px) {
  .loan-page .header-inner {
    gap: 14px;
  }

  .loan-page .directory-nav {
    gap: 16px;
    margin-left: 14px;
    font-size: 13px;
  }

  .loan-page .directory-actions {
    gap: 10px;
  }

  .loan-page .submit-btn {
    padding: 0 14px;
    font-size: 13px;
  }

  .loan-page .lang-btn {
    padding: 0 10px;
    font-size: 13px;
  }

  .loan-layout {
    grid-template-columns: 1fr;
  }

  .loan-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .loan-guide-layout {
    grid-template-columns: 1fr;
  }
}

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

  .loan-form {
    border-right: 0;
    border-bottom: 1px solid #dfe7f1;
  }

  .loan-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .loan-page .directory-container {
    width: calc(100% - 32px);
  }

  .loan-page:not(.menu-open) .mobile-menu {
    display: none;
  }

  .loan-page.menu-open .mobile-menu {
    display: flex;
  }

  .loan-page .mobile-menu {
    right: auto;
    left: 100%;
  }

  .loan-page.menu-open .mobile-menu {
    transform: translateX(-100%);
  }

  .loan-hero {
    padding: 16px 0 20px;
  }

  .loan-breadcrumb {
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .loan-title-row {
    align-items: flex-start;
    gap: 15px;
  }

  .loan-mark {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .loan-money {
    left: 14px;
    top: 16px;
    width: 34px;
    height: 21px;
    border-width: 2px;
  }

  .loan-money::after {
    font-size: 13px;
  }

  .loan-paper {
    left: 24px;
    top: 31px;
    width: 24px;
    height: 28px;
    border-width: 2px;
  }

  .loan-calc {
    right: 12px;
    bottom: 10px;
    width: 22px;
    height: 30px;
    border-width: 2px;
  }

  .loan-title-row h1 {
    font-size: 34px;
  }

  .loan-title-row p {
    margin-top: 9px;
    font-size: 15px;
  }

  .loan-workspace {
    padding-top: 18px;
  }

  .loan-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .loan-guide-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .loan-guide-tabs button {
    flex: 0 0 auto;
    min-width: 150px;
    padding: 0 16px;
  }

  .loan-tabs button {
    min-width: 0;
    min-height: 54px;
    padding: 0 8px;
    gap: 5px;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
  }

  .loan-form,
  .loan-results {
    padding: 16px;
  }

  .loan-summary-grid,
  .loan-insight-grid,
  .loan-actions-row,
  .loan-related-grid {
    grid-template-columns: 1fr;
  }

  .loan-scenario-strip {
    flex-wrap: wrap;
    overflow: visible;
    padding: 11px 16px;
    scrollbar-width: none;
  }

  .loan-scenario-strip span {
    flex: 1 1 140px;
    justify-content: center;
  }

  .breakdown-legend,
  .chart-legend {
    align-items: flex-start;
    flex-direction: column;
  }
}
