@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+KR:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
  --bg: #f4efe7;
  --bg-strong: #e8ddd0;
  --card: rgba(255, 251, 246, 0.92);
  --card-strong: #fff8f1;
  --ink: #221a15;
  --muted: #67584f;
  --line: rgba(82, 58, 39, 0.14);
  --accent: #8b4e2f;
  --accent-deep: #5a2f1d;
  --accent-soft: #f0d5c2;
  --forest: #566046;
  --shadow: 0 28px 80px rgba(58, 37, 23, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans KR", "Malgun Gothic", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(209, 166, 133, 0.22), transparent 28%),
    radial-gradient(circle at left 12%, rgba(163, 136, 111, 0.18), transparent 34%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 46%, #efe5d8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(63, 44, 30, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 44, 30, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  z-index: -1;
}

body.lightbox-open {
  overflow: hidden;
}

a {
  color: inherit;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(90, 47, 29, 0.08);
  color: var(--accent-deep);
  font-size: 0.92em;
}

.page {
  width: min(1240px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.hero,
section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px;
  background:
    linear-gradient(140deg, rgba(255, 247, 238, 0.98), rgba(243, 230, 215, 0.92)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 78, 47, 0.18), transparent 70%);
}

.eyebrow,
.section-chip,
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow,
.section-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow {
  background: rgba(90, 47, 29, 0.08);
  color: var(--accent-deep);
}

.hero-kicker,
.section-label {
  margin: 14px 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0 0 14px;
  font-family: "Fraunces", serif;
  font-size: clamp(42px, 5.3vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-copy {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.button.primary {
  background: var(--accent-deep);
  color: #fff8f1;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  color: var(--accent-deep);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.stat {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(82, 58, 39, 0.1);
  background: rgba(255, 255, 255, 0.58);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.nav {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(250, 244, 236, 0.84);
  backdrop-filter: blur(14px);
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  background: rgba(139, 78, 47, 0.08);
  color: var(--accent-deep);
}

.coverage-card {
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 251, 246, 0.82);
}

.coverage-card.covered {
  box-shadow: inset 0 0 0 1px rgba(86, 96, 70, 0.18);
}

.coverage-card.missing {
  box-shadow: inset 0 0 0 1px rgba(139, 78, 47, 0.18);
}

.coverage-count {
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coverage-status {
  margin: 8px 0 10px;
  color: var(--muted);
  font-weight: 700;
}

section {
  margin-top: 22px;
  padding: 32px;
  background: var(--card);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.section-head > div {
  min-width: 0;
  flex: 1 1 auto;
}

.section-chip {
  background: rgba(86, 96, 70, 0.1);
  color: var(--forest);
  white-space: nowrap;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.06;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
}

.section-intro {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.four {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.panel,
.summary-card,
.info-card,
.phase-card,
.finished-card,
.slide-card,
.quality-panel,
.board-notice,
.source-link {
  border: 1px solid rgba(82, 58, 39, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(250, 242, 232, 0.94));
}

.summary-card,
.info-card,
.panel,
.quality-panel,
.board-notice {
  padding: 22px;
}

.summary-card.compact {
  padding: 18px 20px;
}

.pipeline-value {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.summary-card ul,
.info-card ul,
.panel ul,
.quality-panel ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.summary-card li + li,
.info-card li + li,
.panel li + li,
.quality-panel li + li {
  margin-top: 6px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.phase-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 24px;
}

.phase-day {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 18px;
  background: rgba(139, 78, 47, 0.09);
  color: var(--accent-deep);
  font-weight: 700;
}

.phase-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(86, 96, 70, 0.08);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
}

.phase-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.75;
}

.phase-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}

.quality-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.board-notice {
  margin-bottom: 18px;
}

.board-groups {
  display: grid;
  gap: 22px;
}

.board-group {
  padding: 22px;
  border: 1px solid rgba(82, 58, 39, 0.1);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.92), rgba(244, 236, 226, 0.98));
}

.board-group-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.board-group-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.board-group-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(86, 96, 70, 0.1);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
}

.finished-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.finished-card {
  overflow: hidden;
}

.finished-thumb {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: #ddd;
  cursor: pointer;
}

.finished-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.finished-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(34, 26, 21, 0.76);
  color: #fff7ef;
  font-size: 12px;
  font-weight: 700;
}

.finished-copy {
  padding: 20px;
}

.finished-copy h3 {
  margin-bottom: 8px;
}

.finished-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.75;
}

.finished-meta,
.finished-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.finished-links a,
.source-link a,
.lightbox-link,
.phase-link {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.meta-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(139, 78, 47, 0.08);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
}

.slides-shell {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 16px;
  align-items: stretch;
}

.slide-nav {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--accent-deep);
  font-size: 34px;
  cursor: pointer;
}

