:root {
  color-scheme: light;

  --color-bg: #fbfaf7;
  --color-bg-alt: #f2efe8;
  --color-fg: #171717;
  --color-fg-muted: #5f646b;
  --color-accent: #2f6f5e;
  --color-accent-fg: #ffffff;
  --color-border: #ddd8cf;
  --color-success: #2f7d4f;
  --color-warning: #8a6200;
  --color-danger: #b42318;
  --color-surface: #ffffff;
  --color-surface-alt: #e8eee9;
  --color-footer-bg: #171717;
  --color-footer-fg: #fbfaf7;
  --color-footer-muted: #cfcac1;
  --color-control-bg: rgba(255, 255, 255, 0.92);
  --color-control-border: #d6d0c6;
  --color-control-shadow: 0 12px 30px rgba(23, 23, 23, 0.08);
  --color-status-bg: rgba(255, 255, 255, 0.82);
  --space-page: clamp(20px, 5vw, 72px);
  --content-wide: 1120px;
  --content-narrow: 760px;

  --font-heading: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --text-xs: 0.8rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5625rem;
  --text-3xl: 1.953rem;
  --text-4xl: 2.441rem;
  --leading-xs: 1.35;
  --leading-sm: 1.45;
  --leading-base: 1.55;
  --leading-lg: 1.5;
  --leading-xl: 1.35;
  --leading-2xl: 1.2;
  --leading-3xl: 1.12;
  --leading-4xl: 1.04;
  --leading-tight: 1.05;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Motion tokens */
  --motion-fast: 120ms;
  --motion-base: 240ms;
  --motion-slow: 480ms;
  --motion-cinematic: 880ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ticker-duration: 60s;

  /* Factory floor active color tokens */
  --color-floor-active: #f5d68b;
  --color-floor-active-bg: rgba(245, 214, 139, 0.12);
  --color-floor-active-border: rgba(245, 214, 139, 0.50);
  --color-floor-active-glow: rgba(245, 214, 139, 0.3);

  /* Factory preview card — always-dark surface tokens (theme-invariant) */
  --fp-bg: #181d25;
  --fp-fg: #f0ece3;
  --fp-fg-secondary: #b8b4ad;
  --fp-accent: #84d6bb;
  --fp-stage-border: rgba(255, 255, 255, 0.14);
  --fp-stage-inactive: #9a9690;
  --fp-work-order-bg: #f5e6b0;
  --fp-work-order-fg: #1a1a1a;
  --fp-work-order-label: rgba(26, 26, 26, 0.75);
  --fp-work-order-desc: rgba(26, 26, 26, 0.75);
  --fp-work-order-status: #1a4a35;
  --fp-inspect-border: rgba(255, 255, 255, 0.1);
  --fp-inspect-label: rgba(240, 236, 227, 0.65);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-bg: #101418;
    --color-bg-alt: #151b22;
    --color-fg: #f5f1e8;
    --color-fg-muted: #c4ccd5;
    --color-accent: #84d6bb;
    --color-accent-fg: #102019;
    --color-border: #2a333f;
    --color-success: #86d39c;
    --color-warning: #f2c875;
    --color-danger: #ff938d;
    --color-surface: #1b222b;
    --color-surface-alt: #222c37;
    --color-footer-bg: #090d12;
    --color-footer-fg: #f5f1e8;
    --color-footer-muted: #aeb8c5;
    --color-control-bg: rgba(27, 34, 43, 0.94);
    --color-control-border: #394656;
    --color-control-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
    --color-status-bg: rgba(27, 34, 43, 0.88);
    --color-floor-active-bg: rgba(245, 214, 139, 0.08);
    --color-floor-active-border: rgba(245, 214, 139, 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #101418;
  --color-bg-alt: #151b22;
  --color-fg: #f5f1e8;
  --color-fg-muted: #c4ccd5;
  --color-accent: #84d6bb;
  --color-accent-fg: #102019;
  --color-border: #2a333f;
  --color-success: #86d39c;
  --color-warning: #f2c875;
  --color-danger: #ff938d;
  --color-surface: #1b222b;
  --color-surface-alt: #222c37;
  --color-footer-bg: #090d12;
  --color-footer-fg: #f5f1e8;
  --color-footer-muted: #aeb8c5;
  --color-control-bg: rgba(27, 34, 43, 0.94);
  --color-control-border: #394656;
  --color-control-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
  --color-status-bg: rgba(27, 34, 43, 0.88);
  --color-floor-active-bg: rgba(245, 214, 139, 0.08);
  --color-floor-active-border: rgba(245, 214, 139, 0.35);
}

:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-base: 0ms;
    --motion-slow: 0ms;
    --motion-cinematic: 0ms;
    --ticker-duration: 0s;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
  color: var(--color-fg);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

body.home-shell {
  --font-heading: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

a {
  color: var(--color-accent);
}

a:visited {
  color: var(--color-accent);
}

a:hover {
  color: color-mix(in srgb, var(--color-accent), var(--color-fg) 18%);
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
}

code,
kbd,
pre,
samp {
  font-family: var(--font-mono);
}

.dark_background {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-fg);
}

.light_background {
  background-color: var(--color-bg-alt);
  color: var(--color-fg);
}

footer {
  text-align: center;
}

footer.light_background {
  padding: 20px 0;
}

.site-header,
.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px var(--space-page) 20px;
}

.product-header {
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.site-brand {
  margin: 0;
  line-height: 0;
}

.wordmark-link {
  display: inline-block;
  line-height: 0;
  text-decoration: none;
}

.wordmark-lockup {
  display: grid;
  place-items: center;
  width: auto;
  aspect-ratio: auto;
}

.wordmark-lockup > * {
  grid-area: 1 / 1;
}

.product-header .wordmark-lockup {
  width: min(420px, 78vw);
}

img.wordmark {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 763 / 76;
}

.wordmark-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: var(--leading-base);
  text-transform: uppercase;
  color: var(--color-fg);
}

.theme-asset-stack {
  display: grid;
  place-items: center;
}

.theme-asset-stack > * {
  grid-area: 1 / 1;
}

.theme-asset {
  display: block;
}

img.theme-asset--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) img.theme-asset--light {
    display: none;
  }

  :root:not([data-theme]) img.theme-asset--dark {
    display: block;
  }
}

:root[data-theme="dark"] img.theme-asset--light {
  display: none;
}

:root[data-theme="dark"] img.theme-asset--dark {
  display: block;
}

.home {
  display: flex;
  flex-direction: column;
}

.home-hero {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(64px, 12vw, 128px) 0 clamp(48px, 9vw, 96px);
  text-align: left;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.hero-left {
  display: flex;
  flex-direction: column;
}

.hero-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-identity .eyebrow {
  margin: 0;
}

.active-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg);
}

.active-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-success);
  border-radius: 50%;
  flex-shrink: 0;
}

.concept-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.concept-disclaimer {
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  margin-top: 8px;
  margin-bottom: 0;
}

.hero-ctas {
  margin-top: 28px;
}

.demo-proof-path {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.demo-proof-path li {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
}

.demo-proof-path span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: var(--leading-xs);
  color: var(--color-fg-muted);
  text-transform: uppercase;
}

.demo-proof-path a {
  align-self: end;
  color: var(--color-fg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-sm);
  overflow-wrap: anywhere;
}

.demo-proof-path a:hover,
.demo-proof-path a:focus-visible {
  color: var(--color-accent);
}

.hero-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 40px);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.hero-proof-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-proof-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-fg);
  line-height: 1;
}

.hero-proof-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

/* Factory preview card — always dark regardless of theme */
.factory-preview-card {
  background: var(--fp-bg);
  border-radius: 12px;
  overflow: hidden;
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.factory-preview-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fp-accent);
}

.factory-preview-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--fp-fg);
  letter-spacing: 0;
}

.factory-preview-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fp-fg-secondary);
  line-height: var(--leading-relaxed);
}

.pipeline-stages {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-stage {
  flex: 1 1 auto;
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid var(--fp-stage-border);
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  color: var(--fp-stage-inactive);
  white-space: nowrap;
}

.pipeline-stage--active {
  background: var(--fp-work-order-bg);
  border-color: var(--fp-work-order-bg);
  color: var(--fp-work-order-fg);
  font-weight: 700;
}

.work-order-card {
  background: var(--fp-work-order-bg);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-order-label {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fp-work-order-label);
}

.work-order-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fp-work-order-fg);
  line-height: var(--leading-sm);
}

.work-order-status {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fp-work-order-status);
}

.work-order-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fp-work-order-desc);
  line-height: var(--leading-sm);
}

.work-order-correction {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--fp-work-order-fg);
}

.work-order-correction a {
  color: inherit;
}

.work-order-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.work-order-links a {
  padding: 3px 8px;
  border: 1px solid rgba(26, 26, 26, 0.22);
  border-radius: 4px;
  color: var(--fp-work-order-fg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
}

.work-order-links a:hover,
.work-order-links a:focus-visible {
  border-color: var(--fp-work-order-fg);
  text-decoration: underline;
}

.work-order-trace {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(26, 26, 26, 0.18);
  list-style: none;
}

.work-order-trace li {
  display: grid;
  grid-template-columns: minmax(104px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font-size: var(--text-xs);
  line-height: var(--leading-sm);
}

.trace-label {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--fp-work-order-label);
}

.work-order-trace a,
.work-order-trace span:not(.trace-label) {
  color: var(--fp-work-order-fg);
}

.factory-inspect-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--fp-inspect-border);
}

