/* 색: Vigie 웹과 같은 Midnight Ink. 강조는 --accent 하나, 빨강·노랑은 작은 점에만 */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --line: #d6dee8;
  --muted: #7b93b0;      /* 흰 바탕 대비 3.2:1 — 작은 글자에는 쓰지 않는다 */
  --accent: #1e5aa8;
  --accent-2: #7fa0cf;
  --accent-3: #c9d7ea;
  --accent-soft: #e9eff6;
  --ink: #0a1628;        /* 글자에만 */
  --ink-2: #37485e;
  --ink-3: #596d87;
  --red: #b4373f;

  --wrap: 1140px;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 12px 32px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 2px 4px rgba(10, 22, 40, 0.04), 0 24px 60px rgba(30, 90, 168, 0.14);
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--accent-soft); color: var(--ink); padding: 1px 6px; border-radius: 5px; }
b { font-weight: 700; }
i { font-style: normal; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.accent { color: var(--accent); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn span { font-weight: 600; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(30, 90, 168, 0.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30, 90, 168, 0.32); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; border-radius: 10px; box-shadow: none; }

/* 위쪽 내비게이션: 여섯 단계 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 247, 250, 0.84);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; height: 64px; gap: 20px; }
.nav { transition: border-color .2s ease, background-color .3s ease; }
.nav-logo, .nav-links { transition: opacity .3s ease, visibility .3s; }
/* 첫 화면: 막대 바탕·선·로고·목차를 숨기고 오른쪽 버튼만 */
.nav.at-hero { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.nav.at-hero .nav-logo, .nav.at-hero .nav-links { opacity: 0; visibility: hidden; pointer-events: none; }
.nav-logo img { width: 84px; height: auto; }
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a { display: flex; align-items: baseline; gap: 5px; padding: 8px 11px; border-radius: 8px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.nav-links a i { font-size: 11.5px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-links a:hover { color: var(--ink); background: rgba(30, 90, 168, 0.06); }
.nav-links a.active, .nav-links a.active i { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.icon-link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-2); }
.icon-link:hover { color: var(--ink); background: rgba(30, 90, 168, 0.06); }

/* 첫 화면: 가운데 로고 → 동작 애니메이션 → 아래 화살표. 한 화면 높이에 맞춘다 */
.hero { position: relative; overflow: hidden; margin-top: -65px; padding-top: 65px; }
.hero::before { /* 로그인 화면과 같은 옅은 파랑 번짐 */
  content: ""; position: absolute; inset: -10% -10% 0 -10%; z-index: -1;
  background:
    radial-gradient(640px 420px at 20% 18%, rgba(127, 160, 207, 0.30), transparent 70%),
    radial-gradient(760px 540px at 82% 60%, rgba(30, 90, 168, 0.12), transparent 70%);
}
.hero-stage {
  min-height: calc(100svh - 65px); display: flex; flex-direction: column; align-items: center;
  padding-top: clamp(20px, 4svh, 44px); padding-bottom: 12px; text-align: center;
}
.hero-mark { width: clamp(120px, 13vw, 176px); height: auto; }
.hero-tag { margin-top: 6px; font-size: clamp(15px, 1.6vw, 18px); color: var(--ink-2); font-weight: 500; }
.hero-stage .demo { margin-top: clamp(18px, 3.2svh, 32px); }
.scroll-cue { pointer-events: none; margin-top: auto; padding-top: 14px; color: var(--accent); display: grid; place-items: center; width: 48px; height: 48px; }
.scroll-cue svg { animation: cue 2.2s ease-in-out infinite; }
/* 첫 화면: 제목 → 설명 → 애니메이션 → 화살표 순서로 서서히 나타난다 */
.js .hero-mark, .js .hero-tag, .js .hero-stage .demo, .js .scroll-cue { animation: fade-up .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero-mark { animation-delay: .15s; }
.js .hero-tag { animation-delay: .55s; }
.js .hero-stage .demo { animation-delay: .95s; }
.js .scroll-cue { animation-delay: 1.6s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes cue {
  0% { opacity: 0; transform: translateY(-8px); }
  45% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

/* 섹션 */
.section { padding: 112px 0; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { display: flex; align-items: center; gap: 12px; font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; }
.section-title i { display: grid; place-items: center; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lead { font-size: 17px; color: var(--ink-2); margin-top: 14px; max-width: 720px; }
.section-title + :not(.lead) { margin-top: 40px; }
.lead + * { margin-top: 40px; }
.prose p { color: var(--ink-2); font-size: 16.5px; }
.prose p + p { margin-top: 14px; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
h3 { font-size: 20px; line-height: 1.4; font-weight: 800; letter-spacing: -0.02em; }


/* 01 문제와 목표 */
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.goal-grid.solo { grid-template-columns: 1fr; max-width: 760px; }
.goals { margin: 18px 0 18px; display: flex; flex-direction: column; gap: 10px; }
.goals li { display: grid; grid-template-columns: auto 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 18px 20px; }
.goal-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; }
.goals b { display: block; font-size: 16.5px; line-height: 1.5; color: var(--ink); padding-top: 2px; }
.prose .goals p { margin-top: 8px; font-size: 15.5px; color: var(--ink-2); }


/* 섹션 안의 작은 제목 */
.section .sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 72px; font-size: 22px; }
.sub-lead { margin-top: 10px; max-width: 760px; font-size: 16px; color: var(--ink-2); }
.sub-lead + * { margin-top: 24px; }
h4 { font-size: 17px; line-height: 1.4; font-weight: 800; letter-spacing: -0.02em; }

/* 02 설계 */
.section.rule { border-top: 1px solid var(--line); }
.arch { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.arch-scroll { overflow-x: auto; padding: 20px 8px 12px; }
.arch svg { display: block; width: 100%; height: auto; font-family: inherit; }
.arch figcaption { font-size: 14.5px; color: var(--ink-2); padding: 16px 20px; border-top: 1px solid var(--line); }
.arch-legend { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 6px 28px; }
.arch-legend li { display: flex; gap: 6px; }
.arch-legend b { flex: none; min-width: 22px; color: var(--accent); font-weight: 800; }
/* 휴대폰: 세로로 쌓은 간단한 그림, 자세한 그림은 크게 보기로 */
.arch-simple { display: none; padding: 18px 16px 8px; }
.arch-simple li { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.arch-simple li + li { margin-top: 26px; }
.arch-simple li + li::before { content: "↓"; position: absolute; left: 50%; top: -23px; transform: translateX(-50%); color: var(--ink-3); font-weight: 800; }
.arch-simple b { display: block; font-size: 15px; }
.arch-simple em { display: inline-block; margin: 4px 0 2px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; }
.arch-simple span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.arch-simple .gate { border: 2px solid var(--accent); }
.arch-simple .gate > b { color: var(--accent); }
.arch-simple .judge { margin-top: 12px; border: 1px dashed var(--muted); border-radius: 10px; padding: 10px 12px; }
.arch-simple .judge em { color: var(--ink-3); background: var(--bg); }
.arch-simple .exec { background: var(--accent-soft); border-color: var(--accent-3); }
.arch-open, .arch-close { display: none; font: inherit; font-size: 14px; font-weight: 700; border-radius: 10px; cursor: pointer; }
.arch-open { margin: 4px 16px 16px; padding: 10px 14px; color: var(--accent); background: var(--surface); border: 1px solid var(--accent-3); }
.arch.is-open .arch-scroll { display: block; position: fixed; inset: 0; z-index: 100; padding: 64px 16px 24px; background: var(--surface); overflow: auto; }
.arch.is-open .arch-scroll svg { min-width: 1120px; }
.arch.is-open .arch-close { display: block; position: fixed; top: 12px; right: 16px; z-index: 101; padding: 8px 14px; color: #fff; background: var(--accent); border: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; gap: 0 16px; }
.split article { grid-row: 1 / span 3; display: grid; grid-template-rows: subgrid; row-gap: 0; border-radius: var(--radius); padding: 22px 24px 24px; }
.split-judge { background: var(--surface); border: 1.5px dashed var(--muted); }
.split-run { background: var(--accent-soft); border: 1.5px solid var(--accent-3); }
.split h4 { font-size: 18px; }
.split-run h4 { color: var(--accent); }
.split article > p { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.mini { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.split-run .mini { border-top-color: var(--accent-3); }
.mini-src { display: flex; align-items: center; }
.mini-src i { width: 22px; height: 2px; background: var(--ink-3); position: relative; }
.mini-src i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--ink-3); border-right: 0; }
.mini-src::after { content: ""; width: 18px; height: 2px; background: var(--ink-3); }
.node { font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.node.judge { border: 1.5px dashed var(--muted); }
.node.run { color: #fff; background: var(--accent); border-color: var(--accent); }
.mini-out { position: relative; display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }
.mini-out::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; background: var(--ink-3); }
.mini-out li { position: relative; align-self: flex-start; font-size: 14px; line-height: 1.4; padding: 6px 12px 6px 30px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.mini-out li::after { content: ""; position: absolute; left: -18px; top: 50%; width: 18px; height: 2px; background: var(--ink-3); }
.mini-out li::before { position: absolute; left: 11px; font-weight: 800; }
.mini-out .ok::before { content: "✓"; color: var(--accent); }
.mini-out .key { color: var(--accent); font-weight: 700; border-color: var(--accent-3); }
.mini-out .no { color: var(--ink-3); background: transparent; border-style: dashed; }
.mini-out .no::before { content: "✕"; color: var(--red); font-size: 12px; top: 8px; }
.mini-out .no::after { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }
/* 도구 감사 7계층: 05의 역추적 표와 같은 글. 기록으로 확정하면 파랑 바탕, 탐지는 흰 바탕, 모델 안·앱 밖은 점선 */
.audit7 { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.audit7 ol { display: grid; grid-template-columns: repeat(7, 1fr); gap: 22px; }
.audit7 ol li { position: relative; display: flex; flex-direction: column; padding: 14px 14px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.audit7 ol li + li::before { content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%); color: var(--accent-2); font-weight: 800; font-size: 14px; }
.audit7 ol li.rec { background: var(--accent-soft); border-color: var(--accent-3); }
.audit7 ol li.out { border: 1.5px dashed var(--muted); }
.audit7 em { font-style: normal; font-family: var(--mono); font-size: 12px; font-weight: 800; color: var(--accent); }
.audit7 b { display: block; font-size: 17px; line-height: 1.35; }
.audit7 ol li span { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.audit7-key { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }
.audit7-key li { display: flex; align-items: center; gap: 8px; }
.audit7-key s { flex: none; width: 18px; height: 14px; border-radius: 4px; background: var(--surface); border: 1px solid var(--line); }
.audit7-key s.rec { background: var(--accent-soft); border-color: var(--accent-3); }
.audit7-key s.out { border: 1.5px dashed var(--muted); }
/* 진단 절차: 위의 7계층과 같은 칸 모양. 서비스 탭을 고르면 층마다 보는 것이 바뀐다 (칸 모양은 .audit7) */
.diag-note { margin-top: 20px; font-size: 14.5px; color: var(--ink-3); }
.diag-note + .diag { margin-top: 10px; }
.diag-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.diag-tabs button { transition: background-color .2s, border-color .2s, color .2s; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.4; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.diag-tabs button:hover { border-color: var(--accent-3); color: var(--accent); }
.diag-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.diag-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diag-panels { display: grid; }
.diag-panel { grid-area: 1 / 1; visibility: hidden; }
.diag-panel.is-on { visibility: visible; }
.diag ol b { font-size: 15.5px; }
/* 서비스를 바꾸면 칸이 1번 층부터 차례로 들어온다 */
.diag-panel.is-on li { animation: diag-in .42s cubic-bezier(.2, .7, .2, 1) both; }
.diag-panel.is-on li:nth-child(2) { animation-delay: .05s; }
.diag-panel.is-on li:nth-child(3) { animation-delay: .1s; }
.diag-panel.is-on li:nth-child(4) { animation-delay: .15s; }
.diag-panel.is-on li:nth-child(5) { animation-delay: .2s; }
.diag-panel.is-on li:nth-child(6) { animation-delay: .25s; }
.diag-panel.is-on li:nth-child(7) { animation-delay: .3s; }
@keyframes diag-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.access { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-top: 20px; }
.access-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 24px; }
.access-card h4 { font-size: 17px; }
/* 권한 벤 다이어그램: 일반 사용자 ⊂ 결정자 ⊂ 관리자. 바깥 고리에 그 역할이 더 쓰는 것 */
.venn { display: block; width: 100%; max-width: 380px; height: auto; margin: 18px auto 0; font-family: inherit; }
/* 가리기: 왼쪽 원래 값이 가운데 LLM Lambda를 지나 오른쪽 값으로 바뀐다. 마지막 줄은 거꾸로(가명 → 원래 값) */
.mask { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; row-gap: 10px; margin-top: 18px; }
.mask .mh { font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
.mask .mh:last-of-type { text-align: right; }
.mask .gate { justify-self: center; white-space: nowrap; font-size: 12px; color: #fff; background: var(--accent); border-radius: 999px; padding: 4px 10px; }
.mask .ml, .mask .mr { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mask .mr { align-items: flex-end; text-align: right; }
.mask small { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.mask code { align-self: flex-start; max-width: 100%; overflow-wrap: anywhere; font-size: 12.5px; padding: 3px 8px; border-radius: 7px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.mask .mr code { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-3); color: var(--accent); font-weight: 600; }
.mask .mr code.cut { background: var(--surface); border-style: dashed; border-color: var(--muted); color: var(--ink-3); }
/* 가운데 줄: LLM Lambda를 지나는 화살표 */
.mask .ma { position: relative; align-self: stretch; }
.mask .ma::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: var(--accent); }
.mask .ma::after { content: ""; position: absolute; right: 2px; top: calc(50% - 4px); border: 5px solid transparent; border-left: 7px solid var(--accent); border-right: 0; }
.mask .back { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mask .ma.back::before { top: calc(50% + 6px); background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); }
.mask .ma.back::after { right: auto; left: 2px; top: calc(50% + 2px); border-left: 0; border-right: 7px solid var(--accent); }
.mask .ml.back code { background: var(--surface); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* 앱 창 (목표한 모습) */
.app {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column;
  height: 600px; position: relative;
}
.demo { width: min(100%, 900px); height: clamp(360px, calc(100svh - 330px), 580px); text-align: left; }
.demo .chat { max-width: 720px; margin: 0 auto; }
/* 예시 앱의 상단: 로고 왼쪽, 홈~사용자 관리 탭은 가운데, 프로필은 오른쪽 (실제 앱과 같은 배치) */
.demo .app-bar { display: grid; grid-template-columns: 1fr auto 1fr; }
.demo .app-tabs { justify-self: center; }
.demo .app-avatar { justify-self: end; }
.app-avatar { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
.js .demo [data-id]:not(.in) { display: none; }
.js .demo [data-id].in { animation: rise .4s ease both; }
.demo .chat.fading { opacity: 0; transition: opacity .6s ease; }
.demo [data-stream] .w { opacity: 0; transition: opacity .25s ease; }
.demo [data-stream] .w.on { opacity: 1; }
.status { display: flex; align-items: center; gap: 8px; padding-left: 36px; font-size: 13.5px; color: var(--ink-3); }
.status .spin { color: var(--accent); display: inline-block; animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.app-input .field { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--ink); }
.app-input .placeholder { color: var(--ink-3); }
.app-input.typing .placeholder { display: none; }
.caret { width: 1.5px; height: 18px; background: var(--accent); margin-left: 1px; opacity: 0; }
.app-input.typing .caret { opacity: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.app-input .send { display: grid; place-items: center; color: #fff; transition: background .2s ease, transform .15s ease; }
.app-input .send.ready { background: var(--accent); }
.app-input .send.pressed { transform: scale(0.9); }
.pointer { position: absolute; left: 0; top: 0; z-index: 5; opacity: 0; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(10, 22, 40, 0.25)); transition: transform .9s cubic-bezier(.4, .1, .2, 1), opacity .3s ease; }
.pointer.on { opacity: 1; }
.pointer.click { transition: transform .12s ease, opacity .3s ease; }
.app-bar { display: flex; align-items: center; gap: 18px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.app-bar img { width: 54px; }
.app-tabs { display: flex; gap: 16px; font-size: 13px; color: var(--ink-3); }
.app-tabs b { color: var(--accent); }
.app-replay { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); cursor: pointer; }
.app-replay:hover { color: var(--accent); border-color: var(--accent-2); }
.app-body { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.app-body::before { /* 위로 밀려나는 대화가 부드럽게 사라지게 */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 48px; z-index: 2;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0));
}
.chat { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 14px; }
.app-input { margin: 8px 14px 14px; height: 48px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 16px; font-size: 14px; color: var(--ink-3); }
.app-input .send { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-3); }

.js [data-step]:not(.in) { display: none; }
.js [data-step].in { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.msg-user {
  align-self: flex-end; max-width: 80%;
  background: var(--accent-soft); border: 1px solid #d3e0f0; border-radius: 16px 16px 4px 16px;
  padding: 10px 16px; font-size: 14.5px;
}
.msg-ai { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.6; }
.msg-ai .avatar { width: 26px; flex: none; margin-top: 2px; }
.msg-ai .avatar-space { width: 26px; flex: none; }
.trace { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 0; }
.trace-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); flex-wrap: wrap; }
.trace-row.thought { color: var(--ink-3); }
.trace-row.thought i { font-style: italic; }
.trace-row code { background: var(--bg); color: var(--ink-2); }
.trace-row .took { color: var(--ink-3); font-size: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.approve { flex: 1; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; min-width: 0; }
.approve-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.approve-head b { font-size: 14.5px; }
.badge-outline { border: 1.5px solid var(--accent); color: var(--accent); border-radius: 6px; padding: 0 7px; font-size: 12px; font-weight: 700; line-height: 20px; }
.timer { margin-left: auto; color: var(--accent); font-weight: 700; font-size: 12.5px; }
.approve-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.approve-row > span:first-child { color: var(--ink-3); width: 28px; font-size: 12.5px; }
.approve-row code { background: none; border: 1px solid var(--line); padding: 1px 8px; }
.approve-row s { color: var(--ink-3); text-decoration: none; }
.approve-row .arrow { color: var(--ink-3); }
.approve-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.mini-btn { border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px; font-weight: 700; font-size: 13px; }
.mini-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.mini-btn.pressed { transform: scale(0.94); box-shadow: 0 0 0 4px rgba(30, 90, 168, 0.18); }
.done { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.done .muted { font-size: 12.5px; }

/* 선택 카드 (02 서버리스 구성의 카드) */
.choice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.choice h3 { font-size: 17.5px; }
.choice p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }
/* 02 서버리스 구성: 선택 카드 세 칸 */
.infra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.infra .hash { font-size: 15px; font-weight: 800; color: var(--accent); letter-spacing: -0.01em; }
.infra h4 { margin-top: 10px; font-size: 17.5px; }

/* 03 구현 과정 */
.process { position: relative; display: flex; flex-direction: column; }
.process::before { content: ""; position: absolute; left: 149px; top: 12px; bottom: 12px; width: 2px; background: var(--accent-3); }
.process li { position: relative; display: grid; grid-template-columns: 128px 1fr; gap: 42px; padding: 14px 0; }
.process li::before { content: ""; position: absolute; left: 144px; top: 23px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.p-when { font-size: 14px; font-weight: 700; color: var(--accent); text-align: right; white-space: nowrap; padding-top: 1px; font-variant-numeric: tabular-nums; }
.process b { font-size: 17px; }
.process p { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.process .p-more { display: inline-block; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.process .p-more:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 캡스톤(팀)과 이후 개인 고도화의 경계: 세로선 위의 채운 점에서 라벨과 선이 오른쪽으로 뻗는다 */
.process li.p-divider { display: flex; align-items: center; gap: 14px; padding: 22px 0 22px 170px; }
.process li.p-divider::before { left: 142px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: var(--accent); border: 0; box-shadow: 0 0 0 5px var(--bg); }
.process li.p-divider::after { content: ""; flex: 1; height: 1px; background: var(--accent-3); }
.process li.p-divider span { flex: none; font-size: 13.5px; font-weight: 800; color: var(--accent); letter-spacing: -0.01em; }

/* 04 문제와 해결 */
.cases { display: flex; flex-direction: column; gap: 24px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px; box-shadow: var(--shadow); }
.case header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.case-no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; font-size: 16px; flex: none; }
.case h3 { font-size: 21px; flex: 1; min-width: 240px; }
.case dl { display: flex; flex-direction: column; }
.case dl > div { display: grid; grid-template-columns: 84px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px dashed var(--line); }
.case dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.case dt { font-size: 14px; font-weight: 800; color: var(--ink-3); padding-top: 2px; }
.case dd { color: var(--ink-2); font-size: 15.5px; }
.case dd p + p, .case dd p + div, .case dd div + ul, .case dd ul + p { margin-top: 10px; }
.case .res dt { color: var(--accent); }
.case .res dd { color: var(--ink); }
.case dd > p + p { margin-top: 10px; }

/* Action 안의 틀린 가설, 돌아간 길 */
.case .detour { background: var(--bg); border-radius: 12px; padding: 14px 16px; }
.case .detour b { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--ink-3); }
/* 장애 대응 예시: 질문, 진단, 조치, 다시 진단 네 칸과 화면 한 장 */
.scenes { display: flex; flex-direction: column; gap: 24px; }
.scene { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; box-shadow: var(--shadow); }
.scene header { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.scene-tag { font-size: 14px; font-weight: 800; color: var(--accent); }
.scene h4 { font-size: 19px; }
.scene-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; margin-top: 18px; }
.scene-flow { counter-reset: step; }
.scene-flow li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.scene-flow li:first-child { padding-top: 0; }
.scene-flow li:last-child { border-bottom: 0; }
.scene-flow b { font-size: 14px; font-weight: 800; color: var(--ink-3); padding-top: 1px; }
.scene-flow li:last-child b { color: var(--accent); }
.scene-flow p { font-size: 15px; color: var(--ink-2); }
.scene-flow q { color: var(--ink); font-weight: 700; quotes: "\201C" "\201D"; }
.scene .frame { margin: 0; }
.scene .viewer { align-self: start; }
/* 시나리오 화면 슬라이드: 한 장씩 보이고 그림 위 반투명 화살표로 넘긴다.
   두 그림을 같은 비율의 무대에 맞춰 크기가 바뀌지 않는다. 기본은 왼쪽으로 움직이고, data-dir="right"면 오른쪽으로 */
.viewer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; outline: none; }
.viewer:focus-visible { box-shadow: 0 0 0 3px var(--accent-3), var(--shadow); }
.viewer-arrow { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; padding: 0; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%;
  background: rgba(15, 27, 45, .28); color: #fff; cursor: pointer; opacity: .55; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity .25s ease, background-color .25s ease, transform .25s ease; }
.viewer-arrow.is-prev { left: 12px; }
.viewer-arrow.is-next { right: 12px; }
.viewer:hover .viewer-arrow, .viewer-arrow:focus-visible { opacity: .9; }
.viewer-arrow:hover { background: rgba(30, 90, 168, .75); transform: scale(1.06); }
.viewer-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.viewer-stage { position: relative; aspect-ratio: 1400 / 1396; overflow: hidden; touch-action: pan-y; background: var(--surface); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transform: translateX(var(--from, 6%));
  transition: opacity .45s ease, transform .55s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .55s; }
.slide img { width: 100%; height: 100%; object-fit: contain; object-position: top center; -webkit-user-drag: none; user-select: none; }
.slide.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.slide.is-out { visibility: visible; transform: translateX(var(--to, -6%)); }
.viewer[data-dir="right"] { --from: -6%; --to: 6%; }
.scene-env { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }
/* 44초 막대 */
.bar-break { display: flex; height: 34px; border-radius: 8px; overflow: hidden; margin-top: 12px; gap: 2px; }
.bar-break span { flex: 0 0 var(--w); display: flex; align-items: center; padding-left: 10px; font-size: 13px; font-weight: 700; color: #fff; }
.bar-break em { font-style: normal; }
.b1 { background: var(--accent); }
.b2 { background: var(--accent-2); color: var(--ink) !important; }
.b3 { background: var(--accent-3); }
.b4 { background: var(--line); }
.bar-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.bar-legend li { display: flex; align-items: center; gap: 6px; }
.bar-legend i { width: 10px; height: 10px; border-radius: 3px; }


/* 05 결과 */
/* 글로 된 표: 칸 안에서 줄을 바꾸고, 첫 칸만 한 줄로 */

.frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.frame-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame img { width: 100%; }

.retro { margin-top: 32px; max-width: 780px; }
.section .closing-sub { margin-top: 28px; max-width: 780px; }
.closing-sub + .retro { margin-top: 16px; }


.footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.footer-in { display: flex; align-items: center; gap: 24px; }
.footer img { width: 70px; flex: none; }
.footer p { font-size: 13px; color: var(--ink-3); }

/* 스크롤하며 나타나기 */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.from-top { transform: translateY(-18px); }
.js .reveal.shown { opacity: 1; transform: none; }

/* 좁은 데스크톱: 목차 숫자 숨기기 */
@media (max-width: 1180px) {
  .nav-links a i { display: none; }
}

/* 태블릿 */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .audit7 ol { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
  .audit7 ol li:nth-child(5)::before { display: none; }
  .nav-cta { margin-left: auto; }
  .goal-grid { grid-template-columns: 1fr; }
  .access { grid-template-columns: minmax(0, 1fr); }
  .scene-body { grid-template-columns: minmax(0, 1fr); }
  .scene .frame { max-width: 640px; }
    .arch-open { display: block; }
}

/* 휴대폰 */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .demo { height: clamp(340px, calc(100svh - 340px), 520px); }
  .hero-stage { padding: 28px 16px 14px; }
  .hero-tag { max-width: 300px; }
  .section { padding: 80px 0; }
  .lead { font-size: 16px; }
  .section-title { font-size: 25px; }
  .app { border-radius: 16px; }
  .demo .chat { padding: 16px 12px 8px; }
  .status { padding-left: 34px; }
  .app-tabs span { display: none; }
    .infra { grid-template-columns: 1fr; }
  .process::before { left: 5px; }
  .process li { grid-template-columns: 1fr; gap: 2px; padding-left: 28px; }
  .process li::before { left: 0; top: 17px; }
  .process li.p-divider { padding: 18px 0 18px 28px; }
  .process li.p-divider::before { left: -2px; top: 50%; }
  .p-when { text-align: left; }
  .case { padding: 22px 18px; border-radius: 16px; }
  .case h3 { font-size: 18.5px; min-width: 0; flex-basis: calc(100% - 50px); }
  .case dl > div { grid-template-columns: 1fr; gap: 4px; }
  .scene { padding: 22px 18px; border-radius: 16px; }
  .scene-flow li { grid-template-columns: 1fr; gap: 2px; }
  .bar-break span { padding-left: 6px; font-size: 12px; }
  .footer-in { flex-direction: column; align-items: flex-start; gap: 14px; }
  .section .sub { margin-top: 56px; font-size: 19.5px; }
  .arch-simple { display: block; }
  .arch-legend { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .arch-scroll { display: none; }
    .split { grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; }
  .split article { grid-row: auto; display: block; }
  .mini { grid-template-columns: 1fr; gap: 10px; }
  .mini-src::after { display: none; }
  .audit7 { padding: 14px; }
  .access-card { padding: 18px 16px 20px; }
  .mask { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
  .mask code { font-size: 10.5px; padding: 3px 5px; overflow-wrap: normal; white-space: nowrap; }
  .audit7 ol { grid-template-columns: 1fr; gap: 22px; }
  .audit7 ol li { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; padding: 12px 14px; }
  .audit7 ol li + li::before, .audit7 ol li:nth-child(5)::before { display: block; content: "↓"; left: 50%; top: -21px; transform: translateX(-50%); }
  .audit7 ol li span { grid-column: 1 / -1; margin-top: 2px; }
}

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