@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-padding-top: 110px;
}

@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.guide-page {
  font-family: "Satoshi", Arial, sans-serif;
  background: #0d1728;
}

.guide-page .site-header {
  z-index: 30;
}

.guide-page .brand img,
.guide-page .site-footer img {
  filter: brightness(0) invert(1);
}

.guide-page .nav-shell {
  background: rgba(13, 28, 52, 0.82);
  border-color: rgba(255, 255, 255, 0.55);
}

.guide-page .desktop-nav a,
.guide-page .mobile-nav a,
.guide-page .menu-toggle {
  color: #f7faff;
}

.guide-page .menu-toggle span {
  background: #f7faff;
}

.guide-page .mobile-nav {
  background: #12233e;
}

.reading-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 50;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #00cdb4, #6b99ff);
  transform-origin: left center;
}

.article-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.article-hero {
  position: relative;
  min-height: 94dvh;
  display: grid;
  align-items: end;
  padding: 150px 0 90px;
  overflow: hidden;
  color: #fff;
  background: #0d1c34;
  isolation: isolate;
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -3;
  background: url("../images/personal-loan-guide-hero.webp") center 58% / cover no-repeat;
  transform: scale(1.04);
  filter: saturate(0.82) contrast(1.08);
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 22%, rgba(34, 88, 196, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(5, 15, 31, 0.2) 0%, rgba(7, 18, 36, 0.78) 58%, #0d1728 100%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.article-hero__inner {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  text-align: center;
}

.article-hero h1 {
  max-width: 1180px;
  margin: 0 auto;
  font-size: clamp(3rem, 6.4vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.article-hero__summary {
  max-width: 820px;
  margin: 30px auto 0;
  color: #dbe7ff;
  font-size: clamp(18px, 1.8vw, 23px);
}

.article-hero__meta {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
  color: #b8c9e1;
  font-size: 15px;
}

.article-hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 34px;
}

.article-hero__actions .button:last-child {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(8, 20, 42, 0.54);
  color: #fff;
  backdrop-filter: blur(12px);
}

.principles {
  padding: 110px 0 70px;
  background: #0d1728;
  color: #eaf1fb;
}

.principles-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

.principles h2,
.quick-compare h2,
.article-cta h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.principle-carousel {
  min-height: 340px;
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid #34465f;
  border-radius: 22px;
  background: linear-gradient(145deg, #14243d, #101d31);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.principle-slide {
  display: none;
  margin: 0;
}

.principle-slide.is-active {
  display: block;
}

.principle-slide blockquote {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.principle-slide figcaption {
  margin-top: 28px;
  color: #86aaff;
  font-weight: 700;
}

.principle-controls {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.principle-controls button {
  padding: 10px 16px;
  border: 1px solid #4a5f7c;
  border-radius: 999px;
  background: transparent;
  color: #eaf1fb;
  cursor: pointer;
}

.quick-compare {
  padding: 100px 0 150px;
  background: #0d1728;
  color: #eaf1fb;
}

.quick-compare h2 {
  max-width: 820px;
  margin-bottom: 54px;
}

.quick-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #34465f;
  border-radius: 22px;
  background: #34465f;
}

.quick-compare-card {
  min-height: 220px;
  padding: 34px;
  background: #122039;
  transition: background 0.35s ease, transform 0.35s ease;
}

.quick-compare-card:hover {
  position: relative;
  z-index: 1;
  background: #17305d;
  transform: scale(1.018);
}

.quick-compare-card strong {
  display: block;
  margin-bottom: 18px;
  color: #6b99ff;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quick-compare-card p {
  margin: 0;
  color: #c8d5e8;
  font-size: 20px;
  line-height: 1.45;
}

.article-reading {
  padding: 140px 0;
  background: #f4f7fb;
  color: #10213d;
}

.article-layout {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 270px minmax(0, 820px);
  justify-content: space-between;
  gap: 80px;
  align-items: start;
}

.reading-rail {
  align-self: start;
}

.reading-rail h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.reading-rail p {
  margin: 22px 0 0;
  color: #52647d;
}

.reading-rail a {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
}

.article-body {
  min-width: 0;
  font-size: 19px;
  line-height: 1.72;
}

.article-body > p:first-child {
  margin-top: 0;
  font-size: 26px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: #203653;
}

.article-body p,
.article-body li {
  color: #415570;
}

.article-body h2 {
  margin: 126px 0 30px;
  padding-top: 20px;
  font-size: clamp(2.35rem, 4.2vw, 4.45rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.article-body h3 {
  margin: 54px 0 16px;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.article-body h2[id],
.article-body h3[id] {
  scroll-margin-top: 118px;
}

.article-body a {
  color: #174fc8;
  font-weight: 600;
  text-decoration-thickness: 1.5px;
}

.article-body p a,
.guide-faq p a {
  font-weight: 400;
}

.article-body ul,
.article-body ol {
  padding-left: 25px;
}

.article-body li + li {
  margin-top: 10px;
}

.article-figure {
  display: block;
  margin: 54px 0;
}

.article-body img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(14, 46, 103, 0.15);
}

.cf-toc {
  margin: 42px 0;
  overflow-x: auto;
  border: 1px solid #cfd9e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(14, 46, 103, 0.08);
}

.cf-toc table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.cf-toc th,
.cf-toc td {
  padding: 17px 18px;
  border-bottom: 1px solid #dde5ef;
  text-align: left;
  vertical-align: top;
}

.cf-toc th {
  background: #eaf0f8;
  color: #10213d !important;
}

.cf-toc tr:last-child td {
  border-bottom: 0;
}

.cf-toc ol {
  columns: 2;
  column-gap: 56px;
  margin: 0;
  padding: 28px 28px 28px 52px;
}

.cf-toc ol li {
  break-inside: avoid;
  margin: 0 0 10px;
}

.horizontal-accordion {
  display: flex;
  min-height: 560px;
  margin: 48px 0;
  overflow: hidden;
  border: 1px solid #cfd9e7;
  border-radius: 20px;
}

.loan-type-panel {
  position: relative;
  flex: 0 0 78px;
  min-width: 0;
  padding: 30px 24px;
  overflow: hidden;
  border: 0;
  border-right: 1px solid #cfd9e7;
  background: #eaf0f8;
  color: #10213d;
  text-align: left;
  transition: flex 0.55s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease;
}

.loan-type-panel:last-child {
  border-right: 0;
}

.loan-type-panel.is-active {
  flex: 1 1 auto;
  background: #fff;
}

.loan-type-trigger {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.loan-type-trigger span {
  display: block;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.08;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.loan-type-panel.is-active .loan-type-trigger span {
  font-size: 26px;
  writing-mode: horizontal-tb;
  transform: none;
}

.loan-type-copy {
  width: min(420px, calc(100vw - 110px));
  margin-top: 24px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.loan-type-panel.is-active .loan-type-copy {
  opacity: 1;
  transform: none;
}

.loan-type-copy p {
  color: #52647d;
}

.guide-faqs {
  margin-top: 34px;
}

.guide-faq {
  border: 1px solid #cfd9e7;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.guide-faq + .guide-faq {
  margin-top: 12px;
}

.guide-faq summary {
  position: relative;
  padding: 24px 62px 24px 24px;
  list-style: none;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.guide-faq summary::-webkit-details-marker {
  display: none;
}

.guide-faq summary::after {
  content: "+";
  position: absolute;
  top: 17px;
  right: 24px;
  color: #174fc8;
  font-size: 30px;
  font-weight: 400;
}

.guide-faq[open] summary::after {
  content: "−";
}

.guide-faq > div {
  padding: 0 24px 24px;
}

.article-cta {
  padding: 150px 0;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 80% 10%, rgba(0, 205, 180, 0.2), transparent 35%),
    linear-gradient(135deg, #0033aa, #174fc8);
}

.article-cta h2 {
  max-width: 930px;
  margin-inline: auto;
}

.article-cta p {
  max-width: 680px;
  margin: 26px auto 34px;
  color: #dbe7ff;
  font-size: 20px;
}

.article-cta .button {
  border-color: #fff;
  background: #fff;
  color: #0033aa;
}

.guide-page .site-footer {
  color: #eaf1fb;
  background: #0d1728;
  border-color: #273a55;
}

.guide-page .site-footer p,
.guide-page .footer-base {
  color: #aebdd0;
}

.guide-page .site-footer a {
  color: #eaf1fb;
}

@media (max-width: 1080px) {
  .article-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 52px;
  }
}

@media (max-width: 980px) {
  .principles-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .reading-rail {
    padding-bottom: 34px;
    border-bottom: 1px solid #cfd9e7;
  }

  .quick-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .article-hero {
    min-height: 780px;
    padding: 118px 0 72px;
  }

  .article-hero__inner,
  .article-layout {
    width: min(100% - 32px, 680px);
  }

  .article-hero h1 {
    font-size: clamp(2.75rem, 13vw, 4.2rem);
    line-height: 0.98;
  }

  .article-hero__meta,
  .article-hero__actions {
    align-items: center;
    flex-direction: column;
  }

  .principles,
  .quick-compare,
  .article-reading,
  .article-cta {
    padding-block: 88px;
  }

  .principle-carousel {
    min-height: 320px;
  }

  .quick-compare-grid {
    grid-template-columns: 1fr;
  }

  .quick-compare-card {
    min-height: 0;
  }

  .article-body {
    font-size: 17px;
  }

  .article-body > p:first-child {
    font-size: 22px;
  }

  .article-body h2 {
    margin-top: 90px;
  }

  .cf-toc ol {
    columns: 1;
  }

  .horizontal-accordion {
    display: grid;
    min-height: 0;
  }

  .loan-type-panel,
  .loan-type-panel.is-active {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #cfd9e7;
  }

  .loan-type-trigger span,
  .loan-type-panel.is-active .loan-type-trigger span {
    font-size: 22px;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .loan-type-copy {
    width: auto;
    display: none;
    opacity: 1;
    transform: none;
  }

  .loan-type-panel.is-active .loan-type-copy {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-hero::before,
  .loan-type-copy {
    transform: none !important;
  }
}
