/* ==========================================================================
   HONEYSCRIPT (HTML+) — SHARED BLACK & GREEN RESPONSIVE DESIGN SYSTEM
   Honey AI Palette (#020504 / #08100C + #34e89e / #68f7b8)
   Underlisted X Atmospheric Architecture · Zero-Clipping Mobile-First Layout
   ========================================================================== */

:root {
  --black: #020504;
  --panel: #060b09;
  --panel-2: #0a120e;
  --text: #f5f6f7;
  --muted: #9aa5a0;
  --faint: #627069;
  --green: #34e89e;
  --green-bright: #68f7b8;
  --green-soft: rgba(52, 232, 158, .12);
  --red: #ff3b35;
  --ok: #68f7b8;
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .20);
  --ease: cubic-bezier(.2, .75, .2, 1);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
  background: var(--black);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

button, a, input, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
code { overflow-wrap: anywhere; }
pre { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Ensure no flex/grid child can push page wider than viewport */
main, section, article, aside, header, footer,
.hero > *, .experience > *, .sandbox-grid > *, .wf-grid > *,
.feature-grid > *, .dl-grid > *, .portal-grid > *, .cli-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* ==========================================================================
   ATMOSPHERIC STAGE (HONEY AI BLACK & GREEN + UNDERLISTED X MOTION)
   ========================================================================== */
.page {
  position: relative;
  min-height: 100dvh;
  width: 100%;
  isolation: isolate;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 72% 20%, rgba(52, 232, 158, .10), transparent 26%),
    radial-gradient(circle at 22% 74%, rgba(20, 92, 62, .16), transparent 30%),
    linear-gradient(180deg, #040a07, #020504 70%, #000);
}

.page > main { flex: 1 0 auto; width: 100%; }

.page::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -6;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 25% 30%, rgba(24, 110, 74, .20), transparent 28%),
    radial-gradient(ellipse at 73% 22%, rgba(52, 232, 158, .11), transparent 30%),
    radial-gradient(ellipse at 56% 74%, rgba(52, 232, 158, .07), transparent 24%);
  filter: blur(36px);
  animation: fogDrift 17s ease-in-out infinite alternate;
}

.page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.58'/%3E%3C/svg%3E");
  animation: noiseShift .22s steps(2) infinite;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 94;
  pointer-events: none;
  opacity: .045;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .05) 0, rgba(255, 255, 255, .05) 1px, transparent 1px, transparent 5px);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 93;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, transparent 32%, rgba(0, 0, 0, .20) 68%, rgba(0, 0, 0, .72) 100%);
}

.world-grid {
  position: fixed;
  left: -12%;
  right: -12%;
  bottom: -34vh;
  height: 78vh;
  z-index: -4;
  pointer-events: none;
  transform: perspective(620px) rotateX(67deg);
  transform-origin: 50% 100%;
  background:
    linear-gradient(rgba(52, 232, 158, .085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 232, 158, .06) 1px, transparent 1px);
  background-size: 62px 62px;
  opacity: .52;
  mask-image: linear-gradient(to top, #000 25%, transparent 94%);
  -webkit-mask-image: linear-gradient(to top, #000 25%, transparent 94%);
  animation: gridTravel 7s linear infinite;
}

.beam {
  position: fixed;
  top: -12vh;
  left: 50%;
  z-index: -3;
  pointer-events: none;
  width: 1px;
  height: 74vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(52, 232, 158, .44), transparent);
  box-shadow: 0 0 28px rgba(255, 255, 255, .18), 0 0 78px rgba(52, 232, 158, .22);
  opacity: .52;
  animation: beamPulse 4s ease-in-out infinite;
}

.particle-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  will-change: transform, opacity;
}

.particle.star {
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, .75);
  box-shadow: 0 0 8px rgba(255, 255, 255, .45);
  animation: starDrift var(--dur) linear infinite;
  animation-delay: var(--delay);
}

.particle.ember {
  width: 3px;
  height: 3px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(52, 232, 158, .85);
  animation: emberRise var(--dur) linear infinite;
  animation-delay: var(--delay);
}

