* {
  box-sizing: border-box;
}

@font-face {
  font-family: "PixelWarden";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/PixelWarden.woff") format("woff");
}

@font-face {
  font-family: "Smallest Pixel-7";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/smallest_pixel-7.woff") format("woff");
}

@font-face {
  font-family: "Mini Pixel-7";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/mini_pixel-7.woff") format("woff");
}

@font-face {
  font-family: "Serif Pixel-7";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/serif_pixel-7.woff") format("woff");
}

:root {
  /* Type roles */
  --font-h1: "PixelWarden", Georgia, "Times New Roman", serif;
  --font-h2: "Smallest Pixel-7", "Courier New", Courier, monospace;
  --font-h3: "Serif Pixel-7", Georgia, serif;
  --font-body: "Mini Pixel-7", "Courier New", Courier, monospace;
  --font-small: "Smallest Pixel-7", "Courier New", Courier, monospace;
  --font-accent: "Serif Pixel-7", Georgia, serif;

  /* Agentic void + copper / gold star palette */
  --void-ink: #0b0b10;
  --ink: #f3f0ff;
  --ink-muted: #b9b2c4;
  --agentic-bg: #0a090f;
  --system-grey: #1e1d24;
  --system-line: #2f2e38;
  --card: rgba(30, 29, 36, 0.85);
  --line: #3a3846;
  --star-dim: #4f4f51;
  --star-bright: #f58f7c;
  --star-highlight: #f2c4ce;
  --hero-yellow: #f2d98b;
  --hero-panel: #d3d0d3;
  --hero-panel-ink: #1a1a1e;
  --hero-cta: #1fce6d;
  --teal: #27d4bc;
  --accent: #e85d75;
  --yellow: #ffd447;
}

/* Fixed canvas + cinematic overlays sit behind the page */
.void-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.void-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.void-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.4;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* Scroll-link affordance: keyboard users jump past the hero */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.4rem 0.75rem;
  background: var(--star-bright);
  color: #0b0b10;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translateY(0);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(16px, 1.02rem, 20px);
  color: var(--ink);
  line-height: 1.65;
  background: var(--agentic-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p,
li,
button,
input,
textarea {
  font-size: clamp(15px, 0.98rem, 19px);
}

/* Mood hooks for tiny UI tweaks (optional) */
body.star-mood--calm {
  --step-line: #4a4658;
}
body.star-mood--uneasy {
  --step-line: #5c3a45;
}
body.star-mood--danger {
  --step-line: #5c2a2a;
}
body.star-mood--technical {
  --step-line: #3d4a4f;
}

h1 {
  margin: 0;
  font-family: var(--font-h1);
  font-weight: 500;
  line-height: 1.05;
}

h2 {
  margin: 0;
  font-family: var(--font-h2);
  font-weight: 400;
  line-height: 1.15;
}

h3 {
  margin: 0;
  font-family: var(--font-h3);
  font-weight: 400;
  line-height: 1.2;
}

/* Accent: serif pixel + italic (synthetic oblique if no italic master) */
em,
.text-link,
.eyebrow {
  font-family: var(--font-accent);
  font-style: italic;
}

/* Meta / captions (bitmap-friendly minimum size) */
.byline,
.footer,
.footer p,
.hero-arrow__label,
.skip-link,
.factory-status {
  font-family: var(--font-small);
  font-size: clamp(14px, 0.95rem, 20px);
  color: #2e2424;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-surface {
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
}

/* —— Wireframe-style hero (matches your mock: big panel, cards, CTA) —— */
.hero-landing {
  margin: 1.5rem auto 0;
  padding: clamp(1.2rem, 2.5vw, 2rem);
  background: var(--hero-panel);
  color: var(--hero-panel-ink);
  border: 3px solid #8a8686;
  border-radius: 6px;
  box-shadow: 0 6px 0 #6f6c6a;
}

.hero-landing__head {
  max-width: 60ch;
  margin-bottom: 1.25rem;
}

.hero-title {
  margin: 0 0 0.35em;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.05;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 0 0 1px #000, 2px 2px 0 #00000055;
  background: #1f1f22;
  display: inline-block;
  padding: 0.35em 0.5em 0.25em;
  border: 2px solid #0e0e10;
}


.byline {
  color: #3a3a3e;
}

.text-link {
  color: var(--star-bright);
  font-weight: 600;
}

/* Three-column + center: left tall | center CTA | right stacked */
.hero-landing__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
  align-items: start;
  min-height: 280px;
}

