:root {
  --ink: #17202a;
  --muted: #617083;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --line: #d9e0e7;
  --navy: #0e1116;
  --navy-2: #182232;
  --teal: #00a693;
  --teal-dark: #00796d;
  --amber: #d9961f;
  --coral: #d6544d;
  --blue: #2d6cdf;
  --violet: #6957d5;
  --code: #111827;
  --ok: #1e8a5a;
  --warn: #c07b13;
  --danger: #c83f3a;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--paper);
}

.reveal.premai-deck {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.reveal.premai-deck .slides {
  display: grid;
  place-items: center;
}

/* 打印模式（?print-pdf）下中和上方的居中布局：残留的 place-items 会让
   .pdf-page 宽度塌缩为 0，导致整份导出为空白页 */
html.reveal-print .reveal.premai-deck .slides {
  place-items: normal;
}

.reveal.premai-deck h1,
.reveal.premai-deck h2,
.reveal.premai-deck h3 {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.05;
  text-transform: none;
}

.reveal.premai-deck h1 {
  font-size: 3.3rem;
  font-weight: 820;
  margin: 0 0 1.1rem;
}

.reveal.premai-deck h2 {
  font-size: 2.28rem;
  font-weight: 780;
  margin: 0 0 0.9rem;
}

.reveal.premai-deck h3 {
  font-size: 1.05rem;
  font-weight: 760;
  margin: 0 0 0.45rem;
}

.reveal.premai-deck p,
.reveal.premai-deck li,
.reveal.premai-deck span {
  font-size: 1.0rem;
  line-height: 1.38;
}

.reveal.premai-deck section {
  padding: 0.72rem 1.05rem;
}

.reveal.premai-deck ul {
  margin: 0.4rem 0 0;
}

.reveal.premai-deck li {
  margin: 0.34rem 0;
}

.reveal.premai-deck pre {
  width: 100%;
  margin: 0;
  box-shadow: none;
  border-radius: 8px;
  overflow: hidden;
}

.reveal.premai-deck code {
  font-size: 0.78rem;
  line-height: 1.3;
}

.reveal.premai-deck pre code {
  display: block;
  max-height: none;
  overflow-x: auto;
  padding: 0.66rem 0.72rem;
}

.reveal.premai-deck .demo-step,
.reveal.premai-deck .technical-slide,
.reveal.premai-deck .code-heavy {
  padding-bottom: 0.45rem;
  padding-top: 0.45rem;
}

.reveal.premai-deck .demo-step h2,
.reveal.premai-deck .technical-slide h2,
.reveal.premai-deck .code-heavy h2 {
  margin-bottom: 0.62rem;
}

.reveal.premai-deck .demo-step .eyebrow,
.reveal.premai-deck .technical-slide .eyebrow,
.reveal.premai-deck .code-heavy .eyebrow {
  margin-bottom: 0.32rem;
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 0.48rem !important;
  font-weight: 760;
  letter-spacing: 0 !important;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

.hero-slide,
.closing-slide {
  color: #f7f4ee;
}

.reveal.premai-deck .hero-slide .hero-copy h1,
.reveal.premai-deck .closing-slide h2,
.reveal.premai-deck .closing-slide h3 {
  color: #f7f4ee;
}

.hero-slide .eyebrow,
.closing-slide .eyebrow {
  color: #69d7ca;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.3rem;
  min-height: 560px;
  align-items: center;
}

.hero-subtitle {
  color: #c5d0dc;
  font-size: 0.9rem !important;
  max-width: 760px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.hero-metrics div,
.panel,
.callout,
.command-card,
.expected-output,
.evidence-snippet,
.review-result,
.recommendation,
.metrics-board,
.live-plan > div,
.roadmap div,
.table-box,
.finding-card {
  border-radius: 8px;
}

.hero-metrics div {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.65rem;
}

.hero-metrics strong {
  color: #ffffff;
  display: block;
  font-size: 1.28rem;
  line-height: 1.05;
}

.hero-metrics span {
  color: #aeb9c7;
  display: block;
  font-size: 0.48rem;
  margin-top: 0.25rem;
}

.hero-visual {
  min-height: 500px;
  position: relative;
}

.document-stack {
  position: absolute;
  right: 1.2rem;
  top: 0.5rem;
  width: 360px;
  height: 400px;
}

.document-stack img {
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.28);
  position: absolute;
  width: 210px;
}

.document-stack img:nth-child(1) {
  left: 0;
  top: 0;
  transform: rotate(-8deg);
}

.document-stack img:nth-child(2) {
  left: 80px;
  top: 42px;
  transform: rotate(4deg);
}

.document-stack img:nth-child(3) {
  left: 150px;
  top: 92px;
  transform: rotate(11deg);
}

.signal-line {
  animation: signalPulse 2.6s ease-in-out infinite;
  background: linear-gradient(90deg, rgba(0, 166, 147, 0), #00a693, #d9961f, rgba(217, 150, 31, 0));
  border-radius: 999px;
  height: 6px;
  left: 1.2rem;
  position: absolute;
  top: 350px;
  width: 480px;
}

.floating {
  animation: floatCard 3.2s ease-in-out infinite;
  bottom: 0.4rem;
  position: absolute;
  right: 0.3rem;
  width: 390px;
}

.hero-slide .finding-card h3 {
  color: var(--ink);
}

.hero-slide .finding-card p {
  color: var(--muted);
}

@keyframes signalPulse {
  0% {
    opacity: 0.35;
    transform: scaleX(0.75);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    opacity: 0.35;
    transform: scaleX(0.75);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.timeline {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(5, 1fr);
  margin: 1.1rem 0;
}

.timeline div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  min-height: 120px;
  padding: 0.65rem;
}

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

.timeline span {
  color: var(--muted);
  display: block;
  font-size: 0.56rem;
  margin-top: 0.35rem;
}

.callout {
  background: #eef8f6;
  border: 1px solid #bce6df;
  color: #164a45;
  padding: 0.75rem 0.85rem;
}

.callout.slim {
  margin-top: 0.8rem;
}

.three-col {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, 1fr);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 230px;
  padding: 0.8rem;
}

.panel.highlight {
  border-top: 5px solid var(--amber);
}

.panel p {
  color: var(--muted);
}

.panel-icon {
  background: var(--navy);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.42rem !important;
  font-weight: 820;
  height: 34px;
  margin-bottom: 0.7rem;
  place-content: center;
  align-items: center;
  width: 34px;
}

.slide-claim {
  border-left: 5px solid var(--teal);
  color: var(--ink);
  font-size: 0.78rem !important;
  font-weight: 660;
  margin: 0.72rem 0 0;
  padding-left: 0.65rem;
}

.code-heavy .slide-claim,
.demo-step .slide-claim,
.technical-slide .slide-claim {
  margin-top: 0.48rem;
}

.value-map {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr 70px 1.3fr 70px 1fr;
  margin: 1rem 0 1.2rem;
}

.value-node {
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 760;
  min-height: 150px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column; /* Ensures content stacks if there are multiple lines */
  justify-content: center; /* Vertically centers the content */
  align-items: center;     /* Horizontally centers the content */
  text-align: center;      /* Centers the text lines */
}

.value-node span {
  display: block;
  font-size: 0.52rem;
  font-weight: 540;
  margin-top: 0.5rem;
}

.value-node.input {
  background: var(--blue);
}

.value-node.engine {
  background: var(--navy);
}

.value-node.output {
  background: var(--teal-dark);
}

.value-arrow {
  background: var(--amber);
  height: 5px;
  position: relative;
}

.value-arrow::after {
  border-bottom: 9px solid transparent;
  border-left: 12px solid var(--amber);
  border-top: 9px solid transparent;
  content: "";
  position: absolute;
  right: -8px;
  top: -6px;
}

.two-col {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 1fr 1fr;
}

.two-col.compact {
  gap: 0.85rem;
}

.doc-showcase {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, 1fr);
}

.doc-showcase figure {
  margin: 0;
}

.doc-showcase img {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(23, 32, 42, 0.16);
  display: block;
  height: 360px;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.doc-showcase figcaption {
  color: var(--muted);
  font-size: 0.54rem;
  margin-top: 0.4rem;
  text-align: center;
}

.evidence-snippet,
.expected-output,
.command-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.52rem;
  position: relative;
}

.label,
.command-title {
  color: var(--muted);
  display: block;
  font-size: 0.5rem !important;
  font-weight: 760;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.command-title {
  min-height: 0.72rem;
  padding-right: 3.2rem;
}

.flow-lane {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 0.65rem;
}

.flow-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 136px;
  padding: 0.58rem;
  transition: transform 400ms ease, border-color 400ms ease;
}

.flow-step.active,
.flow-step:hover {
  border-color: var(--teal);
  transform: translateY(-8px);
}

.flow-step span {
  background: var(--navy);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.45rem !important;
  font-weight: 820;
  height: 32px;
  margin-bottom: 0.55rem;
  place-content: center;
  align-items: center;
  width: 32px;
}

.flow-step strong {
  display: block;
  font-size: 0.88rem;
}

.flow-step small {
  color: var(--muted);
  display: block;
  font-size: 0.5rem;
  margin-top: 0.35rem;
}

.progress-strip {
  background: #dfe8ed;
  border-radius: 999px;
  height: 8px;
  margin-top: 0.65rem;
  overflow: hidden;
}

.progress-dot {
  animation: flowProgress 5s ease-in-out infinite;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--coral));
  border-radius: 999px;
  height: 100%;
  width: 28%;
}

