:root {
  --ink: #1d1b18;
  --ink-soft: #5b5650;
  --paper: #faf8f4;
  --line: #e4dfd6;
  --accent: #8a3b2e;
  --accent-soft: #f3e7e2;
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.75 var(--sans); word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow > * { max-width: 720px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(250, 248, 244, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 15px;
}
.site-nav { display: flex; gap: 4px; }
.site-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); font-weight: 500; }

/* typography blocks */
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; font-weight: 500; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; }
.meta { color: var(--ink-soft); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-block; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 11px 22px; border-radius: 999px; font: 500 15px var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn:disabled { opacity: .5; cursor: wait; }

/* hero */
.hero { padding: 120px 24px 96px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); margin: 0 0 28px; letter-spacing: -.01em; }
.lead { font-size: 18px; max-width: 34em; color: var(--ink-soft); margin: 0; }
.section-title { font-size: 15px; font-family: var(--sans); font-weight: 500; color: var(--ink-soft); border-top: 1px solid var(--ink); padding-top: 14px; margin: 0 0 28px; }
.services { padding-bottom: 120px; }
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.service-grid h3 { font-size: 22px; margin: 0 0 8px; }
.service-grid p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* page head */
.page-head { padding: 72px 24px 40px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }

/* articles */
.articles-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding-bottom: 120px; }
.toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc summary { font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc > details > ol > li { margin-bottom: 10px; }
.toc > details > ol > li > a { font-weight: 500; }
.toc ol ol { padding-left: 10px; border-left: 1px solid var(--line); margin-top: 4px; }
.toc ol ol a { color: var(--ink-soft); text-decoration: none; display: block; padding: 1px 0; }
.articles { max-width: 720px; font-size: 16.5px; }
.articles h2 { font-size: 24px; margin: 56px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.articles h2:first-child { margin-top: 0; }
.articles h3 { font-size: 17px; margin: 32px 0 6px; position: relative; }
.articles h3:target { color: var(--accent); }
.anchor { position: absolute; left: -22px; color: var(--line); text-decoration: none; font-family: var(--sans); }
.articles h3:hover .anchor { color: var(--accent); }
.articles p { margin: 0 0 8px; }
.articles ol { padding-left: 1.6em; margin: 8px 0; }
.articles hr { display: none; }
.note { margin-top: 48px !important; padding: 16px 18px; background: var(--accent-soft); border-radius: 8px; font-size: 14px; color: var(--ink-soft); }

/* notice */
.notice { border-top: 1px solid var(--line); padding: 28px 0; }
.empty { padding: 48px 0 120px; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* contact */
.contact-form { display: grid; gap: 18px; margin-bottom: 24px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 16px var(--sans); padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.contact-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--ink-soft); }
.contact-form .consent input { margin-top: 5px; width: 16px; height: 16px; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; }
.form-status { margin: 0; min-height: 1.5em; font-size: 15px; }
.form-status.ok { color: #2f6b3a; }
.form-status.err { color: #b3261e; }
.narrow + .narrow, .contact-form + .meta { padding-bottom: 120px; }

/* prose (privacy) */
.prose { padding-bottom: 120px; }
.prose h2 { font-size: 19px; margin: 40px 0 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: #f1ede6; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--ink-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 0 0 6px; }
.footer-name { color: var(--ink); font-weight: 500; }
.footer-name span { font-weight: 400; color: var(--ink-soft); }
.footer-inner nav { display: flex; gap: 16px; }

@media (max-width: 860px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .articles-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
  .toc details:not([open]) summary { margin: 0; }
  .anchor { display: none; }
  .hero { padding: 72px 24px 64px; }
}
@media (max-width: 520px) {
  .brand-text { display: none; }
  .site-nav a { padding: 6px 9px; }
  .service-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .toc, .actions, .note { display: none; }
  body { background: #fff; font-size: 11pt; }
  .articles-layout { display: block; }
  .articles h2 { break-after: avoid; }
  .articles h3 { break-after: avoid; }
}
