:root {
  color-scheme: light;
  --bg: #f1faec;
  --bg-2: #e2f3d8;
  --ink: #14251a;
  --muted: #5f725f;
  --line: rgba(54, 93, 52, 0.16);
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #ffffff;
  --blue: #4f9f2f;
  --violet: #1d6f33;
  --cyan: #98d44a;
  --peach: #d8a932;
  --shadow: 0 24px 80px rgba(55, 108, 45, 0.18);
  --shadow-soft: 0 14px 44px rgba(55, 108, 45, 0.11);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 7%, rgba(152, 212, 74, 0.28), transparent 27rem),
    radial-gradient(circle at 88% 12%, rgba(79, 159, 47, 0.16), transparent 25rem),
    radial-gradient(circle at 50% 92%, rgba(216, 169, 50, 0.10), transparent 30rem),
    linear-gradient(180deg, #fbfff7 0%, var(--bg) 42%, #ffffff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(31, 71, 34, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 71, 34, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 58%);
  z-index: -3;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-glow {
  position: fixed;
  width: 36rem;
  height: 36rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.18;
  z-index: -2;
  pointer-events: none;
}

.page-glow-a {
  top: -8rem;
  left: -12rem;
  background: var(--blue);
}

.page-glow-b {
  right: -12rem;
  bottom: 10rem;
  background: var(--cyan);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 0;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand img {
  width: 34px;
  height: 34px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #52664f;
  font-size: 0.92rem;
  font-weight: 720;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.topbar nav a:hover {
  background: rgba(79, 159, 47, 0.10);
  color: var(--blue);
  transform: translateY(-1px);
}

.section-pad {
  width: min(calc(100% - 36px), var(--max));
  margin-inline: auto;
  padding: 86px 0;
}

.section-pad.compact {
  padding: 20px 0 56px;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 74px;
  padding-bottom: 42px;
}

.hero > * {
  width: min(100%, 1030px);
}

.hero-logo {
  width: min(760px, 92vw);
  margin: 0 auto 18px;
  filter: drop-shadow(0 18px 34px rgba(17, 113, 55, 0.18));
}

.hero-kicker {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-kicker span {
  display: inline-flex;
  padding: 9px 14px;
  border: 1px solid rgba(79, 159, 47, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue);
  font-weight: 820;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(79, 159, 47, 0.08);
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.65rem, 7vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
  font-weight: 920;
}

.subtitle {
  width: min(860px, 100%);
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  line-height: 1.62;
}

.authors {
  color: #4f9f2f;
  font-weight: 820;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65;
}

.authors a {
  transition: color 180ms ease;
}

.authors a:hover {
  color: var(--violet);
}

.affiliations {
  margin-top: 8px;
  color: #53664f;
  font-size: clamp(0.96rem, 1.7vw, 1.08rem);
  display: flex;
  justify-content: center;
  gap: 14px 24px;
  flex-wrap: wrap;
}

.action-row {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 19px;
  border-radius: 999px;
  background: #1b2f1d;
  color: #fff;
  font-weight: 830;
  box-shadow: 0 13px 28px rgba(38, 68, 35, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.pill.primary {
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(38, 68, 35, 0.22);
}

.hero-card {
  margin: 56px auto 0;
  width: min(900px, 100%);
  padding: 22px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  text-align: left;
  align-items: center;
  border: 1px solid rgba(152, 212, 74, 0.16);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(241,250,236,0.84));
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.38rem, 2.4vw, 2rem);
  letter-spacing: -0.045em;
}

.hero-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.mini-matrix {
  width: 150px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 13px;
  border-radius: 28px;
  background: #142815;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 20px 42px rgba(30, 58, 31, 0.22);
}

.mini-matrix span {
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(79,159,47,.94), rgba(152,212,74,.86));
}

.mini-matrix span:nth-child(1), .mini-matrix span:nth-child(6), .mini-matrix span:nth-child(11), .mini-matrix span:nth-child(16) {
  background: #fff;
}

.mini-matrix span:nth-child(3), .mini-matrix span:nth-child(9), .mini-matrix span:nth-child(14) {
  background: linear-gradient(135deg, #d8a932, #98d44a);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.78rem;
  font-weight: 920;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card,
.copy-card,
.result-panel,
.figure-card,
.bib-card,
.method-steps article {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.stat-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--blue), var(--violet) 55%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 52px;
  align-items: start;
}

.section-heading h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.065em;
}

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.08rem;
  width: min(760px, 100%);
}

.section-heading.center {
  text-align: center;
  margin-inline: auto;
  margin-bottom: 32px;
}

.section-heading.center > p:not(.eyebrow) {
  margin-inline: auto;
}

.sticky-heading {
  position: sticky;
  top: 110px;
}

.copy-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-xl);
}

.copy-card > p {
  color: #52674e;
  font-size: 1.06rem;
  line-height: 1.82;
}

.contribution-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.contribution-list div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(79, 159, 47, 0.06);
}

.contribution-list span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: #fff;
  font-weight: 920;
}

.contribution-list p {
  margin: 0;
  color: #55694f;
  line-height: 1.58;
}