@keyframes flowProgress {
  0% {
    transform: translateX(-20%);
  }
  50% {
    transform: translateX(260%);
  }
  100% {
    transform: translateX(-20%);
  }
}

.command-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, 1fr);
}

.command-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.command-card.dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.command-card.dark .command-title {
  color: #c5d0dc;
}

.copy-btn {
  align-items: center;
  background: var(--teal-dark);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.46rem;
  font-weight: 760;
  gap: 0.25rem;
  justify-content: center;
  min-height: 20px;
  padding: 0.22rem 0.45rem;
  position: absolute;
  right: 15px;
  top: 30px;
  transition: background 180ms ease, transform 180ms ease;
}

.copy-btn:hover {
  background: var(--navy);
  transform: translateY(-1px);
}

.copy-btn.copied {
  background: var(--ok);
}

.io-demo {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: 1fr 1fr;
}

.animated-terminal {
  background: var(--code);
  border: 1px solid #2d3748;
  border-radius: 8px;
  color: white;
  padding: 0.52rem;
}

.reveal.premai-deck .command-card pre code,
.reveal.premai-deck .expected-output pre code,
.reveal.premai-deck .evidence-snippet pre code,
.reveal.premai-deck .animated-terminal pre code {
  font-size: 0.9rem;
  line-height: 1.28;
  padding: 0.6rem 0.68rem;
}

