:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --container: 1320px;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.72;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

a { color: var(--accent); }

img,
video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

::selection {
  background: rgba(37, 99, 235, 0.2);
  color: #0f172a;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(140%);
}

.site-header__inner {
  width: min(var(--container), calc(100% - 48px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title::before {
  content: "ML";
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-family: "Fira Code", monospace;
  font-size: 0.74rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 700;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: #475569;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
}

.site-nav-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  margin-left: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 180ms ease;
}

.site-nav-lock-btn:hover,
.site-nav-lock-btn:focus-visible {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.site-main { padding: 42px 0 80px; }

.site-container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.site-container--home,
.project-page { max-width: var(--container); }

.page-home .site-main { padding-top: 28px; }

.project-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(14, 24, 48, 0.96);
  box-shadow: var(--shadow);
}

.project-hero::before {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  top: -23rem;
  right: -6rem;
  z-index: -1;
  border-radius: 50%;
  background: none; display: none;
}

.project-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #38bdf8;
}

.back-link {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: #aebbd0;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: rgba(96, 165, 250, 0.4);
  color: #fff;
}

.project-kicker {
  margin: 0 0 12px;
  color: #7dd3fc;
  font-family: "Fira Code", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.project-hero h1 {
  max-width: 980px;
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.project-hero > p:last-of-type,
.project-hero__content > p:last-of-type {
  max-width: 850px;
  margin: 22px 0 0;
  color: #aebbd0;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.project-tags span {
  padding: 5px 10px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.09);
  color: #bae6fd;
  font-family: "Fira Code", monospace;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Project Hero Art & Content Layout */
.project-hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
}

.project-hero__art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56%;
  max-width: 720px;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 4%, #000 14%, #000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.5) 4%, #000 14%, #000 100%);
}

.project-hero__art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  display: block;
}

.project-hero__art-gradient {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to right, rgba(243, 247, 255, 0.4) 0%, rgba(243, 247, 255, 0.08) 8%, transparent 16%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .project-hero__art-gradient {
    background: 
      linear-gradient(to right, rgba(14, 24, 48, 0.5) 0%, rgba(14, 24, 48, 0.1) 8%, transparent 16%);
  }
}

@media (max-width: 880px) {
  .project-hero__art {
    width: 100%;
    max-width: none;
    opacity: 0.15;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
  }
  .project-hero__content {
    max-width: 100%;
  }
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.project-content {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.project-content > :first-child { margin-top: 0; }

.project-content h2,
.project-content h3,
.project-content h4 {
  color: #f8fafc;
  line-height: 1.3;
  letter-spacing: -0.025em;
  scroll-margin-top: 98px;
  text-wrap: balance;
}

.project-content h2 {
  margin-top: 64px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.project-content h3 {
  margin-top: 42px;
  font-size: clamp(1.2rem, 2vw, 1.48rem);
}

.project-content h4 {
  margin-top: 30px;
  font-size: 1.08rem;
}

.project-content p,
.project-content li {
  color: #c6d1e1;
  font-size: 1rem;
}

.project-content strong { color: #f8fafc; }

.project-content a {
  color: #7dd3fc;
  text-underline-offset: 3px;
}

.project-content code {
  padding: 0.13em 0.38em;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 5px;
  background: #111827;
  color: #bae6fd;
  font-family: "Fira Code", monospace;
  font-size: 0.88em;
}

.project-content pre {
  overflow-x: auto;
  padding: 20px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 12px;
  background: #070b14;
  color: #dce7f7;
}

.project-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.project-content .mermaid {
  overflow-x: auto;
  padding: 20px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
}

.project-content details,
.pf-details {
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
}

.project-content summary,
.pf-details summary {
  padding: 14px 16px;
  cursor: pointer;
  color: #dbeafe;
  font-weight: 700;
  list-style-position: inside;
}

.project-content details > :not(summary),
.pf-details > :not(summary) {
  margin-right: 16px;
  margin-left: 16px;
}

.project-content table,
.pf-data-table {
  width: 100%;
  border-collapse: collapse;
}

.project-content th,
.project-content td,
.pf-data-table th,
.pf-data-table td {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.17);
  vertical-align: top;
}

.project-content th,
.pf-data-table th {
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
}

.chapter-title {
  margin: 68px 0 34px !important;
  padding: clamp(20px, 4vw, 30px) !important;
  border: 1px solid rgba(147, 197, 253, 0.22) !important;
  border-radius: 16px !important;
  background: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.2) !important;
}

.pf-visual-frame,
.highlight-box,
.reward-box,
.pf-token-box,
.pf-coord-box {
  overflow-x: auto;
  margin: 26px 0;
  padding: clamp(18px, 3vw, 28px) !important;
  border: 1px solid rgba(96, 165, 250, 0.18) !important;
  border-radius: 14px !important;
  background: rgba(9, 14, 28, 0.76) !important;
  color: #cbd5e1 !important;
}

.pf-grid,
.pf-diagram-grid,
.pf-domain-grid,
.reward-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.pf-grid-item,
.pf-domain-item,
.pf-arch-item,
.pf-flow-step,
.pf-grid-cell {
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.68) !important;
  color: #d7e0ed !important;
}

.pf-arch-diagram,
.pf-logic-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}

.pf-arch-layer,
.pf-logic-row,
.pf-token-row {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
}

.pf-arch-layer-title,
.pf-logic-label,
.pf-grid-label,
.pf-token-box-title,
.pf-coord-box-title,
.reward-title {
  color: #7dd3fc !important;
  font-family: "Fira Code", monospace;
  font-weight: 700;
}

