/* 말로 만드는 AI — 대화가 주제라 색도 말풍선 둘에서: 내가 친 말 = 주황, 클로드 답 = 청록. 바탕은 차가운 회색, 첫 화면은 밤하늘. */
:root {
  --bg: #f6f7f9; --paper: #ffffff; --ink: #121826; --sub: #5b6474; --line: #e4e7ec; --soft: #f1f3f7;
  --acc: #d9480f; --acc-2: #ff6b3d; --acc-soft: #fff1ea; --teal: #0d9488; --teal-soft: #e6f7f5;
  --code: #f3f4f7; --warn: #fff7e6; --night: #0b1020;
  --shadow: 0 1px 2px rgba(18, 24, 38, .05), 0 10px 30px rgba(18, 24, 38, .07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --paper: #121826; --ink: #e9edf4; --sub: #9aa5b8; --line: #232c3d; --soft: #172034;
    --acc: #ff8a65; --acc-2: #ff6b3d; --acc-soft: #2a1913; --teal: #2dd4bf; --teal-soft: #0f2a2a;
    --code: #19212f; --warn: #2b2416; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --paper: #121826; --ink: #e9edf4; --sub: #9aa5b8; --line: #232c3d; --soft: #172034;
  --acc: #ff8a65; --acc-2: #ff6b3d; --acc-soft: #2a1913; --teal: #2dd4bf; --teal-soft: #0f2a2a;
  --code: #19212f; --warn: #2b2416; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16.5px/1.8 "Pretendard", "Malgun Gothic", system-ui, sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--acc); text-underline-offset: 3px; }
img { max-width: 100%; }

/* 윗줄 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand .bub { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px 10px 10px 3px; background: linear-gradient(135deg, var(--acc-2), #ffb347); font-size: 16px; }
.menu { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.menu a { padding: 6px 12px; border-radius: 999px; color: var(--sub); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.menu a:hover { background: var(--soft); color: var(--ink); }
body[data-k="start"] .menu a[data-k="start"], body[data-k="basic"] .menu a[data-k="basic"], body[data-k="howto"] .menu a[data-k="howto"], body[data-k="sancho"] .menu a[data-k="sancho"], body[data-k="guide"] .menu a[data-k="guide"], body[data-k="log"] .menu a[data-k="log"] { background: var(--ink); color: var(--paper); }
.menu a[data-k="start"] { color: var(--acc); font-weight: 700; }
.yt { font-size: 13px; font-weight: 600; color: var(--sub); text-decoration: none; white-space: nowrap; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.yt:hover { color: var(--acc); border-color: var(--acc); }

/* 본문 틀 */
.wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; max-width: 1200px; margin: 0 auto; padding: 32px 24px 72px; }
.wrap.solo { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.side a { display: flex; gap: 8px; padding: 7px 10px; border-radius: 10px; color: var(--sub); text-decoration: none; line-height: 1.45; }
.side a em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--sub); opacity: .6; font-size: 12px; padding-top: 1px; }
.side a:hover { background: var(--soft); color: var(--ink); }
.side a.on { background: var(--acc-soft); color: var(--acc); font-weight: 600; }
.side a.on em { color: var(--acc); opacity: 1; }
.side .sh { font-weight: 800; color: var(--ink); margin-bottom: 8px; font-size: 15px; }
main { min-width: 0; }
article { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 44px 56px; box-shadow: var(--shadow); }
article > * { max-width: 760px; }
article.sec > .grid, article .tbl, article .fig, article .video, article .grid { max-width: none; }
.crumb { display: inline-block; font-size: 13px; font-weight: 700; color: var(--acc); text-decoration: none; margin-bottom: 10px; padding: 3px 10px; background: var(--acc-soft); border-radius: 999px; }
h1 { font-size: 34px; line-height: 1.28; margin: 0 0 22px; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
h2 { font-size: 24px; line-height: 1.35; margin: 2.4em 0 .7em; letter-spacing: -.02em; font-weight: 800; text-wrap: balance; }
h3 { font-size: 19px; margin: 1.9em 0 .5em; letter-spacing: -.01em; }
h4 { font-size: 15.5px; margin: 1.4em 0 .3em; color: var(--acc); }
.lead { font-size: 18.5px; color: var(--sub); }
code { background: var(--code); border-radius: 6px; padding: 1px 6px; font: .87em/1.5 "D2Coding", "JetBrains Mono", Consolas, monospace; }
pre { position: relative; background: var(--code); border: 1px solid var(--line); border-radius: 14px; padding: 44px 18px 16px; overflow-x: auto; }
pre .cp { position: absolute; top: 9px; right: 9px; font: inherit; font-size: 13px; font-weight: 600; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
pre .cp:hover { border-color: var(--acc); color: var(--acc); }
pre code { background: none; padding: 0; white-space: pre-wrap; word-break: break-word; }
blockquote { margin: 1em 0; padding: 6px 18px; border-left: 3px solid var(--acc-2); color: var(--sub); background: var(--soft); border-radius: 0 10px 10px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
details { margin: 1em 0; } summary { cursor: pointer; font-weight: 600; }

/* 콜아웃 · 대화 말풍선 */
.callout { display: grid; grid-template-columns: 30px 1fr; gap: 10px; margin: 1.3em 0; padding: 16px 20px; background: var(--soft); border-radius: 16px; }
.callout .ci { font-size: 20px; line-height: 1.5; }
.callout .cb > :first-child { margin-top: 0; } .callout .cb > :last-child { margin-bottom: 0; }
.callout.copy { font-size: 14px; color: var(--sub); }
.callout.me { margin: 1.2em 0 .5em 14%; background: var(--acc-soft); border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent); border-radius: 20px 20px 6px 20px; }
.callout.ai { margin: .5em 14% 1.2em 0; background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); border-radius: 20px 20px 20px 6px; }
.callout.me .cb p:first-child::before, .callout.ai .cb p:first-child::before { display: block; font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-bottom: 3px; }
.callout.me .cb p:first-child::before { content: "내가 친 말"; color: var(--acc); }
.callout.ai .cb p:first-child::before { content: "클로드 답"; color: var(--teal); }

/* 표 · 그림 · 영상 */
.tbl { overflow-x: auto; margin: 1.3em 0; }
table { border-collapse: collapse; font-size: 15px; min-width: 60%; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
th { background: var(--soft); font-weight: 700; }
figure { margin: 1.5em 0; }
figure img { border: 1px solid var(--line); border-radius: 14px; display: block; }
figcaption { color: var(--sub); font-size: 13px; margin-top: 8px; }
.fig iframe { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 1.5em 0; border-radius: 16px; overflow: hidden; background: #0d1117; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.pending { display: grid; place-items: center; color: #c9d1e0; font-size: 15px; }
.toc { margin: 0 0 22px; padding: 12px 16px; background: var(--soft); border-radius: 14px; font-size: 13.5px; }
.toc summary { font-weight: 700; }
.toc a { display: block; color: var(--sub); text-decoration: none; padding: 3px 0; line-height: 1.4; }
.toc a.d3 { padding-left: 14px; }
.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.pn a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.45; }
.pn a small { color: var(--sub); font-weight: 500; font-size: 12.5px; }
.pn a.nx { text-align: right; grid-column: 2; }
.pn a:hover { border-color: var(--acc); }

/* 갈래 첫 화면 · 카드 */
.sec-head { margin-bottom: 26px; }
.sec-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--acc-soft); font-size: 30px; margin-bottom: 14px; }
.sec-head h1 { margin-bottom: 8px; }
.sec-head p { color: var(--sub); font-size: 17px; margin: 0; }
.sec-more { margin-top: 36px; padding-top: 8px; border-top: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 18px; margin: 10px 0; }
.pc { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.pc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--acc) 45%, var(--line)); }
.pc .th { position: relative; aspect-ratio: 16 / 9; background: var(--soft); overflow: hidden; }
.pc .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc .th.noimg { display: grid; place-items: center; background: linear-gradient(135deg, var(--acc-soft), var(--teal-soft)); font-size: 46px; }
.pc .play { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-style: normal; }
.pc .pb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.pc small { color: var(--acc); font-weight: 700; font-size: 12px; }
.pc b { font-size: 15.5px; line-height: 1.45; }

