:root {
  --ink: #17202a;
  --muted: #5c6773;
  --line: #d9e0e7;
  --paper: #fbfcfd;
  --panel: #ffffff;
  --green: #0f766e;
  --green-dark: #0b4f4a;
  --blue: #2855a3;
  --amber: #a16207;
  --red: #b42318;
  --shadow: 0 14px 38px rgba(22, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 253, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner,
.section,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--ink);
}

.hero {
  padding: 40px 0 24px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.12), rgba(40, 85, 163, 0.08)),
    #f7fafb;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 32px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.hero-visual {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.tool-panel,
.result-panel,
.article-card,
.notice,
.toc-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 20px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #2d3742;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--green);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segment {
  min-height: 44px;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.segment[aria-pressed="true"] {
  border-color: var(--green);
  background: #e9f7f5;
  color: var(--green-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button.secondary:hover {
  background: #eef3f7;
}

.helper {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.warning-note {
  border-left: 3px solid var(--amber);
  padding: 8px 10px;
  background: #fff8eb;
  color: #744c08;
}

.is-hidden {
  display: none;
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.result-panel {
  padding: 16px;
}

.metric-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  word-break: keep-all;
}

.metric-value {
  margin: 0;
  font-size: clamp(18px, 2vw, 27px);
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.result-panel .metric-value {
  font-size: clamp(18px, 1.7vw, 26px);
}

.metric-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: keep-all;
}

.section {
  padding: 36px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

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

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

.mini-tool {
  box-shadow: none;
}

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

.article-card {
  padding: 18px;
  box-shadow: none;
}

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

.notice {
  padding: 18px;
  background: #fff8eb;
  border-color: #f0d7a0;
  box-shadow: none;
}

.notice strong {
  color: var(--amber);
}

.breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.breakdown th,
.breakdown td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: right;
}

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

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

.page-hero {
  padding: 42px 0;
  background: #f7fafb;
  border-bottom: 1px solid var(--line);
}

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

.content-panel {
  padding: 26px;
  box-shadow: none;
}

.content-panel h2 {
  margin-top: 28px;
}

.content-panel h2:first-child {
  margin-top: 0;
}

.content-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.content-panel th,
.content-panel td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.faq-item h3 {
  font-size: 17px;
}

.content-panel .notice {
  margin-top: 24px;
}

.toc-panel {
  position: sticky;
  top: 84px;
  padding: 18px;
  box-shadow: none;
}

.toc-panel ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #edf2f5;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

  .results,
  .article-grid,
  .mini-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
    gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .form-grid,
  .results,
  .article-grid,
  .mini-tools,
  .compact {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding-top: 28px;
  }

  .metric-value {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
