@font-face {
  font-family: "Pretendard Variable";
  src: url("../fonts/pretendard/PretendardVariable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
}

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

@font-face {
  font-family: "MaruBuri";
  src: url("../fonts/maruburi/MaruBuri-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

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

:root {
  /* 2026-08-04 스톤 그레이 리브랜딩: 변수명은 유지하고 값만 새 팔레트로 교체 */
  --navy-950: #201e19;
  --navy-900: #2b2822;
  --navy-700: #4a473e;
  --navy-500: #726e62;
  --navy-200: #d8d5cb;
  --navy-100: #ece9e1;
  --mint-700: #2f6d4f;
  --mint-600: #266f51;
  --mint-500: #2f6d4f;
  --mint-100: #e4eae6;
  --mint-50: #edeee9;
  --white: #f2f1ea;
  --page-bg: #e7e5df;
  --warning-bg: #fbefdd;
  --warning-border: #b8722c;
  --danger: #b23b3b;
  --brand: #b8722c;
  --brand-bold: #c1560b;
  --brand-ink: #fff8ee;
  --font-serif: "MaruBuri", "Batang", serif;
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  --shadow: 0 12px 30px rgba(32, 30, 25, 0.12);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content: 720px;
  --hub: 960px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--page-bg);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 31px,
    rgba(32, 30, 25, 0.055) 31px,
    rgba(32, 30, 25, 0.055) 32px
  );
  color: var(--navy-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--navy-100);
  background: rgba(231, 229, 223, 0.97);
}

.header-inner {
  width: min(100% - 32px, var(--hub));
  margin: 0 auto;
  padding: 13px 0 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy-950);
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-bold);
  color: var(--brand-ink);
  font-size: 17px;
  font-weight: 900;
}

.header-tagline {
  display: none;
  color: var(--navy-500);
  font-size: 13px;
}

.calculator-nav {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.calculator-nav::-webkit-scrollbar {
  display: none;
}

.calculator-nav a {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.calculator-nav a:hover,
.calculator-nav a:focus-visible,
.calculator-nav a[aria-current="page"] {
  background: var(--navy-100);
  color: var(--navy-950);
}

.page-shell {
  width: min(100% - 32px, var(--content));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hub-shell {
  width: min(100% - 32px, var(--hub));
  margin: 0 auto;
  padding: 42px 0 72px;
}

.page-heading {
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--navy-950);
  font-family: var(--font-serif);
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 16px;
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.lead {
  margin-bottom: 0;
  color: var(--navy-700);
  font-size: 16px;
}

.panel {
  margin-bottom: 20px;
  padding: 22px 18px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.panel-title-row,
.result-title-row,
.section-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.field-grid {
  display: grid;
  gap: 16px;
}

.field-grid.two,
.field-grid.three {
  grid-template-columns: 1fr;
}

.field {
  min-width: 0;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 750;
}

.input-wrap {
  position: relative;
}

.input-wrap input,
.input-wrap select,
input.control,
select.control {
  width: 100%;
  min-height: 50px;
  padding: 11px 48px 11px 13px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--white);
  color: var(--navy-950);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-wrap select,
select.control {
  padding-right: 34px;
}

.input-wrap input:focus,
.input-wrap select:focus,
input.control:focus,
select.control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 114, 44, 0.16);
}

.unit {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--navy-500);
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  transform: translateY(-50%);
}

.hint,
.microcopy {
  margin: 7px 0 0;
  color: var(--navy-500);
  font-size: 13px;
}

.segmented,
.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 12px;
  background: var(--navy-100);
}

