/* SlicerDSpace project site. Static CSS, self-hosted fonts, no external requests. */

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/InterTight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #06080b;
  --bg-2: #0a0e13;
  --panel: #0e131a;
  --line: rgba(236, 232, 223, .09);
  --line-2: rgba(236, 232, 223, .16);
  --text: #ece8df;
  --muted: #9ba5b0;
  --red: #ff5a52;
  --green: #46d38a;
  --blue: #5b8cff;
  --orange: #f0913f;
  --ivory: #efe6d2;
  --csf: #4d86e8;
  --radius: 14px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --tri: linear-gradient(90deg, var(--red), var(--green), var(--blue));
  --f-head: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Two fixed soft glows: blue upper left, faint green lower right. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 50vmax at 8% -6%, rgba(91, 140, 255, .10), transparent 62%),
    radial-gradient(55vmax 45vmax at 96% 104%, rgba(70, 211, 138, .06), transparent 62%);
}

img, video { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.2vw, 84px); line-height: 1.02; letter-spacing: -.03em; }
h2 { font-size: clamp(30px, 3.8vw, 52px); line-height: 1.08; letter-spacing: -.03em; }
h3, h4 { font-size: 20px; line-height: 1.25; letter-spacing: -.02em; }

p { margin: 0 0 1em; }
a { color: var(--text); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--blue); }