.factory-inspect-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fp-inspect-label);
}

.factory-inspect-text {
  font-size: var(--text-sm);
  color: var(--fp-fg-secondary);
  line-height: var(--leading-sm);
}

.home-hero h1,
.featured-copy h2,
.section-heading h2,
.about-block h2,
.how-we-build h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: var(--leading-4xl);
}

.home-hero h1 {
  max-width: none;
  font-size: clamp(var(--text-3xl), 5vw, 4.75rem);
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.hero-cta {
  margin-top: 28px;
}

.how-we-build {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(48px, 9vw, 84px) 0;
  border-top: 1px solid var(--color-border);
}

.how-we-build h2 {
  max-width: 720px;
  font-size: clamp(var(--text-3xl), 4vw, 3.2rem);
}

.how-we-build .operating-loop-copy {
  max-width: 720px;
  margin-bottom: 48px;
}

.how-we-build .operating-loop-copy p {
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.receipts-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 64px);
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--color-border);
}

.receipt-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.receipt-value {
  font-family: var(--font-mono);
  font-size: clamp(var(--text-3xl), 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-fg);
}

.receipt-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.exhibits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

a.receipt-item {
  color: inherit;
  text-decoration: none;
}

a.receipt-item .receipt-value {
  color: var(--color-accent);
}

a.receipt-item:hover .receipt-value,
a.receipt-item:focus-visible .receipt-value {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
}

.exhibit-item a:visited {
  color: var(--color-fg);
}

.exhibit-item a {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 12px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-fg);
  transition: border-color 0.15s, transform 0.15s;
}

.exhibit-item a:hover,
.exhibit-item a:focus-visible {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.exhibit-title {
  display: block;
  font-weight: 700;
  font-size: var(--text-base);
  line-height: var(--leading-sm);
  color: var(--color-fg);
}

.exhibit-meta {
  display: block;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(48px, 9vw, 84px) 0;
  border-top: 1px solid var(--color-border);
}

.featured-media {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: clamp(28px, 5vw, 56px);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.featured-media img {
  width: min(280px, 70vw);
  border-radius: 24%;
  box-shadow: none;
}

.featured-copy h2 {
  font-size: clamp(var(--text-3xl), 5vw, 4.25rem);
}

.featured-copy p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-base);
}

.align-start {
  justify-content: flex-start;
}

.all-products {
  padding: clamp(56px, 9vw, 96px) var(--space-page);
  background: var(--color-bg-alt);
}

.section-heading,
.all-products .product-grid,
.about-block {
  width: min(var(--content-wide), 100%);
  margin-inline: auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 620px;
  font-size: clamp(var(--text-3xl), 4vw, 3.4rem);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.product-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 12px;
  padding: 22px;
  color: var(--color-fg);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.product-link:visited {
  color: var(--color-fg);
}

.product-link:hover,
.product-link:focus-visible {
  color: var(--color-fg);
  transform: translateY(-2px);
}

.product-icon {
  width: 64px;
  height: 64px;
  border-radius: 23%;
  object-fit: cover;
}

.product-name {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
}

.product-desc {
  display: block;
  color: var(--color-fg-muted);
  line-height: var(--leading-sm);
}

.factory-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: max-content;
}

.factory-status-badge--active {
  background: var(--color-floor-active);
  color: var(--color-fg);
}

.factory-status-badge--in-production {
  background: var(--color-success);
  color: var(--color-accent-fg);
}

.factory-status-badge--concept {
  background: var(--color-bg-alt);
  color: var(--color-fg-muted);
  border: 1px solid var(--color-border);
}

.product-concept-notice {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.concept-notice-text {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.text-link {
  display: block;
  margin-top: auto;
  color: var(--color-accent);
  font-weight: 700;
}

.about-block {
  padding: clamp(56px, 9vw, 96px) 0;
}

.about-block h2 {
  max-width: 880px;
  font-size: clamp(var(--text-3xl), 4vw, 3.2rem);
}

.about-block p:not(.eyebrow) {
  max-width: 700px;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.about-page {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding-bottom: clamp(56px, 9vw, 96px);
}

.about-hero {
  width: min(var(--content-narrow), 100%);
  padding: clamp(56px, 10vw, 112px) 0 clamp(40px, 7vw, 72px);
}

.about-hero h1,
.about-hero h2,
.around-web h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: var(--leading-tight);
}

.about-hero h1 {
  max-width: 760px;
  font-size: clamp(var(--text-4xl), 6vw, 4.75rem);
}

.about-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.around-web {
  padding: clamp(40px, 7vw, 72px) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-heading.compact {
  align-items: start;
  margin-bottom: 22px;
}

.section-heading.compact h2 {
  max-width: 520px;
  font-size: clamp(var(--text-2xl), 3vw, 2.35rem);
}

.work-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 100%;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-fg);
  text-decoration: none;
}

.work-link:visited {
  color: var(--color-fg);
}

.work-link:hover,
.work-link:focus-visible {
  color: var(--color-fg);
  border-color: var(--color-accent);
}

.work-link img,
.work-link-icon {
  width: 56px;
  height: 56px;
}

.work-link img {
  object-fit: cover;
  border-radius: 8px;
}

.work-link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.work-link strong,
.work-link span span {
  display: block;
}

.work-link strong {
  margin-bottom: 4px;
}

.work-link span span {
  color: var(--color-fg-muted);
  line-height: var(--leading-sm);
}

.contact-line {
  padding-top: clamp(36px, 6vw, 56px);
}

.contact-line p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  padding: clamp(32px, 5vw, 56px) var(--space-page);
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
  text-align: left;
}

.site-footer h2,
.site-footer h3 {
  margin: 0;
  color: var(--color-footer-fg);
  letter-spacing: 0;
  line-height: var(--leading-2xl);
}

.site-footer h3 {
  margin-bottom: 12px;
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.site-footer a {
  color: var(--color-footer-fg);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--color-footer-muted);
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--color-footer-fg);
  outline-offset: 3px;
}

.site-footer p {
  margin: 0;
  color: var(--color-footer-muted);
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-section {
  min-width: 0;
}

.footer-brand {
  margin-bottom: 14px;
  font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));
}

.footer-demo-summary {
  display: grid;
  gap: 10px;
}

.footer-copyright {
  margin-top: 16px;
}

.github-icon {
  background-color: var(--color-surface);
  padding: 15px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
}
.app_store_label {
  display: block;
  font-size: var(--text-sm);
}
.stars {
  display: flex;
  gap: 1px;
}

.new-indicator {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 999px;
  background-color: var(--color-warning);
  color: var(--color-accent-fg);
}

.updated-indicator {
  display: inline-block;
  margin-top: 0.15rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 999px;
  background-color: var(--color-success);
  color: var(--color-accent-fg);
}

/* Product pages */
.back-link {
  display: block;
  padding: 12px 20px;
  background-color: var(--color-bg-alt);
  color: var(--color-accent);
  text-decoration: none;
  font-size: var(--text-sm);
}
.back-link:hover {
  text-decoration: underline;
}
.product-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(48px, 8vw, 88px) 20px;
  text-align: center;
}
.product-hero img.product-icon {
  width: 120px;
  height: 120px;
  border-radius: 23%;
}
.product-hero h1 {
  margin: 0;
  font-size: clamp(var(--text-4xl), 8vw, 5.5rem);
  line-height: 1;
}
.product-tagline {
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl));
  max-width: 640px;
  margin: 0;
  line-height: 1.5;
  color: var(--color-fg-muted);
}
.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  max-width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: var(--leading-xl);
  min-width: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-accent-fg);
}
.btn-primary:visited {
  color: var(--color-accent-fg);
}
.btn-primary:hover {
  background-color: color-mix(in srgb, var(--color-accent), var(--color-fg) 16%);
}
.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-secondary:visited {
  color: var(--color-accent);
}
.btn-secondary:hover {
  background-color: var(--color-surface-alt);
}

.featured-primary-cta {
  background-color: var(--color-accent);
  color: var(--color-bg);
  border: 2px solid transparent;
}

.featured-primary-cta:visited {
  color: var(--color-bg);
}

.featured-primary-cta:hover {
  background-color: color-mix(in srgb, var(--color-accent), var(--color-bg) 10%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.product-wordmark {
  max-height: 128px;
  height: 10svh;
}
.product-page section {
  padding: 32px 24px;
}
.product-section-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.product-section-inner h2 {
  margin-top: 0;
  text-align: center;
}
.product-section-inner p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}
.product-screenshots {
  overflow: hidden;
}
.screenshot-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 4px;
}
.screenshot-strip figure {
  flex: 0 0 180px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}
.screenshot-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18%;
}

.screenshot-strip.phone-screenshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  overflow: visible;
}

.screenshot-strip.phone-screenshots figure {
  flex: initial;
  padding: 0;
  overflow: hidden;
}

