/* A single reading column keeps the argument continuous. Photography and custom
   dot illustrations provide the rhythm; motion stays inside each illustration. */
:root {
  color-scheme: light;
  --ink: #172334;
  --muted: #596575;
  --blue: #1659ce;
  --orange: #c43d18;
  --paper: #fff;
  --wash: #f4f6f8;
  --line: #d9dfe6;
  --control-line: #7c8797;
  --article-width: 760px;
  --gutter: 1.5rem;
  --header-height: 4.25rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body.story-page {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 18px; line-height: 1.9; letter-spacing: -.018em;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--blue); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
::selection { color: var(--paper); background: var(--blue); }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
figure, h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin-block: 0; }
[hidden] { display: none !important; }
.sr-only, .visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip, .skip-link {
  position: fixed; top: .75rem; left: 1.5rem; z-index: 120;
  min-height: 44px; padding: .5rem 1rem; background: var(--ink); color: var(--paper);
  font-size: .875rem; transform: translateY(-200%);
}
.skip:focus, .skip-link:focus { transform: none; }

#scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 101; width: 100%; height: 3px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; pointer-events: none;
}
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; min-height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: .65rem clamp(1.25rem, 4vw, 4rem); border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .brand, .site-header .site-brand {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px;
  color: var(--ink); font-size: 1.15rem; font-weight: 800; letter-spacing: -.055em;
  text-decoration: none; flex-shrink: 0;
}
.brand-dots { color: var(--blue); font-size: .625rem; letter-spacing: .1em; }
.brand-mark { width: 1.1rem; height: 1.1rem; }
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.site-nav a, .site-nav button {
  display: inline-flex; align-items: center; min-height: 44px; padding: .35rem 0;
  border: 0; background: transparent; color: var(--muted); text-decoration: none;
  font-size: .8125rem; font-weight: 600; letter-spacing: -.02em;
}
.site-nav a:hover, .site-nav button:hover { color: var(--blue); }
.menu-toggle {
  display: none; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
  padding: .5rem .75rem; border: 1px solid var(--control-line); border-radius: 0;
  background: var(--paper); color: var(--ink); font-size: .8125rem; font-weight: 600;
}

#story {
  width: min(var(--article-width), calc(100% - var(--gutter) * 2)); margin-inline: auto;
  padding-top: calc(var(--header-height) + 3.5rem); padding-bottom: 4rem;
}
.scene, .article-section {
  --scene-progress: .5;
  position: relative; padding-block: 3.5rem; scroll-margin-top: calc(var(--header-height) + 1.5rem);
}
.scene:first-child, .article-section:first-child { padding-top: 0; }
.scene-inner { width: 100%; margin-inline: auto; }
.scene-inner > *, .scene-copy, .article-section > * { min-width: 0; }
.kicker {
  display: block; margin-bottom: 1rem; color: var(--muted); font-size: .8125rem;
  font-weight: 600; line-height: 1.65; letter-spacing: -.015em;
}
.scene-heading, .article-section h2 {
  max-width: 100%; font-size: clamp(1.75rem, 3.5vw, 2.4rem); font-weight: 750;
  line-height: 1.4; letter-spacing: -.045em; text-wrap: pretty;
}
.scene-heading em, .article-section h2 em { color: var(--blue); font-style: normal; }
.scene-body { max-width: none; margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.95; }
.scene-body p + p, .article-section > p + p { margin-top: 1.2em; }
.scene-body strong, .article-section strong { font-weight: 650; }
.article-section > p { margin-top: 1.35rem; }
.article-section > h3 { margin-top: 2.25rem; font-size: 1.375rem; line-height: 1.6; letter-spacing: -.025em; }
.article-section > ul, .article-section > ol { padding-left: 1.5rem; margin-top: 1.25rem; }
.article-section li + li { margin-top: .65rem; }
.scene-note, .scene-label, .example-label { color: var(--muted); font-size: .875rem; line-height: 1.85; }
.scene-note { margin-top: 1.75rem; }

