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

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --ink: #000000;
  --paper: #ffffff;
  --soft: #555555;
  --line: rgba(0, 0, 0, 0.16);
  --pad: clamp(1.1rem, 4vw, 4.5rem);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans KR", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

main { display: block; }

img { max-width: 100%; height: auto; }

a { color: inherit; }

a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.anchors a:focus-visible,
.cta a:focus-visible {
  outline-color: var(--paper);
}

/* 页头 */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
}

.brand {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.search input {
  font: inherit;
  font-size: 1rem;
  width: min(48vw, 220px);
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}

.search input::placeholder {
  color: var(--soft);
  letter-spacing: 0.14em;
}

/* 粘性锚点条 */
.anchors {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--ink);
  padding: 0.45rem var(--pad);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.anchors::-webkit-scrollbar { display: none; }

.anchors ol {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.anchors a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 1.05rem;
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: var(--paper);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.anchors a:hover,
.anchors a:focus-visible {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  min-height: 70vh;
  padding: clamp(2.6rem, 8vw, 8rem) var(--pad) clamp(2rem, 5vw, 5rem);
}

.hero h1 {
  grid-column: 1;
  margin: 0 0 1.4rem;
  font-size: clamp(2.6rem, 8.2vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.96;
  word-break: break-word;
}

.hero .lead {
  grid-column: 1;
  margin: 0;
  max-width: 36ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.8;
  color: #111111;
}

.hero-art {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  width: clamp(72px, 13vw, 190px);
  color: var(--ink);
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.band {
  height: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
  clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
}

/* 主体两栏 */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 6rem) var(--pad);
}

.prose {
  min-width: 0;
  max-width: 70ch;
  font-size: 1.0625rem;
}

.prose section {
  padding-block: clamp(2rem, 4vw, 3.4rem);
  border-top: 2px solid var(--ink);
  scroll-margin-top: 6rem;
}

.prose section:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.85rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.prose h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.prose p { margin: 0 0 1.1rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35em;
}

.prose li { margin: 0.35rem 0; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 5px solid var(--ink);
  font-weight: 500;
}

.prose figure { margin: 1.6rem 0; }

.prose img,
.prose figure img { border-radius: 18px; }

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 0 0 1.2rem;
}

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

/* 右侧栏 */
.rail {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  min-width: 0;
}

.rail small {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  margin-bottom: 0.35rem;
}

.rail h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
  display: grid;
  gap: 0.6rem;
}

.rail-list li { counter-increment: rail; }

.rail-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border: 2px solid var(--ink);
  border-bottom-width: 6px;
  border-radius: 18px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rail-card::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  min-width: 1.8em;
  opacity: 0.6;
}

.rail-card:hover,
.rail-card:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

/* 大块号召 */
.cta {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(3.4rem, 9vw, 8rem) var(--pad);
}

.cta a {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.8rem, 3vw, 2.4rem);
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-size: clamp(2.2rem, 9vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.cta a strong {
  font-size: 0.72em;
  font-weight: 900;
}

.cta a:hover { opacity: 0.72; }

/* 页脚 */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  padding: 1.4rem var(--pad);
  border-top: 2px solid var(--ink);
}

.foot-brand {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  color: var(--ink);
}

.foot-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0.4rem;
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.foot-nav a:hover { border-bottom-color: var(--ink); }

.foot-copy {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

/* 动效 */
@media (prefers-reduced-motion: no-preference) {
  .js .prose section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js .prose section.is-in {
    opacity: 1;
    transform: none;
  }

  .rail-list li {
    animation: rail-in 0.5s ease both;
  }

  .rail-list li:nth-child(1) { animation-delay: 0.04s; }
  .rail-list li:nth-child(2) { animation-delay: 0.09s; }
  .rail-list li:nth-child(3) { animation-delay: 0.14s; }
  .rail-list li:nth-child(4) { animation-delay: 0.19s; }
  .rail-list li:nth-child(5) { animation-delay: 0.24s; }
  .rail-list li:nth-child(6) { animation-delay: 0.29s; }
  .rail-list li:nth-child(7) { animation-delay: 0.34s; }

  @keyframes rail-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* 窄屏 */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .rail {
    position: static;
    top: auto;
    padding-top: 2rem;
    border-top: 2px solid var(--ink);
  }

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

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    align-items: start;
    padding-top: 2.6rem;
  }

  .hero-art {
    grid-column: 1;
    grid-row: auto;
    width: 74px;
    margin-top: 1.6rem;
  }

  .search input { width: min(52vw, 200px); }
}

@media (max-width: 480px) {
  .rail-list { grid-template-columns: minmax(0, 1fr); }

  .hero h1 { font-size: clamp(2.3rem, 12vw, 3.4rem); }

  footer { justify-content: flex-start; }
}

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