.screenshot-strip.phone-screenshots img {
  display: block;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list span {
  margin-top: 8px;
  color: var(--color-fg-muted);
}
.screenshot-strip figcaption {
  margin-top: 10px;
  font-size: var(--text-sm);
  line-height: var(--leading-xs);
}
.feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.5;
}
.feature-list:has(.feature-card) {
  padding-left: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature-list .feature-card {
  list-style: none;
}
.product-secondary-links {
  padding-top: 0;
}
.button-icon {
  height: 1em;
  margin-right: 6px;
  vertical-align: middle;
}

.btn-icon {
  width: auto;
  height: 1em;
}

.app-store-badge {
  display: block;
  width: auto;
  height: 40px;
}

.app-store-badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 0;
  background: transparent;
  line-height: 0;
}

.align-start .app-store-badge-link {
  align-self: flex-start;
}

.app-store-badge-link:hover,
.app-store-badge-link:focus-visible {
  transform: translateY(-1px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .app-store-badge-link {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  }
}

:root[data-theme="dark"] .app-store-badge-link {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.product-detail {
  background: var(--color-bg);
}

.product-hero-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-meta-strip {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
}

.product-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  margin: 0;
  padding: 0;
}

.product-meta-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.product-meta-item dt {
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-meta-item dd {
  margin: 0;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.feature-card {
  list-style: none;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.feature-eyebrow {
  margin: 0 0 8px;
  font-size: var(--text-xs);
}

.feature-card strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.origin-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 0;
  padding: 4px 0 4px 10px;
  border-left: 2px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  color: var(--color-accent);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}

.origin-badge span,
.origin-badge a {
  display: inline;
  margin-top: 0;
}

.origin-badge__kicker {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.origin-badge__separator,
.origin-badge__meta {
  color: var(--color-fg-muted);
}

.origin-badge__label {
  color: var(--color-fg);
}

.origin-badge__pr,
.origin-badge__receipt {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 2px;
}

.receipt-trail-link {
  color: var(--color-accent);
  font-weight: 600;
}

.product-factory-link {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 0;
  border-top: 1px solid var(--color-border);
}

.cta-group--left {
  justify-content: flex-start;
}

.product-story,
.product-features,
.product-screenshots {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) 0;
}

.product-story {
  border-top: 1px solid var(--color-border);
}

.product-story h2,
.product-screenshots h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(var(--text-3xl), 4vw, 3.3rem);
  line-height: var(--leading-3xl);
}

.product-story p:not(.eyebrow),
.product-screenshots p:not(.eyebrow),
.product-section-heading p {
  max-width: 720px;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.product-section-heading {
  align-items: start;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  min-width: 0;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.feature-list h3 {
  margin: 0;
  font-size: var(--text-base);
}

.feature-list p {
  margin: 10px 0 0;
  color: var(--color-fg-muted);
}

.product-screenshots {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  border-top: 1px solid var(--color-border);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
  align-items: start;
}

.screenshot-frame {
  margin: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.screenshot-frame img {
  display: block;
  width: 100%;
}

.privacy-page {
  width: min(var(--content-narrow), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(56px, 10vw, 104px) 0;
}

.privacy-page h1,
.privacy-page h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: var(--leading-tight);
}

.privacy-page h1 {
  font-size: clamp(var(--text-4xl), 6vw, 4rem);
}

.privacy-page p {
  margin: 20px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
}

.privacy-page section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.privacy-page h2 {
  font-size: var(--text-xl);
}

/* Theme toggle */
.theme-toggle {
  display: grid;
  justify-items: end;
  gap: 8px;
  flex-shrink: 0;
  visibility: hidden;
}

html[data-theme-ui="ready"] .theme-toggle {
  visibility: visible;
}

.theme-toggle-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  white-space: nowrap;
}

.theme-toggle-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-toggle-group {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--color-control-border);
  border-radius: 999px;
  background: var(--color-control-bg);
  box-shadow: var(--color-control-shadow);
}

.theme-toggle-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-fg-muted);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.theme-toggle-option:hover {
  color: var(--color-fg);
}

.theme-toggle-option:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.theme-toggle-option[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-accent-fg);
}

.theme-toggle-option[aria-pressed="true"]:hover {
  color: var(--color-accent-fg);
}

.theme-toggle-option:active {
  transform: scale(0.97);
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.theme-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  min-width: 13.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-status-bg);
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
}

.sr-only {
  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 {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  overflow: visible;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--color-accent);
  color: var(--color-accent-fg);
  font-weight: 600;
  font-size: var(--text-base);
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Factory Floor Section */
.factory-floor {
  --floor-active: #f5d68b;
  --floor-active-bg: rgba(245, 214, 139, 0.10);
  --floor-active-border: rgba(245, 214, 139, 0.34);
  --floor-surface: rgba(255, 255, 255, 0.05);
  --floor-border: rgba(255, 255, 255, 0.10);
  --floor-rail: rgba(132, 214, 187, 0.44);
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
}

.factory-floor .eyebrow {
  color: var(--floor-active);
}

.factory-floor-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(48px, 9vw, 84px) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 72px);
}

.factory-floor-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: start;
}

.factory-floor-intro h2 {
  margin: 0;
  font-size: clamp(var(--text-3xl), 5vw, 3.75rem);
  line-height: var(--leading-3xl);
  max-width: 680px;
  color: var(--color-footer-fg);
}

.factory-floor-desc {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--color-footer-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.factory-state-block {
  flex-shrink: 0;
  padding: 20px 24px;
  background: var(--floor-surface);
  border: 1px solid var(--floor-border);
  border-radius: 8px;
  min-width: 160px;
}

.factory-state-label {
  margin: 0 0 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-footer-muted);
}

.factory-state-value-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.factory-state-value-group:last-child {
  margin-bottom: 0;
}

.factory-state-value {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
  color: var(--color-footer-fg);
}

.factory-state-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-footer-muted);
}

.factory-pipeline-path {
  margin: 0 0 24px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-footer-muted);
  word-break: break-word;
  overflow-wrap: break-word;
}

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

.factory-station {
  padding: 20px;
  background: var(--floor-surface);
  border: 1px solid var(--floor-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.factory-station--active {
  background: var(--floor-active-bg);
  border-color: var(--floor-active-border);
}

.station-label {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-footer-muted);
}

.factory-station--active .station-label {
  color: var(--floor-active);
}

.station-name {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-footer-fg);
}

.station-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-footer-muted);
  line-height: var(--leading-sm);
  flex: 1;
}

.station-tags {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.station-tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-footer-muted);
}

.factory-station--active .station-tag {
  background: var(--floor-active-bg);
  color: var(--floor-active);
}

.factory-line-board {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--floor-border);
  border-radius: 8px;
}

.factory-line-board-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
}

.factory-line-board-head h3 {
  margin: 4px 0 0;
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  color: var(--color-footer-fg);
}

.factory-line-board-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--floor-active);
  text-align: right;
}

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

.factory-lane {
  min-width: 0;
  padding: 10px;
  background: rgba(10, 14, 18, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 8px;
}

.factory-lane-head {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.factory-lane-department {
  margin: 0 0 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-footer-muted);
}

.factory-lane h4 {
  margin: 0;
  color: var(--color-footer-fg);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.factory-lane-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--floor-active-bg);
  color: var(--floor-active);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
}

.factory-lane-orders {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.factory-work-order-card {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.factory-work-order-card:hover,
.factory-work-order-card:focus-visible {
  border-color: var(--floor-active-border);
  background: rgba(245, 214, 139, 0.08);
  transform: translateY(-1px);
}

.factory-work-order-card:focus-visible {
  outline: 2px solid var(--floor-active);
  outline-offset: 2px;
}

.factory-work-order-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--floor-active);
}

.factory-work-order-title {
  color: var(--color-footer-fg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-sm);
}

.factory-work-order-meta,
.factory-work-order-artifact {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--color-footer-muted);
}

.factory-work-order-meta {
  font-family: var(--font-mono);
}

.factory-work-order-artifact {
  flex: 1;
}

.receipt-fill-meter {
  position: relative;
  display: block;
  height: 5px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.receipt-fill-meter-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #84d6bb, var(--floor-active));
}

.receipt-field-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.receipt-field-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.receipt-field-dot--populated {
  background: #84d6bb;
  border-color: rgba(132, 214, 187, 0.65);
}

.receipt-field-dot--pending {
  background: transparent;
}

.factory-event-rail {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--floor-border);
  border-radius: 8px;
  overflow: hidden;
}

.factory-event-rail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}

.factory-event-rail-current {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--floor-active);
  text-align: right;
}

.factory-packet-track {
  position: relative;
  height: 38px;
  margin: 0 44px 14px;
}

.factory-packet-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 2px;
  background:
    linear-gradient(90deg, var(--floor-rail), var(--floor-active) var(--packet-stop), rgba(255, 255, 255, 0.13) var(--packet-stop)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 255, 255, 0.18) 22px 24px);
}

.factory-work-packet {
  position: absolute;
  left: var(--packet-stop);
  top: 0;
  min-width: 104px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--floor-active-border);
  border-radius: 6px;
  background: #14191f;
  color: var(--floor-active);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 0 24px -8px var(--color-floor-active-glow);
  transform: translateX(-50%);
  animation: factory-packet-travel 5.8s var(--ease-in-out) infinite;
}

