:root {
  --bg: #f5f3ee;
  --surface: #fffefb;
  --surface-2: #eeece6;
  --surface-3: #e6e3dc;
  --ink: #20212b;
  --muted: #5f6170;
  --faint: #7c7e8a;
  --line: #d8d5cd;
  --line-strong: #bbb7ae;
  --primary: #4d3ed2;
  --primary-deep: #382ca7;
  --primary-soft: #e9e6ff;
  --accent: #bd5d38;
  --accent-soft: #f6e4db;
  --success: #19704e;
  --success-soft: #def1e8;
  --warning: #8d5c09;
  --warning-soft: #f7edce;
  --danger: #a63643;
  --danger-soft: #f8e1e5;
  --info: #1d5c91;
  --info-soft: #deedf8;
  --shadow: 0 18px 54px rgba(42, 39, 31, .08);
  --shadow-small: 0 7px 24px rgba(42, 39, 31, .07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --body-size: 18px;
  --reading-width: 760px;
  --wide-width: 1000px;
  --header-height: 72px;
  --focus-ring: 0 0 0 3px rgba(77, 62, 210, .28);
}

html[data-theme="dark"] {
  --bg: #15151b;
  --surface: #1e1e27;
  --surface-2: #282832;
  --surface-3: #30303c;
  --ink: #f2f0e9;
  --muted: #bebcc8;
  --faint: #9997a6;
  --line: #3b3a46;
  --line-strong: #565462;
  --primary: #a99dff;
  --primary-deep: #c0b8ff;
  --primary-soft: #302d55;
  --accent: #f09a72;
  --accent-soft: #4a2c27;
  --success: #72d0a7;
  --success-soft: #1f4538;
  --warning: #f4c864;
  --warning-soft: #493c1e;
  --danger: #ff9aa6;
  --danger-soft: #4b282f;
  --info: #8bc7f2;
  --info-soft: #203f57;
  --shadow: 0 18px 54px rgba(0, 0, 0, .24);
  --shadow-small: 0 7px 24px rgba(0, 0, 0, .18);
  --focus-ring: 0 0 0 3px rgba(169, 157, 255, .34);
}

/* 버튼·입력창은 body 글꼴을 물려받지 않는다(브라우저 기본 글꼴을 쓴다).
   이것 때문에 목차·설정 버튼만 시스템 글꼴로 그려지고 있었다 — 실측으로 잡았다. */
button, input, select, textarea { font-family: inherit; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 20px); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: var(--body-size);
  line-height: 1.78;
  letter-spacing: -0.015em;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary-deep); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
