:root {
  --lme-navy: #103756;
  --lme-blue: #2a75d0;
  --lme-red: #d03c36;
  --lme-gold: #d89216;
  --lme-green: #167f5f;
  --lme-ink: #1f2933;
  --lme-muted: #5b6673;
  --lme-line: #d9e2ec;
  --lme-band: #f5f8fb;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--lme-ink);
  font-family: "Noto Sans", sans-serif;
  background: #ffffff;
}

a {
  color: var(--lme-blue);
}

.project-hero {
  background:
    linear-gradient(180deg, rgba(245, 248, 251, 0.92), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 18% 12%, rgba(42, 117, 208, 0.12), transparent 34%),
    radial-gradient(circle at 82% 16%, rgba(208, 60, 54, 0.10), transparent 31%);
  border-bottom: 1px solid var(--lme-line);
}

.project-hero .hero-body {
  padding: 4.25rem 1.5rem 2.8rem;
}

.publication-title {
  color: var(--lme-navy);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.15rem;
}

.publication-venue {
  display: inline-block;
  color: white;
  background: var(--lme-red);
  border-radius: 999px;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 1.1rem;
  padding: 0.34rem 0.78rem;
  text-transform: uppercase;
}

.publication-authors,
.publication-affiliation {
  font-family: "Google Sans", "Noto Sans", sans-serif;
}

.publication-authors {
  color: #263442;
  font-size: 1.08rem;
  line-height: 1.8;
}

.publication-authors a {
  color: var(--lme-blue);
  font-weight: 700;
}

.publication-authors a:hover {
  text-decoration: underline;
}

.author-block {
  display: inline-block;
}

.publication-affiliation {
  color: var(--lme-muted);
  font-weight: 700;
  margin-top: 0.35rem;
}

.publication-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 1.45rem 0 1.75rem;
}

