:root {
  color-scheme: light dark;
  --paper: #f8f4eb;
  --surface: #fffdf8;
  --surface-subtle: #f1ebdf;
  --ink: #37332c;
  --heading: #2d2923;
  --muted: #69635b;
  --accent: #976113;
  --accent-strong: #7a4b0b;
  --accent-soft: #f1dfbd;
  --border: rgb(109 96 77 / 24%);
  --focus: #4e7378;
  --radius: 14px;
  --shadow: 0 18px 48px rgb(71 55 30 / 8%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #181713;
    --surface: #222019;
    --surface-subtle: #2b281f;
    --ink: #eee9df;
    --heading: #fffaf0;
    --muted: #c8c0b4;
    --accent: #d9a452;
    --accent-strong: #f0bf70;
    --accent-soft: #3b3020;
    --border: rgb(230 216 193 / 22%);
    --focus: #8bc0c5;
    --shadow: 0 18px 48px rgb(0 0 0 / 22%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.header-inner,
.footer-inner,
.hero-inner,
.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--heading);
  font-size: 18px;
  font-weight: 750;
  text-decoration: none;
}

.brand-ring {
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  position: relative;
}

.brand-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0.65;
}

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

.site-nav a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
}

.hero {
  padding: 72px 0 54px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 56px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.35;
  word-break: keep-all;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-family: "Iowan Old Style", "AppleMyungjo", "Noto Serif KR", serif;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.hero-copy {
  margin: 20px 0 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 18px;
}

.hero-meta {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-meta p {
  margin: 0;
}

.hero-meta p + p {
  margin-top: 8px;
}

.hero-meta strong {
  color: var(--heading);
}

.link-grid {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.link-card {
  min-height: 190px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.link-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.link-card p {
  margin: 0;
  color: var(--muted);
}

.link-card .link-label {
  display: inline-block;
  margin-top: 22px;
  color: var(--accent-strong);
  font-weight: 750;
}

.document-hero {
  padding: 58px 0 42px;
  border-bottom: 1px solid var(--border);
}

.document-hero .hero-inner {
  align-items: start;
}

.document-hero h1 {
  max-width: none;
  font-size: clamp(36px, 5vw, 54px);
}

.document-summary {
  margin: 18px 0 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
}

.page-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 720px);
  gap: 64px;
  justify-content: center;
  padding: 54px 0 88px;
}

.toc {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 18px 0;
}

.toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--heading);
  font-size: 14px;
}

.toc a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-strong);
}

.document > section + section {
  margin-top: 56px;
}

.document h2 {
  margin: 0 0 18px;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.document h3 {
  margin: 28px 0 10px;
  font-size: 18px;
}

.document p {
  margin: 0;
}

.document p + p {
  margin-top: 14px;
}

.document ul,
.document ol {
  padding-left: 1.35em;
}

.document li + li {
  margin-top: 8px;
}

.info-panel,
.action-panel {
  margin: 28px 0;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.info-panel {
  border-left: 4px solid var(--accent);
}

.info-panel p,
.action-panel p {
  margin: 0;
}

.data-group {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-group h3 {
  margin-top: 0;
}

.key-values {
  margin: 0;
}

.key-values div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 10px 0;
}

.key-values div + div {
  border-top: 1px solid var(--border);
}

.key-values dt {
  color: var(--muted);
  font-weight: 650;
}

.key-values dd {
  margin: 0;
}

.button-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: var(--surface);
  font-weight: 750;
  text-decoration: none;
  transition: transform 120ms ease;
}

.button-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button-link:active {
  transform: translateY(1px);
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 38px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .hero-inner,
  .page-shell,
  .link-grid {
    width: min(100% - 32px, 680px);
  }

  .header-inner {
    min-height: 64px;
  }

  .site-nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding: 46px 0 36px;
  }

  .hero-inner,
  .page-shell {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 30px;
  }

  h1 {
    font-size: clamp(36px, 12vw, 50px);
  }

  .link-grid {
    grid-template-columns: 1fr;
    margin-bottom: 56px;
  }

  .link-card {
    min-height: auto;
  }

  .document-hero {
    padding: 42px 0 32px;
  }

  .page-shell {
    gap: 30px;
    padding: 36px 0 64px;
  }

  .toc {
    position: static;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .key-values div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .footer-inner {
    flex-direction: column;
    padding: 26px 0 32px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