button { color: inherit; }
::selection { background: var(--primary-soft); color: var(--ink); }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 6px; }

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 1100;
  background: transparent;
}
.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width .1s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  backdrop-filter: blur(18px);
}
.header-inner {
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px -5px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  transform: rotate(-28deg);
}
.brand-mark::after { inset: 15px 5px; transform: rotate(18deg); border-color: var(--accent); }
.brand-mark i,
.brand-mark b {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  top: 5px;
  right: 3px;
}
.brand-mark b { background: var(--accent); top: auto; right: auto; bottom: 4px; left: 7px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font-size: 15px; letter-spacing: -.025em; }
.brand-text small { color: var(--muted); font-size: 14px; margin-top: 4px; }
.reader-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tool-button, .icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,.2);
}
.tool-button:hover, .icon-button:hover { border-color: var(--primary); color: var(--primary-deep); }
.tool-button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.icon-button { width: 42px; padding: 0; font-size: 22px; display: grid; place-items: center; }
.mobile-only { display: none; }

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px 120px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 54px;
  align-items: start;
}
.side-rail { position: sticky; top: calc(var(--header-height) + 28px); padding-top: 28px; }
.side-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  border-radius: var(--radius-lg);
  padding: 20px 16px 17px;
  box-shadow: var(--shadow-small);
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--primary-deep);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.current-section { margin: 0 0 16px; font-weight: 850; font-size: 16px; }
.section-nav { display: flex; flex-direction: column; gap: 2px; }
.section-nav a,
.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  font-weight: 650;
}
.section-nav a::before,
.mobile-nav a::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--line-strong);
}
.section-nav a:hover, .section-nav a.active,
.mobile-nav a:hover, .mobile-nav a.active { background: var(--primary-soft); color: var(--primary-deep); }
.section-nav a.active::before, .mobile-nav a.active::before { background: var(--primary); }
.side-progress { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-progress-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.side-progress-row strong { color: var(--ink); }
.side-progress-track { height: 6px; margin-top: 8px; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.side-progress-track span { display: block; width: 0; height: 100%; background: var(--primary); border-radius: inherit; }

main { min-width: 0; }
.section-block {
  width: min(100%, var(--reading-width));
  margin: 0 auto;
  padding: 96px 0 18px;
  scroll-margin-top: calc(var(--header-height) + 10px);
}
.wide-section { width: min(100%, var(--wide-width)); }
.hero { width: min(100%, var(--wide-width)); padding-top: 62px; min-height: calc(100vh - var(--header-height)); display: flex; flex-direction: column; justify-content: center; align-items: stretch; }
.section-kicker { margin: 0 0 14px; color: var(--accent); font-size: 14px; font-weight: 850; letter-spacing: .08em; }
.section-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 900;
  text-wrap: balance;
}
.section-title.medium { font-size: clamp(30px, 4.2vw, 48px); max-width: 22ch; }
.section-lead {
  margin: 20px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.68;
  letter-spacing: -.022em;
}
.section-intro { margin-bottom: 34px; }
.section-intro .section-title { font-size: clamp(30px, 4.6vw, 50px); }
.section-intro .section-lead { font-size: 19px; }

.hero-grid { width: 100%; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); gap: 52px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-question {
  margin: 26px 0 0;
  padding-left: 1.1em; text-indent: -.5em;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.56;
  font-weight: 760;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.primary-button, .secondary-button, .text-button {
  min-height: 48px;
  border-radius: 12px;
  padding: 11px 17px;
  cursor: pointer;
  font-weight: 800;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.25;
}
.primary-button { background: var(--primary); color: #fff; }
.primary-button:hover { background: var(--primary-deep); color: #fff; }
.secondary-button { background: var(--surface); color: var(--ink); border-color: var(--line); }
.secondary-button:hover { border-color: var(--primary); color: var(--primary-deep); }
.text-button { background: transparent; color: var(--primary-deep); padding-inline: 8px; }
.text-button:hover { background: var(--primary-soft); }
.hero-outcomes { margin: 32px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.hero-outcomes li { display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; color: var(--muted); font-size: 15px; }
.hero-outcomes li::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 14px; font-weight: 900; margin-top: 4px; }
.hero-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 700; background: var(--surface); }

.hero-visual {
  position: relative;
  min-height: 490px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 77% 20%, color-mix(in srgb, var(--accent) 23%, transparent), transparent 29%),
    radial-gradient(circle at 20% 78%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 34%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -30%;
  border: 1px solid color-mix(in srgb, var(--primary) 44%, transparent);
  border-radius: 50%;
  transform: rotate(-23deg);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 25% -18%;
  border: 1px dashed color-mix(in srgb, var(--accent) 52%, transparent);
  border-radius: 50%;
  transform: rotate(24deg);
}
.orbit-dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 14%, transparent); z-index: 2; }
.orbit-dot.one { top: 12%; right: 17%; }
.orbit-dot.two { bottom: 18%; left: 11%; background: var(--accent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 14%, transparent); }
.visual-card {
  position: absolute;
  z-index: 3;
  width: 172px;
  aspect-ratio: .66;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(5deg);
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: 0 25px 55px rgba(27, 24, 22, .22);
  padding: 14px;
}
.visual-card::before { content: ""; position: absolute; inset: 12px; border: 1px solid var(--line); border-radius: 12px; }
.card-symbol { position: absolute; inset: 22% 20%; display: grid; place-items: center; }
.card-symbol .sun { width: 72px; height: 72px; border: 2px solid var(--accent); border-radius: 50%; position: relative; }
.card-symbol .sun::before, .card-symbol .sun::after { content: ""; position: absolute; inset: -20px 34px; border-left: 1px solid var(--accent); transform: rotate(45deg); }
.card-symbol .sun::after { transform: rotate(-45deg); }
.card-symbol .moon { position: absolute; width: 50px; height: 50px; border-radius: 50%; box-shadow: -13px 8px 0 0 var(--primary); right: 4px; bottom: 4px; }
.visual-caption { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 4; padding: 13px 15px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 86%, transparent); border: 1px solid var(--line); backdrop-filter: blur(12px); font-size: 14px; line-height: 1.55; color: var(--muted); }
.visual-caption strong { display: block; color: var(--ink); margin-bottom: 3px; }