.link-button {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.link-button:hover {
  background-color: var(--lme-navy) !important;
  box-shadow: 0 10px 24px rgba(16, 55, 86, 0.24);
  color: #fff;
  transform: translateY(-2px);
}

.todo-link {
  background-color: #3b4149 !important;
}

.stat-strip {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 0 auto;
  max-width: 820px;
}

.stat-chip {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  padding: 0.9rem 0.75rem;
}

.stat-chip strong {
  color: var(--lme-navy);
  display: block;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: clamp(1.1rem, 1.7vw, 1.5rem);
  line-height: 1.1;
}

.stat-chip span {
  color: var(--lme-muted);
  display: block;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.section {
  padding: 3.8rem 1.5rem;
}

.section-band {
  background: var(--lme-band);
  border-bottom: 1px solid var(--lme-line);
  border-top: 1px solid var(--lme-line);
}

.section-title {
  color: var(--lme-navy);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
  text-align: center;
}

.project-copy {
  color: #324353;
  font-size: 1.04rem;
  line-height: 1.72;
}

.section-highlight {
  background: #fff8ea;
  border: 1px solid #f1d39a;
  border-radius: 8px;
  color: #4c3f29;
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0 auto 1.3rem;
  max-width: 920px;
  padding: 0.85rem 1rem;
  text-align: center;
}

.paper-figure {
  margin: 1.6rem auto 0;
}

.paper-figure img {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: none;
  display: block;
  height: auto;
  margin: 0 auto;
  max-width: 100%;
  padding: clamp(0.7rem, 1.8vw, 1.15rem);
}

.hero-figure img {
  border-radius: 8px;
}

.paper-figure figcaption {
  color: var(--lme-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0.7rem auto 0;
  max-width: 900px;
  text-align: center;
}

.experience-block,
.construction-block,
.method-panel,
.viewer-panel,
.todo-panel,
.release-item {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 55, 86, 0.06);
}

.experience-block,
.construction-block {
  margin: 0 auto 1.4rem;
  max-width: 980px;
  padding: 1.2rem;
}

.experience-block h3,
.construction-block h3 {
  color: var(--lme-navy);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.experience-line {
  align-items: baseline;
  border-top: 1px solid #edf2f7;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 190px minmax(0, 1fr);
  padding: 0.68rem 0;
}

.experience-line:first-of-type {
  border-top: 0;
}

.experience-line strong {
  color: var(--lme-red);
  font-size: 0.93rem;
}

.experience-line span {
  color: #425466;
  font-size: 0.94rem;
  line-height: 1.5;
}

.construction-flow {
  margin-bottom: 0;
}

.construction-node {
  background: #fff;
}

.distribution-figure {
  max-width: 980px;
}

.method-panel h3,
.viewer-panel h3,
.todo-panel h3 {
  color: var(--lme-navy);
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.method-panel p,
.method-panel li,
.todo-panel p {
  color: #425466;
  font-size: 0.93rem;
  line-height: 1.55;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  margin-top: 1.6rem;
  overflow-x: auto;
}

.table {
  margin-bottom: 0;
}

.table th {
  color: var(--lme-navy);
  font-size: 0.88rem;
  white-space: nowrap;
}

.table td {
  font-size: 0.88rem;
  vertical-align: middle;
}

.comparison-wrap .table th,
.comparison-wrap .table td {
  font-size: 0.78rem;
}

.comparison-wrap .table td:nth-child(n+8),
.comparison-wrap .table th:nth-child(n+8) {
  text-align: center;
}

.highlight-row td {
  background: #eef6ff;
  color: var(--lme-navy);
  font-weight: 700;
}

.evaluation-flow {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  isolation: isolate;
  margin: 0 auto 1.2rem;
}

.flow-node {
  background: #f8fbff;
  border: 1px solid #c7d9eb;
  border-radius: 8px;
  color: var(--lme-navy);
  min-width: 0;
  padding: 1rem 0.8rem;
  text-align: center;
}

.flow-node span {
  align-items: center;
  background: #dcecfb;
  border-radius: 50%;
  display: inline-flex;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  margin-bottom: 0.45rem;
  width: 28px;
}

.flow-node strong,
.flow-node em {
  display: block;
}

.flow-node strong {
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.02rem;
}

.flow-node em {
  color: #486278;
  font-size: 0.8rem;
  font-style: normal;
  margin-top: 0.2rem;
}

.flow-arrow {
  align-self: center;
  align-items: center;
  color: #fff;
  display: flex;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  position: relative;
  width: 36px;
}

.flow-arrow::before {
  align-items: center;
  background: var(--lme-blue);
  border-radius: 999px;
  content: "\2192";
  display: inline-flex;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.evaluation-copy {
  max-width: 820px;
  margin: 0 auto;
}

.formula-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.9rem 0;
}

.formula-strip code {
  background: #eef6ff;
  border: 1px solid #d8e8f7;
  border-radius: 999px;
  color: #183f61;
  font-size: 0.9rem;
  padding: 0.36rem 0.62rem;
}

.method-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.method-panel {
  padding: 1.25rem;
}

.method-panel ul {
  margin-left: 1.1rem;
  margin-top: 0.75rem;
}

.method-panel li + li {
  margin-top: 0.35rem;
}

.pilot-layout {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
}

.pilot-figure {
  margin-top: 0;
}

.pilot-figure img {
  max-height: 360px;
}

.pilot-cards {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pilot-card {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  padding: 1rem;
}

.pilot-card strong {
  color: var(--lme-red);
  display: block;
  font-family: "Google Sans", "Noto Sans", sans-serif;
  font-size: 1.6rem;
}

.pilot-card span {
  color: var(--lme-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.pilot-note {
  color: #33475b;
  line-height: 1.65;
  margin: 1.15rem auto 0;
  max-width: 900px;
  text-align: center;
}

.viewer-summary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.viewer-stat {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  padding: 0.85rem;
}

.viewer-stat strong {
  color: var(--lme-navy);
  display: block;
  font-size: 1.35rem;
}

.viewer-stat span {
  color: var(--lme-muted);
  font-size: 0.82rem;
}

.viewer-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.viewer-panel {
  min-width: 0;
  overflow: hidden;
}

.viewer-panel-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--lme-line);
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 1rem;
}

.viewer-panel-header h3 {
  margin-bottom: 0;
}

.viewer-panel-header select {
  border: 1px solid var(--lme-line);
  border-radius: 6px;
  color: var(--lme-ink);
  max-width: 220px;
  padding: 0.45rem 0.55rem;
}

.viewer-toolbar {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.question-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  padding: 1rem;
}

.question-card {
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  min-height: 210px;
  padding: 1rem;
}

.viewer-card-controls {
  align-items: center;
  border-top: 1px solid var(--lme-line);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
}

.viewer-nav-button {
  background: #fff;
  border: 1px solid var(--lme-line);
  border-radius: 999px;
  color: var(--lme-navy);
  cursor: pointer;
  font-weight: 800;
  min-width: 104px;
  padding: 0.45rem 0.8rem;
}

.viewer-nav-button:hover {
  background: #eef6ff;
  border-color: #bcd5ee;
}

.viewer-nav-button:disabled {
  color: #9aa7b4;
  cursor: default;
}

.viewer-counter {
  color: var(--lme-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.viewer-empty {
  color: var(--lme-muted);
  padding: 1rem;
}

.question-meta,
.state-meta {
  color: var(--lme-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  text-transform: uppercase;
}

.meta-pill {
  background: #eef3f8;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
}

.question-card p {
  color: #33475b;
  font-size: 0.9rem;
  line-height: 1.55;
}

.question-card img {
  border: 1px solid var(--lme-line);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  display: block;
  margin-top: 0.6rem;
  max-height: 280px;
  object-fit: contain;
  padding: 0.6rem;
  width: 100%;
}

.answer-line {
  background: #f8fbff;
  border-left: 3px solid var(--lme-green);
  color: #214c3d;
  font-size: 0.86rem;
  margin-top: 0.7rem;
  padding: 0.55rem 0.65rem;
}

#trajectory-viewer {
  padding: 1rem;
}

.trajectory-shell {
  border: 1px solid var(--lme-line);
  border-radius: 8px;
  padding: 1rem;
}

.trajectory-title {
  color: var(--lme-navy);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.trajectory-state {
  border-top: 1px solid var(--lme-line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  margin-top: 0.9rem;
  padding: 0.95rem 0 0;
}

.trajectory-state img {
  border: 1px solid var(--lme-line);
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  height: auto;
  max-height: 330px;
  object-fit: contain;
  object-position: top left;
  padding: 0.6rem;
  width: 100%;
}

.state-text p {
  color: #33475b;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 0.45rem;
}

.state-text code {
  background: #f1f5f9;
  border-radius: 4px;
  color: #24425f;
  display: inline-block;
  font-size: 0.78rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 0.15rem 0.32rem;
}

.todo-panel {
  align-items: flex-start;
  display: flex;
  gap: 1.2rem;
  justify-content: space-between;
  padding: 1.2rem;
}

.todo-panel p {
  max-width: 760px;
}

.todo-badge {
  background: var(--lme-gold);
  border-radius: 999px;
  color: white;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
}

.release-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.release-item {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
}

.release-item span {
  color: var(--lme-muted);
  font-weight: 700;
}

.release-item strong {
  color: var(--lme-red);
}

.citation-block {
  background: #172533;
  border-radius: 8px;
  color: #f7fafc;
  font-size: 0.88rem;
  overflow-x: auto;
  padding: 1.2rem;
}

.footer {
  background: #f7fafc;
  border-top: 1px solid var(--lme-line);
  color: var(--lme-muted);
  padding: 2.2rem 1.5rem;
}

.toc-burger {
  align-items: center;
  background: var(--lme-navy);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(16, 55, 86, 0.34);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  height: 50px;
  justify-content: center;
  position: fixed;
  right: 20px;
  top: 20px;
  transition: transform 0.25s ease;
  width: 50px;
  z-index: 1001;
}

.toc-burger:hover {
  transform: scale(1.06);
}

.toc-burger span {
  background: #fff;
  border-radius: 2px;
  display: block;
  height: 3px;
  transition: all 0.25s ease;
  width: 24px;
}

.toc-burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.toc-burger.active span:nth-child(2) {
  opacity: 0;
}

.toc-burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.toc-wrapper {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.14);
  height: 100vh;
  overflow-y: auto;
  position: fixed;
  right: -320px;
  top: 0;
  transition: right 0.25s ease;
  width: 320px;
  z-index: 1000;
}

.toc-wrapper.active {
  right: 0;
}

.toc-header {
  align-items: center;
  background: var(--lme-navy);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  position: sticky;
  top: 0;
}

.toc-header h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

.toc-close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 1.8rem;
  height: 36px;
  justify-content: center;
  line-height: 1;
  width: 36px;
}

.toc-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

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

.toc-list a {
  border-radius: 8px;
  color: #33475b;
  display: block;
  font-weight: 700;
  padding: 0.75rem 0.85rem;
}

.toc-list a:hover {
  background: #e8f1fb;
  color: var(--lme-blue);
}

.toc-overlay {
  background: rgba(15, 23, 32, 0.28);
  backdrop-filter: blur(3px);
  height: 100%;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  transition: opacity 0.25s ease;
  width: 100%;
  z-index: 999;
}

.toc-overlay.active {
  opacity: 1;
  pointer-events: all;
}

@media screen and (max-width: 760px) {
  .project-hero .hero-body {
    padding: 4.2rem 1rem 2.4rem;
  }

  .publication-title {
    font-size: 1.65rem;
  }

  .stat-strip,
  .viewer-summary,
  .release-grid {
    grid-template-columns: 1fr;
  }

  .experience-line,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-flow,
  .pilot-layout,
  .pilot-cards,
  .question-list {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    display: none;
  }

  .todo-panel {
    display: block;
  }

  .viewer-card-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .viewer-nav-button {
    width: 100%;
  }

  .trajectory-state {
    grid-template-columns: 1fr;
  }

  .trajectory-state img {
    height: auto;
    max-height: 260px;
    width: 100%;
  }

  .viewer-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .viewer-panel-header select {
    max-width: none;
    width: 100%;
  }

  .toc-wrapper {
    right: -86vw;
    width: 86vw;
  }

  .toc-burger {
    height: 46px;
    right: 14px;
    top: 14px;
    width: 46px;
  }
}
