
:root{
  --ink:#26343b;
  --muted:#66767b;
  --navy:#173d59;
  --ocean:#4f8098;
  --sage:#78907c;
  --sage-soft:#eef4ef;
  --sky-soft:#eef5f8;
  --sand:#f7f6f1;
  --paper:rgba(255,255,255,.94);
  --line:#dbe4e2;
  --line-strong:#c5d1ce;
  --good:#467862;
  --bad:#a65b58;
  --max:1080px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.55;
  background:
    radial-gradient(circle at 8% 4%,rgba(79,128,152,.12),transparent 26rem),
    radial-gradient(circle at 92% 28%,rgba(120,144,124,.12),transparent 28rem),
    linear-gradient(180deg,#fbfcfa 0%,#f7f8f5 46%,#fbfcfa 100%);
  overflow-x:hidden;
}
a{color:inherit;text-decoration:none}
button{font:inherit}
img{display:block}
.shell{width:min(calc(100% - 40px),var(--max));margin:0 auto}
.page-layer{position:relative;z-index:2}

/* The animation is deliberately visible, but kept behind the content. */
.ambient-flow{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.ambient-flow svg{width:100%;height:100%;display:block}
.flow-base{
  fill:none;
  stroke-width:1.25;
  opacity:.16;
  vector-effect:non-scaling-stroke;
}
.flow-dash{
  fill:none;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-dasharray:7 17;
  opacity:.42;
  vector-effect:non-scaling-stroke;
  animation:stream 9s linear infinite;
}
.flow-dash.slow{animation-duration:13s}
.flow-dash.reverse{animation-direction:reverse;animation-duration:11s}
.signal-dot{opacity:.72;filter:drop-shadow(0 1px 3px rgba(23,61,89,.22))}
@keyframes stream{to{stroke-dashoffset:-120}}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .flow-dash{animation:none}
  .signal-dot{display:none}
  .play-btn{display:none}
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:20;
  border-bottom:1px solid rgba(205,216,213,.9);
  background:rgba(251,252,250,.88);
  backdrop-filter:blur(16px) saturate(125%);
}
.header-inner{
  min-height:76px;
  display:flex;
  align-items:center;
  gap:22px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:max-content;
}
.brand-mark{
  width:48px;height:48px;
  display:grid;place-items:center;
  border-radius:14px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(197,209,206,.85);
  box-shadow:0 8px 24px rgba(35,58,68,.06);
  overflow:hidden;
}
.brand-mark img{width:54px;height:54px;object-fit:contain}
.wordmark{display:flex;flex-direction:column;line-height:1}
.wordmark strong{
  font-family:"Avenir Next","Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;
  font-size:20px;
  font-weight:740;
  letter-spacing:-.045em;
  color:#183d58;
}
.wordmark strong span{color:#567969}
.wordmark small{
  margin-top:6px;
  color:#7c8a8e;
  font-size:9px;
  letter-spacing:.09em;
  text-transform:uppercase;
}
nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:22px;
  overflow-x:auto;
  scrollbar-width:none;
  white-space:nowrap;
}
nav::-webkit-scrollbar{display:none}
nav a{font-size:12px;font-weight:650;color:#64747a}
nav a:hover{color:var(--navy)}

/* Hero */
.hero{
  min-height:620px;
  padding:92px 0 82px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}
.hero-logo-wrap{
  position:relative;
  width:132px;height:132px;
  display:grid;place-items:center;
  margin-bottom:28px;
}
.hero-logo-wrap::before,
.hero-logo-wrap::after{
  content:"";
  position:absolute;
  inset:5px;
  border-radius:50%;
  border:1px solid rgba(79,128,152,.18);
}
.hero-logo-wrap::after{
  inset:-8px;
  border-color:rgba(120,144,124,.14);
}
.hero-logo{
  width:112px;height:112px;object-fit:contain;
  filter:drop-shadow(0 14px 28px rgba(23,61,89,.10));
}
.eyebrow{
  margin:0 0 13px;
  font-size:11px;
  font-weight:760;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#6a8177;
}
h1{
  margin:0;
  max-width:850px;
  color:#183a53;
  font-family:"Avenir Next","Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;
  font-size:clamp(42px,6.5vw,76px);
  line-height:1.02;
  letter-spacing:-.055em;
  font-weight:720;
}
.hero-copy{
  max-width:700px;
  margin:24px auto 0;
  color:#5f7075;
  font-size:18px;
}
.hero-copy strong{color:#294b5e}
.flow-legend{
  margin-top:24px;
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#718086;
  font-size:11px;
}
.flow-legend i{
  width:24px;height:2px;
  background:linear-gradient(90deg,var(--ocean),var(--sage));
  border-radius:2px;
  position:relative;
}
.flow-legend i::after{
  content:"";
  position:absolute;
  width:5px;height:5px;border-radius:50%;
  right:2px;top:-1.5px;
  background:var(--navy);
}

/* Sections */
.section{
  padding:88px 0;
  border-top:1px solid rgba(210,220,217,.9);
}
.section-card{
  background:var(--paper);
  border:1px solid rgba(205,216,213,.92);
  border-radius:24px;
  box-shadow:0 18px 56px rgba(35,58,68,.055);
  padding:42px;
}
.section-head{
  max-width:680px;
  margin-bottom:36px;
}
.section-index{
  display:inline-block;
  margin-bottom:10px;
  color:#80908f;
  font:700 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.12em;
}
h2{
  margin:0;
  color:#1d4058;
  font-family:"Avenir Next","Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;
  font-size:clamp(30px,4vw,46px);
  line-height:1.08;
  letter-spacing:-.042em;
  font-weight:700;
}
.section-head p{margin:12px 0 0;color:var(--muted);font-size:16px}

/* Diagram building blocks */
.stack-diagram{
  width:min(760px,100%);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
}
.node{
  width:100%;
  border:1px solid var(--line-strong);
  border-radius:16px;
  background:rgba(255,255,255,.95);
  padding:21px 24px;
  text-align:center;
  box-shadow:0 8px 24px rgba(35,58,68,.035);
}
.node.engine{border-color:#a9bfca;background:linear-gradient(180deg,#fff,#f5f9fb)}
.node.skills{border-color:#bfcfc2;background:linear-gradient(180deg,#fff,#f5f8f5)}
.node strong{display:block;color:#244960;font-size:15px}
.node small{display:block;margin-top:5px;color:#7a898e;font-size:11px}
.node-row{
  margin-top:17px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.mini{
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 10px;
  background:#fff;
  cursor:pointer;
  transition:.15s ease;
}
.mini:hover,.mini:focus-visible{border-color:#93aeb7;box-shadow:0 0 0 3px rgba(79,128,152,.09);outline:none}
.mini b{display:block;color:#385b68;font-size:12px}
.mini span{display:block;margin-top:4px;color:#879395;font:500 9px/1.35 ui-monospace,monospace}
.connector{
  height:48px;
  width:2px;
  margin:auto;
  background:linear-gradient(180deg,#a6bbc2,#91a997);
  position:relative;
}
.connector::after{
  content:"";
  position:absolute;
  bottom:-1px;left:50%;
  transform:translateX(-50%) rotate(45deg);
  width:7px;height:7px;
  border-right:2px solid #82999b;
  border-bottom:2px solid #82999b;
}
.connector-label{
  align-self:center;
  margin:-5px 0 2px;
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:#76868a;
  font-size:9px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
}
.skill-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
  margin-top:17px;
}
.skill{
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px 8px;
  background:#fff;
  text-align:center;
  cursor:pointer;
}
.skill:hover,.skill:focus-visible{border-color:#a3b7a8;outline:none;box-shadow:0 0 0 3px rgba(120,144,124,.10)}
.skill em{display:block;font-style:normal;font-size:19px}
.skill b{display:block;margin-top:6px;color:#466050;font-size:11px}
.skill span{display:block;margin-top:3px;color:#8a9690;font:500 9px/1.25 ui-monospace,monospace}
.explain-box{
  width:min(760px,100%);
  margin:18px auto 0;
  border-left:3px solid #7e9f90;
  background:rgba(240,246,241,.9);
  border-radius:0 12px 12px 0;
  padding:14px 17px;
}
.explain-box strong{font-size:12px;color:#355a4b}
.explain-box p{margin:4px 0 0;color:#667870;font-size:12px}

/* Example timeline - vertical on all screen sizes for consistent layout */
.task-switcher{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:24px;
}
.task-btn,.mode-btn,.play-btn{
  border:1px solid var(--line-strong);
  background:#fff;
  color:#53656b;
  border-radius:999px;
  padding:9px 13px;
  font-size:11px;
  font-weight:700;
  cursor:pointer;
}
.task-btn.active,.mode-btn.active{
  color:#183e58;
  border-color:#88a8b5;
  background:#edf5f7;
}
.play-btn{background:#244e68;color:#fff;border-color:#244e68}
.story-title{
  margin:0 auto 28px;
  max-width:640px;
  text-align:center;
  color:#294b5d;
  font-size:20px;
  font-weight:680;
}
.timeline{
  width:min(650px,100%);
  margin:0 auto;
  display:flex;
  flex-direction:column;
}
.timeline-step{
  display:grid;
  grid-template-columns:54px 1fr;
  gap:16px;
  align-items:center;
  position:relative;
  padding:12px 0;
}
.timeline-step:not(:last-child)::after{
  content:"";
  position:absolute;
  left:26px;
  top:61px;
  bottom:-8px;
  width:2px;
  background:#d2dedd;
}
.step-dot{
  width:54px;height:54px;border-radius:50%;
  display:grid;place-items:center;
  border:1px solid #c8d8d8;
  background:#fff;
  font-size:20px;
  position:relative;
  z-index:2;
  transition:.2s ease;
}
.step-body{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  padding:14px 17px;
  transition:.2s ease;
}
.step-body strong{display:block;color:#3a5865;font-size:12px}
.step-body small{display:block;margin-top:3px;color:#869296;font-size:10px}
.timeline-step.active .step-dot{
  background:#e9f2f5;
  border-color:#76a0b1;
  box-shadow:0 0 0 5px rgba(79,128,152,.09);
}
.timeline-step.active .step-body{border-color:#91adb7;background:#f7fbfc}

/* Safety */
.mode-switch{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.safety-stack{
  width:min(600px,100%);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
.request,.gate,.result{
  border:1px solid var(--line);
  border-radius:15px;
  padding:20px;
  text-align:center;
  background:#fff;
}
.request strong,.gate strong,.result strong{display:block;color:#315263}
.request small,.result small{display:block;margin-top:5px;color:#7f8d90;font-size:11px}
.gate{
  border-color:#9bb7b0;
  background:#f5f9f6;
}
.gate .gate-badge{
  display:inline-block;
  margin-bottom:9px;
  padding:5px 8px;
  border-radius:999px;
  background:#e4efe7;
  color:#4d7560;
  font:750 9px/1 ui-monospace,monospace;
  text-transform:uppercase;
}
.gate p{margin:7px 0 0;color:#6d7d76;font-size:12px}
.result.allowed{border-color:#b7d0c1;background:#f4faf6}
.result.blocked{border-color:#dfc1bf;background:#fdf7f6}
.result.blocked strong{color:#8f504d}
.rule-note{
  width:min(600px,100%);
  margin:22px auto 0;
  padding:15px 18px;
  border-radius:14px;
  background:#f4f6f4;
  color:#66766e;
  font-size:12px;
}
.rule-note strong{color:#315848}

/* Skills */
.install-flow{
  width:min(760px,100%);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
.folder{
  border:1px solid #aec2c5;
  border-radius:14px;
  background:#fff;
  padding:18px 20px;
  text-align:center;
}
.folder strong{display:block;color:#2f5364}
.folder code{display:block;margin-top:7px;color:#7d8c90;font:500 10px/1.55 ui-monospace,monospace}
.install-step{
  width:68%;
  min-width:260px;
  align-self:center;
  border:1px solid var(--line);
  border-radius:13px;
  padding:14px 16px;
  background:#fff;
  text-align:center;
}
.install-step b{display:block;color:#48605b;font-size:12px}
.install-step span{display:block;margin-top:3px;color:#889390;font-size:10px}
.install-step.ready{border-color:#b8cfbf;background:#f1f8f3}
.two-lang{
  width:min(760px,100%);
  margin:28px auto 0;
  display:grid;
  grid-template-columns:1fr 44px 1fr;
  gap:12px;
  align-items:stretch;
}
.lang{
  border:1px solid var(--line);
  border-radius:15px;
  background:#fff;
  padding:20px;
  text-align:center;
}
.lang code{
  display:inline-block;
  padding:5px 8px;
  border-radius:7px;
  background:#edf4f6;
  color:#305871;
  font:750 10px/1 ui-monospace,monospace;
}
.lang.lua code{background:#eef4ef;color:#4f705b}
.lang strong{display:block;margin-top:12px;color:#375565;font-size:13px}
.lang small{display:block;margin-top:5px;color:#7f8c8f;font-size:10px}
.plus{display:grid;place-items:center;color:#97a6a2;font-size:24px}

/* Glossary */
.glossary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
}
.term{
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  padding:16px 12px;
}
.term strong{display:block;color:#315166;font-size:12px}
.term span{display:block;margin-top:5px;color:#7d8b8f;font-size:10px}

/* Contact */
.contact-card{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
.contact-link{
  min-height:115px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  padding:20px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.contact-link span{color:#839093;font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:750}
.contact-link strong{
  margin-top:7px;
  color:#284d62;
  font-family:"Avenir Next","Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;
  font-size:18px;
  letter-spacing:-.02em;
}
.contact-link:hover{border-color:#94aeb3;background:#f8fbfa}

/* Footer */
footer{padding:34px 0 46px;border-top:1px solid var(--line);background:rgba(250,251,248,.75)}
.footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px}
.footer-brand{display:flex;align-items:center;gap:10px}
.footer-brand img{width:38px;height:38px;object-fit:contain}
.footer-brand strong{font-size:14px;color:#23485f;letter-spacing:-.02em}
.footer-inner p{margin:0;color:#7b898d;font-size:11px;text-align:right}

/* Responsive: preserve content, order and component structure. */
@media(max-width:820px){
  .shell{width:min(calc(100% - 28px),var(--max))}
  .header-inner{gap:12px}
  .brand-mark{width:42px;height:42px;border-radius:12px}
  .brand-mark img{width:48px;height:48px}
  .wordmark strong{font-size:17px}
  .wordmark small{font-size:8px}
  nav{gap:14px}
  nav a{font-size:10px}
  .section-card{padding:30px 24px}
  .hero{min-height:570px;padding:76px 0 70px}
  .hero-copy{font-size:16px}
  .node-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .skill-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .glossary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .term:last-child{grid-column:1/-1}
}
@media(max-width:520px){
  .shell{width:min(calc(100% - 22px),var(--max))}
  .header-inner{min-height:70px}
  .brand{gap:8px}
  .brand-mark{width:38px;height:38px}
  .brand-mark img{width:44px;height:44px}
  .wordmark strong{font-size:15px}
  .wordmark small{display:none}
  nav{gap:11px;min-width:0}
  nav a{font-size:9px}
  .hero{min-height:540px;padding:66px 0 62px}
  .hero-logo-wrap{width:112px;height:112px}
  .hero-logo{width:94px;height:94px}
  .hero-copy{font-size:15px}
  .section{padding:66px 0}
  .section-card{padding:24px 17px;border-radius:19px}
  .section-head{margin-bottom:28px}
  .section-head p{font-size:14px}
  .node-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .skill-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .timeline-step{grid-template-columns:46px 1fr;gap:12px}
  .step-dot{width:46px;height:46px;font-size:18px}
  .timeline-step:not(:last-child)::after{left:22px;top:53px}
  .install-step{width:86%;min-width:0}
  .two-lang{grid-template-columns:1fr 32px 1fr;gap:7px}
  .lang{padding:16px 9px}
  .lang strong{font-size:11px}
  .contact-card{grid-template-columns:1fr}
  .glossary{grid-template-columns:1fr}
  .term:last-child{grid-column:auto}
  .footer-inner{align-items:flex-start;flex-direction:column}
  .footer-inner p{text-align:left}
}