.factory-work-packet-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--floor-active);
  box-shadow: 0 0 12px var(--floor-active);
  flex: 0 0 auto;
}

.factory-events {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.factory-event {
  min-height: 116px;
  padding: 10px;
  border: 1px solid var(--floor-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 5px;
}

.factory-event--complete {
  border-color: rgba(132, 214, 187, 0.28);
}

.factory-event--loop {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.065);
}

.factory-event--active {
  border-color: var(--floor-active-border);
  background: var(--floor-active-bg);
  box-shadow: inset 0 0 0 1px rgba(245, 214, 139, 0.12);
}

.factory-event-index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-footer-muted);
}

.factory-event-label {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-sm);
  color: var(--color-footer-fg);
}

.factory-event--active .factory-event-index,
.factory-event--active .factory-event-label {
  color: var(--floor-active);
}

.factory-event-caption {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  color: var(--color-footer-muted);
  overflow-wrap: anywhere;
}

@keyframes factory-packet-travel {
  0% {
    left: 0%;
    opacity: 0.42;
  }
  18% {
    opacity: 1;
  }
  72% {
    left: var(--packet-stop);
    opacity: 1;
  }
  100% {
    left: var(--packet-stop);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .factory-work-packet {
    animation: none;
    left: var(--packet-stop);
  }
}

.factory-active-zone {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.active-work-card,
.receipt-assembling-card,
.current-output-card {
  padding: 24px;
  border: 1px solid var(--floor-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-work-card {
  background: var(--floor-active-bg);
  border-color: var(--floor-active-border);
}

.receipt-assembling-card,
.current-output-card {
  background: var(--floor-surface);
}

.factory-zone-label {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--color-footer-muted);
}

.active-work-card .factory-zone-label {
  color: var(--floor-active);
}

.active-work-product {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--floor-active);
}

.active-work-product-link {
  color: inherit;
  text-decoration: none;
}

.active-work-product-link:hover {
  text-decoration: underline;
}

.active-work-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-footer-fg);
  line-height: var(--leading-xl);
}

.active-work-state {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  background: var(--floor-active-bg);
  color: var(--floor-active);
  margin-top: 4px;
  align-self: flex-start;
}

.active-work-station {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--floor-active);
}

.active-work-rationale {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-footer-muted);
  line-height: var(--leading-sm);
}

.receipt-assembling-card h3,
.current-output-card h3 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-footer-fg);
  line-height: var(--leading-xl);
}

.receipt-assembling-card p,
.current-output-card p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-footer-muted);
  line-height: var(--leading-sm);
}

.factory-artifact-tag {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-footer-muted);
  margin-top: 4px;
  align-self: flex-start;
  word-break: break-all;
  overflow-wrap: break-word;
}

a.factory-artifact-tag {
  text-decoration: none;
}

a.factory-artifact-tag:hover,
a.factory-artifact-tag:focus-visible {
  color: var(--floor-active);
  text-decoration: underline;
}

.factory-floor-bottom {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.waiting-signals,
.output-bay {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.waiting-signals h3,
.output-bay h3 {
  margin: 0;
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: 700;
  color: var(--color-footer-fg);
  line-height: var(--leading-xl);
}

.signal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.signal-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--floor-surface);
  border: 1px solid var(--floor-border);
  border-radius: 6px;
}

.signal-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-footer-fg);
}

.signal-caption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-footer-muted);
}

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

.output-receipt-card {
  padding: 18px;
  background: var(--floor-surface);
  border: 1px solid var(--floor-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

a.output-receipt-card {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

a.output-receipt-card:hover,
a.output-receipt-card:focus-visible {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

a.output-receipt-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

[data-receipt-pending] {
  cursor: not-allowed;
}

.receipt-item[data-receipt-pending] .receipt-label {
  color: var(--color-fg);
}

.output-receipt-card[data-receipt-pending] .factory-zone-label,
.output-receipt-card[data-receipt-pending] .output-receipt-desc,
.output-receipt-card[data-receipt-pending] .factory-artifact-tag {
  color: var(--color-footer-fg);
}

.receipt-item[data-receipt-pending]:hover .receipt-value,
.receipt-item[data-receipt-pending]:focus-visible .receipt-value {
  text-decoration: none;
}

.output-receipt-card[data-receipt-pending]:hover,
.output-receipt-card[data-receipt-pending]:focus-visible {
  border-color: var(--floor-border);
  transform: none;
}

.output-receipt-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-footer-fg);
}

.output-receipt-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-footer-muted);
}

.how-we-build-cta {
  display: inline-block;
  margin-top: 32px;
}

/* Tablet + Mobile (≤1024px) */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .home-hero h1 {
    font-size: clamp(var(--text-3xl), 6vw, 3.6rem);
  }

  .demo-proof-path {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-product,
  .section-heading,
  .product-screenshots {
    grid-template-columns: 1fr;
  }

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

  .section-heading.compact {
    gap: 8px;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-media {
    min-height: 260px;
  }

  .factory-floor-header,
  .factory-active-zone,
  .factory-floor-bottom {
    grid-template-columns: 1fr;
  }

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

  .factory-lanes {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .factory-events {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet only (481px–1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
  .screenshot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screenshot-strip.phone-screenshots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header,
  .product-header {
    padding-top: 22px;
  }

  .home-hero {
    padding: 40px var(--space-page) 36px;
  }

  .home-hero h1,
  .about-hero h1,
  .about-block h2,
  .featured-copy h2,
  .product-story h2,
  .product-screenshots h2 {
    line-height: 1.1;
  }

  .home-hero h1,
  .about-hero h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .theme-toggle {
    width: 100%;
    justify-items: start;
  }

  .theme-toggle-control {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: 100%;
  }

  .theme-toggle-status {
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
  }

  .receipt-header-end {
    width: 100%;
    flex-wrap: wrap;
  }

  .receipt-header-end .theme-toggle {
    flex: 1 1 100%;
  }
}

@media (max-width: 360px) {
  .home-hero,
  .all-products,
  .product-page section,
  .about-block {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-hero,
  .featured-copy {
    margin-inline: auto;
  }

  .hero-copy,
  .featured-copy p:not(.eyebrow) {
    font-size: 0.95rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .home-hero h1,
  .about-hero h1 {
    font-size: 1.9rem;
  }

  .cta-group .btn,
  .app-store-badge-link {
    min-height: 42px;
    width: 100%;
  }

  .cta-group .btn.featured-primary-cta {
    min-height: 44px;
  }

  .app-store-badge {
    height: 34px;
  }

  .product-link,
  .work-link {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
  .site-header,
  .product-header {
    padding-top: 22px;
  }

  .home-hero {
    padding-top: 48px;
  }

  .demo-proof-path {
    grid-template-columns: 1fr;
  }

  .receipts-row {
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
    padding-bottom: 32px;
  }

  .exhibits-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .work-link-list,
  .work-link {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 44px;
    padding: 18px;
  }

  .work-link img,
  .work-link-icon {
    width: 48px;
    height: 48px;
  }

  .product-link {
    padding: 18px;
  }

  .cta-group {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 340px);
    margin-inline: auto;
  }

  .cta-group .btn {
    width: 100%;
  }

  .feature-list,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .feature-list:has(.feature-card) {
    grid-template-columns: 1fr;
  }

  .screenshot-grid {
    width: min(320px, 100%);
    margin-inline: auto;
  }

  .product-page section {
    padding: 28px 18px;
  }

  .screenshot-strip {
    justify-content: flex-start;
  }

  .screenshot-strip.phone-screenshots {
    grid-template-columns: 1fr;
    width: min(320px, 100%);
  }

  .screenshot-strip figure {
    flex-basis: 150px;
  }

  .btn {
    padding: 11px 16px;
  }

  .factory-stations,
  .factory-lanes,
  .factory-events,
  .output-receipts {
    grid-template-columns: 1fr;
  }

  .factory-line-board-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .factory-line-board-meta {
    text-align: left;
  }

  .factory-event-rail-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .factory-event-rail-current {
    text-align: left;
  }

  .factory-packet-track {
    margin-inline: 54px;
  }
}

/* Receipt detail page */
.receipt-header-end {
  display: flex;
  align-items: center;
  gap: 16px;
}

.receipt-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-fg-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.receipt-page-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.receipt-hero {
  border-bottom: 1px solid var(--color-border);
}

.receipt-hero-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding: clamp(48px, 8vw, 80px) 0;
}

.receipt-hero-copy h1 {
  margin: 12px 0 0;
  max-width: 640px;
  font-size: clamp(var(--text-4xl), 6vw, 4.75rem);
  line-height: var(--leading-4xl);
  letter-spacing: 0;
}

.receipt-intro {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.receipt-summary {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.receipt-summary > .eyebrow {
  margin: 0 0 12px;
}

.active-work-order {
  padding: 14px 16px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.active-work-order > .eyebrow {
  margin: 0 0 6px;
}

.active-work-order .work-order-title {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: var(--leading-sm);
  margin-bottom: 6px;
}

.active-work-order .work-order-stage {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-fg-muted);
}

.active-work-order .work-order-status {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  line-height: var(--leading-base);
}

.receipt-pipeline {
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
}

.pipeline-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(18px, 3vw, 28px) 0;
}

.pipeline-legend {
  flex: 0 0 auto;
  max-width: 220px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-footer-muted);
  line-height: var(--leading-base);
}

.pipeline-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-footer-muted);
  white-space: nowrap;
}

.stage-pill--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-fg);
}

.stage-pill--gate {
  border-style: dashed;
  color: var(--color-footer-muted);
}

.receipt-trail {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) 0 clamp(56px, 9vw, 96px);
}

