:root {
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --paper-3: #e8e4da;
  --ink: #101010;
  --ink-2: #333333;
  --ink-3: #4b4b4b;
  --muted: #5f5c56;
  --line: #ddd8cc;
  --line-strong: #c9c2b2;
  --line-ui: #8f8778;
  --accent: #101010;
  --accent-ink: #2f2f2f;
  --accent-soft: #e8e4da;
  --signal: #c8f135;
  --green: #0f7a5a;
  --green-soft: #e2f4ec;
  --amber: #b45309;
  --danger: #b91c1c;
  --dark: #0b0d12;
  --dark-2: #12151f;
  --dark-3: #1a1f2c;
  --dark-line: rgba(255, 255, 255, 0.11);
  --dark-text: #e9edf5;
  --dark-muted: #9aa3b5;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1180px;
  --shadow: 0 24px 70px rgba(16, 16, 16, 0.12);
}

/* Wide-gamut displays get a slightly hotter signal; sRGB keeps the hex above. */
@supports (color: color(display-p3 1 1 1)) {
  :root {
    --signal: color(display-p3 0.82 0.95 0.16);
  }
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50rem 30rem at 85% -10%, rgba(16, 16, 16, 0.05), transparent 65%),
    radial-gradient(40rem 24rem at 5% 5%, rgba(200, 241, 53, 0.06), transparent 60%);
  pointer-events: none;
}

::selection {
  background: rgba(200, 241, 53, 0.45);
  color: var(--ink);
}

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

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.9rem, 6.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 48px, var(--max));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--muted);
}

.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;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.brand-mark::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.brand-name {
  font-size: 1rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--ink-2);
  font-size: 0.86rem;
}

.desktop-nav a {
  position: relative;
  padding: 5px 0;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}

.desktop-nav a:hover {
  color: var(--accent);
}

.desktop-nav a:hover::after {
  right: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line-ui);
  border-radius: 7px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-menu {
  display: none;
  position: relative;
}

.mobile-menu summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  border: 1px solid var(--line-ui);
  border-radius: 7px;
  color: var(--ink-2);
  cursor: pointer;
  list-style: none;
}

.mobile-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}

.mobile-menu-panel a {
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.86rem;
}

.mobile-menu-panel a:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.mobile-menu-cta {
  margin-top: 6px;
  background: var(--accent) !important;
  color: #fff !important;
  text-align: center;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(16, 16, 16, 0.2);
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.btn-secondary {
  border-color: var(--line-ui);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: #fff;
}

.btn-light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.btn-light:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.btn-outline-light:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.78rem;
  border-radius: 7px;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  transition: gap 0.2s ease;
}

.text-link:hover {
  gap: 11px;
}

.text-accent,
.text-blue {
  color: var(--accent);
}

.text-marker {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(200, 241, 53, 0.65) 55%,
    rgba(200, 241, 53, 0.65) 92%,
    transparent 92%
  );
  padding: 0 4px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ── Typography helpers ─────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--signal);
}

.lead {
  max-width: 680px;
  margin-top: 20px;
  color: var(--ink-3);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
}

.section {
  padding: 96px 0;
}

.section-soft {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 48px;
  margin-bottom: 42px;
}

.section-head h2 {
  max-width: 760px;
}

.section-head--center {
  display: block;
  text-align: center;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 54px;
}

