/* ═══════════════════════════════════════════════════════════
   Page-specific styles — clean documentation layout
   Reference: Antigravity-style 3-column docs
   ═══════════════════════════════════════════════════════════ */

/* ─── Page graph (related-document visualization in right TOC) ─── */
.page-graph {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.page-graph-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.page-graph-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.page-graph-expand {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.page-graph-expand:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.page-graph-canvas {
  background: var(--bg-strong, rgba(0,0,0,0.025));
  border-radius: 12px;
  padding: 12px 6px;
}
.page-graph-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
}
.graph-node-center {
  cursor: default;
}
.graph-node-satellite {
  transition: transform 0.15s ease, fill 0.15s ease;
  transform-origin: center;
  transform-box: fill-box;
}
.graph-link {
  cursor: pointer;
  text-decoration: none;
}
.graph-link:hover .graph-node-satellite {
  fill: #2563eb;
  transform: scale(1.25);
}
.graph-link:hover .graph-label {
  fill: var(--accent);
  font-weight: 600;
}
.graph-label {
  fill: var(--muted);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  pointer-events: none;
  user-select: none;
}
:root[data-theme="dark"] .graph-label {
  fill: rgba(255, 255, 255, 0.72);
}
:root[data-theme="dark"] .graph-node-satellite {
  fill: #64748b;
}
:root[data-theme="dark"] .page-graph-canvas {
  background: rgba(255, 255, 255, 0.03);
}
.page-graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 10px;
  font-size: 0.72rem;
  color: var(--muted);
}
.page-graph-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.graph-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ─── Graph modal (expand view) ─── */
.graph-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.graph-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.graph-modal-panel {
  position: relative;
  background: var(--surface, #fff);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 18px 22px 18px;
  width: min(92vw, 820px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
:root[data-theme="dark"] .graph-modal-panel {
  background: #1a1a1a;
}
.graph-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.graph-modal-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.graph-modal-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
}
.graph-modal-close:hover {
  background: var(--bg-strong, rgba(0, 0, 0, 0.05));
  color: var(--text);
}
.graph-modal-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 4px 0 8px;
}
.graph-modal-legend {
  display: flex;
  gap: 18px;
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  justify-content: center;
}
.graph-modal-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ─── Prompt explainer (Korean breakdown for English prompt blocks) ─── */
.prompt-explainer {
  margin: -8px 0 24px;
  padding: 14px 16px 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface, #fff));
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  line-height: 1.7;
}
.prompt-explainer-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.prompt-explainer dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
}
.prompt-explainer dt {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.prompt-explainer dd {
  margin: 0;
  color: var(--muted);
}
.prompt-explainer code {
  background: var(--bg-strong, rgba(0,0,0,0.05));
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}
:root[data-theme="dark"] .prompt-explainer {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface, #1a1a1a));
}
@media (max-width: 720px) {
  .prompt-explainer dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .prompt-explainer dt {
    margin-top: 6px;
  }
}

/* ─── 3-Column Layout ─── */
.page-body {
  display: grid;
  grid-template-columns: 1fr minmax(0, 240px);
  gap: 0;
  max-width: 100%;
}

.page-content {
  max-width: 740px;
  padding: 32px 40px 60px;
}

/* ─── Right sidebar TOC ─── */
.page-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px 20px 24px 20px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  /* Visually hide scrollbar — wheel scroll still works */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

.page-toc::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none; /* Chrome/Safari */
}

.page-toc-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.page-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-toc-list li {
  margin-bottom: 2px;
}

.page-toc-list a {
  display: block;
  padding: 5px 0 5px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  line-height: 1.5;
}

.page-toc-list a:hover {
  color: var(--text);
}

.page-toc-list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* ─── Page header ─── */
.page-header {
  margin-bottom: 36px;
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.page-header .breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.page-header .breadcrumb a:hover {
  color: var(--accent);
}

.page-header .breadcrumb .sep {
  opacity: 0.3;
}

.official-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 16px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: border-color 120ms ease, color 120ms ease;
}

.official-doc-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.official-doc-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.page-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 8px;
}

.page-summary {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 16px;
}

/* ─── Takeaway callout (한 줄 요약 style) ─── */
.takeaway-box {
  display: block;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 28px;
}

.takeaway-box::before {
  content: none;
}

.takeaway-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.takeaway-box p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text);
}

/* ─── Section titles ─── */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 0;
  border-bottom: none;
  scroll-margin-top: 24px;
}