.receipt-trail-header {
  margin-bottom: clamp(28px, 4vw, 40px);
}

.receipt-trail-header h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(var(--text-3xl), 4vw, 3.4rem);
  line-height: var(--leading-3xl);
  letter-spacing: 0;
}

.receipt-trail-header p {
  margin: 14px 0 0;
  max-width: 620px;
  color: var(--color-fg-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.receipt-trail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
}

.stage-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-card {
  padding: 18px 18px 18px 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  min-width: 0;
}

.stage-title {
  margin: 0 0 8px;
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--leading-sm);
  letter-spacing: 0;
}

.stage-why {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.artifact-detail {
  margin-top: 12px;
}

.artifact-source {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  cursor: pointer;
  list-style: none;
}

.artifact-source::-webkit-details-marker {
  display: none;
}

.artifact-source::before {
  content: '▸ ';
  font-size: 0.7em;
  vertical-align: 0.1em;
}

details[open] > .artifact-source::before {
  content: '▾ ';
}

.artifact-body {
  padding-top: 10px;
}

.artifact-code {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  overflow-x: auto;
  white-space: pre;
}

.artifact-attrs {
  display: grid;
}

.artifact-attr {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.artifact-attr:first-child {
  border-top: 1px solid var(--color-border);
}

.attr-key {
  flex: 0 0 76px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-fg-muted);
  letter-spacing: 0.03em;
}

.attr-val {
  font-size: var(--text-sm);
  color: var(--color-fg);
}

.stage-card--active {
  border-left-color: var(--color-warning);
}

.stage-card--gate {
  border-left-color: var(--color-border);
}

.stage-card--gate .stage-title {
  font-weight: 600;
  color: var(--color-fg-muted);
}

.gate-note {
  margin: 8px 0 0;
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  line-height: var(--leading-base);
}

.artifact-panel {
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  position: sticky;
  top: 24px;
}

.artifact-panel-eyebrow {
  margin: 0 0 8px;
}

.artifact-panel-title {
  margin: 0 0 10px;
  font-size: var(--text-xl);
  line-height: var(--leading-sm);
  letter-spacing: 0;
}

.artifact-panel-desc {
  margin: 0 0 14px;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.gate-notice {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.gate-notice .eyebrow {
  margin: 0 0 4px;
}

/* Receipt page responsive: tablet/mobile */
@media (max-width: 1024px) {
  .receipt-hero-inner,
  .receipt-trail-body {
    grid-template-columns: 1fr;
  }

  .pipeline-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .pipeline-legend {
    max-width: none;
  }

  .artifact-panel {
    position: static;
  }
}

@media (max-width: 480px) {
  .stage-cards {
    grid-template-columns: 1fr;
  }

  .receipt-page-badge {
    display: none;
  }
}

/* Placeholder labeling for receipt artifact evidence */
.artifact-source::after {
  content: ' — sample';
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85em;
  color: var(--color-fg-muted);
}

.artifact-body::before {
  content: 'Sample evidence — placeholder until real artifact is attached.';
  display: block;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  font-style: italic;
}

.artifact-sample-panel-note {
  margin: 0 0 14px;
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-fg-muted);
}

/* Receipt index page */
.receipt-index-page {
  min-height: 100vh;
}

.receipt-data-note {
  margin: 10px 0 0;
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--color-fg-muted);
}

.receipt-list-section {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) 0 clamp(56px, 9vw, 96px);
}

.receipt-index-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.receipt-index-row {
  border-bottom: 1px solid var(--color-border);
}

.receipt-index-link {
  display: block;
  padding: 18px 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}

.receipt-index-link:hover,
.receipt-index-link:focus-visible {
  background: var(--color-surface);
}

.receipt-index-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.receipt-index-id {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
}

.receipt-state-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-surface-alt);
  color: var(--color-fg-muted);
  border: 1px solid var(--color-border);
}

.receipt-state-badge--shipped {
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  color: var(--color-success);
  border-color: color-mix(in srgb, var(--color-success) 30%, transparent);
}

.receipt-state-badge--build,
.receipt-state-badge--review,
.receipt-state-badge--release-candidate {
  background: color-mix(in srgb, var(--color-warning) 12%, transparent);
  color: var(--color-warning);
  border-color: color-mix(in srgb, var(--color-warning) 30%, transparent);
}

.receipt-state-badge--request,
.receipt-state-badge--scope,
.receipt-state-badge--dispatch {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

.receipt-index-title {
  margin: 0 0 4px;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-sm);
  color: var(--color-fg);
}

.receipt-index-date {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
}

/* Receipt act sections (detail page three-act layout) */
.receipt-acts {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) 0 clamp(56px, 9vw, 96px);
  display: grid;
  gap: clamp(24px, 4vw, 36px);
}

.receipt-act {
  padding: 28px 28px 28px 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 10px;
}

.receipt-act--pending {
  border-left-color: var(--color-border);
  opacity: 0.7;
}

.receipt-act-label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.receipt-act-title {
  margin: 0 0 4px;
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-sm);
  letter-spacing: 0;
}

.receipt-act-status {
  margin: 0 0 20px;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
}

.receipt-act-hero {
  padding: 16px 18px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 16px;
}

.receipt-act-hero-label {
  display: block;
  margin: 0 0 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.receipt-act-hero-content {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-fg);
  line-height: var(--leading-relaxed);
}

.receipt-act-hero-link {
  display: inline-block;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: none;
}

.receipt-act-hero-link:hover {
  text-decoration: underline;
}

.receipt-act-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.receipt-act-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.receipt-act-meta-key {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
}

.receipt-act-meta-val {
  font-size: var(--text-sm);
  color: var(--color-fg);
  font-family: var(--font-mono);
}

.receipt-act-evidence-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.receipt-act-evidence-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.receipt-act-evidence-item:first-child {
  border-top: 1px solid var(--color-border);
}

.evidence-kind-tag {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
}

.evidence-caption {
  color: var(--color-fg);
}

.evidence-source-link {
  margin-left: auto;
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-decoration: none;
}

.evidence-source-link:hover {
  text-decoration: underline;
}

.receipt-recording-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 18px 0;
}

.receipt-recording-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.receipt-recording-video {
  display: block;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #050608;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.receipt-recording-caption {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-fg);
}

.receipt-recording-label {
  display: inline-flex;
  margin-right: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-recording-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.receipt-recording-meta div {
  display: grid;
  gap: 2px;
}

.receipt-recording-meta dt {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-fg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-recording-meta dd {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  color: var(--color-fg);
}

.receipt-recording-meta code {
  font-family: var(--font-mono);
  font-size: inherit;
  overflow-wrap: anywhere;
}

.receipt-detail-page {
  min-height: 100vh;
}

.receipt-act-pending-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  font-style: italic;
}

/* AI Tinkerers submission page */
.submission-page {
  min-height: 100vh;
}

.submission-hero,
.submission-band {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
}

.submission-hero {
  min-height: min(680px, calc(100vh - 96px));
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 80px) 0 clamp(44px, 7vw, 72px);
}

.submission-hero h1 {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: clamp(var(--text-3xl), 5vw, 4.35rem);
  line-height: var(--leading-4xl);
  letter-spacing: 0;
}

.submission-thesis {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--color-fg);
  font-size: clamp(var(--text-lg), 2vw, var(--text-2xl));
  line-height: var(--leading-lg);
}

.submission-hero .cta-group {
  margin-top: 28px;
}

.submission-proof-panel {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.submission-proof-panel__label {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.submission-proof-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.submission-proof-list a {
  display: block;
  padding: 12px 14px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-fg);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--leading-sm);
  text-decoration: none;
}

.submission-proof-list a:hover,
.submission-proof-list a:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.submission-band {
  padding: clamp(48px, 8vw, 80px) 0;
  border-top: 1px solid var(--color-border);
}

.submission-section-heading {
  max-width: 760px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.submission-section-heading h2,
.submission-current-state h2 {
  margin: 0;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: var(--leading-3xl);
  letter-spacing: 0;
}

.submission-timeline,
.runbook-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.submission-timeline li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.submission-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-fg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
}

.submission-timeline h3 {
  margin: 0 0 6px;
  font-size: var(--text-xl);
  line-height: var(--leading-sm);
  letter-spacing: 0;
}

.submission-timeline p,
.runbook-list p,
.submission-current-state p,
.submission-note p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.submission-timeline a,
.runbook-list a,
.submission-note a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.submission-band--dark {
  width: auto;
  max-width: none;
  padding-inline: max(var(--space-page), calc((100vw - var(--content-wide)) / 2));
  background: var(--color-footer-bg);
  color: var(--color-footer-fg);
  border-top: 0;
}

.submission-band--dark .eyebrow,
.submission-band--dark a {
  color: var(--color-floor-active);
}

.submission-band--dark .submission-section-heading h2 {
  color: var(--color-footer-fg);
}