.pf-arch-layer-items,
.pf-transaction-flow,
.pf-coord-flow,
.pf-token-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pf-flow-arrow,
.flow-arrow {
  color: #60a5fa;
  font-weight: 800;
}

.details-desc,
.pf-grid-desc,
.pf-domain-info {
  color: #aebbd0 !important;
}

.notice--success {
  padding: 18px 20px;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-left: 4px solid #34d399;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.09);
  color: #bbf7d0;
}

.toc-panel { min-width: 0; }

.toc-panel__inner {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 14px;
  background: rgba(10, 15, 30, 0.84);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.toc-panel__title {
  margin: 0;
  padding: 15px 17px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(37, 99, 235, 0.15);
  color: #f8fafc;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.toc-panel__title::before {
  content: "// ";
  color: #60a5fa;
  font-family: "Fira Code", monospace;
}

/* ========================================================== */
/* TABLE OF CONTENTS (TOC) - 단원별 컬러 및 계층 구분 시스템  */
/* ========================================================== */

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: calc(100vh - 145px);
  margin: 0;
  padding: 12px 10px;
  overflow: auto;
  list-style: none;
}

/* 공통 링크 기본 */
.toc-list__item a {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.45;
  transition: all 180ms ease;
}

/* -------------------------------------------------- */
/* [1] 대단원 (h2) - 굵고 선명한 프라이머리 블루 테마  */
/* -------------------------------------------------- */
.toc-list__item--h2 {
  margin-top: 10px;
}
.toc-list__item--h2:first-child {
  margin-top: 0;
}

.toc-list__item--h2 a {
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e3a8a; /* Deep Navy Blue */
  background: #f0f7ff; /* Soft Blue Tint */
  border-left: 3.5px solid #2563eb; /* Primary Accent Bar */
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.04);
}

.toc-list__item--h2 a:hover {
  color: #1d4ed8;
  background: #e0edff;
  border-left-color: #1d4ed8;
  transform: translateX(2px);
}

.toc-list__item--h2 a.is-active {
  color: #ffffff !important;
  background: #2563eb !important;
  border-left: 3.5px solid #1e40af !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
  transform: translateX(3px);
}

/* -------------------------------------------------- */
/* [2] 하위 단원 (h3) - 세련된 틸/슬레이트 서브 테마   */
/* -------------------------------------------------- */
.toc-list__item--h3 {
  padding-left: 10px;
  margin-top: 1px;
}

.toc-list__item--h3 a {
  padding: 5px 10px;
  font-size: 0.79rem;
  font-weight: 500;
  color: #475569; /* Slate Gray */
  background: transparent;
  border-left: 2px solid #cbd5e1; /* Subtle Guide Line */
}

.toc-list__item--h3 a::before {
  content: "↳";
  display: inline-block;
  font-size: 0.74rem;
  color: #94a3b8;
  margin-right: 6px;
  transition: color 180ms ease, transform 180ms ease;
}

.toc-list__item--h3 a:hover {
  color: #0284c7; /* Cyan / Sky Blue */
  background: #f0f9ff;
  border-left-color: #38bdf8;
  transform: translateX(2px);
}
.toc-list__item--h3 a:hover::before {
  color: #0284c7;
  transform: translateX(1px);
}

.toc-list__item--h3 a.is-active {
  color: #0369a1 !important; /* Deep Sky Blue */
  font-weight: 700 !important;
  background: #e0f2fe !important; /* Sky Tint */
  border-left: 2px solid #0284c7 !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12) !important;
  transform: translateX(2px);
}
.toc-list__item--h3 a.is-active::before {
  color: #0284c7 !important;
  font-weight: bold;
}

/* -------------------------------------------------- */
/* [3] 세부 단원 (h4) - 섬세한 인디고/뮤트 테마       */
/* -------------------------------------------------- */
.toc-list__item--h4 {
  padding-left: 22px;
  margin-top: 1px;
}

.toc-list__item--h4 a {
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 450;
  color: #64748b;
  background: transparent;
  border-left: 1.5px dashed #e2e8f0;
}

.toc-list__item--h4 a::before {
  content: "•";
  display: inline-block;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-right: 5px;
}

.toc-list__item--h4 a:hover {
  color: #4f46e5; /* Indigo */
  background: #f5f3ff;
  border-left-color: #818cf8;
  transform: translateX(2px);
}

.toc-list__item--h4 a.is-active {
  color: #4338ca !important;
  font-weight: 700 !important;
  background: #ede9fe !important;
  border-left: 1.5px solid #6366f1 !important;
  transform: translateX(2px);
}
.toc-list__item--h4 a.is-active::before {
  color: #6366f1 !important;
}