/* 시작하기 길 */
.path { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; counter-reset: p; max-width: none !important; }
.path a { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto auto; column-gap: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.path a:hover { transform: translateX(4px); border-color: var(--acc); box-shadow: var(--shadow); }
.path .pn-n { grid-row: 1 / 4; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--paper); font-weight: 800; font-size: 18px; }
.path .pn-ic { display: none; }
.path b { font-size: 18px; letter-spacing: -.01em; }
.path p { margin: 4px 0 6px; color: var(--sub); font-size: 15px; line-height: 1.6; }
.path small { color: var(--acc); font-weight: 700; font-size: 13px; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px; max-width: none !important; }
.goals a { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.goals a:hover { background: var(--acc-soft); color: var(--acc); }

/* 첫 화면 */
.hero { position: relative; overflow: hidden; background: var(--night); color: #eef2fb; padding: 84px 24px 96px; isolation: isolate; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; z-index: -2; }
.glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(90px); opacity: .55; z-index: -1; animation: drift 18s ease-in-out infinite alternate; }
.glow.g1 { background: #ff6b3d; top: -180px; left: -120px; }
.glow.g2 { background: #14b8a6; bottom: -220px; right: -100px; animation-duration: 22s; animation-delay: -6s; }
.dots { position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(180deg, #000 40%, transparent); }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(90px, 50px) scale(1.15); } }
.hero-in { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: #ffb38f; padding: 5px 12px; border: 1px solid rgba(255, 179, 143, .35); border-radius: 999px; }
.hero h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.05; letter-spacing: -.045em; margin: 18px 0 20px; color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #ff6b3d, #ffb347 55%, #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: #c4cbdb; max-width: 34em; margin: 0 0 28px; }
.hero p b { color: #fff; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15.5px; text-decoration: none; color: #eef2fb; border: 1px solid rgba(255, 255, 255, .25); transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .08); }
.btn.pri { background: linear-gradient(100deg, #ff6b3d, #ff8f4d); border-color: transparent; color: #1a0d06; box-shadow: 0 10px 30px rgba(255, 107, 61, .35); }
.chat { background: rgba(18, 24, 38, .72); border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); overflow: hidden; }
.chat-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; color: #8e98ad; }
.chat-top i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .chat-top i:nth-child(2) { background: #febc2e; } .chat-top i:nth-child(3) { background: #28c840; margin-right: 8px; }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; min-height: 196px; }
.chat .b { max-width: 86%; padding: 12px 16px; font-size: 15px; line-height: 1.55; }
.chat .me { align-self: flex-end; background: linear-gradient(135deg, #ff6b3d, #ff8f4d); color: #1a0d06; border-radius: 18px 18px 5px 18px; font-weight: 600; min-height: 1.55em; }
.chat .me::after { content: "▍"; animation: blink 1s steps(1) infinite; margin-left: 1px; }
.chat .ai { align-self: flex-start; background: rgba(45, 212, 191, .14); border: 1px solid rgba(45, 212, 191, .35); color: #d8fbf5; border-radius: 18px 18px 18px 5px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; }
.chat .ai.on { opacity: 1; transform: none; }
.chat .ai::before { content: "클로드 "; font-weight: 800; color: #5eead4; }
.chat-tag { padding: 0 20px 18px; font-size: 12.5px; color: #8e98ad; }
.chat-tag::before { content: "⚡ "; }
@keyframes blink { 50% { opacity: 0; } }
.stats { max-width: 1120px; margin: -44px auto 0; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.stats div { padding: 22px 18px; text-align: center; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats span { color: var(--sub); font-size: 14px; }
.home { max-width: 1120px; margin: 0 auto; padding: 24px 24px 80px; }
.home > section { margin-top: 72px; }
.sh2 { margin-bottom: 22px; }
.sh2 span { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; color: var(--acc); }
.sh2 h2 { font-size: 32px; margin: 6px 0 6px; }
.sh2 p { color: var(--sub); margin: 0; }
.home .path { grid-template-columns: repeat(5, 1fr); }
.home .path a { grid-template-columns: 1fr; grid-template-rows: auto; height: 100%; align-content: start; }
.home .path .pn-n { grid-row: auto; margin-bottom: 14px; }
.home .path a:hover { transform: translateY(-4px); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.home .grid { grid-template-columns: repeat(3, 1fr); }
.tiles a { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.tiles a:hover { border-color: var(--acc); transform: translateY(-2px); }
.tiles span { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); font-size: 22px; }
.tiles b { font-size: 15px; line-height: 1.4; }
.tiles small { color: var(--sub); font-size: 13px; }
.about { display: grid; grid-template-columns: 88px 1fr; gap: 24px; align-items: start; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg, var(--acc-soft), var(--teal-soft)); }
.about .av { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 28px 28px 28px 8px; background: linear-gradient(135deg, #ff6b3d, #ffb347); font-size: 42px; }
.about h2 { margin: 0 0 8px; font-size: 24px; }
.about p { margin: 0 0 8px; color: var(--sub); }
.foot { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; color: var(--sub); font-size: 12.5px; padding: 32px 16px 40px; border-top: 1px solid var(--line); }
.foot b { color: var(--ink); }

@media (max-width: 1000px) {
  .home .path { grid-template-columns: 1fr; }
  .tiles, .home .grid { grid-template-columns: repeat(2, 1fr); }
  .home .path a { grid-template-columns: 44px 1fr; }
  .home .path .pn-n { grid-row: 1 / 4; margin-bottom: 0; }
  .hero-in { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .top { padding: 10px 16px; gap: 10px; }
  .brand { font-size: 15px; } .brand .bub { width: 26px; height: 26px; }
  .yt { display: none; }
  .wrap { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 48px; gap: 14px; }
  .side { position: static; max-height: none; flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .side a { white-space: nowrap; }
  .side .sh { margin: 0; }
  article { padding: 26px 20px; border-radius: 16px; }
  h1 { font-size: 26px; }
  .callout.me { margin-left: 0; } .callout.ai { margin-right: 0; }
  .hero { padding: 56px 16px 80px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin: -36px 16px 0; }
  .stats div:nth-child(3) { border-left: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .home { padding: 8px 16px 60px; } .home > section { margin-top: 52px; }
  .sh2 h2 { font-size: 26px; }
  .about { grid-template-columns: 1fr; padding: 24px; }
  .tiles, .home .grid { grid-template-columns: 1fr; }
  .pn { grid-template-columns: 1fr; } .pn a.nx { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .glow { animation: none; } .pc, .path a, .tiles a, .btn { transition: none; } .chat .me::after { display: none; } }
/* 본문 안의 # 제목(핵심 요약 · N단계)은 페이지 제목보다 한 단 작게 */
article h1 ~ h1 { font-size: 26px; margin: 2em 0 .6em; padding-top: .6em; border-top: 2px solid var(--line); }
