/* GlueSQL.js 데모 사이트. 색·모서리·그림자는 발표자료의 design.md(Jitter)를 따른다. */
:root {
  --ink: #19171c; --paper: #fff; --canvas: #f2f1f3; --hairline: #e5e4e7;
  --slate: #6e6e73; --soft: #97979b; --plum: #17082c; --chip: #2d2933;
  --violet: #7a40ed; --lilac: #a981ff; --lavender: #cab3f8;
  --blue: #00b2ff; --sky: #e6f4ff; --ice: #a9dbff; --volt: #f5ff63;
  --font-text: 'Ubuntu', 'NanumSquare', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-code: ui-monospace, 'SF Mono', Menlo, Consolas, 'NanumSquare', monospace;
  --shadow-float: 0 63px 25px rgba(0, 0, 0, .01), 0 35px 21px rgba(0, 0, 0, .05), 0 16px 16px rgba(0, 0, 0, .09), 0 4px 9px rgba(0, 0, 0, .10);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 18px/1.55 var(--font-text); -webkit-font-smoothing: antialiased; word-break: keep-all;
}
h1, h2, h3, p, ul, ol, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
code, pre, textarea.sql { font-family: var(--font-code); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

/* ---- 상단 바 ---- */
.topbar {
  max-width: 1480px; margin: 0 auto; padding: 22px 40px 0;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.wordmark { font-size: 24px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--slate); font-weight: 400; }
.topbar .event { font-size: 14px; color: var(--slate); }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; padding: 9px 18px; border-radius: 50px;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* ---- 페이지 머리 ---- */
.page { max-width: 1480px; margin: 0 auto; padding: 30px 40px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.eyebrow {
  display: inline-flex; background: var(--lavender); color: var(--plum); border-radius: 40px;
  padding: 5px 16px; font-size: 15px; font-weight: 700; margin-bottom: 14px;
}
.page-head h1 { font-size: 50px; line-height: 1.12; font-weight: 700; letter-spacing: -.035em; }
.lead { font-size: 20px; color: var(--slate); margin-top: 12px; max-width: 760px; }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.import-chip {
  background: var(--ink); color: #f2f1f3; border-radius: 50px; padding: 12px 22px;
  font: 500 16px/1.4 var(--font-code); white-space: nowrap;
}
.import-chip b { color: var(--lavender); font-weight: 500; }
.import-chip mark { background: none; color: var(--volt); }
.status-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--slate); }
.status-row code { font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 8px; border-radius: 50px; background: var(--paper); padding: 7px 16px; font-size: 14px; font-weight: 500; color: var(--ink); }
.status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--soft); }
.status[data-state="ready"]::before { background: var(--violet); }
.status[data-state="busy"]::before { background: var(--volt); box-shadow: 0 0 0 1px var(--ink); }
.status[data-state="error"] { background: var(--ink); color: #fff; }
.status[data-state="error"]::before { background: var(--volt); }

/* ---- 공통 면 ---- */
.card { background: var(--paper); border-radius: 32px; padding: 26px 28px; min-width: 0; }
.card.float { box-shadow: var(--shadow-float); }
.card.dark { background: var(--ink); color: #f2f1f3; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.card-title .hint { font-size: 13px; color: var(--soft); white-space: nowrap; }
.card.dark .card-title .hint { color: var(--soft); }
.muted { color: var(--slate); }
.small { font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

/* ---- 버튼 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: 50px; padding: 12px 22px; font-size: 16px; font-weight: 500; line-height: 1.3;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--hairline);
  text-decoration: none; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.filled { background: var(--ink); color: #fff; box-shadow: none; }
.btn.violet { background: var(--violet); color: #fff; box-shadow: none; }
.btn.filled:hover:not(:disabled), .btn.violet:hover:not(:disabled) { box-shadow: var(--shadow-float); }
.btn.on-dark { background: var(--chip); color: #f2f1f3; box-shadow: none; }
.btn.small { font-size: 14px; padding: 9px 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .spacer { margin-left: auto; }

/* ---- SQL 표시 ---- */
pre.sql { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; }
pre.sql b { color: var(--lavender); font-weight: 600; }
pre.sql .str { color: var(--ice); }
.code-block { background: var(--ink); color: #f2f1f3; border-radius: 24px; padding: 18px 22px; }

/* ---- 실행한 SQL 기록 ---- */
.log { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.log-empty { color: var(--soft); font-size: 15px; padding: 8px 0; }
.log-item { background: var(--chip); border-radius: 20px; padding: 13px 18px; animation: log-in .45s var(--ease), log-flash 1.3s ease-out; }
.log-item:first-child { box-shadow: inset 0 0 0 1.5px var(--lilac); }
.log-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--soft); margin-bottom: 6px; flex-wrap: wrap; }
.log-type { font: 700 12px/1.5 var(--font-code); letter-spacing: .03em; border-radius: 50px; padding: 1px 11px; background: var(--soft); color: var(--ink); }
.log-type[data-kind="read"], .log-legend [data-kind="read"]::before { background: var(--ice); }
.log-type[data-kind="write"], .log-legend [data-kind="write"]::before { background: var(--volt); }
.log-type[data-kind="schema"], .log-legend [data-kind="schema"]::before { background: var(--lavender); }
.log-tag { color: #f2f1f3; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.log-tag[data-mark]::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--engine-color, var(--soft)); }
.log-legend { display: inline-flex; gap: 14px; font-size: 12.5px; color: var(--soft); white-space: nowrap; }
.log-legend span { display: inline-flex; align-items: center; gap: 6px; }
.log-legend span::before { content: ''; width: 10px; height: 10px; border-radius: 50%; }
.log-summary { color: #f2f1f3; font-weight: 500; }
.log-ms { margin-left: auto; font-family: var(--font-code); }
.log-item.error { box-shadow: inset 0 0 0 1.5px #f2f1f3; }
.log-item.error .log-type { background: #f2f1f3; }
.log-item.error .log-summary { color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.log-item.error pre.sql { opacity: .75; }
@keyframes log-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes log-flash { from { background: var(--violet); } to { background: var(--chip); } }

/* ---- 결과 표 ---- */
.result { overflow: auto; }
.result-table { border-collapse: collapse; width: 100%; font-size: 16px; }
.result-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--soft); padding: 8px 12px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.result-table td { padding: 11px 12px; border-bottom: 1px solid var(--hairline); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-table tr:last-child td { border-bottom: 0; }
.result-note { font-size: 15px; color: var(--slate); padding: 8px 0; }
.result-error { font-size: 15px; background: var(--ink); color: #fff; border-radius: 20px; padding: 14px 18px; box-shadow: inset 0 0 0 2px var(--volt); overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---- SQL 콘솔 ---- */
textarea.sql {
  display: block; width: 100%; min-height: 108px; resize: vertical; border: 0; border-radius: 24px;
  background: var(--ink); color: #f2f1f3; padding: 18px 22px; font-size: 15.5px; line-height: 1.65;
}
.console-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 14px; }
.console-foot span { font-size: 13px; color: var(--soft); }

/* ---- 안내·막힘 ---- */
.notice { background: var(--paper); border-radius: 24px; padding: 16px 22px; font-size: 16px; }
.notice.reload { background: var(--ink); color: #f2f1f3; border-radius: 28px; padding: 18px 26px; font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; animation: log-in .5s var(--ease); }
.notice.reload::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--volt); flex-shrink: 0; }
.notice.reload b { font-size: 22px; font-weight: 700; color: #fff; }
.blocker { background: var(--paper); border-radius: 32px; padding: 34px 38px; box-shadow: var(--shadow-float); max-width: 900px; }
.blocker h2 { font-size: 30px; letter-spacing: -.03em; margin-bottom: 12px; }
.blocker p { color: var(--slate); margin-top: 10px; }
.blocker pre { margin-top: 16px; background: var(--ink); color: #f2f1f3; border-radius: 20px; padding: 14px 18px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.blocker .actions { margin-top: 22px; }
.message:empty { display: none; }
.message { font-size: 15px; color: var(--slate); margin-top: 12px; overflow-wrap: anywhere; }
.message[data-error="true"] { color: var(--ink); font-weight: 500; background: var(--paper); border-radius: 20px; padding: 12px 18px; box-shadow: inset 0 0 0 2px var(--volt); }

/* ---- 사실 목록(저장 위치 등) ---- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact { background: var(--canvas); border-radius: 20px; padding: 14px 18px; min-width: 0; }
.fact dt { font-size: 12.5px; color: var(--slate); }
.fact dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.fact dd code { font-size: 15px; }
.fact dd small { display: block; font-size: 12.5px; font-weight: 400; color: var(--slate); }
dl.facts { margin: 0; }

/* ================= 홈 ================= */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 26px 0 40px; }
.hero h1 { font-size: 68px; line-height: 1.04; font-weight: 700; letter-spacing: -.04em; }
.hero .lead { font-size: 22px; margin-top: 20px; }
.oneliner input {
  width: 100%; border: 0; border-radius: 50px; background: var(--chip); color: #f2f1f3;
  padding: 14px 22px; font: 15.5px/1.4 var(--font-code);
}
.oneliner .console-foot span { color: var(--soft); }
.oneliner .result-table { color: #f2f1f3; }
.oneliner .result-table td, .oneliner .result-table th { border-color: var(--chip); }
.oneliner .result-note { color: var(--soft); }
.demo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.demo-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.demo-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-float); }
.demo-card .num { font-size: 15px; font-weight: 700; color: var(--violet); display: flex; align-items: center; gap: 10px; }
.demo-card .kw { background: var(--lavender); color: var(--plum); border-radius: 50px; padding: 3px 14px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { border: 0; cursor: pointer; border-radius: 50px; background: var(--chip); color: #f2f1f3; padding: 7px 16px; font-size: 13.5px; font-weight: 500; transition: background .2s; }
.chip:hover { background: var(--slate); }
.demo-card h2 { font-size: 27px; line-height: 1.2; letter-spacing: -.03em; }
.demo-card p { color: var(--slate); font-size: 17px; }
.demo-card code.path { margin-top: auto; align-self: flex-start; background: var(--canvas); border-radius: 50px; padding: 7px 16px; font-size: 14.5px; }
.demo-card .go { font-weight: 500; font-size: 16px; }
.env { margin-top: 24px; }
.site-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; font-size: 15px; color: var(--slate); }
.site-links a { color: var(--ink); font-weight: 500; }
.site-links span { font-family: var(--font-code); font-size: 14px; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.check { background: var(--canvas); border-radius: 20px; padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; }
.check .mark { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--ink); color: #fff; }
.check[data-ok="false"] .mark { background: var(--volt); color: var(--ink); }
.check strong { display: block; font-size: 16px; font-weight: 500; }
.check span { font-size: 13.5px; color: var(--slate); }

/* ================= 데모 1 · 할 일 ================= */
.todo-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 10px; margin-bottom: 14px; }
.todo-form input { border: 0; border-radius: 50px; background: var(--canvas); padding: 13px 20px; font-size: 17px; min-width: 0; }
.todo-list li { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--hairline); }
.todo-list li:last-child { border-bottom: 0; }
.todo-list input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--violet); flex-shrink: 0; cursor: pointer; }
.todo-list .id { font: 13px var(--font-code); color: var(--soft); width: 22px; text-align: right; flex-shrink: 0; }
.todo-list .task { flex: 1; font-size: 19px; min-width: 0; overflow-wrap: anywhere; }
.todo-list li.done .task { color: var(--soft); text-decoration: line-through; }
.tag { font-size: 13px; font-weight: 500; background: var(--canvas); border-radius: 50px; padding: 3px 12px; white-space: nowrap; }
.icon-btn { border: 0; background: none; cursor: pointer; color: var(--soft); font-size: 20px; line-height: 1; padding: 6px 10px; border-radius: 50px; }
.icon-btn:hover { background: var(--canvas); color: var(--ink); }
.empty { color: var(--slate); padding: 18px 4px; font-size: 17px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.stat { background: var(--canvas); border-radius: 24px; padding: 12px 22px; display: flex; align-items: baseline; gap: 12px; animation: log-in .45s var(--ease); }
.stat b { font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: var(--violet); }
.stat span { font-size: 17px; font-weight: 500; }
details.compare { margin-top: 14px; font-size: 15px; }
details.compare summary { cursor: pointer; color: var(--slate); font-weight: 500; }
details.compare .code-block { margin-top: 12px; }
details.compare .verdict { margin-top: 10px; color: var(--slate); }
.dump-out { margin-top: 14px; max-height: 240px; overflow: auto; }

/* ================= 데모 2 · 멀티탭 ================= */
.tab-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.me { display: flex; align-items: center; gap: 20px; }
.me .letter {
  width: 104px; height: 104px; border-radius: 32px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 62px; font-weight: 700; background: var(--canvas); color: var(--ink); transition: background .4s, color .4s;
}
.me .role { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.me .role-desc { font-size: 15px; color: var(--slate); margin-top: 4px; max-width: 300px; }
.tab-map { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tab-chip {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 50px; padding: 9px 18px 9px 10px;
  background: var(--canvas); font-size: 15px; font-weight: 500; animation: log-in .4s var(--ease);
}
.tab-chip i { font-style: normal; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-weight: 700; }
.tab-chip i { background: var(--blue); color: var(--ink); }
.tab-chip[data-leader="true"] { background: var(--violet); color: #fff; }
.tab-chip[data-leader="true"] i { background: #fff; color: var(--violet); }
.tab-chip[data-me="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--slate); }
.route span { background: var(--canvas); border-radius: 50px; padding: 5px 14px; color: var(--ink); font-weight: 500; }
.route span.me-node { background: var(--lavender); color: var(--plum); }
.route span.file { background: var(--ink); color: #fff; font-family: var(--font-code); font-size: 13px; }
.count-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.count-row b { font-size: 54px; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.count-row span { color: var(--slate); font-size: 15px; }
.src { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--canvas); font-weight: 700; font-size: 15px; }
.src[data-me="true"] { background: var(--lavender); color: var(--plum); }
.events { display: flex; flex-direction: column; gap: 8px; max-height: 190px; overflow: auto; font-size: 15px; }
.events li { display: flex; gap: 12px; animation: log-in .4s var(--ease); }
.events time { font: 13px/1.8 var(--font-code); color: var(--soft); flex-shrink: 0; }
.events li.strong { font-weight: 700; }

/* ================= 데모 3 · 혼합 JOIN ================= */
.engines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.engine { display: flex; flex-direction: column; gap: 12px; }
/* 저장소마다 색 하나: memory 회색, localStorage 라일락, sessionStorage 파랑. 카드·JOIN 결과·기록의 점에 같은 색을 쓴다. */
[data-engine="memory"], [data-mark="memory"] { --engine-color: var(--slate); --engine-text: #fff; }
[data-engine="localStorage"], [data-mark="localStorage"] { --engine-color: var(--lilac); --engine-text: var(--plum); }
[data-engine="sessionStorage"], [data-mark="sessionStorage"] { --engine-color: var(--blue); --engine-text: var(--ink); }
.engine { border-top: 10px solid var(--engine-color); }
.engine-name { display: inline-flex; align-self: flex-start; background: var(--engine-color, var(--ink)); color: var(--engine-text, #fff); border-radius: 50px; padding: 4px 16px; font: 700 15px var(--font-code); }
.engine h2 { font-size: 25px; letter-spacing: -.03em; }
.engine .life { color: var(--slate); font-size: 16px; }
.engine .code-block { padding: 14px 18px; }
.engine .code-block pre.sql { font-size: 13.5px; }
.engine .state { border-radius: 20px; background: var(--canvas); padding: 6px 12px; min-height: 96px; }
.engine .state .result-table { font-size: 16px; }
.engine .state .result-table td, .engine .state .result-table th { border-color: var(--paper); }
.engine[data-exists="false"] .state { display: grid; place-items: center; color: var(--soft); font-size: 15px; text-align: center; padding: 14px; }
.keys { font-size: 12.5px; color: var(--slate); }
.keys summary { cursor: pointer; font-weight: 500; }
.keys ul { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.keys code { font-size: 12px; overflow-wrap: anywhere; }
.keys li span { display: block; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-result { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.join-cell { border-radius: 24px; background: var(--canvas); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; animation: log-in .5s var(--ease) backwards; }
.join-cell .engine-name { font-size: 13px; padding: 2px 12px; }
.join-cell:nth-child(2) { animation-delay: .1s; }
.join-cell:nth-child(3) { animation-delay: .2s; }
.join-cell small { font: 12.5px var(--font-code); color: var(--slate); }
.join-cell b { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }

/* ================= 순서 바 · 접는 보조 정보 ================= */
.steps-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step { display: flex; align-items: center; gap: 8px; }
.step + .step::before { content: '→'; color: var(--soft); font-size: 18px; }
.step-pill {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 50px; padding: 7px 22px 7px 7px;
  background: var(--paper); color: var(--ink); font-size: 16.5px; font-weight: 500; line-height: 1.3;
  box-shadow: inset 0 0 0 1.5px var(--hairline); text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .3s, color .3s;
}
button.step-pill, a.step-pill { cursor: pointer; }
button.step-pill:hover:not(:disabled), a.step-pill:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1.5px var(--ink); }
.step-pill small { font-size: 12.5px; font-weight: 400; opacity: .75; margin-left: 4px; }
.step-num { font-style: normal; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); color: var(--ink); font-size: 14.5px; font-weight: 700; flex-shrink: 0; }
/* 지금 누를 단계: 버튼은 바이올렛, 버튼이 아닌 안내는 라벤더. */
.step[data-state="current"] .step-pill { background: var(--violet); color: #fff; box-shadow: var(--shadow-float); }
.step[data-state="current"] .step-num { background: #fff; color: var(--violet); }
.step[data-state="current"] .step-pill.passive { background: var(--lavender); color: var(--plum); box-shadow: none; }
.step[data-state="done"] .step-pill { color: var(--slate); }
.step[data-state="done"] .step-num { background: var(--ink); color: #fff; }
.step[data-state="done"] .step-pill.passive { background: var(--lavender); color: var(--plum); box-shadow: none; font-weight: 700; }
.step[data-state="todo"] button.step-pill:disabled { opacity: .5; cursor: not-allowed; }
button.step-pill:disabled { cursor: default; }

.more-list { border-bottom: 1px solid var(--hairline); }
details.more { border-top: 1px solid var(--hairline); padding: 15px 6px; }
details.more > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 14px; font-size: 17px; font-weight: 700; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+'; width: 18px; font-weight: 400; color: var(--slate); }
details.more[open] > summary::before { content: '−'; }
details.more > summary .hint { font-size: 13.5px; font-weight: 400; color: var(--slate); }
.more-body { margin-top: 16px; }
.more .fact { background: var(--paper); }
.notes { display: flex; flex-direction: column; gap: 6px; list-style: disc; padding-left: 40px; font-size: 14.5px; color: var(--slate); }

/* ================= 데모 2 · 역할별 색: 리더 바이올렛, 팔로워 하늘색, 승계 대기 잉크 ================= */
body[data-role]::before { content: ''; position: fixed; inset: 0 0 auto 0; height: 10px; z-index: 5; background: var(--blue); transition: background .4s; }
body[data-role="leader"]::before { background: var(--violet); }
body[data-role="waiting"]::before { background: var(--volt); }
.tab-banner { transition: background .4s, color .4s; }
.tab-banner[data-role="follower"] { background: var(--sky); }
.tab-banner[data-role="follower"] .letter { background: var(--blue); color: var(--ink); }
.tab-banner[data-role="follower"] .tab-chip:not([data-leader="true"]), .tab-banner[data-role="follower"] .route span:not(.me-node):not(.file) { background: var(--paper); }
.tab-banner[data-role="leader"] { background: var(--violet); color: #fff; }
.tab-banner[data-role="leader"] .letter { background: #fff; color: var(--violet); }
.tab-banner[data-role="leader"] .role-desc, .tab-banner[data-role="leader"] .hint, .tab-banner[data-role="leader"] .route { color: rgba(255, 255, 255, .82); }
.tab-banner[data-role="leader"] .tab-chip { background: rgba(255, 255, 255, .18); color: #fff; }
.tab-banner[data-role="leader"] .tab-chip[data-leader="true"] { background: #fff; color: var(--ink); }
.tab-banner[data-role="leader"] .tab-chip[data-leader="true"] i { background: var(--violet); color: #fff; }
.tab-banner[data-role="leader"] .route span { background: rgba(255, 255, 255, .18); color: #fff; }
.tab-banner[data-role="leader"] .route span.me-node { background: #fff; color: var(--violet); }
.tab-banner[data-role="leader"] .route span.file { background: var(--ink); }
.tab-banner[data-role="waiting"] { background: var(--ink); color: #fff; }
.tab-banner[data-role="waiting"] .letter { background: var(--volt); color: var(--ink); }
.tab-banner[data-role="waiting"] .role-desc, .tab-banner[data-role="waiting"] .hint, .tab-banner[data-role="waiting"] .route { color: var(--soft); }
.tab-banner[data-role="waiting"] .tab-chip, .tab-banner[data-role="waiting"] .route span { background: var(--chip); color: #fff; }
.count-row .spacer { margin-left: auto; align-self: center; }
/* 순서 바 바로 아래의 안내 문장은 순서 바에 붙여 둔다. */
.steps + .message, .steps-row + .message { margin-top: -10px; }

/* ---- 좁은 화면 ---- */
@media (max-width: 1080px) {
  .grid-2, .hero, .demo-cards, .engines { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .head-side { align-items: flex-start; }
  .tab-banner { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 50px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding: 16px 18px 0; gap: 10px; }
  .topbar .event { display: none; }
  .nav { margin-left: 0; }
  .nav a { padding: 7px 12px; font-size: 13.5px; }
  .page { padding: 20px 18px 50px; }
  .page-head h1 { font-size: 34px; }
  .hero h1 { font-size: 38px; }
  .lead, .hero .lead { font-size: 17px; }
  .card { border-radius: 24px; padding: 20px; }
  .import-chip { font-size: 12.5px; white-space: normal; border-radius: 20px; }
  .todo-form { grid-template-columns: minmax(0, 1fr) 96px; }
  .todo-form .btn { grid-column: 1 / -1; }
  .facts, .checks, .join-result { grid-template-columns: minmax(0, 1fr); }
  .me .letter { width: 76px; height: 76px; font-size: 44px; border-radius: 24px; }
  .me .role { font-size: 24px; }
}
/* 높이가 낮은 발표 화면(예: 1280×720)에서는 머리 영역을 줄여 조작 버튼과 결과가 첫 화면에 들어오게 한다. */
@media (max-height: 820px) and (min-width: 1081px) {
  .topbar { padding-top: 14px; }
  .page { padding-top: 16px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 40px; }
  .eyebrow { margin-bottom: 8px; padding: 3px 14px; font-size: 14px; }
  .lead { font-size: 17px; margin-top: 6px; }
  .stack, .grid-2, .engines { gap: 18px; }
  .card { padding: 20px 24px; }
  .me .letter { width: 84px; height: 84px; font-size: 50px; border-radius: 26px; }
  .count-row b { font-size: 44px; }
  .engine { gap: 8px; }
  .engine h2 { font-size: 22px; }
  .engine .state { min-height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