.review-result {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.62rem;
}

.meter-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 0.34rem 0;
}

.meter-row span {
  color: var(--muted);
}

.meter-row strong {
  color: var(--ok);
  font-size: 1rem;
}

.meter-row.warning strong {
  color: var(--warn);
}

.meter-row.danger strong {
  color: var(--danger);
}

.finding-layout {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1.25fr 0.75fr;
}

.finding-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(23, 32, 42, 0.14);
  padding: 0.62rem;
}

.finding-card.large {
  min-height: 280px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.42rem !important;
  font-weight: 820;
  margin-bottom: 0.55rem;
  padding: 0.18rem 0.45rem;
  text-transform: uppercase;
}

.status-pill.fail {
  background: #ffe2df;
  color: var(--danger);
}

.mini-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.8rem;
}

.mini-grid div {
  background: #f4f7fa;
  border-radius: 8px;
  padding: 0.5rem;
}

.mini-grid strong,
.mini-grid span {
  display: block;
  font-size: 0.48rem;
}

.mini-grid span {
  color: var(--muted);
  margin-top: 0.2rem;
}

.recommendation {
  background: #fff7e7;
  border: 1px solid #f0cf8b;
  padding: 0.62rem;
}

.architecture-map {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto auto;
}

.arch-surface,
.arch-core,
.arch-store,
.arch-model {
  border-radius: 8px;
  color: white;
  font-size: 0.8rem;
  font-weight: 760;
  min-height: 82px;
  padding: 0.58rem;
  text-align: center;
}

