:root {
  --navy-950: #081b32;
  --navy-900: #102847;
  --navy-800: #17385f;
  --blue-700: #155eef;
  --blue-600: #2874f0;
  --blue-100: #eaf3ff;
  --teal-600: #0c9a8b;
  --teal-100: #e7f8f5;
  --coral-600: #f04467;
  --coral-100: #fff0f3;
  --purple-600: #805ad5;
  --purple-100: #f3efff;
  --orange-600: #f79009;
  --orange-100: #fff4e5;
  --indigo-100: #eef0ff;
  --text: #17243a;
  --muted: #667085;
  --line: #dfe5ec;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --surface-blue: #f5f9ff;
  --shadow-sm: 0 8px 28px rgba(16, 40, 71, 0.07);
  --shadow-md: 0 20px 52px rgba(16, 40, 71, 0.12);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

img,
iframe {
  max-width: 100%;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -80px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--navy-900);
  font-weight: 800;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(16, 40, 71, 0.98);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: var(--content);
  min-height: 68px;
  margin: 0 auto;
  padding: 10px 24px;
  display: grid;
  grid-template-columns: auto minmax(220px, 340px) 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand img,
.footer-brand img {
  border-radius: 9px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.2);
}

.header-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.header-search {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
}

.header-search span,
.hero-search span {
  color: #718096;
  font-size: 23px;
  line-height: 1;
}

.header-search input,
.hero-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.header-search:focus-within,
.hero-search:focus-within {
  border-color: #8cb7ff;
  box-shadow: 0 0 0 4px rgba(40, 116, 240, 0.16), var(--shadow-sm);
}

.primary-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav a {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.menu-button {
  display: none;
  justify-self: end;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(40, 116, 240, 0.09), transparent 31%),
    radial-gradient(circle at 86% 78%, rgba(12, 154, 139, 0.06), transparent 28%),
    linear-gradient(180deg, #fff 0%, #f9fbff 100%);
  border-bottom: 1px solid #eef2f6;
}

.hero::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -320px;
  top: -280px;
  border: 80px solid rgba(40, 116, 240, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 24px 60px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--blue-700);
  font-style: normal;
}

.hero-copy {
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 18px;
}

.hero-search {
  max-width: 670px;
  min-height: 58px;
  margin: 0 auto;
  padding: 0 20px;
  border-color: #d9e1ec;
  border-radius: 14px;
  text-align: left;
}

.hero-search input {
  font-size: 16px;
}

.quick-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-links > span {
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
}

.quick-links a {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  background: var(--blue-700);
  color: #fff;
}

.section {
  padding: 72px 24px;
}

.section-inner {
  max-width: var(--content);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-heading.compact {
  margin-bottom: 26px;
}

.section-heading h2,
.app-copy h2,
.content-title {
  margin: 0;
  color: var(--navy-950);
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--muted);
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.calculator-card {
  min-height: 118px;
  padding: 20px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.calculator-card:hover,
.calculator-card:focus-visible {
  transform: translateY(-3px);
  border-color: #b7cff6;
  box-shadow: var(--shadow-md);
  outline: none;
}

.tool-icon,
.category-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 22px;
}

.icon-blue { background: var(--blue-100); color: var(--blue-700); }
.icon-teal { background: var(--teal-100); color: var(--teal-600); }
.icon-coral { background: var(--coral-100); color: var(--coral-600); }
.icon-purple { background: var(--purple-100); color: var(--purple-600); font-size: 14px; }
.icon-orange { background: var(--orange-100); color: var(--orange-600); }

.tool-copy {
  min-width: 0;
  display: block;
}

.tool-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy-950);
  font-size: 17px;
  letter-spacing: -0.025em;
}

.tool-copy small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.card-chevron {
  color: #77869a;
  font-size: 28px;
}

.section-categories {
  padding-top: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 40, 71, 0.04);
}

.category-card h3 {
  margin: 0;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #f5f9ff, #eef5ff);
  color: var(--navy-900);
  font-size: 17px;
}