code, pre, kbd { font-family: var(--f-mono); }
code { font-size: .88em; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.small { font-size: 14.5px; }

/* ---------- Chips and eyebrows ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 3px 9px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
}
.chip-name { color: var(--text); font-weight: 500; }
.chip-q { color: var(--muted); }

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin-bottom: 14px;
  background: var(--tri);
  opacity: .7;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(6, 8, 11, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--tri);
  opacity: .7;
}
.header-inner {
  position: relative;
  max-width: calc(var(--max) + 2 * var(--gutter));
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav li a {
  display: block;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.site-nav li a:hover,
.site-nav li a[aria-current="true"] { color: var(--text); }

.language-switch {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #b8c4c1;
  font: 650 13px/1.2 var(--f-body);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.lang-btn:hover:not(.is-active) { background: rgba(255, 255, 255, .09); color: #fff; }
.lang-btn.is-active { background: #f0f8f4; color: #10221a; box-shadow: 0 1px 6px rgba(0, 0, 0, .14); }
@media (max-width: 480px) {
  .language-switch { gap: 1px; padding: 3px; }
  .lang-btn { min-height: 32px; padding: 0 8px; font-size: 12px; }
}
html[lang="zh-CN"] { --f-head: "Inter Tight", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; --f-body: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
html[lang="zh-CN"] h2 { line-height: 1.25; letter-spacing: 0; }

.menu-btn {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  cursor: pointer;
}
.menu-btn:hover { border-color: var(--muted); }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .site-nav li a { padding: 6px 7px; font-size: 14px; }
  .site-nav { gap: 12px; }
  .header-inner { gap: 16px; }
}

@media (max-width: 1023px) {
  .js .menu-btn { display: inline-flex; margin-left: auto; margin-right: 136px; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-2);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .js .site-nav.open { display: flex; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav li a {
    padding: 14px 4px;
    font-size: 17px;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }

  /* Without JS: the header grows and the links wrap. */
  html:not(.js) .site-header { height: auto; position: relative; }
  html:not(.js) .header-inner { flex-wrap: wrap; padding-top: 12px; padding-bottom: 14px; }
  html:not(.js) .language-switch { position: static; transform: none; margin-left: auto; order: -1; }
  html:not(.js) .site-nav { flex-basis: 100%; flex-wrap: wrap; justify-content: center; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .js .menu-btn { margin-right: 112px; }
}

/* ---------- Sections ---------- */
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
#skills { scroll-margin-top: calc(var(--header-h) + 24px); }

.section {
  padding: clamp(44px, 5.5vw, 76px) 0;
  border-top: 1px solid var(--line);
}
.section-alt { background: var(--bg-2); }
.section h2 { max-width: 20em; margin-bottom: 22px; }
.intro {
  max-width: 44em;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 28px;
}
.note {
  max-width: 52em;
  margin: 28px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* Reveal: the hidden state exists only when JS runs. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(20px, 3vw, 32px); text-align: center; }
.hero h1 { max-width: 14em; }
.hero h1.product-title {
  font-size: clamp(34px, 7vw, 86px);
  line-height: 1.05;
  letter-spacing: -.045em;
  margin-inline: auto;
}
.product-wordmark {
  display: block;
  width: min(100%, 800px);
  height: auto;
  margin-inline: auto;
}
.hero .btn-row { justify-content: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  font-family: var(--f-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; }
.btn-secondary { background: rgba(236, 232, 223, .04); color: var(--text); }
.btn-secondary:hover { border-color: var(--muted); background: rgba(236, 232, 223, .08); }
.status-line {
  margin: 22px 0 0;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Film ---------- */
.film-section { border-top: 0; padding-top: clamp(12px, 2vw, 24px); }
.film-wrap { position: relative; isolation: isolate; }
.film-wrap::before {
  content: "";
  position: absolute;
  inset: 4% 3% -3% 3%;
  z-index: -1;
  background: var(--tri);
  filter: blur(70px);
  opacity: .22;
  border-radius: 40px;
}
.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border: 0;
  border-radius: 0;
}
.film-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.film-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0;
  border: 0;
  background: linear-gradient(rgba(6, 8, 11, .12), rgba(6, 8, 11, .5));
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 13px;
  cursor: pointer;
  transition: background .25s, opacity .25s;
}
.film-play[hidden] { display: none; }
.film-play:hover { background: linear-gradient(rgba(6, 8, 11, .05), rgba(6, 8, 11, .38)); }
.film-play:focus-visible { outline-offset: -4px; }
.film-play .play-circle {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(236, 232, 223, .12);
  border: 1px solid rgba(236, 232, 223, .38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 60px rgba(91, 140, 255, .25);
  transition: transform .25s, background .25s;
}
.film-play:hover .play-circle { transform: scale(1.06); background: rgba(236, 232, 223, .2); }
.film-play .play-circle svg { margin-left: 5px; }
.film-play .play-label {
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(6, 8, 11, .6);
  letter-spacing: .02em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 20px 0 0;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}
.meta-row a { color: var(--text); }
.meta-row .source-link { display: inline-flex; align-items: center; gap: 7px; }
.source-link svg { flex-shrink: 0; }

.transcript {
  margin-top: 28px;
  max-width: 52em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.transcript summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 20px;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius);
}
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s;
}
.transcript[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.transcript ol {
  margin: 0;
  padding: 4px 20px 20px 44px;
  color: var(--text);
}
.transcript li { padding: 3px 0 3px 6px; }
.transcript li::marker { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }

/* ---------- Idea ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split > * { min-width: 0; }
.split-text h2 { margin-bottom: 24px; }
.split-text p { max-width: 36em; }
.split-media { margin: 56px 0 0; }
.split-media img {
  width: 100%;
  border-radius: 0;
  border: 0;
}
figcaption {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.input-card { padding: 20px 22px 6px; margin: 28px 0; }
.card-title {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.code-block, .code pre {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  tab-size: 2;
}
.code-block code, .code pre code { font-size: inherit; }
.input-card .code-block { padding-bottom: 14px; }
.caption { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }

/* ---------- Outputs ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(24px, 3vw, 44px);
}
.tile {
  position: relative;
  min-width: 0;
  padding-bottom: 28px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.tile::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M0 9C65 9 90 3 150 3S235 9 300 9' fill='none' stroke='%239aa9b8' stroke-opacity='.3' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 14px no-repeat;
}
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #05070a; border: 0; border-radius: 0; }
.tile-wmql img { object-fit: contain; background: #0a0d12; }
.tile-body { padding: 18px 0 0; }
.tile-body .chip { margin-bottom: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 11.5px; }
.tile-body h3 { margin-bottom: 8px; font-size: 19px; }
.tile-body p:last-child { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.gallery + .note { margin-top: 28px; }

/* ---------- Workflows ---------- */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.wf-card {
  min-width: 0;
  padding: 22px 20px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
}
.wf-card::before {
  content: "";
  position: absolute;
  left: 20px; top: 0;
  width: 36px; height: 2px;
  background: var(--tri);
  opacity: .7;
}
.wf-num {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}
.wf-card h3 { margin-bottom: 18px; font-size: 19px; }
.wf-card dl { margin: 0; }
.wf-card dt {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.wf-card dt:first-child { margin-top: 0; }
.wf-card dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }

.note-row {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.note-row li {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.5;
}
.n-icon {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1px solid currentColor;
  position: relative;
}
.n-icon::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: currentColor;
}
.n-red .n-icon { color: var(--red); }
.n-green .n-icon { color: var(--green); }
.n-blue .n-icon { color: var(--blue); }

/* ---------- In Slicer ---------- */
.shot { margin: 8px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.shot + .shot { margin-top: 24px; }
.shot img {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.shot figcaption { margin: 14px 0 0; max-width: 60em; }
.slicer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 36px;
}
.slicer-grid > * { min-width: 0; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 48px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
}
.side-note { padding: 22px 22px 8px; }
.side-note p { font-size: 15.5px; }
.side-note code { color: var(--ivory); }

.code {
  margin: 0 0 16px;
  background: #080b10;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 36px;
}
.code pre { padding: 14px; }
.copy {
  padding: 4px 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  cursor: pointer;
}
.copy[hidden] { display: none; }
.copy:hover { border-color: var(--muted); }

/* ---------- Status ---------- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.status-col { padding: 26px 24px 14px; border-top-width: 3px; min-width: 0; }
.status-col h3 { margin-bottom: 16px; }
.status-col ul { margin: 0; padding: 0; list-style: none; }
.status-col li {
  position: relative;
  padding: 0 0 14px 18px;
  font-size: 15.5px;
  line-height: 1.55;
}
.status-col li::before {
  content: "";
  position: absolute;
  left: 0; top: .6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.s-green { border-top-color: var(--green); }
.s-green li::before { color: var(--green); }
.s-orange { border-top-color: var(--orange); }
.s-orange li::before { color: var(--orange); }
.s-blue { border-top-color: var(--blue); }
.s-blue li::before { color: var(--blue); }

.origins { max-width: 52em; margin-top: 32px; }
.origins p { margin-bottom: 14px; }
.link-arrow { font-weight: 500; }
.link-arrow::after { content: " ›"; color: var(--muted); }

.callout {
  margin: 28px 0 0;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 36px);
  font-family: var(--f-head);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: -.02em;
  font-weight: 500;
  border-left: 3px solid var(--orange);
}
.callout-info {
  margin: 0 0 32px;
  font-family: var(--f-body);
  font-size: 17px;
  letter-spacing: 0;
  font-weight: 400;
  line-height: 1.55;
  border-left-color: var(--blue);
}

/* ---------- Agent Skills ---------- */
.start-skills { padding-bottom: 36px; }
.skill-prompt { max-width: 54em; }
.skill-prompt pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-steps .doc-links { margin-top: 20px; margin-bottom: 4px; }

/* ---------- Get started ---------- */
.start-route-title {
  --route-accent: #a9bfd0;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 0 0 30px;
  font-family: var(--f-head);
  font-size: clamp(26px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--ivory);
}
.start-route-marker {
  flex: 0 0 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--route-accent) 50%, transparent);
  background: color-mix(in srgb, var(--route-accent) 8%, transparent);
  color: var(--route-accent);
  font-family: var(--f-mono);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}
