:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --beginner: #0284c7;
  --beginner-soft: #e0f2fe;
  --advanced: #7c3aed;
  --advanced-soft: #ede9fe;
  --long: #059669;
  --long-soft: #d1fae5;
  --short: #e11d48;
  --short-soft: #ffe4e6;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --done: #10b981;
  --done-soft: #d1fae5;
  --lock: #94a3b8;
  --chrome: rgba(255, 255, 255, 0.92);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.06);
  --sans: "Plus Jakarta Sans", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* legacy aliases used in SVG / inline refs */
  --ink: var(--text);
  --ink-soft: var(--text-soft);
  --paper: var(--surface);
  --rule: var(--border);
  --stamp: var(--accent);
  --stamp-soft: var(--accent-hover);
  --gold: var(--warn);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 100% -5%, rgba(37, 99, 235, 0.07), transparent 55%),
    radial-gradient(700px 360px at 0% 0%, rgba(14, 165, 233, 0.06), transparent 50%),
    var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
a:hover { color: var(--accent-hover); }

#chrome {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  background: var(--chrome);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  color: var(--text);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1rem;
}

.brand-mark {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.top-links { display: flex; gap: 0.35rem; }

.top-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.top-links a.is-on {
  background: var(--accent-soft);
  color: var(--accent);
}

.top-links a:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.progress-bar {
  height: 3px;
  background: var(--border);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  transition: width 0.25s ease;
}

.dots {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 1.25rem 0.85rem;
  background: transparent;
  overflow-x: auto;
}

.dot {
  min-width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dot:hover { transform: translateY(-1px); }

.dot.is-open {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.dot.is-beginner.is-open {
  border-color: var(--beginner);
  color: var(--beginner);
  background: var(--beginner-soft);
}

.dot.is-advanced.is-open {
  border-color: var(--advanced);
  color: var(--advanced);
  background: var(--advanced-soft);
}

.dot.is-done {
  background: var(--done);
  border-color: var(--done);
  color: #fff;
}

.dot.is-lock { opacity: 0.42; }

.dot.is-now {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.wrap {
  width: min(760px, 100%);
  margin: 1.25rem auto 3rem;
  padding: 0 1.25rem;
  box-sizing: border-box;
}

.hero h1,
.page h1 {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.lede {
  color: var(--text-soft);
  font-size: 1.02rem;
  max-width: 42rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.5rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.meter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.card,
.check-list,
.callout,
.session-card,
.path-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-padded { padding: 1.1rem; }

.grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.path-list { display: grid; gap: 0.65rem; margin: 0.85rem 0 0; }

.path-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: inherit;
  border-left: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.path-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.path-card.is-beginner { box-shadow: inset 3px 0 0 var(--beginner); }
.path-card.is-advanced { box-shadow: inset 3px 0 0 var(--advanced); }
.path-card.is-done { box-shadow: inset 3px 0 0 var(--done); }
.path-card.is-lock { opacity: 0.72; box-shadow: inset 3px 0 0 var(--lock); }

.path-num {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--surface-muted);
}

.path-body strong {
  display: block;
  font-size: 1rem;
  font-weight: 650;
}

.path-body em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.88rem;
}

.path-st {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-muted);
}

.path-card.is-done .path-st {
  color: var(--done);
  background: var(--done-soft);
}

.path-zone {
  margin: 1.5rem 0 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.path-zone.is-beginner {
  border-top: 3px solid var(--beginner);
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.45), rgba(255, 255, 255, 0.85));
}

.path-zone.is-advanced {
  border-top: 3px solid var(--advanced);
  background: linear-gradient(180deg, rgba(237, 233, 254, 0.45), rgba(255, 255, 255, 0.85));
}

.zone-head {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  letter-spacing: -0.02em;
}

.zone-note { margin: 0 0 0.2rem; }

.level-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  border-radius: 999px;
  vertical-align: middle;
}

.level-badge.is-beginner {
  background: var(--beginner-soft);
  color: var(--beginner);
  border: 1px solid rgba(2, 132, 199, 0.18);
}

.level-badge.is-advanced {
  background: var(--advanced-soft);
  color: var(--advanced);
  border: 1px solid rgba(124, 58, 237, 0.18);
}

.playbook-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1.2rem 0 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.playbook-tabs .tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.playbook-tabs .tab.is-beginner.is-on {
  background: var(--surface);
  color: var(--beginner);
  box-shadow: var(--shadow-sm);
}

.playbook-tabs .tab.is-advanced.is-on {
  background: var(--surface);
  color: var(--advanced);
  box-shadow: var(--shadow-sm);
}

.playbook-tabs .tab.is-on:not(.is-beginner):not(.is-advanced) {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tab-note { margin: 0 0 1rem; }

.playbook-zone { margin: 0 0 1.5rem; }
.playbook-zone > .zone-head { margin-bottom: 0.6rem; }
.playbook-zone section { margin-bottom: 1.2rem; }

.playbook-zone h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.playbook-zone h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.2rem 0 0.65rem;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
  margin: 1.2rem 0 0.4rem;
}

.figure {
  margin: 0.5rem 0 1rem;
  padding: 0;
  max-width: 100%;
}

.figure.is-compact {
  padding: 0;
}
.figure.is-compact figcaption { margin-top: 0.45rem; }

.figure svg,
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xs);
}