.runbook-list li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.runbook-list li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.runbook-list span {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-floor-active);
}

.runbook-list p {
  color: var(--color-footer-muted);
}

.submission-current-state {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.submission-current-state h2 {
  margin-bottom: 14px;
}

.submission-note {
  padding: 22px 24px;
  background: color-mix(in srgb, var(--color-warning) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-warning) 32%, var(--color-border));
  border-radius: 8px;
}

@media (max-width: 900px) {
  .submission-hero,
  .submission-current-state {
    grid-template-columns: 1fr;
  }

  .submission-hero {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .submission-timeline li,
  .runbook-list li {
    grid-template-columns: 1fr;
  }

  .submission-step {
    width: 38px;
    height: 38px;
  }
}

/* Worked examples library */
.worked-examples-page,
.worked-example-detail-page {
  min-height: 100vh;
}

.worked-examples-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
}

.worked-examples-hero,
.worked-example-detail-hero {
  padding: clamp(56px, 10vw, 96px) 0 clamp(34px, 6vw, 52px);
  border-bottom: 1px solid var(--color-border);
}

.worked-examples-hero h1,
.worked-example-detail-hero h1 {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: clamp(var(--text-3xl), 5vw, 3.2rem);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.worked-examples-lede,
.worked-example-detail-lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.worked-examples-policy {
  max-width: 680px;
  margin: 18px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--color-accent);
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.worked-examples-list-section,
.worked-example-evidence,
.worked-example-screenshots,
.worked-example-stations,
.worked-example-review {
  padding: clamp(36px, 7vw, 64px) 0;
  border-bottom: 1px solid var(--color-border);
}

.worked-examples-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.worked-examples-section-header h2,
.worked-example-evidence h2,
.worked-example-screenshots h2,
.worked-example-review h2 {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.worked-examples-count {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.worked-example-list,
.worked-station-list,
.worked-example-link-grid {
  margin: 0;
  padding: 0;
  list-style: none;
}

.worked-example-list {
  border-top: 1px solid var(--color-border);
}

.worked-example-row {
  border-bottom: 1px solid var(--color-border);
}

.worked-example-link {
  display: grid;
  gap: 8px;
  padding: 20px 8px;
  color: inherit;
  text-decoration: none;
  transition: background 0.12s ease;
}

.worked-example-link:hover,
.worked-example-link:focus-visible {
  background: var(--color-surface);
}

.worked-example-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
}

.worked-example-title {
  color: var(--color-fg);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-sm);
}

.worked-example-summary {
  max-width: 860px;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.worked-example-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 28px;
  max-width: 760px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.worked-example-facts div {
  min-width: 0;
  padding: 16px;
  background: var(--color-surface);
}

.worked-example-facts span,
.worked-example-link-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--color-fg-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.worked-example-facts strong,
.worked-example-link-grid strong {
  color: var(--color-fg);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}

.worked-example-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.worked-example-link-grid a {
  display: block;
  min-height: 100%;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.worked-example-link-grid a:hover,
.worked-example-link-grid a:focus-visible {
  border-color: var(--color-accent);
}

.worked-example-screenshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 760px;
}

.worked-example-screenshot {
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.worked-example-screenshot img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.worked-example-screenshot figcaption {
  padding: 10px 14px;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
}

.worked-station-list {
  display: grid;
  gap: 12px;
}

.worked-station {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
}

.worked-station:last-child {
  border-bottom: 1px solid var(--color-border);
}

.worked-station-number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-fg-muted);
  letter-spacing: 0.08em;
}

.worked-station-body {
  max-width: 780px;
}

.worked-station-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.worked-station-heading h3 {
  margin: 0;
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  letter-spacing: 0;
}

.worked-station-heading code {
  display: inline-block;
  padding: 3px 8px;
  background: var(--color-surface-alt);
  border-radius: 4px;
  color: var(--color-fg);
  font-size: var(--text-xs);
}

.worked-station-output {
  margin: 0 0 8px;
  color: var(--color-fg);
  font-weight: 700;
}

.worked-station p,
.worked-example-review p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.worked-example-review p {
  max-width: 760px;
}

@media (max-width: 900px) {
  .worked-example-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .worked-examples-section-header,
  .worked-station-heading {
    align-items: flex-start;
  }

  .worked-examples-section-header {
    flex-direction: column;
  }

  .worked-example-facts,
  .worked-example-link-grid {
    grid-template-columns: 1fr;
  }

  .worked-station {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
  }
}

/* ─────────────────────────────────────────
   MOTION SYSTEM
   ───────────────────────────────────────── */

/* ── Ticker rail ── */
.ticker-rail {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  width: 100%;
}

.ticker-rail__track {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 0;
  gap: 48px;
  animation: ticker-slide var(--ticker-duration, 60s) linear infinite;
  will-change: transform;
}

.ticker-rail__item {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-page);
}

.ticker-rail__item:first-child {
  padding-left: var(--space-page);
}

.ticker-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.ticker-item-prefix {
  color: var(--color-accent);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

@keyframes ticker-slide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}

/* ── Reveal on scroll ── */
.reveal,
[data-reveal-step] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-slow, 480ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
              transform var(--motion-slow, 480ms) var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.reveal.is-visible,
[data-reveal-step].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero floor grid (parallax) ── */
.home-hero {
  position: relative;
  isolation: isolate;
}

.hero-floor-bg {
  position: absolute;
  inset: -40% 0 -10% 0;
  contain: layout paint;
  z-index: -1;
  pointer-events: none;
  color: var(--color-border);
  opacity: 0.45;
  mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 25%, black 75%, transparent 100%);
}

.floor-grid-svg {
  display: block;
  width: 100%;
  height: 130%;
}

/* ── Station illumination & conveyor pulse ── */
.factory-station.is-conveyor-active,
.factory-station--active.is-conveyor-active {
  transform: translateY(-2px);
}

.factory-station.is-active,
.factory-station--active {
  background: var(--color-floor-active-bg);
  border-color: var(--color-floor-active-border);
  position: relative;
}

.factory-station.is-active .station-label,
.factory-station--active .station-label {
  color: var(--color-floor-active);
}

.factory-station.is-active .station-tag,
.factory-station--active .station-tag {
  background: var(--color-floor-active-bg);
  color: var(--color-floor-active);
}

.factory-station.is-active::after,
.factory-station--active::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--color-floor-active-border);
  animation: station-pulse 2.4s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) infinite;
  pointer-events: none;
}

@keyframes station-pulse {
  0%, 100% { box-shadow: 0 0 0 1px var(--color-floor-active-border); }
  50%       { box-shadow: 0 0 0 1px var(--color-floor-active), 0 0 22px -2px var(--color-floor-active-glow); }
}

/* Site navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.site-nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-fg-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.site-nav-link:visited {
  color: var(--color-fg-muted);
}

.site-nav-link:hover {
  color: var(--color-fg);
  background-color: var(--color-surface-alt);
}

.site-nav-link[aria-current="page"] {
  color: var(--color-accent);
}

/* Homepage how-it-works link under hero CTAs */
.hero-how-it-works-link {
  margin: 16px 0 0;
  font-size: var(--text-sm);
}

.hero-how-it-works-link a {
  font-weight: 500;
}

@media (max-width: 600px) {
  .site-nav {
    gap: 0;
  }

  .site-nav-link {
    padding: 6px 8px;
    font-size: var(--text-xs);
  }
}

/* ─── Receipt pages — Direction B typographic treatment ──────────────────── */
/* Newspaper masthead and stamp typography for receipt index and detail bodies */

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

/* Back-nav link in receipt detail header */
.receipt-nav-back {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--color-fg-muted);
}

.receipt-nav-back:visited {
  color: var(--color-fg-muted);
}

.receipt-nav-back:hover {
  color: var(--color-fg);
}

/* ── Stamp component ─────────────────────────────────────────────────────── */

.stamp {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  background: var(--color-surface);
}

.stage-stamp {
  display: inline-block;
  padding: 4px 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stage-stamp--request  { color: var(--color-fg-muted); }
.stage-stamp--scope    { color: var(--color-fg-muted); }
.stage-stamp--dispatch { color: var(--color-fg-muted); }
.stage-stamp--build    { color: var(--color-warning); }
.stage-stamp--review   { color: var(--color-accent); }
.stage-stamp--release-candidate { color: var(--color-success); }
.stage-stamp--shipped  { color: var(--color-success); }

/* ── Receipts index page masthead ────────────────────────────────────────── */

.receipts-masthead {
  padding-top: clamp(24px, 4vw, 48px);
  border-bottom: 1px solid var(--color-border);
}

.receipts-masthead-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
}

.masthead-rule {
  border: none;
  border-top: 1px solid var(--color-fg);
  margin: 0 0 10px;
}

.masthead-nameplate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}