.start-route-label { min-width: 0; }
.start-recommended {
  display: inline-block;
  color: var(--route-accent);
  font-family: var(--f-body);
  font-size: .56em;
  font-weight: 500;
  letter-spacing: 0;
  vertical-align: .12em;
}
.start-manual-title { padding-top: 32px; border-top: 1px solid var(--line-2); }
.start-steps {
  list-style: none;
  counter-reset: start;
  margin: 0;
  padding: 0;
  max-width: 54em;
}
.start-step {
  counter-increment: start;
  position: relative;
  padding: 0 0 24px 64px;
}
.start-step::before {
  content: counter(start);
  position: absolute;
  left: 0; top: -2px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font-family: var(--f-mono);
  font-size: 15px;
  color: var(--text);
  background: var(--panel);
}
.start-step::after {
  content: "";
  position: absolute;
  left: 20px; top: 46px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.start-step:last-child::after { display: none; }
.start-body { min-width: 0; }
.start-body h4 { margin: 4px 0 10px; font-size: 22px; }
.start-body p { max-width: 42em; }
.start-body code { color: var(--ivory); overflow-wrap: anywhere; }
.start-cli { max-width: 54em; margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--line-2); }
.start-body > .code-block { margin: 14px 0; padding: 16px; background: #080b10; border: 1px solid var(--line); border-radius: 8px; }
.doc-links {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.doc-links .btn { font-family: var(--f-mono); font-weight: 500; font-size: 13.5px; padding: 10px 16px; letter-spacing: 0; }

/* ---------- Cite ---------- */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.paper { padding: 24px 24px 12px; min-width: 0; display: flex; flex-direction: column; }
.paper .chip { align-self: flex-start; margin-bottom: 16px; }
.paper h3 { font-size: 19px; line-height: 1.3; margin-bottom: 14px; text-wrap: pretty; }
.paper .authors { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.paper .venue { font-size: 15px; margin-bottom: 10px; }
.paper p:last-child { margin-top: auto; padding-top: 6px; }
.doi { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: clamp(48px, 6vw, 80px) 0 28px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--tri);
  opacity: .7;
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}
.foot-identity { min-width: 0; }
.foot-identity > p { margin-top: 22px; max-width: 26em; font-size: 14px; line-height: 1.7; text-wrap: pretty; }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); padding-top: 4px; }
.foot-nav > div { min-width: 0; }
.foot-nav ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.foot-nav a { display: inline-block; padding: 2px 0; color: var(--text); }
.foot-nav a:hover, .foot-links a:hover, .foot-top-link:hover { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 5px; }
.foot-brand {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.foot-brand img { display: block; width: clamp(240px, 24vw, 320px); max-width: 100%; height: auto; }
.foot-title {
  margin: 0 0 20px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); }