.category-card:nth-child(2) h3,
.category-card:nth-child(5) h3 { background: linear-gradient(135deg, #f2fcfa, #e8f7f5); }
.category-card:nth-child(3) h3 { background: linear-gradient(135deg, #f7f7ff, #eef0ff); }
.category-card:nth-child(4) h3 { background: linear-gradient(135deg, #fff7f8, #fff0f3); }

.category-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
}

.cat-blue { background: var(--blue-600); }
.cat-teal { background: var(--teal-600); }
.cat-indigo { background: #5965d8; }
.cat-coral { background: var(--coral-600); }

.category-card > a {
  min-height: 52px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0f4;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.category-card > a:hover,
.category-card > a:focus-visible {
  background: var(--surface-blue);
  color: var(--blue-700);
  outline: none;
}

.category-card > a span {
  font-size: 21px;
  font-weight: 400;
}

.ad-placeholder {
  max-width: var(--content);
  min-height: 92px;
  margin: 4px auto 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c8d0dc;
  border-radius: var(--radius-sm);
  background: #f7f8fa;
  color: #7a8594;
  text-align: center;
}

.ad-placeholder span {
  font-weight: 800;
}

.ad-placeholder small {
  margin-top: 2px;
}

.section-principles {
  padding-top: 60px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.principle-card {
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.principle-card > span {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 23px;
  font-weight: 800;
}

.principle-card:nth-child(2) > span {
  background: var(--teal-100);
  color: var(--teal-600);
}

.principle-card h3 {
  margin: 0 0 7px;
  color: var(--navy-950);
  font-size: 17px;
}

.principle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.app-promo {
  margin-top: 10px;
  padding: 0 24px 80px;
}

.app-promo-inner {
  position: relative;
  min-height: 330px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 52px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dfe9f7;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 84% 30%, rgba(40, 116, 240, 0.15), transparent 35%),
    linear-gradient(135deg, #f8fbff, #eaf3ff);
}

.app-copy {
  position: relative;
  z-index: 2;
}

.app-copy p:not(.section-kicker) {
  max-width: 560px;
  margin: 16px 0 26px;
  color: #536176;
  font-size: 17px;
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 20px;
  border-radius: 12px;
  background: var(--navy-900);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(16, 40, 71, 0.2);
}

.play-button > span:first-child {
  color: #7fd5c9;
  font-size: 24px;
}

.play-button small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.1;
}

.play-button:hover,
.play-button:focus-visible {
  background: var(--blue-700);
  outline: 4px solid rgba(40, 116, 240, 0.18);
}

.app-preview {
  position: absolute;
  right: 60px;
  top: 28px;
  width: 232px;
  height: 410px;
}

.phone-shell {
  width: 100%;
  height: 100%;
  padding: 9px;
  border-radius: 35px;
  background: #101723;
  box-shadow: 0 24px 52px rgba(16, 40, 71, 0.25), inset 0 0 0 2px #34445a;
}

.phone-shell iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  border-radius: 27px;
  background: #f5f6f8;
}

.site-footer {
  background: var(--navy-900);
  color: #fff;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 32px 24px 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand strong {
  font-size: 18px;
}

.footer-brand span {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.site-footer nav {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.site-footer nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  text-decoration: none;
}

.site-footer nav a:hover,
.site-footer nav a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer p {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.search-empty {
  margin: 18px 0 0;
  padding: 18px;
  border-radius: 12px;
  background: #fff8e8;
  color: #7a4f01;
  text-align: center;
}

/* Calculator and policy pages */
.subpage-header .header-inner {
  grid-template-columns: auto 1fr;
}

.subpage-header .primary-nav {
  justify-self: end;
}

.page-shell {
  min-height: 70vh;
  background: var(--surface-soft);
  padding: 44px 24px 80px;
}

.breadcrumb {
  max-width: var(--content);
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue-700);
  text-decoration: none;
}

.calculator-layout {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 760px) 300px;
  align-items: start;
  gap: 28px;
}

.calculator-main,
.content-page {
  min-width: 0;
}

.calculator-intro,
.content-card,
.tool-frame,
.custom-calculator,
.side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.calculator-intro {
  padding: 30px;
}

.calculator-intro .content-title {
  margin-bottom: 10px;
}

.calculator-intro > p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.tool-frame {
  margin-top: 18px;
  padding: 14px;
}

.tool-frame iframe {
  width: 100%;
  min-height: 760px;
  display: block;
  border: 0;
  border-radius: 12px;
  background: #f4f5f7;
}

.custom-calculator {
  margin-top: 18px;
  padding: 26px;
}

.custom-calculator h2 {
  margin: 0 0 20px;
  font-size: 22px;
}

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

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label {
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd7e2;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(40, 116, 240, 0.14);
}

.primary-button {
  min-height: 50px;
  margin-top: 18px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--blue-700);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #0e4fcf;
  outline: 4px solid rgba(40, 116, 240, 0.16);
}

.result-box {
  margin-top: 20px;
  padding: 22px;
  border-radius: 14px;
  background: var(--navy-900);
  color: #fff;
}

.result-box small {
  display: block;
  color: rgba(255, 255, 255, 0.7);
}

.result-box strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.result-details {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.content-card {
  margin-top: 18px;
  padding: 30px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: var(--navy-950);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.content-card h3 {
  margin: 26px 0 10px;
  color: var(--navy-900);
  font-size: 18px;
}

.content-card p,
.content-card li {
  color: #4f5e73;
}

.formula-box {
  padding: 16px 18px;
  border-left: 4px solid var(--blue-600);
  border-radius: 0 10px 10px 0;
  background: var(--blue-100);
  color: var(--navy-900);
  font-weight: 800;
}

.notice-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #fff8e8;
  color: #76520a;
  font-size: 14px;
}

.calculator-side {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 20px;
}

.side-card + .side-card {
  margin-top: 16px;
}

.side-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.side-card a {
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0f4;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.side-card a:hover,
.side-card a:focus-visible {
  color: var(--blue-700);
}

.side-ad {
  min-height: 250px;
}

.content-page {
  max-width: 860px;
  margin: 0 auto;
}

.content-page .content-card {
  margin-top: 0;
}

.content-page h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.content-page h2 {
  margin-top: 34px;
}

.policy-date {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1040px) {
  .header-inner {
    grid-template-columns: auto minmax(180px, 1fr) auto;
    gap: 16px;
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .primary-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    padding: 18px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-radius: 14px;
    background: var(--navy-900);
    box-shadow: var(--shadow-md);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav a {
    padding: 9px;
    border-radius: 8px;
    text-align: center;
  }

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

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

  .calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .calculator-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
  }

  .side-card + .side-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 62px;
    padding: 9px 16px;
    grid-template-columns: auto 1fr auto;
  }

  .brand span {
    font-size: 19px;
  }

  .header-search {
    display: none;
  }

  .hero-inner {
    padding: 52px 20px 44px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .section {
    padding: 56px 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .calculator-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

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

  .ad-placeholder {
    margin-left: 18px;
    margin-right: 18px;
  }

  .app-promo {
    padding: 0 18px 60px;
  }

  .app-promo-inner {
    min-height: 620px;
    padding: 40px 28px;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-preview {
    left: 50%;
    right: auto;
    top: 295px;
    transform: translateX(-50%);
    width: 210px;
    height: 390px;
  }

  .footer-brand {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .footer-brand span {
    flex-basis: 100%;
    margin-left: 0;
  }

  .page-shell {
    padding: 30px 16px 60px;
  }

  .calculator-intro,
  .content-card,
  .custom-calculator {
    padding: 22px;
  }

  .form-grid,
  .calculator-side {
    grid-template-columns: 1fr;
  }

  .tool-frame {
    padding: 8px;
  }

  .tool-frame iframe {
    min-height: 700px;
  }
}

@media (max-width: 500px) {
  .primary-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 33px;
  }

  .hero-search {
    min-height: 54px;
    padding: 0 16px;
  }

  .quick-links > span {
    flex-basis: 100%;
  }

  .calculator-card {
    min-height: 104px;
    padding: 17px;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
  }

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

  .category-grid {
    grid-template-columns: 1fr;
  }

  .principle-card {
    padding: 20px;
  }

  .app-promo-inner {
    padding: 34px 22px;
  }

  .app-copy h2 {
    font-size: 28px;
  }

  .app-preview {
    top: 310px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== 계산기 설명 접기/펼치기(콜랩스) ===== */

/* 설명 카드 상단: 제목과 전체 접기/펼치기 버튼을 양끝에 배치 */
.collapse-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.collapse-toolbar h2 {
  margin: 0;
}

/* 전체 접기/펼치기 버튼 */
.collapse-all {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.collapse-all:hover,
.collapse-all:focus-visible {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

/* 접기/펼치기 한 구역: 구역 사이에 구분선 표시 */
.collapse {
  border-top: 1px solid #edf0f4;
}

/* 구역 제목 줄(클릭 영역): 기본 삼각형 표시는 숨기고 직접 만든 표시를 사용 */
.collapse > summary {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.collapse > summary::-webkit-details-marker {
  display: none;
}

.collapse > summary h3 {
  margin: 0;
}

.collapse > summary:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 4px;
  border-radius: 6px;
}

/* 오른쪽 상태 표시: 접힌 상태에서는 "펼치기", 펼쳐진 상태에서는 "접기" */
.collapse-state {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
}

.collapse-state::before {
  content: "\D3BC \CE58 \AE30";
}

.collapse[open] > summary .collapse-state::before {
  content: "\C811 \AE30";
}

/* 상태 표시 옆 화살표: 펼쳐지면 위쪽을 향하도록 회전 */
.collapse-state::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.collapse[open] > summary .collapse-state::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

/* 펼쳐진 본문 여백 */
.collapse-body {
  padding-bottom: 18px;
}

.collapse-body > :first-child {
  margin-top: 0;
}

.collapse-body > :last-child {
  margin-bottom: 0;
}

/* 인쇄할 때는 버튼과 상태 표시를 숨긴다 */
@media print {
  .collapse-all,
  .collapse-state {
    display: none;
  }
}

/* ===== 계산기 설명 본문(표, 입력값 목록, 자주 묻는 질문, 자료 출처) ===== */

/* 접기 구역 안의 소제목 */
.collapse-body h4 {
  margin: 24px 0 8px;
  color: var(--navy-900);
  font-size: 16px;
}

/* 본문 목록의 줄 간격 */
.collapse-body ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.collapse-body li {
  margin: 6px 0;
}

/* 표를 감싸는 영역: 좁은 화면에서는 표만 가로로 스크롤 */
.table-wrap {
  margin-top: 10px;
  overflow-x: auto;
}

/* 설명용 표 */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.info-table th,
.info-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e6eaf0;
  color: #4f5e73;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background: #f5f7fa;
  color: var(--navy-900);
  font-weight: 800;
  white-space: nowrap;
}

.info-table td strong {
  color: var(--navy-900);
}

/* 입력값 설명 목록: 항목 이름과 설명을 두 칸으로 배치 */
.collapse-body .def-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.collapse-body .def-list li {
  margin: 0;
  padding: 11px 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
}

.def-list strong {
  color: var(--navy-900);
}

/* 자주 묻는 질문 한 묶음 */
.faq-item {
  padding: 16px 0;
  border-top: 1px solid #edf0f4;
}

.faq-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq-item:last-child {
  padding-bottom: 0;
}

.collapse-body .faq-item h4 {
  margin: 0 0 6px;
}

.faq-item h4::before {
  content: "Q. ";
  color: var(--blue-700);
}

.faq-item p {
  margin: 0;
}

/* 자료 출처의 최종 검토일 */
.review-date {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

/* 좁은 화면: 입력값 목록을 한 칸으로 */
@media (max-width: 640px) {
  .collapse-body .def-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ===== HTML 계산기 공통 요소 ===== */

/* 선택 버튼 묶음: 몇 가지 중 하나를 고르는 버튼 줄 */
.option-group {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-grid + .option-group {
  margin-top: 18px;
  margin-bottom: 0;
}

.option-group legend {
  margin-bottom: 8px;
  padding: 0;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.option-chip {
  cursor: pointer;
}

/* 실제 라디오 버튼은 숨기고 글자 영역을 버튼처럼 보이게 한다 */
.option-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-chip span {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd7e2;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
}

.option-chip input:checked + span {
  border-color: var(--blue-700);
  background: var(--blue-100);
  color: var(--blue-700);
}

.option-chip input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(40, 116, 240, 0.14);
}

/* 숨김 처리한 입력 칸은 격자 배치에서도 보이지 않게 한다 */
.custom-calculator [hidden] {
  display: none !important;
}

/* 입력 칸 세 개를 한 줄에 놓는 격자 */
.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 입력 칸 아래의 보조 안내 (금액의 한글 단위 등) */
.input-hint {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

p.input-hint {
  margin: 14px 0 0;
}

.form-field input:disabled {
  background: #f2f4f7;
  color: #98a2b3;
}

/* 체크 상자 한 줄 */
.check-field {
  margin: 14px 0 0;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
}

/* 버튼 여러 개를 나란히 놓는 줄 */
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* 보조 버튼 (단위·통화 서로 바꾸기) */
.secondary-button {
  min-height: 50px;
  margin-top: 18px;
  padding: 0 18px;
  border: 1px solid #cfd7e2;
  border-radius: 10px;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.primary-button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

/* 입력 오류 안내 */
.form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--coral-100);
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

/* 결과 상자의 큰 글자가 길어도 넘치지 않게 한다 */
.result-box strong {
  overflow-wrap: anywhere;
}

/* 결과 요약 수치 */
.result-stats {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.result-stats div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.result-stats dt {
  color: var(--muted);
  font-size: 13px;
}

.result-stats dd {
  margin: 4px 0 0;
  color: var(--navy-950);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

/* 결과 아래에 붙는 표: 길어지면 표 안에서 스크롤 */
.schedule {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.schedule > summary {
  padding: 14px 16px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.schedule-scroll {
  max-height: 360px;
  overflow: auto;
}

details.schedule .schedule-scroll {
  border-top: 1px solid var(--line);
}

.schedule .info-table th {
  position: sticky;
  top: 0;
}

.schedule .info-table tr:last-child td {
  border-bottom: 0;
}

/* 숫자 표: 오른쪽 정렬과 같은 폭 숫자 */
.number-table th,
.number-table td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.number-table th:first-child,
.number-table td:first-child {
  text-align: left;
}

/* 긴 값을 담는 표: 칸 안에서 줄바꿈 */
.wrap-table td:last-child {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.unit-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.unit-table th:last-child {
  text-align: right;
}

@media (max-width: 640px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* 옆 칸에 보조 안내가 있어도 입력 요소의 높이가 늘어나지 않게 위쪽으로 정렬 */
.custom-calculator .form-field {
  align-content: start;
}

/* ===== 홈 검색 안내 ===== */

/* 검색어로 목록을 걸러 보고 있을 때 나타나는 안내 줄 */
.search-notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 700;
}

.search-notice button {
  margin-left: 8px;
  padding: 4px 12px;
  border: 1px solid var(--blue-700);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-700);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* ===== AI 계산기 ===== */

/* 홈 화면의 AI 계산기 구역 */
.ai-section {
  padding-top: 8px;
  padding-bottom: 8px;
}

.ai-banner {
  padding: 30px;
  border: 1px solid #d5deff;
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, #f3f6ff 0%, #eaf3ff 100%);
}

.ai-banner h2 {
  margin: 0 0 8px;
  color: var(--navy-950);
  font-size: 26px;
  letter-spacing: -0.04em;
}

.ai-banner-copy > p:last-child {
  margin: 0;
  color: #4f5e73;
}

/* 홈 화면 안의 대화 영역 */
.ai-inline {
  margin-top: 20px;
}

/* 답변이 표시되는 영역 */
.ai-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.ai-inline .ai-messages {
  max-height: 440px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #d5deff;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

/* 예시 질문 버튼 */
.ai-examples {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-example {
  padding: 9px 14px;
  border: 1px solid #cfd7e2;
  border-radius: 999px;
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ai-example:hover,
.ai-example:focus-visible {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

/* 말풍선 */
.ai-message {
  max-width: 88%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
}

.ai-message p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ai-message-user {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--blue-700);
  color: #fff;
}

.ai-message-ai,
.ai-message-pending,
.ai-message-error {
  align-self: flex-start;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  background: #fff;
  color: var(--navy-950);
}

.ai-message-pending {
  color: var(--muted);
}

.ai-message-error {
  border-color: #f5c2c7;
  background: var(--coral-100);
  color: #b42318;
}

/* 답변 아래의 수식 줄 */
.ai-message .ai-formula {
  margin-top: 8px;
  padding-top: 8px;
  display: flex;
  gap: 8px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
}

.ai-formula span {
  flex: none;
  color: var(--muted);
  font-weight: 800;
}

.ai-formula code {
  color: var(--navy-800);
  font-family: ui-monospace, Consolas, monospace;
}

/* 질문 입력란: 넓은 입력 칸과 그 아래의 남은 횟수·보내기 버튼을 한 상자로 묶는다 */
.ai-composer {
  padding: 16px 18px 12px;
  border: 1px solid #cfd7e2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 40, 71, 0.06);
}

.ai-composer:focus-within {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(40, 116, 240, 0.14);
}

.ai-input {
  width: 100%;
  min-height: 84px;
  max-height: 220px;
  padding: 0;
  display: block;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.ai-composer-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 남은 질문 횟수 안내 */
.ai-status {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
}

/* 보내기 버튼 */
.ai-send {
  flex: none;
  min-height: 42px;
  padding: 0 8px 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-700);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.ai-send-arrow {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 16px;
}

.ai-send:hover,
.ai-send:focus-visible {
  background: #0e4fcf;
}

.ai-send:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

/* 주의 문구 */
.ai-notice {
  margin: 10px 4px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 화면 오른쪽 아래에 떠 있는 "AI 계산기" 버튼 */
.ai-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-700);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(21, 94, 239, 0.35);
  cursor: pointer;
}

.ai-fab:hover,
.ai-fab:focus-visible {
  background: #0e4fcf;
  outline: 4px solid rgba(40, 116, 240, 0.2);
}

.ai-fab-icon {
  font-size: 17px;
}

/* 계산기 페이지에서 버튼을 누르면 열리는 창 */
.ai-panel {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 70;
  width: min(460px, calc(100vw - 24px));
  height: min(680px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
  box-shadow: 0 24px 60px rgba(8, 27, 50, 0.28);
  overflow: hidden;
}

.ai-panel-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--navy-900);
  color: #fff;
}

.ai-panel-title strong {
  display: block;
  font-size: 16px;
}

.ai-panel-title small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.ai-panel-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* 창 안쪽: 답변 영역이 남는 높이를 채우고 입력란은 아래에 붙는다 */
.ai-panel-body {
  flex: 1;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.ai-panel-body .ai-messages {
  flex: 1;
  min-height: 0;
  margin-bottom: 12px;
  padding-right: 2px;
}

.ai-panel-body .ai-examples {
  margin-top: auto;
}

.ai-panel-body .ai-messages:not([hidden]) + .ai-examples {
  margin-top: 0;
}

@media (max-width: 760px) {
  .ai-banner {
    padding: 22px 18px;
  }

  .ai-fab {
    right: 14px;
    bottom: 14px;
  }

  /* 좁은 화면에서는 창이 화면 폭을 채운다 */
  .ai-panel {
    right: 8px;
    left: 8px;
    bottom: 76px;
    width: auto;
    height: min(600px, calc(100vh - 96px));
  }
}

@media print {
  .ai-fab,
  .ai-panel {
    display: none !important;
  }
}

/* ===== 숨김 처리 공통 규칙 ===== */

/* hidden 속성이 붙은 요소는 항상 숨긴다.
   (카드처럼 display 를 따로 지정한 요소는 이 규칙이 없으면 hidden 이어도 화면에 남아,
    검색할 때 인기 계산기는 그대로 보이고 카테고리만 사라지는 것처럼 보였다) */
[hidden] {
  display: none !important;
}

/* ===== 2026년 10월 16일 추가: 새 분류, 정보 모음, 그래프 ===== */

/* 분류 카드 머리글 색: 카드 순서가 바뀌어도 분류마다 같은 색이 되도록 id 로 지정한다 */
#living h3 { background: linear-gradient(135deg, #f5f9ff, #eef5ff); }
#finance h3, #convert h3 { background: linear-gradient(135deg, #f2fcfa, #e8f7f5); }
#work h3 { background: linear-gradient(135deg, #fff8f0, #fff1e3); }
#date h3 { background: linear-gradient(135deg, #f7f7ff, #eef0ff); }
#health h3 { background: linear-gradient(135deg, #fff7f8, #fff0f3); }
#realestate h3 { background: linear-gradient(135deg, #f3fbf5, #e7f6ec); }
.cat-orange { background: #e07a1f; }
.cat-green { background: #2e9d5b; }

/* 머리글 메뉴: 항목이 늘어나 넓은 화면에서도 간격을 조금 줄인다 */
@media (min-width: 1041px) {
  .primary-nav { gap: 18px; }
  .primary-nav a { font-size: 14px; white-space: nowrap; }
}

/* 정보 모음 목록 */
.info-intro { margin-bottom: 18px; }
.section-info { padding-top: 12px; }
.section-heading p a { color: var(--blue-700); font-weight: 800; }

/* 막대그래프 (최저임금 추이) */
.chart-figure {
  margin: 0 0 18px;
  padding: 14px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}
.bar-chart { display: block; width: 100%; height: auto; }
.chart-grid { stroke: #e3e8ef; stroke-width: 1; }
.chart-axis { fill: #667085; font-size: 12px; }
.chart-bar { fill: #6f9de8; }
.chart-bar.is-current { fill: var(--blue-600); }
.chart-figure figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; }
/* 좁은 화면에서는 그래프가 줄어드는 만큼 축 글자를 키운다 */
@media (max-width: 640px) {
  .chart-axis { font-size: 22px; }
}

/* 연봉별 실수령액 표: 1,000만 원 단위 행 강조 */
.salary-table th, .salary-table td { padding-left: 10px; padding-right: 10px; }
.salary-table .row-mark td { font-weight: 800; background: #f5f8fe; }

/* 정보 모음 카드는 두 줄로 배치 (좁은 화면은 한 줄) */
.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .info-grid { grid-template-columns: minmax(0, 1fr); }
}