/* ==========================================================================
   TOPBAR & FULL-SCREEN MOBILE DRAWER
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  min-height: 76px;
  padding: env(safe-area-inset-top, 0px) 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, rgba(2, 5, 4, .95), rgba(2, 5, 4, .62), transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(52, 232, 158, .38);
  box-shadow: 0 0 18px rgba(52, 232, 158, .22);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-text { min-width: 0; }

.brand strong {
  display: block;
  font-size: .90rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand strong b {
  color: var(--green);
  font-weight: 700;
}

.brand span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #6f7c75;
  font-size: .54rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand span i {
  font-style: normal;
  color: var(--red);
  font-weight: 700;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.topnav a {
  position: relative;
  padding: 12px 11px;
  color: #919e98;
  text-decoration: none;
  font-size: .63rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s ease;
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 7px;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--ease);
}

.topnav a:hover,
.topnav a.active { color: #fff; }
.topnav a:hover::after,
.topnav a.active::after { transform: scaleX(1); }

.topnav a.nav-cta {
  margin-left: 6px;
  padding: 9px 14px;
  border: 1px solid rgba(52, 232, 158, .55);
  background: rgba(52, 232, 158, .11);
  color: #fff;
  border-radius: 2px;
}
.topnav a.nav-cta::after { display: none; }
.topnav a.nav-cta:hover {
  border-color: var(--green);
  background: rgba(52, 232, 158, .20);
  box-shadow: 0 0 22px rgba(52, 232, 158, .20);
}

.menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 11, 9, .85);
  cursor: pointer;
  padding: 0;
  border-radius: 2px;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  background: #d9e6df;
  transition: .25s ease;
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: rgba(2, 5, 4, .98);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity .3s ease, visibility .3s ease;
}

.mobile-nav.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-inner {
  min-height: 100%;
  padding: calc(88px + env(safe-area-inset-top, 0px)) 24px calc(36px + env(safe-area-inset-bottom, 0px));
  display: grid;
  align-content: start;
  gap: 2px;
}

.mobile-nav a {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #d9e4df;
  text-decoration: none;
  font-size: clamp(1.25rem, 6vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -.025em;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.mobile-nav a.active { color: var(--green); }

.mobile-nav a span {
  color: var(--green);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .10em;
  flex-shrink: 0;
}

/* ==========================================================================
   SHARED TYPOGRAPHY, BUTTONS & PAGE SHELLS
   ========================================================================== */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--green);
  font-family: var(--mono);
  font-size: .63rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(52, 232, 158, .75);
  flex-shrink: 0;
}

.btn {
  min-height: 48px;
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgba(6, 11, 9, .78);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .65rem;
  font-weight: 600;
  text-align: center;
  transition: transform .24s ease, background .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.btn.primary {
  border-color: var(--green);
  background: rgba(52, 232, 158, .12);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  background: rgba(52, 232, 158, .18);
  box-shadow: 0 0 28px rgba(52, 232, 158, .16);
}

.mini-btn {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .04);
  color: #eef3f0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.mini-btn:hover,
.mini-btn.active {
  border-color: var(--green);
  background: rgba(52, 232, 158, .15);
  color: #fff;
}

.wrap {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}

.page-main {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: calc(108px + env(safe-area-inset-top, 0px)) 0 64px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4.6vw, 4.4rem);
  line-height: .96;
  font-weight: 300;
  letter-spacing: -.048em;
  overflow-wrap: break-word;
}

.page-head h1 em {
  color: var(--green);
  font-style: normal;
  text-shadow: 0 0 32px rgba(52, 232, 158, .22);
}

.page-head p {
  margin: 0 0 4px;
  color: #97a39d;
  font-size: .95rem;
  line-height: 1.72;
}

.section {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 30px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.95rem, 4vw, 3.8rem);
  line-height: .95;
  font-weight: 300;
  letter-spacing: -.045em;
}

.section-head h2 em {
  color: var(--green);
  font-style: normal;
}

.section-head p {
  margin: 0 0 4px;
  color: #939f99;
  font-size: .93rem;
  line-height: 1.72;
}

/* Syntax highlight tokens */
.tk { color: #ffffff; font-weight: 600; }
.tv { color: var(--green); }
.ts { color: #94f2c8; }
.tc { color: #61726a; font-style: italic; }

/* ==========================================================================
   HOME HERO + ZERO-CLIP 3D GATEWAY HUB
   ========================================================================== */
.hero {
  position: relative;
  z-index: 5;
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: calc(108px + env(safe-area-inset-top, 0px)) 0 48px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4.5vw, 68px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 6;
  animation: heroIn .9s .1s var(--ease) both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.9vw, 4.9rem);
  line-height: .96;
  font-weight: 300;
  letter-spacing: -.05em;
  overflow-wrap: break-word;
}

.hero h1 em {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-style: normal;
  text-shadow: 0 0 38px rgba(52, 232, 158, .24);
}

.hero p {
  max-width: 560px;
  margin: 22px 0 0;
  color: #a9b5af;
  font-size: clamp(.92rem, 1.15vw, 1.03rem);
  line-height: 1.74;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 30px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--line);
}

.meta-item strong {
  display: block;
  color: #e9f0ec;
  font-size: .66rem;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.meta-item span {
  display: block;
  margin-top: 5px;
  color: #6c7a73;
  font-size: .72rem;
  line-height: 1.5;
}

/* Gateway Hub: Natural height, NEVER clips content on any viewport */
.hub {
  position: relative;
  animation: panelIn .95s .2s var(--ease) both;
  perspective: 1100px;
}

.hub-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .03), transparent 38%),
    rgba(5, 10, 8, .84);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: rotateY(-2.5deg) rotateX(1.2deg);
  transition: transform .4s var(--ease);
}