.section-head--center .section-head-main {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head--center .eyebrow {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.section-head--center h2 {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.7vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  text-wrap: balance;
}

.section-head--center .section-lead {
  max-width: 640px;
  margin: 18px auto 0;
}

.section-lead {
  max-width: 460px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.section-note {
  margin-top: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 76px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
}

.hero-copy h1 {
  max-width: 760px;
}

.hero-copy h1 em {
  display: block;
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.hero-marker {
  background: linear-gradient(
    180deg,
    transparent 62%,
    rgba(200, 241, 53, 0.55) 62%,
    rgba(200, 241, 53, 0.55) 94%,
    transparent 94%
  );
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(15, 122, 90, 0.1);
}

/* On the dark card the same status reads as the acid signal, not as a
   validation green. */
.hero-card .status-dot {
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(200, 241, 53, 0.12);
}

.hero-card {
  position: relative;
  padding: 28px;
  border-radius: 18px;
  background:
    radial-gradient(22rem 14rem at 100% 0%, rgba(200, 241, 53, 0.1), transparent 65%),
    var(--dark);
  color: var(--dark-text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

.hero-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.hero-card h2 {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  font-size: 1.8rem;
  color: #fff;
}

.focus-list {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  display: grid;
}

.focus-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-text);
  font-size: 0.86rem;
}

.focus-index {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.hero-card-bottom {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--dark-line);
}

.hero-card-bottom strong {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-card-bottom span {
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

/* ── Hero Media ────────────────────────────────────────────────────────── */
.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-ml-svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
}

/* ── Metrics ────────────────────────────────────────────────────────────── */
.metric-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

.metric {
  padding: 24px 24px 22px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Problem ────────────────────────────────────────────────────────────── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.problem-card {
  padding: 28px 28px 28px 0;
  border-right: 1px solid var(--line);
}

.problem-card + .problem-card {
  padding-left: 28px;
}

.problem-card:last-child {
  border-right: 0;
  padding-right: 0;
}

.problem-number {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.problem-card h3 {
  font-size: 1.2rem;
}

.problem-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── Services ───────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(16, 16, 16, 0.05);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.service-number {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.service-card:hover .service-icon {
  border-color: var(--line-strong);
  background: var(--paper-3);
}

.service-icon-svg {
  width: 36px;
  height: 36px;
}

.service-icon-svg .iso-accent {
  fill: var(--signal);
  stroke: none;
}

.service-icon-svg .iso-accent-stroke {
  stroke: var(--ink);
}

.service-card h3 {
  margin-bottom: 16px;
  font-size: 1.35rem;
  line-height: 1.22;
}

.service-explainer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.service-explainer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 5px 0;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  line-height: 1.5;
  transition: color 0.18s ease;
}

.service-explainer summary::-webkit-details-marker {
  display: none;
}

.service-explainer summary:hover {
  color: var(--ink);
}

.service-explainer summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}

.service-question {
  max-width: 34ch;
}

.service-chevron {
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.service-explainer[open] .service-chevron {
  transform: rotate(-135deg);
}

.service-explainer-body {
  padding: 4px 0 2px;
}

.service-explainer[open] .service-explainer-body {
  padding-left: 12px;
  border-left: 2px solid var(--signal);
}

.service-explainer-body p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.86rem;
  line-height: 1.62;
}

.service-explainer-body .service-example {
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.55;
}

@supports (interpolate-size: allow-keywords) {
  .service-card {
    interpolate-size: allow-keywords;
  }

  .service-explainer::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.24s ease, content-visibility 0.24s allow-discrete;
  }

  .service-explainer[open]::details-content {
    block-size: auto;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 18px;
}

.tags span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.02em;
}

.demos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.demo-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(16, 16, 16, 0.07);
}

.demo-card-shot {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.demo-card-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 1;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.demo-card:hover .demo-card-shot img {
  transform: scale(1.025);
  opacity: 1;
}

.demo-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(16, 16, 16, 0.06);
}

.demo-card-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1px rgba(16, 16, 16, 0.22);
}

.demo-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.demo-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.demo-card-title h3 {
  font-size: 1.1rem;
}

.demo-card-title svg {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.demo-card:hover .demo-card-title svg {
  color: var(--accent);
  transform: translate(1px, -1px);
}

.demo-card-body p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.demo-card-body .tags {
  margin-top: auto;
  padding-top: 16px;
}

/* ── Process ────────────────────────────────────────────────────────────── */
.process-grid {
  display: grid;
  border-top: 1px solid var(--line);
}

.process-step {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 28px;
  align-items: start;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.process-step:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.process-rail {
  display: grid;
  gap: 10px;
  align-content: start;
}

.process-number {
  display: block;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

/* Ascending bars: 01 is the shortest, 05 the longest. The hairline border keeps
   the shape above 3:1 against paper, where the lime alone reads as 1.19:1. */
.process-bar {
  display: block;
  height: 10px;
  width: calc(14px + var(--step) * 18px);
  border: 1px solid var(--line-ui);
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: var(--signal);
}

.process-step h3 {
  font-size: 1.08rem;
}

.process-step p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

/* ── Engagements ────────────────────────────────────────────────────────── */
.engagement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.engagement-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.28);
}

.engagement-duration {
  display: inline-block;
  margin-bottom: 20px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.04em;
}

.engagement-card h3 {
  font-size: 1.2rem;
}

.engagement-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
  gap: 64px;
}

.about-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.about-copy > p {
  max-width: 620px;
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.about-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.about-social {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.about-social-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.about-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social-link:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.social-icon {
  width: 18px;
  height: 18px;
}

.about-aside {
  display: grid;
  gap: 10px;
}

.about-fact {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.3);
}

.about-fact > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-fact p {
  color: var(--ink-2);
  font-size: 0.84rem;
  line-height: 1.6;
}

.about-fact .tags {
  margin-top: 0;
}

.about-fact-accent {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--dark-text);
}

.about-fact-accent > span {
  color: var(--signal);
}

.about-fact-accent p {
  color: var(--dark-text);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 64px;
}

.faq-intro h2 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
}

.faq-intro .text-link {
  margin-top: 20px;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  max-width: 620px;
  padding-bottom: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* ── CTA ────────────────────────────────────────────────────────────────── */
.cta-band {
  padding: 72px 0;
  background:
    radial-gradient(30rem 18rem at 90% 0%, rgba(200, 241, 53, 0.12), transparent 65%),
    var(--dark);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta-copy h2 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
}

.cta-copy p {
  max-width: 560px;
  margin-top: 12px;
  color: #b9c2d4;
  font-size: 0.94rem;
  line-height: 1.7;
}

.eyebrow-light {
  color: var(--signal);
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 250px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  padding: 56px 0 28px;
  background: var(--paper);
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand p {
  max-width: 340px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.footer-brand .footer-note {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.footer-columns {
  display: flex;
  gap: 56px;
}

.footer-col {
  display: grid;
  gap: 6px;
}

.footer-col > span {
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col a {
  color: var(--ink-2);
  font-size: 0.82rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

/* ── Page hero / demos page ─────────────────────────────────────────────── */
.page-hero {
  padding: 76px 0 36px;
}

.page-hero h1 {
  max-width: 900px;
}

.page-hero .lead {
  max-width: 720px;
}

.page-note {
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.demos-page {
  padding-top: 28px;
}

/* ── Contact ────────────────────────────────────────────────────────────── */
.contact-section {
  padding-top: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 64px;
}

.contact-aside h2,
.contact-form-wrap h2 {
  font-size: 1.5rem;
}

.contact-steps {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.contact-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-steps h3 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact-steps p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.contact-direct {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.contact-direct > span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.contact-channel-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.contact-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 16, 16, 0.08);
}

.contact-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.contact-btn-email .contact-btn-icon {
  background: rgba(16, 16, 16, 0.06);
  color: var(--accent);
}

.contact-btn-github .contact-btn-icon {
  background: rgba(16, 16, 16, 0.06);
  color: var(--ink);
}

.contact-btn-linkedin .contact-btn-icon {
  background: rgba(10, 102, 194, 0.1);
  color: #0a66c2;
}

.contact-btn-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.contact-btn-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-btn-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.contact-btn-arrow {
  color: var(--muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.contact-btn:hover .contact-btn-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.contact-form-wrap {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
}

.proposal-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

/* Honeypot: real people never see or fill this. */
.form-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.proposal-form label {
  display: grid;
  gap: 6px;
}

.proposal-form label > span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.proposal-form input,
.proposal-form select,
.proposal-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-ui);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.proposal-form input:focus,
.proposal-form select:focus,
.proposal-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 16, 16, 0.1);
}

.proposal-form textarea {
  resize: vertical;
  min-height: 120px;
}

.proposal-form .btn {
  justify-self: start;
}

.form-note {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.6;
}

.form-status {
  min-height: 18px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

/* ── Contact Booking Card ─────────────────────────────────────────────────── */
.contact-booking-card {
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 12px 36px rgba(16, 16, 16, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.booking-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line-ui);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

.booking-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 2px rgba(200, 241, 53, 0.4);
}

.contact-booking-card h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.booking-lead {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.booking-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 4px 0;
}

.booking-points li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
}

.booking-point-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(200, 241, 53, 0.25);
  color: var(--ink);
  margin-top: 1px;
}

.booking-points strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.booking-points p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.booking-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.booking-cta-btn {
  width: 100%;
  min-height: 50px;
  font-size: 0.94rem;
  gap: 10px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 16, 16, 0.2);
}

.booking-cta-btn:hover {
  background: var(--accent-ink);
  transform: translateY(-2px);
}

.booking-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.booking-platform,
.booking-confidentiality {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.booking-platform svg,
.booking-confidentiality svg {
  color: var(--ink-2);
  flex-shrink: 0;
}

/* ── Pay page ───────────────────────────────────────────────────────────── */
.pay-page {
  padding-top: clamp(48px, 7vw, 88px);
}

.pay-head {
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.pay-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.pay-head .lead {
  color: var(--muted);
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pay-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
}

.pay-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.pay-card-head h2 {
  font-size: 1.18rem;
}

.pay-price {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
}

.pay-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.pay-includes-label,
.pay-tax {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.pay-includes {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pay-includes li {
  position: relative;
  padding-left: 16px;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.pay-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.pay-tax {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.68rem;
}

.pay-inactive {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.wompi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.wompi-button:hover:not(:disabled) {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.wompi-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wompi-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.wompi-button.is-outline {
  background: transparent;
  color: var(--ink);
}

.wompi-button.is-outline:hover:not(:disabled) {
  background: var(--paper-3);
  border-color: var(--ink);
}

.wompi-button-mark {
  height: 19px;
  width: auto;
}

.wompi-button-amount {
  font-variant-numeric: tabular-nums;
}

.pay-turnstile {
  margin-top: 22px;
  max-width: 360px;
}

.pay-secure,
.pay-fine {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}

.pay-status {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--ink-2);
}

.pay-status.is-error {
  color: var(--danger);
}

.pay-receipt-wrap {
  max-width: 720px;
}

.pay-receipt {
  display: grid;
  gap: 18px;
  margin: 26px 0 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2);
}

.pay-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pay-receipt-status {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pay-receipt-status.is-approved {
  border-color: var(--green);
  color: var(--green);
}

.pay-receipt-status.is-pending {
  border-color: var(--amber, #b7791f);
  color: var(--amber, #b7791f);
}

.pay-receipt-status.is-declined {
  border-color: var(--danger);
  color: var(--danger);
}

.pay-receipt-env {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
}

.pay-receipt-rows {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pay-receipt-rows div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.pay-receipt-rows dt {
  font-size: 0.82rem;
  color: var(--muted);
}

.pay-receipt-rows dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.pay-receipt-note {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.pay-receipt-help {
  margin: 0 0 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.pay-receipt-help a {
  color: var(--ink);
}

/* Third-tier action in the dark CTA band: outline ghost, 42 px tall, with a
   lime marker. It stays below the primary button in the hierarchy. */
.cta-pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  color: #e9edf5;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.cta-pay-link::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

.cta-pay-link:hover {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.06);
}

.cta-pay-link:focus-visible {
  outline-color: var(--signal);
}

.contact-pay-link {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.contact-pay-link a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.notfound {
  display: grid;
  place-content: center;
  min-height: 62vh;
  text-align: center;
}

.notfound h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
}

.notfound .lead {
  margin-inline: auto;
}

.notfound .hero-actions {
  justify-content: center;
}

/* ── Labs shell ─────────────────────────────────────────────────────────── */
.lab-hero {
  padding: 56px 0 28px;
}

.case-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  transition: color 0.2s ease;
}

.case-back:hover {
  color: var(--accent);
}

.lab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.lab-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.lab-sub {
  max-width: 640px;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.96rem;
  line-height: 1.7;
}

.lab-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.lab-badge.live {
  border-color: rgba(15, 122, 90, 0.25);
  background: var(--green-soft);
  color: var(--green);
}

.lab-badge.live::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.lab-lang {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lab-lang button {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lab-lang button.active {
  background: var(--accent);
  color: #fff;
}

.lab-panel {
  margin-top: 26px;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--dark-text);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lab-note {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.65;
}

.lab-note strong {
  color: var(--ink);
}

.lab-note code {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.lab-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Chat (dark product surface) ────────────────────────────────────────── */
.chat {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 540px;
  color: var(--dark-text);
}

.chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--dark-line);
  background: rgba(18, 21, 31, 0.8);
}

.chat-bar .who {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  color: var(--dark-text);
}

.chat-bar .who .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(200, 241, 53, 0.55), 0 0 0 1px rgba(16, 16, 16, 0.2);
}

.chat-bar .meta {
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.chat .btn-ghost {
  border-color: var(--dark-line);
  color: var(--dark-muted);
  background: transparent;
}

.chat .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 380px;
  max-height: 56vh;
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dark-3) transparent;
}

.chat-empty {
  display: grid;
  gap: 8px;
  place-content: center;
  min-height: 320px;
  text-align: center;
}

.chat-empty h2 {
  color: #fff;
  font-size: 1.5rem;
}

.chat-empty p {
  max-width: 440px;
  color: var(--dark-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.msg {
  display: flex;
  gap: 11px;
  max-width: 82%;
  animation: rise 0.25s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.msg-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--dark-line);
  border-radius: 8px;
  background: var(--dark-2);
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.msg-user .msg-avatar {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.25);
  background: rgba(110, 231, 183, 0.06);
}

.msg-body {
  padding: 12px 15px;
  border: 1px solid var(--dark-line);
  border-radius: 12px 12px 12px 4px;
  background: var(--dark-2);
  color: var(--dark-text);
  font-size: 0.9rem;
  line-height: 1.7;
}

.msg-user .msg-body {
  border-radius: 12px 12px 4px 12px;
  background: rgba(200, 241, 53, 0.12);
  border-color: rgba(200, 241, 53, 0.28);
}

.msg-body p + p {
  margin-top: 9px;
}

.msg-body ul,
.msg-body ol {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding-left: 18px;
}

.msg-body ul {
  padding-left: 0;
}

.msg-body li {
  position: relative;
  padding-left: 14px;
}

.msg-body ul li::before {
  content: '·';
  position: absolute;
  left: 3px;
  color: var(--signal);
}

.msg-body strong {
  color: #fff;
}

.msg-body code {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--dark-text);
  font-family: var(--font-mono);
  font-size: 0.84em;
}

.msg-body .cursor {
  display: inline-block;
  width: 6px;
  height: 14px;
  margin-left: 3px;
  background: var(--signal);
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.sources {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--dark-line);
}

.sources summary {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;
}

.sources summary::-webkit-details-marker {
  display: none;
}

.sources summary::before {
  content: '▸';
  transition: transform 0.2s ease;
}

.sources[open] summary::before {
  transform: rotate(90deg);
}

.source-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.source-item {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--dark-line);
  border-radius: 6px;
  background: rgba(11, 13, 18, 0.55);
}

.source-item .ref {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.source-item .extract {
  color: var(--dark-muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.chat-form {
  display: grid;
  gap: 10px;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--dark-line);
  background: rgba(18, 21, 31, 0.6);
}

.chat-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.chip {
  padding: 5px 9px;
  border: 1px solid var(--dark-line);
  border-radius: 999px;
  background: transparent;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 8px 8px 8px 13px;
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  background: rgba(7, 8, 12, 0.55);
  transition: border-color 0.2s ease;
}

.chat-input-wrap:focus-within {
  border-color: rgba(200, 241, 53, 0.55);
}

.chat-input {
  flex: 1;
  min-height: 24px;
  max-height: 140px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.chat-input::placeholder {
  color: var(--dark-muted);
}

.chat-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 241, 53, 0.5);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.chat-send:hover {
  background: var(--accent-ink);
}

.chat-send:active {
  transform: scale(0.95);
}

.chat-status {
  min-height: 16px;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.chat-status.error {
  color: #fca5a5;
}

.turnstile-slot {
  margin-top: 4px;
}

/* ── Catalog (dark product surface) ────────────────────────────────────── */
.cine {
  padding: 26px;
  color: var(--dark-text);
}

.catalog-search {
  display: flex;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--dark-line);
  border-radius: 12px;
  background: rgba(7, 8, 12, 0.5);
  transition: border-color 0.2s ease;
}

.catalog-search:focus-within {
  border-color: rgba(251, 191, 36, 0.45);
}

.catalog-input {
  flex: 1;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  outline: none;
}

.catalog-input::placeholder {
  color: var(--dark-muted);
}

.catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s ease;
}

.catalog-btn:hover {
  background: rgba(251, 191, 36, 0.2);
}

.catalog-btn[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.catalog-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.catalog-examples .chip {
  border-color: var(--dark-line);
  color: var(--dark-muted);
}

.catalog-status {
  min-height: 20px;
  margin-top: 14px;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.catalog-status.error {
  color: #fca5a5;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 14px;
  padding-top: 20px;
  border-top: 1px solid var(--dark-line);
}

.results-head h2 {
  color: #fff;
  font-size: 1rem;
}

.results-head span {
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  background: var(--dark-2);
  overflow: hidden;
  animation: rise 0.3s ease both;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.product-poster {
  position: relative;
  height: 250px;
  background: linear-gradient(160deg, #1b2236, #0b0e16);
  overflow: hidden;
}

.product-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-poster .fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.product-meta .rating {
  color: #fbbf24;
}

.product-title {
  margin-top: 5px;
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.25;
}

.product-dir {
  margin-top: 2px;
  color: var(--dark-muted);
  font-size: 0.7rem;
}

.product-overview {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #b9c2d4;
  font-size: 0.72rem;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.product-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}

.product-genres span {
  padding: 2px 5px;
  border: 1px solid var(--dark-line);
  border-radius: 3px;
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.53rem;
}

.score {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
}

.score .label {
  color: var(--dark-muted);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  text-transform: uppercase;
}

.score .bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--dark-3);
  overflow: hidden;
}

.score .bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.score .num {
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.catalog-empty {
  display: grid;
  gap: 6px;
  place-content: center;
  min-height: 220px;
  margin-top: 22px;
  border: 1px dashed var(--dark-line);
  border-radius: 10px;
  color: var(--dark-muted);
  text-align: center;
}

.catalog-empty strong {
  color: #fff;
  font-size: 0.9rem;
}

.catalog-empty span {
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1050px) {
  .hero-grid,
  .about-grid,
  .faq-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-card {
    max-width: 560px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .services-grid,
  .demos-grid,
  .engagement-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 880px) {
  .desktop-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .header-cta,
  .header-pay {
    display: none;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 32px, var(--max));
  }

  .section {
    padding: 68px 0;
  }

  .hero {
    padding: 52px 0 34px;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 10vw, 3.7rem);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .metric-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .problem-grid,
  .services-grid,
  .demos-grid,
  .engagement-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 22px 20px;
  }

  .service-icon {
    width: 46px;
    height: 46px;
  }

  .service-icon-svg {
    width: 30px;
    height: 30px;
  }

  .problem-card,
  .problem-card + .problem-card {
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .problem-card:last-child {
    border-bottom: 0;
  }

  .process-step {
    grid-template-columns: 88px 1fr;
    gap: 18px;
    padding: 20px 0;
  }

  .process-bar {
    width: calc(10px + var(--step) * 12px);
  }

  .about-actions {
    align-items: flex-start;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn,
  .cta-pay-link {
    width: 100%;
  }

  .footer-columns {
    flex-wrap: wrap;
    gap: 28px;
  }

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

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

  .contact-form-wrap {
    padding: 22px;
  }

  .lab-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-log {
    padding: 18px;
  }

  .msg {
    max-width: 94%;
  }

  .chat-tools {
    flex-direction: column;
    align-items: flex-start;
  }

  .cine {
    padding: 18px;
  }

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

  .catalog-examples .chip {
    font-size: 0.58rem;
    line-height: 1.35;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .brand-name {
    display: none;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-note {
    align-items: flex-start;
  }

  .metric {
    padding: 18px 16px;
  }

  .catalog-search {
    flex-direction: column;
    padding: 10px;
  }

  .catalog-btn {
    justify-content: center;
  }

  .about-actions .btn {
    width: 100%;
  }

  .notfound .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   LABS — TEMA CLARO EDITORIAL
   DocChat y Catalog comparten la identidad de la landing. El contenido
   multimedia (pósters) puede ser oscuro; el chrome de producto es claro.
   ══════════════════════════════════════════════════════════════════════════ */
.lab-panel {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* DocChat */
.chat { color: var(--ink); }
.chat-bar {
  background: var(--paper-2);
  border-bottom-color: var(--line);
}
.chat-bar .who { color: var(--ink); }
.chat-bar .meta { color: var(--muted); }
.chat .btn-ghost {
  border-color: var(--line-ui);
  color: var(--ink-2);
  background: transparent;
}
.chat .btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chat-log { background: var(--surface); }
.chat-empty h2 { color: var(--ink); }
.chat-empty p { color: var(--muted); }
.msg-avatar {
  border-color: var(--line);
  background: var(--paper-2);
  color: var(--accent);
}
.msg-user .msg-avatar {
  color: var(--green);
  border-color: rgba(15, 122, 90, 0.25);
  background: var(--green-soft);
}
.msg-body {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}
.msg-user .msg-body {
  background: var(--accent-soft);
  border-color: rgba(16, 16, 16, 0.14);
}
.msg-body strong { color: var(--ink); }
.msg-body code {
  background: var(--paper-2);
  color: var(--accent-ink);
}
.msg-body .cursor { background: var(--signal); }
.msg-body ul li::before { color: var(--accent); }
.sources { border-top-color: var(--line); }
.sources summary { color: var(--green); }
.source-item {
  background: var(--paper);
  border-color: var(--line);
}
.source-item .ref { color: var(--ink); }
.source-item .extract { color: var(--muted); }
.chat-form {
  background: var(--paper-2);
  border-top-color: var(--line);
}
.chip {
  border-color: var(--line);
  color: var(--muted);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chat-input-wrap {
  background: #fff;
  border-color: var(--line-ui);
}
.chat-input-wrap:focus-within { border-color: var(--accent); }
.chat-input { color: var(--ink); }
.chat-input::placeholder { color: var(--muted); }
.chat-send {
  background: var(--accent);
  border-color: var(--accent);
}
.chat-send:hover { background: var(--accent-ink); }
.chat-status { color: var(--muted); }
.chat-status.error { color: var(--danger); }

/* Catalog */
.cine { color: var(--ink); }
.catalog-search {
  background: #fff;
  border-color: var(--line-ui);
}
.catalog-search:focus-within { border-color: var(--accent); }
.catalog-input { color: var(--ink); }
.catalog-input::placeholder { color: var(--muted); }
.catalog-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.catalog-btn:hover { background: var(--accent-ink); }
.catalog-status { color: var(--muted); }
.catalog-status.error { color: var(--danger); }
.catalog-examples .chip {
  border-color: var(--line);
  color: var(--muted);
}
.results-head { border-top-color: var(--line); }
.results-head h2 { color: var(--ink); }
.results-head span { color: var(--muted); }
.product-card {
  background: #fff;
  border-color: var(--line);
}
.product-card:hover { border-color: var(--line-strong); }
.product-poster { background: var(--paper-2); }
.product-poster .fallback { color: var(--muted); }
.product-meta { color: var(--muted); }
.product-title { color: var(--ink); }
.product-dir { color: var(--muted); }
.product-overview { color: var(--ink-2); }
.product-genres span {
  border-color: var(--line);
  color: var(--muted);
}
.score .label { color: var(--muted); }
.score .bar { background: var(--paper-3); }
.score .bar i { background: var(--accent); }
.score .num { color: var(--accent); }
.catalog-empty {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--paper);
}
.catalog-empty strong { color: var(--ink); }

/* ── Avatar 3D Assistant Integration ───────────────────────────────────── */
.rag-layout-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
}

.avatar-sidebar {
  border-right: 1px solid var(--line);
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
}

.avatar-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.15;
  min-height: 260px;
  max-height: 380px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 30%, rgba(16, 16, 16, 0.05), transparent 70%), var(--paper-3);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.avatar-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.avatar-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease;
  z-index: 2;
  background: radial-gradient(circle at 50% 30%, rgba(16, 16, 16, 0.05), transparent 70%), var(--paper-2);
}

.avatar-poster-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 20px rgba(16, 16, 16, 0.1));
}

.avatar-spinner {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(16, 16, 16, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: avatarSpin 0.75s linear infinite;
  z-index: 3;
}

@keyframes avatarSpin {
  to { transform: rotate(360deg); }
}

.avatar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 6px;
}

.avatar-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.avatar-status-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--muted);
  border: 1px solid var(--line);
  text-transform: uppercase;
}

.avatar-status-pill.idle {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.avatar-status-pill.thinking {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.avatar-status-pill.speaking {
  color: var(--accent);
  background: rgba(200, 241, 53, 0.35);
  border-color: rgba(16, 16, 16, 0.22);
}

.avatar-status-pill.error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

@media (max-width: 860px) {
  .rag-layout-grid {
    grid-template-columns: 1fr;
  }
  .avatar-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }
  .avatar-viewport {
    aspect-ratio: auto;
    height: 220px;
    max-height: 240px;
  }
}

/* ── Commercial Highlights & CTA in Labs ──────────────────────────────── */
.lab-business-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.biz-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.biz-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 122, 90, 0.1);
  color: #0f7a5a;
  flex-shrink: 0;
  margin-top: 2px;
}

.biz-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

.biz-item p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.lab-cta-box {
  margin-top: 36px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.lab-cta-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.lab-cta-content p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

.lab-cta-box .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .lab-business-bar {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .lab-cta-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }
  .lab-cta-box .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Header Language Switcher with Flags ───────────────────────────────── */
.header-lang-group {
  display: inline-flex;
  align-items: center;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.03);
}

.lang-btn.active {
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.flag-icon {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.demo-lang-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}

.demo-lang-btn .flag-icon {
  width: 16px;
  height: 11px;
}

/* ── Education Section Redesign with Logos ────────────────────────────── */
.about-education {
  gap: 12px;
}

.education-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.education-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.education-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.edu-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.edu-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.edu-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.edu-info strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.edu-inst {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

.edu-status {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--accent);
  background: rgba(16, 16, 16, 0.06);
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 3px;
  letter-spacing: 0.02em;
}




/* ── DocChat: retrieval telemetry + eval snapshot ─────────────────────────── */
.retrieval-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 9px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.015em;
}

.retrieval-strip[hidden] { display: none; }

.retrieval-mode {
  color: var(--accent);
  font-weight: 600;
}

.retrieval-detail {
  color: var(--muted);
}

.rag-quality {
  margin-top: 26px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rag-quality-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.rag-quality-head h2 {
  margin: 4px 0 6px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rag-quality-head p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.quality-date {
  flex-shrink: 0;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.5;
  max-width: 300px;
  text-align: right;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quality-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.quality-name {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quality-card strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.quality-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.quality-bar {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.quality-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.quality-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.quality-latency {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

@media (max-width: 860px) {
  .rag-quality-head { flex-direction: column; gap: 12px; }
  .quality-date { text-align: left; max-width: 100%; }
  .quality-grid { grid-template-columns: 1fr; }
  .rag-quality { padding: 18px; }
  .retrieval-strip { padding: 9px 16px; }
}

/* ── Catalog: intent + telemetry + why-match ─────────────────────────────── */
.catalog-intent,
.catalog-telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.catalog-intent[hidden],
.catalog-telemetry[hidden] { display: none; }

.catalog-intent-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.catalog-intent-chip {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  line-height: 1.3;
}

.catalog-intent-chip.warn {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fdf2e3;
  color: var(--amber);
}

.catalog-telemetry {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.5;
}

.product-why {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  line-height: 1.5;
}

.catalog-status.warn { color: var(--amber); }

.product-poster.poster-missing::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.35;
  text-align: center;
}

/* ── Catalog demo ────────────────────────────────────────────────────────── */
.product-availability {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.product-brand {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-price {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
}

.lab-badge-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.help-dot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.help-dot:hover,
.help-dot:focus-visible {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lab-details {
  margin: 28px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  padding: 0 20px;
}

.lab-details > summary {
  padding: 16px 0;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.lab-details-body {
  padding-bottom: 18px;
}

.lab-details-body .lab-note {
  margin-top: 12px;
}

.lab-fit {
  margin: 56px 0 0;
}

.lab-fit-head {
  max-width: 720px;
}

.lab-fit-head h2 {
  margin-top: 8px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.lab-fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.lab-fit-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.lab-fit-card .mono {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.lab-fit-card h3 {
  margin-top: 10px;
  font-size: 1.1rem;
}

.lab-fit-card p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.6;
}

@media (max-width: 880px) {
  .lab-fit-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Intake demo ─────────────────────────────────────────────────────────── */
.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px;
}

.intake-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intake-drop {
  padding: 22px;
  border: 1px dashed var(--line-ui);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.intake-drop.dragging {
  border-color: var(--accent);
  background: #eef1ff;
}

.intake-drop-title {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.intake-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.intake-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.intake-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.intake-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  max-height: 620px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-2);
  overflow: hidden;
}

.intake-preview canvas {
  display: block;
  max-width: 100%;
  max-height: 596px;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(16, 16, 16, 0.08);
}

.intake-preview-empty {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intake-preview:not(.has-document) canvas {
  display: none;
}

.intake-file {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.intake-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.intake-result-head h2 {
  font-size: 1.1rem;
}

.intake-type {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intake-type[data-type='invoice'] {
  border-color: #b7d8c8;
  background: #eef8f2;
  color: var(--green);
}

.intake-type[data-type='delivery-note'] {
  border-color: #c3cdf0;
  background: #eef1ff;
  color: var(--accent);
}

.intake-type[data-type='unknown'] {
  background: var(--paper-3);
  color: var(--muted);
}

.intake-empty {
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.intake-fields {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.intake-field {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.intake-field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.intake-field-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intake-field-value {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.intake-confidence {
  height: 3px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}

.intake-confidence span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.intake-confidence.mid span {
  background: #d97706;
}

.intake-confidence.low span {
  background: var(--danger);
}

.intake-validations {
  margin-top: 14px;
}

.intake-validations ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intake-validation {
  padding: 8px 10px;
  border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

.intake-validation.error {
  border-left-color: var(--danger);
  background: #fdf1f1;
}

.intake-validation.warn {
  border-left-color: #d97706;
  background: #fdf6ea;
}

.intake-validation.info {
  border-left-color: var(--accent);
  background: #eef1ff;
}

.intake-ok {
  color: var(--green);
  font-size: 0.82rem;
}

.intake-lines-wrap {
  margin-top: 18px;
}

.intake-lines-wrap h3 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.intake-lines {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.intake-lines th {
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.intake-lines td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.intake-lines .num {
  text-align: right;
  white-space: nowrap;
}

.intake-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.intake-json {
  max-height: 320px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
  overflow: auto;
  white-space: pre-wrap;
}

.intake-json:empty {
  display: none;
}

@media (max-width: 880px) {
  .intake-grid {
    grid-template-columns: 1fr;
  }
}

.intake-left,
.intake-right {
  min-width: 0;
}

.intake-field-value {
  overflow-wrap: anywhere;
}

.intake-lines {
  table-layout: fixed;
}

.intake-lines th:first-child,
.intake-lines td:first-child {
  width: 52%;
}

@media (max-width: 720px) {
  .intake-preview {
    max-height: 420px;
  }

  .intake-preview canvas {
    max-height: 396px;
  }
}

.intake-export[hidden],
.intake-lines-wrap[hidden] {
  display: none;
}

/* ── MICHAEL AI (Ultra-Compact & Premium Fit) ─────────────────────── */

.michael-hero.lab-hero {
  padding: 24px 0 16px;
}

.michael-hero .case-back {
  margin-bottom: 12px;
}

.michael-hero .eyebrow {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.michael-hero .lab-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  margin: 0;
}

.michael-hero .lab-sub {
  margin-top: 6px;
  max-width: 600px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.michael-hero .lab-badges {
  gap: 5px;
}

.michael-hero .lab-badge {
  padding: 3px 8px;
  font-size: 0.55rem;
}

.michael-hero .lab-business-bar {
  margin-top: 14px;
  padding-top: 12px;
  gap: 12px;
}

.michael-hero .biz-item {
  gap: 8px;
}

.michael-hero .biz-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.michael-hero .biz-item strong {
  font-size: 0.76rem;
  line-height: 1.3;
}

.michael-hero .biz-item p {
  font-size: 0.68rem;
  line-height: 1.4;
  margin-top: 2px;
}

/* Panel & Grid Layout */
.michael-grid.rag-layout-grid {
  grid-template-columns: 210px 1fr;
  align-items: stretch;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(16, 16, 16, 0.08);
}

.michael-grid .avatar-sidebar {
  padding: 14px 12px;
  gap: 10px;
  background: var(--paper-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.michael-grid .avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: auto;
  width: 100%;
}

.michael-grid .avatar-viewport {
  width: 100%;
  height: 160px;
  min-height: 150px;
  max-height: 175px;
  aspect-ratio: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 30%, rgba(16, 16, 16, 0.04), transparent 70%), var(--paper-3);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.michael-grid .avatar-footer {
  width: 100%;
  padding: 2px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.michael-grid .avatar-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.michael-grid .avatar-status-pill {
  font-size: 0.58rem;
  padding: 2px 6px;
}

/* Avatar Voice Control & Hint */
.michael-grid .avatar-voice {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-ui);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.michael-grid .avatar-voice:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.michael-grid .avatar-voice[aria-pressed='false'] {
  color: var(--ink-3);
  background: var(--paper-3);
  border-style: dashed;
}

.michael-grid .avatar-tech-note {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--ink-3);
  text-align: left;
}

.michael-grid .avatar-tech-note strong {
  color: var(--ink);
  display: inline;
}

.michael-grid .avatar-tech-note code {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  background: var(--paper-2);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--accent-ink);
}

/* Chat Main Column */
.michael-grid .chat {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  background: var(--paper);
}

.michael-grid .chat-bar {
  padding: 8px 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.michael-grid .chat-bar .who {
  font-size: 0.74rem;
  font-weight: 600;
  gap: 6px;
}

.michael-grid .chat-bar .dot {
  width: 6px;
  height: 6px;
}

.michael-grid .chat-bar .meta {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--muted);
}

/* Document Zone */
.michael-doc [hidden],
.michael-extract[hidden] {
  display: none !important;
}

.michael-doc {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.michael-doc #doc-empty {
  display: grid;
  gap: 8px;
  padding: 10px 14px;
}

.michael-doc .intake-drop {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px dashed var(--line-ui);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.michael-doc .intake-drop:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.michael-doc .intake-drop-title {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
}

.michael-doc .intake-hint {
  font-size: 0.64rem;
  color: var(--muted);
}

.michael-samples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.michael-samples > span {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 500;
}

.michael-samples .chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.michael-samples .chip {
  padding: 2px 7px;
  font-size: 0.6rem;
  line-height: 1.4;
}

.michael-doc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
}

.michael-doc-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.michael-doc-meta strong {
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.michael-doc-meta span {
  font-size: 0.66rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.michael-doc-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.michael-doc-actions .btn-sm {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.7rem;
}

/* Extraction panel compact */
.michael-extract {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.michael-extract-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.michael-extract-head strong {
  font-size: 0.74rem;
  color: var(--ink);
}

.michael-extract-head span {
  font-size: 0.64rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.michael-extract .intake-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px 10px;
}

.michael-extract .intake-field {
  padding: 0;
  border: 0;
  background: none;
}

.michael-extract .intake-field-label {
  font-size: 0.62rem;
  color: var(--muted);
}

.michael-extract .intake-field-value {
  font-size: 0.75rem;
  color: var(--ink);
}

.michael-extract .intake-validations {
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
}

.michael-extract .intake-validation {
  font-size: 0.68rem;
}

.michael-extract-note {
  margin: 6px 0 0;
  font-size: 0.62rem;
  line-height: 1.4;
  color: var(--muted);
}

.michael-extract-empty {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Chat Messages & Log */
.michael-grid .chat-log {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 42vh;
  padding: 14px 16px;
  overflow-y: auto;
  gap: 12px;
}

.michael-grid .chat-empty {
  padding: 24px 14px;
  text-align: center;
}

.michael-grid .chat-empty h2 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.michael-grid .chat-empty p {
  font-size: 0.78rem;
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
}

.michael-grid .msg {
  gap: 10px;
}

.michael-grid .msg-avatar {
  width: 26px;
  height: 26px;
  font-size: 0.66rem;
  border-radius: 7px;
}

.michael-grid .msg-body {
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.55;
  border-radius: 10px;
}

.michael-grid .msg-body .sources {
  margin-top: 8px;
  padding-top: 6px;
}

.michael-grid .source-item {
  padding: 4px 8px;
  font-size: 0.7rem;
  border-radius: 6px;
}

/* Chat Input Bar */
.michael-grid .chat-form {
  padding: 8px 14px 10px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}

.michael-grid .chat-tools {
  margin-bottom: 6px;
}

.michael-grid .chat-tools .chip {
  padding: 3px 8px;
  font-size: 0.62rem;
}

.michael-grid .chat-input-wrap {
  padding: 6px 8px 6px 12px;
  border-radius: 10px;
  border-color: var(--line-ui);
  background: #fff;
}

.michael-grid .chat-input {
  min-height: 22px;
  max-height: 100px;
  padding: 2px 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.michael-grid .chat-send {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

/* Secondary Panels below demo */
.michael-hero ~ .container .lab-details {
  margin-top: 14px;
}

.michael-hero ~ .container .lab-details summary {
  padding: 10px 14px;
  font-size: 0.72rem;
}

.michael-hero ~ .container .lab-note {
  margin-top: 14px;
  padding: 10px 14px;
  font-size: 0.72rem;
  line-height: 1.5;
}

.michael-hero ~ .container .lab-cta-box {
  margin-top: 24px;
  padding: 28px 24px;
}

/* Responsive adjustments */
@media (max-width: 860px) {
  .michael-grid.rag-layout-grid {
    grid-template-columns: 1fr;
  }

  .michael-grid .avatar-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    align-items: center;
  }

  .michael-grid .avatar-viewport {
    width: 140px;
    height: 140px;
    min-height: 140px;
    max-height: 140px;
  }

  .michael-grid .avatar-hint {
    max-width: 38ch;
  }

  .michael-grid .chat {
    min-height: 0;
  }

  .michael-grid .chat-log {
    max-height: 48vh;
  }

  .michael-doc-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .michael-doc .intake-drop {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Accessibility: contrast and forced colors ───────────────────────────── */
@media (prefers-contrast: more) {
  :root {
    --muted: #4b4843;
    --line: #b3aa96;
    --line-strong: #9a927f;
    --line-ui: #6f6858;
    --dark-muted: #c3cbd9;
  }
}

@media (forced-colors: active) {
  .btn-primary,
  .btn-light,
  .chat-send,
  .catalog-btn,
  .lab-lang button.active,
  .msg-user .msg-body {
    border: 1px solid ButtonText;
  }

  .hero-marker,
  .avatar-status-pill.speaking {
    background: none;
  }

  .process-bar {
    background: CanvasText;
  }

  .ui-tour-focus,
  .demo-card .live {
    forced-color-adjust: auto;
  }
}

/* ── Mesa: menu demo ─────────────────────────────────────────────────────── */
.dish-card .product-poster {
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}

.dish-card .product-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-card .product-availability {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.52rem;
  font-weight: 500;
}

.dish-allergens {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dish-pairing {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.dish-disclaimer {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.catalog-intent-chip.safe {
  border-color: var(--ink);
  color: var(--ink);
}

@media (max-width: 640px) {
  /* The list meta is a nice-to-have; on a phone it collides with the title. */
  .results-head span {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   ORIGEN — STOREFRONT DEMO
   Static catalogue, small cart island, hosted checkout. The chrome uses the
   same tokens as the landing; only the illustrations carry the brand colour.
   ══════════════════════════════════════════════════════════════════════════ */

body.shop-locked {
  overflow: hidden;
}

.shop-hero-media {
  position: relative;
  margin: 26px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
}

.shop-hero-media > img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  object-fit: cover;
  object-position: 50% 72%;
}

.shop-hero-caption {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: grid;
  gap: 6px;
  max-width: 330px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
}

.shop-hero-kicker,
.shop-card-origin,
.shop-card-notes,
.shop-card-roast,
.shop-count,
.shop-vital-note,
.shop-fine,
.shop-stock,
.shop-line-meta,
.shop-dialog-origin {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.shop-hero-caption strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.15;
  color: var(--ink);
}

.shop-hero-caption > span:not(.shop-hero-kicker) {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.shop-hero-caption .btn {
  justify-self: start;
  margin-top: 4px;
}

.shop-notice {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--ink);
  font-size: 0.88rem;
}

.shop-notice.error {
  border-left-color: var(--danger);
  background: #fdeaea;
}

.shop-catalog {
  margin-top: 46px;
}

.shop-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.shop-section-head h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--ink);
}

.shop-section-head p {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  font-size: 0.94rem;
}

.shop-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.shop-chip {
  padding: 7px 14px;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-ui);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.shop-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.shop-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.shop-count {
  margin: 16px 0 12px;
}

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

.shop-card {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.shop-card[hidden] {
  display: none;
}

.shop-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(16, 16, 16, 0.08);
}

.shop-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.shop-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  overflow: hidden;
}

.shop-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.shop-card:hover .shop-card-media img {
  transform: scale(1.03);
}

.shop-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.shop-flag[data-badge='new'] {
  background: var(--signal);
  color: var(--ink);
}

.shop-flag[data-badge='limited'] {
  background: var(--amber);
  color: var(--paper);
}

.shop-flag.sold-out {
  left: auto;
  right: 12px;
  background: var(--paper);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 14px;
}

.shop-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.shop-card-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.2;
  color: var(--ink);
}

.shop-card-price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink);
  white-space: nowrap;
}

.shop-card-notes {
  color: var(--ink-2);
  min-height: 1.9em;
}

.shop-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.shop-card-cta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

@container (min-width: 330px) {
  .shop-card-name {
    font-size: 1.2rem;
  }
}

.shop-story {
  display: grid;
  gap: 22px;
  margin-top: 56px;
}

.shop-story-item {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}

.shop-story-item.reverse {
  grid-template-columns: 1fr 1.1fr;
}

.shop-story-item.reverse img {
  order: 2;
}

.shop-story-item img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.shop-story-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 28px 30px;
}

.shop-story-body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  color: var(--ink);
}

.shop-story-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  max-width: 48ch;
}

.shop-vitals {
  margin-top: 56px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shop-vitals-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.shop-vitals-head h2 {
  margin: 8px 0 6px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.shop-vitals-head p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.shop-vitals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.shop-vital {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.shop-vital-name {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.shop-vital strong {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.shop-vital strong.warn {
  color: var(--amber);
}

.shop-vital-note {
  font-size: 0.62rem;
  line-height: 1.4;
}

.shop-vitals-note {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--muted);
}

/* ── Product dialog ───────────────────────────────────────────────────── */

.shop-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}

.shop-dialog::backdrop,
.shop-cart::backdrop {
  background: rgba(16, 16, 16, 0.36);
  backdrop-filter: blur(3px);
}

.shop-dialog[open] {
  animation: shop-dialog-in 0.24s ease;
}

@keyframes shop-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.shop-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.shop-dialog-media {
  background: var(--paper-2);
  min-height: 420px;
}

.shop-dialog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 30px 26px;
}

.shop-dialog-origin {
  margin: 0;
  color: var(--muted);
}

.shop-dialog-body h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.1;
}

.shop-dialog-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.6;
}

.shop-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 2px 0 4px;
}

.shop-meta div {
  display: grid;
  gap: 1px;
}

.shop-meta dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.shop-meta dd {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink);
}

.shop-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.shop-field legend,
.shop-qty-row > span {
  padding: 0;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.shop-choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-choice-btn {
  display: grid;
  gap: 2px;
  min-width: 108px;
  padding: 9px 13px;
  min-height: 44px;
  text-align: left;
  border: 1px solid var(--line-ui);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.shop-choice-btn.small {
  min-width: 0;
  padding: 9px 14px;
  font-size: 0.84rem;
}

.shop-choice-btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.shop-choice-btn.active {
  border-color: var(--ink);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.shop-choice-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.shop-choice-label {
  font-size: 0.86rem;
}

.shop-choice-price {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.shop-choice-note {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted);
}

.shop-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.shop-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-ui);
  border-radius: 999px;
  overflow: hidden;
}

.shop-qty button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
}

.shop-qty button:hover {
  background: var(--paper-2);
}

.shop-qty input {
  width: 46px;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: transparent;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  -moz-appearance: textfield;
}

.shop-qty input::-webkit-outer-spin-button,
.shop-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-stock.out {
  color: var(--danger);
}

.shop-add {
  justify-content: center;
  margin-top: 2px;
}

.shop-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-ui);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
}

.shop-x:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* ── Cart drawer ──────────────────────────────────────────────────────── */

.shop-cart-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 34px rgba(16, 16, 16, 0.22);
}

.shop-cart-fab:hover {
  background: var(--accent-ink);
}

.shop-cart-fab-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.shop-cart-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink);
  font-size: 0.66rem;
}

.shop-cart-fab.has-items .shop-cart-count {
  background: var(--signal);
  color: var(--ink);
}

.shop-cart {
  margin: 0 0 0 auto;
  width: min(460px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  transition: transform 0.28s ease, opacity 0.28s ease, overlay 0.28s allow-discrete, display 0.28s allow-discrete;
}

.shop-cart:not([open]) {
  transform: translateX(100%);
  opacity: 0;
}

@starting-style {
  .shop-cart[open] {
    transform: translateX(100%);
    opacity: 0;
  }
}

.shop-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.shop-cart-head h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.shop-cart-head h2 span:last-child {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.shop-cart-head .shop-x {
  position: static;
}

.shop-cart-body {
  overflow: auto;
  padding: 6px 22px;
}

.shop-empty {
  display: grid;
  gap: 10px;
  padding: 30px 0;
  color: var(--muted);
}

.shop-empty strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

.shop-empty p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.shop-empty .btn {
  justify-self: start;
}

.shop-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto auto 28px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.shop-line-media img {
  width: 54px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.shop-line-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.shop-line-info strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-line-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.shop-step {
  width: 28px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink);
  line-height: 1;
}

.shop-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.shop-step:hover:not(:disabled) {
  background: var(--paper-2);
}

.shop-line-qty {
  min-width: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.shop-line-price {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.shop-line-price strong {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.shop-line-price span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--muted);
}

.shop-line-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.shop-line-remove:hover {
  background: #fdeaea;
  color: var(--danger);
}

.shop-cart-foot {
  display: grid;
  gap: 12px;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.shop-ship {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}

.shop-pay {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shop-pay-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-pay-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-pay-rail[hidden] {
  display: none;
}

/* Text lockup, not the trademark asset: monochrome and inherits the ink. */
.shop-pay-brand {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
  user-select: none;
}

.shop-pay-brand.is-demo {
  color: var(--muted);
}

.shop-pay-badge {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shop-pay-badge.is-demo {
  border-style: dashed;
}

.shop-pay-methods {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.shop-pay-note {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.shop-pay-badge[hidden],
.shop-pay-methods[hidden],
.shop-pay-alt[hidden] {
  display: none;
}

.shop-pay-alt {
  justify-self: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.shop-pay-alt:hover {
  color: var(--ink);
}

.shop-totals div[hidden] {
  display: none;
}

.shop-ship progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper-3);
  appearance: none;
}

.shop-ship progress::-webkit-progress-bar {
  background: var(--paper-3);
}

.shop-ship progress::-webkit-progress-value {
  background: var(--ink);
}

.shop-ship progress::-moz-progress-bar {
  background: var(--ink);
}

.shop-totals {
  display: grid;
  gap: 4px;
  margin: 0;
}

.shop-totals div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.shop-totals dt {
  font-size: 0.84rem;
  color: var(--muted);
}

.shop-totals dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ink);
}

.shop-totals .grand {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.shop-totals .grand dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.shop-totals .grand dd {
  font-size: 1.05rem;
}

.shop-checkout {
  justify-content: center;
  width: 100%;
}

/* ── Receipt ──────────────────────────────────────────────────────────── */

.shop-receipt-hero {
  padding-bottom: 8px;
}

.shop-receipt {
  display: grid;
  gap: 18px;
  max-width: 620px;
  margin: 28px auto 0;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shop-receipt-loading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.shop-receipt-head {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.shop-receipt-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-ui);
  color: var(--ink);
}

.shop-receipt-pill.paid {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

.shop-receipt-pill.demo {
  background: var(--signal);
  border-color: var(--ink);
  color: var(--ink);
}

.shop-receipt-pill.failed {
  background: #fdeaea;
  border-color: var(--danger);
  color: var(--danger);
}

.shop-receipt-total {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1;
}

.shop-receipt-id {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-all;
}

.shop-receipt-banner {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.84rem;
  color: var(--ink-2);
}

.shop-receipt-banner.demo {
  border-left: 3px solid var(--signal);
}

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

.shop-receipt-lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
}

.shop-receipt-line-amount {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.shop-receipt-totals {
  display: grid;
  gap: 4px;
  margin: 0;
}

.shop-receipt-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--muted);
}

.shop-receipt-totals dd {
  margin: 0;
  font-family: var(--font-mono);
  color: var(--ink);
}

.shop-receipt-totals .grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.shop-receipt-totals .grand dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.shop-receipt-totals .grand dd {
  font-size: 1.02rem;
}

.shop-receipt-next h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.shop-receipt-next ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.shop-receipt .btn {
  justify-self: start;
}

/* ── Responsive and motion ────────────────────────────────────────────── */

@media (max-width: 980px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-dialog-grid {
    grid-template-columns: 1fr;
  }

  .shop-dialog-media {
    min-height: 0;
    max-height: 38vh;
  }

  .shop-dialog-media img {
    max-height: 38vh;
  }

  .shop-story-item,
  .shop-story-item.reverse {
    grid-template-columns: 1fr;
  }

  .shop-story-item.reverse img {
    order: 0;
  }

  .shop-vitals-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-hero-caption {
    position: static;
    max-width: none;
    border-radius: 0;
    border: 0;
    border-top: 1px solid var(--line);
    backdrop-filter: none;
  }

  .shop-catalog {
    margin-top: 32px;
  }

  .shop-filter {
    width: 100%;
  }

  .shop-vitals {
    padding: 18px;
  }

  .shop-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .shop-dialog-body {
    padding: 22px 20px;
  }

  .shop-cart {
    width: 100vw;
  }

  .shop-line {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
      'media info remove'
      'media controls price';
    row-gap: 8px;
  }

  .shop-line-media {
    grid-area: media;
  }

  .shop-line-info {
    grid-area: info;
  }

  .shop-line-controls {
    grid-area: controls;
    justify-self: start;
  }

  .shop-line-price {
    grid-area: price;
  }

  .shop-line-remove {
    grid-area: remove;
    justify-self: end;
  }

  .shop-cart-fab {
    right: 14px;
    bottom: 14px;
    padding: 0 14px;
  }

  .shop-receipt {
    padding: 22px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card,
  .shop-card-media img,
  .shop-cart,
  .shop-dialog,
  .shop-cart-fab {
    transition: none;
    animation: none;
  }
}

@media print {
  .shop-cart-fab,
  .lab-cta-box,
  .shop-receipt .btn,
  .case-back {
    display: none !important;
  }

  .shop-receipt {
    box-shadow: none;
    border: 0;
    max-width: none;
    padding: 0;
  }
}
/* ══ SELF-HOSTED FONTS (generated) ═════════════════════════════════════════ */
/* Fraunces (SIL OFL 1.1) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/fraunces.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter (SIL OFL 1.1) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono (SIL OFL 1.1) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(/fonts/jetbrains-mono.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ══ END SELF-HOSTED FONTS ════════════════════════════════════════════════ */