.article-header, .hero { padding-bottom: 2.5rem; }
.article-header h1, .hero-copy h1 {
  max-width: 100%; font-size: clamp(2.5rem, 6.5vw, 4rem); font-weight: 800;
  line-height: 1.2; letter-spacing: -.065em; text-wrap: pretty;
}
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem;
  margin-top: 1.5rem; color: var(--muted); font-size: .8125rem; line-height: 1.75;
}
.article-meta a { color: inherit; }
.article-lede { margin-top: 2rem; color: var(--ink); font-size: 1.1875rem; line-height: 1.95; }
.article-lede p + p { margin-top: 1.2em; }
.article-opening { margin-top: 2rem; font-size: 1.125rem; line-height: 1.95; }
.article-header .kicker { margin-bottom: 1.25rem; }
.article-toc {
  margin-block: 2.5rem 1rem; padding-block: 1.4rem 1.65rem;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: .9375rem;
}
.article-toc h2, .article-toc h3, .article-toc > strong { display: block; margin-bottom: .75rem; font-size: .875rem; font-weight: 650; }
.article-toc summary { min-height: 44px; padding-block: .4rem; cursor: pointer; font-size: .9375rem; font-weight: 600; }
.article-toc[open] > ol { margin-top: .75rem; }
.article-toc ul, .article-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem 1.5rem; padding: 0; list-style: none; }
.article-toc a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; line-height: 1.7; }
.article-toc a:hover { color: var(--blue); text-decoration: underline; }
.article-cover { margin-block: 2.5rem; }
.article-cover img { width: 100%; height: auto; object-fit: contain; }
.hero-layout { display: block; }
.hero-copy { padding: 0; }
.hero-copy .scene-body { margin-top: 2rem; }
.story-cta, .hero-cta { display: inline-flex; align-items: center; gap: 1.25rem; min-height: 44px; margin-top: 1.75rem; font-size: .9375rem; }
.hero-media { position: relative; margin-top: 2.5rem; }
.hero-media img { width: 100%; height: auto; object-fit: contain; }
.hero-media canvas { position: absolute; inset: 0 0 auto; width: 100%; height: calc(100% - 2rem); }
.hero-footer { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin-top: 1.5rem; color: var(--muted); font-size: .75rem; }

