:root {
  color-scheme: light;
  --ink: #07111f;
  --ink-2: #213247;
  --muted: #5c6b7d;
  --line: rgba(11, 27, 48, 0.12);
  --line-strong: rgba(11, 27, 48, 0.2);
  --paper: #f7fbff;
  --paper-2: #edf7fb;
  --white: #ffffff;
  --navy: #061426;
  --navy-2: #0a2136;
  --navy-3: #0d2c43;
  --cyan: #42d7ff;
  --cyan-2: #6ff4da;
  --green: #7ddc8f;
  --amber: #ffc96b;
  --rose: #ff7a90;
  --shadow: 0 24px 70px rgba(7, 17, 31, 0.18);
  --shadow-soft: 0 16px 44px rgba(7, 17, 31, 0.1);
  --radius: 8px;
  --max: 1180px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--navy);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

img,
iframe {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
dd,
li,
figcaption {
  overflow-wrap: break-word;
}

button {
  font: inherit;
}

::selection {
  color: var(--navy);
  background: var(--cyan);
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 1000;
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  color: var(--white);
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: rgba(6, 20, 38, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-weight: 800;
}

.brand-orb {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(66, 215, 255, 0.7);
  border-radius: 50%;
  background:
    radial-gradient(circle at 65% 35%, rgba(111, 244, 218, 0.8) 0 3px, transparent 4px),
    linear-gradient(135deg, rgba(66, 215, 255, 0.35), rgba(255, 201, 107, 0.2));
  box-shadow: 0 0 24px rgba(66, 215, 255, 0.3);
}

.nav-actions,
.nav-links {
  display: flex;
  align-items: center;
}

.nav-actions {
  gap: 10px;
  min-width: 0;
}

.nav-links {
  gap: 6px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  padding: 9px 12px;
  border-radius: var(--radius);
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.language-toggle {
  min-height: 38px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

body[data-language="en"] .lang-zh,
body[data-language="zh"] .lang-en {
  display: none !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.nav-toggle span:not(.sr-only) {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.section {
  position: relative;
  padding: 104px 22px;
}

.section-dark {
  color: var(--white);
  background:
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 46%, #071a2a 100%);
}

.section-light {
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfdff 0%, var(--paper) 52%, var(--paper-2) 100%);
}

.section-heading {
  max-width: var(--max);
  margin: 0 auto 38px;
}

.section-heading h2,
.hero h1,
.hero-tagline,
.story-card h3,
.impact-card h3,
.persona h3,
.process-card h3,
.walkthrough-copy h3,
.layer-card h3,
.data-card h3,
.safety-card h3,
.tech-card h3,
.setup-card h3,
.code-panel h3,
.takeaway-card h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading h2 {
  max-width: 900px;
  font-size: 3rem;
}

.section-heading p {
  max-width: 820px;
  margin: 18px 0 0;
  color: inherit;
  opacity: 0.78;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan-2);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.section-light .eyebrow {
  color: #08788b;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 22px 80px;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(135deg, rgba(66, 215, 255, 0.18), transparent 34%, rgba(255, 201, 107, 0.08) 72%, transparent);
  background-size: 64px 64px, 64px 64px, cover;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.25) 88%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 64px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
  max-width: 720px;
}

.hero h1 {
  font-size: 6.2rem;
  font-weight: 900;
}

.hero-tagline {
  margin: 12px 0 0;
  font-size: 2.05rem;
  font-weight: 800;
  color: #e8fbff;
}

.hero-value {
  margin: 24px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--radius);
  font-weight: 800;
}

.button {
  padding: 12px 17px;
  border: 1px solid transparent;
}

.button.primary {
  color: var(--navy);
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  box-shadow: 0 16px 40px rgba(66, 215, 255, 0.2);
}

.button.accent {
  color: var(--navy);
  background: linear-gradient(135deg, var(--amber), #fff1b5);
  box-shadow: 0 16px 40px rgba(255, 201, 107, 0.18);
}

.button.quiet {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
}

.button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.text-link {
  color: #08788b;
  min-height: auto;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}

.section-dark .text-link {
  color: var(--cyan-2);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 40px 0 0;
  padding: 1px;
  max-width: 820px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.signal-strip div {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.signal-strip dt {
  color: var(--cyan-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-strip dd {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.94rem;
}

.repo-link-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 820px;
  margin-top: 22px;
}

.repo-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  min-height: 38px;
  padding: 9px 15px 9px 12px;
  color: #eaff7a;
  background:
    linear-gradient(135deg, rgba(5, 18, 33, 0.98), rgba(18, 26, 31, 0.95)),
    linear-gradient(90deg, rgba(234, 255, 122, 0.22), transparent 58%);
  border: 1px solid rgba(234, 255, 122, 0.76);
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(234, 255, 122, 0.24),
    0 14px 32px rgba(0, 0, 0, 0.22);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.repo-pill::before {
  content: "</>";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  color: #071121;
  background: #eaff7a;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.repo-pill:hover,
.repo-pill:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(111, 244, 218, 0.32);
  box-shadow: 0 10px 24px rgba(5, 18, 33, 0.16);
}

.repo-pill:hover::before,
.repo-pill:focus-visible::before {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.poster-frame {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.poster-frame img {
  width: 100%;
  border-radius: 6px;
}

.poster-frame figcaption,
.media-card figcaption {
  color: inherit;
  opacity: 0.72;
  font-size: 0.88rem;
  margin-top: 10px;
}

.poster-glow {
  position: absolute;
  inset: -12px;
  border-radius: var(--radius);
  border: 1px solid rgba(66, 215, 255, 0.18);
  box-shadow: 0 0 60px rgba(66, 215, 255, 0.2);
  pointer-events: none;
}

.narrative-grid,
.impact-grid,
.process-grid,
.architecture-grid,
.data-grid,
.safety-grid,
.tech-grid,
.takeaway-grid,
.setup-grid {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.narrative-grid,
.impact-grid,
.process-grid,
.safety-grid,
.takeaway-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card,
.impact-card,
.process-card,
.layer-card,
.data-card,
.safety-card,
.tech-card,
.setup-card,
.code-panel,
.takeaway-card,
.persona-card,
.persona-detail {
  min-width: 0;
  border-radius: var(--radius);
}

.story-card,
.layer-card,
.data-card,
.tech-card,
.takeaway-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.story-card h3,
.impact-card h3,
.process-card h3,
.layer-card h3,
.data-card h3,
.safety-card h3,
.tech-card h3,
.setup-card h3,
.code-panel h3,
.takeaway-card h3 {
  font-size: 1.2rem;
}

.story-card p,
.impact-card p,
.process-card p,
.layer-card p,
.data-card p,
.safety-card p,
.tech-card p,
.setup-card p,
.takeaway-card p,
.persona-card p,
.persona-detail p {
  margin: 14px 0 0;
  color: var(--muted);
}

.card-kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: #08788b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison {
  width: min(100%, var(--max));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.comparison > div {
  min-width: 0;
  padding: 26px;
  background: rgba(255, 255, 255, 0.84);
}

.comparison h3 {
  margin: 0 0 16px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(66, 215, 255, 0.55);
}

.check-list.muted li::before {
  background: var(--amber);
  box-shadow: none;
}

.impact-card,
.process-card,
.safety-card,
.setup-card,
.code-panel {
  padding: 24px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
}

.impact-card p,
.process-card p,
.safety-card p,
.setup-card p {
  color: rgba(255, 255, 255, 0.72);
}

.importance-band,
.workflow-panel,
.persona-shell {
  width: min(100%, var(--max));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 26px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.section-light .persona-shell {
  border-color: var(--line-strong);
}

.importance-band h3,
.workflow-panel h3,
.persona-detail h3 {
  margin: 0;
  font-size: 1.55rem;
}

.importance-band p,
.workflow-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.persona-card,
.persona-detail {
  padding: 26px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.persona-card {
  position: relative;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 14px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(125, 220, 143, 0.5);
}

.persona-card h3 {
  font-size: 1.8rem;
}

.persona-email {
  color: #08788b;
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag-cloud span {
  max-width: 100%;
  padding: 7px 10px;
  color: #07485c;
  background: rgba(66, 215, 255, 0.15);
  border: 1px solid rgba(8, 120, 139, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.story,
.story-preview {
  background:
    linear-gradient(180deg, #fbfdff 0%, #eef9fb 100%);
}

.story-preview {
  position: relative;
  background: #ffffff;
  padding-bottom: 0;
}

.story-paper.story-preview-paper {
  position: relative;
  width: min(100%, 960px);
  max-height: 620px;
  overflow: hidden;
  padding: 6px 0 112px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.story-paper.story-preview-paper > .eyebrow {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.08rem;
  line-height: 1.2;
  opacity: 0.78;
}

.story-paper.story-preview-paper h2 {
  max-width: 900px;
  margin: 0 auto;
  color: #071121;
  font-size: clamp(2.15rem, 3.1vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.story-paper.story-preview-paper .essay-text {
  max-width: 900px;
  margin-top: 28px;
  margin-left: auto;
  margin-right: auto;
}

.story-paper.story-preview-paper .essay-text p {
  color: #09203b;
  font-size: 1.08rem;
  line-height: 1.82;
  margin-bottom: 18px;
}

.story-preview-fade {
  position: absolute;
  z-index: 2;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 188px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.72) 48%, #ffffff 82%);
  backdrop-filter: blur(1.5px);
  pointer-events: none;
}

.story-expand-link {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 10px 8px 20px;
  color: #0b2036;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(8, 120, 139, 0.22);
  border-radius: 999px;
  box-shadow: 0 14px 38px rgba(8, 120, 139, 0.14);
  backdrop-filter: blur(16px);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.story-expand-link:hover,
.story-expand-link:focus-visible {
  color: #071121;
  border-color: rgba(8, 120, 139, 0.42);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 44px rgba(8, 120, 139, 0.18);
  transform: translateX(-50%) translateY(-2px);
}

.story-expand-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(8, 120, 139, 0.08);
  border: 1px solid rgba(8, 120, 139, 0.18);
}

.story-expand-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--cyan-2);
  border-bottom: 2px solid var(--cyan-2);
  transform: translate(-50%, -50%) rotate(45deg);
}

.story-paper {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 54px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.story-paper h2 {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--ink);
  font-size: 2.8rem;
  line-height: 1.08;
}

.essay-text p {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-size: 1.08rem;
  line-height: 1.82;
}

.essay-text p:last-child {
  margin-bottom: 0;
}

.story-page-body {
  background: var(--paper);
}

.story-hero {
  position: relative;
  padding: 118px 22px 72px;
  overflow: hidden;
}

.story-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 0 auto;
}

.story-hero-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 26px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.story-hero-back:hover,
.story-hero-back:focus-visible {
  color: #071121;
  background: var(--cyan-2);
  border-color: var(--cyan-2);
  transform: translateX(-3px);
}

.story-hero-back-icon {
  width: 38px;
  height: 38px;
  overflow: visible;
}

.story-hero-back-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.story-back {
  margin-bottom: 34px;
}

.story-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--white);
  font-size: 4rem;
  line-height: 1.02;
}

.story-deck {
  max-width: 780px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.16rem;
}

.story-full {
  padding-top: 72px;
}

.story-reading-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 900px) minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.story-reading-shell .story-paper {
  grid-column: 2;
  width: 100%;
  margin: 0;
}

.story-side-rail {
  position: sticky;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  top: max(128px, calc(100vh - 216px));
  width: 124px;
  display: grid;
  gap: 10px;
}

.story-side-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #0b2036;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 120, 139, 0.18);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(8, 120, 139, 0.1);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.story-side-button:hover,
.story-side-button:focus-visible {
  color: #071121;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(8, 120, 139, 0.36);
  box-shadow: 0 12px 30px rgba(8, 120, 139, 0.16);
  transform: translateY(-1px);
}

.story-side-button:first-child {
  color: var(--white);
  background: linear-gradient(135deg, #071121, #0d3044);
  border-color: rgba(66, 215, 255, 0.22);
  box-shadow: 0 14px 34px rgba(5, 18, 33, 0.2);
}

.story-side-button:first-child:hover,
.story-side-button:first-child:focus-visible {
  color: var(--white);
  background: linear-gradient(135deg, #0b2036, #0d5265);
  border-color: rgba(111, 244, 218, 0.42);
}

.story-side-button:last-child {
  color: #0b2036;
  background: rgba(255, 255, 255, 0.86);
}

.image-showcase {
  width: min(100%, var(--max));
  margin: 0 auto 30px;
}

.image-showcase-wide {
  margin-bottom: 34px;
}

.media-card {
  margin: 0;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.section-dark .media-card {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.media-card img {
  width: 100%;
  border-radius: 6px;
  cursor: zoom-in;
  background: #dfe9f1;
}

.diagram-card {
  padding: 14px;
}

.process-card span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--navy);
  background: var(--cyan-2);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline {
  margin: 0;
  padding-left: 22px;
  color: rgba(255, 255, 255, 0.78);
}

.timeline li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.walkthrough-block {
  width: min(100%, var(--max));
  margin: 0 auto 72px;
}

.walkthrough-block:last-child {
  margin-bottom: 0;
}

.walkthrough-copy {
  max-width: 860px;
  margin-bottom: 24px;
}

.walkthrough-copy h3 {
  font-size: 2rem;
}

.walkthrough-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
}

.gallery {
  display: grid;
  gap: 18px;
}

.gallery.one-col {
  grid-template-columns: minmax(0, 1fr);
}

.gallery.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mobile-showcase-block {
  padding: 28px 0 6px;
}

.mobile-stage {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(6, 20, 38, 0.98), rgba(10, 33, 54, 0.98)),
    linear-gradient(90deg, rgba(66, 215, 255, 0.18), rgba(125, 220, 143, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mobile-stage-copy {
  max-width: 460px;
}

.mobile-stage-copy h4 {
  margin: 12px 0 14px;
  font-size: 1.55rem;
  line-height: 1.18;
}

.mobile-stage-copy p:not(.eyebrow) {
  margin: 0;
  color: rgba(246, 253, 255, 0.74);
}

.phone-rail,
.phone-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.phone-rail {
  align-items: end;
}

.phone-gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 22px;
}

.phone-gallery-complete {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.phone-card {
  min-width: 0;
  margin: 0;
}

.phone-card img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  background: var(--navy);
  border: 1px solid rgba(11, 27, 48, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(7, 17, 31, 0.18);
}

.mobile-stage .phone-card img {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.35);
}

.phone-card-featured {
  transform: none;
}

.phone-card figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.mobile-stage .phone-card figcaption {
  color: rgba(246, 253, 255, 0.82);
}

.phone-gallery-details {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.phone-gallery-details summary {
  cursor: pointer;
  width: fit-content;
  padding: 10px 14px;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
}

.phone-gallery-details summary:hover {
  border-color: rgba(66, 215, 255, 0.6);
}

.video-grid {
  display: grid;
  gap: 20px;
}

.video-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  background: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.video-frame,
.video-copy {
  min-width: 0;
  background: var(--white);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #061426;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
}

.video-frame.embed-ready iframe {
  display: block;
}

.video-frame.embed-ready .video-launch {
  display: none;
}

.video-launch {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--white);
  background: #061426;
}

.video-launch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  filter: saturate(1.05) contrast(1.04);
  transform: scale(1.02);
}

.video-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(66, 215, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(6, 20, 38, 0.08), rgba(6, 20, 38, 0.72));
}

.play-button {
  position: absolute;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  box-shadow: 0 18px 60px rgba(66, 215, 255, 0.35);
}

.play-button::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid var(--navy);
}

.video-launch-copy {
  position: absolute;
  z-index: 1;
  left: 24px;
  bottom: 22px;
  padding: 10px 12px;
  color: var(--white);
  background: rgba(6, 20, 38, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font-weight: 900;
}

.video-copy {
  padding: 22px;
}

.video-copy h4 {
  margin: 16px 0 10px;
  font-size: 1.18rem;
}

.video-copy p {
  margin: 0 0 14px;
  color: var(--muted);
}

.video-thumb {
  width: 168px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.demo-gallery {
  margin-top: 22px;
}

.architecture-grid,
.data-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.architecture .architecture-grid {
  counter-reset: architecture-layer;
  gap: 18px;
}

.architecture .layer-card {
  position: relative;
  counter-increment: architecture-layer;
  min-height: 168px;
  padding: 26px 70px 26px 28px;
  color: #071121;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(227, 247, 251, 0.94)),
    radial-gradient(circle at 88% 8%, rgba(66, 215, 255, 0.32), transparent 34%);
  border: 1px solid rgba(111, 244, 218, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 42px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.architecture .layer-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 191, 196, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 44%);
  pointer-events: none;
}

.architecture .layer-card::after {
  content: counter(architecture-layer, decimal-leading-zero);
  position: absolute;
  top: 20px;
  right: 22px;
  color: rgba(8, 120, 139, 0.22);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
}

.architecture .layer-card h3 {
  position: relative;
  z-index: 1;
  max-width: 320px;
  color: #071121;
  font-size: 1.18rem;
  line-height: 1.18;
  font-weight: 900;
}

.architecture .layer-card p {
  position: relative;
  z-index: 1;
  color: #29445f;
  font-size: 1rem;
  line-height: 1.62;
}

.data-card:nth-child(7),
.data-card:nth-child(8) {
  grid-column: span 1;
}

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

.code-stack {
  width: min(100%, var(--max));
  margin: 22px auto 0;
  display: grid;
  gap: 18px;
}

.code-panel h3,
.setup-card h3 {
  margin-bottom: 14px;
}

.code-block {
  position: relative;
  margin: 0;
  padding: 20px;
  overflow: auto;
  color: #eaffff;
  background: #04101d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.code-block.compact {
  margin-top: 12px;
}

.code-block code {
  display: block;
  padding-right: 62px;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  min-width: 54px;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--navy);
  background: var(--cyan-2);
  border: 0;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.setup-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
}

.doc-links {
  width: min(100%, var(--max));
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.doc-links a {
  padding: 12px 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  font-weight: 800;
}

.takeaway {
  padding-bottom: 118px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px 22px;
  color: rgba(255, 255, 255, 0.72);
  background: #04101d;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer > div {
  min-width: 0;
  flex: 1 1 auto;
}

.site-footer > a {
  flex: 0 0 auto;
}

.site-footer p {
  margin: 10px 0 0;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  min-height: 42px;
  padding: 0 14px;
  color: var(--navy);
  background: var(--cyan-2);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 58px 18px 24px;
  background: rgba(3, 10, 19, 0.86);
  backdrop-filter: blur(12px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox figure {
  margin: 0;
  width: min(100%, 1200px);
  max-height: calc(100vh - 92px);
  display: grid;
  gap: 12px;
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 142px);
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.lightbox figcaption {
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 0 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

  .poster-frame {
    width: min(100%, 420px);
    margin: 0 auto;
  }

  .narrative-grid,
  .impact-grid,
  .process-grid,
  .architecture-grid,
  .data-grid,
  .safety-grid,
  .takeaway-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery.three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-stage {
    grid-template-columns: 1fr;
  }

  .mobile-stage-copy {
    max-width: 680px;
  }

  .phone-gallery,
  .phone-gallery-complete {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .video-card,
  .importance-band,
  .workflow-panel,
  .persona-shell {
    grid-template-columns: 1fr;
  }

  .story-reading-shell {
    grid-template-columns: 1fr;
  }

  .story-reading-shell .story-paper,
  .story-side-rail {
    grid-column: 1;
  }

  .story-side-rail {
    position: static;
    order: -1;
    justify-self: center;
    width: min(100%, 180px);
    margin-bottom: 18px;
  }

  .story-side-button {
    padding: 10px 12px;
    font-size: 0.72rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 10px 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    background: rgba(6, 20, 38, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .section {
    padding: 76px 16px;
  }

  .hero {
    padding: 84px 16px 64px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero-tagline {
    font-size: 1.5rem;
  }

  .section-heading h2 {
    font-size: 2.1rem;
  }

  .walkthrough-copy h3 {
    font-size: 1.55rem;
  }

  .signal-strip,
  .comparison,
  .narrative-grid,
  .impact-grid,
  .process-grid,
  .architecture-grid,
  .data-grid,
  .safety-grid,
  .tech-grid,
  .takeaway-grid,
  .setup-grid,
  .gallery.two-col,
  .gallery.three-col {
    grid-template-columns: 1fr;
  }

  .mobile-stage {
    padding: 20px;
  }

  .phone-rail {
    grid-template-columns: repeat(3, minmax(116px, 1fr));
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  .phone-rail .phone-card {
    scroll-snap-align: start;
  }

  .phone-gallery,
  .phone-gallery-complete {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .phone-card-featured {
    transform: none;
  }

  .signal-strip {
    gap: 0;
  }

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

  .video-card {
    grid-template-columns: 1fr;
  }

  .video-copy {
    padding: 18px;
  }

  .media-card,
  .diagram-card {
    padding: 8px;
  }

  .story-card,
  .impact-card,
  .process-card,
  .layer-card,
  .data-card,
  .safety-card,
  .tech-card,
  .setup-card,
  .code-panel,
  .takeaway-card,
  .story-paper,
  .persona-card,
  .persona-detail {
    padding: 20px;
  }

  .story-paper.story-preview-paper {
    max-height: 610px;
    padding: 0 0 112px;
  }

  .story-paper.story-preview-paper h2,
  .story-paper h2 {
    font-size: 2rem;
  }

  .story-paper.story-preview-paper .essay-text p {
    font-size: 1.02rem;
    line-height: 1.78;
  }

  .story-preview-fade {
    height: 205px;
  }

  .story-expand-link {
    bottom: 24px;
    width: calc(100% - 32px);
    justify-content: center;
  }

  .story-reading-shell {
    grid-template-columns: 1fr;
  }

  .story-side-rail {
    position: static;
    order: -1;
    width: min(100%, 180px);
    margin: 0 auto 18px;
  }

  .architecture .layer-card {
    min-height: auto;
    padding: 22px 58px 22px 20px;
  }

  .architecture .layer-card::after {
    top: 18px;
    right: 18px;
    font-size: 1.5rem;
  }

  .story-hero {
    padding: 96px 16px 58px;
  }

  .story-hero h1 {
    font-size: 2.55rem;
  }

  .essay-text p {
    font-size: 1rem;
    line-height: 1.75;
  }

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

  .code-block {
    padding: 18px 14px;
  }

  .code-block code {
    padding-right: 0;
    padding-top: 24px;
    font-size: 0.82rem;
  }

  .copy-btn {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 420px) {
  .hero h1 {
    font-size: 3.1rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .section-heading h2 {
    font-size: 1.75rem;
  }

  .button {
    width: 100%;
  }

  .brand-mark {
    max-width: 180px;
  }

  .phone-gallery,
  .phone-gallery-complete {
    grid-template-columns: 1fr;
  }

  .phone-card {
    width: min(100%, 260px);
    margin: 0 auto;
  }

  .phone-rail .phone-card {
    width: auto;
    margin: 0;
  }
}