.hub:hover .hub-shell { transform: rotateY(-.8deg) rotateX(.3deg); }

.hub-shell::before,
.hub-shell::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  z-index: 6;
  pointer-events: none;
}

.hub-shell::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--green);
  border-left: 1px solid var(--green);
}

.hub-shell::after {
  right: -1px; bottom: -1px;
  border-right: 1px solid rgba(255, 255, 255, .28);
  border-bottom: 1px solid rgba(255, 255, 255, .28);
}

.hub-head {
  position: relative;
  z-index: 4;
  padding: 18px 20px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.hub-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.hub-head p {
  margin: 5px 0 0;
  color: #78857e;
  font-size: .72rem;
}

.hub-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7f8f87;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px rgba(104, 247, 184, .65);
  animation: statusPulse 2s ease-in-out infinite;
}

.experience {
  display: grid;
  grid-template-columns: 158px minmax(0, 1fr);
}

.experience-nav {
  position: relative;
  z-index: 4;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: rgba(4, 8, 6, .76);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.experience-tab {
  width: 100%;
  min-height: 46px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: #7d8a83;
  cursor: pointer;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .61rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease, padding-left .2s ease;
}

.experience-tab:hover,
.experience-tab.active {
  padding-left: 14px;
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(52, 232, 158, .13), transparent);
  color: #fff;
}

.tab-index {
  color: var(--green);
  font-family: var(--mono);
  font-size: .56rem;
}

.experience-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 24%, rgba(52, 232, 158, .08), transparent 28%),
    linear-gradient(180deg, rgba(12, 22, 18, .48), rgba(3, 6, 5, .94));
}

.experience-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .026) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, #000, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
}

/* Natural-flow panels: ZERO clipping on desktop OR mobile! */
.experience-panel {
  display: none;
  position: relative;
  min-height: 455px;
  padding: 22px 22px 20px;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.experience-panel.active {
  display: flex;
  animation: panelFade .36s var(--ease) both;
}

.experience-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 24%, var(--tone), transparent 36%),
    linear-gradient(135deg, rgba(16, 28, 22, .35), transparent 60%);
}