.figure figcaption {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.chart-pair {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
  min-width: 0;
}

.chart-pair [data-chart] {
  min-width: 0;
  width: 100%;
}

.one-liners {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.one-liners li { margin: 0; }

.nowrap { white-space: nowrap; }

.refs {
  margin: 2.5rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.refs h2 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.refs ul {
  margin: 0;
  padding-left: 1.1rem;
}

.refs li {
  margin: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.refs a { font-weight: 600; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.table-scroll table {
  min-width: 36rem;
  margin: 0;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
}

th:first-child,
td:first-child {
  white-space: nowrap;
}

tr:last-child td { border-bottom: 0; }
th { background: var(--surface-muted); font-weight: 650; }

.check-list {
  list-style: none;
  margin: 0.8rem 0 1.2rem;
  padding: 0.35rem 0.65rem;
}

.check-list li {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  gap: 0.65rem;
  padding: 0.65rem 0.2rem;
  border-bottom: 1px solid var(--border);
}

.check-list li:last-child { border-bottom: 0; }

.check-list input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.callout {
  padding: 0.95rem 1rem;
  margin: 1rem 0;
  border-radius: var(--radius-sm);
}

.callout.do {
  border-left: 0;
  background: var(--long-soft);
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.callout.dont {
  border-left: 0;
  background: var(--short-soft);
  border: 1px solid rgba(225, 29, 72, 0.12);
}

.callout.warn {
  border-left: 0;
  background: var(--warn-soft);
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.mastery {
  margin: 2.2rem 0 1rem;
  padding: 1.15rem;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: #f8fafc;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.mastery p { color: #cbd5e1; }

.mastery button,
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mastery button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.mastery button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.mastery button.is-mastered,
.btn.primary {
  background: var(--done);
  border-color: var(--done);
  color: #fff;
}

.btn.ink {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.ink:hover { background: var(--accent-hover); }

.btn.secondary {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface);
}

.btn.danger {
  color: var(--short);
  border-color: rgba(225, 29, 72, 0.25);
  background: var(--short-soft);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1rem 0; }

#lock-banner {
  padding: 0.8rem 1rem;
  background: var(--warn-soft);
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: var(--radius-sm);
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.clock-now {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.clock-live { color: #7dd3fc; font-weight: 600; }

.kz-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}

.kz-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.kz-list li:last-child { border-bottom: 0; }

.kz-list li.is-live {
  background: var(--beginner-soft);
  color: var(--beginner);
  font-weight: 650;
}

.hint,
.fine { color: var(--muted); font-size: 0.85rem; }

form label {
  display: block;
  margin: 0.75rem 0 0.3rem;
  font-weight: 650;
  font-size: 0.92rem;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--surface);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea { min-height: 6rem; resize: vertical; }

.session-card {
  padding: 0.95rem 1rem;
  margin: 0.7rem 0;
}

.session-card footer { color: var(--muted); font-size: 0.82rem; }

.session-card button {
  margin-left: 0.4rem;
  border: 0;
  background: none;
  color: var(--short);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.is-dim { opacity: 0.45; }

.gate-tag {
  float: right;
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--mono);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-muted);
}

.long { color: var(--long); font-weight: 700; }
.short { color: var(--short); font-weight: 700; }

footer.site {
  width: min(760px, 100%);
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
  box-sizing: border-box;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (min-width: 640px) {
  .chart-pair { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 639px) {
  .top, .dots {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .wrap, footer.site {
    padding-left: 1rem;
    padding-right: 1rem;
    margin-top: 1rem;
  }
  h2 { margin-top: 1.6rem; }
}

@media print {
  .top, .progress-bar, .dots, .mastery, .btn-row, #lock-banner, .playbook-tabs, .tab-note { display: none !important; }
  #chrome { position: static; border: 0; backdrop-filter: none; }
  body { background: #fff; }
  .wrap, footer.site { width: 100%; margin: 0; padding: 0; }
  .playbook-zone[hidden] { display: block !important; }
}