.callout {
  margin: 28px 0;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
}
.callout.accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.callout.warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 34%, var(--line)); }
.callout.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 28%, var(--line)); }
.callout h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.4; }
.callout p { margin: 0; color: var(--muted); }
.callout strong { color: var(--ink); }

.precheck-panel, .content-panel, .interaction-panel, .quiz-shell, .reference-browser {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}
.precheck-panel { padding: 28px; }
.claim-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.claim-item:first-child { padding-top: 0; }
.claim-item:last-child { border-bottom: 0; padding-bottom: 0; }
.claim-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.claim-top p { margin: 0; font-weight: 760; line-height: 1.55; }
.axis-chip { flex: 0 0 auto; border-radius: 999px; background: var(--surface-2); color: var(--muted); padding: 3px 9px; font-size: 14px; font-weight: 800; }
.range-row { margin-top: 16px; display: grid; grid-template-columns: 74px 1fr 74px; gap: 12px; align-items: center; color: var(--faint); font-size: 14px; }
.range-row span:last-child { text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }
.precheck-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.saved-note { color: var(--success); font-size: 14px; font-weight: 700; min-height: 24px; }

.lens-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.lens-card { padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.lens-card .number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary-deep); font-size: 14px; font-weight: 900; margin-bottom: 18px; }
.lens-card h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.35; }
.lens-card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.lens-card dl { margin: 0; font-size: 14px; }
.lens-card dt { margin-top: 10px; color: var(--faint); font-weight: 800; }
.lens-card dd { margin: 2px 0 0; color: var(--ink); }
.lens-card .warning-line { color: var(--accent); }

.timeline-list { position: relative; margin-top: 36px; }
.timeline-list::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 20px; width: 1px; background: var(--line-strong); }
.timeline-item { position: relative; padding: 0 0 36px 52px; }
.timeline-item::before { content: ""; position: absolute; left: 7px; top: 10px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 0 0 5px var(--bg); }
.timeline-period { display: inline-flex; margin-bottom: 7px; color: var(--accent); font-size: 14px; font-weight: 850; letter-spacing: .05em; }
.timeline-item h3 { margin: 0 0 8px; font-size: 24px; line-height: 1.35; }
.timeline-item p { margin: 0; color: var(--muted); }
.timeline-shift { margin-top: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; color: var(--ink); font-size: 14px; }

.reference-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ref-button { border: 1px solid var(--line); background: var(--surface); color: var(--primary-deep); min-height: 30px; padding: 4px 9px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 800; }
.ref-button:hover { border-color: var(--primary); background: var(--primary-soft); }

