:root {
  --ink: #17202b;
  --muted: #657180;
  --paper: #f2f5f7;
  --white: #fff;
  --line: #d5dde4;
  --navy: #141d28;
  --teal: #007f87;
  --teal-soft: #e7f4f4;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --sans: "IBM Plex Sans KR", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 127, 135, .28); outline-offset: 3px; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 3vw, 44px);
  background: rgba(248, 250, 251, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand > span { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: #252f3b; border-radius: 5px; font-family: var(--mono); font-size: .68rem; }
.brand strong { font-size: .84rem; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: #5d6875; font-size: .75rem; font-weight: 600; text-decoration: none; }
.site-header nav a:hover { color: var(--teal); }

.tour-hero { color: #fff; background: var(--navy); }
.hero-inner { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 38px; }
.back-link { color: #6fdae0; font-size: .72rem; font-weight: 700; text-decoration: none; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(410px, .8fr); gap: 80px; align-items: end; margin-top: 28px; }
.eyebrow { margin: 0 0 12px; color: #6fdae0; font-family: var(--mono); font-size: .65rem; font-weight: 600; }
.hero-layout h1 { margin: 0; font-size: clamp(2.3rem, 4.4vw, 4.6rem); line-height: 1.08; letter-spacing: 0; }
.hero-copy { max-width: 750px; margin: 21px 0 0; color: #b9c4cf; font-size: .93rem; line-height: 1.8; }
.hero-index { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; border-top: 1px solid #44515f; border-bottom: 1px solid #44515f; }
.hero-index > div { min-width: 0; padding: 15px 10px; border-right: 1px solid #374453; }
.hero-index > div:last-child { border-right: 0; }
.hero-index dt, .hero-index dd { margin: 0; }
.hero-index dt { color: #61d1d7; font-family: var(--mono); font-size: .63rem; }
.hero-index dd { margin-top: 7px; color: #d8e0e6; font-size: .68rem; font-weight: 600; }
.disclosure { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; margin-top: 38px; padding-top: 17px; border-top: 1px solid #354250; }
.disclosure span { color: #6fdae0; font-family: var(--mono); font-size: .61rem; }
.disclosure p { margin: 0; color: #96a3b0; font-size: .72rem; }

.tour-shell { width: min(1440px, calc(100% - 40px)); display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; margin: 0 auto; padding: 56px 0 90px; }
.chapter-nav { position: sticky; top: 92px; height: fit-content; display: grid; padding-top: 8px; }
.chapter-nav { scrollbar-width: none; }
.chapter-nav::-webkit-scrollbar { display: none; }
.chapter-nav > span { margin-bottom: 14px; color: #8b96a1; font-family: var(--mono); font-size: .58rem; font-weight: 600; }
.chapter-nav a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 11px 4px; color: #687482; border-bottom: 1px solid var(--line); font-size: .72rem; text-decoration: none; }
.chapter-nav a b { color: #9ba5af; font-family: var(--mono); font-size: .6rem; }
.chapter-nav a.active { color: var(--ink); font-weight: 700; }
.chapter-nav a.active b { color: var(--teal); }
.chapters { min-width: 0; }
.chapter + .chapter { margin-top: 90px; }
.chapter-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .75fr); gap: 56px; align-items: end; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid #abb6c0; }
.chapter-heading span, .card-meta span, .tour-footer span { color: var(--teal); font-family: var(--mono); font-size: .62rem; font-weight: 600; }
.chapter-heading h2 { margin: 7px 0 0; font-size: clamp(1.55rem, 2.2vw, 2.2rem); line-height: 1.25; }
.chapter-heading > p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.75; }

.card-grid { display: grid; gap: 18px; }
.card-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evidence-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-card { min-width: 0; margin: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 12px 28px rgba(24, 34, 45, .06); }
.screen-card.feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .45fr); }
.screen-open { width: 100%; min-width: 0; position: relative; display: block; padding: 0; overflow: hidden; background: #e8edf1; border: 0; cursor: zoom-in; }
.screen-open img { width: 100%; aspect-ratio: 1680 / 780; display: block; object-fit: contain; background: #eef1f3; transition: transform .35s ease; }
.screen-open:hover img { transform: scale(1.018); }
.zoom-mark { position: absolute; right: 13px; bottom: 13px; width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: rgba(20, 29, 40, .84); border: 1px solid rgba(255, 255, 255, .28); border-radius: 4px; font-size: 1.15rem; }
.screen-card figcaption { padding: 20px 22px 22px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.card-meta b { color: #8a95a0; font-family: var(--mono); font-size: .57rem; }
.screen-card h3 { margin: 10px 0 8px; font-size: 1.03rem; }
.screen-card p { margin: 0; color: #5e6a77; font-size: .75rem; line-height: 1.75; }
.screen-card ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.screen-card li { padding: 4px 7px; color: #39747a; background: var(--teal-soft); border: 1px solid #c4e0e1; border-radius: 4px; font-size: .6rem; font-weight: 600; }
.screen-card.feature .screen-open { height: 100%; }
.screen-card.feature .screen-open img { height: 100%; aspect-ratio: auto; object-fit: contain; }
.screen-card.feature figcaption { display: flex; flex-direction: column; justify-content: center; padding: 26px; border-left: 1px solid var(--line); }

.tour-footer { display: flex; align-items: center; justify-content: space-between; gap: 36px; margin-top: 90px; padding: 28px 0; border-top: 1px solid #aeb8c1; border-bottom: 1px solid #aeb8c1; }
.tour-footer h2 { margin: 6px 0 0; font-size: 1.18rem; }
.tour-footer a { min-height: 42px; display: inline-flex; align-items: center; padding: 9px 14px; color: #fff; background: #1b2733; border-radius: 5px; font-size: .72rem; font-weight: 700; text-decoration: none; }

.lightbox { width: min(96vw, 1660px); max-width: none; height: min(94vh, 980px); max-height: none; padding: 0; overflow: hidden; color: #fff; background: #111923; border: 1px solid #394756; border-radius: 7px; box-shadow: 0 30px 90px rgba(0, 0, 0, .5); }
.lightbox::backdrop { background: rgba(5, 10, 16, .86); backdrop-filter: blur(5px); }
.lightbox-bar { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 16px; border-bottom: 1px solid #34414f; }
.lightbox-bar > div { display: flex; align-items: center; gap: 14px; }
.lightbox-bar span { color: #66d6dc; font-family: var(--mono); font-size: .62rem; }
.lightbox-bar strong { font-size: .78rem; }
.lightbox-close, .lightbox-nav { display: grid; place-items: center; color: #fff; background: #202c39; border: 1px solid #465363; border-radius: 4px; cursor: pointer; }
.lightbox-close { width: 36px; height: 36px; font-size: 1.3rem; }
.lightbox-stage { height: calc(100% - 116px); display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 12px; align-items: center; padding: 13px; }
.lightbox-stage img { width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.lightbox-nav { width: 42px; height: 42px; font-size: 1rem; }
.lightbox > p { margin: 0; padding: 0 72px 14px; color: #aeb9c4; font-size: .7rem; text-align: center; }

@media (max-width: 1000px) {
  .hero-layout { grid-template-columns: 1fr; gap: 36px; }
  .hero-index { max-width: 680px; }
  .tour-shell { grid-template-columns: 1fr; gap: 25px; }
  .chapter-nav { position: sticky; z-index: 10; top: 62px; grid-template-columns: repeat(5, minmax(100px, 1fr)); overflow-x: auto; background: rgba(242, 245, 247, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
  .chapter-nav > span { display: none; }
  .chapter-nav a { white-space: nowrap; }
  .screen-card.feature { display: block; }
  .screen-card.feature .screen-open img { width: 100%; height: auto; aspect-ratio: 1680 / 780; }
  .screen-card.feature figcaption { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 114px; }
  .site-header { min-height: 58px; padding: 8px 13px; }
  .site-header nav a:not(:first-child) { display: none; }
  .site-header nav a { max-width: 120px; text-align: right; }
  .hero-inner, .tour-shell { width: min(100% - 24px, 1440px); }
  .hero-inner { padding-top: 36px; }
  .hero-layout h1 { font-size: 2.25rem; }
  .hero-copy { font-size: .8rem; }
  .hero-index { grid-template-columns: repeat(5, minmax(90px, 1fr)); overflow-x: auto; }
  .disclosure { grid-template-columns: 1fr; gap: 7px; }
  .tour-shell { padding-top: 28px; }
  .chapter-nav { top: 58px; }
  .chapter-heading { grid-template-columns: 1fr; gap: 13px; }
  .chapter + .chapter { margin-top: 68px; }
  .card-grid.two-up, .evidence-layout { grid-template-columns: 1fr; }
  .screen-card.feature { grid-column: auto; }
  .screen-card figcaption { padding: 18px; }
  .tour-footer { display: block; }
  .tour-footer a { width: 100%; justify-content: center; margin-top: 17px; }
  .lightbox { width: 100vw; height: 100dvh; border-radius: 0; }
  .lightbox-stage { height: calc(100% - 130px); grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 4px; padding: 7px; }
  .lightbox-nav { width: 32px; height: 40px; }
  .lightbox > p { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