.section-title:first-of-type {
  margin-top: 0;
}

.section-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
  scroll-margin-top: 24px;
}

.section-subtitle svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
}

/* Note box paragraph spacing */
.note-box p + p {
  margin-top: 0.5rem;
}

/* Takeaway list */
.takeaway-box ul {
  margin: 0.5rem 0 0 1.2rem;
  line-height: 1.8;
}

/* Config code block */
.config-code {
  background: var(--bg-strong);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Inline action links */
.inline-action-link {
  margin-top: 0.5rem;
  display: inline-block;
}

/* ─── Prose text ─── */
.page-content p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

/* ─── Stat / Dashboard Cards ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 14px 12px;
  text-align: center;
}

.stat-icon {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
  display: block;
  color: var(--accent);
}

.stat-icon svg {
  width: 100%;
  height: 100%;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

/* ─── Flow / Step Diagrams ─── */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 28px;
}

.flow-step {
  flex: 1;
  min-width: 130px;
  position: relative;
  padding: 16px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  text-align: center;
}

.flow-step + .flow-step {
  margin-left: 28px;
}

.flow-step + .flow-step::before {
  content: "→";
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
}

.flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.flow-step-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 4px;
}

.flow-step-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Comparison Table ─── */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table th {
  background: var(--bg-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover {
  background: var(--accent-soft);
}

.compare-table td {
  color: var(--text);
  line-height: 1.5;
}

.compare-table .check {
  color: var(--accent);
  font-weight: 600;
}

.compare-table .cross {
  color: var(--muted);
  opacity: 0.5;
}

/* ─── Info Cards ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 16px;
  transition: border-color var(--transition);
}

.info-card:hover {
  border-color: var(--line-strong);
}

.info-card-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
  display: block;
  color: var(--accent);
}

.info-card-icon svg {
  width: 100%;
  height: 100%;
}

.info-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.info-card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── Feature List ─── */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list .feat-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-xs);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.feature-list .feat-icon svg {
  width: 14px;
  height: 14px;
}

/* ─── Visual Diagram Box ─── */
.diagram-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 28px;
  text-align: center;
}

.diagram-box .diagram-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.tree-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.tree-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--accent);
}

.tree-node.root {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tree-connector {
  width: 2px;
  height: 16px;
  background: var(--accent);
  opacity: 0.3;
}

.tree-branches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ─── Bar Chart ─── */
.bar-chart {
  margin-bottom: 28px;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bar-label {
  min-width: 110px;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-strong);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  transition: width 0.6s ease;
}

/* ─── Tags ─── */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ─── Keyboard shortcuts ─── */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  margin-bottom: 28px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.shortcut-desc {
  font-size: 0.85rem;
  color: var(--text);
}

.shortcut-keys {
  display: flex;
  gap: 3px;
}

.key {
  display: inline-block;
  padding: 3px 8px;
  background: var(--bg-strong);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ─── Timeline ─── */
.timeline {
  position: relative;
  padding-left: 28px;
  margin-bottom: 28px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 3px;
}

.timeline-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Sources ─── */
.page-sources {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.page-sources h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.page-sources ul {
  list-style: none;
  padding: 0;
}

.page-sources li {
  margin-bottom: 6px;
}

.page-sources a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.88rem;
}

.page-sources a:hover {
  text-decoration: underline;
}

.page-sources a::after {
  content: " ↗";
  font-size: 0.75em;
  opacity: 0.5;
}

.page-sources code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 6px;
}

/* ─── Page navigation ─── */
.page-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.page-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: border-color var(--transition);
}

.page-nav a:hover {
  border-color: var(--accent);
}

.page-nav .nav-dir {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.page-nav .nav-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

.page-nav a.next {
  text-align: right;
}

/* ─── Note boxes (callout style with left border) ─── */
.note-box {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.7;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  color: var(--text);
}

/* ─── Code block ─── */
.code-block {
  background: var(--bg-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--text);
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ─── Beginner-friendly explainer block ─── */
/* 초보자가 어려운 용어/개념을 만났을 때 한 번 더 풀어주는 보조 설명 박스 */
.beginner-explainer {
  display: block;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.04), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-md);
  padding: 14px 18px 12px;
  margin: 16px 0 20px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
}

.beginner-explainer .explainer-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.beginner-explainer .explainer-label::before {
  content: "🔰";
  font-size: 0.95rem;
}

.beginner-explainer .explainer-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.beginner-explainer p {
  margin: 0 0 6px;
  color: var(--text);
}