.figure-card {
  padding: clamp(12px, 2vw, 20px);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.figure-card img {
  border-radius: calc(var(--radius-xl) - 14px);
}

.image-shell img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

.zoomable {
  cursor: zoom-in;
}

figcaption {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.hero-figure {
  margin: 0;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.method-steps article {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.method-steps span {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(152, 212, 74, 0.12);
  color: #4f8f2b;
  font-weight: 900;
  font-size: 0.78rem;
}

.method-steps h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.results-section {
  padding-top: 84px;
}

.results-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.result-panel {
  border-radius: var(--radius-xl);
  padding: clamp(18px, 2.3vw, 26px);
}

.table-panel {
  grid-column: 1 / -1;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head h3 {
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2vw, 1.75rem);
  letter-spacing: -0.045em;
}

.panel-head.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.score-badge {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79,159,47,.13), rgba(152,212,74,.13));
  color: var(--blue);
  font-weight: 930;
}

.responsive-table {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card-solid);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 0.95rem;
}

th, td {
  padding: 13px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(54, 93, 52, 0.10);
  white-space: nowrap;
}

th:first-child, td:first-child {
  text-align: left;
  font-weight: 800;
}

thead th {
  color: #4c6149;
  background: #f1faec;
  font-size: 0.88rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr.ours td {
  background: linear-gradient(90deg, rgba(79,159,47,.10), rgba(152,212,74,.08));
  font-weight: 900;
  color: #142815;
}

.image-shell {
  margin: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid rgba(54, 93, 52, 0.10);
  display: grid;
  place-items: center;
  overflow: visible;
}

.small-table {
  padding: 16px;
}

.conceptmix-table {
  padding: 16px;
}

.conceptmix-table img {
  width: 100%;
  object-fit: contain;
}

.small-table img {
  max-height: 470px;
  width: auto;
  object-fit: contain;
}

.wide-panel {
  grid-column: 1 / -1;
  margin-top: 18px;
}

.wide-table {
  padding: 16px;
}

.wide-table img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.visualization-section {
  padding-top: 90px;
}

.visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(360px, 0.74fr);
  gap: 20px;
  align-items: start;
}

.visual-wide img {
  width: 100%;
}

.visual-tall img {
  max-height: 980px;
  margin-inline: auto;
  width: auto;
  object-fit: contain;
}

.bib-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 22px;
  background: #152916;
  color: #f3fff7;
  overflow: hidden;
}

.bib-card::before {
  content: "";
  position: absolute;
  inset: -80px -90px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(79,159,47,.45), transparent 68%);
}

pre {
  margin: 0;
  overflow: auto;
  padding: 18px 4px 4px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.65;
  font-size: 0.95rem;
}

.copy-button {
  position: relative;
  z-index: 1;
  float: right;
  border: 0;
  cursor: pointer;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 900;
  transition: background 180ms ease, transform 180ms ease;
}

.copy-button:hover {
  background: rgba(255,255,255,0.20);
  transform: translateY(-1px);
}

.footer {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: 42px 0 58px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(9, 22, 11, 0.82);
  backdrop-filter: blur(16px);
}

.modal.open {
  display: grid;
}

.modal img {
  max-width: min(96vw, 1500px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
}

.modal-close {
  position: fixed;
  top: 24px;
  right: 26px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    border-radius: 28px;
  }

  .topbar nav {
    gap: 0;
  }

  .topbar nav a {
    font-size: 0.82rem;
    padding: 7px 9px;
  }

  .hero-card,
  .two-col,
  .results-grid,
  .visual-grid {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }

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

  .hero-card {
    text-align: center;
  }

  .mini-matrix {
    margin-inline: auto;
  }
}

@media (max-width: 650px) {
  .section-pad {
    width: min(calc(100% - 24px), var(--max));
    padding: 58px 0;
  }

  .hero {
    padding-top: 46px;
  }

  .topbar {
    position: static;
    width: min(calc(100% - 24px), var(--max));
    flex-direction: column;
    border-radius: 24px;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .stat-grid,
  .method-steps {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2.3rem, 13vw, 4rem);
  }

  .action-row {
    gap: 9px;
  }

  .pill {
    padding: 12px 15px;
  }

  .hero-card {
    padding: 18px;
  }

  .panel-head.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .small-table img {
    max-height: 410px;
  }

  code {
    font-size: 0.82rem;
  }
}


/* MiPO-specific accents */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.hero-logo.mipo-logo {
  width: min(760px, 94vw);
  margin-top: 2px;
  margin-bottom: 12px;
}

.density-orbit {
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 34%, rgba(216, 169, 50, 0.92) 0 13%, transparent 14%),
    radial-gradient(circle at 70% 68%, rgba(152, 212, 74, 0.95) 0 15%, transparent 16%),
    radial-gradient(circle at 50% 50%, rgba(79, 159, 47, 0.18) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 50%, rgba(79, 159, 47, 0.13) 0 38%, transparent 39%),
    radial-gradient(circle at 50% 50%, rgba(79, 159, 47, 0.08) 0 56%, transparent 57%);
  background-color: #152916;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.13), 0 22px 44px rgba(27, 54, 28, 0.22);
  overflow: hidden;
}

.density-orbit::before,
.density-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.45);
  inset: 28px;
}

.density-orbit::after {
  inset: 52px;
  border-style: solid;
  opacity: 0.5;
}

.density-label {
  position: absolute;
  left: 16px;
  bottom: 15px;
  color: rgba(255,255,255,0.84);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.result-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.kpi-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(54, 93, 52, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.kpi-card strong {
  display: block;
  color: var(--blue);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 8px;
}

.kpi-card span {
  color: var(--muted);
  line-height: 1.5;
  font-weight: 740;
  font-size: 0.92rem;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.analysis-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.analysis-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.045em;
}

.analysis-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .result-kpi-grid,
  .analysis-grid {
    grid-template-columns: 1fr;
  }
}