.foot-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 16px 36px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--f-body);
  font-size: 12px;
  line-height: 1.8;
}
.foot-bottom p { max-width: 38em; text-wrap: pretty; }
.foot-top-link { white-space: nowrap; color: var(--text); }

/* ---------- 404 ---------- */
.page-404 { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 64px 0; }
.page-404 h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 20px; }
.page-404 p { max-width: 32em; color: var(--muted); }
.error-code { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .wf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Open image plates: three desktop columns, two on tablets, one on phones. */
@media (max-width: 1099px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tile-body { padding: 16px 0 0; }
  .tile-body .chip { margin-bottom: 8px; flex-wrap: wrap; max-width: 100%; }
  .tile-body h3 { font-size: 19px; }
  .tile-body p:last-child { font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
}
@media (max-width: 900px) {
  .split, .slicer-grid { grid-template-columns: minmax(0, 1fr); }
  .split-media { order: 2; margin-top: 0; }
  .status-grid, .paper-grid, .note-row { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
  .foot-nav { gap: 24px; }
  .foot-bottom { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 24px; }
  .foot-bottom > p { grid-column: 1 / -1; }
  .section h2 { max-width: none; }
}
@media (max-width: 640px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .foot-identity > p { margin-top: 16px; }
  .foot-brand img { width: clamp(240px, 60vw, 300px); }
  .foot-title { margin-bottom: 14px; }
  .foot-nav ul { gap: 8px; }
  .foot-links { gap: 6px 16px; }
}
@media (max-width: 680px) {
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .wf-grid { grid-template-columns: minmax(0, 1fr); }
  .wf-grid .wf-card:last-child { grid-column: auto; }
  .intro { font-size: 17px; }
  .btn { padding: 12px 18px; }
  .start-step { padding-left: 52px; }
  .start-step::before { width: 34px; height: 34px; font-size: 14px; }
  .start-step::after { left: 17px; top: 40px; }
  .film-play .play-circle { width: 72px; height: 72px; }
  .film-play { gap: 10px; font-size: 12px; }
  .shot figcaption { margin: 12px 0 0; }
  .callout { margin-top: 32px; }
  .input-card .code-block { font-size: 12px; }
}

/* ---------- Figures (route guide, run times) ---------- */
.fig a { display: block; border-radius: 0; }
.fig img { height: auto; }

/* ---------- Integration table ---------- */
#integrated .integration { margin-top: 28px; }
#integrated .integration > p { max-width: 44em; font-size: 15px; margin-bottom: 24px; }
.table-wrap { overflow-x: auto; width: 100%; border-top: 1px solid var(--line-2); }
/* Keep the complete inventory visible; references wrap within their own column. */
.int-table { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 13.5px; }
.int-table caption { caption-side: bottom; text-align: left; font-size: 12.5px; color: var(--muted); padding: 12px 0; }
.int-table th, .int-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.4; }
.int-table thead th { font: 400 11px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 10px; padding-bottom: 10px; }
.int-table th:first-child, .int-table td:first-child { padding-left: 0; }
.int-table tbody th { font: 400 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.int-table .stage-start > * { border-top: 1px solid var(--line-2); padding-top: 16px; }
.int-table .stage-start:first-child > * { border-top: 0; }
.int-table td:nth-child(2) { font-weight: 500; min-width: 150px; }
.int-table td:nth-child(3) { min-width: 300px; }
.st-cell { min-width: 170px; width: 20%; color: var(--muted); font-size: 13px; }
.st { display: block; }
.st + .st { margin-top: 2px; }
.st-ok { color: var(--text); }
.st-partial { color: var(--orange); }
.st-needs { color: var(--muted); font-size: 12.5px; }
.ref-cell { min-width: 110px; width: 12%; font-family: var(--f-mono); font-size: 13px; }
.ref-cell a { display: inline-block; padding: 2px 0; margin-right: 7px; white-space: nowrap; line-height: 1.6; }
.ref-cell a + a { margin-top: 0; }

/* ---------- References ---------- */
.references { margin-top: 36px; }
.ref-body { margin-top: 24px; }
.references > h3 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.references > p { max-width: 44em; font-size: 15px; margin-bottom: 8px; }
.ref-group-title { margin: 32px 0 6px; font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { display: flex; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.55; }
.ref-list li:target { background: rgba(91, 140, 255, .08); }
.ref-n { flex: none; width: 3em; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); padding-top: 1px; }
.ref-text { min-width: 0; overflow-wrap: anywhere; }
.ref-list .doi { white-space: normal; }
.paper .chip-q[id] { scroll-margin-top: 90px; }
.ref-list li, .integration, .references { scroll-margin-top: 90px; }

@media (max-width: 560px) {
  .ref-list li { gap: 8px; }
  .ref-n { width: 2.6em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* Keep the complete scientific plate readable without overflowing the page. */
.results-overview { margin: 2rem 0 0; }
.results-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.results-scroll a { display: block; min-width: min(900px, 100%); }
.results-scroll img { display: block; width: 100%; height: auto; }
.results-overview figcaption { margin-top: 1rem; color: var(--muted, #9ca5b1); line-height: 1.7; }
.results-overview figcaption a { white-space: nowrap; margin-left: .5em; }
@media (max-width: 700px) {
  .results-scroll a { min-width: 850px; }
}