.experience-symbol {
  position: absolute;
  right: 5%;
  top: 10%;
  color: rgba(255, 255, 255, .055);
  font-size: clamp(4.5rem, 9vw, 8.5rem);
  font-weight: 200;
  letter-spacing: -.08em;
  line-height: 1;
  text-shadow: 0 0 46px var(--tone);
  animation: symbolFloat 6s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

.panel-top { position: relative; z-index: 3; min-width: 0; }

.panel-top .kicker {
  color: var(--green);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.panel-top h3 {
  margin: 8px 0 6px;
  font-size: clamp(1.3rem, 2.2vw, 1.95rem);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -.03em;
}

.panel-top p {
  margin: 0;
  color: #a4b0aa;
  font-size: .81rem;
  line-height: 1.58;
}

.hub-widget {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(2, 6, 4, .88);
  border-radius: 2px;
  overflow: hidden;
  max-width: 100%;
}

.hub-widget-bar {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: .62rem;
  color: #88968f;
}

.hub-widget-bar b { color: var(--green); font-weight: 600; }

.hub-code {
  margin: 0;
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.58;
  color: #d4e0da;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.rule-flash {
  display: inline-block;
  padding: 0 4px;
  border-radius: 2px;
  transition: background .25s ease, color .25s ease;
}

.rule-flash.hit {
  background: rgba(52, 232, 158, .28);
  color: #fff;
}

.hub-live {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.hub-stat {
  font-family: var(--mono);
  font-size: 12.5px;
  color: #fff;
}

.hub-stat em {
  font-style: normal;
  color: var(--green);
  font-weight: 700;
}

.hub-input {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line-strong);
  color: #fff;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  flex: 1 1 130px;
  min-width: 0;
  max-width: 100%;
  transition: border-color .2s ease;
}

.hub-input:focus { border-color: var(--green); }

.hub-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid rgba(52, 232, 158, .35);
  background: rgba(52, 232, 158, .09);
  color: #c7f9e2;
  font-family: var(--mono);
  font-size: 11.5px;
  border-radius: 2px;
}

.hub-chip button {
  border: 0;
  background: transparent;
  color: #9aa5a0;
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}
.hub-chip button:hover { color: #fff; }

.email-mock {
  border: 1px solid rgba(255, 255, 255, .12);
  background: #080f0c;
  padding: 13px;
  border-radius: 2px;
  font-size: 12.5px;
}

.email-mock-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ok);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.quiz-msg {
  font-family: var(--mono);
  font-size: 11.5px;
  min-height: 18px;
  color: #9aa5a0;
  line-height: 1.5;
}

.term-out {
  margin: 0;
  padding: 12px;
  background: #020504;
  color: #c8dcd2;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.58;
  min-height: 108px;
  white-space: pre-wrap;
  word-break: break-word;
}

.experience-link {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
  font-size: .64rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  align-self: flex-start;
  padding: 4px 0;
}

.experience-link::after {
  content: "→";
  color: var(--green);
  transition: transform .2s ease;
}

.experience-link:hover::after { transform: translateX(4px); }

/* ==========================================================================
   HOME PORTAL CARDS (LINKS TO DEDICATED SECTION PAGES)
   ========================================================================== */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 42%),
    rgba(6, 11, 9, .82);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform .3s var(--ease), border-color .25s ease, box-shadow .25s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 232, 158, .48);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), 0 0 28px rgba(52, 232, 158, .09);
}

.portal-card h3 {
  margin: 10px 0 6px;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -.025em;
}

.portal-card p {
  margin: 0;
  color: #8f9c95;
  font-size: .80rem;
  line-height: 1.58;
}

.portal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .60rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green);
}

/* ==========================================================================
   DEDICATED SANDBOX PAGE COMPONENTS
   ========================================================================== */
.sandbox-shell {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 36%),
    rgba(6, 11, 9, .86);
  box-shadow: 0 30px 84px rgba(0, 0, 0, .55);
  backdrop-filter: blur(14px);
}

.sandbox-shell::before,
.sandbox-shell::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 3;
}
.sandbox-shell::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--green);
  border-left: 1px solid var(--green);
}
.sandbox-shell::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  border-right: 1px solid rgba(255, 255, 255, .28);
}

.sandbox-bar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 8, 6, .86);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.preset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  color: #909e97;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .2s ease;
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--green);
  background: rgba(52, 232, 158, .13);
  color: #fff;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
}

.sandbox-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sandbox-pane.editor-pane {
  border-right: 1px solid var(--line);
}

.pane-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 16, 13, .82);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #909e97;
}

.pane-head-left, .pane-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.editor-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  background: #030705;
  min-height: 440px;
}

.editor-gutter {
  margin: 0;
  padding: 14px 7px 14px 0;
  text-align: right;
  color: #485850;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.62;
  user-select: none;
  border-right: 1px solid rgba(255, 255, 255, .05);
  background: rgba(255, 255, 255, .012);
  overflow: hidden;
}

#sbCode {
  width: 100%;
  height: 100%;
  min-height: 440px;
  resize: vertical;
  border: 0;
  outline: none;
  padding: 14px 14px;
  background: transparent;
  color: #e6f0eb;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.62;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

.snippet-strip {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(6, 11, 9, .9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.snippet-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.diag-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ok);
}
.diag-badge.err { color: #f87171; }
.diag-badge.warn { color: var(--green); }

.preview-stage {
  flex: 1;
  position: relative;
  background: #040806;
  min-height: 440px;
  display: flex;
  flex-direction: column;
}

#sbFrame {
  flex: 1;
  width: 100%;
  min-height: 440px;
  border: 0;
  background: #060b09;
}

#sbInspector {
  display: none;
  flex: 1;
  margin: 0;
  padding: 16px;
  background: #030705;
  color: #c5dad0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  overflow: auto;
  max-height: 500px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   ECOSYSTEM PAGE: WORKFLOW COMPARE + 12-COL BENTO GRID WITH ORBIT RINGS
   ========================================================================== */
