:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-accent: #efe7d9;
  --card: #ffffff;
  --card-soft: #faf7f1;
  --text: #171717;
  --muted: #6b6257;
  --line: rgba(23, 23, 23, 0.08);
  --brand: #202020;
  --brand-soft: #fff1b3;
  --brand-accent: #b58b2a;
  --warn: #7a6400;
  --danger: #9f3d35;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --shadow: 0 24px 60px rgba(34, 26, 17, 0.12);
  --shadow-soft: 0 10px 28px rgba(34, 26, 17, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 241, 179, 0.7), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(181, 139, 42, 0.1), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, #fffdf8 42%, #fff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.75;
  word-break: keep-all;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body::-webkit-scrollbar {
  display: none;
}

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

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f7f1df);
  border: 1px solid rgba(23, 23, 23, 0.08);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.brand-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: #36312a;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78));
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 241, 179, 0.7), rgba(255, 241, 179, 0) 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--warn);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero > .eyebrow {
  background: #efefef;
  color: #5f5a52;
}

.title {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: #36312a;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button {
  box-shadow: 0 8px 18px rgba(34, 26, 17, 0.08);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(34, 26, 17, 0.08);
}

.button:hover,
.button:focus-visible,
.button-secondary:hover,
.button-secondary:focus-visible {
  background: #3b3732;
  border-color: #3b3732;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(32, 32, 32, 0.16);
}

.button:focus-visible,
.button-secondary:focus-visible {
  outline: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.card {
  grid-column: span 12;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}

.card[id] {
  scroll-margin-top: 28px;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.card h2 {
  font-size: 22px;
}

.card h3 {
  font-size: 18px;
}

.muted {
  color: var(--muted);
}

.section-list {
  margin: 0;
  padding-left: 20px;
}

.section-list li + li {
  margin-top: 6px;
}

.toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.toc a {
  display: block;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card-soft);
  font-weight: 800;
}

.toc a span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.notice {
  border-left: 4px solid var(--brand-accent);
  background: rgba(255, 241, 179, 0.35);
  padding: 16px 18px;
  border-radius: 14px;
}

.warning {
  border-left-color: var(--danger);
  background: rgba(159, 61, 53, 0.08);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.meta .pill {
  background: rgba(255, 255, 255, 0.82);
}

.footer {
  margin-top: 24px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 760px) {
  .card.half {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 18px 14px 56px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .toc {
    grid-template-columns: 1fr;
  }
}