.photo-grid, .photo-pair { display: block; margin-top: 2rem; }
.photo-grid > .scene-copy { margin-top: 2.5rem; }
.photo-grid > .photo-panel + div { margin-top: 2.25rem; }
.photo-grid > div + .photo-panel { margin-top: 2.5rem; }
.photo-panel { position: relative; width: 100%; margin-block: 2.5rem; }
.photo-crop, .photo-frame { overflow: clip; }
.photo-panel img { width: 100%; height: auto; max-height: 36rem; object-fit: cover; }
.photo-panel.wide-photo img { aspect-ratio: 16 / 9; }
.photo-panel .photo-crop img { aspect-ratio: 3 / 2; object-fit: cover; }
.image-caption, .dot-art-caption {
  margin-top: .75rem; color: var(--muted); font-size: .75rem; line-height: 1.8;
  letter-spacing: -.01em; overflow-wrap: anywhere;
}
.image-caption a, .dot-art-caption a { color: inherit; }
.dot-art { position: relative; margin-block: 2.75rem; }
.dot-art-frame {
  position: relative; width: 100%; aspect-ratio: 2 / 1; overflow: clip;
  background: var(--paper); transform: translateY(var(--art-shift, 0px));
  transition: transform 550ms var(--ease);
}
.dot-art-frame > img, .dot-art-frame > svg, .dot-art-frame > canvas {
  display: block; width: 100%; height: 100%; object-fit: contain;
  transform-origin: center; transition: transform 700ms var(--ease);
}
.dot-art-frame > canvas { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dot-art.art-active .dot-art-frame > img { opacity: 0; }
.dot-art.art-active .dot-art-frame > canvas { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .dot-art-frame:hover > img, .dot-art-frame:hover > svg { transform: scale(1.018); }
}

.wall-stage { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem; margin-top: 2.25rem; }
.wall-label { color: var(--muted); font-size: .75rem; }
.wall-label strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; }
.wall-stage canvas { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.wall-stage .image-caption { grid-column: 1 / -1; }
.metric-selector, .channel-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 2rem 1.75rem; }
.metric-selector button, .channel-tabs button {
  min-height: 44px; padding: .6rem .85rem; border: 1px solid var(--control-line); border-radius: 0;
  background: var(--paper); color: var(--muted); font-size: .8125rem; font-weight: 600;
  line-height: 1.7; transition: background-color 180ms, color 180ms, border-color 180ms;
}
.metric-selector button:hover, .channel-tabs button:hover { background: var(--wash); color: var(--ink); }
.metric-selector button:is([aria-pressed="true"], [aria-selected="true"], .is-active),
.channel-tabs button:is([aria-pressed="true"], [aria-selected="true"], .is-active) { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.metric-layout { display: block; }
.metric-number { color: var(--blue); font-size: clamp(4rem, 12vw, 6rem); font-weight: 750; line-height: 1.2; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.metric-number small { font-size: .5em; }
.metric-description { margin-top: .65rem; color: var(--ink); font-size: 1.1875rem; font-weight: 650; line-height: 1.6; letter-spacing: -.03em; }
.metric-context { margin-top: 1rem; color: var(--muted); font-size: 1rem; line-height: 1.85; }
.metric-sample { margin-top: .75rem; color: var(--muted); font-size: .8125rem; line-height: 1.85; }
.dot-field { position: relative; width: 100%; margin-top: 1.75rem; }
.dot-field canvas { width: 100%; height: auto; aspect-ratio: 1.7; }
.metric-dots { margin-top: .75rem; color: var(--muted); font-size: .75rem; line-height: 1.8; }
.dot-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .65rem; color: var(--muted); font-size: .75rem; }
.dot-legend span { display: inline-flex; align-items: center; gap: .5rem; }
.dot-legend span::before { content: ""; width: .5rem; height: .5rem; background: var(--blue); }
.dot-legend span:last-child::before { background: var(--control-line); }
.metric-caveat { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; line-height: 1.9; }
.source-line { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: 1rem; font-size: .75rem; line-height: 1.85; }
.source-line a { color: var(--muted); }
.source-line button, .source-button { min-height: 44px; padding: .5rem 0; border: 0; background: none; color: var(--blue); font-size: .875rem; text-decoration: underline; text-underline-offset: .22em; }
.source-button { margin-top: 1rem; }

.loop-layout { display: block; margin-top: 2rem; }
.loop-steps { display: flex; flex-wrap: wrap; gap: .35rem .85rem; margin-bottom: 1.75rem; }
.loop-steps button { display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .6rem .15rem; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.loop-steps button span { font-size: .6875rem; font-weight: 500; }
.loop-steps button:is([aria-pressed="true"], [aria-selected="true"], .is-active) { border-bottom-color: var(--blue); color: var(--blue); }
.loop-steps button:hover { color: var(--ink); }
.loop-detail { min-height: 0; padding-block: .5rem 1rem; }
.loop-detail h3, .channel-detail h3 { font-size: 1.375rem; line-height: 1.55; letter-spacing: -.035em; }
.loop-detail p, .channel-detail p { margin-top: 1rem; color: var(--ink); font-size: 1rem; line-height: 1.9; }
.loop-detail .action-check, .channel-detail .action-check { color: var(--muted); font-size: .875rem; }
.loop-visual { margin-top: 1.5rem; }
.loop-visual canvas { width: 100%; height: auto; aspect-ratio: 2 / 1; }
.channel-detail { padding-block: .5rem 1rem; }
.channel-detail ul { margin-top: 1rem; padding-left: 1.25rem; }
.channel-detail li + li { margin-top: .5rem; }
.channel-detail img, .loop-detail img { width: 100%; height: auto; margin-top: 1.5rem; }
.wall-summary p + p { margin-top: 1rem; }
.next-actions { margin-block: 2rem; }
.next-actions > div { padding-block: 1rem; border-top: 1px solid var(--line); }
.next-actions dt { font-weight: 650; }
.next-actions dd { margin: .35rem 0 0; }
.interaction-hint { margin-bottom: .75rem; color: var(--muted); font-size: .875rem; }

.plan-list { margin-top: 2.25rem; }
.plan-list article { display: block; padding-block: 1.65rem; border-top: 1px solid var(--line); }
.plan-list article .kicker, .plan-list .day, .plan-list .period { margin-bottom: .55rem; color: var(--blue); font-size: .8125rem; font-weight: 600; }
.plan-list article h3 { font-size: 1.375rem; line-height: 1.55; letter-spacing: -.035em; }
.plan-list article p { margin-top: .8rem; font-size: 1rem; line-height: 1.9; }
.plan-list article .action-check { color: var(--muted); font-size: .8125rem; }
.plan-list article .kicker { margin-top: 0; }
.scope-columns { display: block; margin-top: 2.5rem; }
.scope-columns > section { padding-top: 1.25rem; margin-top: 2rem; border-top: 1px solid var(--control-line); }
.scope-columns > section > .kicker { color: var(--ink); font-size: .875rem; }
.scope-list { padding: 0; list-style: none; }
.scope-list article, .scope-list li { padding-block: 1rem; }
.scope-list h3 { font-size: 1.1875rem; font-weight: 650; line-height: 1.6; letter-spacing: -.025em; }
.scope-list p { margin-top: .65rem; color: var(--muted); font-size: 1rem; line-height: 1.9; }
.product-visual { margin-top: 2.5rem; }
.product-visual img { width: 100%; height: auto; object-fit: contain; }
.closing-heading, .closing .scene-heading { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.45; letter-spacing: -.045em; }
.closing-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.75rem; }
.closing-links a, .closing-links button { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: .5rem 0; border: 0; background: transparent; color: var(--blue); font-size: .9375rem; }
.chapter-nav { display: none !important; }
.story-footer { width: min(var(--article-width), calc(100% - var(--gutter) * 2)); margin-inline: auto; padding-block: 1.75rem 3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.85; }
.story-footer > div { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.25rem; margin-block: .5rem; }
.story-footer a, .story-footer button { display: inline-flex; align-items: center; min-height: 44px; padding-block: .4rem; }
.story-footer button { border: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }

#source-dialog { width: min(52rem, calc(100% - 2rem)); max-height: calc(100svh - 2rem); margin: auto; padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid var(--control-line); background: var(--paper); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
#source-dialog::backdrop { background: rgb(23 35 52 / .45); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-size: clamp(1.35rem, 4vw, 1.875rem); line-height: 1.45; letter-spacing: -.035em; }
.dialog-heading button, #source-dialog .dialog-close { min-width: 44px; min-height: 44px; flex-shrink: 0; padding: .4rem .6rem; border: 1px solid var(--control-line); background: var(--paper); color: var(--ink); font-size: .8125rem; }
#source-dialog > p { margin-top: 1.25rem; color: var(--muted); font-size: .875rem; line-height: 1.85; }
#source-dialog h3 { margin-top: 2rem; font-size: 1.125rem; }
.source-list, .photo-credits { padding: 0; list-style: none; margin-top: 1.25rem; }
.source-list li, .photo-credits li, .photo-credits article { padding-block: 1rem; border-bottom: 1px solid var(--line); font-size: .875rem; line-height: 1.85; overflow-wrap: anywhere; }
.source-list p, .photo-credits p { color: var(--muted); margin-top: .5rem; font-size: .8125rem; line-height: 1.85; }
.photo-credits > p { padding-block: .5rem; }
.photo-credits img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.implementation-credits { margin-top: 1rem; color: var(--muted); font-size: .75rem; line-height: 1.85; overflow-wrap: anywhere; }

.reveal { opacity: 1; transform: none; }
body.motion-ready .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 550ms ease, transform 750ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
body.motion-ready .reveal.is-visible, body.motion-ready .reveal:focus-within { opacity: 1; transform: none; }
.is-changing { animation: detail-enter 180ms var(--ease) both; }
@keyframes detail-enter { from { opacity: .35; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  :root { --header-height: 4rem; --gutter: 1.5rem; }
  .site-header { padding: .5rem var(--gutter); }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; inset: 100% 0 auto; display: none; align-items: stretch; flex-direction: column; gap: .2rem; max-height: calc(100svh - var(--header-height)); overflow-y: auto; padding: .75rem var(--gutter) 1.25rem; background: var(--paper); border-bottom: 1px solid var(--control-line); }
  body.menu-open .site-nav, .site-nav.is-open, .site-header.is-open .site-nav, .site-header:has(.menu-toggle[aria-expanded="true"]) .site-nav { display: flex; }
  .site-nav a, .site-nav button { justify-content: flex-start; min-height: 48px; padding-block: .6rem; font-size: .9375rem; }
  #story { padding-top: calc(var(--header-height) + 2.5rem); }
  .scene, .article-section { padding-block: 2.75rem; }
  .scene:first-child, .article-section:first-child { padding-top: 0; }
}
@media (max-width: 480px) {
  :root { --gutter: 1.125rem; }
  body.story-page { font-size: 17px; }
  #story { padding-top: calc(var(--header-height) + 2rem); }
  .article-header h1, .hero-copy h1 { font-size: clamp(2.25rem, 10vw, 3rem); line-height: 1.25; }
  .scene-heading, .article-section h2 { font-size: 1.75rem; line-height: 1.45; }
  .scene-body, .article-lede { font-size: 1.0625rem; line-height: 1.95; }
  .article-toc ul, .article-toc ol { grid-template-columns: 1fr; gap: .1rem; }
  .article-toc { margin-block: 2rem 1rem; }
  .article-meta { gap: .2rem .8rem; }
  .photo-panel, .dot-art { margin-block: 2rem; }
  .dot-art-frame { aspect-ratio: 2 / 1; }
  .image-caption, .dot-art-caption { font-size: .6875rem; }
  .metric-selector { display: grid; grid-template-columns: 1fr; gap: .5rem; }
  .metric-selector button { text-align: left; }
  .metric-number { font-size: clamp(3.75rem, 20vw, 5rem); }
  .metric-description { font-size: 1.0625rem; }
  .dot-field canvas { aspect-ratio: 1.25; }
  .channel-tabs { gap: .4rem; }
  .channel-tabs button { padding-inline: .7rem; }
  .loop-steps { gap: .25rem .75rem; }
  .loop-steps button { font-size: .875rem; }
  .wall-stage { gap: .5rem 1rem; }
  .wall-label strong { font-size: .875rem; }
  .closing-links { align-items: flex-start; flex-direction: column; gap: .25rem; }
  #source-dialog { width: calc(100% - 1rem); max-height: calc(100svh - 1rem); padding: 1.25rem; }
  .dialog-heading { gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body.motion-ready .reveal, .reveal, .dot-art-frame, .dot-art-frame > img, .dot-art-frame > svg, .dot-art-frame > canvas, .hero-media img, .photo-panel img, .is-changing { opacity: 1; transform: none !important; }
  .dot-art.art-active .dot-art-frame > img { opacity: 1; }
  .dot-art-frame > canvas { display: none; }
}
@media (forced-colors: active) {
  .metric-selector button:is([aria-pressed="true"], [aria-selected="true"], .is-active),
  .channel-tabs button:is([aria-pressed="true"], [aria-selected="true"], .is-active),
  .loop-steps button:is([aria-pressed="true"], [aria-selected="true"], .is-active) { outline: 3px solid Highlight; outline-offset: -3px; }
  .dot-field { border: 1px solid CanvasText; }
  #scroll-progress { background: Highlight; }
}
@media print {
  .site-header, .chapter-nav, .menu-toggle, #scroll-progress { display: none; }
  #story { width: 100%; padding-top: 0; }
  .scene, .article-section { padding-block: 1.5rem; }
  .photo-panel, .dot-art { break-inside: avoid; }
  body.motion-ready .reveal, .dot-art-frame, .dot-art-frame > img { opacity: 1; transform: none; }
  .article-header h1, .hero-copy h1 { font-size: 2.5rem; }
  .source-line { font-size: 9pt; }
}