.workflow-compare {
  margin-bottom: 30px;
  border: 1px solid var(--line);
  background: rgba(6, 11, 9, .82);
  padding: 20px;
}

.wf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.wf-switch {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-strong);
  background: rgba(2, 5, 4, .9);
  padding: 3px;
  gap: 4px;
  max-width: 100%;
}

.wf-tab {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: #8c9a93;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .2s ease;
}

.wf-tab.active {
  background: rgba(52, 232, 158, .15);
  color: #fff;
  border-color: rgba(52, 232, 158, .48);
}

.wf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.wf-node {
  border: 1px solid var(--line);
  background: rgba(10, 17, 14, .75);
  padding: 15px;
  transition: border-color .25s ease;
}

.wf-node.extended {
  border-color: rgba(52, 232, 158, .38);
  background: linear-gradient(145deg, rgba(52, 232, 158, .08), rgba(6, 12, 9, .84));
}

.wf-node small {
  display: block;
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.wf-node strong {
  display: block;
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.wf-node p {
  margin: 0;
  font-size: .77rem;
  line-height: 1.56;
  color: #8e9b94;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 15px;
}

.feature-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 40%),
    rgba(6, 11, 9, .82);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .35s var(--ease), border-color .28s ease, box-shadow .28s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 232, 158, .48);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 32px rgba(52, 232, 158, .10);
}

.feature-card.large { grid-column: span 7; }
.feature-card.medium { grid-column: span 5; }
.feature-card.third { grid-column: span 4; }
.feature-card.half { grid-column: span 6; }

.card-index {
  color: var(--green);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.feature-card h3 {
  margin: 34px 0 10px;
  font-size: clamp(1.35rem, 2.3vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.06;
  padding-right: 26px;
}

.feature-card p {
  max-width: 520px;
  margin: 0;
  color: #8e9b94;
  font-size: .81rem;
  line-height: 1.62;
  padding-right: 22px;
}

.card-arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: var(--green);
  font-size: 1.35rem;
  transition: transform .22s ease;
}

.feature-card:hover .card-arrow { transform: translate(4px, -3px); }

.card-orbit {
  position: absolute;
  right: -75px;
  top: -75px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(52, 232, 158, .16);
  border-radius: 50%;
  pointer-events: none;
  transition: transform .6s var(--ease);
}

.card-orbit::before,
.card-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}

.card-orbit::before { inset: 25px; }
.card-orbit::after { inset: 56px; border-color: rgba(52, 232, 158, .11); }
.feature-card:hover .card-orbit { transform: rotate(24deg) scale(1.06); }

/* ==========================================================================
   DOWNLOADS & CLI DECK
   ========================================================================== */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.dl-card {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .02), transparent 40%),
    rgba(6, 11, 9, .82);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  transition: border-color .25s ease, transform .3s var(--ease);
}

.dl-card:hover {
  border-color: rgba(52, 232, 158, .44);
  transform: translateY(-4px);
}

.dl-meta {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

.dl-card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -.025em;
}

.dl-card p {
  margin: 0;
  color: #8e9b94;
  font-size: .81rem;
  line-height: 1.62;
}

.cli-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  margin-top: 28px;
}

.cli-panel {
  border: 1px solid var(--line);
  background: rgba(6, 11, 9, .84);
  padding: 22px;
}

/* ==========================================================================
   CLOSING LIGHT-BEAM CTA & FOOTER
   ========================================================================== */
.cta {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 48px));
  margin: 16px auto 56px;
  padding: 58px clamp(20px, 5vw, 70px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    radial-gradient(circle at 80% 50%, rgba(52, 232, 158, .14), transparent 30%),
    linear-gradient(135deg, rgba(12, 22, 18, .90), rgba(4, 8, 6, .94));
  text-align: center;
}

.cta::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30%;
  width: 1px;
  height: 160%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .42), rgba(52, 232, 158, .40), transparent);
  box-shadow: 0 0 24px rgba(255, 255, 255, .15), 0 0 60px rgba(52, 232, 158, .20);
}

.cta-inner { position: relative; z-index: 2; }

.cta h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 4.4rem);
  line-height: .98;
  font-weight: 300;
  letter-spacing: -.048em;
}

.cta h2 em { color: var(--green); font-style: normal; }

