/* ===== AI Auto-Research Project Page ===== */

/* Apply Satoshi (body) + Fraunces (display) typography */
body {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override the Rubik font hard-coded in style.css */
.header-content,
.header-content h1,
.header-content h2,
.button-container a.button {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.header-content h1 {
  font-family: "Fraunces", Georgia, serif;
  font-feature-settings: "ss01", "ss02";
  letter-spacing: -0.02em;
  font-weight: 500;
}
.button-container a.button {
  font-weight: 600;
  letter-spacing: 0.005em;
}
.icon.is-small {
  font-family: "Satoshi", -apple-system, sans-serif;
}

/* Refine wb-kicker (the small eyebrow above section titles)
   to match the editorial style of .gallery-kicker / .ar-hero-tag */
.wb-kicker {
  display: inline-block !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #b45309 !important;
  margin: 0.4rem 0 0.4rem !important;
  font-family: "Satoshi", -apple-system, sans-serif !important;
}

/* Breathing room between white-content sections (lifecycle, insights, playbook, etc.) */
d-article > section + section,
d-article > section + br + br + section {
  margin-top: 1.5rem;
}
d-article section .wb-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* Display font for headings, hero, titles, big metrics, Roman numerals */
.ar-hero-quote,
h1, h2,
.phase-hero-title,
.phase-hero-roman,
.insight-card .insight-metric,
.ar-stat .ar-stat-num,
.gallery-section .gallery-title,
.itree-svg .root-node,
.itree-svg .node-text {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-feature-settings: "ss01", "ss02";
  letter-spacing: -0.015em;
}

/* Subtle weight tuning for serif headings */
h1, h2 { font-weight: 500; }
.phase-hero-title { font-weight: 500; }
.ar-hero-quote { font-weight: 400; }
.insight-card .insight-metric,
.ar-stat .ar-stat-num { font-weight: 600; }

/* Header gradient override: warm gold/amber tone */
.ar-header .header-wrapper {
  background: linear-gradient(220deg, #fde68a 0%, #92400ec0 40%, #1c1917 100%);
}

/* Accent bar */
.ar-hr {
  height: 3px;
  width: 72px;
  background: linear-gradient(90deg, #92400e, #f59e0b 60%, #fbbf24);
  border-radius: 999px;
  margin: .75rem 0 1.25rem;
}

/* ===== Paper Collection: Per-stage accordion tables ===== */

.collection-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  margin: 1.5rem 0 1.5rem;
  max-width: 920px;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.collection-search:focus-within {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}
.collection-search i {
  color: #9ca3af;
  font-size: 0.95rem;
}
.collection-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.92rem;
  color: #111827;
  background: transparent;
  font-family: inherit;
}
.collection-search input::placeholder {
  color: #9ca3af;
}

.collection-stages {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 920px;
}

.cstage {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cstage:hover { border-color: #d1d5db; }
.cstage.is-open {
  border-color: rgba(146,64,14,.25);
  box-shadow: 0 8px 26px rgba(0,0,0,.15);
}
.cstage.is-open .cstage-header {
  background: #1f2937;
}
.cstage.is-open .cstage-header:hover {
  background: #253144;
}
.cstage.is-open .cstage-title {
  color: #fff;
}
.cstage.is-open .cstage-meta {
  color: rgba(255,255,255,.45);
}
.cstage.is-open .cstage-chevron {
  color: rgba(255,255,255,.5);
}
.cstage.is-open .cstage-thumb {
  opacity: 0.85;
}
.cstage.is-open .cstage-expand-btn {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.cstage.is-open .cstage-header:hover .cstage-expand-btn {
  background: rgba(255,255,255,.2);
  filter: none;
}

.cstage-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .25s ease;
}
.cstage-header:hover { background: #fffbeb; }

.cstage-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #f3f4f6;
  transition: transform .25s ease;
}
.cstage-header:hover .cstage-thumb {
  transform: scale(1.06);
}

.cstage-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.cstage-title {
  flex: 1;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: #111827;
}

.cstage-meta {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 500;
}

.cstage-chevron {
  font-size: 0.85rem;
  color: #9ca3af;
  transition: transform .25s ease;
}
.cstage.is-open .cstage-chevron {
  transform: rotate(180deg);
}

.cstage-expand-btn {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #92400e;
  background: #92400e;
  color: #fff;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  pointer-events: none;
}
.cstage.is-open .cstage-expand-btn {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.cstage-header:hover .cstage-expand-btn {
  filter: brightness(0.9);
}
.cstage.is-open .cstage-header:hover .cstage-expand-btn {
  filter: none;
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.35);
}

.cstage.s1 .cstage-num { background: #77ab56; }
.cstage.s2 .cstage-num { background: #8fbc6e; }
.cstage.s3 .cstage-num { background: #aace90; }
.cstage.s4 .cstage-num { background: #c8e4b2; color: #2d4a1e; }
.cstage.s5 .cstage-num { background: #4f95c3; }
.cstage.s6 .cstage-num { background: #72548d; }
.cstage.s7 .cstage-num { background: #8e6fa8; }
.cstage.s8 .cstage-num { background: #e8b341; }

.cstage-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.4,0,.2,1);
}
.cstage.is-open .cstage-body {
  max-height: 5000px;
}

.cstage-body-inner {
  padding: 0.5rem 0.5rem 1rem;
  border-top: 1px solid #f3f4f6;
  overflow-x: auto;
}

.ctable {
  width: 100%;
  border-collapse: collapse;
  font-family: "Satoshi", -apple-system, sans-serif;
  font-size: 0.84rem;
  color: #374151;
}

.ctable thead th {
  text-align: left;
  padding: 0.65rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
  border-bottom: 1px solid #f3f4f6;
  background: #fafaf6;
}

.ctable tbody tr {
  border-bottom: 1px solid #f9fafb;
  transition: background .12s ease;
}
.ctable tbody tr:hover {
  background: #fffbeb;
}
.ctable tbody tr.is-hidden {
  display: none;
}

.ctable td {
  padding: 0.6rem;
  vertical-align: middle;
  line-height: 1.45;
}

.ctable .ct-group td {
  padding: 0.45rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
/* Per-stage sub-category band color (uses parent .cstage class) */
.cstage.s1 .ct-group td { background: #77ab56; }
.cstage.s2 .ct-group td { background: #8fbc6e; }
.cstage.s3 .ct-group td { background: #aace90; }
.cstage.s4 .ct-group td { background: #c8e4b2; color: #2d4a1e; }
.cstage.s5 .ct-group td { background: #4f95c3; }
.cstage.s6 .ct-group td { background: #72548d; }
.cstage.s7 .ct-group td { background: #8e6fa8; }
.cstage.s8 .ct-group td { background: #e8b341; }
/* Legacy ct-g1..g4 (Stage 1 gradient) — superseded by .cstage.s1 above */
.ctable .ct-group.ct-g1 td { background: #77ab56; }
.ctable .ct-group.ct-g2 td { background: #8fbc6e; }
.ctable .ct-group.ct-g3 td { background: #aace90; }
.ctable .ct-group.ct-g4 td { background: #c8e4b2; color: #2d4a1e; }

.ctable .col-num { width: 32px; text-align: right; color: #9ca3af; font-size: 0.78rem; padding-right: 0.5rem; }
.ctable .col-method { font-weight: 600; color: #111827; min-width: 130px; }
.ctable .col-method a { color: inherit; text-decoration: none; }
.ctable .col-method a:hover { color: #92400e; }
.ctable .col-venue { width: 90px; }
.ctable .col-cat { width: 150px; }
.ctable .col-note { color: #6b7280; }
.ctable .col-links { width: 70px; text-align: right; white-space: nowrap; }

.venue-pill {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #f3f4f6;
  color: #4b5563;
  white-space: nowrap;
}
.venue-pill.v-arxiv { background: #fee2e2; color: #b91c1c; }
.venue-pill.v-top   { background: #ddd6fe; color: #5b21b6; }
.venue-pill.v-conf  { background: #d1fae5; color: #047857; }

.cat-text {
  font-size: 0.78rem;
  color: #4b5563;
  font-weight: 500;
}

.ctable .col-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #6b7280;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background .15s, color .15s;
  margin-left: 0.25rem;
}
.ctable .col-links a:hover {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 720px) {
  .ctable .col-cat { display: none; }
  .ctable .col-venue { width: 70px; }
}

/* ===== Author photo placeholder (initials avatar) ===== */
.contributor-photo.placeholder {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  font-weight: 600;
  font-size: 1rem;
  font-family: "Satoshi", -apple-system, sans-serif;
  flex-shrink: 0;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 6px rgba(146, 64, 14, .08);
  letter-spacing: 0.02em;
}

/* ===== Contributor row typography (override style.css Rubik) ===== */
.contributor-row {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fafaf6;
  border: 1px solid #f3f4f6;
  padding: 0.7rem 0.95rem;
  transition: border-color .2s ease, box-shadow .25s ease, transform .2s ease;
}
.contributor-row:hover {
  border-color: #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
  transform: translateY(-1px);
}

.contributor-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contributor-row .contributor-name {
  font-family: "Fraunces", Georgia, serif !important;
  font-weight: 500 !important;
  font-size: 1.05rem !important;
  letter-spacing: -0.015em;
  color: #111827 !important;
  line-height: 1.2;
}

.contributor-row .contributor-note {
  font-family: "Satoshi", -apple-system, sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #9ca3af !important;
}

/* Author note: equal contribution marker */
.contributor-row .contributor-name sup {
  color: #92400e;
  font-weight: 700;
  font-size: 0.7em;
  margin-left: 1px;
  font-family: "Satoshi", -apple-system, sans-serif;
}

/* Social link icons: tone down to match page palette */
.contributor-row .contributor-links a {
  color: #6b7280;
}
.contributor-row .contributor-links a:hover {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Teaser figure (Abstract section) ===== */

.ar-teaser-figure {
  width: 100% !important;
  max-width: 920px;
  margin: 2rem 0 !important;
}

.ar-teaser-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

.ar-teaser-caption {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #6b7280;
  font-family: "Satoshi", -apple-system, sans-serif;
  max-width: 920px;
  text-align: center;
}
.ar-teaser-caption b {
  color: #1f2937;
}

/* ===== Hero / Pull-quote callout (Abstract) ===== */
.ar-hero {
  position: relative;
  max-width: 920px;
  margin: 1rem 0 2rem;
  padding: 2rem 2.2rem 1.8rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fef9e7 100%);
  border: 1px solid #fde68a;
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(146, 64, 14, .07);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ar-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #92400e, #d97706, #f59e0b, #fbbf24);
  border-radius: 18px 0 0 18px;
}
.ar-hero-quote {
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
  color: #1f2937;
  margin: 0 0 0.7rem;
  font-style: normal;
}
.ar-hero-quote b {
  color: #92400e;
}
.ar-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  margin-top: 0.4rem;
}
.ar-hero-tag::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: #b45309;
  border-radius: 999px;
}

/* ===== Phase chip row (Abstract) ===== */
.ar-phase-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 1.8rem;
  max-width: 920px;
}
@media (max-width: 720px) {
  .ar-phase-row { grid-template-columns: repeat(2, 1fr); }
}
.ar-phase-chip {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ar-phase-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.ar-phase-chip-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ar-phase-roman {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
}
.ar-phase-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.ar-phase-stages {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0;
}
.ar-phase-c1 { border-top: 3px solid #77ab56; }
.ar-phase-c1 .ar-phase-roman { background: #77ab56; }
.ar-phase-c2 { border-top: 3px solid #4f95c3; }
.ar-phase-c2 .ar-phase-roman { background: #4f95c3; }
.ar-phase-c3 { border-top: 3px solid #72548d; }
.ar-phase-c3 .ar-phase-roman { background: #72548d; }
.ar-phase-c4 { border-top: 3px solid #e8b341; }
.ar-phase-c4 .ar-phase-roman { background: #e8b341; }

/* ===== Section intro lead text (replaces wb-lead default) ===== */
.ar-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #374151;
  max-width: 920px;
  margin: 0 0 1rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ar-lead b { color: #1f2937; }

/* ===== Phase badge colors ===== */
.phase-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 0.4rem;
}
.phase-creation   { background: #77ab56; }
.phase-validation { background: #72548d; }
.phase-communication { background: #4f95c3; }
.phase-dissemination { background: #e8b341; }

/* ===== Lifecycle tree backdrop (legacy) ===== */
.itree-stage-wrap {
  position: relative;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}
.itree-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-bottom: 0.5rem;
}
.itree-hint::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 10px #fbbf24;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.2); }
}

/* ===== Phase separator (between phase blocks in Lifecycle) ===== */

.phase-separator {
  width: 30%;
  max-width: 280px;
  height: 3px;
  margin: 2.5rem auto;
  background: #e5e7eb;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .phase-separator {
    width: 40%;
    margin: 2rem auto;
  }
}

.exhibition-wrap {
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

/* Intro block above the three sub-galleries */
.exhibition-intro {
  margin: 0 0 1.5rem;
}

/* Sub-section header inside each gallery */
.gallery-subsection-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

/* Default subsection tag (Paper2Poster, dark grey background) -- white text */
.gallery-section:not(.is-slides):not(.is-video):not(.is-agent) .gallery-subsection-tag {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
}

/* ===== Paper2Video Gallery (dark grey, like a video player wall) ===== */

.gallery-section.is-video {
  background:
    radial-gradient(ellipse 50% 40% at 30% 20%, rgba(244,114,182,.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(96,165,250,.08) 0%, transparent 70%),
    linear-gradient(180deg, #2a2a32 0%, #232328 100%);
  margin: 0 -9999px;
  padding: 4.5rem 9999px 4rem;
  color: #e5e7eb;
}
.gallery-section.is-video::before { background: none; }
.gallery-section.is-video .gallery-kicker { color: #f0abfc; }
.gallery-section.is-video .gallery-title { color: #fff; }
.gallery-section.is-video .gallery-subtitle { color: rgba(255,255,255,.6); }
.gallery-section.is-video .gallery-hr {
  background: linear-gradient(90deg, #d946ef, #f472b6 60%, #fbbf24);
}
.gallery-section.is-video .gallery-subsection-tag {
  background: rgba(244, 114, 182, 0.15);
  color: #f0abfc;
  border: 1px solid rgba(244, 114, 182, 0.3);
}

/* Video card grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
}

.video-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a20;
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.22,.68,0,1.2), box-shadow .3s ease;
}
.video-frame:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 50px rgba(0,0,0,.5),
    0 0 40px rgba(244,114,182,.15);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, #2c2c34 0%, #1f1f26 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #111827;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: transform .25s ease;
}
.video-frame:hover .video-play {
  transform: scale(1.1);
}
.video-play::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #111827;
  margin-left: 4px;
}

.video-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: "Satoshi", sans-serif;
  font-feature-settings: 'tnum';
}

.video-num {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
}

.video-info {
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.video-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  flex: 1;
  line-height: 1.35;
}
.video-tool {
  flex-shrink: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}


/* ===== Paper2Agent Gallery (terminal/chat aesthetic on cream bg) ===== */

.gallery-section.is-agent {
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(52,211,153,.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(251,191,36,.08) 0%, transparent 70%),
    linear-gradient(180deg, #fafaf6 0%, #f5f5ee 100%);
  margin: 0 -9999px;
  padding: 4.5rem 9999px 4rem;
  color: #111827;
}
.gallery-section.is-agent::before { background: none; }
.gallery-section.is-agent .gallery-kicker { color: #047857; }
.gallery-section.is-agent .gallery-title { color: #111827; }
.gallery-section.is-agent .gallery-subtitle { color: #6b7280; }
.gallery-section.is-agent .gallery-hr {
  background: linear-gradient(90deg, #047857, #34d399 60%, #6ee7b7);
}
.gallery-section.is-agent .gallery-subsection-tag {
  background: rgba(16, 185, 129, 0.10);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Agent grid: stacked chat-like cards */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 480px) {
  .agent-grid { grid-template-columns: 1fr; }
}

.agent-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(0,0,0,.07);
  border-color: #a7f3d0;
}

/* Card header: agent name + status */
.agent-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafaf6;
}
.agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.agent-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.agent-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #111827;
  font-family: "Satoshi", sans-serif;
}
.agent-paper {
  font-size: 0.74rem;
  color: #9ca3af;
}
.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #047857;
}
.agent-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* Chat body */
.agent-chat {
  padding: 0.9rem 1rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.agent-msg {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
}
.agent-msg .msg-bubble {
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  max-width: 85%;
}
.agent-msg.user .msg-bubble {
  background: #f3f4f6;
  color: #1f2937;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.agent-msg.bot .msg-bubble {
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  color: #064e3b;
  border: 1px solid #a7f3d0;
  border-bottom-left-radius: 4px;
}
.agent-msg.bot .msg-bubble code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  background: rgba(255,255,255,.5);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.agent-tools {
  padding: 0 1rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.agent-tools-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}
.agent-tool-pill {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-family: "JetBrains Mono", monospace;
}

.agent-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  color: #9ca3af;
}
.agent-footer .agent-tag {
  margin-left: auto;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #047857;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

/* ===== Paper2Slides Gallery (NOW cream/peach light bg) ===== */

.gallery-section.is-slides {
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(244,114,182,.08) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(251,191,36,.10) 0%, transparent 70%),
    linear-gradient(180deg, #fafaf9 0%, #fffbeb 100%);
  margin: 0 -9999px;
  padding: 4.5rem 9999px 4rem;
  color: #111827;
}
.gallery-section.is-slides::before {
  background: none;
}

.gallery-section.is-slides .gallery-kicker { color: #b45309; }
.gallery-section.is-slides .gallery-title  { color: #111827; }
.gallery-section.is-slides .gallery-subtitle { color: #6b7280; }
.gallery-section.is-slides .gallery-hr {
  background: linear-gradient(90deg, #f59e0b, #fbbf24 60%, #fde68a);
}

/* Slides subsection tag */
.gallery-section.is-slides .gallery-subsection-tag {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Override aspect ratio to 4:3 for real slide teasers */
.gallery-section.is-slides .slide-deck-frame .slide-preview {
  aspect-ratio: 4 / 3;
}

/* Download PPTX button on slide cards */
.slide-download {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 0.75rem;
  text-decoration: none;
  transition: background .2s ease;
}
.gallery-section.is-slides .slide-download {
  background: rgba(146,64,14,.12);
  border-color: rgba(146,64,14,.25);
  color: #92400e;
}
.slide-download:hover {
  background: rgba(146,64,14,.85) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* Info bar overrides for .is-slides */
.gallery-section.is-slides .slide-info {
  padding: 0.7rem 1rem;
  gap: 0.5rem;
}
/* Remove bounding box from slide count */
.gallery-section.is-slides .slide-info .slide-pages {
  position: static !important;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-radius: 0 !important;
  color: #6b7280;
  padding: 0 !important;
  flex: 1;
  font-size: 0.76rem;
  z-index: auto;
}
/* Per-model color capsules */
.tool-s-gpt         { background: #10a37f; color: #fff; border-color: #10a37f; }
.tool-s-notebooklm  { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.tool-s-claude      { background: #d97706; color: #fff; border-color: #d97706; }
.tool-s-manus       { background: #b91c1c; color: #fff; border-color: #b91c1c; }

/* Per-model top accent line */
.gallery-section.is-slides .slide-deck-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  z-index: 4;
}
.slide-model-gpt::before        { background: #10a37f !important; }
.slide-model-notebooklm::before { background: #1a73e8 !important; }
.slide-model-claude::before     { background: #d97706 !important; }
.slide-model-manus::before      { background: #6366f1 !important; }

/* Model-tinted hover border */
.slide-model-gpt:hover        { border-color: #10a37f !important; box-shadow: 0 22px 50px rgba(16,163,127,.12) !important; }
.slide-model-notebooklm:hover { border-color: #1a73e8 !important; box-shadow: 0 22px 50px rgba(26,115,232,.12) !important; }
.slide-model-claude:hover     { border-color: #d97706 !important; box-shadow: 0 22px 50px rgba(217,119,6,.12) !important; }
.slide-model-manus:hover      { border-color: #6366f1 !important; box-shadow: 0 22px 50px rgba(99,102,241,.12) !important; }

/* Download button in info bar */
.gallery-section.is-slides .slide-info .slide-download {
  position: static;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.gallery-section.is-slides .slide-info .slide-download:hover {
  background: #1f2937 !important;
  color: #fff !important;
  border-color: #1f2937 !important;
}

/* Image download link: cursor + block display */
.gallery-section.is-slides .slide-deck-frame > a {
  display: block;
  cursor: pointer;
}

/* Slide deck card on light bg: white card, slim border, soft shadow */
.gallery-section.is-slides .slide-deck-frame {
  background: #fff;
  border: 1px solid #f3f4f6;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .05);
  color: #111827;
}
.gallery-section.is-slides .slide-deck-frame:hover {
  box-shadow: 0 22px 50px rgba(0, 0, 0, .10);
  border-color: #e5e7eb;
}

.gallery-section.is-slides .slide-placeholder {
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(146, 64, 14, .04) 14px 15px),
    linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 1px solid #fde68a;
}
.gallery-section.is-slides .slide-placeholder .placeholder-icon {
  background: rgba(255, 255, 255, .65);
  border-color: rgba(146, 64, 14, .25);
  color: rgba(146, 64, 14, .5);
}
.gallery-section.is-slides .slide-placeholder .placeholder-text {
  color: rgba(146, 64, 14, .55);
}

.gallery-section.is-slides .slide-deck-frame .slide-pages {
  background: rgba(255, 255, 255, .85);
  border: 1px solid #fde68a;
  color: #92400e;
}

.gallery-section.is-slides .slide-deck-frame .slide-num {
  background: rgba(255, 255, 255, .85);
  border: 1px solid #fde68a;
  color: #92400e;
}

.gallery-section.is-slides .slide-deck-frame .slide-info {
  border-top: 1px solid #f3f4f6;
}
.gallery-section.is-slides .slide-deck-frame .slide-title {
  color: #111827;
}

/* ===== Paper2Social Feed (NOW dark navy bg) ===== */

.social-section {
  position: relative;
  margin: 0 -9999px;
  padding: 4.5rem 9999px 4rem;
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(0,0,0,.025) 0%, transparent 70%),
    linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
  overflow: hidden;
  color: #1f2937;
}

.social-section .social-kicker { color: #6b7280; }
.social-section .social-title { color: #4b5563; }
.social-section .social-subtitle { color: #4b5563; }
.social-section .social-hr {
  background: linear-gradient(90deg, #6b7280, #9ca3af 60%, #d1d5db);
}

.social-section .gallery-subsection-tag {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
  border: 1px solid rgba(107, 114, 128, 0.25);
}

/* Social posts: dark-mode cards on light grey bg */
.social-section .social-post {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  color: #e5e7eb;
}
.social-section .social-post:hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, .20);
  border-color: rgba(255, 255, 255, .16);
  transform: translateY(-3px);
}

/* Dark-mode tweaks for post internals */
.social-section .social-handle .name { color: #f3f4f6; }
.social-section .social-handle .username { color: #9ca3af; }
.social-section .social-body { color: #e5e7eb; }
.social-section .social-body b { color: #fff; }
.social-section .social-body .hashtag,
.social-section .social-body .mention { color: #60a5fa; }

.social-section .social-avatar {
  background: linear-gradient(135deg, #374151, #4b5563);
  border: 1px solid rgba(255,255,255,.10);
}

.social-section .social-platform.platform-x { color: #fff; }
.social-section .social-platform.platform-linkedin { color: #60a5fa; }
.social-section .social-platform.platform-reddit { color: #fb923c; }
.social-section .social-platform.platform-mastodon { color: #a5b4fc; }

.social-section .social-footer {
  border-top-color: rgba(255,255,255,.08);
  color: #9ca3af;
}

.social-section .social-media {
  border-color: rgba(255,255,255,.10);
  background: linear-gradient(135deg, #374151, #1f2937);
}
.social-section .social-media-placeholder {
  color: rgba(255,255,255,.45);
}
.social-section .social-media-placeholder .placeholder-icon {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.20);
}

/* Tool badges: tune for dark cards */
.social-section .social-tool-badge.tool-gpt {
  background: rgba(52, 211, 153, .12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, .25);
}
.social-section .social-tool-badge.tool-claude {
  background: rgba(251, 146, 60, .12);
  color: #f5d99e;
  border-color: rgba(251, 146, 60, .28);
}
.social-section .social-tool-badge.tool-gemini {
  background: rgba(96, 165, 250, .12);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, .28);
}

/* ===== Removed: gallery-section / social-section spacing now zero between sub-galleries ===== */

.gallery-section,
.social-section {
  margin: 0 -9999px !important;
}

.slides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  perspective: 1200px;
}
@media (max-width: 480px) {
  .slides-grid { grid-template-columns: 1fr; }
}

.slide-deck-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #2e2e36;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 4px 20px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.04) inset;
  transition: transform .35s cubic-bezier(.22,.68,0,1.2), box-shadow .35s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}
.slide-deck-frame:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow:
    0 20px 50px rgba(0,0,0,.45),
    0 0 40px rgba(96,165,250,.10),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Slide preview area (16:9) */
.slide-deck-frame .slide-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.slide-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.03) 14px 15px),
    linear-gradient(135deg, #333340 0%, #2c2c36 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.slide-placeholder .placeholder-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 2px dashed rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: rgba(255,255,255,.25);
}
.slide-placeholder .placeholder-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,.25);
  font-family: "Satoshi", -apple-system, sans-serif;
  font-weight: 500;
}

/* Page count badge (bottom-left of preview) */
.slide-deck-frame .slide-pages {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  font-family: "Satoshi", -apple-system, sans-serif;
  z-index: 2;
}

/* Number badge (top-right) */
.slide-deck-frame .slide-num {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  font-family: "Fraunces", Georgia, serif;
  z-index: 2;
}

/* Info bar */
.slide-deck-frame .slide-info {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.slide-deck-frame .slide-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  font-family: "Satoshi", -apple-system, sans-serif;
  line-height: 1.35;
  flex: 1;
}
.slide-deck-frame .slide-tool {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Top edge shimmer on hover */
.slide-deck-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,.4), rgba(52,211,153,.4), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.slide-deck-frame:hover::after {
  opacity: 1;
}


/* ===== Paper2Social Feed (mock social media posts) ===== */

/* Older social-section base (overridden above for dark theme) */
.social-section-base {
  position: relative;
  margin: 0 -9999px;
  padding: 4.5rem 9999px 4rem;
  overflow: hidden;
}

.social-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  z-index: 1;
}

.social-section .social-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b45309;
  margin-bottom: 0.4rem;
}

.social-section .social-title {
  font-size: 2.2rem;
  font-weight: 500;
  color: #4b5563;
  margin: 0.2rem 0 0.5rem;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.social-section .social-subtitle {
  font-size: 1rem;
  color: #6b7280;
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-family: "Satoshi", -apple-system, sans-serif;
}

.social-hr {
  height: 3px;
  width: 72px;
  background: linear-gradient(90deg, #db2777, #f59e0b 60%, #fbbf24);
  border-radius: 999px;
  margin: 0.6rem 0 1rem;
}

/* Masonry-style social feed grid */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 900px) {
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .social-grid { grid-template-columns: 1fr; }
}

/* Generic mock-post card */
.social-post {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0.95rem 1rem 0.85rem;
  font-family: "Satoshi", -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform .25s ease, box-shadow .3s ease, border-color .25s ease;
  cursor: pointer;
}
.social-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.06);
  border-color: #d1d5db;
}

/* Header: avatar + handle + platform */
.social-post-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.social-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.social-handle {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.social-handle .name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.social-handle .name .verified {
  color: #1d9bf0;
  font-size: 0.72rem;
}
.social-handle .username {
  font-size: 0.72rem;
  color: #9ca3af;
}
.social-platform {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}
.social-platform.platform-x { color: #000; }
.social-platform.platform-linkedin { color: #0a66c2; }
.social-platform.platform-reddit { color: #ff4500; }
.social-platform.platform-mastodon { color: #6364ff; }

/* Post body */
.social-body {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #1f2937;
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.social-body .hashtag,
.social-body .mention {
  color: #1d9bf0;
  font-weight: 500;
}

/* Optional embedded media */
.social-media {
  margin-top: 0.4rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.social-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(146,64,14,.45);
}
.social-media-placeholder .placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.5);
  border: 2px dashed rgba(146,64,14,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.social-media-placeholder .placeholder-text {
  font-size: 0.74rem;
  font-weight: 600;
}

/* Footer: engagement stats */
.social-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 500;
}
.social-footer .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.social-footer .stat i {
  font-size: 0.78rem;
}

/* "AI tool" badge in corner */
.social-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
}
.social-tool-badge.tool-gpt      { background: rgba(16,163,127,.1); color: #047857; border: 1px solid rgba(16,163,127,.2); }
.social-tool-badge.tool-claude   { background: rgba(217,119,87,.12); color: #b45309; border: 1px solid rgba(217,119,87,.25); }
.social-tool-badge.tool-gemini   { background: rgba(66,133,244,.1); color: #4285f4; border: 1px solid rgba(66,133,244,.2); }

.playbook-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2rem;
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffbeb, #fef9e7);
  border: 1px solid #fde68a;
}
.playbook-principle {
  font-size: 1rem;
  color: #1f2937;
  line-height: 1.55;
  margin: 0;
  flex: 1;
  min-width: 280px;
}
.playbook-principle b {
  color: #92400e;
}

.playbook-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7280;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.playbook-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.playbook-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.playbook-legend-dot.delegate { background: #10b981; }
.playbook-legend-dot.retain   { background: #f59e0b; }
.playbook-legend-dot.risk     { background: #ef4444; }

/* Playbook table-card hybrid */
.playbook-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.playbook-row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 240px;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #f3f4f6;
  transition: border-color .2s ease, box-shadow .25s ease;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.playbook-row:hover {
  border-color: #e5e7eb;
  box-shadow: 0 6px 22px rgba(0,0,0,.04);
}

@media (max-width: 980px) {
  .playbook-row {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
}

/* Stage label column */
.pb-stage {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 1rem;
  border-right: 1px solid #f3f4f6;
}
@media (max-width: 980px) {
  .pb-stage {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding-right: 0;
    border-right: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
  }
}
.pb-phase-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  color: #fff;
}
.pb-phase-tag.pc1 { background: #77ab56; }
.pb-phase-tag.pc2 { background: #4f95c3; }
.pb-phase-tag.pc3 { background: #72548d; }
.pb-phase-tag.pc4 { background: #e8b341; }
.pb-stage-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}
.pb-stage-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
  letter-spacing: 0.04em;
}

/* Delegate / Retain columns */
.pb-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pb-col-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}
.pb-col-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.pb-col.delegate .pb-col-label { color: #047857; }
.pb-col.delegate .pb-col-label::before { background: #10b981; }
.pb-col.retain .pb-col-label { color: #b45309; }
.pb-col.retain .pb-col-label::before { background: #f59e0b; }

.pb-col p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #374151;
  margin: 0;
}

/* Risk column */
.pb-risk {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1rem;
  border-left: 1px solid #f3f4f6;
}
@media (max-width: 980px) {
  .pb-risk {
    padding-left: 0;
    border-left: 0;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
  }
}
.pb-risk-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b91c1c;
}
.pb-risk-label::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
}
.pb-risk-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  font-style: italic;
  margin: 0;
}

/* Phase divider rows */
.playbook-phase-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
  padding: 0 0.3rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.playbook-phase-divider:first-child { margin-top: 0; }
.playbook-phase-divider .pd-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.playbook-phase-divider .pd-line {
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.playbook-phase-divider.pc1 .pd-label { color: #77ab56; }
.playbook-phase-divider.pc2 .pd-label { color: #4f95c3; }
.playbook-phase-divider.pc3 .pd-label { color: #72548d; }
.playbook-phase-divider.pc4 .pd-label { color: #e8b341; }

.lifecycle-blocks {
  max-width: 1100px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Phase header card (16:9 image + text overlay/below) */
.phase-block {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phase-header-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #f3f4f6;
  margin-bottom: 1.25rem;
  transition: transform .25s ease, box-shadow .3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.phase-header-card:hover {
  box-shadow: 0 16px 40px rgba(146, 64, 14, .08);
}

.phase-hero-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
}
.phase-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder when no image available */
.phase-hero-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: rgba(146, 64, 14, .5);
  background:
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.18) 12px 13px),
    linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fbbf24 100%);
}
.phase-hero-placeholder .ph-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.5);
  border: 2px dashed rgba(146, 64, 14, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.phase-hero-placeholder .ph-text {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Phase color stripe at top of hero */
.phase-hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
}
.phase-block.pc1 .phase-hero-image::before { background: #77ab56; }
.phase-block.pc2 .phase-hero-image::before { background: #4f95c3; }
.phase-block.pc3 .phase-hero-image::before { background: #72548d; }
.phase-block.pc4 .phase-hero-image::before { background: #e8b341; }

/* Phase header overlays */
.phase-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.60) 30%, rgba(0,0,0,.20) 60%, transparent 80%);
  color: #fff;
  z-index: 3;
  pointer-events: none;
}
.phase-hero-roman {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.3rem;
}
.phase-hero-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.3rem;
  line-height: 1.1;
}
.phase-hero-subtitle {
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.92;
  max-width: 640px;
  line-height: 1.45;
  margin: 0;
}

/* Phase motivation text below hero */
.phase-motivation {
  padding: 1.3rem 1.5rem 1.4rem;
  border-top: 1px solid #f3f4f6;
}
.phase-motivation p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: #4b5563;
  max-width: 820px;
}
.phase-motivation p b {
  color: #1f2937;
}

/* Stage cards under each phase */
.stage-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 640px) {
  .stage-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Single-stage phase (II, IV) gets full width */
.stage-card-grid.cols-1 { grid-template-columns: 1fr; max-width: 560px; }
.stage-card-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }

.stage-card {
  position: relative;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.22,.68,0,1.1), box-shadow .3s ease, border-color .25s ease, background .25s ease;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.stage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,.06);
  border-color: #e5e7eb;
}
.stage-card.is-active {
  background: #1f2937;
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 14px 36px rgba(0,0,0,.32);
  transform: translateY(-3px);
}
.stage-card.is-active .stage-image img {
  opacity: 0.82;
}
.stage-card.is-active .stage-name {
  color: #fff;
}

.stage-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.stage-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.stage-card:hover .stage-image img,
.stage-card.is-active .stage-image img {
  transform: scale(1.05);
}

.stage-body {
  padding: 0.85rem 1rem 0.95rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stage-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #92400e;
  margin-bottom: 0.3rem;
}
.stage-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 500;
  color: #111827;
  margin: 0 0 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  flex: 1;
  text-transform: capitalize;
}

/* "Know more" button */
.stage-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: auto;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  white-space: nowrap;
  transition: gap .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  user-select: none;
}
.stage-more::after {
  content: "→";
  transition: transform .25s ease;
  display: inline-block;
}
.stage-card:hover .stage-more {
  gap: 0.5rem;
}
.stage-card.is-active .stage-more::after {
  transform: rotate(90deg);
}

/* Hidden inline detail content */
.stage-detail-content {
  display: none;
}

/* ── Full-width detail panel (one per phase) ── */
.stage-detail-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition: max-height .55s cubic-bezier(.4,0,.2,1), opacity .35s ease, margin .4s ease;
}
.stage-detail-panel.is-open {
  max-height: 1200px;
  opacity: 1;
  margin-top: 1rem;
}
.stage-detail-inner {
  position: relative;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 60%);
  border: 1px solid #fde68a;
  border-radius: 20px;
  padding: 1.7rem 1.9rem 1.6rem;
  box-shadow: 0 8px 28px rgba(146, 64, 14, .07);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Close button (top-right of panel) */
.stage-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #fde68a;
  background: rgba(255,255,255,.7);
  color: #92400e;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.stage-detail-close:hover {
  background: #92400e;
  color: #fff;
  border-color: #92400e;
}

/* Detail content layout */
.stage-detail-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.stage-detail-num {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #92400e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stage-detail-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.02em;
}
.stage-detail-desc {
  font-size: 0.96rem;
  line-height: 1.65;
  color: #374151;
  margin: 0 0 1.1rem;
  max-width: 820px;
}
.stage-detail-desc b {
  color: #111827;
}

.stage-detail-section {
  margin-top: 1rem;
}
.stage-detail-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #92400e;
  margin-bottom: 0.55rem;
}
.stage-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.stage-detail-pill {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
  white-space: nowrap;
}
.stage-detail-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.stage-detail-method {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #fde68a;
  color: #92400e;
  font-family: "General Sans", -apple-system, monospace;
}

/* Phase-color tints for detail panel num badge */
.phase-block.pc1 .stage-detail-num { background: #77ab56; }
.phase-block.pc2 .stage-detail-num { background: #4f95c3; }
.phase-block.pc3 .stage-detail-num { background: #72548d; }
.phase-block.pc4 .stage-detail-num { background: #e8b341; }

/* Default: solid filled (dark mode); active: light tint (light mode) */
.phase-block.pc1 .stage-detail-section-label,
.phase-block.pc1 .stage-tag { color: #77ab56; }
.phase-block.pc1 .stage-more { color: #fff; background: #77ab56; border-color: #77ab56; }
.phase-block.pc1 .stage-card:hover .stage-more { filter: brightness(0.9); }
.phase-block.pc1 .stage-card.is-active .stage-more { background: rgba(119,171,86,.12); border-color: rgba(119,171,86,.35); color: #77ab56; filter: none; }

.phase-block.pc2 .stage-detail-section-label,
.phase-block.pc2 .stage-tag { color: #4f95c3; }
.phase-block.pc2 .stage-more { color: #fff; background: #4f95c3; border-color: #4f95c3; }
.phase-block.pc2 .stage-card:hover .stage-more { filter: brightness(0.9); }
.phase-block.pc2 .stage-card.is-active .stage-more { background: rgba(79,149,195,.12); border-color: rgba(79,149,195,.35); color: #4f95c3; filter: none; }

.phase-block.pc3 .stage-detail-section-label,
.phase-block.pc3 .stage-tag { color: #72548d; }
.phase-block.pc3 .stage-more { color: #fff; background: #72548d; border-color: #72548d; }
.phase-block.pc3 .stage-card:hover .stage-more { filter: brightness(0.9); }
.phase-block.pc3 .stage-card.is-active .stage-more { background: rgba(114,84,141,.12); border-color: rgba(114,84,141,.35); color: #72548d; filter: none; }

.phase-block.pc4 .stage-detail-section-label,
.phase-block.pc4 .stage-tag { color: #e8b341; }
.phase-block.pc4 .stage-more { color: #fff; background: #e8b341; border-color: #e8b341; }
.phase-block.pc4 .stage-card:hover .stage-more { filter: brightness(0.9); }
.phase-block.pc4 .stage-card.is-active .stage-more { background: rgba(232,179,65,.12); border-color: rgba(232,179,65,.35); color: #e8b341; filter: none; }

.phase-block.pc1 .stage-card.is-active { border-color: rgba(119,171,86,.35); }
.phase-block.pc2 .stage-card.is-active { border-color: rgba(79,149,195,.35); }
.phase-block.pc3 .stage-card.is-active { border-color: rgba(114,84,141,.35); }
.phase-block.pc4 .stage-card.is-active { border-color: rgba(232,179,65,.35); }

/* Know more button: glass style on dark active card */
.phase-block.pc1 .stage-card.is-active .stage-more,
.phase-block.pc2 .stage-card.is-active .stage-more,
.phase-block.pc3 .stage-card.is-active .stage-more,
.phase-block.pc4 .stage-card.is-active .stage-more {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
  color: #fff;
  filter: none;
}

.phase-block.pc1 .stage-detail-method { color: #77ab56; border-color: #b8d9a0; }
.phase-block.pc2 .stage-detail-method { color: #4f95c3; border-color: #a2d0e8; }
.phase-block.pc3 .stage-detail-method { color: #72548d; border-color: #d4c6e0; }
.phase-block.pc4 .stage-detail-method { color: #e8b341; border-color: #f5d99e; }

/* ===== Lifecycle Phase Cards (legacy, unused) ===== */

.phase-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  max-width: 1100px;
  margin: 2rem auto 0.5rem;
}
@media (max-width: 1000px) {
  .phase-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .phase-card-grid { grid-template-columns: 1fr; }
}

.phase-card-img {
  position: relative;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 22px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.22,.68,0,1.1), box-shadow .35s ease, border-color .25s ease;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
.phase-card-img:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(146, 64, 14, .10);
  border-color: #fde68a;
}
.phase-card-img.is-active {
  border-color: #fbbf24;
  box-shadow: 0 22px 44px rgba(146, 64, 14, .12);
}

/* Image area */
.phase-card-img .pc-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.phase-card-img .pc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.22,.68,0,1.1);
}
.phase-card-img:hover .pc-image img {
  transform: scale(1.04);
}

/* Roman numeral overlay (top-left of image) */
.phase-card-img .pc-roman {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.25);
  z-index: 2;
  font-feature-settings: 'lnum';
}

/* Stage badge (bottom-right of image) */
.phase-card-img .pc-badge {
  position: absolute;
  bottom: 0.8rem;
  right: 0.9rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #6b7280;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

/* Body / motivation text */
.phase-card-img .pc-body {
  padding: 1.1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.phase-card-img .pc-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.phase-card-img .pc-name::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.phase-card-img .pc-motivation {
  font-size: 0.86rem;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* Phase color accents */
.phase-card-img.pc1 .pc-name::before { background: #77ab56; }
.phase-card-img.pc2 .pc-name::before { background: #4f95c3; }
.phase-card-img.pc3 .pc-name::before { background: #72548d; }
.phase-card-img.pc4 .pc-name::before { background: #e8b341; }

/* Lifecycle hint */
.phase-flow-hint {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: #9ca3af;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Lifecycle Phase Flow (legacy) ===== */

.phase-flow-wrap {
  margin: 2.5rem 0 0.5rem;
}

.phase-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 0 0;
}

/* Connecting hairline through dots */
.phase-flow::before {
  content: "";
  position: absolute;
  top: 92px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, #77ab56 0%, #4f95c3 33%, #72548d 66%, #e8b341 100%);
  opacity: 0.35;
  z-index: 0;
}

.phase-card {
  position: relative;
  text-align: center;
  padding: 0.5rem 0.75rem 1rem;
  cursor: pointer;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: transform .25s cubic-bezier(.22,.68,0,1.1);
  -webkit-tap-highlight-color: transparent;
}

.phase-card:hover {
  transform: translateY(-3px);
}

.phase-card .phase-roman-big {
  font-size: 4.5rem;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  color: #111827;
  transition: color .3s ease;
  font-feature-settings: 'lnum';
}

.phase-card .phase-dot {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin: 0 auto 1.1rem;
  background: #fff;
  border: 2px solid #d1d5db;
  box-shadow: 0 0 0 5px #fff;
  transition: border-color .3s ease, transform .3s ease;
}

.phase-card .phase-name-big {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.phase-card .phase-meta-small {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Hover & active color states */
.phase-card.pc1:hover .phase-roman-big,
.phase-card.pc1.is-active .phase-roman-big { color: #77ab56; }
.phase-card.pc2:hover .phase-roman-big,
.phase-card.pc2.is-active .phase-roman-big { color: #4f95c3; }
.phase-card.pc3:hover .phase-roman-big,
.phase-card.pc3.is-active .phase-roman-big { color: #72548d; }
.phase-card.pc4:hover .phase-roman-big,
.phase-card.pc4.is-active .phase-roman-big { color: #e8b341; }

.phase-card.pc1:hover .phase-dot,
.phase-card.pc1.is-active .phase-dot { border-color: #77ab56; transform: scale(1.25); }
.phase-card.pc2:hover .phase-dot,
.phase-card.pc2.is-active .phase-dot { border-color: #4f95c3; transform: scale(1.25); }
.phase-card.pc3:hover .phase-dot,
.phase-card.pc3.is-active .phase-dot { border-color: #72548d; transform: scale(1.25); }
.phase-card.pc4:hover .phase-dot,
.phase-card.pc4.is-active .phase-dot { border-color: #e8b341; transform: scale(1.25); }

/* Active card subtle highlight */
.phase-card.is-active {
  transform: translateY(-3px);
}

/* Mobile */
@media (max-width: 720px) {
  .phase-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0;
  }
  .phase-flow::before {
    display: none;
  }
  .phase-card .phase-roman-big {
    font-size: 3.5rem;
  }
}

/* ===== Interactive Illustrated Tree (legacy, unused) ===== */

.itree {
  position: relative;
  max-width: 960px;
  margin: 2rem auto 0;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── SVG canvas ── */
.itree-svg {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: visible;
}

/* Branch lines */
.itree-svg .trunk {
  fill: none;
  stroke: #78533a;
  stroke-width: 14;
  stroke-linecap: round;
}
.itree-svg .trunk-inner {
  fill: none;
  stroke: #a0785c;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.35;
}
.itree-svg .branch {
  fill: none;
  stroke: #6b4c38;
  stroke-width: 7;
  stroke-linecap: round;
}
.itree-svg .twig {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}
.itree-svg .twig-c1 { stroke: #4a7c59; }
.itree-svg .twig-c2 { stroke: #6b5b7b; }
.itree-svg .twig-c3 { stroke: #3d7a6a; }
.itree-svg .twig-c4 { stroke: #8a6340; }

/* Leaf clusters */
.itree-svg .leaves {
  opacity: 0.5;
}
.itree-svg .leaf-c1 { fill: #8fbc6e; }
.itree-svg .leaf-c2 { fill: #8e6fa8; }
.itree-svg .leaf-c3 { fill: #10b981; }
.itree-svg .leaf-c4 { fill: #f97316; }

/* Glow filter defined in SVG defs */

/* ── Clickable orb group in SVG ── */
.itree-svg .node-group { cursor: pointer; }
.itree-svg .node-glow {
  animation: svgOrbPulse 2.8s ease-in-out infinite;
  transform-origin: center;
}
@keyframes svgOrbPulse {
  0%, 100% { opacity: 0.3; r: 38; }
  50%      { opacity: 0.55; r: 44; }
}
.itree-svg .node-group:hover .node-core {
  filter: brightness(1.15);
}
.itree-svg .node-group.is-active .node-glow {
  animation: none;
  opacity: 0.65;
  r: 46;
}
.itree-svg .node-text {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
}
.itree-svg .node-label {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}
.itree-svg .node-sublabel {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  fill: #9ca3af;
  text-anchor: middle;
  pointer-events: none;
}

/* Root label */
.itree-svg .root-node {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  fill: #fff;
  text-anchor: middle;
}

/* ── Detail panel (unchanged from before) ── */
.itree-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .5s cubic-bezier(.4,0,.2,1), opacity .35s ease, margin .4s ease;
  margin-top: 0;
  border-radius: 16px;
}
.itree-panel.is-open {
  max-height: 1200px;
  opacity: 1;
  margin-top: 1.2rem;
}
.itree-panel-inner {
  padding: 1.4rem 1.5rem;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}
.itree-panel-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.itree-panel-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.itree-panel-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
}

/* Stage rows inside panel */
.itree-stage-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.itree-stage-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  transition: border-color .2s, box-shadow .2s;
}
.itree-stage-row:hover {
  border-color: #e5e7eb;
  box-shadow: 0 3px 12px rgba(0,0,0,.04);
}
.itree-stage-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  margin-top: 1px;
}
.itree-stage-content h4 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}
.itree-stage-content .itree-stage-desc {
  font-size: 0.84rem;
  color: #6b7280;
  margin: 0 0 0.45rem;
  line-height: 1.5;
}
.itree-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.itree-new {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Pill color variants */
.tree-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid;
}
.pill-s1 { background: #f0f7eb; color: #4f7a35; border-color: #b8d9a0; }
.pill-s2 { background: #f0f7eb; color: #77ab56; border-color: #b8d9a0; }
.pill-s3 { background: #f0f7eb; color: #4f7a35; border-color: #b8d9a0; }
.pill-s4 { background: #fefce8; color: #a16207; border-color: #fde68a; }
.pill-s5 { background: #f3eff7; color: #4d3070; border-color: #d4c6e0; }
.pill-s6 { background: #f3eff7; color: #72548d; border-color: #d4c6e0; }
.pill-s7 { background: #f3eff7; color: #72548d; border-color: #c0aed4; }
.pill-s8 { background: #fdf6e3; color: #9a6c0a; border-color: #f5d99e; }

/* Mobile */
@media (max-width: 640px) {
  .itree-svg { max-width: 100%; }
}

/* ===== Insight cards (Apple/Claude-style minimalist) ===== */

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
@media (max-width: 900px) {
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .insight-grid { grid-template-columns: 1fr; }
}

.insight-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 920px;
  margin: 2.5rem 0 1.4rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.insight-divider .divider-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ca3af;
  white-space: nowrap;
}
.insight-divider .divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.insight-card {
  position: relative;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 18px;
  padding: 2rem 1.6rem 1.6rem;
  transition: transform .25s cubic-bezier(.22,.68,0,1.1), box-shadow .3s ease, border-color .25s ease;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(146, 64, 14, .08);
  border-color: #fde68a;
}

.insight-card .insight-metric {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #92400e;
  font-feature-settings: 'lnum', 'tnum';
}

.insight-card .insight-headline {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111827;
  line-height: 1.35;
  margin: 0;
}

.insight-card .insight-tag {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}
.insight-card .insight-tag b {
  color: #374151;
  font-weight: 600;
}

/* Featured = larger metric only; rest stays clean */
.insight-card.is-featured {
  background: linear-gradient(180deg, #fffbeb 0%, #fff 60%);
  border-color: #fde68a;
}
.insight-card.is-featured .insight-metric {
  font-size: 3.6rem;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Category pills for paper collection */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cat-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.cat-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.cat-pill .cat-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}
.cat-pill .cat-count {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-left: auto;
}

/* Authors name list */
.ar-authors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-top: 0.5rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ar-authors-list span {
  font-size: 0.92rem;
  color: #374151;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: #f3f4f6;
}

/* GitHub collection button */
.ar-github-btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  background: #92400e;
  color: #fff;
  border: 1px solid #92400e;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ar-github-btn:hover {
  background: rgba(146, 64, 14, 0.08);
  color: #92400e;
  border-color: rgba(146, 64, 14, 0.35);
}

/* ===== Responsible Use & Limitations ===== */
.ar-responsible {
  --responsible-fig-width: 160px;   /* ← adjust figure width here */
  display: grid;
  grid-template-columns: var(--responsible-fig-width) 1fr;
  gap: 2rem;
  column-gap: 2.5rem;
  row-gap: 0.6rem;
  align-items: start;
  max-width: 920px;
  margin: 1.2rem 0 0.5rem;
}
.ar-responsible-fig {
  margin: 0;
  padding-right: 0.5rem;
  width: 100% !important;
  margin-left: 0 !important;
}
.ar-responsible-fig img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid #f3f4f6;
}
.ar-responsible-text {
  font-size: 1.02rem;
  line-height: 1.55;
  color: #374151;
  margin: 0;
  min-width: 0;
  font-family: "Satoshi", -apple-system, sans-serif;
}
.ar-responsible-text p {
  margin: 0 0 0.9rem;
}
.ar-responsible-text p:last-child {
  margin-bottom: 0;
}
.ar-responsible-full {
  grid-column: 1 / -1;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #374151;
  margin: 0.3rem 0 0;
  font-family: "Satoshi", -apple-system, sans-serif;
}
@media (max-width: 640px) {
  .ar-responsible {
    grid-template-columns: 1fr;
  }
}

/* ===== Call for Contributions ===== */
.ar-contribute {
  --contribute-fig-width: 235px;   /* ← adjust figure width here */
  position: relative;
  max-width: 920px;
  margin: 2.5rem 0 0.2rem;
  padding: 1.6rem calc(var(--contribute-fig-width) + 2.8rem) 1.6rem 1.8rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef9e7 100%);
  border: 1px solid #fde68a;
  border-radius: 18px;
  font-family: "Satoshi", -apple-system, sans-serif;
  min-height: calc(var(--contribute-fig-width) + 3.2rem);
}
.ar-contribute-fig {
  position: absolute !important;
  top: 50% !important;
  right: 1.6rem !important;
  transform: translateY(-50%) !important;
  width: var(--contribute-fig-width) !important;
  margin: 0 !important;
}
.ar-contribute-fig img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  border: 1px solid #e5e7eb;
}
.ar-contribute p {
  font-size: 0.96rem;
  line-height: 1.65;
  color: #374151;
  margin: 0.5rem 0 0.6rem;
}
.ar-contribute-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.38rem 1rem;
  background: #92400e;
  color: #fff;
  border: 1px solid #92400e;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ar-contribute-btn:hover {
  background: rgba(146,64,14,.08);
  color: #92400e;
  border-color: rgba(146,64,14,.35);
}
@media (max-width: 640px) {
  .ar-contribute {
    padding: 1.4rem;
    min-height: unset;
  }
  .ar-contribute-fig {
    position: static !important;
    width: 100px !important;
    margin: 1rem auto 0 !important;
    display: block;
  }
}
/* Citation block */
.ar-citation {
  font-family: 'Courier New', Courier, monospace;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  color: #222;
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 900px;
  overflow-x: auto;
}

/* Stats banner */
.ar-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.8rem 0 1rem;
  max-width: 920px;
}
@media (max-width: 640px) {
  .ar-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.ar-stat {
  position: relative;
  text-align: center;
  padding: 1.1rem 0.6rem 1rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border: 1px solid #fde68a;
  transition: transform .2s ease, box-shadow .2s ease;
}
.ar-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(146, 64, 14, .08);
}
.ar-stat .ar-stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #92400e, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.ar-stat .ar-stat-label {
  font-size: 0.78rem;
  color: #6b7280;
  font-weight: 600;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

/* ===== Exhibition / Poster Gallery ===== */

.gallery-section {
  position: relative;
  background: #3a3a42;
  margin: 0 -9999px;
  padding: 4rem 9999px 3.5rem;
  overflow: hidden;
}

.gallery-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(251,191,36,.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(147,51,234,.07) 0%, transparent 70%);
  pointer-events: none;
}

.gallery-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 1;
}

.gallery-section .gallery-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 0.4rem;
}

.gallery-section .gallery-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0.2rem 0 0.5rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
}

.gallery-section .gallery-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gallery-hr {
  height: 3px;
  width: 72px;
  background: linear-gradient(90deg, #fbbf24, #8e6fa8 60%, #6366f1);
  border-radius: 999px;
  margin: 0.6rem 0 1rem;
}

/* Poster grid with perspective */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  perspective: 1200px;
}
@media (max-width: 900px) {
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .poster-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}

/* Individual poster frame */
.poster-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #2e2e36;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 4px 20px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.04) inset;
  transition: transform .35s cubic-bezier(.22,.68,0,1.2), box-shadow .35s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}
.poster-frame:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow:
    0 20px 50px rgba(0,0,0,.5),
    0 0 40px rgba(251,191,36,.08),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Poster image area */
.poster-frame .poster-img {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Placeholder for missing posters */
.poster-placeholder {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background:
    linear-gradient(135deg, #333340 0%, #2c2c36 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.poster-placeholder .placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 2px dashed rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: rgba(255,255,255,.2);
}
.poster-placeholder .placeholder-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,.2);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Poster info bar */
.poster-info {
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.poster-info .poster-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.35;
  flex: 1;
}

.poster-info .poster-tool {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Tool badge color variants */
.tool-gpt      { background: rgba(16,163,127,.2); color: #34d399; border: 1px solid rgba(16,163,127,.25); }
.tool-claude   { background: rgba(217,119,87,.2); color: #f0a882; border: 1px solid rgba(217,119,87,.25); }
.tool-gemini   { background: rgba(66,133,244,.2); color: #93bbfc; border: 1px solid rgba(66,133,244,.25); }
.tool-generic  { background: rgba(251,191,36,.15); color: #fcd34d; border: 1px solid rgba(251,191,36,.2); }

/* Shimmer glow on the top poster edge */
.poster-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251,191,36,.4), rgba(168,85,247,.4), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.poster-frame:hover::after {
  opacity: 1;
}

/* ---- Horizontal (landscape) posters ---- */

.poster-grid-landscape {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  perspective: 1200px;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .poster-grid-landscape {
    grid-template-columns: 1fr;
  }
}

.poster-frame-landscape {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #2e2e36;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 4px 20px rgba(0,0,0,.3),
    0 0 0 1px rgba(255,255,255,.04) inset;
  transition: transform .35s cubic-bezier(.22,.68,0,1.2), box-shadow .35s ease;
  transform-style: preserve-3d;
  cursor: pointer;
}
.poster-frame-landscape:hover {
  transform: translateY(-6px) rotateX(2deg);
  box-shadow:
    0 20px 50px rgba(0,0,0,.45),
    0 0 40px rgba(251,191,36,.08),
    0 0 0 1px rgba(255,255,255,.06) inset;
}

.poster-frame-landscape .poster-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.poster-frame-landscape .poster-placeholder {
  aspect-ratio: 4 / 3;
}

.poster-frame-landscape .poster-num {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  z-index: 2;
}

.poster-frame-landscape::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(251,191,36,.4), rgba(168,85,247,.4), transparent);
  opacity: 0;
  transition: opacity .35s ease;
}
.poster-frame-landscape:hover::after {
  opacity: 1;
}

/* Full-width landscape poster (spans entire grid) */
.poster-frame-landscape.poster-wide {
  grid-column: 1 / -1;
}
.poster-frame-landscape.poster-wide .poster-img,
.poster-frame-landscape.poster-wide .poster-placeholder {
  aspect-ratio: 4 / 3;
}

/* Section divider label inside gallery */
.gallery-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.2rem 0 0.6rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.gallery-divider .divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}
.gallery-divider .divider-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
}

/* Number badge (corner) */
.poster-num {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  z-index: 2;
}

/* Lightbox overlay */
.poster-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}
.poster-lightbox.is-open {
  display: flex;
}
.poster-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  object-fit: contain;
}
.poster-lightbox .lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.poster-lightbox .lightbox-close:hover {
  background: rgba(255,255,255,.2);
}

/* Contributors name list (reuse from onevl pattern) */
.contributors-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  margin-top: 0.5rem;
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.contributors-name-list span {
  font-size: 0.92rem;
  color: #374151;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f3f4f6;
  white-space: nowrap;
}

/* ===== Mobile polish ===== */

/* Paper Collection header: tighten row, hide method count on small phones */
@media (max-width: 560px) {
  .cstage-header {
    padding: 0.75rem 0.85rem;
    gap: 0.55rem;
  }
  .cstage-thumb {
    width: 40px;
    height: 40px;
  }
  .cstage-meta {
    display: none;
  }
}

/* Phase hero: smaller title + tighter padding on phones */
@media (max-width: 480px) {
  .phase-hero-title { font-size: 1.6rem; }
  .phase-hero-subtitle { font-size: 0.85rem; }
  .phase-hero-overlay { padding: 1rem 1.1rem; }
}

/* Stage card Know more button: compact on phones so it fits in narrow 3-col cards */
@media (max-width: 1000px) {
  .stage-more {
    font-size: 0.7rem;
    padding: 0.16rem 0.5rem;
    gap: 0.25rem;
  }
}
@media (max-width: 640px) {
  .stage-more {
    font-size: 0.62rem;
    padding: 0.12rem 0.38rem;
    gap: 0.2rem;
  }
}

/* ===== Copy BibTeX button ===== */
.ar-citation-wrap {
  position: relative;
  max-width: 900px;
}
.ar-copy-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  z-index: 2;
}
.ar-copy-btn:hover {
  background: #92400e;
  color: #fff;
  border-color: #92400e;
}
.ar-copy-btn.is-copied {
  background: #059669;
  color: #fff;
  border-color: #059669;
}

/* ===== Phase filter bar ===== */
.collection-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  max-width: 920px;
}
.cf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cf-btn:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #111827;
}
.cf-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.cf-p1 .cf-dot { background: #77ab56; }
.cf-p2 .cf-dot { background: #4f95c3; }
.cf-p3 .cf-dot { background: #72548d; }
.cf-p4 .cf-dot { background: #e8b341; }

/* Active states */
.cf-btn.is-active { border-color: #9ca3af; background: #f3f4f6; color: #111827; }
.cf-p1.is-active { background: #77ab56; border-color: #77ab56; color: #fff; }
.cf-p2.is-active { background: #4f95c3; border-color: #4f95c3; color: #fff; }
.cf-p3.is-active { background: #72548d; border-color: #72548d; color: #fff; }
.cf-p4.is-active { background: #e8b341; border-color: #e8b341; color: #4d2d00; }
.cf-p1.is-active .cf-dot,
.cf-p2.is-active .cf-dot,
.cf-p3.is-active .cf-dot,
.cf-p4.is-active .cf-dot { background: rgba(255,255,255,.75); }

/* ===== Active TOC highlight ===== */
d-contents nav a.toc-active {
  color: #92400e !important;
  font-weight: 700;
}

/* ===== Slide Preview Modal ===== */
.slide-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9900;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.slide-modal.is-open { display: flex; }

.slide-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slide-modal-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  height: 80vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 90px rgba(0,0,0,.45);
}

.slide-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafaf6;
  flex-shrink: 0;
}
.slide-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.slide-modal-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: #111827;
  font-family: "Satoshi", -apple-system, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slide-modal-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  font-family: "Satoshi", -apple-system, sans-serif;
  transition: background .15s ease;
  white-space: nowrap;
}
.slide-modal-dl:hover { background: #374151; }
.slide-modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.slide-modal-close:hover { background: #1f2937; color: #fff; border-color: #1f2937; }

.slide-modal-frame {
  flex: 1;
  border: none;
  width: 100%;
  min-height: 0;
}

@media (max-width: 640px) {
  .slide-modal { padding: 0.8rem; }
  .slide-modal-window { height: 90vh; border-radius: 12px; }
}

/* ===== Paper2Poster: per-model tool badges + download button ===== */
.tool-p-gemini    { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.tool-p-qwen      { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.tool-p-claude    { background: #d97706; color: #fff; border-color: #d97706; }
.tool-p-seedream  { background: #ec4899; color: #fff; border-color: #ec4899; }
.tool-p-sensenovа { background: #cbd5e1; color: #1e293b; border-color: #cbd5e1; }

.poster-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}
.poster-pages {
  flex: 1;
  font-size: 0.74rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  font-family: "Satoshi", -apple-system, sans-serif;
}
.poster-dl-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.poster-dl-btn:hover {
  background: #fff;
  color: #1f2937;
  border-color: #fff;
}