.concept-list { display: grid; gap: 14px; margin-top: 30px; }
.concept-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); overflow: clip; }
.concept-card summary { list-style: none; cursor: pointer; padding: 22px 58px 22px 22px; position: relative; }
.concept-card summary::-webkit-details-marker { display: none; }
.concept-card summary::after { content: "+"; position: absolute; right: 22px; top: 20px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); color: var(--primary-deep); font-size: 22px; font-weight: 500; }
.concept-card[open] summary::after { content: "−"; }
.concept-card[open] summary { border-bottom: 1px solid var(--line); }
.concept-card h3 { margin: 0 0 5px; font-size: 23px; line-height: 1.35; }
.concept-question { margin: 0; color: var(--muted); font-size: 15px; }
.concept-body { padding: 24px; }
.concept-one-line { margin: 0 0 20px; font-size: 19px; line-height: 1.65; font-weight: 760; }
.explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.explain-item { padding: 17px; background: var(--surface-2); border-radius: var(--radius-md); }
.explain-item h4 { margin: 0 0 6px; font-size: 14px; color: var(--primary-deep); letter-spacing: .03em; }
.explain-item p { margin: 0; color: var(--muted); font-size: 15px; }

.state-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 3px 9px; border-radius: 999px; font-size: 14px; font-weight: 850; border: 1px solid currentColor; }
.state-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-strong, .state-supported { color: var(--success); background: var(--success-soft); }
.state-conditional, .state-mixed, .state-exploratory { color: var(--warning); background: var(--warning-soft); }
.state-unsupported { color: var(--danger); background: var(--danger-soft); }
.state-value { color: var(--info); background: var(--info-soft); }

.perspective-selector { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; margin-top: 28px; }
.perspective-tab { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 42px; padding: 8px 14px; cursor: pointer; font-weight: 750; font-size: 14px; }
.perspective-tab[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.perspective-view { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); padding: 30px; box-shadow: var(--shadow-small); }
.perspective-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.perspective-head h3 { margin: 0 0 8px; font-size: 28px; }
.perspective-head p { margin: 0; color: var(--muted); }
.perspective-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.perspective-point { padding: 22px 22px 6px 0; }
.perspective-point:nth-child(even) { padding-left: 22px; padding-right: 0; border-left: 1px solid var(--line); }
.perspective-point h4 { margin: 0 0 7px; font-size: 14px; color: var(--primary-deep); }
.perspective-point p { margin: 0; color: var(--muted); font-size: 15px; }
.perspective-memory { margin: 20px 0 0; padding: 18px 20px; border-radius: var(--radius-md); background: var(--primary-soft); font-weight: 800; }

.evidence-list { display: grid; gap: 13px; margin-top: 28px; }
.evidence-item { display: grid; grid-template-columns: 170px 1fr; gap: 22px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.evidence-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.directness { color: var(--faint); font-size: 14px; font-weight: 800; }
.evidence-copy h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.5; }
.evidence-copy p { margin: 0; color: var(--muted); font-size: 15px; }
.evidence-copy .limit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; }

.interaction-stack { display: grid; gap: 28px; margin-top: 30px; }
.interaction-panel { overflow: clip; }
.interaction-head { padding: 28px 30px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 58%, var(--surface)), var(--surface)); }
.interaction-index { color: var(--accent); font-size: 14px; font-weight: 900; letter-spacing: .08em; }
.interaction-head h3 { margin: 5px 0 8px; font-size: 29px; line-height: 1.3; }
.interaction-head p { margin: 0; color: var(--muted); max-width: 760px; }
.interaction-body { padding: 30px; }
.interaction-step { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.step-number { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 900; }
.interaction-step p { margin: 0; }
.method-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.method-option { position: relative; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option label { display: flex; min-height: 76px; align-items: center; justify-content: center; text-align: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; font-weight: 800; background: var(--surface); }
.method-option input:checked + label { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); box-shadow: var(--focus-ring); }
.barnum-card { margin-top: 18px; padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-2); font-size: 18px; line-height: 1.8; }
.barnum-rating { margin-top: 20px; }
.rating-value { display: flex; align-items: baseline; gap: 6px; margin: 7px 0 10px; }
.rating-value strong { font-size: 34px; color: var(--primary-deep); }
.reveal-box { margin-top: 22px; padding: 22px; border-radius: var(--radius-lg); background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 30%, var(--line)); }
.reveal-box h4 { margin: 0 0 7px; }
.reveal-box p { margin: 0 0 10px; color: var(--muted); }
.reveal-box[hidden] { display: none; }

