@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mute: #4a4a4a;
  --r: 4px;
  --gut: clamp(1rem, 4vw, 3rem);
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.04;
  margin: 0;
}

hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 1.5rem 0 1.7rem;
}

::selection { background: #000; color: #fff; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

.skip {
  position: absolute;
  top: -6rem;
  left: 1rem;
  z-index: 200;
  background: #000;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip:focus { top: 0.8rem; }

/* ---------- 顶部 ---------- */
.masthead {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  max-width: 100%;
}

.mast {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.8rem var(--gut);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
}
.mast > * { min-width: 0; }

.mast-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1.04rem, 2.4vw, 1.35rem);
  letter-spacing: -0.055em;
  white-space: nowrap;
  max-width: 100%;
}
.brand::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  background: #000;
  border-radius: 2px;
  flex: none;
}

.dnav { position: relative; min-width: 0; }

.dnav > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--paper);
  user-select: none;
  white-space: nowrap;
}
.dnav > summary::-webkit-details-marker { display: none; }
.dnav > summary:hover { background: #000; color: #fff; }
.dnav[open] > summary { background: #000; color: #fff; }

.dnav > menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 0.55rem);
  left: 0;
  margin: 0;
  padding: 0.4rem;
  min-width: 11.5rem;
  max-width: min(20rem, calc(100vw - 2rem));
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 1);
}
.dnav-b > menu { left: auto; right: 0; }

.dnav > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}
.dnav > menu a:hover,
.dnav > menu a:focus-visible { background: #000; color: #fff; }

.find {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.1rem 0.15rem 0.1rem 0.95rem;
  min-width: 0;
}
.find input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  width: 7rem;
  min-width: 0;
  padding: 0.3rem 0;
  outline: none;
  color: #000;
}
.find button {
  border: 1.5px solid var(--ink);
  background: #000;
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 38px;
  padding: 0 1rem;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}

/* ---------- 粘性锚点条 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #000;
  border-bottom: 2px solid #000;
  max-width: 100%;
}
.rail-in {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 0.65rem var(--gut);
  scrollbar-width: none;
}
.rail-in::-webkit-scrollbar { display: none; }
.rail a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rail a:hover,
.rail a.is-on {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* ---------- 版式 ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gut);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.doc { min-width: 0; max-width: 100%; }

.doc > section { padding: clamp(2.6rem, 6vw, 5rem) 0; min-width: 0; }
.doc > section + section { border-top: 1px solid rgba(0, 0, 0, 0.15); }
.doc section[id] { scroll-margin-top: 6rem; }

.hero {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-height: 70vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: end;
  padding: clamp(2.6rem, 8vw, 5.5rem) 0 clamp(2rem, 5vw, 3rem);
  border-top: 0;
}
.doc > .hero + section { border-top: 1px solid rgba(0, 0, 0, 0.15); }

.hero-word {
  position: absolute;
  left: -0.05em;
  top: 0.28em;
  width: 130%;
  max-width: 130%;
  font-size: clamp(4.6rem, 24vw, 16rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.84;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.hero-copy { position: relative; z-index: 1; min-width: 0; }

.hero h1 {
  font-size: clamp(2.5rem, 8.4vw, 7rem);
  line-height: 0.9;
  overflow-wrap: break-word;
}

.lead {
  margin: 1.3rem 0 0;
  max-width: 32ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.62;
  color: #1c1c1c;
}

.hero-fig {
  margin: 0;
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-width: 0;
  display: flex;
  align-items: flex-end;
}
.hero-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r);
}

/* ---------- 正文元素 ---------- */
.doc h2 {
  font-size: clamp(1.7rem, 4.4vw, 2.9rem);
  line-height: 1.03;
  margin: 0 0 0.5rem;
  overflow-wrap: break-word;
}
.doc h2 + hr { margin: 0.9rem 0 1.6rem; }

.doc h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  margin: 1.9rem 0 0.6rem;
  overflow-wrap: break-word;
}

.doc p { margin: 0 0 1.1rem; max-width: 66ch; color: #101010; overflow-wrap: break-word; }
.doc ul, .doc ol { max-width: 66ch; padding-left: 1.25rem; margin: 0 0 1.2rem; }
.doc li { margin: 0.35rem 0; overflow-wrap: break-word; }

.doc a {
  text-decoration: none;
  border-bottom: 2px solid #000;
  font-weight: 500;
  overflow-wrap: break-word;
}
.doc a:hover { background: #000; color: #fff; border-bottom-color: #000; }

.doc blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 6px solid #000;
  font-weight: 500;
  max-width: 62ch;
  overflow-wrap: break-word;
}

.doc img { border-radius: var(--r); margin: 1.3rem 0; }
.doc figure { margin: 1.3rem 0; max-width: 100%; }
.doc figcaption { font-size: 0.85rem; color: var(--mute); margin-top: 0.5rem; }

.doc table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1.2rem 0;
}
.doc th, .doc td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.5rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}
.doc th { font-weight: 700; }