.site-footer {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.site-footer__inner {
  width: min(var(--container), calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #64748b;
  font-size: 0.85rem;
}

.site-footer__inner p { margin: 0; }

.site-footer__mark {
  margin-right: 8px;
  color: #2563eb;
  font-family: "Fira Code", monospace;
  font-weight: 800;
}

.site-footer__inner a {
  color: #334155;
  text-decoration: none;
}

.site-footer__inner a:hover { color: #2563eb; }

@media (min-width: 1080px) {
  .project-layout {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 44px;
  }

  .toc-panel {
    position: sticky;
    top: 92px;
    padding-left: 26px;
    border-left: 1px solid rgba(148, 163, 184, 0.14);
  }
}

@media (max-width: 760px) {
  .site-header__inner,
  .site-container,
  .site-footer__inner {
    width: min(100% - 24px, var(--container));
  }

  .site-header__inner { min-height: 62px; }

  .site-title { font-size: 0.88rem; }

  .site-title::before {
    width: 30px;
    height: 30px;
  }

  .site-nav {
    gap: 0;
    font-size: 0.78rem;
  }

  .site-nav a { padding: 8px 7px; }
  .site-main { padding-top: 22px; }

  .project-hero,
  .project-content { padding: 24px 18px; }

  .project-hero h1 { font-size: 2rem; }
  .chapter-title { font-size: 1.5rem !important; }
  .toc-list { max-height: 330px; }

  .site-footer__inner {
    min-height: 112px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-title {
    max-width: 42px;
    overflow: hidden;
    white-space: nowrap;
  }

  .site-title::before { flex: 0 0 auto; }

  .project-content table,
  .pf-data-table {
    display: block;
    overflow-x: auto;
  }
}

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

/* Light blue theme — matched to the primary project button */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --border: #dce5f0;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --shadow: 0 22px 58px rgba(30, 64, 175, 0.09);
}

body {
  background:

    var(--bg);
  color: var(--text);
}

body::before {
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.075) 1px, transparent 1px);
}

.site-header {
  border-bottom-color: rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.82);
}