.sim-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .86fr); gap: 26px; }
.control-stack { display: grid; gap: 18px; }
.control-item { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.control-item:last-child { border-bottom: 0; }
.control-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-weight: 760; }
.control-label output { color: var(--primary-deep); font-weight: 900; }
.control-help { margin: 0 0 10px; color: var(--faint); font-size: 14px; }
.sim-result { align-self: start; position: sticky; top: calc(var(--header-height) + 24px); padding: 24px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--line); }
.gauge-pair { display: grid; gap: 18px; }
.gauge-row { display: grid; grid-template-columns: 112px 1fr 54px; gap: 10px; align-items: center; font-size: 14px; }
.gauge-track { height: 14px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gauge-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width .25s ease; }
.gauge-row.perceived .gauge-track span { background: var(--accent); }
.gauge-row strong { text-align: right; }
.sim-delta { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.sim-delta strong { display: block; font-size: 30px; color: var(--accent); }
.sim-delta span { color: var(--muted); font-size: 14px; }
.model-note { margin: 18px 0 0; color: var(--faint); font-size: 14px; line-height: 1.6; }

.decision-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: 26px; }
.form-field { margin-bottom: 18px; }
.form-field label, .form-field legend { display: block; margin-bottom: 7px; font-weight: 800; }
.form-field select, .form-field textarea, .search-input, .filter-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
}
.form-field textarea { min-height: 100px; resize: vertical; }
.factor-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.factor-row:last-child { border-bottom: 0; }
.factor-head { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; font-weight: 760; }
.factor-head output { color: var(--primary-deep); }
.decision-result { align-self: start; position: sticky; top: calc(var(--header-height) + 24px); border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: clip; }
.decision-level { padding: 22px; background: var(--surface-2); }
.decision-level .score { font-size: 14px; color: var(--muted); }
.decision-level h4 { margin: 4px 0 7px; font-size: 28px; }
.decision-level p { margin: 0; color: var(--muted); }
.decision-details { padding: 22px; background: var(--surface); }
.decision-details h5 { margin: 18px 0 6px; font-size: 14px; color: var(--primary-deep); }
.decision-details h5:first-child { margin-top: 0; }
.decision-details ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.decision-disclaimer { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }

.case-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 18px; }
.filter-button { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 7px 13px; cursor: pointer; font-size: 14px; font-weight: 760; }
.filter-button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.case-list { display: grid; gap: 13px; }
.case-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 23px; }
.case-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.case-head h3 { margin: 0; font-size: 21px; }
.risk-badge { flex: 0 0 auto; display: inline-flex; min-height: 27px; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 14px; font-weight: 900; }
.risk-low { color: var(--success); background: var(--success-soft); }
.risk-moderate { color: var(--warning); background: var(--warning-soft); }
.risk-high, .risk-critical { color: var(--danger); background: var(--danger-soft); }
.case-scenario { margin: 13px 0; color: var(--muted); }
.case-analysis { padding: 15px; background: var(--surface-2); border-radius: 12px; font-size: 14px; }
.case-action { margin: 13px 0 0; font-weight: 700; }

