/* 补建说明：该文件为后续补建，用于定义 pretext-tui 静态官网的视觉系统与响应式布局；当前进度：首版 terminal operations room 风格完成，保持无外部依赖，部署目录为 website/。 */
:root {
  --ink: #f3efe2;
  --muted: #b8b09c;
  --dim: #837d6e;
  --coal: #0b0d0c;
  --coal-2: #121613;
  --coal-3: #1e241f;
  --line: rgba(243, 239, 226, 0.16);
  --acid: #b9ff5a;
  --amber: #ffc857;
  --cyan: #4dd8c8;
  --rose: #ff7a90;
  --paper: #f6f0dc;
  --paper-ink: #1a1f1b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --max: 1180px;
  font-family: "Cascadia Code", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--coal);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 30;
  background: var(--acid);
  color: var(--paper-ink);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease;
}

.topbar.is-scrolled {
  background: rgba(11, 13, 12, 0.86);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.hero-facts,
.window-bar,
.demo-bar,
.footer,
.deploy-steps {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--acid);
  color: var(--paper-ink);
  border-radius: 4px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.nav {
  gap: clamp(0.8rem, 3vw, 2rem);
  font-size: 0.86rem;
  color: var(--muted);
}

.nav a,
.nav-cta,
.button,
.text-link,
.footer a,
.deploy-steps a {
  text-decoration: none;
}

.nav a:hover,
.footer a:hover,
.text-link:hover,
.deploy-steps a:hover {
  color: var(--acid);
}

.nav-cta {
  padding: 0.52rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--acid);
  font-size: 0.84rem;
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 6rem clamp(1.2rem, 5vw, 5rem) 2rem;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 8rem;
  background: linear-gradient(to bottom, transparent, var(--coal));
  pointer-events: none;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 22%, rgba(185, 255, 90, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 58%, rgba(255, 200, 87, 0.12), transparent 24rem),
    linear-gradient(112deg, rgba(11, 13, 12, 0.98), rgba(25, 31, 27, 0.92) 58%, rgba(9, 10, 9, 0.98));
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(243, 239, 226, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 239, 226, 0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
}

.terminal-plane {
  position: absolute;
  width: min(72rem, 96vw);
  display: grid;
  gap: 0.55rem;
  color: rgba(243, 239, 226, 0.78);
  font-size: clamp(0.72rem, 1vw, 0.95rem);
  transform: rotate(-8deg);
}

.terminal-plane span {
  display: block;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(243, 239, 226, 0.09);
  background: rgba(5, 7, 6, 0.42);
  box-shadow: inset 0 0 0 1px rgba(185, 255, 90, 0.03);
}

.plane-a {
  left: -7vw;
  top: 13vh;
  animation: driftA 18s linear infinite alternate;
}

.plane-b {
  right: -18vw;
  bottom: 8vh;
  color: rgba(77, 216, 200, 0.72);
  animation: driftB 22s linear infinite alternate;
}

.scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(185, 255, 90, 0.16), transparent);
  height: 10rem;
  opacity: 0.32;
  animation: scan 8s ease-in-out infinite;
}