.segmented button,
.tabs button {
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.segmented button[aria-pressed="true"],
.tabs button[aria-selected="true"] {
  background: var(--white);
  color: var(--navy-950);
  box-shadow: 0 2px 8px rgba(32, 30, 25, 0.1);
}

.primary-button,
.secondary-button,
.text-button,
.copy-button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button,
.copy-button {
  padding: 11px 16px;
  background: var(--brand-bold);
  color: var(--brand-ink);
}

.primary-button:hover,
.copy-button:hover {
  background: #a8480a;
}

.secondary-button {
  padding: 10px 14px;
  border: 1px solid var(--navy-200);
  background: var(--white);
  color: var(--navy-900);
}

.text-button {
  min-height: auto;
  padding: 6px 2px;
  background: transparent;
  color: var(--brand);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.result-card {
  margin: 22px 0 18px;
  padding: 24px 19px;
  border: 1px solid var(--navy-200);
  border-top: 6px solid var(--brand-bold);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.result-label {
  margin-bottom: 5px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 850;
}

.result-value {
  margin: 0;
  color: var(--brand-bold);
  font-family: var(--font-serif);
  font-size: clamp(34px, 10vw, 48px);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.result-summary {
  margin: 8px 0 0;
  color: var(--navy-700);
  font-size: 14px;
}

.result-grid,
.breakdown-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  border-top: 1px solid rgba(32, 30, 25, 0.13);
}

.result-row,
.breakdown-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(32, 30, 25, 0.1);
}

.result-row dt,
.breakdown-row dt {
  color: var(--navy-700);
  font-size: 14px;
}

.result-row dd,
.breakdown-row dd {
  margin: 0;
  color: var(--navy-950);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: right;
}

.status-message {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--white);
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 700;
}

.status-message.error {
  border: 1px solid #f1b5b0;
  color: var(--danger);
}

.positive {
  color: var(--mint-700) !important;
}

.negative {
  color: var(--danger) !important;
}

.warning-banner {
  margin-bottom: 20px;
  padding: 16px;
  border: 2px solid var(--warning-border);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  color: #6d4100;
  font-size: 14px;
  font-weight: 800;
}

.ad-slot {
  min-height: 42px;
  margin: 18px 0;
}

.content-placeholder {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--navy-200);
}

.placeholder-box {
  padding: 18px;
  border: 1px dashed #c7c2b5;
  border-radius: var(--radius-md);
  background: #f5f4ef;
  color: var(--navy-500);
}

.placeholder-box p:last-child {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.faq-item {
  padding: 15px 16px;
  border: 1px dashed #c7c2b5;
  border-radius: var(--radius-sm);
  color: var(--navy-500);
}

.faq-item h3 {
  color: var(--navy-700);
  font-size: 15px;
}

.faq-item p {
  margin-bottom: 0;
  font-size: 14px;
}

/* 쉬운 용어 설명 (용어집) */
.glossary-section {
  margin: 24px 0;
  padding: 20px 22px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-md);
  background: var(--white);
}

.glossary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.glossary-head h2 {
  margin: 0;
  font-size: 17px;
}

.glossary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--navy-700);
  cursor: pointer;
  user-select: none;
}

.glossary-toggle .switch {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--navy-200);
  border-radius: 999px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.glossary-toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(32, 30, 25, 0.25);
  transition: transform 0.15s ease;
}

.glossary-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.glossary-toggle input:checked + .switch {
  background: var(--brand-bold);
}

.glossary-toggle input:checked + .switch::after {
  transform: translateX(16px);
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.glossary-item {
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.glossary-item summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy-950);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy-100);
}

.glossary-item summary::-webkit-details-marker {
  display: none;
}

.glossary-item summary::after {
  content: "+";
  font-weight: 400;
  color: var(--navy-500);
}

.glossary-item[open] summary::after {
  content: "\2212";
}

.glossary-body {
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--navy-700);
}

.glossary-body p {
  margin: 0;
}

.glossary-body .easy-mode {
  display: none;
}

body.easy-glossary .glossary-body .normal-mode {
  display: none;
}

body.easy-glossary .glossary-body .easy-mode {
  display: block;
}

.glossary-body .example {
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--navy-100);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--navy-700);
}

.related-calculators {
  margin: 30px 0;
  padding: 20px 18px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.related-calculators h2 {
  margin-bottom: 13px;
  font-size: 19px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.related-card {
  display: block;
  padding: 14px 15px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-sm);
  background: #f5f4ef;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.related-card:hover,
.related-card:focus-visible {
  border-color: var(--navy-700);
  background: var(--navy-100);
}

.related-card strong,
.related-card span {
  display: block;
}

.related-card strong {
  color: var(--navy-950);
  font-size: 15px;
}

.related-card span {
  margin-top: 3px;
  color: var(--navy-500);
  font-size: 13px;
}

.content-basis {
  margin: 22px 0 0;
  color: var(--navy-500);
  font-size: 12px;
  text-align: right;
}

.schedule-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-md);
}