.masthead-org {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.masthead-edition {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.masthead-tagline {
  margin: 0 0 20px;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  line-height: var(--leading-base);
  padding-top: 10px;
}

/* ── Receipt ledger (index listing) ─────────────────────────────────────── */

.receipts-ledger {
  padding: clamp(32px, 5vw, 56px) 0 clamp(56px, 9vw, 96px);
}

.receipts-ledger-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
}

.ledger-header {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 140px 92px;
  gap: 16px;
  padding: 6px 0 8px;
  border-top: 2px solid var(--color-fg);
  border-bottom: 2px solid var(--color-fg);
  margin-bottom: 0;
}

.ledger-header .ledger-col {
  font-size: calc(var(--text-xs) * 0.9);
}

.ledger-col {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.ledger-row {
  border-bottom: 1px dotted var(--color-border);
}

.ledger-row-link {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 140px 92px;
  gap: 16px;
  padding: 20px 8px;
  margin-inline: -8px;
  text-decoration: none;
  color: var(--color-fg);
  border-radius: 4px;
}

.ledger-row-link:hover {
  background: var(--color-bg-alt);
  color: var(--color-fg);
}

.ledger-row-link:visited {
  color: var(--color-fg);
}

.ledger-row-link .ledger-col-id {
  display: flex;
  align-items: flex-start;
  padding-top: 3px;
}

.ledger-title {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-sm);
}

.ledger-row-link .ledger-col-stage,
.ledger-row-link .ledger-col-date {
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}

.ledger-col-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  font-weight: 400;
}

/* ── Receipt detail doc masthead ─────────────────────────────────────────── */

.receipt-doc-masthead {
  padding-top: clamp(24px, 4vw, 48px);
}

.receipt-doc-masthead-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
}

.doc-masthead-rule {
  border: none;
  border-top: 1px solid var(--color-fg);
  margin: 0 0 10px;
}

.doc-masthead-rule--double {
  border-top: 3px double var(--color-fg);
  margin: 0;
}

.doc-masthead-nameplate {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.doc-masthead-org {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.doc-masthead-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.doc-masthead-right {
  text-align: right;
  flex-shrink: 0;
}

.doc-masthead-id {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg);
}

.doc-masthead-date {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
}

.doc-masthead-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 18px;
}

.receipt-corrective-note {
  max-width: 840px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--color-warning);
  background: var(--color-bg-alt);
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.receipt-corrective-note a {
  color: var(--color-fg);
  font-weight: 700;
}

.doc-receipt-title {
  margin: 0;
  font-size: clamp(var(--text-2xl), 3.5vw, 2.8rem);
  line-height: var(--leading-2xl);
  letter-spacing: -0.01em;
  max-width: 760px;
}

/* ── Receipt workflow overview ──────────────────────────────────────────── */

.receipt-workflow-overview {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.receipt-workflow-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 38px) 0;
}

.receipt-workflow-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.receipt-workflow-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.receipt-workflow-header h2 {
  margin: 0;
  font-size: clamp(var(--text-xl), 2.3vw, var(--text-3xl));
  line-height: var(--leading-xl);
  letter-spacing: 0;
}

.receipt-workflow-summary {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.receipt-shipped-confirmation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 22px 0 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-success) 42%, var(--color-border));
  border-left: 4px solid var(--color-success);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-success) 10%, var(--color-surface));
}

.receipt-shipped-eyebrow {
  margin: 0 0 6px;
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.receipt-shipped-title {
  margin: 0;
  color: var(--color-fg);
  font-size: var(--text-lg);
  font-weight: 850;
  line-height: var(--leading-lg);
}

.receipt-shipped-detail {
  max-width: 780px;
  margin: 6px 0 0;
  color: var(--color-fg-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.receipt-shipped-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--color-success);
  border-radius: 6px;
  color: var(--color-success);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  text-decoration: none;
}

.receipt-shipped-link:hover,
.receipt-shipped-link:focus-visible {
  background: var(--color-success);
  color: var(--color-bg);
}

.receipt-workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.receipt-workflow-cell {
  display: block;
  min-height: 112px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-left-width: 4px;
  border-radius: 8px;
  background: var(--color-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.receipt-workflow-cell:hover,
.receipt-workflow-cell:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 16%, transparent);
  outline: none;
}

.receipt-workflow-cell--complete {
  border-left-color: var(--color-success);
}

.receipt-workflow-cell--current {
  border-left-color: var(--color-warning);
  background: color-mix(in srgb, var(--color-warning) 9%, var(--color-surface));
}

.receipt-workflow-cell--pending {
  border-left-color: var(--color-fg-muted);
  opacity: 0.72;
}

.receipt-workflow-cell-code,
.receipt-workflow-cell-detail {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-base);
}

.receipt-workflow-cell-code {
  margin-bottom: 8px;
  color: var(--color-fg-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.receipt-workflow-cell-title {
  display: block;
  color: var(--color-fg);
  font-size: var(--text-sm);
  font-weight: 800;
  line-height: var(--leading-base);
}

.receipt-workflow-cell-detail {
  margin-top: 8px;
  color: var(--color-fg-muted);
  overflow-wrap: anywhere;
}

.receipt-workflow-transcript-link {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.receipt-workflow-transcript-link a {
  color: var(--color-accent);
  text-decoration: none;
}

.receipt-workflow-transcript-link a:hover {
  text-decoration: underline;
}

/* ── Receipt source conversation ─────────────────────────────────────────── */

.receipt-source-conversation {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.receipt-source-conversation-inner {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px) 0;
}

.source-conversation-details {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.source-conversation-details > summary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  cursor: pointer;
  list-style-position: inside;
}

.source-conversation-details > summary::marker {
  color: var(--color-accent);
}

.source-conversation-details[open] > summary {
  border-bottom: 1px solid var(--color-border);
}

.source-conversation-summary-title,
.source-conversation-summary-meta {
  display: inline;
}

.source-conversation-summary-title {
  color: var(--color-fg);
  font-size: var(--text-sm);
  font-weight: 800;
}

.source-conversation-summary-meta {
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-base);
}

.source-conversation-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 18px 18px 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.source-conversation-kicker {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.source-conversation-header h2 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(var(--text-2xl), 3vw, 2.6rem);
  line-height: var(--leading-2xl);
  letter-spacing: 0;
}

.source-conversation-summary {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--color-fg-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
}

.source-conversation-ticket {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  color: var(--color-fg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  text-decoration: none;
}

.source-conversation-ticket:hover,
.source-conversation-ticket:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.conversation-log {
  display: grid;
  gap: 16px;
  max-width: 920px;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.conversation-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.conversation-speaker {
  padding-top: 10px;
}

.conversation-speaker-name {
  display: block;
  margin-bottom: 4px;
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--color-fg);
}

.conversation-speaker-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
  line-height: var(--leading-base);
}

.conversation-bubble {
  position: relative;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.conversation-item--human .conversation-bubble {
  border-left: 4px solid var(--color-accent);
}

.conversation-item--assistant .conversation-bubble,
.conversation-item--session-state .conversation-bubble,
.conversation-item--tool-lookup .conversation-bubble {
  border-left: 4px solid var(--color-warning);
}

.conversation-item--tool-call .conversation-bubble,
.conversation-item--tool-result .conversation-bubble {
  border-left: 4px solid var(--color-success);
}

.conversation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-fg-muted);
}

.conversation-tool-name {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-alt);
  color: var(--color-fg);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-base);
  overflow-wrap: anywhere;
}

.conversation-body {
  margin: 0;
  color: var(--color-fg);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.conversation-image {
  margin: 14px 0 0;
}

.conversation-image img {
  display: block;
  width: min(100%, 220px);
  max-height: 260px;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-alt);
}

.conversation-image figcaption {
  margin-top: 8px;
  color: var(--color-fg-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-base);
}

.conversation-tool-fields {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
  border-top: 1px solid var(--color-border);
}

.conversation-tool-fields div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}

.conversation-tool-fields dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-fg-muted);
  text-transform: uppercase;
}

.conversation-tool-fields dd {
  margin: 0;
  color: var(--color-fg);
  font-size: var(--text-sm);
  line-height: var(--leading-base);
}

.conversation-artifact-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.conversation-artifact-link:hover,
.conversation-artifact-link:focus-visible {
  text-decoration: underline;
}

.conversation-raw-json {
  margin-top: 14px;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.conversation-raw-json-link {
  margin: 14px 0 0;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
}

.conversation-raw-json-link a {
  color: var(--color-accent);
  text-decoration: none;
}

.conversation-raw-json-link a:hover,
.conversation-raw-json-link a:focus-visible {
  text-decoration: underline;
}

.conversation-raw-json summary {
  cursor: pointer;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
}

.conversation-raw-json pre {
  max-height: 280px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg-alt);
  color: var(--color-fg);
  font-size: var(--text-xs);
  line-height: var(--leading-base);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.linear-issue-page {
  margin: 0;
  background: #0b0b0c;
  color: #e8e8ec;
}

.linear-issue-page-shell {
  --linear-bg: #0b0b0c;
  --linear-panel: #141416;
  --linear-panel-2: #19191c;
  --linear-border: #26262a;
  --linear-border-soft: #1e1e22;
  --linear-text: #e8e8ec;
  --linear-muted: #9b9ba3;
  --linear-subtle: #73737c;
  --linear-pill: #2b2b30;
  --linear-accent: #6e78ff;
  background: var(--linear-bg);
  min-height: 100vh;
}

.linear-issue-app {
  background: var(--linear-bg);
  color: var(--linear-text);
}

.linear-issue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--linear-border-soft);
  background: var(--linear-bg);
}

.linear-issue-trail {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--linear-muted);
  font-size: 13px;
  line-height: 1.4;
}