.hero-copy {
  width: min(980px, 100%);
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 16ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: 0.95;
  font-weight: 900;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 5.4rem);
  line-height: 1;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.hero-lede {
  max-width: 760px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.9vw, 1.28rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.85rem 1.08rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.button.primary {
  background: var(--acid);
  color: var(--paper-ink);
  border-color: var(--acid);
}

.button.ghost {
  background: rgba(243, 239, 226, 0.05);
  color: var(--ink);
}

.hero-facts {
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 0;
}

.hero-facts div {
  min-width: 13rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.hero-facts dt {
  color: var(--dim);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.hero-facts dd {
  margin: 0.15rem 0 0;
  color: var(--ink);
}

.section {
  padding: clamp(4rem, 8vw, 8rem) clamp(1.2rem, 5vw, 5rem);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.split,
.evidence-layout,
.deploy-layout,
.api-layout,
.lab-layout,
.boundary-grid,
.code-stage {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
}

.split,
.evidence-layout,
.deploy-layout,
.code-stage {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.api-layout,
.lab-layout,
.boundary-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center;
}

.band-intro {
  background: var(--paper);
  color: var(--paper-ink);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
}

.band-intro .eyebrow,
.band-intro .section-lede {
  color: #4d5c30;
}

.section-lede,
.section-heading p,
.api-copy p,
.deploy p,
.lab-layout p,
.evidence-copy p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.band-intro .section-lede {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-bottom: 1.6rem;
}

.pipeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  background: var(--line);
}

.pipeline li,
.use-grid article {
  background: var(--coal-2);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.pipeline p,
.use-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.step-index {
  display: block;
  margin-bottom: 2rem;
  color: var(--amber);
  font-weight: 700;
}

.band-dark {
  background: #15140f;
}

.use-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 200, 87, 0.2);
}

.install {
  background: var(--paper);
  color: var(--paper-ink);
}

.install .eyebrow,
.install p {
  color: #536131;
}

.code-window {
  overflow: hidden;
  border: 1px solid rgba(243, 239, 226, 0.18);
  background: #090b0a;
  box-shadow: var(--shadow);
}

.install .code-window {
  border-color: rgba(26, 31, 27, 0.18);
}

.window-bar {
  gap: 0.42rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(243, 239, 226, 0.12);
}

.window-bar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.window-bar span:nth-child(1) {
  background: var(--rose);
}

.window-bar span:nth-child(2) {
  background: var(--amber);
}

.window-bar span:nth-child(3) {
  background: var(--acid);
}

.copy-button {
  margin-left: auto;
  border: 1px solid rgba(243, 239, 226, 0.18);
  background: rgba(243, 239, 226, 0.06);
  color: var(--ink);
  border-radius: 4px;
  padding: 0.38rem 0.65rem;
  font: inherit;
  cursor: pointer;
}

pre {
  margin: 0;
  overflow: auto;
}

code,
pre {
  font-family: "Cascadia Code", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.code-window pre {
  padding: clamp(1rem, 3vw, 1.5rem);
  color: #d8f9d0;
  font-size: clamp(0.72rem, 1.5vw, 0.93rem);
  line-height: 1.62;
}

.code-window.tall {
  max-height: 720px;
}

.check-list,
.plain-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.plain-list li {
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.check-list li::before {
  content: ">";
  color: var(--acid);
  margin-right: 0.7rem;
}

.band-lab {
  background: #10100c;
}

.playground-copy {
  align-self: start;
}

.demo-controls {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.range {
  width: 100%;
  accent-color: var(--acid);
}

.search-label {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.search-label input {
  width: 100%;
  border: 1px solid rgba(243, 239, 226, 0.18);
  border-radius: 4px;
  background: rgba(243, 239, 226, 0.05);
  color: var(--ink);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.search-label input:focus,
.terminal-row:focus-visible,
.copy-button:focus-visible,
.button:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

.demo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.5rem 0 0;
  background: rgba(185, 255, 90, 0.2);
}

.demo-metrics div {
  padding: 0.9rem;
  background: rgba(7, 9, 7, 0.62);
}

.demo-metrics dt {
  color: var(--dim);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.demo-metrics dd {
  margin: 0.25rem 0 0;
  color: var(--acid);
  font-weight: 700;
}

.playground-shell {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.terminal-demo {
  min-width: 0;
  border: 1px solid rgba(185, 255, 90, 0.22);
  background: #070907;
  box-shadow: var(--shadow);
}

.demo-bar {
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(185, 255, 90, 0.16);
  color: var(--muted);
  font-size: 0.82rem;
}

.terminal-screen {
  display: grid;
  min-height: 27rem;
  padding: 0.75rem;
  color: #c8f7bd;
  font-size: clamp(0.62rem, 0.84vw, 0.72rem);
  line-height: 1.45;
}

.terminal-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
  min-height: 1.8rem;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.terminal-row:hover,
.terminal-row.is-selected {
  background: rgba(185, 255, 90, 0.1);
}

.row-gutter {
  color: rgba(255, 200, 87, 0.7);
  user-select: none;
}

.row-text {
  min-width: 0;
  overflow: hidden;
  white-space: pre;
}

.row-text mark {
  background: var(--amber);
  color: #111713;
  padding: 0 0.12rem;
}

.row-inspector {
  border: 1px solid rgba(243, 239, 226, 0.12);
  background: rgba(243, 239, 226, 0.04);
  padding: 1rem;
}

.row-inspector .eyebrow {
  margin-bottom: 0.5rem;
}

.row-inspector pre {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

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

.text-link {
  display: inline-flex;
  margin-top: 1.4rem;
  color: var(--acid);
  font-weight: 700;
}

.band-compare {
  background: var(--paper);
  color: var(--paper-ink);
}

.band-compare .eyebrow {
  color: #536131;
}

.band-compare .plain-list li {
  border-color: rgba(26, 31, 27, 0.16);
  color: #3f463b;
}

.plain-list.muted li {
  color: #66604f;
}

.deploy {
  background: #111713;
}

.deploy-steps {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.deploy-steps a {
  border: 1px solid var(--line);
  padding: 1rem;
  border-radius: 4px;
  background: rgba(243, 239, 226, 0.04);
}

.footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1.2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer div {
  display: grid;
  gap: 0.25rem;
}

.footer strong {
  color: var(--ink);
}

@keyframes driftA {
  from {
    transform: translate3d(0, 0, 0) rotate(-8deg);
  }
  to {
    transform: translate3d(4vw, -3vh, 0) rotate(-8deg);
  }
}

@keyframes driftB {
  from {
    transform: translate3d(0, 0, 0) rotate(-8deg);
  }
  to {
    transform: translate3d(-4vw, 3vh, 0) rotate(-8deg);
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-12rem);
  }
  50% {
    transform: translateY(calc(100vh + 3rem));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: 82vh;
  }

  h1 {
    max-width: 14ch;
  }

  .split,
  .evidence-layout,
  .deploy-layout,
  .api-layout,
  .lab-layout,
  .boundary-grid,
  .code-stage {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .topbar {
    padding: 0.8rem 1rem;
  }

  .brand span:last-child {
    display: none;
  }

  .hero {
    padding-top: 6.2rem;
    min-height: 86vh;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.4rem, 12vw, 3rem);
    line-height: 1.03;
  }

  .hero-lede {
    max-width: 34ch;
    font-size: 0.95rem;
  }

  .hero-actions {
    margin-top: 1.2rem;
  }

  .button {
    min-height: 2.8rem;
  }

  .hero-facts {
    display: none;
  }

  .pipeline,
  .use-grid {
    grid-template-columns: 1fr;
  }

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

  .terminal-plane {
    width: 130vw;
    opacity: 0.42;
  }

  .plane-b {
    right: -60vw;
  }
}
