/* =========================================================
   Barkley — Carbon-inspired styling
   Design language: Montserrat, sharp corners, dense grid,
   generous whitespace, single accent blue. Not affiliated
   with or endorsed by IBM.
   ========================================================= */

:root {
  /* Core surfaces */
  --background: #ffffff;
  --layer-01: #f4f4f4;
  --layer-02: #ffffff;
  --field-01: #f4f4f4;

  /* Text */
  --text-primary: #161616;
  --text-secondary: #525252;
  --text-helper: #6f6f6f;
  --text-on-color: #ffffff;
  --text-placeholder: #a8a8a8;

  /* Borders */
  --border-subtle: #e0e0e0;
  --border-subtle-02: #c6c6c6;
  --border-strong: #8d8d8d;

  /* Interactive */
  --link-primary: #0f62fe;
  --link-primary-hover: #0043ce;
  --link-visited: #8a3ffc;

  /* Icon accent (the muted indigo used in tile icons) */
  --icon-accent: #6f6cf6;

  /* Instantaneous Featured Tapestry stripe logo colour (tapestry-glow); JS mirrors it to hover tiles */
  --tapestry-accent-live: #5a12b2;

  /* Tapestry stripe logo accent (tapestry-glow keyframe purple) */
  --logo-center-purple: #8626d7;
  --logo-center-purple-hover: #6f1eb3;

  /* Focus */
  --focus: #0f62fe;

  /* Spacing scale (4-px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
  --sp-11: 80px;
  --sp-12: 96px;
  --sp-13: 128px;

  /* Layout */
  --topbar-h: 52px;          /* minimum row height inside the floating pill */
  --topbar-capsule-extra: 0px; /* optional extra for taller floating pill content */
  --topbar-gap: 16px;        /* breathing room above + below the pill   */
  --container-pad: 16px;
  --container-max: 1280px;   /* narrower centred column (cosine.sh feel) */

  /* Motion */
  --easing-productive: cubic-bezier(0.2, 0, 0.38, 0.9);
  --dur-fast: 110ms;
  --dur-base: 240ms;
}

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

html, body { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

/* Anchor targets used by the primary nav: leave room for the floating pill
   topbar so the section's top edge sits flush below the header instead of
   behind it. */
#nav-applications,
#nav-cloud,
#nav-ontology,
#nav-about,
#product-hero-code,
#product-hero-knowledge,
#product-hero-core,
#product-hero-sovereign,
#product-hero-public {
  scroll-margin-top: calc(var(--topbar-h) + var(--topbar-capsule-extra) + var(--topbar-gap) * 3);
}

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Reserve space at the floating pill + extra gap below it (matches scroll-margin).
     Third --topbar-gap doubles slack from pill bottom → first main content. */
  padding-top: calc(var(--topbar-h) + var(--topbar-capsule-extra) + var(--topbar-gap) * 3);
}

/* Site-wide scale-down on larger viewports only. Mobile kept at zoom:1 so centred
   typography and padding match the real viewport (Safari portrait was drifting / clipping). */
main,
.site-footer {
  zoom: 1;
}

@media (min-width: 641px) {
  main,
  .site-footer {
    zoom: 0.8;
  }
}

@supports not (zoom: 1) {
  /* Firefox & co: transform fallback only applies at desktop widths */
  main,
  .site-footer {
    transform: none;
    width: auto;
    margin-left: 0;
  }

  @media (min-width: 641px) {
    main,
    .site-footer {
      transform: scale(0.8);
      transform-origin: top center;
      width: 125%;
      margin-left: -12.5%;
    }
  }
}

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

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

a { color: var(--link-primary); text-decoration: none; }
a:hover { color: var(--link-primary-hover); text-decoration: underline; }

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-primary);
  color: #fff;
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* ========== Container ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ========== Brand wordmark ==========
   A simple Barkley wordmark. The mark is three short bars
   evoking the Carbon design language without copying any
   trademarked logotype. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
  height: 100%;
}
.brand:hover { text-decoration: none; color: var(--text-primary); }

.brand-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: #5a12b2;
  animation: tapestry-glow 20s ease-in-out infinite;
  will-change: color, filter;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark {
    animation: none;
    color: #dc3a9a;
    filter: none;
  }
}

.brand-word {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.005em;
  line-height: 1;
}

/* ========== Top navigation bar ========== */
/* Floating pill topbar — cosine.sh-inspired. Fixed at the top of the viewport,
   horizontally centred, with a glassy translucent background that blends into
   whatever blob colour is behind it. */
.topbar {
  position: fixed;
  top: var(--topbar-gap);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(20, 22, 28, 0.08);
  border-radius: 9999px;
  box-shadow:
    0 1px 2px rgba(20, 22, 28, 0.04),
    0 8px 24px rgba(20, 22, 28, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  min-height: var(--topbar-h);
  height: auto;
  max-width: none;
  padding: 8px 6px 8px 16px;
  gap: 4px;
}

.topbar-brand-cluster {
  display: flex;
  align-items: center;
  margin-right: 6px;
  padding-right: 6px;
}

.topbar .brand {
  padding-right: 6px;
  margin-right: 6px;
  border-right: none;
  height: auto;
  align-items: center;
  gap: calc(2em / 14);
  font-size: 14px;
  line-height: 1;
}

.topbar .brand-mark {
  width: calc(22em / 14);
  height: 1em;
  overflow: hidden;
  align-items: center;
  justify-content: center;
}

.topbar .brand-mark svg {
  width: calc(22em / 14);
  height: calc(22em / 14);
  flex-shrink: 0;
  stroke-width: 2.02;
}

.topbar .brand-word {
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

/* Primary nav links sit between the brand and the CTA. */
.primary-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  margin-left: 0;
  gap: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 9999px;
  transition:
    color var(--dur-fast) var(--easing-productive),
    background var(--dur-fast) var(--easing-productive);
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(20, 22, 28, 0.05);
  text-decoration: none;
}

.nav-link:focus-visible {
  outline: 2px solid var(--link-primary, #0f62fe);
  outline-offset: 2px;
}

/* Explore Tapestry CTA on the right of the pill. */
.topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--topbar-h) - 12px);
  margin-left: 6px;
  padding: 0 14px;
  border-radius: 9999px;
  background: var(--text-primary);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  transition:
    background var(--dur-fast) var(--easing-productive),
    transform var(--dur-fast) var(--easing-productive);
}

.topbar-cta:hover {
  background: #2a2e35;
  color: #fff;
  text-decoration: none;
  transform: translateY(-0.5px);
}

