:root {
  color-scheme: light dark;
  --bg: #f4f1ea;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: #fffdf8;
  --ink: #1f2329;
  --muted: #62676f;
  --line: rgba(31, 35, 41, 0.14);
  --accent: #18696b;
  --accent-soft: #d8eeea;
  --warm: #ad5a2a;
  --shadow: 0 18px 60px rgba(45, 42, 34, 0.09);
  --radius: 22px;
  --content: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 2%, rgba(24, 105, 107, 0.12), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(173, 90, 42, 0.09), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
summary:focus-visible {
  border-radius: 5px;
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface-strong);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 32px), 1040px);
  margin: 0 auto;
  padding: 24px 0 14px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-size: 0.91rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

main {
  width: min(calc(100% - 32px), var(--content));
  margin: 42px auto 90px;
}

.hero {
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.28;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 7vw, 4.35rem);
  font-weight: 790;
}

h2 {
  margin-bottom: 15px;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.lead {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.6vw, 1.22rem);
}

.meta {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.panel,
.section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel {
  margin: 28px 0;
  padding: clamp(22px, 5vw, 34px);
}

.section {
  margin: 22px 0;
  padding: clamp(24px, 5vw, 38px);
}

.section p:last-child,
.section ul:last-child,
.panel p:last-child,
.panel ul:last-child {
  margin-bottom: 0;
}

.callout {
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 54%, var(--surface));
}

.warning {
  border-left-color: var(--warm);
  background: color-mix(in srgb, #f4dfd1 62%, var(--surface));
}

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

.card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-strong);
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

ul,
ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.48em;
}

.toc {
  columns: 2;
  column-gap: 34px;
  margin: 0;
  padding-left: 1.2em;
}

.toc li {
  break-inside: avoid;
  margin: 0 0 0.5em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.table-scroll {
  overflow-x: auto;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  width: 29%;
  color: var(--ink);
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 730;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

details {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

details:last-child {
  padding-bottom: 0;
}

summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 720;
}

details p,
details ol,
details ul {
  color: var(--muted);
}

.site-footer {
  width: min(calc(100% - 32px), 1040px);
  margin: 0 auto;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-header {
    padding-top: 18px;
  }

  .nav,
  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links,
  .footer-links {
    justify-content: flex-start;
  }

  main {
    margin-top: 30px;
  }

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

  .toc {
    columns: 1;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .data-table th,
  .data-table td {
    padding: 2px 0;
    border: 0;
  }
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111716;
    --surface: rgba(25, 33, 32, 0.8);
    --surface-strong: #1a2221;
    --ink: #f2f3ee;
    --muted: #b5bbb7;
    --line: rgba(235, 240, 235, 0.14);
    --accent: #81d4cf;
    --accent-soft: #193d3a;
    --warm: #efa677;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  }
}
