/* ============================================================
   Cola DLM project page — polished build
   ============================================================ */

:root {
  --accent: #d6362f;
  --accent-soft: #fdecea;
  --accent-line: #f3c4c1;
  --ink: #1a1c20;
  --ink-soft: #4a4f57;
  --muted: #8b8f97;
  --rule: #ececef;
  --bg: #ffffff;
  --bg-soft: #fafafb;
  --bg-card: #ffffff;
  --shadow-1: 0 1px 2px rgba(15, 17, 21, 0.04), 0 4px 18px rgba(15, 17, 21, 0.04);
  --shadow-2: 0 1px 2px rgba(15, 17, 21, 0.05), 0 12px 40px rgba(15, 17, 21, 0.08);
  --radius: 14px;
  --maxw: 1180px;
  --content-w: 980px;
  --transition: 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

h1, h2, h3, h4, h5 {
  font-family: 'Inter', 'Google Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0;
}

a { color: var(--ink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* =================== STICKY NAV =================== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.topnav.scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.topnav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  gap: 1rem;
}
.topnav .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.topnav .brand img { height: 26px; width: auto; }
.topnav .brand .accent { color: var(--accent); }

.topnav nav {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
.topnav nav a {
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background var(--transition), color var(--transition);
}
.topnav nav a:hover { background: #f3f3f5; color: var(--ink); }
.topnav nav a.is-cta {
  background: var(--ink);
  color: #fff;
}
.topnav nav a.is-cta:hover { background: #000; color: #fff; }

@media (max-width: 768px) {
  .topnav nav { display: none; }
}

/* =================== HERO =================== */
.hero {
  position: relative;
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
  background:
    radial-gradient(900px 380px at 80% -10%, rgba(214, 54, 47, 0.06), transparent 60%),
    radial-gradient(900px 380px at 0% 0%, rgba(80, 130, 200, 0.045), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  overflow: hidden;
}
.hero::after {
  /* faint dotted overlay for texture */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, black, transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 75%);
}
.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Seedance team-project badge (mirrors the paper's title-block badge) */
.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1.15rem auto 0;
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, #c12d27 100%);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 6px 18px rgba(214, 54, 47, 0.28);
}
.team-badge .star {
  font-size: 0.8rem;
  line-height: 1;
  color: #ffd9d6;
  animation: starTwinkle 3s ease-in-out infinite;
}
.team-badge .star:last-child { animation-delay: 1.5s; }
@keyframes starTwinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.92); }
}

.publication-title {
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 800;
  margin-bottom: 0.6rem;
}
.publication-title .accent { color: var(--accent); }
.publication-title .cola-logo {
  height: 1.1em;
  width: auto;
  vertical-align: -0.18em;
  margin-right: 0.18em;
  filter: drop-shadow(0 2px 6px rgba(214, 54, 47, 0.18));
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.tagline {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 1.6rem;
}

/* authors */
.authors {
  margin: 0 auto 0.55rem;
  max-width: 880px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
}
.authors .author {
  display: inline-block;
  margin-right: 0.25rem;
  white-space: nowrap;
}
.authors .author sup { color: var(--accent); font-weight: 600; }
.authors .author a {
  color: inherit;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.32);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
}
.authors .author a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.affil-list {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 880px;
  margin: 0 auto;
}
.affil-list .affil-item { display: inline-block; margin: 0 0.6em; white-space: nowrap; }
.affil-list .sup { color: var(--accent); font-weight: 600; margin-right: 0.18em; }

.notes {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.notes .sup { color: var(--accent); margin-right: 0.18em; }

/* action buttons */
.publication-links {
  margin-top: 1.7rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}
.btn:hover {
  background: #000;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}
.btn .icon { font-size: 1rem; line-height: 1; }
.btn.is-soft {
  background: #f1f1f3;
  color: var(--ink-soft);
  border-color: #e6e6e9;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-soft:hover { transform: none; box-shadow: none; }

.coming-soon-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(214, 54, 47, 0.32);
}

/* =================== SECTIONS =================== */
.section {
  padding: 4.2rem 1.5rem;
}
.section.is-soft { background: var(--bg-soft); }
.section.is-tight { padding: 3.2rem 1.5rem; }
.section + .section { border-top: 1px solid var(--rule); }
.section[id] { scroll-margin-top: 70px; }

.container { max-width: var(--maxw); margin: 0 auto; }
.container.narrow { max-width: var(--content-w); }

.section-heading {
  text-align: center;
  margin-bottom: 2.4rem;
}
.section-heading .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.section-heading h2 {
  font-size: clamp(1.55rem, 2.5vw, 1.95rem);
  margin: 0 0 0.55rem;
}
.section-heading .lead {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

/* =================== ABSTRACT =================== */
.abstract-block {
  font-size: 1.02rem;
  text-align: justify;
  hyphens: auto;
  color: var(--ink);
}
.abstract-block p + p { margin-top: 0.85em; }

/* =================== METHOD TL;DR =================== */
.method-tldr {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.method-tldr .stage {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.method-tldr .stage::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--accent), #f8a39f);
  opacity: 0.85;
}
.method-tldr .stage:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.method-tldr .stage-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.method-tldr .stage h4 {
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-weight: 700;
}
.method-tldr .stage p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 768px) {
  .method-tldr { grid-template-columns: 1fr; }
}

/* =================== FIGURES =================== */
figure.cola-figure { margin: 0; padding: 0; }
figure.cola-figure img,
figure.cola-figure object,
figure.cola-figure embed {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
figure.cola-figure figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
figure.cola-figure figcaption b { color: var(--ink); }

.figure-grid { display: grid; gap: 1.1rem; }
.figure-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.figure-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) {
  .figure-grid.cols-2,
  .figure-grid.cols-3 { grid-template-columns: 1fr; }
}

/* =================== COMPARE TABLE =================== */
.compare-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.94rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.compare-table thead th {
  background: #f6f6f8;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
  padding: 0.85rem 0.6rem;
  border-bottom: 2px solid var(--rule);
}
.compare-table tbody td {
  padding: 0.78rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr.cola-row td { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.compare-table .check { color: #198754; font-weight: 800; font-size: 1.1rem; }
.compare-table .cross { color: #c0c0c4; font-weight: 800; font-size: 1.1rem; }
.compare-table .method-name { font-weight: 700; color: var(--ink); }

/* =================== FINDING CARDS =================== */
.finding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
@media (max-width: 1000px) { .finding-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .finding-grid { grid-template-columns: 1fr; } }

.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.finding-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: #d8d8df;
}
.finding-card .rq-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  text-transform: uppercase;
  background: #1a1c20;
  color: #fff;
  padding: 4px 11px;
  border-radius: 999px;
  align-self: flex-start;
}
.finding-card h3 {
  font-size: 1.12rem;
  margin: 0.7rem 0 0.45rem;
  line-height: 1.35;
}
.finding-card .claim {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0 0 1rem;
}
.finding-card figure { margin: 0; }
.finding-card figure img,
.finding-card figure object {
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: #fff;
}
.finding-card .observations {
  margin: 1rem 0 0;
  padding-left: 1.05rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.finding-card .observations li { margin-bottom: 0.35rem; }
.finding-card .observations li::marker { color: var(--accent); }

/* =================== HEADLINE RESULT (RQ4) =================== */
.headline-result {
  margin-top: 2.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #fdf3f2 100%);
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  padding: 2rem 2rem 2.2rem;
  box-shadow:
    0 1px 2px rgba(214, 54, 47, 0.06),
    0 16px 50px rgba(214, 54, 47, 0.07);
  position: relative;
  overflow: hidden;
}
.headline-result::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #ff7a72 50%, var(--accent) 100%);
}
.headline-result .headline-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.headline-result .headline-tag .star {
  font-size: 0.78rem;
  line-height: 1;
}
.headline-result h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  margin: 0.85rem 0 0.55rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.headline-result .claim {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: 0 0 1.4rem;
  max-width: 880px;
}
.headline-result figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: var(--shadow-1);
}
.headline-result figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.headline-result .obs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.headline-result .obs-grid .obs-item {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  position: relative;
}
.headline-result .obs-grid .obs-item .num {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  margin-right: 0.45rem;
  flex-shrink: 0;
}
.headline-result .obs-grid .obs-item b { color: var(--ink); }
@media (max-width: 1000px) { .headline-result .obs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .headline-result .obs-grid { grid-template-columns: 1fr; } }

/* =================== AFTERWORD PASSAGE =================== */
.afterword-passage {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  margin-top: 1.4rem;
  transition: box-shadow var(--transition);
}
.afterword-passage:hover { box-shadow: var(--shadow-2); }

.afterword-head {
  padding: 1.6rem 2rem 0.4rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.1rem;
}
.afterword-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.afterword-head h3 {
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.afterword-fulltext {
  position: relative;
  padding: 1.7rem 2rem 1.9rem;
  max-height: 720px;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-soft);
  transition: max-height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.afterword-fulltext::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 240px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 55%,
    rgba(255, 255, 255, 1) 100%
  );
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.afterword-passage.expanded .afterword-fulltext { max-height: 100000px; }
.afterword-passage.expanded .afterword-fulltext::after { opacity: 0; }

.afterword-fulltext > *:first-child { margin-top: 0; }
.afterword-fulltext p { margin: 0 0 1rem; }
.afterword-fulltext p:last-child { margin-bottom: 0; }
.afterword-fulltext em { color: var(--ink); font-style: italic; }
.afterword-fulltext b { color: var(--ink); }
.afterword-fulltext h4 {
  font-size: 1.06rem;
  color: var(--ink);
  margin: 1.9rem 0 0.7rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.005em;
}
.afterword-fulltext h4:first-of-type { margin-top: 0.5rem; }
.afterword-fulltext .cite {
  font-size: 0.85em;
  color: var(--muted);
  white-space: nowrap;
}
.afterword-fulltext .katex-display {
  margin: 0.9rem 0 1.1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.1rem 0;
}
.afterword-fulltext .katex { font-size: 1.02em; }
.afterword-fulltext .katex-display > .katex { white-space: nowrap; }

.afterword-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 1rem 1.2rem;
  border: 0;
  border-top: 1px solid var(--rule);
  background: var(--bg-card);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  transition: background var(--transition), color var(--transition);
}
.afterword-toggle:hover { background: var(--accent-soft); }
.afterword-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.afterword-toggle .hide-text { display: none; }
.afterword-passage.expanded .afterword-toggle .show-text { display: none; }
.afterword-passage.expanded .afterword-toggle .hide-text { display: inline; }
.afterword-toggle .chev {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}
.afterword-passage.expanded .afterword-toggle .chev { transform: rotate(180deg); }

@media (max-width: 720px) {
  .afterword-head { padding: 1.2rem 1.2rem 1rem; }
  .afterword-head h3 { font-size: 1.15rem; }
  .afterword-fulltext { padding: 1.2rem 1.2rem 1.4rem; font-size: 0.96rem; max-height: 540px; }
  .afterword-fulltext .katex { font-size: 0.95em; }
}

/* =================== DETAILS / ACCORDION =================== */
.detail-block {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.detail-block:hover { box-shadow: var(--shadow-2); }
.detail-block summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.4rem;
  font-weight: 600;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  user-select: none;
}
.detail-block summary::-webkit-details-marker { display: none; }
.detail-block summary::after {
  content: '';
  width: 14px; height: 14px;
  background: var(--accent);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"/></svg>') center/contain no-repeat;
  transition: transform var(--transition);
}
.detail-block[open] summary::after { transform: rotate(45deg); }
.detail-block .detail-body {
  padding: 0.4rem 1.4rem 1.4rem;
  border-top: 1px solid var(--rule);
}
.detail-block .detail-body > * + * { margin-top: 1rem; }

/* =================== DATA TABLES =================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 0.6rem;
}
.data-table th, .data-table td {
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.data-table th { background: #f6f6f8; color: var(--ink); font-weight: 700; }
.data-table tbody tr:hover { background: #fafafb; }
.data-table .row-label { text-align: left; color: var(--ink); font-weight: 500; }
.data-table .best { font-weight: 700; color: var(--accent); }
.data-table .second { font-weight: 600; text-decoration: underline; }

/* =================== DISCUSSION =================== */
.disc-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.7rem 1.7rem 1.5rem;
  box-shadow: var(--shadow-1);
  transition: transform var(--transition), box-shadow var(--transition);
}
.disc-card + .disc-card { margin-top: 1.2rem; }
.disc-card:hover { box-shadow: var(--shadow-2); }
.disc-card h3 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.12rem;
  margin: 0 0 0.7rem;
  color: var(--ink);
}
.disc-card h3::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 1.05em;
  background: var(--accent);
  border-radius: 2px;
}
.disc-card p { color: var(--ink-soft); margin: 0 0 0.7rem; font-size: 0.97rem; }

.takeaway {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.78rem 1rem;
  border-radius: 8px;
  font-size: 0.94rem;
  color: var(--ink);
  margin-top: 0.9rem;
}
.takeaway b { color: var(--ink); }

/* =================== UNIFIED GALLERY (LIGHTBOX) =================== */
.unified-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.55rem;
  margin-top: 1.6rem;
}
@media (max-width: 1024px) { .unified-gallery { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px)  { .unified-gallery { grid-template-columns: repeat(3, 1fr); } }

.unified-gallery .tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f3f5;
  border: 1px solid var(--rule);
  cursor: zoom-in;
}
.unified-gallery .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.unified-gallery .tile:hover img { transform: scale(1.06); }
.unified-gallery .tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.18) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}
.unified-gallery .tile:hover::after { opacity: 1; }