.linear-issue-workspace {
  color: var(--linear-text);
  font-weight: 650;
}

.linear-issue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 312px);
  min-height: 680px;
}

.linear-issue-main {
  min-width: 0;
  padding: 28px 32px 44px;
  border-right: 1px solid var(--linear-border-soft);
}

.linear-issue-title-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 22px;
}

.linear-issue-checkbox {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border: 1px solid #4b4b54;
  border-radius: 3px;
  background: transparent;
}

.linear-issue-main h1 {
  max-width: 760px;
  margin: 0;
  color: var(--linear-text);
  font-size: 17px;
  font-weight: 520;
  line-height: 1.45;
  letter-spacing: 0;
}

.linear-ticket-body {
  margin: 0;
  color: var(--linear-text);
  font-size: 16px;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.linear-ticket-body h2 {
  margin: 34px 0 18px;
  color: var(--linear-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

.linear-ticket-body h2:first-child {
  margin-top: 0;
}

.linear-ticket-body p,
.linear-ticket-body ul,
.linear-ticket-body ol {
  max-width: 760px;
  margin: 0 0 16px;
}

.linear-ticket-body ul,
.linear-ticket-body ol {
  padding-left: 22px;
}

.linear-ticket-body li {
  margin: 8px 0;
}

.linear-ticket-body strong {
  color: var(--linear-text);
}

.linear-ticket-body code {
  padding: 1px 5px;
  border: 1px solid #35353c;
  border-radius: 5px;
  background: var(--linear-pill);
  color: var(--linear-text);
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.linear-ticket-body a {
  color: #aeb4ff;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.linear-issue-sidebar {
  min-width: 0;
  padding: 44px 16px 24px;
  background: var(--linear-bg);
}

.linear-property-card {
  margin-bottom: 8px;
  padding: 14px 16px;
  border: 1px solid var(--linear-border);
  border-radius: 8px;
  background: var(--linear-panel);
}

.linear-property-card h2 {
  margin: 0 0 14px;
  color: var(--linear-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.linear-property-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.linear-property-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.linear-property-list dt,
.linear-relation-label,
.linear-muted {
  color: var(--linear-muted);
  font-size: 14px;
}

.linear-property-list dd,
.linear-related-issue {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--linear-text);
  font-size: 14px;
}

.linear-related-issue {
  align-items: flex-start;
  margin-top: 8px;
  line-height: 1.35;
}

.linear-status-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--linear-accent);
}

.linear-status-dot--done {
  box-shadow: inset 0 0 0 3px var(--linear-accent);
}

.linear-priority-bars {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(to top, var(--linear-muted) 4px, transparent 4px) 1px 9px / 3px 5px no-repeat,
    linear-gradient(to top, var(--linear-muted) 7px, transparent 7px) 6px 6px / 3px 8px no-repeat,
    linear-gradient(to top, var(--linear-muted) 10px, transparent 10px) 11px 3px / 3px 11px no-repeat;
}

.linear-ticket-close {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--linear-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.linear-ticket-close:hover,
.linear-ticket-close:focus-visible {
  color: var(--linear-text);
  text-decoration: underline;
}

@media (max-width: 680px) {
  .linear-issue-layout {
    grid-template-columns: 1fr;
  }

  .linear-issue-main {
    border-right: 0;
    border-bottom: 1px solid var(--linear-border-soft);
  }

  .linear-issue-sidebar {
    padding-top: 16px;
  }
}

/* ── Receipt station column (Direction B vertical document body) ─────────── */

.receipt-body-wrap {
  width: min(var(--content-wide), calc(100% - (2 * var(--space-page))));
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 9vw, 96px);
}

.receipt-station-column {
  max-width: 800px;
}

.receipt-station {
  padding: 28px 0;
  border-bottom: 1px dotted var(--color-border);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.receipt-station:first-child {
  border-top: 1px dotted var(--color-border);
}

.station-header {
  padding-top: 3px;
}

.station-stamp {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
}

.station-num {
  display: block;
  font-size: 0.8em;
  margin-bottom: 3px;
  opacity: 0.6;
}

.station-content {
  min-width: 0;
}

.station-value {
  margin: 0 0 8px;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-sm);
}

.station-value:last-child {
  margin-bottom: 0;
}

.station-ref {
  font-family: var(--font-mono) !important;
  font-size: var(--text-sm) !important;
  font-weight: 400 !important;
  color: var(--color-fg-muted);
}

.station-detail {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
}

.station-pending {
  font-size: var(--text-base) !important;
  font-weight: 400 !important;
  color: var(--color-fg-muted);
  font-style: italic;
}

.station-complete {
  color: var(--color-success);
}

.station-blocked {
  color: var(--color-warning);
}

.receipt-station--active .station-stamp {
  color: var(--color-warning);
}

.station-evidence {
  margin-top: 12px;
}

/* ── Responsive adjustments ──────────────────────────────────────────────── */

@media (max-width: 640px) {
  .ledger-header,
  .ledger-row-link {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .ledger-header .ledger-col-stage,
  .ledger-header .ledger-col-date,
  .ledger-row-link .ledger-col-stage,
  .ledger-row-link .ledger-col-date {
    display: none;
  }

  .doc-masthead-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .receipt-workflow-header,
  .receipt-shipped-confirmation,
  .source-conversation-header,
  .conversation-item {
    grid-template-columns: 1fr;
  }

  .receipt-workflow-header,
  .receipt-shipped-confirmation,
  .source-conversation-header {
    display: grid;
  }

  .receipt-workflow-grid {
    grid-template-columns: 1fr;
  }

  .receipt-workflow-cell {
    min-height: 0;
  }

  .receipt-workflow-header .source-conversation-ticket,
  .receipt-shipped-link,
  .source-conversation-ticket {
    justify-self: flex-start;
  }

  .conversation-speaker {
    padding-top: 0;
  }

  .conversation-tool-fields div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .receipt-station {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }

  .station-num {
    display: inline;
    margin-bottom: 0;
    margin-right: 4px;
  }
}

/* ── Print stylesheet — receipt pages must print cleanly ─────────────────── */

@media print {
  .site-header,
  .receipt-pipeline,
  .station-evidence,
  .site-footer {
    display: none !important;
  }

  body,
  .receipt-doc-masthead,
  .receipt-body-wrap,
  .receipts-masthead,
  .receipts-ledger {
    background: white !important;
    color: black !important;
  }

  .doc-masthead-rule,
  .doc-masthead-rule--double,
  .masthead-rule {
    border-top-color: black !important;
  }

  .ledger-header {
    border-color: black !important;
  }

  .ledger-row {
    border-bottom-color: #999 !important;
  }

  .receipt-station {
    border-bottom-color: #999 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .receipt-station:first-child {
    border-top-color: #999 !important;
  }

  .station-value a[href]::after {
    content: " (" attr(href) ")";
    font-family: var(--font-mono);
    font-size: 0.75em;
    color: #555;
    font-weight: 400;
  }

  .receipt-station-column {
    max-width: none;
  }

  .ledger-header,
  .ledger-row-link {
    grid-template-columns: 92px minmax(0, 1fr) 140px 92px;
  }
}

/* ── Product page breadcrumb (WEB-137) ── */
.product-crumb {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px var(--space-page);
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  flex-wrap: wrap;
}

.product-crumb a {
  color: var(--color-fg-muted);
  text-decoration: none;
}

.product-crumb a:hover {
  color: var(--color-fg);
  text-decoration: underline;
}

.product-crumb strong {
  color: var(--color-fg);
  font-weight: 600;
}

.product-crumb__sep {
  color: var(--color-fg-muted);
  padding: 0 2px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  user-select: none;
}

.product-crumb__spacer {
  flex: 1;
  min-width: 12px;
}

@media (max-width: 600px) {
  .product-crumb {
    gap: 2px;
    font-size: var(--text-xs);
  }
}

/* ── Coming Soon homepage + product stub (WEB-169) ── */
body.coming-soon-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.coming-soon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--space-page) 20px;
}

.coming-soon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 12vw, 128px) var(--space-page);
}

.coming-soon-hero {
  width: 100%;
}

.coming-soon-inner {
  width: min(var(--content-narrow), 100%);
  margin: 0 auto;
  text-align: left;
}

.coming-soon-inner h1 {
  margin: 12px 0 24px;
  font-size: clamp(var(--text-3xl), 6vw, var(--text-4xl));
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

.coming-soon-lede {
  margin: 0 0 32px;
  font-size: var(--text-lg);
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
  max-width: 60ch;
}

.coming-soon-cta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.coming-soon-shell .app-store-badge-link,
:root[data-theme="dark"] .coming-soon-shell .app-store-badge-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .coming-soon-shell .app-store-badge-link {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

.product-stub {
  width: min(var(--content-narrow), calc(100% - (2 * var(--space-page))));
  margin: clamp(48px, 8vw, 96px) auto;
  text-align: left;
}

.product-stub h1 {
  margin: 12px 0 16px;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  line-height: var(--leading-tight);
}

.product-stub-tagline {
  margin: 0 0 24px;
  font-size: var(--text-base);
  color: var(--color-fg-muted);
  line-height: var(--leading-relaxed);
}

.product-stub-marker {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-fg-muted);
}
