.home-page {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  flex-direction: column;
  background: #fdfbf8;
}

.home-header {
  background: rgba(255, 255, 255, 0.96);
}

.home-header-inner {
  display: flex;
  width: 100%;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 36px;
}

.home-header .brand {
  gap: 15px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.home-brand-mark {
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
}

.home-all-tools {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
}

.home-all-tools img {
  width: 23px;
  height: 23px;
}

.home-all-tools:hover {
  color: var(--blue);
}

.directory-page {
  flex: 1;
  padding: 47px 20px 36px;
}

.directory-page:focus {
  outline: none;
}

.directory-content {
  width: min(814px, 100%);
  margin: 0 auto;
}

.directory-intro {
  margin-bottom: 44px;
}

.directory-intro h1 {
  margin: 0;
  color: #102846;
  font-size: clamp(40px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.directory-intro > p:not(.directory-trust) {
  margin: 10px 0 0;
  color: #59677d;
  font-size: 18px;
}

.directory-intro .directory-trust {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 0;
  color: #59677d;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}

.directory-trust img {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.directory-trust-detail,
.directory-notice span {
  white-space: nowrap;
}

.tool-directory {
  scroll-margin-top: 104px;
}

.compact-category {
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 24px rgba(36, 58, 94, 0.06);
}

.compact-category + .compact-category {
  margin-top: 22px;
}

.compact-category-heading {
  display: grid;
  min-height: 64px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #d7e3f5;
  background: #eef4ff;
}

.compact-category-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: white;
}

.compact-category-icon img {
  width: 22px;
  height: 22px;
}

.compact-category-heading h2 {
  margin: 0;
  color: #29476f;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.compact-category-count {
  display: grid;
  min-width: 30px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #58749c;
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.compact-calculator-link {
  display: grid;
  min-height: 102px;
  grid-template-columns: 64px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 32px;
  padding: 16px 26px 16px 24px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.compact-calculator-link + .compact-calculator-link {
  border-top: 1px solid #e1e6ed;
}

.compact-calculator-link:hover {
  background: #f9fbff;
}

.compact-calculator-link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(53, 109, 243, 0.28);
}

.tool-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 13px;
  background: #f3f5f9;
}

.tool-icon img {
  width: 38px;
  height: 38px;
}

.tool-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.compact-calculator-link strong {
  color: #102846;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.compact-calculator-link small {
  color: #637087;
  font-size: 15px;
  line-height: 1.55;
}

.tool-arrow {
  width: 24px;
  height: 24px;
  transition: transform 0.15s ease;
}

.compact-calculator-link:hover .tool-arrow {
  transform: translateX(2px);
}

.directory-notice {
  margin: 13px 0 0;
  color: #68758a;
  font-size: 13px;
  line-height: 1.65;
}

.home-footer .home-footer-inner {
  width: min(1344px, calc(100% - 72px));
}

.home-footer {
  font-size: 14px;
}

@media (max-width: 900px) {
  .home-header-inner {
    padding-inline: 20px;
  }

  .directory-page {
    padding-inline: 18px;
  }

  .home-footer .home-footer-inner {
    width: min(100% - 40px, 814px);
  }
}

@media (max-width: 700px) {
  .home-header-inner {
    min-height: 64px;
    gap: 14px;
    padding-inline: 12px;
  }

  .home-header .brand {
    gap: 9px;
    font-size: 18px;
  }

  .home-brand-mark {
    width: 38px;
    height: 38px;
  }

  .home-all-tools {
    min-height: 44px;
    gap: 5px;
    font-size: 13px;
  }

  .home-all-tools img {
    width: 19px;
    height: 19px;
  }

  .directory-page {
    padding: 30px 11px 38px;
  }

  .directory-intro {
    margin-bottom: 27px;
  }

  .directory-intro h1 {
    font-size: 31px;
  }

  .directory-intro > p:not(.directory-trust) {
    margin-top: 7px;
    font-size: 14px;
  }

  .directory-intro .directory-trust {
    align-items: flex-start;
    margin-top: 13px;
    font-size: 13px;
  }

  .directory-trust img {
    width: 19px;
    height: 19px;
    margin-top: 1px;
  }

  .tool-directory {
    scroll-margin-top: 82px;
  }

  .compact-category-heading {
    min-height: 60px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 11px 14px;
  }

  .compact-category-icon {
    width: 36px;
    height: 36px;
  }

  .compact-category-icon img {
    width: 21px;
    height: 21px;
  }

  .compact-category-heading h2 {
    font-size: 16px;
  }

  .compact-calculator-link {
    min-height: 92px;
    grid-template-columns: 48px minmax(0, 1fr) 20px;
    gap: 13px;
    padding: 13px 13px 13px 14px;
  }

  .tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 11px;
  }

  .tool-icon img {
    width: 27px;
    height: 27px;
  }

  .compact-calculator-link strong {
    font-size: 15px;
    line-height: 1.45;
  }

  .compact-calculator-link small {
    font-size: 12px;
    line-height: 1.5;
  }

  .tool-arrow {
    width: 20px;
    height: 20px;
  }

  .directory-notice {
    margin-top: 14px;
    font-size: 12px;
  }

  .home-footer .home-footer-inner {
    width: calc(100% - 24px);
    padding: 20px 0;
  }

}

/* 390px 미만 초소형 화면에서는 강제 줄바꿈 금지를 풀어 가로 넘침을 막습니다. */
@media (max-width: 374px) {
  .directory-trust-detail,
  .directory-notice span {
    white-space: normal;
  }
}