.preliminary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff5e6;
  color: #ad6800;
  border: 1px solid #f0d9a8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.5rem;
  vertical-align: 0.18em;
}

/* lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2.5rem;
  cursor: zoom-out;
  animation: fadeIn 0.18s ease-out;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox .lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox .lb-prev { left: 1.5rem; }
.lightbox .lb-next { right: 1.5rem; }
.lightbox .lb-close {
  top: 1.2rem; right: 1.2rem; transform: none;
  width: 38px; height: 38px;
  font-size: 1.2rem;
}
.lightbox .lb-counter {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: 999px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =================== BIBTEX =================== */
.bibtex-block {
  position: relative;
  max-width: var(--content-w);
  margin: 0 auto;
}
.bibtex-block pre {
  background: #0f1115;
  color: #e6e6e6;
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  font-family: 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
  font-size: 0.84rem;
  line-height: 1.65;
  overflow-x: auto;
  margin: 0;
}
.bibtex-block .copy-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.32rem 0.72rem;
  font-size: 0.78rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition);
}
.bibtex-block .copy-btn:hover { background: rgba(255, 255, 255, 0.18); }

/* =================== FOOTER =================== */
.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--rule);
  padding: 2.2rem 1.5rem 2.6rem;
  text-align: center;
}
.footer img.seed-logo {
  height: 30px;
  margin-bottom: 0.7rem;
  opacity: 0.92;
}
.footer .small {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}
.footer a {
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--muted);
  padding-bottom: 1px;
}
.footer a:hover { color: var(--accent); border-color: var(--accent); }

/* =================== BACK TO TOP =================== */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--accent); }
.back-to-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* =================== REVEAL ANIMATIONS =================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .publication-title .cola-logo,
  .hero-eyebrow .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* =================== UTIL =================== */
.center { text-align: center; }
.muted  { color: var(--ink-soft); }
.tiny   { font-size: 0.82rem; }
.mt-1   { margin-top: 0.5rem; }
.mt-2   { margin-top: 1rem; }
.mt-3   { margin-top: 1.5rem; }

.eq {
  font-family: 'Fira Code', 'JetBrains Mono', 'Menlo', monospace;
  font-size: 0.9em;
  background: #f4f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

hr.soft { border: none; border-top: 1px solid var(--rule); margin: 1.6rem auto; max-width: 240px; }