.arch-surface {
  background: var(--blue);
  grid-column: span 2;
}

.arch-core {
  background: var(--navy);
  grid-column: 1 / span 6;
  min-height: 104px;
}

.arch-store {
  background: var(--teal-dark);
  grid-column: 1 / span 3;
}

.arch-model {
  background: var(--amber);
  grid-column: 4 / span 3;
}

.arch-surface span,
.arch-model span {
  display: block;
  font-size: 0.48rem;
  font-weight: 520;
  margin-top: 0.28rem;
}

.schema-map {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 0.48rem;
}

.table-box {
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 760;
  min-height: 78px;
  padding: 0.5rem;
  text-align: center;
}

.table-box.accent {
  border-top: 5px solid var(--teal);
}

.table-box span {
  color: var(--muted);
  display: block;
  font-size: 0.45rem;
  margin-top: 0.3rem;
}

.code-window {
  border: 1px solid #202a38;
}

.reveal.premai-deck .code-window code {
  font-size: 0.96rem;
  line-height: 1.28;
  padding: 0.72rem 0.85rem;
}

.metrics-board {
  background: var(--navy);
  color: white;
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.62rem;
}

.metrics-board strong {
  display: block;
  font-size: 1.25rem;
}

.metrics-board span {
  color: #c5d0dc;
  display: block;
  font-size: 0.48rem;
  margin-top: 0.25rem;
}

.live-plan {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr 1fr;
}

.live-plan > div {
  background: var(--panel);
  border: 1px solid var(--line);
  min-height: 210px;
  padding: 0.62rem;
}

.roadmap {
  display: grid;
  gap: 0.55rem;
}

.roadmap div {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 70px 1fr;
  min-height: 76px;
  padding: 0.45rem 0.7rem;
}

.roadmap strong {
  align-items: center;
  background: var(--navy);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 0.72rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.roadmap span {
  color: var(--ink);
  font-size: 0.64rem;
}

.closing-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 0.8fr;
  margin-top: 1.4rem;
}

.closing-grid p {
  color: #c5d0dc;
  font-size: 0.85rem !important;
}

.reveal .progress {
  color: var(--teal);
}

.fallback-active .reveal .slides > section {
  display: none;
}

.fallback-active .reveal .slides > section.current-slide {
  display: block;
}

.fallback-nav {
  align-items: center;
  bottom: 18px;
  display: flex;
  gap: 8px;
  position: fixed;
  right: 20px;
  z-index: 20;
}

.fallback-nav button {
  background: var(--navy);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font: 600 14px Inter, sans-serif;
  padding: 8px 12px;
}

@media print {
  .copy-btn,
  .fallback-nav {
    display: none !important;
  }
}

.reveal .report-link {
  color: #888 !important;
  font-size: 16px !important;  /* Fixed small size */
  text-decoration: none !important; /* Removes the underline */
}

.reveal .report-link:hover {
  color: #555 !important;
  text-decoration: none !important;
}

.architecture-map > div {
  display: flex;
  flex-direction: column; /* Stacks text vertically if there are multiple lines */
  justify-content: center; /* Centers content vertically */
  align-items: center;     /* Centers content horizontally */
  text-align: center;      /* Ensures individual text lines are centered */
}