.hero-landing__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem 1rem;
}

.plain-article {
  margin: 2rem auto 0;
  padding: clamp(1.2rem, 3vw, 1.5rem);
  color: #ece8f4;
  background: rgba(20, 19, 28, 0.72);
  border: 1px solid var(--system-line);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.plain-article h2 {
  color: #fff9f0;
  margin-bottom: 0.6em;
  font-size: 1.35rem;
}

.plain-article p {
  color: #d8d2e5;
  max-width: 65ch;
}

/* Unified boxed-section readability (all content boxes) */
.hook-continuation,
.plain-article,
.normal-section,
.output-box {
  max-width: 100%;
}

.hook-continuation {
  margin-top: 1rem;
  padding: clamp(1.25rem, 3.2vw, 2rem);
}

.hook-continuation p,
.plain-article p,
.normal-section p,
.output-box p {
  max-width: none;
  width: 100%;
  font-size: clamp(22px, 1.55vw, 30px);
  line-height: 1.52;
  letter-spacing: 0;
}

.hook-continuation h2,
.plain-article h2,
.normal-section h2,
.output-box h2 {
  margin-bottom: 0.5rem;
}

/* Strong override so every boxed content area matches (including new sections) */
:is(#hook-continuation, #draft-placeholders, #plain-article, #section-factory, #section-defend, .output-box) p {
  max-width: none !important;
  width: 100% !important;
  font-size: clamp(26px, 1.9vw, 36px) !important;
  line-height: 1.52 !important;
  letter-spacing: 0 !important;
}

:is(#hook-continuation, #draft-placeholders, #plain-article, #section-factory, #section-defend, .output-box) h2 {
  font-size: clamp(30px, 2.2vw, 44px);
  margin-bottom: 0.55rem;
}

.placeholder-note {
  color: #ffe9a8;
  border: 1px dashed #8a7a45;
  background: rgba(120, 92, 22, 0.18);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
}

.hero-landing__right {
  display: flex;
  flex-direction: column;
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
  min-width: 0;
}

/* Dark “blocks” in the mock, with gold placeholder copy */
.hero-card {
  min-height: 0;
  margin: 0;
  background: #2a282d;
  border: 2px solid #0f0e12;
  border-radius: 8px;
  padding: 0.9rem 0.85rem;
  color: var(--hero-yellow);
  font-size: clamp(15px, 0.98rem, 19px);
  line-height: 1.55;
}

.hero-card--tall {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card--wide {
  min-height: 0;
}

.hero-card.is-link {
  text-decoration: none;
  cursor: pointer;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 0 #0e0c10;
}
.hero-card.is-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0e0c10;
}
.hero-card.is-link:focus {
  outline: 2px solid var(--star-bright);
  outline-offset: 3px;
}

.hero-card__text {
  margin: 0;
}


.hero-card--medium {
  background: linear-gradient(135deg, #111214, #1d1f24);
  border-color: #000;
  color: #f5f5f5;
  min-height: 120px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.7rem;
}

.hero-card--medium.is-link {
  box-shadow: 0 5px 0 #000;
}

.hero-card--medium.is-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 #000;
}

.hero-card__medium-logo {
  width: min(170px, 80%);
  height: auto;
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
}

.hero-card__text_MediumBlog {
  font-family: var(--font-small);
  font-size: clamp(14px, 0.95rem, 18px);
  letter-spacing: 0.03em;
  color: #f0f0f0;
}

/* Bright green CTA = “Interactive version” from the wireframe */
.hero-cta {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  width: 100%;
  max-width: 300px;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 3px solid #0a3d22;
  color: #071210;
  background: var(--hero-cta);
  box-shadow: 0 4px 0 #0b7a3f;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0b7a3f;
}
.hero-cta:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Big “scroll down” chevron, wireframe style */
.hero-arrow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #f5f0ff;
  user-select: none;
  width: 100%;
  max-width: 200px;
}

.hero-arrow__label {
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem 1.2rem;
  text-align: center;
}

.hero-arrow__point {
  position: relative;
  width: 0;
  height: 0;
  border-left: 52px solid transparent;
  border-right: 52px solid transparent;
  border-top: 64px solid #1f1f24;
  filter: drop-shadow(0 2px 0 #00000088);
}
.hero-arrow__point::after {
  content: "";
  position: absolute;
  top: -56px;
  left: -36px;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
  border-top: 48px solid #0f0f14;
  opacity: 0.65;
  pointer-events: none;
}

.eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--star-bright);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.scrolly {
  display: block;
  position: relative;
  min-height: 300vh;
  margin-top: 2.5rem;
  padding: 0;
}