.topbar-cta:focus-visible {
  outline: 2px solid var(--link-primary, #0f62fe);
  outline-offset: 2px;
}

.topbar-cta svg {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .topbar {
    max-width: calc(100vw - 16px);
  }
  .topbar-inner {
    padding-left: 12px;
    padding-right: 4px;
  }
  .topbar .brand-word {
    font-size: 13px;
  }
  .nav-link {
    font-size: 12px;
    padding: 0 9px;
  }
  .topbar-cta {
    padding: 0 10px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  /* On very narrow screens, hide the secondary nav links so the brand + CTA
     can stay visible without wrapping the pill. */
  .primary-nav { display: none; }
}

@media (max-width: 420px) {
  .nav-link {
    font-size: 12px;
    padding: 0 6px;
  }
}

/* ========== Global page background (pastel cloud blobs) ========== */
.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-blob {
  position: absolute;
  width: 56vw;
  height: 56vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}
.page-blob--1 { top: 0;    left: -10%; background: #f8c8d9; opacity: 0.55; }
.page-blob--2 { top: 6%;   right: -8%; background: #c8e0f8; opacity: 0.5;  }
.page-blob--3 { top: 30%;  left: -12%; background: #ddc8f6; opacity: 0.4;  }
.page-blob--4 { top: 50%;  right: -10%; background: #f8c8d9; opacity: 0.4; }
.page-blob--5 { top: 72%;  left: 6%;   background: #c8e0f8; opacity: 0.45; }
.page-blob--6 { top: 90%;  right: 12%; background: #ddc8f6; opacity: 0.45; }

@media (max-width: 640px) {
  .page-blob {
    filter: blur(70px);
    max-width: 460px;
    max-height: 460px;
  }
}

/* Ontology canvas (fullscreen decorative layer — above pastel blobs, under main/footer) */
.tapestry-bg-embed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  border: 0;
  z-index: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .tapestry-bg-embed {
    display: none;
  }
}

/* Lift main content above the global blobs */
main { position: relative; z-index: 1; }
.site-footer { position: relative; z-index: 1; }

/* ========== Hero (Cosine-inspired centered hero — transparent over global bg) ========== */
.hero {
  position: relative;
  padding-top: clamp(92px, 12.96vw, 208px);
  padding-bottom: clamp(76px, 11.2vw, 166px);
  background: transparent;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-stack {
  display: flex;
  flex-direction: column;
  /* stretch (not center): `align-items: center` shrink-wraps the h1 to max-content,
     so nowrap lines become wider than the viewport and clip under overflow-x: hidden. */
  align-items: stretch;
  text-align: center;
  gap: clamp(20px, 3vw, 36px);
}

/* JS removes after 6s — first paint gap before hero rotator / lines show */
.hero-stack.hero-stack--delayed-reveal {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  /* 10% smaller than the previous clamp — multiplicative so all breakpoints scale. */
  font-size: clamp(calc(32px * 0.9), calc(6.4vw * 0.9), calc(83px * 0.9));
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--text-primary);
  opacity: 1;
  /* Fade-in when leaving .is-fading (each new slide reveals over 1s) */
  transition: opacity 1s ease-out;
  /* Wide enough for Love + brand + long rotating taglines + lock */
  max-width: min(52ch, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  text-align: center;
  /* Exactly three visual rows; gap is vertical rhythm between them */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.06em, 0.9vw, 0.14em);
  box-sizing: border-box;
}

.hero-title.is-fading {
  opacity: 0;
  transition: opacity 1s ease-in;
}

/* Three rows: (1) Love + brand + logo, (2) longer substring, (3) shorter substring + lock
   Each row is a flex container so children are not baseline-aligned in an anonymous line box
   (that extra strut made the gap below line 2 look smaller than the gap above line 3). */
.hero-line {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: center;
}

/* Row 1: inline-flex rollup — single flex child, never wraps internally */
.hero-line--r1 {
  text-align: center;
}

.hero-r1-roll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.35em;
  max-width: 100%;
  vertical-align: top;
}
/* #heroSlideRow1: rotator fade uses .hero-title.is-fading (single opacity layer). */

.hero-love {
  flex-shrink: 0;
}

/* Rotating product name + logo share one baseline; do not shrink them apart */
.hero-brand-lockup {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.06em;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Row 2: single typographic line (longer fragment) */
.hero-line-long {
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Row 3: shorter fragment + lock — one row, lock always last */
.hero-line--r3 .hero-mark--lock {
  flex-shrink: 0;
}

.hero-tagline-chunk {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-web-lock-unit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.12em;
  max-width: 100%;
  min-width: 0;
}

.hero-nowrap {
  white-space: nowrap;
}

.hero-rotator {
  display: inline-block;
  flex-shrink: 0;
  transition: color 1s ease;
  will-change: color;
}

.hero-rotator[data-tone="azure"]   { color: #1e88e5; }
.hero-rotator[data-tone="teal"]    { color: #2dd4bf; }
.hero-rotator[data-tone="orange"]  { color: #ff6b35; }
.hero-rotator[data-tone="magenta"] { color: #d946ef; }
.hero-rotator[data-tone="amber"]   { color: #f59e0b; }
.hero-rotator[data-tone="primary"] { color: var(--text-primary); }

/* Sovereign CTA: row 2 at 2× (logo + name, or helpOnly “We can help” only); lock hidden */
.hero-line.hero-line--sovereign-cta.hero-line-long {
  white-space: normal;
  overflow: visible;
}
.hero-line--sovereign-cta.hero-line-long .hero-sovereign-lockup {
  font-size: 2em;
  line-height: 1.05;
}
.hero-sovereign-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.28em;
  max-width: 100%;
}
.hero-line--sovereign-cta.hero-line-long .hero-sovereign-lockup.hero-sovereign-lockup--brand-large {
  line-height: 1;
}

.hero-sovereign-lockup.hero-sovereign-lockup--brand-large {
  gap: calc(2em / 14);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.hero-sovereign-lockup.hero-sovereign-lockup--help-only {
  gap: 0;
}

.hero-sovereign-inline-logo {
  height: 0.95em;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-tapestry-mark {
  display: inline-flex;
  flex-shrink: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  width: calc(22em / 14);
  height: 1em;
  color: #5a12b2;
  animation: tapestry-glow 20s ease-in-out infinite;
  will-change: color, filter;
}

.hero-tapestry-mark svg {
  width: calc(22em / 14);
  height: calc(22em / 14);
  flex-shrink: 0;
  stroke-width: 2.02;
}

.hero-sovereign-lockup--brand-large .hero-sovereign-name {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-tapestry-mark {
    animation: none;
    color: #dc3a9a;
    filter: none;
  }
}

/* Slide 4 (sovereign CTA): no Agentic/brand chip after line 1; no padlock on line 3 */
.hero-title.hero-title--sovereign-slide .hero-mark--lock,
.hero-title.hero-title--sovereign-slide .hero-mark--brand {
  display: none !important;
  visibility: hidden;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-title { transition: none; will-change: auto; }
  .hero-rotator { transition: none; will-change: auto; }
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.85em;
  height: 0.85em;
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 0.06em;
  position: relative;
  top: -0.06em;
  color: var(--text-primary);
}
.hero-mark svg {
  width: 56%;
  height: 56%;
}
.hero-mark--lock { background: #fbd2de; }
.hero-mark--chip { background: #cfe1f8; }

/* Brand-logo chip — replaces the generic chip while the rotator cycles brands.
   Wrapper drops the circular pill and sizes by height so logos with varying
   aspect ratios (square Claude / OpenAI / Gemini, wider HuggingFace, etc.)
   line up neatly with the surrounding title text. */
.hero-mark--brand {
  background: transparent;
  border-radius: 0;
  width: auto;
  min-width: 1em;
  height: 1.05em;
  padding: 0 0.05em;
  top: -0.04em;
}
.hero-brand-lockup > .hero-mark.hero-mark--brand {
  flex-shrink: 0;
}
.hero-mark--brand .hero-mark-img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  transform: scale(var(--logo-scale, 1));
  transform-origin: center center;
  transition: transform 1s ease;
}

/* Lock-shackle: JS-driven states (default = closed, .unlocked = open, .closing = animate-to-closed, .cycling = open-then-close) */
.hero-mark--lock .lock-shackle {
  transform-box: fill-box;
  transform-origin: 100% 100%;
}

.hero-mark--lock .lock-shackle.unlocked {
  transform: rotate(38deg);
}

@keyframes lock-close-once {
  from { transform: rotate(38deg); }
  to   { transform: rotate(0deg); }
}

@keyframes lock-cycle-once {
  0%   { transform: rotate(0deg); }
  30%  { transform: rotate(38deg); }
  65%  { transform: rotate(38deg); }
  100% { transform: rotate(0deg); }
}

.hero-mark--lock .lock-shackle.closing {
  animation: lock-close-once 700ms cubic-bezier(0.5, 0, 0.2, 1) both;
}

.hero-mark--lock .lock-shackle.cycling {
  animation: lock-cycle-once 1.6s cubic-bezier(0.5, 0, 0.2, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark--lock .lock-shackle.closing,
  .hero-mark--lock .lock-shackle.cycling { animation: none; }
}

.hero-lede {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0;
  color: var(--text-primary);
  text-align: center;
}

.inline-link {
  color: var(--link-primary);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.inline-link:hover {
  color: var(--link-primary-hover);
  text-decoration: none;
}

@media (max-width: 640px) {
  .hero {
    padding-top: clamp(68px, 17.28vw, 116px);
  }
  /* Keep three stacked rows — ellipsis if overflow on very narrow viewports */
  .hero-line-long,
  .hero-line--r3 .hero-tagline-chunk {
    white-space: nowrap;
  }
  .hero-title {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-inline: 0;
    /* Tighter fluid type so row 1 (Love + name + logo nowrap) fits without clipping */
    font-size: clamp(13px, 3.55vw + 7px, 19px);
    letter-spacing: -0.028em;
    width: 100%;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
    padding-inline: 0;
  }
  .hero-blob {
    filter: blur(64px);
    opacity: 0.55;
    max-width: 460px;
    max-height: 460px;
  }
  .hero-lede {
    max-width: 92%;
    font-size: 16px;
  }
}

/* ========== Tile grid ========== */
.tiles {
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(20px, 3vw, 40px);
  background: transparent;
}

/* Centred section rails above mega-cards and above capability tiles. */
.tiles-rail-heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--text-primary);
  margin: 0 auto;
  max-width: min(28ch, 100%);
}

.tiles > .container > .tiles-rail-heading:first-of-type {
  padding-top: clamp(4px, 1.2vw, 14px);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.tiles-rail-heading--barkley {
  max-width: min(32ch, 100%);
}

.product-hero-row--core + .tiles-rail-heading {
  margin-top: clamp(36px, 5.5vw, 72px);
  margin-bottom: clamp(20px, 3vw, 36px);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-7);
  background: transparent;
}

.tile-grid > li {
  display: flex;
  min-height: 0;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 196px;
  /* Glass: cool upper-left → warmer cream / soft peach bottom-right (offsets pink/purple cast) */
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(252, 252, 254, 0.5) 44%,
    rgba(255, 248, 239, 0.56) 74%,
    rgba(255, 234, 214, 0.42) 100%
  );
  backdrop-filter: blur(16px) saturate(1.18);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  color: var(--text-primary);
  text-decoration: none !important;
  padding: 20px;
  border-radius: 10px;
  /* Glass edge + neo “raised” silhouette */
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    8px 8px 20px rgba(18, 20, 24, 0.08),
    9px 14px 26px rgba(255, 138, 72, 0.07),
    -7px -7px 18px rgba(255, 255, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 1px 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 10px rgba(255, 154, 94, 0.09);
  transition:
    background var(--dur-base) var(--easing-productive),
    color var(--dur-fast) var(--easing-productive),
    box-shadow var(--dur-base) var(--easing-productive),
    border-color var(--dur-fast) var(--easing-productive),
    backdrop-filter var(--dur-base) var(--easing-productive),
    transform var(--dur-fast) var(--easing-productive);
}
/* Top edge + hover fill: violet (top-left) → magenta → orange (bottom-right); 135deg = TL→BR */
.tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    135deg,
    #5a12b2 0%,
    #dc3a9a 32%,
    #ff6f2b 66%,
    #ff9520 100%
  );
  border-radius: 10px 10px 0 0;
  transform: scaleX(1);
  transform-origin: left;
  transition:
    height var(--dur-fast) var(--easing-productive),
    box-shadow var(--dur-fast) var(--easing-productive);
}

.tile:hover,
.tile:focus-visible {
  /* Solid tint keyed to Featured Tapestry stripe (see --tapestry-accent-live + tapestry-glow) */
  background: color-mix(
    in srgb,
    var(--tapestry-accent-live) 73%,
    rgba(255, 255, 255, 0.16)
  );
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    10px 10px 28px color-mix(in srgb, var(--tapestry-accent-live) 22%, transparent),
    12px 16px 34px color-mix(in srgb, var(--tapestry-accent-live) 26%, transparent),
    -4px -4px 14px rgba(255, 255, 255, 0.22),
    inset 2px 2px 6px rgba(255, 255, 255, 0.32),
    inset -3px -3px 16px color-mix(in srgb, var(--tapestry-accent-live) 14%, transparent),
    inset -4px -6px 20px color-mix(in srgb, var(--tapestry-accent-live) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transform: translateY(-1px);
  outline: none;
}

.tile:hover::before,
.tile:focus-visible::before {
  height: 5px;
  background: var(--tapestry-accent-live);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 8px color-mix(in srgb, var(--tapestry-accent-live) 48%, transparent);
}
.tile:hover .tile-title,
.tile:focus-visible .tile-title,
.tile:hover .tile-icon,
.tile:focus-visible .tile-icon,
.tile:hover .tile-arrow,
.tile:focus-visible .tile-arrow {
  color: #fff;
}

.tile-title {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.tile-icon {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: var(--icon-accent);
  display: inline-flex;
}

.tile-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--text-primary);
  display: inline-flex;
  transition: transform var(--dur-base) var(--easing-productive);
}
.tile:hover .tile-arrow { transform: translateX(4px); }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .tile {
    background: rgba(253, 253, 253, 0.97);
  }

  .tile:hover,
  .tile:focus-visible {
    background: color-mix(
      in srgb,
      var(--tapestry-accent-live) 88%,
      rgb(255, 255, 255)
    );
  }

  .hero {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(253, 253, 253, 0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile {
    transition-duration: 0.01ms;
  }

  .tile:hover,
  .tile:focus-visible {
    transform: none;
  }
}

@media (max-width: 1100px) {
  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .tile-grid { grid-template-columns: 1fr; }
  .tile { min-height: 152px; }
}

/* ========== Tapestry mega-cards (above capability tiles) ========== */
.product-hero-row {
  list-style: none;
  margin: 0 0 clamp(20px, 3vw, 36px);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-7);
}

/* Single centred card: same approximate width as one column of the twin row */
.product-hero-row--core {
  list-style: none;
  margin: 0 0 clamp(20px, 3vw, 36px);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
}

.product-hero-row--core > li {
  width: 100%;
  max-width: calc((100% - var(--sp-7)) / 2);
}

@media (max-width: 900px) {
  .product-hero-row--core > li {
    max-width: 100%;
  }
}

.product-hero-row > li {
  display: flex;
  min-height: 0;
}

.product-hero-card {
  flex: 1;
  align-self: start;
  width: 100%;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.product-hero-card--code {
  --product-accent: #7c3aed;
  --product-accent-strong: #5b21b6;
  --product-icon: #9333ea;
}

.product-hero-card--knowledge {
  --product-accent: #c026d3;
  --product-accent-strong: #86198f;
  --product-icon: #d946ef;
}

/* Tapestry Core: Chat-style flip + gradients, overwhelmingly blue */
.product-hero-card--knowledge.product-hero-card--core {
  --product-accent: #38bdf8;
  --product-accent-strong: #0c4a6e;
  --product-icon: #7dd3fc;
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-face--front::before {
  background: linear-gradient(
    165deg,
    #0f172a 0%,
    #0f172a 38%,
    #0c3569 52%,
    #1e40af 70%,
    #2563eb 86%,
    #38bdf8 98%,
    #7dd3fc 100%
  );
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-face--front::after {
  background: linear-gradient(
    90deg,
    #172554 0%,
    #1d4ed8 45%,
    #38bdf8 95%,
    #bae6fd 100%
  );
}

/* Tapestry Core only: medium blue (top-left) → very dark blue (bottom-right); Sovereign / Public unchanged. */
#product-hero-core .product-hero-face--front::before {
  background: linear-gradient(
    to bottom right,
    #60a5fa 0%,
    #3b82f6 20%,
    #2563eb 44%,
    #1d4ed8 64%,
    #1e3a8a 84%,
    #0f172a 100%
  );
}

#product-hero-core .product-hero-face--front::after {
  background: linear-gradient(
    135deg,
    #3b82f6 0%,
    #2563eb 38%,
    #172554 78%,
    #0f172a 100%
  );
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe {
  --pw-default: rgba(30, 64, 175, 0.52);
  --pw-hover: rgba(224, 242, 254, 0.95);
  --pw-accent: rgba(125, 211, 252, 0.96);
  --pw-fill-accent: 59, 130, 246;
}

.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe {
  --pw-default: rgba(255, 255, 255, 0.55);
  --pw-hover: rgba(255, 255, 255, 0.95);
  --pw-accent: rgba(255, 255, 255, 0.96);
}

/* Tapestry Core card front — ingest hub SVG (palette via --pw-* on .product-hero-wireframe). */
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .wf-line {
  stroke: var(--pw-default);
  transition: stroke 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ph-core-ingest-geom-thin {
  stroke: var(--pw-default);
  opacity: 0.5;
  transition: stroke 0.45s ease, opacity 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .wf-accent:not([stroke="none"]) {
  stroke: var(--pw-accent);
  transition: stroke 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .wf-dot {
  fill: var(--pw-accent);
  transition: fill 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .wf-accent-fill {
  fill: rgba(var(--pw-fill-accent), 0.88);
  transition: fill 0.45s ease;
}

.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest .wf-line,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest .wf-line {
  stroke: var(--pw-hover);
}
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest .ph-core-ingest-geom-thin,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest .ph-core-ingest-geom-thin {
  stroke: var(--pw-hover);
  opacity: 0.82;
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest text.ph-core-ingest-title {
  fill: var(--pw-default);
  opacity: 0.62;
  transition: fill 0.45s ease, opacity 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-line-thin {
  fill: var(--pw-default);
  opacity: 0.78;
  transition: fill 0.45s ease, opacity 0.45s ease;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-accent {
  fill: var(--pw-accent);
  transition: fill 0.45s ease, opacity 0.45s ease;
}

.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest text.ph-core-ingest-title,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest text.ph-core-ingest-title {
  fill: var(--pw-hover);
  opacity: 0.94;
}
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-line-thin,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-line-thin {
  fill: var(--pw-hover);
  opacity: 0.94;
}
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-accent,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest text.ph-core-ingest-caption.wf-accent {
  fill: var(--pw-accent);
  opacity: 1;
}

.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest .wf-dot,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest .wf-dot {
  fill: var(--pw-accent);
}
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe--core-ingest .wf-accent-fill,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe--core-ingest .wf-accent-fill {
  fill: rgba(255, 255, 255, 0.92);
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ph-core-ingest-read-pulse {
  animation: readPulse 2.5s ease-in-out infinite;
}

.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .pipe-flow {
  stroke-dasharray: 8 6;
  animation: pipeFlow 0.8s linear infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-1 {
  animation: ingestFlow1 2.5s ease-in infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-2 {
  animation: ingestFlow2 2.8s ease-in 0.4s infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-3 {
  animation: ingestFlow3 3s ease-in 0.8s infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-4 {
  animation: ingestFlow4 2.6s ease-in 1.2s infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-5 {
  animation: ingestFlow5 2.4s ease-in 0.6s infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-6 {
  animation: ingestFlow6 2.7s ease-in 1s infinite;
}
.product-hero-card--knowledge.product-hero-card--core .product-hero-wireframe--core-ingest .ingest-flow-7 {
  animation: ingestFlow7 3.2s ease-in 1.5s infinite;
}

/*
 * Playing-card flip: intrinsic height follows the FRONT only.
 * Grid-overlap sizing used max(front, back), so collapsed cards reserved tall back-panel space.
 * Absolutely positioned back + in-flow front fixes layout; omit filter+dropshadow — they flatten 3D
 * descendants and hide faces in Chromium/WebKit.
 */
.product-hero-scene {
  perspective: 960px;
  perspective-origin: 50% 50%;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.product-hero-flipper {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.42, 0.06, 0.15, 1);
}

.product-hero-card.is-flipped .product-hero-flipper {
  transform: rotateY(180deg);
}

.product-hero-face {
  box-sizing: border-box;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid var(--border-subtle-02);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 6px rgba(22, 22, 22, 0.1);
}

.product-hero-face--front {
  position: relative;
  z-index: 2;
  transform: rotateY(0deg) translateZ(3px);
}

.product-hero-face--back {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  transform: rotateY(180deg) translateZ(3px);
  display: flex;
  flex-direction: column;
  outline: none;
}

.product-hero-card.is-flipped .product-hero-face--back {
  cursor: pointer;
}

.product-hero-card.is-flipped .product-hero-face--back:focus-visible {
  outline: 2px solid var(--product-accent);
  outline-offset: 3px;
}

/*
 * Tapestry Code / Chat fronts: same violet → magenta → orange language as .tile,
 * diagonal mirrored (Code: purple TL; Knowledge: purple TR). Gradient overlay is muted
 * until hover/focus-within (full vibrancy), glass base matches capability tiles.
 */
.product-hero-card--code .product-hero-face--front,
.product-hero-card--knowledge .product-hero-face--front {
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    8px 8px 20px rgba(18, 20, 24, 0.06),
    -7px -7px 18px rgba(255, 255, 255, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 1px 1px 0 rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  background: rgba(255, 255, 255, 0.92);
  transition:
    border-color var(--dur-base) var(--easing-productive),
    box-shadow var(--dur-base) var(--easing-productive),
    backdrop-filter var(--dur-base) var(--easing-productive);
}

.product-hero-card--code .product-hero-face--front::before,
.product-hero-card--knowledge .product-hero-face--front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: saturate(1) brightness(1);
  transition:
    opacity var(--dur-base) var(--easing-productive),
    filter var(--dur-base) var(--easing-productive);
}

/* Inverted diagonal + blue-dominant: deep violet anchors the bottom-left and
   carries ~70% of the card; the orange/pink fade is compressed into the
   top-right corner. */
.product-hero-card--code .product-hero-face--front::before {
  background: linear-gradient(
    to top right,
    #5a12b2 0%,
    #5a12b2 38%,
    #7c1ea7 60%,
    #c8348f 78%,
    #ff7a32 94%,
    #ff9520 100%
  );
}

/* Same stops, opposite diagonal: purple anchors top-right → orange bottom-left. */
.product-hero-card--knowledge .product-hero-face--front::before {
  background: linear-gradient(
    to bottom left,
    #5a12b2 0%,
    #dc3a9a 32%,
    #ff6f2b 66%,
    #ff9520 100%
  );
}

.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front::before,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front::before,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front::before,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front::before {
  opacity: 0.96;
  filter: saturate(1) brightness(1);
}

/* Persistent 4px gradient top edge (same palette as .tile::before) */
.product-hero-card--code .product-hero-face--front::after,
.product-hero-card--knowledge .product-hero-face--front::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    135deg,
    #5a12b2 0%,
    #dc3a9a 32%,
    #ff6f2b 66%,
    #ff9520 100%
  );
  pointer-events: none;
  z-index: 1;
}

.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    10px 10px 28px rgba(60, 20, 90, 0.14),
    12px 16px 34px rgba(255, 118, 52, 0.16),
    -4px -4px 14px rgba(255, 255, 255, 0.22),
    inset 2px 2px 6px rgba(255, 255, 255, 0.32),
    inset -3px -3px 16px rgba(90, 36, 110, 0.1),
    inset -4px -6px 20px rgba(255, 134, 62, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(22px) saturate(1.45);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
}

/* At rest: dark type on glass; hover: white type like .tile */
.product-hero-card--code .product-hero-face--front .product-hero-toggle,
.product-hero-card--knowledge .product-hero-face--front .product-hero-toggle {
  color: var(--text-primary);
  transition: color var(--dur-base) var(--easing-productive);
}

.product-hero-card--code .product-hero-face--front .product-hero-name,
.product-hero-card--knowledge .product-hero-face--front .product-hero-name {
  color: var(--text-primary);
  transition: color var(--dur-base) var(--easing-productive);
}

.product-hero-card--code .product-hero-face--front .product-hero-teaser,
.product-hero-card--knowledge .product-hero-face--front .product-hero-teaser {
  color: var(--text-secondary);
  transition: color var(--dur-base) var(--easing-productive);
}

.product-hero-card--code .product-hero-face--front .product-hero-badge,
.product-hero-card--knowledge .product-hero-face--front .product-hero-badge {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(22, 22, 22, 0.08);
  transition:
    color var(--dur-base) var(--easing-productive),
    background var(--dur-base) var(--easing-productive),
    border-color var(--dur-base) var(--easing-productive);
}

.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front .product-hero-toggle,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front .product-hero-toggle,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front .product-hero-toggle,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front .product-hero-toggle,
.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front .product-hero-name,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front .product-hero-name,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front .product-hero-name,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front .product-hero-name {
  color: #fff;
}

.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front .product-hero-teaser,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front .product-hero-teaser,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front .product-hero-teaser,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front .product-hero-teaser {
  color: rgba(255, 255, 255, 0.88);
}

.product-hero-card--code:not(.is-flipped):hover .product-hero-face--front .product-hero-badge,
.product-hero-card--code:not(.is-flipped):focus-within .product-hero-face--front .product-hero-badge,
.product-hero-card--knowledge:not(.is-flipped):hover .product-hero-face--front .product-hero-badge,
.product-hero-card--knowledge:not(.is-flipped):focus-within .product-hero-face--front .product-hero-badge {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .product-hero-card--code .product-hero-face--front,
  .product-hero-card--knowledge .product-hero-face--front {
    background: rgba(253, 253, 253, 0.97);
  }
}

.product-hero-card--code .product-hero-face--back,
.product-hero-card--knowledge .product-hero-face--back {
  background: #ffffff;
}

/* ========== Flipped state: card grows wider + taller, sibling fades out ========== */

/* Allow the flipped card to overflow its grid cell so it can extend across the
   row without changing the grid template (which would snap layout). */
.product-hero-row,
.product-hero-row > li {
  overflow: visible;
}

.product-hero-row > li {
  position: relative;
}

/* Sibling card fades out (and ignores pointer events) while the other card is
   flipped. Using opacity instead of display:none keeps the layout stable so
   every property — rotation, width, height, position, opacity — can animate
   smoothly in lockstep when flipping AND when un-flipping. */
.product-hero-row > li {
  opacity: 1;
  transition: opacity 0.6s var(--easing-productive);
}

.product-hero-row:has(.is-flipped) > li:not(:has(.is-flipped)) {
  opacity: 0;
  pointer-events: none;
}

/* Card transitions live on the BASE rule so they apply when .is-flipped is
   added AND when it's removed — that way the flip-back rotation, the width
   shrink, and the horizontal slide back to its column all play together.
   `flex: 0 0 auto` makes the card's main size honour `width` rather than the
   default `flex-basis: 0%` from `flex: 1`, so the 100% → 150% width transition
   actually renders. */
.product-hero-card {
  flex: 0 0 auto;
  position: relative;
  left: 0;
  z-index: 1;
  transition:
    width 0.72s var(--easing-productive),
    left 0.72s var(--easing-productive),
    z-index 0s linear 0.72s; /* delay z-index drop until shrink is done */
}

/* Flipped card grows wider than its <li> (overflowing into the sibling cell)
   and lifts above siblings via z-index so it cleanly covers them. */
.product-hero-card.is-flipped {
  width: 150%;   /* 1.5× the <li> width = 75% of the row */
  z-index: 5;
  transition:
    width 0.72s var(--easing-productive),
    left 0.72s var(--easing-productive),
    z-index 0s linear 0s;
}

/* Centre the flipped card across the row: nudge a left-column card to the
   right, and pull a right-column card to the left, by 25% of an <li>'s width
   so the resulting 75%-row card sits centred. Twin row only — Tapestry Core
   sits in a centred column (see `.product-hero-row--core` below). */
.product-hero-row:not(.product-hero-row--core) > li:nth-child(1) .product-hero-card.is-flipped {
  left: 25%;
}

.product-hero-row:not(.product-hero-row--core) > li:nth-child(2) .product-hero-card.is-flipped {
  left: -75%;
}

/*
 * Tapestry Core: `<li>` is centred (half-row width); `.is-flipped` grows the
 * card to 150% of that column, anchored on the `<li>`'s left edge. Without a
 * nudge, the spill is asymmetric to the right. Pull left by 25% of the `<li>`
 * so the enlarged card matches twin-row centre (same perceived width span).
 */
.product-hero-row--core > li:nth-child(1) .product-hero-card.is-flipped {
  left: -25%;
}

/* On mobile the row is a single column, so the flipped card just fills its
   column at normal width with no horizontal offset — only height + rotation. */
@media (max-width: 900px) {
  .product-hero-card.is-flipped {
    width: 100%;
  }
  .product-hero-row:not(.product-hero-row--core) > li:nth-child(1) .product-hero-card.is-flipped,
  .product-hero-row:not(.product-hero-row--core) > li:nth-child(2) .product-hero-card.is-flipped {
    left: 0;
  }
  .product-hero-row--core > li:nth-child(1) .product-hero-card.is-flipped {
    left: 0;
  }
}

/* Card height doubles when flipped — applied to the toggle, which drives the
   front face's height (and therefore the absolutely-positioned back face).
   Transition lives on the BASE rule so both directions animate. */
.product-hero-toggle {
  transition:
    min-height 0.72s var(--easing-productive),
    background var(--dur-base) var(--easing-productive),
    color var(--dur-fast) var(--easing-productive);
}

.product-hero-card.is-flipped .product-hero-toggle {
  min-height: clamp(708px, 96vw, 828px);
}

/* ========== Tapestry Code / Chat: dynamic wireframe illustration ========== */
.product-hero-wireframe {
  /* Light palette for the resting white card */
  --pw-default: rgba(26, 26, 30, 0.18);
  --pw-hover: rgba(26, 26, 30, 0.55);
  --pw-accent: rgba(26, 26, 30, 0.65);

  position: absolute;
  right: clamp(14px, 1.8vw, 26px);
  bottom: clamp(14px, 1.8vw, 26px);
  width: clamp(161px, 25.3vw, 253px);
  height: clamp(161px, 25.3vw, 253px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.96;
}

.product-hero-wireframe svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Reserve right-hand space on the toggle so title/teaser don't run into the wireframe */
.product-hero-card--code .product-hero-toggle,
.product-hero-card--knowledge .product-hero-toggle {
  padding-right: clamp(190px, 27.6vw, 290px);
}

/* On card hover/focus-within: switch palette to white wires for the vivid gradient */
.product-hero-card--code:hover .product-hero-wireframe,
.product-hero-card--code:focus-within .product-hero-wireframe,
.product-hero-card--knowledge:hover .product-hero-wireframe,
.product-hero-card--knowledge:focus-within .product-hero-wireframe {
  --pw-default: rgba(255, 255, 255, 0.55);
  --pw-hover: rgba(255, 255, 255, 0.95);
  --pw-accent: rgba(255, 255, 255, 0.96);
}

/* Per-card vivid resting palette + accent fill colour, all drawn from the card hover gradient */
.product-hero-card--code .product-hero-wireframe {
  --pw-default: rgba(91, 33, 182, 0.62);    /* deep violet — primary wire colour at rest */
  --pw-hover: rgba(91, 33, 182, 0.95);
  --pw-accent: rgba(220, 58, 154, 0.95);    /* magenta accent (citation, code accent lines, terminal prompt) */
  --pw-fill-accent: 91, 33, 182;            /* RGB triplet for filled bubbles/tabs on card hover */
}
.product-hero-card--knowledge .product-hero-wireframe {
  --pw-default: rgba(230, 50, 149, 0.6);    /* vivid magenta — primary wire colour at rest */
  --pw-hover: rgba(230, 50, 149, 0.95);
  --pw-accent: rgba(255, 107, 26, 0.95);    /* orange accent */
  --pw-fill-accent: 230, 50, 149;
}

/* Class-to-paint bindings (scoped under the wireframe) */
.product-hero-wireframe .wire-stroke {
  stroke: var(--pw-default);
  transition: stroke 0.45s ease;
}
.product-hero-wireframe .wire-accent {
  stroke: var(--pw-default);
  transition: stroke 0.45s ease;
}
.product-hero-wireframe .wire-fill-default {
  fill: var(--pw-default);
  transition: fill 0.45s ease;
}
.product-hero-wireframe .wire-fill-accent {
  fill: transparent;
  transition: fill 0.45s ease, opacity 0.45s ease;
}

/* On hover: structural strokes brighten (stroke-only — must NOT add fill, those rects are outlines) */
.product-hero-card--code:hover .product-hero-wireframe .wire-stroke,
.product-hero-card--code:focus-within .product-hero-wireframe .wire-stroke,
.product-hero-card--knowledge:hover .product-hero-wireframe .wire-stroke,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .wire-stroke {
  stroke: var(--pw-hover);
}

/* Fill-only nodes (cursors, dots, minimap, terminal caret) brighten — fill only, no stroke */
.product-hero-card--code:hover .product-hero-wireframe .wire-fill-default,
.product-hero-card--code:focus-within .product-hero-wireframe .wire-fill-default,
.product-hero-card--knowledge:hover .product-hero-wireframe .wire-fill-default,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .wire-fill-default {
  fill: var(--pw-hover);
}

/* Accent strokes (citation badge, code import accent, terminal prompt) — stroke only */
.product-hero-card--code:hover .product-hero-wireframe .wire-accent,
.product-hero-card--code:focus-within .product-hero-wireframe .wire-accent,
.product-hero-card--knowledge:hover .product-hero-wireframe .wire-accent,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .wire-accent {
  stroke: var(--pw-accent);
}

/* Accent FILLS (message bubbles, tabs, active-line highlight) — vivid card-matched colour */
.product-hero-card--code:hover .product-hero-wireframe .wire-fill-accent,
.product-hero-card--code:focus-within .product-hero-wireframe .wire-fill-accent,
.product-hero-card--knowledge:hover .product-hero-wireframe .wire-fill-accent,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .wire-fill-accent {
  fill: rgba(var(--pw-fill-accent), 0.78);
  opacity: 1;
}

/* Wireframe animations (prefixed keyframe names to avoid global clashes) */
@keyframes phw-blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes phw-float-up {
  0% { opacity: 0; transform: translateY(6px); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes phw-ghost-fade { 0%, 70% { opacity: 0.25; } 100% { opacity: 0; } }
@keyframes phw-code-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes phw-dot-pulse {
  0%, 100% { r: 1.8; opacity: 0.3; }
  50% { r: 2.5; opacity: 0.7; }
}
@keyframes phw-term-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.product-hero-wireframe .typing-cursor { animation: phw-blink-cursor 1s ease-in-out infinite; }
.product-hero-wireframe .animate-float { animation: phw-float-up 2.5s ease-out infinite; }
.product-hero-wireframe .ghost-text { animation: phw-ghost-fade 4s ease-in-out infinite; }
.product-hero-wireframe .code-cursor { animation: phw-code-cursor 1.1s step-end infinite; }
.product-hero-wireframe .term-cursor { animation: phw-term-blink 0.8s step-end infinite; }
.product-hero-wireframe .sidebar-dot { animation: phw-dot-pulse 2.5s ease-in-out infinite; }
.product-hero-wireframe .sidebar-dot-d1 { animation-delay: 0.2s; }
.product-hero-wireframe .sidebar-dot-d2 { animation-delay: 0.5s; }
.product-hero-wireframe .sidebar-dot-d3 { animation-delay: 0.8s; }
.product-hero-wireframe .sidebar-dot-d4 { animation-delay: 1.1s; }

/* Line-pulse: staggered glow on selected code/chat lines, suggesting "streaming" output */
@keyframes phw-line-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.product-hero-wireframe .line-pulse-1 { animation: phw-line-glow 3s ease-in-out 0s infinite; }
.product-hero-wireframe .line-pulse-2 { animation: phw-line-glow 3s ease-in-out 0.4s infinite; }
.product-hero-wireframe .line-pulse-3 { animation: phw-line-glow 3s ease-in-out 0.8s infinite; }
.product-hero-wireframe .line-pulse-4 { animation: phw-line-glow 3s ease-in-out 1.2s infinite; }

/* Hover-only elements: invisible at rest, fade in (and animate) only when the card is hovered */
.product-hero-wireframe .pw-hover-only {
  opacity: 0;
  transition: opacity 0.45s ease;
}
.product-hero-card--code:hover .product-hero-wireframe .pw-hover-only,
.product-hero-card--code:focus-within .product-hero-wireframe .pw-hover-only,
.product-hero-card--knowledge:hover .product-hero-wireframe .pw-hover-only,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .pw-hover-only {
  opacity: 1;
}

/* Code wireframe: scanning line that travels down the code area */
@keyframes phw-code-scan {
  0%   { transform: translateY(0);   opacity: 0; }
  10%  { opacity: 0.85; }
  90%  { opacity: 0.85; }
  100% { transform: translateY(96px); opacity: 0; }
}
.product-hero-card--code:hover .product-hero-wireframe .pw-code-scan,
.product-hero-card--code:focus-within .product-hero-wireframe .pw-code-scan,
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe .pw-code-scan,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe .pw-code-scan {
  animation: phw-code-scan 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Code wireframe: build-progress bar that fills and resets */
@keyframes phw-progress-fill {
  0%   { transform: scaleX(0); }
  60%  { transform: scaleX(1); }
  85%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}
.product-hero-card--code:hover .product-hero-wireframe .pw-progress,
.product-hero-card--code:focus-within .product-hero-wireframe .pw-progress,
.product-hero-card--knowledge.product-hero-card--core:hover .product-hero-wireframe .pw-progress,
.product-hero-card--knowledge.product-hero-card--core:focus-within .product-hero-wireframe .pw-progress {
  animation: phw-progress-fill 3s cubic-bezier(0.55, 0, 0.45, 1) infinite;
  transform-origin: left;
}

/* Chat wireframe: send-arrow pulse */
@keyframes phw-send-pulse {
  0%, 100% { transform: translateX(0);   opacity: 0.65; }
  50%      { transform: translateX(2px); opacity: 1; }
}
.product-hero-card--knowledge:hover .product-hero-wireframe .pw-send,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .pw-send {
  animation: phw-send-pulse 1.6s ease-in-out infinite;
  transform-origin: center;
}

/* Chat wireframe: sonar ring expanding from the AI bubble */
@keyframes phw-sonar {
  0%   { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}
.product-hero-card--knowledge:hover .product-hero-wireframe .pw-sonar,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .pw-sonar {
  animation: phw-sonar 2.4s ease-out infinite;
  transform-origin: center;
}
.product-hero-card--knowledge:hover .product-hero-wireframe .pw-sonar-2,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .pw-sonar-2 {
  animation-delay: 0.8s;
}
.product-hero-card--knowledge:hover .product-hero-wireframe .pw-sonar-3,
.product-hero-card--knowledge:focus-within .product-hero-wireframe .pw-sonar-3 {
  animation-delay: 1.6s;
}

/* Compact placement on small screens */
@media (max-width: 640px) {
  .product-hero-wireframe {
    width: clamp(127px, 34.5vw, 184px);
    height: clamp(127px, 34.5vw, 184px);
    right: 14px;
    bottom: 14px;
  }
  .product-hero-card--code .product-hero-toggle,
  .product-hero-card--knowledge .product-hero-toggle {
    padding-right: clamp(150px, 36.8vw, 206px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-hero-wireframe .typing-cursor,
  .product-hero-wireframe .animate-float,
  .product-hero-wireframe .ghost-text,
  .product-hero-wireframe .code-cursor,
  .product-hero-wireframe .term-cursor,
  .product-hero-wireframe .sidebar-dot,
  .product-hero-wireframe .line-pulse-1,
  .product-hero-wireframe .line-pulse-2,
  .product-hero-wireframe .line-pulse-3,
  .product-hero-wireframe .line-pulse-4,
  .product-hero-wireframe .pw-code-scan,
  .product-hero-wireframe .pw-progress,
  .product-hero-wireframe .pw-send,
  .product-hero-wireframe .pw-sonar,
  .product-hero-wireframe--core-ingest .pipe-flow,
  .product-hero-wireframe--core-ingest [class*="ingest-flow"],
  .product-hero-wireframe--core-ingest .ph-core-ingest-read-pulse {
    animation: none !important;
  }
}

.product-hero-toggle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(12px, 2vw, 16px);
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(354px, 48vw, 414px);
  padding:
    clamp(24px, 3.4vw, 34px)
    clamp(22px, 3vw, 30px)
    clamp(56px, 6.5vw, 72px);
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.product-hero-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: var(--product-accent);
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--easing-productive);
}

.product-hero-toggle:hover::before,
.product-hero-toggle:focus-visible::before {
  transform: scaleX(1);
}

.product-hero-toggle:focus-visible {
  outline: 2px solid var(--product-accent);
  outline-offset: -2px;
}

.product-hero-badge {
  display: inline-block;
  margin: 0;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--product-accent-strong);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 22, 22, 0.08);
}

.product-hero-name {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
  max-width: 26ch;
}

/* Two-line product titles (Tapestry / Code, Tapestry / CoWorker); matches stacked hero lockup rhythm */
.product-hero-name--stack .product-hero-name-line {
  display: block;
}

/* Front only: drop title + teaser for a more centred block; badge stays first in flow (unchanged position). */
.product-hero-face--front .product-hero-name {
  margin-top: clamp(16px, 3.24vw, 43px);
}

.product-hero-teaser {
  display: block;
  font-size: clamp(13px, 1.15vw, 15px);
  line-height: 1.52;
  color: var(--text-secondary);
  max-width: 48ch;
  margin: 0;
}

.product-hero-back-inner {
  box-sizing: border-box;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.product-hero-panel-content {
  box-sizing: border-box;
  padding:
    clamp(22px, 3.2vw, 38px)
    clamp(18px, 2.6vw, 28px)
    clamp(22px, 3vw, 32px);
}

/* Tapestry Code / Chat flip-back: shared typography, layout, and table chrome.
   Body size is matched to the front face's `.product-hero-teaser` so copy on
   either side of the flip reads at the same scale. */
.product-hero-panel-content--code-detail,
.product-hero-panel-content--knowledge-detail,
.product-hero-panel-content--core-detail {
  max-width: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.product-hero-panel-content--code-detail .code-compare-table,
.product-hero-panel-content--knowledge-detail .code-compare-table {
  font-size: inherit;
  line-height: 1.45;
}

/* Grey header row; soft lilac Tapestry column (same on Code and Knowledge flip faces). */
.product-hero-panel-content--code-detail .code-compare-table thead th,
.product-hero-panel-content--knowledge-detail .code-compare-table thead th {
  background: #e8e8eb;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.product-hero-panel-content--code-detail .code-compare-table thead th:nth-child(2),
.product-hero-panel-content--knowledge-detail .code-compare-table thead th:nth-child(2) {
  color: var(--text-secondary);
  font-weight: 600;
}

.product-hero-panel-content--code-detail .code-compare-table thead th.code-compare-table__brand,
.product-hero-panel-content--knowledge-detail .code-compare-table thead th.code-compare-table__brand {
  background: #ebe4f4;
  color: #3a2456 !important;
  font-weight: 600 !important;
}

.product-hero-panel-content--code-detail .code-compare-table tbody td.code-compare-table__good,
.product-hero-panel-content--knowledge-detail .code-compare-table tbody td.code-compare-table__good {
  background: #f5f2fa;
}

.product-code-compare {
  min-width: 0;
}

.code-compare-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.8vw, 28px);
}

.code-compare-table {
  table-layout: fixed;
  width: 100%;
  min-width: min(100%, 380px);
  border-collapse: collapse;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1.42;
  color: var(--text-primary);
}

.code-compare-table__caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0 0 8px;
}

.code-compare-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 8px 10px;
  vertical-align: bottom;
  background: rgba(90, 18, 178, 0.07);
  border-bottom: 1px solid rgba(22, 22, 22, 0.1);
  color: var(--text-primary);
}

.code-compare-table thead th:not(:first-child) {
  font-weight: 500;
  color: var(--text-secondary);
}

.code-compare-table__brand {
  color: #5a12b2 !important;
  font-weight: 600 !important;
}

.code-compare-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 600;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 28%;
  vertical-align: top;
}

.code-compare-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: top;
  width: 36%;
}

.code-compare-table tbody td.code-compare-table__good {
  color: var(--text-primary);
  font-weight: 500;
}

.code-compare-table tbody tr:last-child th,
.code-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.code-compare-table--zebra tbody tr:nth-child(even) th,
.code-compare-table--zebra tbody tr:nth-child(even) td {
  background: rgba(22, 22, 22, 0.035);
}

.product-hero-panel-content--code-detail .code-compare-section-title,
.product-hero-panel-content--knowledge-detail .code-compare-section-title {
  margin: 0;
  text-align: center;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: clamp(13px, 1.12vw, 15px);
  letter-spacing: 0.01em;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.product-hero-panel-content--code-detail .code-compare-bridge,
.product-hero-panel-content--knowledge-detail .code-compare-bridge {
  margin: 0;
  width: 100%;
  max-width: none;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
}

/* ===== Tapestry Code flip-back: hero ===== */
.code-process-hero {
  margin: 0 0 clamp(28px, 4vw, 56px);
  padding-bottom: clamp(20px, 2.6vw, 32px);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.code-process-hero-title {
  margin: 0;
  max-width: 22ch;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  /* Bold for emphasis; sized 10% below the front face's `.product-hero-name`
     scale so it reads as a slightly more compact secondary hero. */
  font-weight: 700;
  font-size: clamp(25px, 2.8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ===== Tapestry Code flip-back: numbered process list ===== */
.code-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  /* Generous vertical separation between bullet/wireframe pairs so each pair
     reads as its own block rather than blurring into the next. */
  gap: clamp(36px, 5vw, 64px);
}

.code-process-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(20px, 3.4vw, 40px);
  row-gap: clamp(12px, 1.6vw, 18px);
  /* Top-align the text block with the wireframe so the heading sits flush with
     the top of the wireframe window — the eye reads the pairing immediately
     instead of the heading floating mid-wireframe. */
  align-items: start;
}

/* Default placement: copy on the left, wireframe on the right. */
.code-process-step .code-process-body { grid-column: 1; grid-row: 1; }
.code-process-step .code-process-wf   { grid-column: 2; grid-row: 1; }

/* Alternate every other step so they zigzag — wireframe on the left, copy
   on the right — for an editorial feature-grid feel. */
.code-process-step:nth-child(even) .code-process-body { grid-column: 2; }
.code-process-step:nth-child(even) .code-process-wf   { grid-column: 1; }

@media (max-width: 720px) {
  .code-process-step,
  .code-process-step:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .code-process-step .code-process-body,
  .code-process-step .code-process-wf,
  .code-process-step:nth-child(even) .code-process-body,
  .code-process-step:nth-child(even) .code-process-wf {
    grid-column: 1;
    grid-row: auto;
  }
}

.code-process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 3.4vw, 38px);
  height: clamp(30px, 3.4vw, 38px);
  border-radius: 50%;
  background: linear-gradient(135deg, #5a12b2 0%, #7c1ea7 50%, #c8348f 100%);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1;
  flex-shrink: 0;
  box-shadow:
    0 1px 2px rgba(90, 18, 178, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.code-process-body {
  min-width: 0;
}

.code-process-title {
  margin: 0 0 clamp(8px, 1vw, 12px);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.code-process-text {
  margin: 0;
  font-size: inherit;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ----- Per-step wireframe illustration ----- */
.code-process-wf {
  display: block;
  width: 100%;
  max-width: 100%;
  align-self: start;        /* top-align with the heading on the other side */
  justify-self: stretch;
  color: #5a12b2; /* used by <text> elements via currentColor */
}

.code-process-wf svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Light-theme palette (the back face is white). The original wireframes are
   designed for a dark canvas; remapping the stroke/fill tokens lets the same
   markup read cleanly against the white card back. */
.code-process-wf .wf-line       { stroke: rgba(60, 22, 110, 0.55); }
.code-process-wf .wf-line-thin  { stroke: rgba(90, 18, 178, 0.32); }
.code-process-wf .wf-accent     { stroke: #ff7a32; }
.code-process-wf .wf-fill       { fill:   rgba(124, 30, 167, 0.07); }
.code-process-wf .wf-dot        { fill:   #5a12b2; }
.code-process-wf .wf-accent-fill{ fill:   #ff7a32; }

/* Animation classes — scoped under .code-process-wf so global classes elsewhere
   on the page aren't accidentally affected. Keyframes are prefixed with cp- to
   avoid name collisions with other animations defined later in the file. */
.code-process-wf .pulse-node   { animation: cp-pulseNode 2s ease-in-out infinite; }
.code-process-wf .branch-draw  { stroke-dasharray: 200; animation: cp-branchDraw 1.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.code-process-wf .task-slide   { animation: cp-taskSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.code-process-wf .moon-glow    { animation: cp-moonGlow 3s ease-in-out infinite; }
.code-process-wf .zzz-1        { animation: cp-floatZZZ 3s ease-out infinite; }
.code-process-wf .zzz-2        { animation: cp-floatZZZ 3s ease-out 1s infinite; }
.code-process-wf .zzz-3        { animation: cp-floatZZZ 3s ease-out 2s infinite; }
.code-process-wf .shield-pulse { animation: cp-shieldPulse 2s ease-in-out infinite; }
.code-process-wf .threat-1     { animation: cp-threatMove1 2.5s ease-in infinite; }
.code-process-wf .threat-2     { animation: cp-threatMove2 3s ease-in 0.8s infinite; }
.code-process-wf .threat-3     { animation: cp-threatMove1 2.8s ease-in 1.5s infinite; }
.code-process-wf .check-draw   { stroke-dasharray: 20; animation: cp-checkDraw 0.5s ease both; }
.code-process-wf .connect-glow { animation: cp-connectGlow 2s ease-in-out infinite; }
.code-process-wf .scan-y       { animation: cp-scanY 3.4s ease-in-out infinite; }

@keyframes cp-pulseNode {
  0%, 100% { r: 3; opacity: 0.85; }
  50%      { r: 5; opacity: 1; }
}
@keyframes cp-branchDraw {
  0%   { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}
@keyframes cp-taskSlide {
  0%   { transform: translateX(-10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes cp-moonGlow {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(124, 30, 167, 0)); opacity: 0.7; }
  50%      { filter: drop-shadow(0 0 6px rgba(124, 30, 167, 0.45)); opacity: 1; }
}
@keyframes cp-floatZZZ {
  0%   { transform: translate(0, 0) scale(0.8); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(15px, -30px) scale(1.2); opacity: 0; }
}
@keyframes cp-shieldPulse {
  0%, 100% { stroke-width: 2;   opacity: 0.75; }
  50%      { stroke-width: 3.4; opacity: 1; }
}
@keyframes cp-threatMove1 {
  0%   { transform: translate(80px, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes cp-threatMove2 {
  0%   { transform: translate(70px, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes cp-checkDraw {
  0%   { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}
@keyframes cp-connectGlow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
@keyframes cp-scanY {
  0%   { transform: translateY(0);    opacity: 0.8; }
  100% { transform: translateY(180px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .code-process-wf *,
  .code-process-wf *::before,
  .code-process-wf *::after {
    animation: none !important;
  }

  .chat-process-wf *,
  .chat-process-wf *::before,
  .chat-process-wf *::after {
    animation: none !important;
  }
}

/* ===== Tapestry CoWorker flip-back: hero (mirrors Code card treatment) ===== */
.chat-process-hero {
  margin: 0 0 clamp(28px, 4vw, 56px);
  padding-bottom: clamp(20px, 2.6vw, 32px);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.chat-process-hero-title {
  margin: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(25px, 2.8vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ===== Tapestry CoWorker flip-back: zigzag copy + wireframe list ===== */
.chat-process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vw, 64px);
}

.chat-process-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(20px, 3.4vw, 40px);
  row-gap: clamp(12px, 1.6vw, 18px);
  align-items: start;
}

.chat-process-step .chat-process-body { grid-column: 1; grid-row: 1; }
.chat-process-step .chat-process-wf   { grid-column: 2; grid-row: 1; }

.chat-process-step:nth-child(even) .chat-process-body { grid-column: 2; }
.chat-process-step:nth-child(even) .chat-process-wf   { grid-column: 1; }

@media (max-width: 720px) {
  .chat-process-step,
  .chat-process-step:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .chat-process-step .chat-process-body,
  .chat-process-step .chat-process-wf,
  .chat-process-step:nth-child(even) .chat-process-body,
  .chat-process-step:nth-child(even) .chat-process-wf {
    grid-column: 1;
    grid-row: auto;
  }
}

/* Tapestry Core flip-back */
.product-hero-panel-content--core-detail .chat-process-hero-title {
  max-width: none;
}

.chat-process-body {
  min-width: 0;
}

.chat-process-title {
  margin: 0 0 clamp(8px, 1vw, 12px);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.chat-process-text {
  margin: 0;
  font-size: inherit;
  line-height: 1.55;
  color: var(--text-secondary);
}

.chat-process-wf {
  display: block;
  width: 100%;
  max-width: 100%;
  align-self: start;
  justify-self: stretch;
  color: var(--product-icon, #d946ef);
}

.chat-process-wf svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Palette remapped from the dark canvas in
   assets/dynamic_wireframe_icons_for_tapestry_chat.html — magenta strokes and
   orange accents to harmonise with the Tapestry CoWorker product card. */
.chat-process-wf .wf-line       { stroke: rgba(154, 10, 120, 0.55); }
.chat-process-wf .wf-line-thin  { stroke: rgba(217, 70, 239, 0.28); }
.chat-process-wf .wf-accent     { stroke: #ff7a32; }
.chat-process-wf .wf-fill       { fill:   rgba(192, 38, 211, 0.08); }
.chat-process-wf .wf-dot        { fill:   #be185d; }
.chat-process-wf .wf-accent-fill{ fill:   #ff7a32; }
.chat-process-wf .wf-green       { stroke: rgba(22, 163, 74, 0.88); }
.chat-process-wf .wf-green-fill  { fill:   rgba(22, 163, 74, 0.85); transition: fill 0.35s ease; }
.chat-process-wf .wf-blue        { stroke: rgba(37, 99, 235, 0.9); }
.chat-process-wf .wf-blue-fill   { fill:   rgba(37, 99, 235, 0.85); transition: fill 0.35s ease; }
.chat-process-wf .wf-red         { stroke: rgba(220, 38, 38, 0.88); }
.chat-process-wf .wf-cyan        { stroke: rgba(6, 182, 212, 0.9); }
.chat-process-wf text.wf-red     { fill: rgba(220, 38, 38, 0.92); stroke: none; }
.chat-process-wf text.wf-cyan    { fill: rgba(6, 182, 212, 0.95); stroke: none; }

/* Tapestry Core flip-back wireframes (dynamic_wireframe_icons_for_tapestry_core.html — scoped IDs in index). */
.product-hero-panel-content--core-detail .chat-process-wf .pulse-node {
  animation: pulseNode 2s ease-in-out infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .pipe-flow {
  stroke-dasharray: 8 6;
  animation: pipeFlow 0.8s linear infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .edge-draw {
  stroke-dasharray: 200;
  animation: edgeDraw 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.product-hero-panel-content--core-detail .chat-process-wf .boundary-dash {
  stroke-dasharray: 6 4;
  animation: boundaryDash 1.5s linear infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .role-slide-1 {
  animation: roleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}
.product-hero-panel-content--core-detail .chat-process-wf .role-slide-2 {
  animation: roleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}
.product-hero-panel-content--core-detail .chat-process-wf .role-slide-3 {
  animation: roleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s both;
}
.product-hero-panel-content--core-detail .chat-process-wf .role-slide-4 {
  animation: roleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.2s both;
}
.product-hero-panel-content--core-detail .chat-process-wf .branch-grow {
  stroke-dasharray: 300;
  animation: branchGrow 2s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-1 {
  animation: ingestFlow1 2.5s ease-in infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-2 {
  animation: ingestFlow2 2.8s ease-in 0.4s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-3 {
  animation: ingestFlow3 3s ease-in 0.8s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-4 {
  animation: ingestFlow4 2.6s ease-in 1.2s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-5 {
  animation: ingestFlow5 2.4s ease-in 0.6s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-6 {
  animation: ingestFlow6 2.7s ease-in 1s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .ingest-flow-7 {
  animation: ingestFlow7 3.2s ease-in 1.5s infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .version-pulse {
  animation: versionPulse 2.5s ease-in-out infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .cross-out-line {
  stroke-dasharray: 40;
  animation: crossOut 0.6s ease 1.5s both;
}
.product-hero-panel-content--core-detail .chat-process-wf .delegate-flow-h {
  animation: delegateFlow 2s ease-in-out infinite;
}
.product-hero-panel-content--core-detail .chat-process-wf .delegate-flow-v {
  animation: delegateFlowV 1.8s ease-in-out infinite;
}

/* Sovereign & Public flip-back wireframes (assets/dynamic_wirefram_icons_sovereignai.html — branch length & extra motion classes). */
#product-panel-sovereign .chat-process-wf .branch-grow,
#product-panel-public .chat-process-wf .branch-grow {
  stroke-dasharray: 200;
  animation: sovereignBranchGrow 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#product-panel-sovereign .chat-process-wf .data-packet-h,
#product-panel-public .chat-process-wf .data-packet-h {
  animation: sovereignDataPacketH 2s ease-in-out infinite;
}
#product-panel-sovereign .chat-process-wf .data-packet-v,
#product-panel-public .chat-process-wf .data-packet-v {
  animation: sovereignDataPacketV 1.8s ease-in-out infinite;
}
#product-panel-sovereign .chat-process-wf .tuning-dial,
#product-panel-public .chat-process-wf .tuning-dial {
  animation: sovereignTuningDial 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
#product-panel-sovereign .chat-process-wf .hw-slide-1,
#product-panel-public .chat-process-wf .hw-slide-1 {
  animation: sovereignHardwareSlide 0.5s ease 0.4s both;
}
#product-panel-sovereign .chat-process-wf .hw-slide-2,
#product-panel-public .chat-process-wf .hw-slide-2 {
  animation: sovereignHardwareSlide 0.5s ease 0.7s both;
}
#product-panel-sovereign .chat-process-wf .hw-slide-3,
#product-panel-public .chat-process-wf .hw-slide-3 {
  animation: sovereignHardwareSlide 0.5s ease 1s both;
}
#product-panel-sovereign .chat-process-wf .hw-slide-4,
#product-panel-public .chat-process-wf .hw-slide-4 {
  animation: sovereignHardwareSlide 0.5s ease 1.3s both;
}
#product-panel-sovereign .chat-process-wf .constraint-pulse,
#product-panel-public .chat-process-wf .constraint-pulse {
  animation: sovereignConstraintPulse 2s ease-in-out infinite;
}
#product-panel-sovereign .chat-process-wf .check-draw,
#product-panel-public .chat-process-wf .check-draw {
  stroke-dasharray: 20;
  animation: sovereignCheckDraw 0.5s ease 1.5s both;
}

@keyframes pulseNode {
  0%, 100% { r: 3; opacity: 0.7; }
  50%      { r: 6; opacity: 1; }
}
@keyframes pipeFlow {
  0%   { stroke-dashoffset: 30; }
  100% { stroke-dashoffset: 0; }
}
@keyframes ingestFlow1 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(85px, 45px); opacity: 0; }
}
@keyframes ingestFlow2 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(65px, 60px); opacity: 0; }
}
@keyframes ingestFlow3 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(-55px, 55px); opacity: 0; }
}
@keyframes ingestFlow4 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(-75px, 35px); opacity: 0; }
}
@keyframes ingestFlow5 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(40px, 75px); opacity: 0; }
}
@keyframes ingestFlow6 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(-40px, 70px); opacity: 0; }
}
@keyframes ingestFlow7 {
  0%   { transform: translate(0, 0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translate(5px, 80px); opacity: 0; }
}
@keyframes edgeDraw {
  0%   { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}
@keyframes roleSlideIn {
  0%   { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes boundaryDash {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 20; }
}
@keyframes versionPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
@keyframes crossOut {
  0%   { stroke-dashoffset: 40; }
  100% { stroke-dashoffset: 0; }
}
@keyframes branchGrow {
  0%   { stroke-dashoffset: 300; }
  100% { stroke-dashoffset: 0; }
}
@keyframes barGrow {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
@keyframes sovereignBranchGrow {
  0%   { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}
@keyframes sovereignDataPacketH {
  0%   { transform: translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(80px); opacity: 0; }
}
@keyframes sovereignDataPacketV {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(60px); opacity: 0; }
}
@keyframes sovereignTuningDial {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(45deg); }
}
@keyframes sovereignHardwareSlide {
  0%   { transform: translateX(-15px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes sovereignConstraintPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}
@keyframes sovereignCheckDraw {
  0%   { stroke-dashoffset: 20; }
  100% { stroke-dashoffset: 0; }
}
@keyframes scanRing {
  0%   { r: 10; opacity: 0.4; }
  100% { r: 100; opacity: 0; }
}
@keyframes readPulse {
  0%, 100% { opacity: 0.4; r: 16; }
  50%      { opacity: 0.8; r: 22; }
}
@keyframes delegateFlow {
  0%   { transform: translateX(0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(50px); opacity: 0; }
}
@keyframes delegateFlowV {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(40px); opacity: 0; }
}
@keyframes surfaceGlow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.8; }
}

/* Chat wireframe animations (ct- prefixed — avoids clashes with Tapestry Code). */
.chat-process-wf .ct-audio-wave-1 { animation: ct-audioWave1 1.2s ease-in-out infinite; transform-origin: center; }
.chat-process-wf .ct-audio-wave-2 { animation: ct-audioWave2 1.2s ease-in-out 0.2s infinite; transform-origin: center; }
.chat-process-wf .ct-audio-wave-3 { animation: ct-audioWave3 1.2s ease-in-out 0.4s infinite; transform-origin: center; }
.chat-process-wf .ct-audio-wave-4 { animation: ct-audioWave1 1.2s ease-in-out 0.6s infinite; transform-origin: center; }
.chat-process-wf .ct-audio-wave-5 { animation: ct-audioWave2 1.2s ease-in-out 0.8s infinite; transform-origin: center; }

.chat-process-wf .ct-maze-trace {
  stroke-dasharray: 400;
  animation: ct-mazeTrace 4s linear infinite;
}

.chat-process-wf .ct-node-pulse { animation: ct-nodePulse 2s ease-in-out infinite; }

.chat-process-wf .ct-stamp-drop {
  animation: ct-stampDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-box: fill-box;
  transform-origin: center;
}

.chat-process-wf .ct-code-line-anim {
  animation: ct-codeType 0.4s ease both;
}

@keyframes ct-audioWave1 {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}
@keyframes ct-audioWave2 {
  0%, 100% { transform: scaleY(0.6); }
  50%      { transform: scaleY(0.2); }
}
@keyframes ct-audioWave3 {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(0.9); }
}
@keyframes ct-mazeTrace {
  0%   { stroke-dashoffset: 400; }
  100% { stroke-dashoffset: 0; }
}
@keyframes ct-stampDrop {
  0%   { transform: scale(1.8) rotate(-10deg); opacity: 0; }
  60%  { transform: scale(0.9) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes ct-codeType {
  0%   { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ct-nodePulse {
  0%, 100% { r: 3; opacity: 0.82; }
  50%      { r: 6; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-process-wf *,
  .chat-process-wf *::before,
  .chat-process-wf *::after {
    animation: none !important;
  }
}

.product-lede {
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.52;
  margin: 0 0 clamp(16px, 2.2vw, 22px);
  color: var(--text-secondary);
  max-width: 62ch;
}

.product-reveal-draft {
  margin: 0 0 clamp(16px, 2.2vw, 22px);
  padding: clamp(12px, 1.6vw, 16px) clamp(14px, 1.8vw, 18px);
  border-radius: 8px;
  border: 1px dashed rgba(22, 22, 22, 0.15);
  background: rgba(255, 255, 255, 0.65);
}

.product-reveal-draft-title {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.product-reveal-draft-lede {
  margin: 0 0 clamp(10px, 1.5vw, 14px);
  font-size: 12px;
  line-height: 1.46;
  color: var(--text-secondary);
}

.product-reveal-draft-list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 12px;
  line-height: 1.52;
  color: var(--text-primary);
}

.product-reveal-draft-list li + li {
  margin-top: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .product-hero-flipper {
    transition-duration: 0.01ms;
  }

  .product-hero-toggle::before {
    transition-duration: 0.01ms;
  }

  .product-hero-card,
  .product-hero-toggle,
  .product-hero-row > li {
    transition-duration: 0.01ms;
  }

  .product-hero-card--code .product-hero-face--front,
  .product-hero-card--knowledge .product-hero-face--front,
  .product-hero-card--code .product-hero-face--front::before,
  .product-hero-card--knowledge .product-hero-face--front::before,
  .product-hero-card--code .product-hero-face--front .product-hero-toggle,
  .product-hero-card--knowledge .product-hero-face--front .product-hero-toggle,
  .product-hero-card--code .product-hero-face--front .product-hero-name,
  .product-hero-card--knowledge .product-hero-face--front .product-hero-name,
  .product-hero-card--code .product-hero-face--front .product-hero-teaser,
  .product-hero-card--knowledge .product-hero-face--front .product-hero-teaser,
  .product-hero-card--code .product-hero-face--front .product-hero-badge,
  .product-hero-card--knowledge .product-hero-face--front .product-hero-badge {
    transition-duration: 0.01ms;
  }
}

.product-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 1fr;
  gap: 0;
  background: var(--background);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(22, 22, 22, 0.06);
  overflow: hidden;
  margin-bottom: clamp(18px, 2.5vw, 28px);
  align-self: stretch;
  min-height: 0;
}

.product-stat {
  padding: clamp(10px, 1.3vw, 14px) clamp(6px, 1vw, 10px);
  text-align: center;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.product-stat:last-child {
  border-right: 0;
}

.product-stat-value {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--product-accent);
}

.product-stat-label {
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-wrap: balance;
}

.product-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  align-self: start;
  width: 100%;
}

.product-card-grid > li {
  min-height: 0;
  display: flex;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-height: 116px;
  padding: 12px;
  padding-bottom: 40px;
  background: var(--background);
  color: var(--text-primary);
  text-decoration: none !important;
  border: 1px solid rgba(22, 22, 22, 0.08);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(22, 22, 22, 0.07);
  transition:
    box-shadow var(--dur-fast) var(--easing-productive),
    border-color var(--dur-fast) var(--easing-productive),
    transform var(--dur-fast) var(--easing-productive);
}

.product-card:hover {
  border-color: var(--border-subtle-02);
  box-shadow: 0 6px 20px rgba(22, 22, 22, 0.1);
}

.product-card:active {
  transform: translateY(1px);
}

.product-card-title {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  line-height: 1.38;
}

.product-card-icon {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: var(--product-icon);
  display: inline-flex;
}

.product-card-icon svg {
  width: 22px;
  height: 22px;
}

/* Match `.tile-arrow` colour behaviour */
.product-card-arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--text-primary);
  display: inline-flex;
  transition: transform var(--dur-base) var(--easing-productive);
}

.product-card-arrow svg {
  width: 18px;
  height: 18px;
}

.product-card:hover .product-card-arrow {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .product-hero-row {
    grid-template-columns: 1fr;
  }

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

  .product-stat {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 12px;
  }

  .product-stat:last-child {
    border-bottom: 0;
  }

  .product-stat-value {
    flex-shrink: 0;
  }

  .product-stat-label {
    text-align: right;
    max-width: 62%;
  }

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

@media (max-width: 620px) {
  .product-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Featured story ========== */
.featured {
  background: var(--text-primary);
  color: #fff;
  padding: clamp(56px, 8vw, 112px) 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: clamp(16px, 3vw, 48px);
  align-items: start;
}

.featured-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.featured-eyebrow {
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #ffffff;
  padding-top: 0;
}

.featured-mark {
  margin-top: 16px;
  /* Opens on first keyframe stop (card / tile gradient purple). */
  color: #5a12b2;
  display: inline-flex;
  /* Cycles only the four stops shared with .tile and Tapestry mega-card gradients. */
  animation: tapestry-glow 20s ease-in-out infinite;
  will-change: color, filter;
}

@keyframes tapestry-glow {
  0%,
  100% {
    color: #5a12b2;
    filter: drop-shadow(0 0 14px rgba(90, 18, 178, 0.55));
  }
  25% {
    color: #dc3a9a;
    filter: drop-shadow(0 0 15px rgba(220, 58, 154, 0.58));
  }
  50% {
    color: #ff6f2b;
    filter: drop-shadow(0 0 17px rgba(255, 111, 43, 0.62));
  }
  75% {
    color: #ff9520;
    filter: drop-shadow(0 0 16px rgba(255, 149, 32, 0.6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .featured-mark {
    animation: none;
    color: #dc3a9a;
    filter: none;
  }
}

.featured-heading {
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
  max-width: 22ch;
}

.featured-lede {
  margin: 16px 0 24px;
  font-size: 16px;
  line-height: 1.5;
  color: #c6c6c6;
  max-width: 60ch;
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: rgba(255, 255, 255, 0.2);
}

/* Buttons (Carbon-style: rectangular, padding-right with chevron) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-width: 240px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background var(--dur-fast) var(--easing-productive);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--link-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--link-primary-hover); color: #fff; }

/* Featured strip: Explore Tapestry — match header logo centre purple */
#exploreBtn.btn-primary {
  background: var(--logo-center-purple);
  color: #fff;
}
#exploreBtn.btn-primary:hover {
  background: var(--logo-center-purple-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.btn-dark {
  background: #000;
  color: #fff;
}
.btn-dark:hover { background: #1f1f1f; color: #fff; }

@media (max-width: 760px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-eyebrow { padding-top: 0; }
  .btn { min-width: 0; flex: 1 1 220px; }
}

/* ========== Footer ========== */
.site-footer {
  background: var(--background);
  border-top: 1px solid var(--border-subtle);
  padding: clamp(40px, 5vw, 64px) 0 24px;
  color: var(--text-primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: start;
  gap: clamp(48px, 8vw, 120px);
  padding-bottom: 48px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text-primary);
}
.footer-col h4 a {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.footer-col h4 a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.footer-col a:hover { color: var(--text-primary); text-decoration: underline; }

@media (max-width: 1000px) {
  .footer-grid { gap: clamp(32px, 5vw, 64px); }
}
@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .footer-col a { white-space: normal; }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.brand--footer { height: auto; }

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: 16px;
}
.legal a {
  font-size: 12px;
  color: var(--text-secondary);
}
.legal a:hover { color: var(--text-primary); }

.copyright {
  margin: 0 0 0 auto;
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 760px) {
  .legal { margin-left: 0; }
  .copyright { margin-left: 0; width: 100%; }
}

/* ========== Modal dialog ========== */
.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: modal-fade var(--dur-base) var(--easing-productive);
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 22, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 92vh;
  background: var(--background);
  margin: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  animation: modal-slide var(--dur-base) var(--easing-productive);
}

/* Capability / specs disclosure — match landing-page tile corner radius */
#modal .modal-panel {
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 767px) {
  #modal .modal-panel {
    border-radius: 10px 10px 0 0;
  }
}

@media (min-width: 768px) {
  .modal { align-items: center; padding: 24px; }
  .modal-panel { max-height: 86vh; }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-slide {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  position: relative;
  padding: 32px 64px 20px 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-eyebrow {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.modal-title {
  font-weight: 300;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: background var(--dur-fast) var(--easing-productive);
}
.modal-close:hover { background: var(--layer-01); }

.modal-body {
  padding: 24px 32px 32px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
}
.modal-body p { margin: 0 0 16px; }
.modal-body p:last-child { margin-bottom: 0; }

/* Comparison table */
.modal-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
  line-height: 1.5;
  table-layout: fixed;
}

.modal-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  vertical-align: bottom;
  background: transparent;
}

.modal-table tbody td,
.modal-table tbody th {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-primary);
  text-align: left;
  font-weight: 400;
}

.modal-table tbody tr:last-child td,
.modal-table tbody tr:last-child th { border-bottom: 0; }

.modal-table th[scope="row"],
.modal-table th[scope="col"]:first-child {
  width: 30%;
  font-weight: 500;
}

.modal-table .col-bad { color: var(--text-secondary); }

/* Specs matrix: Tapestry columns keep subtle IBM blue tint */
.modal-table.specs-table .col-good { background: rgba(15, 98, 254, 0.05); }
.modal-table.specs-table th.col-good { color: var(--link-primary); }

/* Capability modals: grey header + lilac Tapestry column (match Code/Knowledge flip tables) */
.modal-table:not(.specs-table) thead th {
  background: #e8e8eb;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-table:not(.specs-table) thead th.col-bad {
  color: var(--text-secondary);
  background: #e8e8eb;
}

.modal-table:not(.specs-table) thead th.col-good {
  background: #ebe4f4;
  color: #3a2456 !important;
  font-weight: 600;
}

.modal-table:not(.specs-table) tbody td.col-good {
  background: #f5f2fa;
}

@media (max-width: 600px) {
  .modal-header { padding: 24px 56px 12px 20px; }
  .modal-body   { padding: 20px; font-size: 15px; }
  .modal-table  { font-size: 13px; }
  .modal-table th,
  .modal-table td { padding: 10px 12px; }
}

body.modal-open { overflow: hidden; }

/* ========== Tapestry Specs modal ========== */
.modal-panel.specs-panel { max-width: 1180px; }

/* ========== Terms of use (markdown) modal ========== */
.modal-panel.modal-panel--legal {
  max-width: min(720px, calc(100vw - 48px));
}

.modal-legal-prose {
  font-size: 15px;
  line-height: 1.58;
  color: var(--text-primary);
}

.modal-legal-doc-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-legal-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 22px 0 10px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.modal-legal-p {
  margin: 0 0 14px;
}

.modal-legal-prose .modal-legal-p:last-child {
  margin-bottom: 0;
}

.modal-legal-ul {
  margin: 0 0 16px;
  padding-left: 1.3em;
  list-style: disc;
}

.modal-legal-ul li {
  margin-bottom: 8px;
}

.modal-legal-hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 20px 0;
}

.modal-legal-error {
  margin: 0;
  color: var(--text-secondary);
}

.specs-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-table.specs-table {
  table-layout: fixed;
  min-width: 880px;
  font-size: 13px;
}

.modal-table.specs-table thead th {
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  vertical-align: bottom;
}

.modal-table.specs-table tbody th[scope="row"],
.modal-table.specs-table tbody td {
  padding: 12px 14px;
  vertical-align: top;
  line-height: 1.45;
}

.modal-table.specs-table tbody th[scope="row"] {
  width: 22%;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-table.specs-table tr.specs-section td {
  padding: 22px 14px 6px;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.modal-table.specs-table tr.specs-section:first-child td {
  padding-top: 4px;
}

.specs-legend {
  list-style: none;
  margin: 28px 0 12px;
  padding: 14px 18px;
  background: var(--layer-01);
  border-left: 3px solid var(--link-primary);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 13px;
  color: var(--text-secondary);
}
.specs-legend li { margin: 0; }
.specs-legend .specs-legend-mark { margin-right: 8px; }

.specs-footnote {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .modal-panel.specs-panel { max-width: 100%; }
  .modal-table.specs-table { font-size: 12px; min-width: 720px; }
  .modal-table.specs-table tbody th[scope="row"],
  .modal-table.specs-table tbody td { padding: 10px 10px; }
  .specs-legend { gap: 18px; padding: 12px 14px; }
}

/* ========== Cookie consent banner ========== */
.cookie-banner[hidden] { display: none; }

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: var(--background);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
  animation: cookie-slide-in var(--dur-base) var(--easing-productive);
}

@keyframes cookie-slide-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.cookie-banner-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.cookie-banner-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.cookie-banner-text a {
  color: var(--link-primary);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}
.cookie-banner-text a:hover { color: var(--link-primary-hover); text-decoration: none; }

.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  font-size: 13px;
  line-height: 1.3;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--easing-productive),
              border-color var(--dur-fast) var(--easing-productive);
}

.cookie-btn-primary {
  background: var(--link-primary);
  color: #fff;
}
.cookie-btn-primary:hover { background: var(--link-primary-hover); }

.cookie-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle-02);
}
.cookie-btn-secondary:hover { background: var(--layer-01); }

@media (max-width: 640px) {
  .cookie-banner-inner {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }
  .cookie-banner-actions { justify-content: flex-end; }
}

/* Email-forwarding pop-out modal */
.email-modal {
  align-items: flex-start;
  padding-top: calc(var(--topbar-h) + 20px);
}

.email-modal-panel {
  max-width: 560px;
  margin-left: auto;
  margin-right: 24px;
  border-top: 3px solid var(--link-primary);
}

.email-modal-body {
  padding-top: 16px;
}

.email-modal-intro {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.email-forward-form {
  display: grid;
  gap: 16px;
}

.email-field {
  display: grid;
  gap: 8px;
}

.email-label {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.email-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  background: var(--field-01);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  padding: 12px;
}

.email-input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.email-textarea {
  resize: vertical;
  min-height: 112px;
}

.email-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.email-btn {
  border: 1px solid transparent;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.3;
  transition: background var(--dur-fast) var(--easing-productive), border-color var(--dur-fast) var(--easing-productive);
}

.email-btn-primary {
  background: var(--link-primary);
  color: #fff;
}

.email-btn-primary:hover {
  background: var(--link-primary-hover);
}

.email-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-subtle-02);
}

.email-btn-secondary:hover {
  background: var(--layer-01);
}

.email-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--text-secondary);
}

.email-status[data-state="error"] {
  color: #da1e28;
}

.email-status[data-state="success"] {
  color: #198038;
}

.email-captcha-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: stretch;
}

.email-captcha-challenge {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--layer-01);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  user-select: none;
}

.email-captcha-input {
  width: 100%;
}

.email-captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: var(--layer-01);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background var(--dur-fast) var(--easing-productive);
}

.email-captcha-refresh:hover {
  background: var(--border-subtle);
}

@media (max-width: 767px) {
  .email-modal {
    align-items: flex-end;
    padding-top: 0;
  }

  .email-modal-panel {
    margin-right: 0;
    max-width: 100%;
  }
}