.beginner-explainer p:last-child {
  margin-bottom: 0;
}

.beginner-explainer ul,
.beginner-explainer ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

.beginner-explainer li + li {
  margin-top: 4px;
}

/* ─── Prompt recipe card ─── */
/* 사용자가 그대로 복사해 따라할 수 있는 "프롬프트 레시피" 카드 */
.prompt-recipe {
  display: block;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 18px 14px;
  margin: 18px 0 24px;
  box-shadow: var(--shadow-card);
}

.prompt-recipe .recipe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.prompt-recipe .recipe-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.prompt-recipe .recipe-label::before {
  content: "💬";
  font-size: 0.95rem;
}

.prompt-recipe .recipe-target {
  font-size: 0.74rem;
  color: var(--muted);
  background: var(--bg-strong);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.prompt-recipe .recipe-summary {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.prompt-recipe .recipe-prompt-wrap {
  position: relative;
  margin: 8px 0 10px;
}

.prompt-recipe .recipe-prompt {
  background: var(--bg-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 56px 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-recipe .recipe-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-sans, "IBM Plex Sans KR", sans-serif);
  color: var(--accent);
  background: var(--surface-strong);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.prompt-recipe .recipe-copy-btn:hover {
  background: var(--accent);
  color: #fff;
}

.prompt-recipe .recipe-copy-btn.is-copied {
  background: var(--accent);
  color: #fff;
}

.prompt-recipe .recipe-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.6;
}

.prompt-recipe .recipe-meta dt {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.prompt-recipe .recipe-meta dd {
  margin: 0;
}

.prompt-recipe .recipe-tip {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.prompt-recipe .recipe-tip strong {
  color: var(--text);
}

@media (max-width: 600px) {
  .prompt-recipe .recipe-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .prompt-recipe .recipe-meta {
    grid-template-columns: 1fr;
  }
  .prompt-recipe .recipe-meta dt {
    margin-top: 4px;
  }
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .page-toc {
    display: none;
  }

  .page-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .page-content {
    padding: 24px 16px 60px;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .flow-steps {
    flex-direction: column;
  }

  .flow-step + .flow-step {
    margin-left: 0;
    margin-top: 12px;
  }

  .flow-step + .flow-step::before {
    content: "↓";
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .page-nav {
    flex-direction: column;
  }

  .page-nav a.next {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Smooth anchor scroll offset ─── */
[id] {
  scroll-margin-top: 24px;
}

/* ─── Code copy button ─── */
.code-block {
  position: relative;
}

.code-block:hover::after {
  content: "복사";
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--line);
  color: var(--muted);
  font-family: var(--font-sans, "IBM Plex Sans KR", sans-serif);
  pointer-events: none;
  opacity: 0.6;
}

/* ─── Table improvements ─── */
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.page-content table th {
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid var(--line-strong);
  color: var(--text);
  white-space: nowrap;
}

.page-content table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  vertical-align: top;
}

.page-content table tr:hover td {
  background: var(--accent-soft);
}

/* ─── Inline code ─── */
.page-content code:not(.code-block code) {
  background: var(--bg-strong);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent-strong);
}

/* ─── List styling ─── */
.page-content ul,
.page-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-content li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 4px;
}

.page-content li::marker {
  color: var(--accent);
}

/* ─── Pros / Cons / Limitations ─── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.pros-cons-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.pros-cons-card--pro {
  background: var(--color-can-bg);
  border-color: var(--color-can-border);
}

.pros-cons-card--con {
  background: var(--color-cannot-bg);
  border-color: var(--color-cannot-border);
}

.pros-cons-card h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.pros-cons-card--pro h4 { color: var(--color-can); }
.pros-cons-card--con h4 { color: var(--color-cannot); }

.pros-cons-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pros-cons-card li {
  position: relative;
  padding: 3px 0 3px 18px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
}

.pros-cons-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pros-cons-card--pro li::before { background: var(--color-can); }
.pros-cons-card--con li::before { background: var(--color-cannot); }

.limitations-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 24px;
  background: var(--surface-strong);
}

.limitations-box h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
}

.limitations-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.limitations-box li {
  position: relative;
  padding: 3px 0 3px 18px;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text);
}

.limitations-box li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 0.72rem;
}

@media (max-width: 640px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

@media print {
  .pros-cons-card,
  .limitations-box {
    page-break-inside: avoid;
  }
}

/* ─── Blockquote ─── */
.page-content blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--muted);
}