.scrolly__graphic {
  position: sticky;
  top: 1.25rem;
  height: fit-content;
  width: min(420px, 92vw);
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.phone-shell {
  position: relative;
  width: 100%;
  margin: 0 auto;
  aspect-ratio: 500 / 890;
  border-radius: 20px;
  background: #090b12;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: clip;
}

.phone-shell__frame {
  display: none;
}

.phone-screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 20px;
  overflow: hidden;
  background: #050507;
}

.phone-reel {
  width: 100%;
  height: 300%;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  will-change: transform;
  transition: transform 180ms linear;
}

.phone-slide {
  flex: 0 0 calc(100% / 3);
  width: 100%;
  height: calc(100% / 3);
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #050507;
}

.scrolly__text {
  display: none !important;
}

.normal-section {
  margin: 2rem auto 0;
  color: #e9e3f2;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.2rem, 3vw, 2rem);
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.normal-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.image-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.image-row figure {
  margin: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.image-row img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: min(52vh, 460px);
  object-fit: contain;
  border-radius: 10px;
}

.normal-section img,
.output-box img,
.plain-article img {
  max-width: 100%;
  height: auto;
}

.image-row figcaption {
  margin-top: 0.45rem;
  font-size: clamp(13px, 0.9rem, 16px);
  color: #d0c7de;
}

.button {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 2px solid #110f18;
  background: linear-gradient(120deg, var(--star-bright), #b84d45);
  color: #ffffff;
  font-size: clamp(15px, 0.98rem, 18px);
  font-weight: 400;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
  transition: transform 120ms ease, box-shadow 0.2s;
  box-shadow: 0 4px 0 #3b1518;
}

.game-controls span {
  color: #f1eafb;
  font-size: clamp(14px, 0.92rem, 18px);
}

.button:hover {
  transform: translateY(-2px);
}

.hero-cta {
  color: #ffffff;
  font-weight: 400;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

.footer {
  padding: 2.5rem 0 1rem;
  color: #9b92a8;
}

/* Subpages (factory + game): calmer "system" panels on the same void */
.page {
  position: relative;
  z-index: 1;
  color: #ece6f2;
  padding: 2.5rem 0 4rem;
}

.page h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.7rem;
}

.card-grid {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
}

.card {
  border: 1px solid var(--line);
  background: rgba(22, 21, 30, 0.88);
  border-radius: 14px;
  color: #f0ebf8;
  padding: 0.9rem 0.8rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s;
}

.card:hover {
  background: rgba(32, 30, 45, 0.95);
  border-color: var(--star-bright);
}

.diagram-layout {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.diagram-stage {
  position: relative;
  min-height: 420px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(24, 22, 35, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.factory-map {
  position: relative;
  min-height: 620px;
  border-radius: 14px;
  background: #f4f5f8;
  border: 2px solid #1c1b22;
  color: #10111a;
}

.factory-flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.flow-path {
  fill: none;
  stroke: #7f8fc9;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 9 8;
  opacity: 0.55;
  animation: flowDash 13s linear infinite;
  transition: stroke 160ms ease, opacity 160ms ease, stroke-width 160ms ease;
}

.flow-path.is-secondary {
  stroke-width: 2;
  opacity: 0.35;
}

.flow-path.is-lit {
  stroke: #325ed6;
  stroke-width: 3;
  opacity: 1;
  animation-duration: 4.8s;
  filter: drop-shadow(0 0 3px rgba(50, 94, 214, 0.35));
}

@keyframes flowDash {
  to {
    stroke-dashoffset: -120;
  }
}

.agent-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  border-radius: 10px;
  border: 2px solid #b7bbca;
  background: #ffffff;
  color: #1a1c29;
  text-align: center;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.agent-node .node-title {
  font-family: var(--font-small);
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 700;
  color: #15172a;
}

.agent-node .node-desc {
  font-family: var(--font-body);
  font-size: clamp(12px, 0.86vw, 14px);
  color: #3d425d;
}

.agent-node .node-sub {
  font-family: var(--font-body);
  font-size: clamp(11px, 0.75vw, 13px);
  color: #5c617e;
}

.agent-node:hover,
.agent-node:focus-visible {
  transform: translateY(-1px);
}

.agent-node.is-active,
.workflow-side.is-active,
.workflow-step.is-active,
.agent-node:focus-visible {
  border-color: #2f5edb;
  box-shadow: 0 0 0 3px rgba(47, 94, 219, 0.14);
  background: #eef3ff;
}

.agent-node.is-related,
.workflow-side.is-related {
  border-color: #8da6eb;
  box-shadow: 0 0 0 2px rgba(141, 166, 235, 0.16);
}

.card-tools {
  left: 5%;
  top: 23%;
  width: 23%;
  min-height: 176px;
}

.card-plan {
  right: 5%;
  top: 23%;
  width: 23%;
  min-height: 176px;
}

.card-memory {
  left: 34%;
  top: 8%;
  width: 32%;
  min-height: 82px;
}

.card-brain {
  left: 31%;
  top: 28%;
  width: 38%;
  min-height: 146px;
  background: #f5d9dc;
  border-color: #cda5ab;
}

.card-action {
  left: 36%;
  bottom: 11%;
  width: 28%;
  min-height: 92px;
}

.card-reflect {
  right: 7%;
  bottom: 8%;
  width: 18%;
  min-height: 78px;
}

.workflow-lane {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  border: 2px solid #b7bbca;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.55rem;
}

.workflow-side {
  flex: 0 0 170px;
  border-radius: 10px;
  border: 2px solid #b7bbca;
  background: #ffffff;
  color: #141725;
  padding: 0.7rem;
  text-align: left;
  cursor: pointer;
}

.workflow-side p {
  margin: 0.2rem 0 0;
  font-size: clamp(12px, 0.8rem, 14px);
  line-height: 1.35;
}

.workflow-side__title {
  margin: 0;
  font-family: var(--font-small);
  font-size: clamp(12px, 0.85rem, 15px);
  text-transform: uppercase;
}

.workflow-steps {
  flex: 1 0 520px;
  border-radius: 10px;
  border: 2px solid #9a7ce6;
  background: #ffffff;
  color: #141725;
  padding: 0.65rem;
}

.workflow-steps__title {
  margin: 0 0 0.4rem;
  text-align: center;
  font-family: var(--font-small);
  font-size: clamp(12px, 0.84rem, 15px);
  text-transform: uppercase;
}

.workflow-steps__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.workflow-step {
  border-radius: 8px;
  border: 2px solid #b7bbca;
  background: #f7f8fb;
  color: #1a1d2d;
  padding: 0.48rem 0.4rem;
  font-family: var(--font-small);
  font-size: clamp(12px, 0.86rem, 15px);
  cursor: pointer;
}
.workflow-step.is-complete {
  border-color: #2f5edb;
  box-shadow: 0 0 0 2px rgba(47, 94, 219, 0.14);
  background: #eef3ff;
}

.workflow-example-box {
  margin-top: 0.9rem;
}

.workflow-detail-row {
  margin-top: 0.6rem;
  display: flex;
  align-items: stretch;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.workflow-detail {
  padding: 0.45rem 0.5rem;
  font-size: clamp(11px, 0.78rem, 13px);
  color: #23263a;
  line-height: 1.35;
  background: #fafbff;
}

.workflow-phase {
  flex: 0 0 180px;
  border: 2px solid #b7bbca;
  border-radius: 8px;
}

.workflow-phase-btn {
  flex: 0 0 190px;
  border: 2px solid #b7bbca;
  border-radius: 8px;
  background: #fafbff;
  color: #23263a;
  padding: 0.45rem 0.5rem;
  text-align: left;
  font-size: clamp(11px, 0.78rem, 13px);
  line-height: 1.35;
  cursor: pointer;
}

.workflow-phase-btn strong {
  font-family: var(--font-small);
}

.workflow-phase-btn.is-active {
  border-color: #2f5edb;
  box-shadow: 0 0 0 2px rgba(47, 94, 219, 0.16);
  background: #eef3ff;
}

.workflow-arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  color: #1f2440;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 860px) {
  .factory-map {
    min-height: 760px;
  }

  .card-tools,
  .card-plan {
    width: 42%;
    min-height: 156px;
  }

  .card-tools {
    left: 4%;
    top: 24%;
  }

  .card-plan {
    right: 4%;
    top: 24%;
  }

  .card-memory {
    left: 12%;
    top: 8%;
    width: 76%;
  }

  .card-brain {
    left: 12%;
    top: 46%;
    width: 76%;
    min-height: 126px;
  }

  .card-action {
    left: 12%;
    bottom: 11%;
    width: 50%;
  }

  .card-reflect {
    right: 12%;
    bottom: 7%;
    width: 34%;
  }

  .workflow-steps {
    flex-basis: 380px;
  }

  .workflow-detail-row {
    flex-wrap: nowrap;
  }

  .workflow-phase {
    flex-basis: 230px;
  }

  .workflow-phase-btn {
    flex-basis: 230px;
  }
}

.diagram-popup {
  margin-top: 0;
}

.diagram-popup p,
.diagram-popup li {
  font-family: var(--font-body);
  font-size: clamp(14px, 0.98rem, 18px) !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}

.diagram-popup ul {
  margin-left: 1.1rem;
}

.output-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #ded7ea;
  background: rgba(18, 17, 25, 0.88);
  backdrop-filter: blur(4px);
}
.output-box p {
  color: #c9c0d9;
}

.output-box ul {
  margin: 0.2rem 0 0.8rem 1.2rem;
  padding: 0;
}

.output-box li {
  margin: 0.2rem 0;
  color: #d4cce2;
}

.output-box h2,
.output-box h3 {
  color: #fff9f6;
  margin: 0 0 0.4em;
}

.embedded-part3 {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100%;
  height: min(78vh, 760px);
  min-height: 640px;
  border: 2px solid #2d3344;
  border-radius: 12px;
  background: #000;
  display: block;
  margin-top: 0.6rem;
  overflow: hidden;
}

.defense-panel {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.game-controls {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

#gameCanvas {
  width: min(100%, 760px);
  border: 3px solid #1f1d28;
  border-radius: 12px;
  background: #080b19;
  image-rendering: pixelated;
}

.bug-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(3, 3, 10, 0.76);
  backdrop-filter: blur(4px);
}

.bug-overlay.is-hidden {
  display: none;
}

.bug-overlay__card {
  width: min(760px, 94vw);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 15, 26, 0.96);
  color: #e9e4f2;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.bug-overlay__hint {
  color: #d0c7de;
}

.bug-overlay__anim {
  position: relative;
  margin: 0.75rem 0 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  height: 110px;
  background: linear-gradient(180deg, #0f1326, #10111c);
  overflow: hidden;
}

.bug-overlay__ship-part {
  position: absolute;
  left: 24px;
  top: 32px;
  width: 150px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid #3d5f6a;
  background: linear-gradient(180deg, #89f0de, #43baa8);
  box-shadow: 0 0 22px rgba(75, 210, 193, 0.35);
}

.bug-overlay__attacker {
  position: absolute;
  top: 41px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffef9f, #ff6e8a 70%);
  box-shadow: 0 0 20px rgba(255, 96, 135, 0.45);
  animation: bugAttack 1.1s ease-in-out infinite;
}

@keyframes bugAttack {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(-180px) scale(1.12);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 960px) {
  .hero-landing__grid {
    grid-template-columns: 1fr;
  }

  .hero-card--tall {
    min-height: auto;
  }

  .diagram-layout {
    grid-template-columns: 1fr;
  }

  .diagram-stage {
    min-height: 380px;
  }

  .image-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .scrolly {
    min-height: 260vh;
  }

  .scrolly__graphic {
    position: relative;
    top: 0;
    justify-content: center;
  }

  .phone-shell {
    width: min(360px, 94vw);
  }

  .scrolly__graphic {
    width: min(360px, 94vw);
  }
}

.hero-landing.shell {
  width: min(1400px, 97vw);
}

.hero-landing__head {
  max-width: none;
  margin-bottom: 0.95rem;
}

.hero-title {
  display: block;
  width: 100%;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  padding: 0.48em 0.62em 0.4em;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin-top: 0.45rem;
  margin-left: clamp(12px, 1.8vw, 28px);
  font-size: clamp(0.96rem, 1.7vw, 1.28rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  max-width: min(88ch, calc(100% - clamp(12px, 1.8vw, 28px)));
  color: #2a2a2f;
}


.byline {
  margin-top: 0.4rem;
  margin-left: clamp(12px, 1.8vw, 28px);
  font-size: 0.85rem;
  letter-spacing: 0.07em;
  color: #55535d;
}

@media (max-width: 640px) {
  .hero-subtitle,
  .byline {
    margin-left: 8px;
  }
}