.cta p {
  max-width: 640px;
  margin: 18px auto 26px;
  color: #a1aea8;
  font-size: .92rem;
  line-height: 1.72;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

footer {
  position: relative;
  z-index: 5;
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 calc(34px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  border-top: 1px solid var(--line);
  color: #6b7a73;
  font-size: .63rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.7;
}

footer a { text-decoration: none; transition: color .2s ease; }
footer a:hover { color: #fff; }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fogDrift {
  0% { transform: translate3d(-3%, -1%, 0) scale(1); }
  100% { transform: translate3d(4%, 2%, 0) scale(1.08); }
}
@keyframes noiseShift {
  0% { transform: translate(0); }
  25% { transform: translate(1%, -1%); }
  50% { transform: translate(-1%, 1%); }
  75% { transform: translate(.5%, 1%); }
  100% { transform: translate(0); }
}
@keyframes gridTravel { to { background-position: 0 62px, 62px 0; } }
@keyframes beamPulse { 50% { opacity: .85; filter: brightness(1.35); } }
@keyframes starDrift {
  0% { transform: translate3d(0, 14vh, 0) scale(.7); opacity: 0; }
  12% { opacity: .7; }
  100% { transform: translate3d(var(--drift), -110vh, 0) scale(1.35); opacity: 0; }
}
@keyframes emberRise {
  0% { transform: translate3d(0, 20vh, 0) scale(.6); opacity: 0; }
  16% { opacity: .85; }
  100% { transform: translate3d(var(--drift), -105vh, 0) scale(1.25); opacity: 0; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(24px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes panelFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes statusPulse { 50% { opacity: .45; transform: scale(.72); } }
@keyframes symbolFloat {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(-10px) translateX(-6px) scale(1.03); }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (ZERO HORIZONTAL OVERFLOW, ZERO CLIPPING)
   ========================================================================== */
@media (max-width: 1120px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    width: min(880px, calc(100% - 36px));
    padding-top: calc(104px + env(safe-area-inset-top, 0px));
    gap: 36px;
  }
  .hub-shell { transform: none !important; }
  .page-head, .section-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sandbox-grid, .cli-grid { grid-template-columns: minmax(0, 1fr); }
  .sandbox-pane.editor-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .portal-grid, .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
  .topnav { display: none; }
  .menu-toggle { display: block; position: relative; z-index: 80; }
  .menu-toggle.open span { opacity: 0; }
  .menu-toggle.open::before { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle.open::after { transform: translateY(-6.5px) rotate(-45deg); }
}

@media (max-width: 860px) {
  .feature-card.large,
  .feature-card.medium,
  .feature-card.third,
  .feature-card.half { grid-column: span 12; }
  .portal-grid, .dl-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 68px;
    padding: env(safe-area-inset-top, 0px) 16px 0;
  }
  .brand { gap: 9px; }
  .brand-icon { width: 30px; height: 30px; border-radius: 7px; }
  .brand strong { font-size: .78rem; letter-spacing: .16em; }
  .brand span { font-size: .46rem; letter-spacing: .10em; margin-top: 3px; }

  .hero, .page-main, .section, .wrap, .cta, footer {
    width: calc(100% - 28px);
  }
  .hero { padding: calc(90px + env(safe-area-inset-top, 0px)) 0 34px; }
  .page-main { padding: calc(90px + env(safe-area-inset-top, 0px)) 0 44px; }
  .section { padding: 40px 0; }

  .hero h1 { font-size: clamp(2rem, 9.6vw, 3.1rem); line-height: 1.02; }
  .page-head h1 { font-size: clamp(1.9rem, 9vw, 2.9rem); line-height: 1.04; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .hero-meta { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .hub-head { padding: 16px 14px 12px; }
  .experience { grid-template-columns: minmax(0, 1fr); }
  .experience-nav {
    padding: 8px;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .experience-nav::-webkit-scrollbar { display: none; }
  .experience-tab {
    width: auto;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 12px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }
  .experience-tab:hover,
  .experience-tab.active {
    padding-left: 12px;
    border-left-color: transparent;
    border-bottom-color: var(--green);
  }
  .experience-panel { min-height: 0; padding: 18px 14px; }
  .experience-symbol { font-size: 4.2rem; top: 8px; right: 12px; }

  .editor-wrap, #sbCode, .preview-stage, #sbFrame { min-height: 320px; }
  .wf-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card { min-height: 0; padding: 20px; }
  .feature-card h3 { margin-top: 22px; }
  .cta { padding: 44px 18px; margin-bottom: 36px; }
  footer { display: block; }
  footer span:last-child { display: block; margin-top: 8px; }
}

@media (max-width: 390px) {
  .brand span { display: none; }
  .brand strong { font-size: .74rem; letter-spacing: .13em; }
  .hub-code { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
