:root {
  --paper: #ffffff;
  --wash: #f2f7f3;
  --hero-wash: #f7faf6;
  --ink: #17211f;
  --muted: rgba(23, 33, 31, 0.64);
  --soft: rgba(23, 33, 31, 0.1);
  --line: #d8e5dd;
  --primary: #176b4d;
  --primary-soft: #e6f3ed;
  --accent: #c4573b;
  --accent-soft: #fff0eb;
  --teal: #0f766e;
  --amber: #a16207;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(23, 107, 77, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 78px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Manrope, "Inter", "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

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

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
  padding: 0 max(20px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.meta-row,
.hero-actions,
.footer-layout {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav-links {
  gap: 4px;
}

.nav-links a {
  border-radius: 999px;
  padding: 9px 13px;
  color: rgba(23, 33, 31, 0.64);
  font-size: 0.82rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px 0;
  background: var(--primary);
}

.hero {
  padding: 104px 0 44px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 240, 235, 0.75), transparent 34%),
    var(--hero-wash);
}

.paper-grid {
  background-image:
    linear-gradient(rgba(23, 107, 77, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 87, 59, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
}

.hero-layout {
  display: block;
  max-width: 920px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin-bottom: 18px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 820px;
  font-size: 4.1rem;
}

h2 {
  font-size: 2.75rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.subtitle,
.section-intro p,
.paper-summary,
.process-grid p,
.case-main p,
.case-steps,
.result-layout p,
.artifact-grid p,
.video-note,
.footer {
  color: var(--muted);
  line-height: 1.7;
}

.subtitle {
  max-width: 690px;
  font-size: 1.08rem;
}

.meta-row {
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 12px;
  color: rgba(23, 33, 31, 0.62);
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--primary);
}

.section {
  padding: 76px 0;
}

.section-tinted {
  border-block: 1px solid var(--line);
  background: var(--wash);
}

.split-heading,
.demo-layout,
.case-layout,
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.split-heading > *,
.demo-layout > *,
.case-layout > *,
.result-layout > * {
  min-width: 0;
}

.section-intro.narrow {
  max-width: 790px;
}

.paper-summary {
  display: grid;
  gap: 18px;
  font-size: 1rem;
}

.paper-summary p {
  margin: 0;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.metric-strip div {
  min-height: 132px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip strong {
  display: block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.method-frame,
.video-panel,
.paper-preview,
.quality-figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.method-frame {
  overflow: auto;
  margin-top: 34px;
  padding: 16px;
}

.method-frame img {
  min-width: 880px;
}

.process-grid,
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.process-grid article,
.artifact-grid article,
.artifact-grid a {
  min-height: 220px;
  background: #fff;
  padding: 24px;
}

.process-grid span,
.artifact-grid span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--accent);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.demo-layout {
  align-items: center;
}

.video-panel {
  overflow: hidden;
  background: #0d1411;
}

.demo-video {
  display: block;
  width: 100%;
  aspect-ratio: 1920 / 1254;
  background: #0d1411;
}

.case-header {
  max-width: 870px;
}

.case-header p,
.case-claim p,
.case-table,
.case-takeaway p {
  color: var(--muted);
  line-height: 1.7;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.case-metrics div {
  min-height: 128px;
  background: #fff;
  padding: 22px;
}

.case-metrics strong {
  display: block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.case-metrics span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.case-comparison {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  margin-top: 24px;
}

.case-panel,
.case-table-wrap,
.case-takeaway {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.case-panel {
  overflow: hidden;
}

.case-claim {
  padding: 24px;
}

.case-claim > span {
  display: inline-block;
  border-radius: 999px;
  background: var(--primary-soft);
  padding: 5px 10px;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 850;
}

.case-claim p {
  margin: 18px 0;
}

.case-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.case-facts div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 11px 0;
}

.case-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
}

.case-facts dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.case-code {
  background: #0e1e18;
  color: #d8efe6;
}

.case-code-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a1712;
  padding: 12px 14px;
  color: #9bd4bd;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 800;
}

.case-code pre {
  margin: 0;
  overflow: auto;
}

.case-code code {
  display: block;
  min-width: 720px;
  padding: 16px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
}

.case-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
  box-shadow: none;
}

.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.case-table th,
.case-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.case-table th {
  background: #f8fbf9;
  color: rgba(23, 33, 31, 0.72);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-table tr:last-child td {
  border-bottom: 0;
}

.case-table td > strong + span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill.ok {
  background: var(--primary-soft);
  color: var(--primary);
}

.status-pill.bad {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.warn {
  background: #fff5dd;
  color: var(--amber);
}

.status-pill.neutral {
  background: #e8f0f7;
  color: #285d86;
}

.case-takeaway {
  display: grid;
  grid-template-columns: minmax(0, 0.22fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding: 20px;
  box-shadow: none;
}

.case-takeaway strong {
  color: var(--teal);
}

.case-takeaway p {
  margin: 0;
}

.result-layout {
  align-items: center;
}

.evaluation-detail {
  margin-top: 28px;
}

.result-callout {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  border-left: 3px solid var(--teal);
  background: #edf8f3;
  padding: 18px;
}

.result-callout strong {
  color: var(--teal);
}

.quality-figure {
  overflow: hidden;
  padding: 16px;
}

.artifact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.artifact-grid article {
  min-height: 190px;
}

.artifact-grid a {
  min-height: 190px;
  transition: color 160ms ease, transform 160ms ease;
}

.artifact-grid a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.operation-catalog {
  margin-top: 24px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.operation-catalog summary {
  padding: 16px 0;
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

.operation-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 22px;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

.operation-groups h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.operation-groups ul {
  margin: 0;
  padding: 0;
  columns: 15rem;
  list-style: none;
}

.operation-groups li {
  padding: 3px 0;
  break-inside: avoid;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0;
  font-size: 0.86rem;
}

.footer-layout {
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 980px) {
  .hero-layout,
  .split-heading,
  .demo-layout,
  .case-layout,
  .result-layout,
  .metric-strip,
  .process-grid,
  .case-metrics,
  .case-comparison,
  .case-takeaway {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: 30px;
  }

  h1 {
    font-size: 3.35rem;
  }

  h2 {
    font-size: 2.28rem;
  }

  .metric-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-strip div:last-child {
    border-bottom: 0;
  }

  .artifact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 16px;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    border-radius: 6px;
  }

  .page-shell {
    width: min(100% - 28px, 1120px);
  }

  .hero {
    padding-top: 96px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 2rem;
  }

  .section {
    padding: 56px 0;
  }

  .artifact-grid {
    grid-template-columns: 1fr;
  }

  .method-frame img {
    min-width: 0;
  }

  .case-takeaway {
    align-items: start;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .case-table,
  .case-table thead,
  .case-table tbody,
  .case-table tr,
  .case-table th,
  .case-table td {
    display: block;
    width: 100%;
  }

  .case-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .case-table tr {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }

  .case-table tr:last-child {
    border-bottom: 0;
  }

  .case-table td {
    display: grid;
    grid-template-columns: minmax(105px, 0.38fr) minmax(0, 0.62fr);
    gap: 12px;
    border-bottom: 0;
    padding: 8px 0;
    overflow-wrap: anywhere;
  }

  .case-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .case-code code {
    min-width: 620px;
  }

  .status-pill {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
