:root {
  --paper: #f6f3ec;
  --paper-deep: #efeae0;
  --ink: #1c1915;
  --ink-soft: #4e483f;
  --line: #ddd4c6;
  --teal: #0e5c57;
  --teal-deep: #083f3c;
  --card: #fffdf8;
  --focus: #c45c26;
  --max: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(14, 92, 87, 0.08), transparent 28rem),
    var(--paper);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 1.02rem;
  line-height: 1.75;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-deep);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.9rem;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(246, 243, 236, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner,
.site-footer,
.layout {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.brand-meta,
.toc-label,
.eyebrow {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

.toc {
  position: sticky;
  top: 5rem;
  align-self: start;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding-right: 0.5rem;
}

.toc ol {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.22rem 0;
  font-size: 0.92rem;
}

.toc a:hover,
.toc a:focus {
  color: var(--teal-deep);
}

main h1,
main h2,
main h3 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

main h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

section[id] {
  scroll-margin-top: 7.75rem;
}

main h2 {
  margin: 2.4rem 0 0.8rem;
  font-size: 1.7rem;
}

main h3 {
  margin: 1.4rem 0 0.4rem;
  font-size: 1.25rem;
}

.lede {
  margin: 0;
  max-width: 42rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.eyebrow {
  text-transform: uppercase;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.6rem 0 0.4rem;
}

.meta div,
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
}

.meta dt,
.contact-card dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.meta dd,
.contact-card dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.contact-card {
  display: grid;
  gap: 0.8rem;
  max-width: 36rem;
}

p,
li {
  max-width: 44rem;
}

ul {
  padding-left: 1.15rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card);
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 38rem;
  font-size: 0.94rem;
}

caption {
  caption-side: bottom;
  padding: 0.7rem 1rem 0.9rem;
  color: var(--ink-soft);
  text-align: left;
  font-size: 0.8rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--paper-deep);
  font-size: 0.82rem;
}

tbody th {
  width: 9rem;
}

.callout {
  margin: 1.2rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--teal);
  background: #e7f3f1;
  border-radius: 0 1rem 1rem 0;
}

.callout p {
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 860px) {
  .layout,
  .meta,
  .header-inner,
  .site-footer {
    display: block;
  }

  .toc {
    position: static;
    max-height: none;
    margin-bottom: 1rem;
  }

  .toc ol {
    display: flex;
    gap: 0.4rem 0.9rem;
    flex-wrap: wrap;
  }

  .meta div {
    margin-top: 0.7rem;
  }

  .site-footer p + p {
    margin-top: 0.3rem;
  }
}

@media print {
  .site-header,
  .toc,
  .skip {
    display: none;
  }

  body {
    background: white;
  }

  .layout {
    display: block;
    width: auto;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