.synthesis-hero { padding: 30px; border-radius: var(--radius-xl); background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.synthesis-hero .eyebrow { color: color-mix(in srgb, var(--bg) 72%, var(--accent)); }
.synthesis-hero h3 { margin: 0 0 14px; font-size: clamp(27px, 4vw, 40px); line-height: 1.35; letter-spacing: -.035em; }
.synthesis-hero p { margin: 0; color: color-mix(in srgb, var(--bg) 75%, transparent); }
.synthesis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.synthesis-card { padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.synthesis-card h4 { margin: 0 0 10px; font-size: 18px; }
.synthesis-card ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.synthesis-card.allowed { border-top: 4px solid var(--success); }
.synthesis-card.blocked { border-top: 4px solid var(--danger); }
.synthesis-card.uncertain { border-top: 4px solid var(--warning); }
.synthesis-card.change { border-top: 4px solid var(--info); }

.quiz-shell { margin-top: 28px; overflow: clip; }
.quiz-topbar { padding: 18px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.quiz-progress-text { font-size: 14px; color: var(--muted); }
.quiz-progress-track { width: 230px; max-width: 40vw; height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.quiz-progress-track span { display: block; width: 0; height: 100%; background: var(--primary); }
.quiz-content { padding: 30px; }
.quiz-category { color: var(--accent); font-size: 14px; font-weight: 900; letter-spacing: .06em; }
.quiz-question { margin: 7px 0 20px; font-size: 24px; line-height: 1.5; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option { position: relative; }
.quiz-option input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-option label { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; min-height: 56px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-md); cursor: pointer; background: var(--surface); }
.quiz-option label::before { content: attr(data-letter); width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-weight: 900; }
.quiz-option input:checked + label { border-color: var(--primary); background: var(--primary-soft); }
.quiz-option input:checked + label::before { background: var(--primary); color: #fff; }
.quiz-option.correct label { border-color: var(--success); background: var(--success-soft); }
.quiz-option.incorrect label { border-color: var(--danger); background: var(--danger-soft); }
.quiz-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.quiz-feedback { margin-top: 22px; padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface-2); }
.quiz-feedback[hidden] { display: none; }
.quiz-feedback h4 { margin: 0 0 7px; }
.quiz-feedback p { margin: 7px 0; color: var(--muted); }
.quiz-feedback .result-correct { color: var(--success); }
.quiz-feedback .result-incorrect { color: var(--danger); }
.quiz-nav { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.quiz-results { padding: 30px; }
.score-hero { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: center; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--primary) var(--score-angle, 0deg), var(--surface-3) 0); position: relative; }
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.score-ring strong { position: relative; z-index: 1; font-size: 34px; }
.score-copy h3 { margin: 0 0 8px; font-size: 31px; }
.score-copy p { margin: 0; color: var(--muted); }
.category-scores { margin-top: 28px; display: grid; gap: 13px; }
.category-row { display: grid; grid-template-columns: 130px 1fr 55px; gap: 12px; align-items: center; font-size: 14px; }
.category-bar { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.category-bar span { display: block; height: 100%; background: var(--primary); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.final-form { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); }
.final-form textarea { width: 100%; min-height: 140px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.65; }
.comparison-box { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.comparison-panel { padding: 18px; border-radius: var(--radius-md); background: var(--surface-2); }
.comparison-panel h4 { margin: 0 0 8px; font-size: 14px; color: var(--primary-deep); }
.comparison-panel p { margin: 0; color: var(--muted); white-space: pre-wrap; }

.reference-browser { margin-top: 26px; overflow: clip; }
.reference-toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 10px; padding: 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.reference-count { padding: 0 20px 14px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.reference-list { display: grid; }
.reference-item { padding: 22px; border-bottom: 1px solid var(--line); }
.reference-item:last-child { border-bottom: 0; }
.reference-item-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; }
.reference-item h3 { margin: 0; font-size: 17px; line-height: 1.5; }
.reference-id { flex: 0 0 auto; color: var(--primary-deep); font-size: 14px; font-weight: 900; }
.reference-authors { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.reference-citation { margin: 5px 0 0; color: var(--faint); font-size: 14px; }
.reference-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.reference-tags span { display: inline-flex; border-radius: 999px; background: var(--surface-2); padding: 3px 8px; font-size: 14px; color: var(--muted); font-weight: 700; }
.reference-links-row { margin-top: 13px; display: flex; gap: 10px; flex-wrap: wrap; }
.reference-links-row a { font-size: 14px; font-weight: 800; }
.empty-state { padding: 50px 24px; text-align: center; color: var(--muted); }

.reference-dialog { width: min(720px, calc(100vw - 28px)); max-height: min(82vh, 760px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); padding: 0; box-shadow: 0 35px 110px rgba(0,0,0,.35); }
.reference-dialog::backdrop { background: rgba(18,18,25,.62); backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 22px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font-size: 24px; }
.dialog-body { padding: 20px 22px 28px; overflow-y: auto; }
.dialog-ref { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dialog-ref:last-child { border-bottom: 0; }
.dialog-ref h3 { margin: 0 0 7px; font-size: 17px; }
.dialog-ref p { margin: 4px 0; color: var(--muted); font-size: 14px; }
.dialog-ref a { font-weight: 800; font-size: 14px; }

.back-to-top { position: fixed; right: 22px; bottom: 22px; z-index: 800; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--primary-deep); box-shadow: var(--shadow-small); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.noscript-message { margin: 30px auto; width: min(90%, 760px); padding: 18px; background: var(--danger-soft); color: var(--danger); border-radius: 12px; }

.mobile-nav-backdrop { position: fixed; inset: 0; z-index: 1190; background: rgba(12,12,18,.55); }
.mobile-nav { position: fixed; inset: 0 auto 0 0; z-index: 1200; width: min(86vw, 340px); background: var(--surface); border-right: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; overflow-y: auto; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.mobile-nav a { min-height: 44px; font-size: 14px; }

body.focus-mode .side-rail,
body.focus-mode .reader-tools .desktop-only { display: none !important; }
body.focus-mode .page-shell { grid-template-columns: minmax(0, 1fr); max-width: 1080px; }
body.focus-mode .site-header { border-bottom-color: transparent; }

@media (max-width: 1080px) {
  .page-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 32px; padding-inline: 22px; }
  .section-title { font-size: clamp(40px, 5vw, 58px); }
  .hero-grid { gap: 28px; }
  .hero-visual { min-height: 450px; }
}

@media (max-width: 900px) {
  :root { --body-size: 17px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: grid; }
  .header-inner { padding-inline: 16px; }
  .brand-text small { display: none; }
  .reader-tools { gap: 4px; }
  .tool-button { padding-inline: 9px; min-width: 42px; }
  .page-shell { display: block; padding: 0 20px 90px; }
  .section-block, .wide-section { width: min(100%, 780px); padding-top: 80px; }
  .hero { min-height: auto; padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; min-height: 380px; max-width: 560px; width: 100%; margin: 6px auto 0; }
  .section-title { max-width: 15ch; }
  .sim-grid, .decision-grid { grid-template-columns: 1fr; }
  .sim-result, .decision-result { position: static; }
}

@media (max-width: 640px) {
  :root { --header-height: 64px; --body-size: 17px; --radius-xl: 22px; --radius-lg: 17px; }
  body { line-height: 1.74; }
  .header-inner { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .brand-text strong { font-size: 14px; }
  .reader-tools .tool-button:nth-child(1), .reader-tools .tool-button:nth-child(2) { display: none; }
  .tool-button { font-size: 14px; min-height: 38px; padding-inline: 8px; }
  .page-shell { padding-inline: 16px; }
  .section-block, .wide-section { padding-top: 70px; }
  .hero { padding-top: 36px; }
  .section-kicker { font-size: 14px; }
  .section-title { font-size: clamp(38px, 12vw, 52px); max-width: 12ch; }
  .section-title.medium, .section-intro .section-title { font-size: clamp(30px, 9vw, 42px); max-width: 15ch; }
  .section-lead, .section-intro .section-lead { font-size: 18px; }
  .hero-question { font-size: 18px; padding-left: 14px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .primary-button, .secondary-button { width: 100%; min-height: 52px; }
  .hero-visual { min-height: 350px; border-radius: 22px; }
  .visual-card { width: 138px; }
  .visual-caption { left: 14px; right: 14px; bottom: 14px; }
  .precheck-panel, .perspective-view, .interaction-body, .quiz-content, .quiz-results, .final-form { padding: 20px; }
  .claim-top { display: block; }
  .axis-chip { display: inline-flex; margin-top: 8px; }
  .range-row { grid-template-columns: 58px 1fr 58px; gap: 8px; }
  .precheck-actions { align-items: stretch; flex-direction: column; }
  .lens-grid, .explain-grid, .perspective-grid, .synthesis-grid, .comparison-box { grid-template-columns: 1fr; }
  .perspective-point, .perspective-point:nth-child(even) { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .perspective-point:last-child { border-bottom: 0; }
  .timeline-item { padding-left: 42px; }
  .timeline-item h3 { font-size: 21px; }
  .evidence-item { grid-template-columns: 1fr; gap: 12px; padding: 19px; }
  .evidence-meta { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .interaction-head { padding: 22px 20px 18px; }
  .interaction-head h3 { font-size: 25px; }
  .method-options { grid-template-columns: 1fr; }
  .method-option label { min-height: 54px; }
  .barnum-card { font-size: 17px; padding: 20px; }
  .gauge-row { grid-template-columns: 90px 1fr 48px; }
  .case-head { display: block; }
  .risk-badge { margin-top: 8px; }
  .quiz-topbar { padding: 14px 18px; }
  .quiz-progress-track { width: 110px; }
  .quiz-question { font-size: 21px; }
  .quiz-option label { grid-template-columns: 27px 1fr; padding: 12px; }
  .quiz-nav { flex-direction: column; }
  .quiz-nav button { width: 100%; }
  .score-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .category-row { grid-template-columns: 100px 1fr 45px; gap: 8px; }
  .reference-toolbar { grid-template-columns: 1fr; }
  .reference-item-head { display: block; }
  .reference-id { display: inline-flex; margin-bottom: 7px; }
  .back-to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 390px) {
  .brand-text strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .tool-button { min-width: 38px; }
  .page-shell { padding-inline: 14px; }
  .section-title { font-size: 42px; }
  .hero-visual { min-height: 320px; }
  .visual-caption { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --muted: #333; --line: #bbb; }
  .site-header, .side-rail, .reading-progress, .back-to-top, .hero-actions, .reader-tools, .mobile-nav, .mobile-nav-backdrop, .quiz-actions, .quiz-nav, .reference-toolbar, .case-filter { display: none !important; }
  body { font-size: 11pt; line-height: 1.55; background: #fff; }
  .page-shell { display: block; padding: 0; max-width: none; }
  .section-block, .wide-section, .hero { width: 100%; max-width: none; min-height: auto; padding: 24px 0; page-break-inside: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .concept-card, .case-card, .evidence-item, .perspective-view, .interaction-panel, .quiz-shell, .reference-browser { box-shadow: none; break-inside: avoid; }
  details { display: block; }
  details > summary { list-style: none; }
  .concept-card .concept-body { display: block !important; }
  a { color: #000; text-decoration: none; }
}

/* Touch targets: compact evidence and source controls remain easy to operate on mobile. */
@media (max-width: 640px) {
  .tool-button,
  .icon-button,
  .ref-button,
  .filter-button {
    min-width: 44px;
    min-height: 44px;
  }

  .ref-button,
  .filter-button {
    padding-block: 9px;
  }

  .reference-item a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 8px;
  }
}

@media (max-width: 640px) {
  button {
    min-height: 44px;
  }
}

/* 아이콘은 인라인 SVG — 기호글자는 OS 마다 모양·기준선이 달라 정렬이 깨진다 */
.ui-icon { width: 16px; height: 16px; flex: 0 0 auto; display: block; }
.tool-button, .icon-button, .home-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.home-link { text-decoration: none; font-size: 14px; font-weight: 650; white-space: nowrap; }
.home-link.book-link { margin-left: auto; color: var(--accent); }
@media (max-width: 760px) { .home-link span { display: none; } }
html { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--line, rgba(255,255,255,.26)) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: var(--line, rgba(255,255,255,.26)); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