.slide-card {
  overflow: hidden;
}

.slide-card .finished-thumb img {
  aspect-ratio: 16 / 9;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.slide-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(90, 47, 29, 0.18);
  cursor: pointer;
}

.slide-dot.active {
  background: var(--accent-deep);
}

.agent-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.agent-step {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(82, 58, 39, 0.1);
  background: rgba(255, 255, 255, 0.62);
}

.agent-step strong {
  display: block;
  margin-bottom: 6px;
}

.agent-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.command-block {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(82, 58, 39, 0.1);
  background: #211914;
  color: #f5e5d9;
}

.command-label {
  margin-bottom: 10px;
  color: #f2c7ab;
  font-size: 13px;
  font-weight: 700;
}

.command-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
}

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

.source-link {
  padding: 18px 20px;
}

.source-link strong {
  display: block;
  margin-bottom: 6px;
}

.source-link p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 12, 9, 0.84);
  z-index: 50;
}

.lightbox.open {
  display: flex;
}

.lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: 60px minmax(0, 980px) 60px;
  gap: 14px;
  align-items: center;
  width: min(1120px, 100%);
}

.lightbox-stage {
  padding: 20px;
  border-radius: 24px;
  background: #fffaf4;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  border-radius: 20px;
  background: rgba(255, 248, 241, 0.18);
  color: #fff4e8;
  font-size: 34px;
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  right: 0;
  top: -52px;
  width: 44px;
  height: 44px;
}

.lightbox-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lightbox-figure {
  margin: 0;
}

.lightbox-figure img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 18px;
  background: #f3ede6;
}

.lightbox-caption {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.lightbox-caption strong {
  font-size: 22px;
}

.lightbox-caption span {
  color: var(--muted);
  line-height: 1.7;
}

.lightbox-meta {
  font-size: 13px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .card-grid.four,
  .card-grid.three,
  .card-grid.two,
  .finished-grid,
  .source-links {
    grid-template-columns: 1fr;
  }

  .phase-card {
    grid-template-columns: 1fr;
  }

  .board-group {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100vw - 18px, 100%);
    padding-top: 12px;
  }

  .hero,
  section {
    padding: 22px;
    border-radius: 22px;
  }

  .hero-actions,
  .finished-links,
  .finished-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .finished-badge,
  .finished-copy p,
  .finished-meta,
  .finished-links {
    display: none;
  }

  .finished-copy {
    padding: 14px 14px 16px;
  }

  .finished-copy h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
  }

  .slides-shell {
    grid-template-columns: 1fr;
  }

  .slide-nav {
    min-height: 50px;
  }

  .lightbox-shell {
    grid-template-columns: 1fr;
  }

  .lightbox-nav {
    min-height: 48px;
  }

  .nav {
    display: none;
  }

  .section-head {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .section-head > div {
    width: 100%;
  }

  .section-chip {
    max-width: 100%;
    white-space: normal;
    align-self: flex-start;
  }

  h2 {
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1.04;
    word-break: keep-all;
    max-width: none;
  }
}