.doc pre {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 1.2rem 0;
  padding: 0.9rem 1rem;
  background: #f2f2f2;
  border-radius: var(--r);
  font-size: 0.86rem;
  line-height: 1.62;
  white-space: pre;
}

.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f0f0f0;
  padding: 0.1em 0.35em;
  border-radius: 2px;
  overflow-wrap: break-word;
}
.doc pre code { background: none; padding: 0; white-space: inherit; }

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 5.4rem;
  border-left: 2px solid var(--ink);
  padding: 0.35rem 0 0 1.25rem;
  min-width: 0;
}
.side h2 {
  font-size: 1.1rem;
  line-height: 1.28;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
.side hr { margin: 0.8rem 0 1rem; }

.idx {
  list-style: none;
  counter-reset: i;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.idx li { counter-increment: i; min-width: 0; }
.idx a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.4rem 0;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  overflow-wrap: break-word;
}
.idx a::before {
  content: counter(i, decimal-leading-zero);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.55;
  flex: none;
}
.idx a:hover { color: #000; border-bottom-color: #000; }

/* ---------- 页脚 ---------- */
.foot {
  border-top: 2px solid var(--ink);
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: 2.6rem var(--gut) 2rem;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

.foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  min-width: 0;
}

.foot-claim {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.5rem, 4.4vw, 2.6rem);
  letter-spacing: -0.055em;
  line-height: 1;
  max-width: 100%;
  overflow-wrap: break-word;
}

.sub { display: flex; align-items: center; gap: 0.4rem; max-width: 100%; min-width: 0; }
.sub input {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  min-height: 44px;
  width: 12rem;
  min-width: 0;
  max-width: 60vw;
  background: #fff;
  color: #000;
  outline: none;
}
.sub button {
  border: 1.5px solid var(--ink);
  background: #000;
  color: #fff;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 44px;
  padding: 0 1.3rem;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 1.4rem;
  min-width: 0;
}

.foot-brand {
  font-weight: 900;
  letter-spacing: -0.05em;
  text-decoration: none;
  font-size: 1rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.foot-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.9rem; min-width: 0; max-width: 100%; }
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  font-size: 0.86rem;
  border-bottom: 1px solid transparent;
  overflow-wrap: break-word;
}
.foot-nav a:hover { border-bottom-color: #000; }

.copy {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--mute);
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ---------- 动效 ---------- */
.rv .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rv .reveal.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (max-width: 1040px) {
  .find { display: none; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--ink);
    padding: 1.3rem 0 0;
    margin-top: 2.4rem;
  }
  .side h2 { font-size: 1.25rem; }
  .idx {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1.4rem;
  }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .mast {
    padding: 0.65rem var(--gut);
    gap: 0.4rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .dnav > summary { padding: 0.5rem 0.8rem; font-size: 0.84rem; }
  .brand {
    font-size: 1rem;
    gap: 0.38rem;
    justify-self: center;
    white-space: normal;
    line-height: 1.12;
  }
  .brand::before { width: 0.5em; height: 0.5em; }
  .dnav > menu { min-width: 10.5rem; max-width: calc(100vw - 1.6rem); }
  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2.2rem;
    align-items: start;
  }
  .hero-word {
    position: static;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(2.9rem, 16vw, 5rem);
    margin-bottom: 0.4rem;
  }
  .hero h1 { font-size: clamp(2rem, 10.6vw, 3.1rem); }
  .lead { max-width: none; }
  .hero-fig { margin-top: 1.5rem; }
  .hero-fig img { aspect-ratio: 16 / 10; }
  .doc > section { padding: 2.3rem 0; }
  .doc p, .doc ul, .doc ol, .doc blockquote { max-width: none; }
  .foot-row { gap: 0.4rem 1rem; }
}

@media (max-width: 480px) {
  .idx { grid-template-columns: minmax(0, 1fr); }
  .foot-top { flex-direction: column; align-items: flex-start; }
  .sub { width: 100%; }
  .sub input { width: 100%; max-width: none; flex: 1 1 auto; }
  .foot-nav { gap: 0.1rem 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv .reveal { opacity: 1; transform: none; transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
