/* Agentic Labs — site shell and responsive behaviour.
   Page content uses inline styles (carried over from the design canvas),
   so the breakpoints below override them by attribute selector. */

html { scroll-behavior: smooth; }
body { margin: 0; background: #faf9f9; }

.demobar {
  background: #1f2937;
  color: #c7ced6;
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 9px 16px;
}

img { max-width: 100%; }
.render-m { display: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #057a44;
  outline-offset: 2px;
}

/* ---- translucent sticky nav (live site only; the canvas format has no sticky) ---- */
.page { overflow: visible !important; }
.page > div:nth-child(1):not(.hero) {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* ---- tablet ---- */
@media (max-width: 1180px) {
  [style*="grid-template-columns: repeat(5"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns: repeat(3"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="px 76px"], [style*="0 76px"] { padding-left: 40px !important; padding-right: 40px !important; }

  /* org chart: three across, no connector wires — the band grows to fit */
  .hero { height: auto !important; }
  .chart-wires { display: none !important; }
  .chart [style*="grid-template-columns: repeat(6"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

  /* the workflow panel keeps its six stages, just tighter */
  .flow { padding: 24px !important; }
  .flow [style*="width: 660px"] { width: 100% !important; }
  /* stage cards grow with their text instead of clipping it */
  .flow [style*="height: 124px"] { height: auto !important; }
  .flow [style*="height: 124px"] > div[style*="flex: 1 1 0"] { min-height: 124px !important; }
  .flow [style*="display: block; height: 14px"] { height: 30px !important; }
}

/* ---- phone ---- */
@media (max-width: 860px) {
  /* footer and chip rows wrap rather than push the page sideways */
  [style*="display: flex"][style*="gap: 28px"],
  [style*="display: flex"][style*="gap: 18px"],
  [style*="display: flex"][style*="gap: 16px"],
  [style*="display: flex"][style*="gap: 14px"],
  [style*="display: flex"][style*="gap: 10px"] { flex-wrap: wrap !important; }
  /* a shrink-proof chip group wraps instead of pushing the page sideways */
  [style*="display: flex"][style*="flex-shrink: 0"] { flex-wrap: wrap !important; }
  [style*="grid-template-columns: repeat("] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="px 76px"], [style*="0 76px"] { padding-left: 20px !important; padding-right: 20px !important; }

  [style*="display: flex"][style*="gap: 72px"],
  [style*="display: flex"][style*="gap: 64px"],
  [style*="display: flex"][style*="gap: 56px"],
  [style*="display: flex"][style*="gap: 48px"],
  [style*="display: flex"][style*="gap: 32px"],
  [style*="display: flex"][style*="gap: 24px"],
  [style*="display: flex"][style*="gap: 20px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  [style*="flex: 0 0"] { flex: 1 1 auto !important; width: 100% !important; }
  /* a zero flex-basis collapses to no height once a row becomes a column */
  [style*="flex: 1 1 0"] { flex: 1 1 auto !important; }
  [style*="max-width: 900px"], [style*="max-width: 880px"], [style*="max-width: 860px"],
  [style*="max-width: 820px"], [style*="max-width: 800px"], [style*="max-width: 780px"],
  [style*="max-width: 740px"], [style*="max-width: 700px"], [style*="max-width: 640px"] { max-width: 100% !important; }

  /* top nav: logo + CTA only */
  .page > div:nth-child(1) [style*="gap: 28px"] { display: none !important; }

  h1 { font-size: 34px !important; line-height: 40px !important; }
  h2 { font-size: 26px !important; line-height: 32px !important; }

  [style*="padding: 136px"] { padding: 48px 20px !important; }
  [style*="padding: 124px"] { padding: 44px 20px !important; }
  [style*="padding: 116px"] { padding: 44px 20px !important; }
  [style*="padding: 104px"] { padding: 40px 20px !important; }
  [style*="padding: 64px"] { padding: 32px !important; }
  [style*="padding: 56px"] { padding: 28px !important; }
  [style*="padding: 52px"] { padding: 28px !important; }
  [style*="padding: 48px"] { padding: 24px !important; }
  [style*="padding: 40px"] { padding: 24px !important; }
  [style*="padding: 36px"] { padding: 22px !important; }

  /* the homepage hero: headline, then a cropped view of the floor */
  .hero { height: auto !important; }
  /* phone gets a tighter crop of the floor rather than a letterboxed strip */
  .render { display: none !important; }
  .render-m { display: block !important; }
  .hero > *:nth-child(1), .hero > *:nth-child(2) { display: none !important; }
  /* hero nav stays a row: logo left, CTA right */
  .hero > *:nth-child(3) {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 0 20px !important;
  }
  .hero > *:nth-child(3) > * { flex: 0 0 auto !important; width: auto !important; }

  .hero > *:nth-child(4) { padding: 44px 20px 0 20px !important; }
  /* stack the two hero buttons */
  .hero > *:nth-child(4) > div[style*="gap: 12px"] { flex-direction: column !important; align-items: stretch !important; }
  .hero > *:nth-child(4) > div[style*="gap: 12px"] > a { justify-content: center !important; }

  /* org chart: two across, no connector wires */
  .chart { padding: 32px 20px 0 20px !important; }
  /* the lead card keeps its avatar beside the name */
  .chart [style*="gap: 20px"] { flex-direction: row !important; align-items: center !important; }
  .chart-wires { display: none !important; }
  .chart [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-top: 28px !important;
  }
  .chart [style*="grid-template-columns: repeat(6"] > div { padding: 18px 14px !important; }

  /* the workflow panel */
  .flow { padding: 20px !important; }
  /* panel header: title over status */
  .flow > div:nth-child(1) {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  /* the six-stage rail becomes a vertical list */
  .flow [style*="height: 124px"] {
    height: auto !important;
    flex-direction: column !important;
  }
  .flow [style*="height: 124px"] > div[style*="flex: 1 1 0"] { min-height: 96px !important; }
  .flow [style*="flex: 0 0 26px"] { flex: 0 0 20px !important; }
  /* the decision card keeps its crossfade, so it needs a fixed box */
  .flow [style*="width: 660px"] { width: 100% !important; height: 276px !important; }
  .flow [style*="width: 660px"] [style*="padding: 20px 24px"] { padding: 18px !important; }
  .flow [style*="width: 660px"] [style*="display: flex; gap: 10px"] { flex-direction: column !important; }
  .flow [style*="width: 660px"] [style*="display: flex; gap: 10px"] > * { flex: 0 0 auto !important; width: 100% !important; }
  /* legend wraps */
  .flow > div:last-child { flex-wrap: wrap !important; gap: 12px 18px !important; }
  .flow > div:last-child > div:last-child { margin-left: 0 !important; }
}
