:root {
  --paper: #f7f9fc;
  --paper-blue: #eef3ff;
  --ink: #121a2b;
  --muted: #657088;
  --line: #d8dfec;
  --blue: #3158ff;
  --blue-dark: #203cc4;
  --sky: #b9d7ff;
  --mint: #89dfc2;
  --amber: #ffb86b;
  --night: #111b31;
  --night-soft: #182540;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(29, 49, 100, 0.12);
  --radius: 18px;
  --display: "Bahnschrift SemiCondensed", "Arial Narrow", "Microsoft YaHei", sans-serif;
  --body: "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { color: inherit; }
::selection { background: var(--blue); color: white; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: -60px;
  padding: 10px 14px;
  color: white;
  background: var(--blue);
  border-radius: 8px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(216, 223, 236, 0.85);
  background: rgba(247, 249, 252, 0.88);
  backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; width: fit-content; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: white;
  background: var(--ink);
  border-radius: 8px 2px 8px 2px;
  font: 700 12px var(--mono);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: 0.08em; }
.brand small { margin-top: 2px; color: var(--muted); font: 9px var(--mono); letter-spacing: 0.08em; }
nav { display: flex; align-items: center; gap: 30px; }
nav a { position: relative; color: #354058; font-size: 13px; text-decoration: none; }
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--blue);
  transition: right 0.2s ease;
}
nav a:hover::after, nav a:focus-visible::after { right: 0; }
.header-cta {
  justify-self: end;
  padding: 9px 16px;
  color: white;
  background: var(--ink);
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: 7.5vw 5vw 6vw;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(500px, 0.9fr);
  align-items: center;
  gap: 7vw;
  overflow: hidden;
  background:
    linear-gradient(rgba(49, 88, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 88, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 88% 15%, rgba(185, 215, 255, 0.76), transparent 28%),
    var(--paper);
  background-size: 48px 48px, 48px 48px, auto, auto;
}
.hero > *, .trace-stage { min-width: 0; }
.hero::after {
  content: "TRACE / BUILD / VERIFY";
  position: absolute;
  right: -46px;
  top: 48%;
  transform: rotate(90deg);
  color: rgba(18, 26, 43, 0.26);
  font: 10px var(--mono);
  letter-spacing: 0.18em;
}
.hero-copy { max-width: 740px; }
.availability {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 25px;
  color: #3c4a65;
  font: 12px var(--mono);
  letter-spacing: 0.03em;
}
.availability span {
  width: 9px;
  height: 9px;
  background: var(--mint);
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(73, 177, 139, 0.42);
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 26px;
  max-width: 720px;
  font: 720 clamp(47px, 4.75vw, 74px)/0.99 var(--display);
  letter-spacing: -0.045em;
  word-break: break-word;
}
h1 em { color: var(--blue); font-style: normal; }
.hero-intro {
  max-width: 630px;
  margin-bottom: 30px;
  color: #4f5b70;
  font-size: 16px;
  line-height: 1.85;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  min-height: 48px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .run-demo:focus-visible, a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.button.primary { color: white; background: var(--ink); box-shadow: 6px 6px 0 var(--sky); }
.button.primary:hover { box-shadow: 9px 9px 0 var(--sky); }
.button.ghost { background: rgba(255, 255, 255, 0.55); }
.hero-facts {
  margin: 45px 0 0;
  display: flex;
  gap: 0;
}
.hero-facts div { min-width: 126px; padding-right: 25px; margin-right: 25px; border-right: 1px solid var(--line); }
.hero-facts div:last-child { border-right: 0; }
.hero-facts dt { margin-bottom: 2px; font: 700 25px var(--display); }
.hero-facts dd { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.trace-stage {
  position: relative;
  border: 1px solid rgba(111, 131, 178, 0.45);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  box-shadow: var(--shadow), 14px 14px 0 rgba(49, 88, 255, 0.1);
  overflow: hidden;
}
.trace-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 42px;
  top: 143px;
  bottom: 85px;
  width: 1px;
  background: var(--line);
}
.trace-toolbar {
  min-height: 42px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #6c7790;
  border-bottom: 1px solid var(--line);
  background: #f1f4fa;
  font: 9px var(--mono);
  letter-spacing: 0.05em;
}
.window-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: #c7cfdd; border-radius: 50%; }
.trace-state { justify-self: end; padding: 3px 6px; color: #3559bc; border: 1px solid #a8bce9; border-radius: 4px; }
.trace-heading { position: relative; z-index: 1; padding: 22px 20px 14px; display: flex; align-items: center; justify-content: space-between; }
.trace-heading small, .trace-heading strong { display: block; }
.trace-heading small { margin-bottom: 3px; color: var(--blue); font: 9px var(--mono); letter-spacing: 0.14em; }
.trace-heading strong { font-size: 17px; }
.run-demo { padding: 8px 12px; color: white; border: 0; background: var(--blue); border-radius: 7px; cursor: pointer; font-size: 11px; }
.run-demo:disabled { cursor: progress; opacity: 0.65; }
.trace-list { position: relative; z-index: 1; margin: 0; padding: 0 18px 12px; list-style: none; }
.trace-node {
  position: relative;
  min-height: 68px;
  padding: 12px 9px 12px 0;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e6eaf2;
  transition: background 0.25s ease, transform 0.25s ease;
}
.trace-node:last-child { border-bottom: 0; }
.trace-node.active { padding-left: 9px; background: var(--paper-blue); border-radius: 7px; transform: translateX(5px); }
.trace-node.done .node-index { color: white; background: var(--blue); border-color: var(--blue); }
.node-index {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #74809a;
  border: 1px solid #cfd7e6;
  background: white;
  border-radius: 50%;
  font: 9px var(--mono);
}
.trace-node strong, .trace-node small { display: block; }
.trace-node strong { margin-bottom: 4px; font-size: 12px; }
.trace-node small { color: var(--muted); font-size: 10px; }
.node-status { padding: 4px 6px; color: #268066; background: #e7f8f1; border-radius: 5px; font: 8px var(--mono); }
.node-status.pending { color: #9b621e; background: #fff1df; }
.trace-console { min-height: 49px; padding: 10px 15px; display: flex; gap: 10px; color: #c4d2ff; background: var(--night); font-size: 9px; line-height: 1.6; }
.console-time { color: var(--mint); font-family: var(--mono); white-space: nowrap; }
.trace-console code { font: inherit; }

.work-section, .labs-section { padding: 115px 6vw; }
.section-title { margin-bottom: 48px; display: grid; grid-template-columns: 1.1fr 0.72fr; gap: 10vw; align-items: end; }
.section-title h2 { margin-bottom: 0; font: 700 clamp(34px, 4vw, 58px)/1.05 var(--display); letter-spacing: -0.035em; }
.section-title > p { max-width: 520px; margin-bottom: 4px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.eyebrow { margin-bottom: 10px; color: var(--blue); font: 10px var(--mono); letter-spacing: 0.14em; }

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.feature-main { padding: clamp(28px, 4.2vw, 62px); }
.project-meta { margin-bottom: 25px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-number { padding: 5px 8px; color: white; background: var(--ink); border-radius: 5px; font: 9px var(--mono); letter-spacing: 0.08em; }
.status { display: inline-flex; align-items: center; gap: 6px; color: #5d6980; font-size: 10px; }
.status i { width: 7px; height: 7px; background: var(--amber); border-radius: 50%; }
.status.verified i { background: var(--mint); }
.feature-card h3, .recipe-project h3 { margin-bottom: 18px; font: 700 clamp(30px, 3.4vw, 50px)/1.08 var(--display); letter-spacing: -0.03em; }
.project-lead { max-width: 750px; margin-bottom: 32px; color: #4f5b70; font-size: 15px; line-height: 1.9; }
.project-role { margin-bottom: 34px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-role div { padding: 20px 24px 20px 0; }
.project-role div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.project-role span, .compact-spec dt { display: block; margin-bottom: 6px; color: var(--blue); font: 9px var(--mono); letter-spacing: 0.09em; }
.project-role p { margin-bottom: 0; color: #59657b; font-size: 12px; line-height: 1.7; }
.project-proof { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; }
.project-proof li { min-height: 105px; padding: 15px; background: var(--paper-blue); border-radius: 10px; }
.project-proof strong { display: block; margin-bottom: 12px; color: var(--blue); font: 700 22px var(--display); }
.project-proof span { color: #5d6880; font-size: 10px; line-height: 1.5; }
.feature-side { padding: 45px 28px; color: white; background: var(--night); }
.fit-label { margin-bottom: 28px; color: var(--sky); font: 9px var(--mono); letter-spacing: 0.12em; }
.fit-list { margin: 0 0 34px; padding: 0; list-style: none; }
.fit-list li { padding: 15px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.11); font-size: 11px; }
.fit-list b { color: var(--mint); font-weight: 500; white-space: nowrap; }
.fit-list b.warn { color: var(--amber); }
.text-link { color: white; font-size: 11px; text-decoration: none; }
.text-link span { margin-left: 10px; color: var(--mint); }

.recipe-project { margin-top: 32px; display: grid; grid-template-columns: minmax(360px, 0.9fr) 1fr; border: 1px solid var(--line); background: #f1f4f8; border-radius: var(--radius); overflow: hidden; }
.recipe-visual { position: relative; min-height: 560px; display: grid; grid-template-columns: 1fr 0.77fr; gap: 10px; padding: 18px; background: #17181a; overflow: hidden; }
.recipe-visual img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.recipe-visual img:last-of-type { margin-top: 54px; height: calc(100% - 54px); }
.recipe-visual span { position: absolute; left: 30px; top: 30px; padding: 6px 9px; color: #161616; background: white; border-radius: 5px; font: 9px var(--mono); }
.recipe-copy { padding: clamp(32px, 5vw, 74px); align-self: center; }
.recipe-copy > p { color: #58647a; font-size: 14px; line-height: 1.85; }
.compact-spec { margin: 30px 0 0; }
.compact-spec div { padding: 17px 0; border-top: 1px solid var(--line); }
.compact-spec dd { margin: 0; color: #4e5a70; font-size: 12px; line-height: 1.7; }

.evidence-section { padding: 115px 6vw; color: white; background: var(--night); }
.section-title.inverse h2 { color: white; }
.section-title.inverse > p { color: #aeb9d0; }
.section-title.inverse .eyebrow { color: var(--mint); }
.evidence-grid { display: grid; grid-template-columns: 0.82fr 0.82fr 1.3fr; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: var(--radius); overflow: hidden; }
.evidence-grid article { min-height: 380px; padding: 38px; background: var(--night-soft); }
.evidence-grid article + article { border-left: 1px solid rgba(255, 255, 255, 0.13); }
.evidence-grid article:nth-child(2) { background: #1b2948; }
.evidence-icon { width: 38px; height: 38px; margin-bottom: 55px; display: grid; place-items: center; color: var(--night); background: var(--mint); border-radius: 50%; font: 16px var(--mono); }
.evidence-icon.hollow { color: var(--sky); background: transparent; border: 1px solid var(--sky); }
.evidence-icon.accent { color: var(--night); background: var(--amber); }
.evidence-grid h3 { margin-bottom: 20px; font: 650 22px var(--display); }
.evidence-grid ul, .evidence-grid ol { margin: 0; padding: 0; list-style: none; }
.evidence-grid li { color: #bdc7da; font-size: 11px; line-height: 1.7; }
.evidence-grid ul li { position: relative; padding: 8px 0 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.evidence-grid ul li::before { content: "·"; position: absolute; left: 0; color: var(--mint); }
.acceptance-card { background: white !important; }
.acceptance-card h3 { color: var(--ink); }
.acceptance-card ol li { padding: 9px 0; display: grid; grid-template-columns: 28px 1fr; gap: 8px; color: #4e5a71; border-bottom: 1px solid var(--line); }
.acceptance-card ol li span { color: var(--blue); font: 9px var(--mono); }
.stack-line { margin-top: 22px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stack-line span { color: #91a0bc; font: 9px var(--mono); }
.stack-line b { padding: 6px 9px; color: #dae2f3; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; font-size: 9px; font-weight: 500; }
.stack-line i { width: 30px; height: 1px; margin: 0 5px; background: rgba(255, 255, 255, 0.2); }

.labs-section { background: var(--paper-blue); }
.lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lab-card { display: grid; grid-template-columns: 1.25fr 0.75fr; min-height: 360px; color: var(--ink); border: 1px solid #cdd7eb; background: white; border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform 0.22s ease, box-shadow 0.22s ease; }
.lab-card:hover { transform: translateY(-5px); box-shadow: 0 22px 55px rgba(49, 70, 120, 0.16); }
.lab-card img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.lab-card > div { padding: 30px 25px; align-self: end; }
.lab-card span { color: var(--blue); font: 9px var(--mono); line-height: 1.6; }
.lab-card h3 { margin: 12px 0; font: 650 27px var(--display); }
.lab-card p { min-height: 58px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.lab-card b { font-size: 11px; }

.about-section { padding: 110px 6vw; display: grid; grid-template-columns: 0.9fr 1.1fr 0.85fr; gap: 6vw; align-items: start; background: white; }
.about-section h2 { margin-bottom: 18px; font: 700 48px var(--display); }
.about-lead { max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.about-details p { margin: 0; padding: 17px 0; color: #4f5b71; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.7; }
.about-details span { display: block; margin-bottom: 4px; color: var(--blue); font: 9px var(--mono); }
.contact-panel { padding: 28px; color: white; background: var(--blue); border-radius: 12px; box-shadow: 10px 10px 0 var(--sky); }
.contact-panel span { display: block; margin-bottom: 40px; font-size: 12px; line-height: 1.7; }
.contact-panel a { display: flex; justify-content: space-between; gap: 12px; color: white; font: 11px var(--mono); text-decoration: none; }

footer { min-height: 64px; padding: 0 6vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #8893aa; background: var(--night); font: 9px var(--mono); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 16px; color: white; background: var(--ink); border-radius: 999px; opacity: 0; pointer-events: none; font-size: 11px; transition: opacity 0.2s ease, transform 0.2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { margin: 0; padding: 10px; text-align: center; color: white; background: #a44137; font-size: 12px; }

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr 470px; gap: 4vw; }
  .hero-facts div { min-width: 110px; }
  .project-proof { grid-template-columns: 1fr 1fr; }
  .lab-card { grid-template-columns: 1fr; }
  .lab-card img { height: 240px; }
}

@media (max-width: 920px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { min-height: auto; padding-top: 90px; grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 750px; }
  .trace-stage { max-width: 680px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-side { padding: 35px; }
  .recipe-project { grid-template-columns: 1fr; }
  .recipe-visual { min-height: 520px; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .evidence-grid article + article { border-left: 1px solid rgba(255, 255, 255, 0.13); }
  .evidence-grid .acceptance-card { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.13); border-left: 0; }
  .about-section { grid-template-columns: 1fr 1fr; }
  .contact-panel { grid-column: 1 / -1; max-width: 520px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 62px; padding: 0 18px; }
  .brand small { display: none; }
  .header-cta { font-size: 11px; }
  .hero { padding: 68px 20px 60px; background-size: 32px 32px, 32px 32px, auto, auto; }
  .hero::after { display: none; }
  .availability { align-items: flex-start; font-size: 10px; line-height: 1.6; }
  .hero-intro { font-size: 14px; }
  h1 { max-width: 100%; font-size: clamp(40px, 11.6vw, 54px); word-break: break-all; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .button { width: 100%; min-width: 0; padding: 0 10px; gap: 6px; white-space: nowrap; }
  .hero-facts { margin-top: 38px; }
  .hero-facts div { min-width: 0; flex: 1; padding-right: 10px; margin-right: 10px; }
  .hero-facts dt { font-size: 21px; }
  .trace-stage { margin-top: 22px; }
  .trace-toolbar { grid-template-columns: 1fr 1fr; }
  .trace-toolbar code { display: none; }
  .trace-node { grid-template-columns: 40px 1fr; }
  .node-status { display: none; }
  .trace-stage::before { left: 37px; }
  .work-section, .labs-section, .evidence-section { padding: 80px 20px; }
  .section-title { margin-bottom: 34px; grid-template-columns: 1fr; gap: 18px; }
  .section-title h2 { font-size: 38px; }
  .feature-main { padding: 26px 22px; }
  .feature-card h3, .recipe-project h3 { font-size: 34px; }
  .project-role { grid-template-columns: 1fr; }
  .project-role div + div { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .project-proof { gap: 7px; }
  .project-proof li { padding: 12px; }
  .recipe-project { margin-top: 20px; }
  .recipe-visual { min-height: 390px; padding: 10px; }
  .recipe-visual img:last-of-type { margin-top: 40px; height: calc(100% - 40px); }
  .recipe-copy { padding: 30px 22px; }
  .evidence-grid { grid-template-columns: 1fr; }
  .evidence-grid article { min-height: auto; padding: 30px; }
  .evidence-grid article + article, .evidence-grid .acceptance-card { grid-column: auto; border-top: 1px solid rgba(255, 255, 255, 0.13); border-left: 0; }
  .evidence-icon { margin-bottom: 32px; }
  .stack-line i { display: none; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-card { min-height: 0; }
  .lab-card img { height: 210px; }
  .about-section { padding: 80px 20px; grid-template-columns: 1fr; gap: 32px; }
  .contact-panel { grid-column: auto; }
  footer { padding: 20px; align-items: flex-start; flex-direction: column; }
}

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