.schedule-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.schedule-table th,
.schedule-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--navy-100);
  text-align: right;
  white-space: nowrap;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
  text-align: center;
}

.schedule-table th {
  background: var(--navy-100);
  color: var(--navy-700);
}

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

.purchase-row {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--navy-100);
  border-radius: var(--radius-md);
  background: #f5f4ef;
}

.remove-row {
  justify-self: end;
  min-height: auto;
  padding: 3px 6px;
  border: 0;
  background: transparent;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(var(--wizard-steps, 4), 1fr);
  gap: 7px;
  margin: 0 0 22px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0 0;
  overflow: hidden;
  border: 1px solid rgba(32, 30, 25, 0.13);
  border-radius: 11px;
  background: rgba(32, 30, 25, 0.13);
}

.summary-band div {
  padding: 11px 7px;
  background: var(--white);
  text-align: center;
}

.summary-band span,
.summary-band strong {
  display: block;
}

.summary-band span {
  color: var(--navy-500);
  font-size: 11px;
}

.summary-band strong {
  margin-top: 2px;
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.inline-note {
  margin-bottom: 18px;
  padding: 13px 14px;
  border-left: 4px solid var(--navy-700);
  border-radius: 0 9px 9px 0;
  background: var(--navy-100);
  color: var(--navy-700);
  font-size: 13px;
  font-weight: 700;
}

.wizard-progress span {
  height: 5px;
  border-radius: 999px;
  background: var(--navy-100);
}

.wizard-progress span.active,
.wizard-progress span.done {
  background: var(--navy-900);
}

.wizard-step {
  animation: step-in 0.18s ease-out;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.choice-card + .choice-card {
  margin-top: 9px;
}

.choice-card:has(input:checked) {
  border-color: var(--navy-700);
  background: var(--navy-100);
}

.choice-card input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--brand-bold);
}

.choice-copy strong,
.choice-copy small {
  display: block;
}

.choice-copy small {
  margin-top: 3px;
  color: var(--navy-500);
}

.tip-line {
  margin: 16px 0 0;
  padding: 13px;
  border-left: 4px solid var(--brand-bold);
  background: var(--white);
  color: var(--navy-700);
  font-size: 14px;
  font-weight: 700;
}

.hero {
  display: grid;
  gap: 26px;
  margin-bottom: 42px;
}

.hero-copy h1 {
  max-width: 700px;
}

.hero-note {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-md);
  background: var(--navy-200);
}

.hero-note div {
  padding: 14px 8px;
  background: var(--white);
  text-align: center;
}

.hero-note strong,
.hero-note span {
  display: block;
}

.hero-note strong {
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.hero-note span {
  color: var(--navy-500);
  font-size: 11px;
}

.category-section + .category-section {
  margin-top: 38px;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.calculator-card {
  position: relative;
  display: flex;
  min-height: 166px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--navy-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

a.calculator-card:hover,
a.calculator-card:focus-visible {
  border-color: var(--navy-500);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-kicker {
  margin-bottom: 6px;
  color: var(--navy-700);
  font-size: 12px;
  font-weight: 850;
}

.calculator-card h3 {
  margin-bottom: 7px;
  color: var(--navy-950);
  font-size: 20px;
}

.calculator-card p {
  margin-bottom: 14px;
  color: var(--navy-500);
  font-size: 14px;
}

.card-action {
  margin-top: auto;
  color: var(--navy-900);
  font-size: 13px;
  font-weight: 850;
}

.coming-soon {
  background: #f5f4ef;
}

.badge {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-500);
  font-size: 11px;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--navy-100);
  background: #f5f4ef;
}

.footer-inner {
  width: min(100% - 32px, var(--hub));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 750;
}

.disclaimer,
.copyright {
  max-width: 720px;
  margin-bottom: 7px;
  color: var(--navy-500);
  font-size: 12px;
}

.info-page section + section {
  margin-top: 34px;
}

.info-page li + li {
  margin-top: 7px;
}

@media (min-width: 600px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
  }

  .header-tagline {
    display: inline;
  }

  .calculator-nav {
    margin-top: 0;
  }

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

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

  .purchase-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
  }

  .remove-row {
    margin-bottom: 10px;
  }

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

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

  .hero {
    grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.7fr);
    align-items: end;
  }

  .panel,
  .result-card {
    padding: 27px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