.site-title { color: #172033; }

.site-nav a { color: #526178; }

.site-nav a:hover,
.site-nav a:focus-visible {
  background: #eff6ff;
  color: #1d4ed8;
}

.project-hero {
  border-color: #d7e4f2;
  background:
    #f3f7ff;
}

.project-hero::before {
  background: none; display: none;
}

.back-link {
  border-color: #dbe5f2;
  background: #ffffff;
  color: #526178;
}

.back-link:hover,
.back-link:focus-visible {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.project-kicker { color: #2563eb; }
.project-hero h1 { color: #172033; }
.project-hero > p:last-of-type,
.project-hero__content > p:last-of-type { color: #526178; }

.project-tags span {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.project-content {
  border-color: #dce5f0;
  background: rgba(255, 255, 255, 0.96);
}

.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5 {
  color: #172033;
}

.project-content h5 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 28px 0 12px 0;
}

.project-content h2 { border-bottom-color: #e2e8f0; }

.project-content p,
.project-content li { color: #334155; }

.project-content strong { color: #0f172a; }

.project-content code {
  border-color: #dbe5f2;
  background: #f1f5f9;
  color: #1e40af;
}

.project-content pre {
  border-color: rgba(37, 99, 235, 0.24);
  background: #101827;
  color: #e5edf7;
}

.project-content pre code {
  border: 0;
  background: transparent;
  color: inherit;
}

.project-content details,
.pf-details {
  border-color: #cfe0f4;
  background: #f8fbff;
}

.project-content summary,
.pf-details summary { color: #1d4ed8; }

.project-content th,
.pf-data-table th {
  background: #eff6ff;
  color: #1d4ed8;
}

.project-content th,
.project-content td,
.pf-data-table th,
.pf-data-table td { border-color: #dce5f0; }

.pf-visual-frame,
.highlight-box,
.reward-box,
.pf-token-box,
.pf-coord-box {
  border-color: #cfe0f4 !important;
  background: #f8fbff !important;
  color: #334155 !important;
}

.pf-visual-frame.pf-diagram-frame {
  background: #080d1a !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35) !important;
  padding: 20px !important;
}

.pf-diagram-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.pf-diagram-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.pf-diagram-hud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.pf-diagram-hud-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.pf-diagram-hud-val {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  background: rgba(15, 23, 42, 0.75);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.pf-diagram-hud-val.is-camera {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.pf-diagram-hud-val.is-rendered {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
}

.pf-diagram-hud-val.is-culled {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.pf-diagram-hud-val.is-ratio {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.pf-diagram-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pf-diagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.22);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.pf-diagram-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.18);
}

.pf-diagram-btn.is-active {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

#ds-sim-viewport-drag {
  cursor: grab;
  touch-action: none;
}

#ds-sim-viewport-drag.is-dragging {
  cursor: grabbing;
}

.pf-grid-item,
.pf-domain-item,
.pf-arch-item,
.pf-flow-step,
.pf-grid-cell,
.pf-arch-layer,
.pf-logic-row,
.pf-token-row {
  border-color: #d7e4f2 !important;
  background: #ffffff !important;
  color: #334155 !important;
}

.details-desc,
.pf-grid-desc,
.pf-domain-info { color: #526178 !important; }

.notice--success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.toc-panel { border-left-color: #dce5f0; }

.toc-panel__inner {
  border-color: #dce5f0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 44px rgba(30, 64, 175, 0.08);
}

.toc-panel__title {
  border-bottom-color: #dce5f0;
  background: #f8faff;
  color: #172033;
}

/* TOC color differentiation handled by .toc-list__item--h2 / --h3 / --h4 rules */

.site-footer {
  border-top-color: #dce5f0;
  background: rgba(255, 255, 255, 0.62);
}

.site-footer__inner { color: #64748b; }
.site-footer__inner a { color: #334155; }
.site-footer__inner a:hover { color: #1d4ed8; }


/* ========================================================== */
/* VISUAL STUDIO / VS CODE DARK+ SYNTAX HIGHLIGHTING THEME   */
/* ========================================================== */

.project-content pre,
.project-content pre.hljs-pre,
pre:has(code.hljs) {
  position: relative;
  background: #1e1e1e !important;
  border: 1px solid #333333 !important;
  border-radius: 10px !important;
  padding: 22px 24px !important;
  overflow-x: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  margin: 28px 0 !important;
}

.project-content pre code,
.project-content pre code.hljs,
code.hljs {
  font-family: 'Fira Code', Consolas, Monaco, 'Courier New', monospace !important;
  font-size: 0.92rem !important;
  line-height: 1.68 !important;
  tab-size: 4;
  color: #d4d4d4 !important;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  display: block;
}

/* VS Code / Visual Studio Dark+ Syntax Palette */

/* 1. Storage & Type Keywords: public, private, class, struct, void, const, auto, static (Blue) */
.hljs-keyword {
  color: #569cd6 !important;
  font-weight: 500;
}

/* 2. Control Flow Keywords: if, else, for, foreach, while, return, switch, case, try, catch (Purple / Magenta) */
.hljs-keyword.hljs-control-flow {
  color: #c586c0 !important;
  font-weight: 500;
}

/* 3. Types, Classes, Structs, Interfaces, Primitives (Teal / Turquoise) */
.hljs-title.class_,
.hljs-title.class_.inherited__,
.hljs-type,
.hljs-built_in {
  color: #4ec9b0 !important;
  font-weight: 500;
}

/* 4. Functions & Methods: Update(), Start(), Awake(), Render() (Soft Yellow) */
.hljs-title.function_,
.hljs-function > .hljs-title,
.hljs-title {
  color: #dcdcaa !important;
}

/* Ensure class titles retain teal */
.hljs-title.class_ {
  color: #4ec9b0 !important;
}

/* 5. Variables, Parameters, Attributes (Sky Blue) */
.hljs-variable,
.hljs-params,
.hljs-attr,
.hljs-attribute {
  color: #9cdcfe !important;
}

/* 6. Strings & Characters: "text", 'c' (Warm Coral / Orange) */
.hljs-string {
  color: #ce9178 !important;
}

/* 7. Numbers / Numeric Literals: 0, 1.0f, 100 (Light Olive Green) */
.hljs-number {
  color: #b5cea8 !important;
}

/* 8. Boolean & Null Literals: true, false, null, nullptr (Blue / Bold) */
.hljs-literal {
  color: #569cd6 !important;
  font-weight: 600;
}

/* 9. Comments: // single-line, /* multi-line */ (Forest Green, Italic) */
.hljs-comment,
.hljs-quote {
  color: #6a9955 !important;
  font-style: italic !important;
}

/* 10. Preprocessor Directives, Attributes, Macros: #include, [SerializeField] (Muted Gray / Purple) */
.hljs-meta {
  color: #9b9b9b !important;
}
.hljs-meta .hljs-keyword {
  color: #c586c0 !important;
}
.hljs-meta .hljs-string {
  color: #ce9178 !important;
}

/* 11. Punctuation & Operators */
.hljs-punctuation,
.hljs-operator {
  color: #d4d4d4 !important;
}

/* Inline Code Badge (Visual Studio Dark style) */
.project-content :not(pre) > code {
  font-family: 'Fira Code', Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 7px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #0369a1;
  border: 1px solid #cbd5e1;
  font-weight: 500;
}

/* ==========================================================================
   Architecture & Comparison Diagram Styles (.pf-comp-*)
   ========================================================================== */

.pf-comp-frame {
  padding: 32px 24px !important;
  background: #f8fbff !important;
  border: 1px solid #dce8f6 !important;
  border-radius: 16px !important;
  margin: 30px 0 !important;
}

.pf-comp-container {
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 20px !important;
  flex-wrap: nowrap !important;
  margin: 0 auto !important;
  max-width: 920px !important;
}

.pf-comp-box {
  flex: 1 1 300px !important;
  min-width: 280px !important;
  max-width: 480px !important;
  padding: 24px !important;
  border-radius: 14px !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease !important;
  position: relative !important;
}

.pf-comp-box:hover {
  transform: translateY(-3px) !important;
}

.pf-comp-box.old {
  border: 1.5px solid #fecaca !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.07) !important;
}

.pf-comp-box.new {
  border: 1.5px solid #bfdbfe !important;
  background: #ffffff !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.08) !important;
}

.pf-comp-header {
  margin-bottom: 16px !important;
  padding-bottom: 14px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
}

.pf-comp-badge {
  display: inline-block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  font-family: 'Fira Code', monospace !important;
  padding: 4px 10px !important;
  border-radius: 9999px !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 10px !important;
}

.pf-comp-badge.old {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

.pf-comp-badge.new {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #93c5fd !important;
}

.pf-comp-title {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  letter-spacing: -0.01em !important;
  word-break: keep-all !important;
}

.pf-comp-list {
  list-style: none !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex: 1 !important;
}

.pf-comp-list li {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
  color: #334155 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pf-comp-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  flex-shrink: 0 !important;
}

.pf-comp-icon.old {
  background: #fee2e2 !important;
  color: #ef4444 !important;
}

.pf-comp-icon.new {
  background: #dbeafe !important;
  color: #2563eb !important;
}

.pf-comp-text {
  font-weight: 600 !important;
  color: #334155 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  word-break: keep-all !important;
}

.pf-comp-tag {
  padding: 9px 14px !important;
  border-radius: 8px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin-top: auto !important;
  letter-spacing: -0.01em !important;
}

.pf-comp-tag.old {
  background: #fff5f5 !important;
  color: #b91c1c !important;
  border: 1px dashed #fca5a5 !important;
}

.pf-comp-tag.new {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border: 1px dashed #86efac !important;
}

.pf-comp-bridge {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 4px !important;
  align-self: center !important;
}

.pf-bridge-pill {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  letter-spacing: 1px !important;
  color: #2563eb !important;
  background: #eff6ff !important;
  padding: 3px 10px !important;
  border-radius: 9999px !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}

.pf-bridge-arrow {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1.5px solid #bfdbfe !important;
  color: #2563eb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12) !important;
  transition: transform 0.2s ease, background 0.2s ease !important;
}

.pf-comp-bridge:hover .pf-bridge-arrow {
  transform: scale(1.1) !important;
  background: #eff6ff !important;
  border-color: #60a5fa !important;
}

@media (max-width: 880px) {
  .pf-comp-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px !important;
  }
  .pf-comp-box {
    width: 100% !important;
    max-width: 520px !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
  }
  .pf-comp-bridge {
    margin: 4px 0 !important;
    flex-direction: column !important;
    align-self: center !important;
  }
  .pf-bridge-arrow {
    transform: rotate(90deg) !important;
  }
  .pf-comp-bridge:hover .pf-bridge-arrow {
    transform: rotate(90deg) scale(1.1) !important;
  }
}

@media (prefers-color-scheme: dark) {
  .pf-comp-frame {
    background: rgba(9, 14, 28, 0.76) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
  }
  .pf-comp-box.old {
    border-color: rgba(244, 63, 94, 0.35) !important;
    background: #140a14 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
  }
  .pf-comp-box.new {
    border-color: rgba(59, 130, 246, 0.35) !important;
    background: #0f1a30 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
  }
  .pf-comp-title {
    color: #f1f5f9 !important;
  }
  .pf-comp-list li,
  .pf-comp-text {
    color: #cbd5e1 !important;
  }
  .pf-comp-badge.old {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
  }
  .pf-comp-badge.new {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60a5fa !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
  }
  .pf-comp-icon.old {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
  }
  .pf-comp-icon.new {
    background: rgba(37, 99, 235, 0.25) !important;
    color: #93c5fd !important;
  }
  .pf-comp-tag.old {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #fca5a5 !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
  }
  .pf-comp-tag.new {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #86efac !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
  }
  .pf-bridge-pill {
    background: rgba(37, 99, 235, 0.25) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #93c5fd !important;
  }
  .pf-bridge-arrow {
    background: #0f172a !important;
    border-color: rgba(96, 165, 250, 0.4) !important;
    color: #60a5fa !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }
  .pf-comp-bridge:hover .pf-bridge-arrow {
    background: #1e293b !important;
    border-color: #60a5fa !important;
  }
}

/* ==========================================================================
   Architecture Tree Diagram (.pf-arch-*)
   ========================================================================== */

.pf-arch-frame {
  padding: 32px 24px !important;
  background: #f8fbff !important;
  border: 1px solid #dce8f6 !important;
  border-radius: 16px !important;
  margin: 28px 0 !important;
}

/* Root Node */
.pf-arch-root {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-bottom: 22px !important;
}

.pf-arch-input-pill {
  display: inline-block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  letter-spacing: 0.5px !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  margin-bottom: 8px !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}

.pf-arch-root-card {
  background: #ffffff !important;
  border: 2px solid #2563eb !important;
  border-radius: 14px !important;
  padding: 16px 28px !important;
  text-align: center !important;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12) !important;
  max-width: 480px !important;
  width: 100% !important;
}

.pf-arch-root-title {
  margin: 0 0 4px 0 !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.pf-arch-root-desc {
  margin: 0 !important;
  font-size: 0.84rem !important;
  color: #64748b !important;
}

.pf-arch-connector-line {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin: 8px 0 0 0 !important;
  color: #2563eb !important;
}

/* 3-Column Grid for the 3 Branches */
.pf-arch-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}

@media (max-width: 860px) {
  .pf-arch-grid {
    grid-template-columns: 1fr !important;
  }
}

.pf-arch-col {
  background: #ffffff !important;
  border: 1.5px solid #dce5f0 !important;
  border-radius: 14px !important;
  padding: 20px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.05) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  text-align: left !important;
}

.pf-arch-col:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.1) !important;
}

.pf-arch-col.col-blue {
  border-top: 4px solid #2563eb !important;
}

.pf-arch-col.col-purple {
  border-top: 4px solid #8b5cf6 !important;
}

.pf-arch-col.col-emerald {
  border-top: 4px solid #10b981 !important;
}

.pf-arch-col-badge {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  margin-bottom: 8px !important;
  width: fit-content !important;
}

.col-blue .pf-arch-col-badge {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
}

.col-purple .pf-arch-col-badge {
  background: #f5f3ff !important;
  color: #7c3aed !important;
  border: 1px solid #ddd6fe !important;
}

.col-emerald .pf-arch-col-badge {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}

.pf-arch-col-title {
  margin: 0 0 4px 0 !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.pf-arch-col-desc {
  margin: 0 0 14px 0 !important;
  font-size: 0.8rem !important;
  color: #64748b !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

/* Branch Nodes & Connectors */
.pf-arch-node {
  background: #f8fbff !important;
  border: 1px solid #dce8f6 !important;
  border-radius: 10px !important;
  padding: 11px 13px !important;
  margin-bottom: 8px !important;
}

.pf-arch-node-title {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin-bottom: 3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}

.pf-arch-node-desc {
  font-size: 0.78rem !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.pf-arch-node-arrow {
  text-align: center !important;
  color: #94a3b8 !important;
  font-size: 1rem !important;
  margin: 2px 0 6px 0 !important;
  line-height: 1 !important;
}

.pf-arch-tag-yes {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #2563eb !important;
  background: #dbeafe !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  margin-right: 4px !important;
}

.pf-arch-tag-no {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #059669 !important;
  background: #d1fae5 !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  margin-right: 4px !important;
}

.pf-arch-tag-state {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #7c3aed !important;
  background: #ede9fe !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  margin-right: 4px !important;
}

/* Dark mode for pf-arch */
@media (prefers-color-scheme: dark) {
  .pf-arch-frame {
    background: rgba(9, 14, 28, 0.76) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
  }
  .pf-arch-root-card {
    background: #0f172a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4) !important;
  }
  .pf-arch-root-title {
    color: #f1f5f9 !important;
  }
  .pf-arch-col {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  }
  .pf-arch-col-title {
    color: #f1f5f9 !important;
  }
  .pf-arch-col-desc {
    color: #94a3b8 !important;
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
  }
  .pf-arch-node {
    background: rgba(30, 41, 59, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
  }
  .pf-arch-node-title {
    color: #f1f5f9 !important;
  }
  .pf-arch-node-desc {
    color: #cbd5e1 !important;
  }
}

/* ==========================================================================
   Flowchart & Sequence Diagram (.pf-fc-*)
   ========================================================================== */

.pf-flowchart-frame {
  padding: 36px 24px !important;
  background: #f8fbff !important;
  border: 1px solid #dce8f6 !important;
  border-radius: 18px !important;
  margin: 32px 0 !important;
}

.pf-flowchart {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* Flow Connectors */
.pf-fc-arrow {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  height: 26px !important;
  color: #3b82f6 !important;
}

/* Start / End Pills */
.pf-fc-pill-start {
  background: #eff6ff !important;
  border: 1.5px solid #93c5fd !important;
  color: #1d4ed8 !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  padding: 6px 18px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.pf-fc-pill-end {
  background: #f0fdf4 !important;
  border: 1.5px solid #86efac !important;
  color: #15803d !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 8px 20px !important;
  border-radius: 9999px !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-align: center !important;
}

.pf-fc-mono-tag {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-family: 'Fira Code', monospace !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  background: rgba(37, 99, 235, 0.1) !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.pf-fc-pill-end .pf-fc-mono-tag {
  background: rgba(22, 163, 74, 0.1) !important;
  color: #15803d !important;
  border-color: rgba(22, 163, 74, 0.25) !important;
}

/* Step / Process Cards */
.pf-fc-card {
  width: 100% !important;
  background: #ffffff !important;
  border: 1.5px solid #dce5f0 !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  text-align: left !important;
}

.pf-fc-card.pf-fc-compact {
  padding: 12px 18px !important;
}

.pf-fc-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.08) !important;
}

.pf-fc-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
}

.pf-fc-badge {
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  padding: 2px 7px !important;
  border-radius: 5px !important;
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  flex-shrink: 0 !important;
}

.pf-fc-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.pf-fc-desc {
  font-size: 0.84rem !important;
  color: #64748b !important;
  margin: 6px 0 0 0 !important;
  line-height: 1.45 !important;
}

/* Decision / Branch Cards */
.pf-fc-decision {
  width: 100% !important;
  background: #ffffff !important;
  border: 2px solid #bfdbfe !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.06) !important;
  text-align: left !important;
}

.pf-fc-decision.pf-fc-compact {
  padding: 14px 18px !important;
}

.pf-fc-decision.pf-fc-compact .pf-fc-decision-header {
  margin-bottom: 10px !important;
  padding-bottom: 8px !important;
}

.pf-fc-item-compact {
  padding: 9px 12px !important;
}

.pf-fc-decision-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 14px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.pf-fc-decision-badge {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  font-family: 'Fira Code', monospace !important;
  padding: 2px 8px !important;
  border-radius: 5px !important;
}

.pf-fc-decision-title {
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 !important;
}

.pf-fc-branch-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 10px !important;
}

.pf-fc-branch-item {
  background: #ffffff !important;
  border: 1px solid #dce5f0 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.pf-fc-tag-yes {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #dc2626 !important;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  width: fit-content !important;
}

.pf-fc-tag-no {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #059669 !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  width: fit-content !important;
}

.pf-fc-tag-state {
  display: inline-block !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  color: #7c3aed !important;
  background: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  width: fit-content !important;
}

.pf-fc-branch-title {
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

.pf-fc-branch-desc {
  font-size: 0.78rem !important;
  color: #64748b !important;
  margin: 0 !important;
  line-height: 1.35 !important;
}

.pf-flowchart.pf-flowchart-wide {
  max-width: 860px !important;
}

/* 2-Column Balanced Branch Grid */
.pf-fc-branch-grid.pf-fc-grid-2col {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
}
@media (max-width: 600px) {
  .pf-fc-branch-grid.pf-fc-grid-2col {
    grid-template-columns: 1fr !important;
  }
}

/* --- 1.2 Singleton Managers 2x2 Technical Cards --- */
.pf-mgr-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  margin-top: 10px !important;
  text-align: left !important;
}
@media (max-width: 700px) {
  .pf-mgr-grid {
    grid-template-columns: 1fr !important;
  }
}
.pf-mgr-card {
  background: #ffffff !important;
  border: 1px solid #dce5f0 !important;
  border-radius: 12px !important;
  padding: 20px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
  position: relative !important;
  overflow: hidden !important;
}
.pf-mgr-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #2563eb;
}
.pf-mgr-card.is-render::before { background: #059669; }
.pf-mgr-card.is-resource::before { background: #d97706; }
.pf-mgr-card.is-camera::before { background: #0284c7; }

.pf-mgr-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.09) !important;
  border-color: #93c5fd !important;
}
.pf-mgr-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
  gap: 8px !important;
}
.pf-mgr-title {
  font-family: 'Fira Code', monospace !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
}
.pf-mgr-badge {
  font-family: 'Fira Code', monospace !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  white-space: nowrap !important;
}
.pf-mgr-badge.is-render { background: #ecfdf5 !important; color: #059669 !important; border-color: #a7f3d0 !important; }
.pf-mgr-badge.is-resource { background: #fffbeb !important; color: #b45309 !important; border-color: #fde68a !important; }
.pf-mgr-badge.is-camera { background: #f0f9ff !important; color: #0284c7 !important; border-color: #bae6fd !important; }

.pf-mgr-subtitle {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin: 0 0 14px 0 !important;
  line-height: 1.45 !important;
}
.pf-mgr-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.pf-mgr-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  font-size: 0.85rem !important;
  color: #334155 !important;
  line-height: 1.5 !important;
}
.pf-mgr-bullet {
  color: #2563eb !important;
  font-family: 'Fira Code', monospace !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  margin-top: 1px !important;
  flex-shrink: 0 !important;
}
.pf-mgr-card.is-render .pf-mgr-bullet { color: #059669 !important; }
.pf-mgr-card.is-resource .pf-mgr-bullet { color: #d97706 !important; }
.pf-mgr-card.is-camera .pf-mgr-bullet { color: #0284c7 !important; }

.pf-mgr-meta {
  padding-top: 12px !important;
  border-top: 1px dashed #e2e8f0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: auto !important;
}
.pf-mgr-tag {
  font-family: 'Fira Code', monospace !important;
  font-size: 0.72rem !important;
  padding: 3px 7px !important;
  border-radius: 4px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
}

/* Dark mode for .pf-fc-* */
@media (prefers-color-scheme: dark) {
  .pf-flowchart-frame {
    background: rgba(9, 14, 28, 0.76) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
  }
  .pf-fc-card {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
  }
  .pf-fc-title {
    color: #f1f5f9 !important;
  }
  .pf-fc-desc {
    color: #cbd5e1 !important;
  }
  .pf-fc-decision {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
  }
  .pf-fc-decision-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
  }
  .pf-fc-decision-title {
    color: #f1f5f9 !important;
  }
  .pf-fc-branch-item {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
  }
  .pf-fc-branch-title {
    color: #f1f5f9 !important;
  }
  .pf-fc-branch-desc {
    color: #cbd5e1 !important;
  }
  .pf-fc-pill-start {
    background: rgba(37, 99, 235, 0.2) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #93c5fd !important;
  }
  .pf-fc-pill-end {
    background: rgba(22, 163, 74, 0.2) !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    color: #86efac !important;
  }
  .pf-fc-arrow {
    color: #60a5fa !important;
  }
  .pf-mgr-card {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  }
  .pf-mgr-title { color: #f8fafc !important; }
  .pf-mgr-subtitle { color: #94a3b8 !important; }
  .pf-mgr-item { color: #cbd5e1 !important; }
  .pf-mgr-meta { border-top-color: rgba(148, 163, 184, 0.15) !important; }
  .pf-mgr-tag {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
  }
}

/* ==========================================================================
   FILE TOWER DEFENSE INTERACTIVE SCREENSHOT GALLERY (POST & MODAL)
   ========================================================================== */
.pf-ftd-post-gallery-section {
  margin: 36px 0 54px 0;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 6px 28px rgba(15, 23, 42, 0.05);
}

.pf-ftd-section-header {
  margin-bottom: 20px;
}

.pf-ftd-section-tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.pf-ftd-section-title {
  margin: 0 0 8px 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.pf-ftd-section-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
}

.pf-ftd-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(8, 12, 22, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  position: relative;
  backdrop-filter: blur(12px);
}

.pf-ftd-gallery-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pf-ftd-gallery-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pf-ftd-counter {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.35);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.pf-ftd-caption {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f1f5f9;
}

.pf-ftd-yt-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pf-ftd-yt-link:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #f87171;
  transform: translateY(-1px);
}

.pf-ftd-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: #020617;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-ftd-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
  user-select: none;
}

.pf-ftd-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #f1f5f9;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 5;
}

.pf-ftd-nav:hover {
  background: rgba(37, 99, 235, 0.88);
  border-color: #93c5fd;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
}

.pf-ftd-prev {
  left: 12px;
}

.pf-ftd-next {
  right: 12px;
}

.pf-ftd-thumbs-wrapper {
  position: relative;
  width: 100%;
}

.pf-ftd-thumbs-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.pf-ftd-thumbs-strip::-webkit-scrollbar {
  height: 6px;
}

.pf-ftd-thumbs-strip::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.pf-ftd-thumbs-strip::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.pf-ftd-thumb-card {
  flex: 0 0 140px;
  position: relative;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #020617;
  cursor: pointer;
  padding: 0;
  scroll-snap-align: start;
  transition: all 0.2s ease;
}

.pf-ftd-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.pf-ftd-thumb-card:hover {
  border-color: rgba(96, 165, 250, 0.75);
  transform: translateY(-2px);
}

.pf-ftd-thumb-card:hover img {
  opacity: 0.95;
}

.pf-ftd-thumb-card.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.55);
  transform: translateY(-2px);
}

.pf-ftd-thumb-card.is-active img {
  opacity: 1;
}

.pf-ftd-thumb-num {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: #93c5fd;
  padding: 1px 6px;
  line-height: 1.2;
}

.pf-ftd-hint {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .pf-ftd-post-gallery-section {
    padding: 16px;
    margin: 24px 0 36px 0;
  }
  .pf-ftd-stage {
    max-height: 250px;
  }
  .pf-ftd-nav {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
  }
  .pf-ftd-thumb-card {
    flex: 0 0 105px;
    height: 60px;
  }
}

/* --- WinAPI Don't Starve: Pig Sprite Slicing Compare Cards --- */
.pf-pig-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 20px 0;
  text-align: left;
}
@media (max-width: 768px) {
  .pf-pig-compare-grid {
    grid-template-columns: 1fr;
  }
}

.pf-pig-card {
  background: #ffffff;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pf-pig-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #2563eb;
}
.pf-pig-card.is-sheet::before {
  background: #059669;
}
.pf-pig-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pf-pig-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 12px;
  gap: 8px;
}
.pf-pig-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  overflow-wrap: break-word;
  word-break: break-all;
}
.pf-pig-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  flex-shrink: 0;
}
.pf-pig-card.is-sheet .pf-pig-badge {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.pf-pig-img-box {
  background: #0b1120;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 16px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.pf-pig-img-box img {
  max-height: 200px;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.pf-pig-caption {
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  margin: 14px 0 6px 0;
  line-height: 1.55;
}
.pf-pig-meta {
  font-family: 'Fira Code', monospace;
  font-size: 0.74rem;
  color: #64748b;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-top: 10px;
  line-height: 1.5;
}

/* --- WinAPI Don't Starve: Editor Screenshot Showcase Cards --- */
.pf-editor-shot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin: 20px 0;
  text-align: left;
}
.pf-editor-shot-grid.is-single {
  grid-template-columns: 1fr;
}
@media (max-width: 768px) {
  .pf-editor-shot-grid {
    grid-template-columns: 1fr;
  }
}

.pf-editor-shot-card {
  background: #ffffff;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pf-editor-shot-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #0284c7;
}
.pf-editor-shot-card.is-object::before {
  background: #d97706;
}
.pf-editor-shot-card.is-map::before {
  background: #059669;
}
.pf-editor-shot-card.is-launcher::before {
  background: #6366f1;
}
.pf-editor-shot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pf-editor-shot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.pf-editor-shot-grid:not(.is-single) .pf-editor-shot-head {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
}
@media (max-width: 768px) {
  .pf-editor-shot-head {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 6px;
  }
}
.pf-editor-shot-title {
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
.pf-editor-shot-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 3px 7px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  flex-shrink: 0;
}
.pf-editor-shot-card.is-object .pf-editor-shot-badge {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.pf-editor-shot-card.is-map .pf-editor-shot-badge {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.pf-editor-shot-card.is-launcher .pf-editor-shot-badge {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}

.pf-editor-shot-box {
  background: #0f172a;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  min-height: 180px;
}
.pf-editor-shot-box img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.pf-editor-shot-caption {
  font-size: 0.88rem;
  font-weight: 500;
  color: #334155;
  margin: 12px 0 6px 0;
  line-height: 1.55;
}
.pf-editor-shot-meta {
  font-family: 'Fira Code', monospace;
  font-size: 0.74rem;
  color: #64748b;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-top: 10px;
  line-height: 1.5;
}

.pf-editor-meta {
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.pf-editor-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  .pf-pig-card,
  .pf-editor-shot-card {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  .pf-pig-title,
  .pf-editor-shot-title {
    color: #f8fafc;
  }
  .pf-pig-caption,
  .pf-editor-shot-caption {
    color: #cbd5e1;
  }
  .pf-pig-meta,
  .pf-editor-shot-meta,
  .pf-editor-tag {
    background: rgba(2, 6, 23, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
  }
  .pf-editor-meta {
    border-color: rgba(148, 163, 184, 0.2);
  }
}

/* ==========================================================================
   VIDEO CONTAINER & EMBEDDED DEMO
   ========================================================================== */
.pf-video-container {
  margin: 32px 0 40px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #dce6f3;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.09);
  background: #020617;
}
.pf-video-container p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}
.pf-video-container video {
  width: 100%;
  display: block;
  max-height: 540px;
  object-fit: contain;
  margin: 0 auto;
}

/* ==========================================================================
   WFK TOKEN BLOCK & SEED COMPARISON CARDS
   ========================================================================== */
.pf-token-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.pf-token-cell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  position: relative;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.pf-token-cell.accent-blue {
  border-color: #93c5fd;
  background: #f8fbff;
}
.pf-token-cell.accent-green {
  border-color: #86efac;
  background: #f0fdf4;
}
.pf-token-cell-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 6px;
}
.pf-token-cell.accent-green .pf-token-cell-title {
  color: #16a34a;
}
.pf-token-cell-spec {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  font-family: 'Fira Code', monospace;
}
.pf-token-cell-desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

.pf-seed-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.pf-seed-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}
.pf-seed-card.seed-a {
  border-color: #93c5fd;
  background: #fcfdff;
}
.pf-seed-card.seed-b {
  border-color: #fecaca;
  background: #fffafa;
}
.pf-seed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}
.pf-seed-title {
  font-family: 'Fira Code', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.pf-seed-tag {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.pf-seed-tag.tag-attack {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.pf-seed-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

