/* ─── Design tokens ─── */
:root {
  --paper:      #FFFFFF;
  --paper-2:    #FAF2E5;
  --paper-warm: #FAF2E5;
  --ink:        #0E0E0C;
  --ink-2:      #2A2A26;
  --ink-soft:   #5C5C54;
  --ink-faint:  #8A8A80;
  --rule:       rgba(14,14,12,0.14);
  --rule-strong:rgba(14,14,12,0.28);
  --accent:     #FB3D28;
  --accent-deep:#D9301F;
  --warn:       #C44A2C;
  --good:       #3A6B3A;

  /* Sans type scale */
  --type-micro:       12px;  /* pills, captions, eyebrows */
  --type-small:       14px;  /* UI labels */
  --type-callout:     16px;  /* small callout / "More coming soon..." */
  --type-body:        17px;  /* body, descriptions */
  --type-lede:        20px;  /* subheads, ledes */
  --type-sub-display: 22px;  /* sidebar product names */
  --type-section-sm:  32px;  /* small section titles */
  --type-section:     48px;  /* standard section titles */
  --type-display:     72px;  /* hero display */

  /* Font stacks — sans throughout, mono for tabular data */
  --font-display: "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter Tight", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: clip; }

/* ─── Editorial typography roles ───────────────────────────────── */

/* Eyebrow — small uppercase label, sans */
.label,
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Data mono — numbers, codes, tabular */
.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
  font-weight: 500;
  letter-spacing: 0;
}

/* Hero display */
h1.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--type-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h1.display em { font-style: normal; color: var(--ink-faint); }

/* Section title */
h2.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--type-section);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
h2.section-title em { font-style: normal; color: var(--ink-faint); }

/* Sub-display — sidebar product names, sub-section headlines */
.sub-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-sub-display);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Lede / Subhead */
p.lede,
.lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-lede);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

/* Body */
p.body-lg,
.body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--type-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  margin: 0;
  text-wrap: pretty;
}

/* UI label — pill text, button text, agent names */
.ui-label {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
}

/* Caption / Subtitle — input subtitles, column headers, footnotes */
.caption {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink-faint);
}

/* Callout — "More coming soon…" style (sans, regular) */
.callout-italic {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 400;
  font-size: var(--type-callout);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink-faint);
}

/* ─── Layout ─── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}
.sec {
  padding: 96px 40px;
  border-bottom: 1px solid var(--rule);
}
.sec.dark {
  background: var(--ink);
  color: var(--paper);
}
.sec.dark .label { color: var(--accent); }
.sec.dark p.lede,
.sec.dark p.body-lg { color: rgba(244,241,235,0.7); }
.sec.dark h2.section-title em { color: rgba(244,241,235,0.4); }

/* ─── Nav ─── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid rgba(12,12,11,0.08);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
}
.logo-lockup {
  height: 30px;
  width: auto;
  display: block;
}
.logo--sm .logo-lockup { height: 20px; }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: var(--type-small);
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-actions { display: flex; gap: 10px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  border-radius: 4px;
  transition: transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn.accent { background: var(--accent); color: var(--paper); }
.btn.accent:hover { background: var(--accent-deep); }
.btn.lg { padding: 14px 22px; font-size: var(--type-small); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
}

/* ─── Pills ─── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: transparent;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}
.pill.warn { color: var(--warn); border-color: var(--warn); }
.pill.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ─── Product UI Window ─── */
.ui-window {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(14,14,12,0.04),
    0 12px 32px rgba(14,14,12,0.10),
    0 40px 80px rgba(14,14,12,0.08);
}
.qcard-action {
  padding: 6px 12px;
  font-size: var(--type-micro);
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  font-family: var(--font-body);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s;
}
.qcard-action.primary { background: var(--accent); color: var(--paper); border-color: var(--ink); }
.qcard-action.primary:hover { background: var(--accent-deep); }
.qcard-action.muted { color: var(--ink-soft); }
.qcard-action:disabled { cursor: default; }
.qcard-action.confirmed {
  background: var(--good) !important;
  color: var(--paper) !important;
  border-color: var(--good) !important;
}
.qcard-action.confirmed-skip {
  background: var(--paper-2) !important;
  color: var(--ink-faint) !important;
  border-color: var(--rule) !important;
}
.qcard-action.editing {
  background: var(--paper-2) !important;
  color: var(--ink-soft) !important;
}

/* ─── Accent mark ─── */
.accent-mark {
  background: var(--accent);
  color: var(--paper);
  padding: 0 6px;
  margin: 0 -2px;
  border-radius: 2px;
}

/* ─── Use case cards ─── */
.uc {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.uc-arrow {
  position: absolute;
  top: 22px; right: 22px;
  width: 28px; height: 28px;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--type-small);
  color: var(--ink-2);
}
.uc-title {
  font-weight: 500;
  font-size: var(--type-sub-display);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 18ch;
}
.uc-title em { font-style: normal; color: var(--ink-faint); }
.uc-sub {
  font-size: var(--type-small);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 42ch;
  letter-spacing: 0;
}
.uc-data { margin-top: auto; }

/* ─── Deduction table ─── */
.deduction-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: var(--type-micro);
}
.deduction-row + .deduction-row { border-top: 1px solid var(--rule); }
.deduction-who {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: var(--ink-2);
}
.deduction-amt { font-weight: 500; font-size: var(--type-micro); }
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  font-size: var(--type-micro);
  font-weight: 500;
}
.badge.disputed { background: var(--accent); color: var(--paper); }
.badge.valid { color: var(--ink-faint); }

/* ─── Form fill rows ─── */
.form-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: var(--type-micro);
  color: var(--ink-2);
}
.form-status { font-family: var(--font-mono); font-size: var(--type-micro); }
.form-status.done { color: var(--good); }
.form-status.needs { color: var(--ink-soft); }

/* ─── Promo rows ─── */
.promo-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: var(--type-micro);
}
.promo-tag {
  background: var(--accent);
  color: var(--paper);
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 500;
}

/* ─── Timeline ─── */
.timeline {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px 48px;
  max-width: 920px;
}
.timeline-time {
  font-family: var(--font-mono);
  font-size: var(--type-small);
  color: var(--accent);
  padding-top: 4px;
}
.timeline-body {
  font-size: var(--type-lede);
  line-height: 1.4;
  color: var(--paper);
  letter-spacing: -0.02em;
}

/* ─── Mini email mock ─── */
.mini-email {
  margin-top: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
  background: var(--paper-2);
}
.mini-email-meta { margin-bottom: 10px; }
.mini-email-subject {
  color: var(--ink-soft);
  font-style: normal;
  font-size: var(--type-small);
}
.mini-email-body { font-size: var(--type-small); margin-top: 6px; line-height: 1.5; }
.mini-email-actions { margin-top: 12px; display: flex; gap: 6px; }
.mini-action {
  padding: 4px 10px;
  font-size: var(--type-micro);
  border: 1px solid var(--rule-strong);
  border-radius: 5px;
  background: var(--paper);
  font-weight: 500;
  font-family: var(--font-body);
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  cursor: pointer;
}
.mini-action.primary { background: var(--accent); color: var(--paper); border-color: var(--ink); }
.mini-action.primary:hover { background: var(--accent-deep); }
.mini-action.confirmed {
  background: var(--good) !important;
  color: var(--paper) !important;
  border-color: var(--good) !important;
}

/* ─── Card inset ─── */
.card-inset { padding: 28px; }
.card-inset-draft {
  margin-top: 22px;
  padding: 18px;
  background: var(--paper-2);
  border-radius: 8px;
  font-size: var(--type-small);
  line-height: 1.5;
}
.card-inset-draft-label {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.card-inset-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 10px;
  background: var(--paper-2);
  align-items: center;
}
.kbd-hint {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: var(--ink-faint);
  margin-left: auto;
}

/* ─── Ask Sedge box ─── */
.ask-sedge-box { margin-top: auto; }
.ask-sedge-label {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: rgba(244,241,235,0.5);
  margin-bottom: 8px;
}
.ask-sedge-query {
  font-size: var(--type-small);
  font-weight: 500;
  color: var(--accent);
}
.ask-sedge-result {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: rgba(244,241,235,0.5);
  margin-top: 12px;
}

/* ─── Confirmed btn animation ─── */
.btn { transition: transform 0.15s, background 0.25s ease, color 0.25s ease, opacity 0.25s ease; }
.btn.confirmed {
  background: var(--good) !important;
  color: var(--paper) !important;
  border-color: var(--good) !important;
  cursor: default;
}
.btn.confirmed:hover { transform: none; }
.btn .check-pop {
  display: inline-block;
  transform: scale(0) rotate(-90deg);
  animation: check-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes check-pop {
  0%   { transform: scale(0) rotate(-90deg); opacity: 0; }
  60%  { transform: scale(1.3) rotate(0); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ─── Closing CTA ─── */
.cta-closing-section {
  padding: 120px 40px;
  background: #FFFFFF;
}
.cta-closing-card {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  background: #F0391A;
  border-radius: 24px;
  padding: 80px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cta-closing-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--type-section);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin: 0;
}
.cta-closing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding: 14px 28px;
  background: #FFFFFF;
  color: #F0391A;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 500;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.cta-closing-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

@media (max-width: 1024px) {
  .cta-closing-section { padding: 96px 32px; }
  .cta-closing-card { padding: 64px 64px; border-radius: 20px; }
  .cta-closing-title { font-size: var(--type-section-sm); }
}
@media (max-width: 760px) {
  .cta-closing-section { padding: 72px 24px; }
  .cta-closing-card { padding: 48px 32px; border-radius: 18px; }
  .cta-closing-title { font-size: var(--type-section-sm); }
  .cta-closing-btn { margin-top: 28px; padding: 12px 24px; font-size: var(--type-small); }
}

/* ─── Footer ─── */
.site-footer {
  padding: 32px 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--type-small);
  color: var(--ink-soft);
}
.site-footer .meta {
  display: flex;
  gap: 24px;
}
.site-footer a { color: inherit; text-decoration: none; }

/* ─── Mobile responsive (≤760px) ───────────────────────────── */
@media (max-width: 760px) {
  /* Section + nav padding */
  .sec { padding: 56px 20px !important; }
  nav { padding: 12px 16px; }

  /* Nav: shrink everything to fit */
  .nav-links { gap: 12px; font-size: var(--type-micro); }
  .nav-links a { padding: 2px 0; white-space: nowrap; }
  .logo-lockup { height: 22px; }
  .logo--sm .logo-lockup { height: 16px; }
  .logo { gap: 6px; }
  nav .btn.accent { padding: 8px 12px; font-size: var(--type-micro); }

  /* Display + section titles scale down */
  h1.display { font-size: 40px !important; letter-spacing: -0.025em !important; line-height: 1.05 !important; }
  h2.section-title { font-size: 32px !important; letter-spacing: -0.02em !important; line-height: 1.1 !important; }
  p.lede { font-size: var(--type-body) !important; line-height: 1.45 !important; }
  p.body-lg { font-size: var(--type-small) !important; }

  /* Inline 2-col grids → stack */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"],
  div[style*="grid-template-columns: 0.9fr 1.4fr"],
  div[style*="grid-template-columns: 1.4fr 1fr"],
  div[style*="grid-template-columns: 3fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  /* Inline 3-col grids → stack */
  div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* Big cards spanning 2 rows shouldn't span on single column */
  div[style*="grid-row: span 2"] {
    grid-row: auto !important;
    min-height: auto !important;
  }
  /* Force margin-inline auto on max-width-constrained inner blocks so they fill */
  div[style*="max-width: 1080px"],
  div[style*="max-width: 920px"] { max-width: 100% !important; }

  /* Hero CTAs row: drop right-justify, allow wrap, full-width buttons */
  .container > div[style*="justify-content: flex-end"] {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
  .container .btn.lg { padding: 12px 16px; font-size: var(--type-small); }
/* Card-inset (broker A card section) buttons stack */
  .card-inset { padding: 20px; }
  .card-inset-footer { flex-wrap: wrap; padding: 14px 20px; gap: 8px; }
  .card-inset-footer .qcard-action { flex: 1 1 auto; }
  .kbd-hint { display: none; }

  /* Use case cards (broker What Sedge does) */
  .uc { padding: 20px !important; min-height: auto !important; }
  .uc-title { font-size: var(--type-lede) !important; letter-spacing: -0.015em !important; }
  .uc-title[style*="font-size: var(--type-section-sm)"] { font-size: var(--type-sub-display) !important; }
  .uc-arrow { width: 24px; height: 24px; top: 16px; right: 16px; font-size: var(--type-micro); }
  .uc-sub { font-size: var(--type-small) !important; }

  /* Subhead block */
  .subhead-block { max-width: 100% !important; margin-top: 22px !important; }
  .subhead-block .pain { font-size: var(--type-body) !important; }
  .subhead-block .promise { font-size: var(--type-lede) !important; letter-spacing: -0.015em !important; margin-top: 18px !important; }

  /* Pillar */
  .pillar-headline { font-size: var(--type-sub-display) !important; letter-spacing: -0.015em !important; max-width: 100% !important; }
  .pillar-desc { font-size: var(--type-small) !important; }

  /* Action cards (founder Sales insights) */
  .action-card { padding: 18px 16px 16px !important; gap: 12px !important; }
  .action-headline { font-size: var(--type-lede) !important; letter-spacing: -0.02em !important; }
  .action-desc { font-size: var(--type-small) !important; }
  .action-buttons { flex-direction: column; }
  .btn-action { width: 100%; justify-content: center; }
  .drilldown-charts { grid-template-columns: 1fr !important; }
  .action-meta { flex-wrap: wrap; gap: 6px; }
  .action-time { font-size: var(--type-micro); }
  .action-tag { font-size: var(--type-micro); padding: 2px 6px; }

  /* Timeline (Monday morning) */
  .timeline { grid-template-columns: 64px 1fr !important; gap: 14px 14px !important; }
  .timeline-time { font-size: var(--type-micro) !important; padding-top: 1px !important; }
  .timeline-body { font-size: var(--type-body) !important; line-height: 1.35 !important; }

  /* Footer */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }
  .site-footer .meta {
    flex-wrap: wrap;
    gap: 12px;
    font-size: var(--type-micro);
  }
}

/* ─── Very narrow (≤480px) ───────────────────────────── */
@media (max-width: 480px) {
  h1.display { font-size: 32px !important; letter-spacing: -0.025em !important; }
  h2.section-title { font-size: 26px !important; letter-spacing: -0.02em !important; }
  .pillar-headline { font-size: var(--type-lede) !important; }
  .subhead-block .promise { font-size: var(--type-lede) !important; }

  /* Nav further compresses */
  nav { padding: 10px 14px; }
  .nav-links { gap: 10px; font-size: var(--type-micro); }
  nav .btn.accent { padding: 7px 10px; font-size: var(--type-micro); }
  .logo-lockup { height: 20px; }

  /* Hero CTA buttons take full width on tiny screens */
  .container > div[style*="justify-content: flex-end"] > .btn.lg {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* ─── Product Showcase — "What Sedge does" on /brokers ────────── */
.sec-white { background: #FFFFFF !important; }

.ps-rows {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}
.ps-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.ps-row .ps-copy   { grid-column: 1; }
.ps-row .ps-visual { grid-column: 2; }
.ps-row.reverse .ps-copy   { grid-column: 2; }
.ps-row.reverse .ps-visual { grid-column: 1; grid-row: 1; }

.ps-copy { max-width: 40ch; }
.ps-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 14px;
}
.ps-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Agent flow */
.agent-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  padding-top: 14px;
}
.agent-card {
  flex: 1 1 110px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(12,12,11,0.12);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
  min-height: 54px;
}
.agent-icon {
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.agent-icon svg { width: 13px; height: 13px; }
.agent-name {
  font-size: var(--type-micro);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-family: var(--font-body);
}

.agent-conn {
  flex: 0 0 32px;
  height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agent-conn .dash {
  width: 100%;
  height: 1.5px;
  background-image: linear-gradient(to right, rgba(12,12,11,0.22) 50%, transparent 50%);
  background-size: 7px 1.5px;
  background-repeat: repeat-x;
}
.agent-conn .pill-mini {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

@keyframes ps-spin { to { transform: rotate(360deg); } }
.agent-conn .pill-mini.gray svg,
.flow-pill-abs.pill-mini.gray svg {
  animation: ps-spin 1.4s linear infinite;
  transform-origin: 6px 6px;
}

/* ─── Product-specific workflow shapes ───────────────────────────── */

/* Shared SVG stroke styling for non-linear connectors */
.flow-svg-line {
  stroke: rgba(12,12,11,0.28);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-svg-line.faded {
  stroke: rgba(12,12,11,0.16);
}
.flow-svg-arrow { fill: rgba(12,12,11,0.34); }
.flow-svg-arrow.faded { fill: rgba(12,12,11,0.22); }

/* Pill floated over an SVG / absolute spot on the flow */
.flow-pill-abs {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

/* Pill anchored to the top edge of a card */
.agent-card { position: relative; }
.agent-card .card-pill {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  white-space: nowrap;
}
.agent-card .card-pill.pill-mini.gray svg {
  animation: ps-spin 1.4s linear infinite;
  transform-origin: 6px 6px;
}

/* — Product 1 (PO Processing): two inputs converge on PO Parser — */
.agent-flow.flow-branching {
  display: grid;
  grid-template-columns:
    minmax(118px, 1.05fr)   /* col 1: input agents */
    52px                    /* col 2: convergence svg */
    minmax(118px, 1.05fr)   /* col 3: PO Parser (hub) */
    30px                    /* col 4: connector */
    minmax(116px, 1fr)      /* col 5: Spec Validator */
    30px                    /* col 6: connector */
    minmax(116px, 1fr);     /* col 7: Shipment Checker */
  grid-template-rows: 1fr 10px 1fr;
  column-gap: 4px;
  row-gap: 0;
  align-items: center;
  padding: 14px 0 4px;
  position: relative;
  flex-wrap: initial;
}
.flow-branching .b-in-top { grid-column: 1; grid-row: 1; }
.flow-branching .b-in-bot { grid-column: 1; grid-row: 3; }
.flow-branching .b-converge {
  grid-column: 2;
  grid-row: 1 / 4;
  position: relative;
  align-self: stretch;
  height: 100%;
}
.flow-branching .b-converge > svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.flow-branching .b-hub      { grid-column: 3; grid-row: 1 / 4; align-self: center; }
.flow-branching .b-conn-1   { grid-column: 4; grid-row: 1 / 4; align-self: center; }
.flow-branching .b-mid      { grid-column: 5; grid-row: 1 / 4; align-self: center; }
.flow-branching .b-conn-2   { grid-column: 6; grid-row: 1 / 4; align-self: center; }
.flow-branching .b-end      { grid-column: 7; grid-row: 1 / 4; align-self: center; }

/* — Products 2 & 4 (linear with feedback loop) — */
.agent-flow.flow-loopback {
  display: block;
  position: relative;
  padding: 14px 0 46px;
  flex-wrap: initial;
}
.flow-loopback .loop-row {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.flow-loopback .loop-row .agent-card { flex: 1 1 110px; min-width: 0; }
.flow-loopback .loop-row .agent-conn { flex: 0 0 32px; }
.flow-loopback .loop-arrow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46px;
  pointer-events: none;
  overflow: visible;
}
.flow-loopback .loop-arrow > svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* — Product 3 (Trade Spend): hub-and-spoke — */
.agent-flow.flow-hub {
  display: grid;
  grid-template-columns:
    minmax(110px, 1fr)
    minmax(118px, 1.12fr)
    minmax(110px, 1fr);
  grid-template-rows: auto auto;
  column-gap: 36px;
  row-gap: 16px;
  align-items: center;
  padding: 18px 0 8px;
  position: relative;
  min-height: 180px;
  flex-wrap: initial;
}
.flow-hub .hub-tl { grid-column: 1; grid-row: 1; }
.flow-hub .hub-bl { grid-column: 1; grid-row: 2; }
.flow-hub .hub-r  { grid-column: 3; grid-row: 1 / 3; align-self: center; }
.flow-hub .hub-c  {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: stretch;
  position: relative;
  z-index: 1;
  border-color: rgba(12,12,11,0.22);
  box-shadow: 0 1px 0 rgba(12,12,11,0.04);
}
.flow-hub .hub-c .agent-name { font-weight: 500; }
.flow-hub .hub-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.flow-hub .hub-svg > svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Mobile — let the new flows fall back to a horizontal scroll */
@media (max-width: 760px) {
  .agent-flow.flow-branching,
  .agent-flow.flow-hub {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 0 4px;
    gap: 8px;
    min-height: 0;
    align-items: center;
  }
  .agent-flow.flow-branching > *,
  .agent-flow.flow-hub > * {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .agent-flow.flow-branching .b-converge,
  .agent-flow.flow-hub .hub-svg {
    display: none;
  }
  .agent-flow.flow-branching .agent-card,
  .agent-flow.flow-hub .agent-card { flex: 0 0 auto; min-width: 142px; }
  .agent-flow.flow-loopback { padding-bottom: 14px; }
  .agent-flow.flow-loopback .loop-arrow { display: none; }
  .agent-flow.flow-loopback .loop-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .agent-flow.flow-loopback .loop-row .agent-card { flex: 0 0 auto; min-width: 142px; }
}

/* Dashboard preview shared */
.ps-dash {
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 12px;
  padding: 16px 18px;
}
.ps-dash-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.ps-dash-title {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  color: var(--ink);
}
.ps-dash-filter {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  padding: 3px 8px;
  border-radius: 999px;
  background: #FAEEDA;
  color: #854F0B;
  letter-spacing: 0.015em;
}
.ps-dash-foot {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  color: var(--ink-faint);
  letter-spacing: 0.025em;
}

/* P1 table */
.ps-table { display: flex; flex-direction: column; }
.ps-tr {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) auto minmax(70px, auto);
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-2);
  padding: 7px 0;
  border-top: 1px solid rgba(12,12,11,0.08);
}
.ps-tr:first-child { border-top: 0; padding-top: 0; }
.ps-tr .mono { font-family: var(--font-mono); font-size: var(--type-micro); color: var(--ink-2); }
.ps-tr .amt { font-family: var(--font-body); font-weight: 500; font-feature-settings: 'tnum'; color: var(--ink); text-align: right; }
.pill-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.015em;
  line-height: 1.4;
  white-space: nowrap;
}
.pill-mini.green, .pill-mini.ok   { background: #E1F5EE; color: #0F6E56; }
.pill-mini.amber, .pill-mini.warn { background: #FAEEDA; color: #854F0B; }
.pill-mini.red,   .pill-mini.err  { background: #FAECE7; color: #993C1D; }
.pill-mini.gray                   { background: rgba(12,12,11,0.06); color: #5F5E5A; }
.pill-mini svg { width: 9px; height: 9px; flex-shrink: 0; }

/* P2 kanban */
.ps-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ps-kanban-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ps-kanban-col-h {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 500;
}
.ps-kanban-card {
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.18);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ps-kanban-card .store { font-weight: 500; color: var(--ink); font-size: var(--type-micro); }
.ps-kanban-card .form { color: var(--ink-soft); font-size: var(--type-micro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-kanban-card .progress { color: var(--ink-faint); font-family: var(--font-mono); font-size: var(--type-micro); }
.ps-kanban-card .flag { color: #993C1D; font-size: var(--type-micro); }
.ps-kanban-card .check { color: #0F6E56; }

/* ── Retailer Mgmt: kanban v2 (uppercase column heads, progress bar cards) ── */
.ps-kanban.ps-kanban-v2 { gap: 12px; }
.ps-kanban-v2 .ps-kanban-col { gap: 8px; }
.ps-kanban-v2 .ps-kanban-col-h {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888780;
}
.ps-kanban-v2 .ps-kanban-card {
  border-color: rgba(12,12,11,0.08);
  padding: 12px;
  gap: 6px;
}
.ps-kanban-store {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  color: #0C0C0B;
  letter-spacing: -0.01em;
}
.ps-kanban-form {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: #5F5E5A;
}
.ps-kanban-bar {
  height: 6px;
  background: #F0EBE0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.ps-kanban-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.ps-bar-neutral { background: #0C0C0B; }
.ps-bar-active  { background: #F0391A; }
.ps-bar-done    { background: #0F6E56; }
.ps-kanban-meta {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: #5F5E5A;
  letter-spacing: 0.01em;
}
.ps-kanban-meta--done { color: #0F6E56; font-weight: 500; }
.ps-kanban-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: #993C1D;
  margin-top: 2px;
}
.ps-kanban-flag svg { width: 10px; height: 10px; }
.ps-kanban-sub {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-faint);
  margin-top: 2px;
}

/* Dashboard counter (right-aligned, secondary type) */
.ps-dash-counter {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: #5F5E5A;
}

/* P3 hero stat */
.ps-hero-stat { padding: 4px 0 14px; border-bottom: 1px solid rgba(12,12,11,0.08); }
.ps-hero-num {
  font-family: var(--font-body);
  font-size: var(--type-section-sm);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-feature-settings: 'tnum';
  line-height: 1;
}
.ps-hero-label {
  font-family: var(--font-body);
  font-size: var(--type-small);
  color: var(--ink-soft);
  margin-top: 6px;
}
.ps-hero-delta {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--accent);
  font-weight: 500;
}
.ps-stat-chips { display: flex; gap: 6px; margin-top: 14px; }
.ps-stat-chip {
  flex: 1;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-soft);
  border: 0.5px solid rgba(12,12,11,0.08);
  min-width: 0;
}
.ps-stat-chip .v { display: block; font-weight: 500; color: var(--ink); font-size: var(--type-small); margin-top: 3px; font-feature-settings: 'tnum'; letter-spacing: -0.01em; }
.ps-stat-chip.danger .v { color: var(--accent); }

/* P4 gauges */
.ps-gauges { display: flex; flex-direction: column; gap: 12px; }
.ps-gauge-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-2);
}
.ps-gauge-bar {
  display: flex;
  height: 12px;
  background: rgba(12,12,11,0.04);
  border-radius: 999px;
  overflow: hidden;
}
.ps-gauge-bar .committed { background: var(--ink); height: 100%; }
.ps-gauge-bar .available { background: rgba(12,12,11,0.22); height: 100%; }

@media (max-width: 760px) {
  .ps-rows { gap: 56px; margin-top: 36px; }
  .ps-row,
  .ps-row.reverse {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .ps-row .ps-copy,
  .ps-row .ps-visual,
  .ps-row.reverse .ps-copy,
  .ps-row.reverse .ps-visual {
    grid-column: 1 !important;
  }
  .ps-row .ps-copy,
  .ps-row.reverse .ps-copy { order: 1; grid-row: auto !important; }
  .ps-row .ps-visual,
  .ps-row.reverse .ps-visual { order: 2; grid-row: auto !important; }

  .ps-copy { max-width: 100%; }

  /* Agent flow: clean symmetric 2x2 grid on mobile. No connectors,
     no Completed / In Progress pills — just the 4 agent cards. */
  .agent-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .agent-flow > .agent-card {
    padding: 10px 10px;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .agent-flow > .agent-card .agent-name { font-size: var(--type-micro); }
  .agent-flow > .agent-card .agent-icon { width: 22px; height: 22px; }

  /* Hide every connector + their pills on mobile */
  .agent-flow > .agent-conn { display: none; }
  /* Also hide any card-pill variants that ride along on the agent-card */
  .agent-flow > .agent-card .card-pill { display: none; }

  /* Tighten the workflow card padding so the 2x2 grid sits snug */
  .ws-agents-card { padding: 12px; }

  /* Mobile-only dashboard adjustments */
  .ps-tr { grid-template-columns: minmax(0, 1.4fr) auto minmax(60px, auto); gap: 6px; font-size: var(--type-micro); }
  .ps-tr > span:nth-child(2) { display: none; }
  .ps-kanban { grid-template-columns: 1fr 1fr; }
  .ps-hero-num { font-size: var(--type-section-sm) !important; }
  .ps-gauge-row { grid-template-columns: 80px minmax(0,1fr) auto; font-size: var(--type-micro); }
}

/* "For brokers" qualifier pill, scoped to Commissions Tracking */
.ps-for-brokers-wrap { margin: 0 0 14px; }
.ps-for-brokers {
  display: inline-block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--type-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #993C1D;
  background: #FAF2E5;
  border: 0.5px solid rgba(12,12,11,0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ─── Legacy systems → Sedge section ───────────────────────────── */
.lg-flow {
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: center;
}
.lg-left, .lg-right { min-width: 0; }

.lg-frame {
  position: relative;
  border: 1.5px dashed rgba(12,12,11,0.22);
  border-radius: 16px;
  padding: 22px 18px 16px;
}
.lg-frame-label {
  position: absolute;
  top: -10px;
  left: 22px;
  background: var(--paper);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.lg-clusters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lg-cluster {
  background: #FAF2E5;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.lg-cluster.full { grid-column: 1 / -1; }
.lg-cluster-label {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
  font-weight: 500;
}
.lg-cluster-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.lg-tool {
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.lg-lines {
  width: 100%;
  height: 100%;
  min-height: 380px;
  display: block;
  pointer-events: none;
}
.lg-line {
  stroke: rgba(12,12,11,0.28);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 3 5;
  animation: lg-flow 2.4s linear infinite;
}
@keyframes lg-flow {
  to { stroke-dashoffset: -16; }
}
.lg-line:nth-child(1) { animation-delay: -0.0s; }
.lg-line:nth-child(2) { animation-delay: -0.5s; }
.lg-line:nth-child(3) { animation-delay: -1.0s; }
.lg-line:nth-child(4) { animation-delay: -1.5s; }
.lg-line:nth-child(5) { animation-delay: -2.0s; }
@media (prefers-reduced-motion: reduce) {
  .lg-line { animation: none; }
}

.lg-queue {
  background: var(--paper);
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 16px;
  padding: 18px 20px 16px;
}
.lg-queue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid rgba(12,12,11,0.08);
}
.lg-queue-logo { height: 18px; width: auto; display: block; }
.lg-queue-title {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.lg-queue-rows { display: flex; flex-direction: column; gap: 4px; }
.lg-queue-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 0.5px solid rgba(12,12,11,0.06);
}
.lg-queue-row:first-child { border-top: 0; padding-top: 4px; }
.lg-queue-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,12,11,0.05);
  border-radius: 5px;
  color: var(--ink-2);
}
.lg-queue-icon svg { width: 12px; height: 12px; }
.lg-queue-label {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  line-height: 1.35;
  color: var(--ink-2);
  letter-spacing: 0;
}
.lg-queue-label strong {
  color: var(--ink);
  font-weight: 500;
}

@media (max-width: 760px) {
  .lg-flow {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .lg-lines { display: none; }
  .lg-clusters { grid-template-columns: 1fr 1fr; }
  .lg-queue { padding: 16px; }
}

/* ─── Product showcase (vertical sidebar layout) ──────────────── */

.ws-panels { position: relative; }
.ws-panel { display: none; }
.ws-panel.active {
  display: block;
  animation: ws-fade-in 0.2s ease;
}
@keyframes ws-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Sidebar layout: vertical product list + active content stack ── */
.ws-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}
.ws-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 96px;
  align-self: start;
}
.ws-side-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.08);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  color: #5F5E5A;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--type-sub-display);
  letter-spacing: -0.01em;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ws-side-icon { grid-column: 1; grid-row: 1; }
.ws-side-label { grid-column: 2; grid-row: 1; }
.ws-side-item:hover {
  background: rgba(12,12,11,0.02);
  color: #2A2A26;
  border-color: rgba(12,12,11,0.12);
}
.ws-side-item.active {
  background: #FAF2E5;
  color: #0C0C0B;
  border-color: rgba(12,12,11,0.12);
}
.ws-side-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: currentColor;
}
.ws-side-icon svg { width: 100%; height: 100%; }
.ws-side-label { display: inline-block; }
.ws-side-pill {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  width: fit-content;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: #993C1D;
  background: #FAF2E5;
  border: 0.5px solid rgba(12,12,11,0.15);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.ws-side-callout {
  margin-top: 12px;
  padding-left: 20px;
  font-family: var(--font-body);
  font-weight: 400;
  font-style: normal;
  font-size: var(--type-callout);
  color: #888780;
  letter-spacing: 0;
  line-height: 1.3;
  user-select: none;
}

/* Right column: panels stack content vertically */
.ws-panel-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: stretch;
}
.ws-copy {
  padding: 0;
  max-width: 100%;
}

/* See-more panel inside the new sidebar layout */

/* Responsive */
@media (max-width: 1024px) {
  .ws-layout { grid-template-columns: minmax(220px, 30%) 1fr; gap: 56px; }
  .ws-side-item { font-size: var(--type-sub-display); }
  .ws-side-callout { font-size: var(--type-body); padding-left: 28px; }
}
@media (max-width: 760px) {
  .ws-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px;
    min-width: 0;
  }
  /* Allow intrinsic-wide children (e.g. horizontal-scroll kanban) to be
     constrained by the viewport instead of breaking out of the flex column. */
  .ws-panels,
  .ws-panel,
  .ws-panel-grid,
  .ws-visual,
  .ws-copy,
  .ps-dash { min-width: 0; max-width: 100%; }
  /* Compact 2×2 tab grid — all 4 tabs visible at once, no scroll */
  .ws-sidebar {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    overflow: visible;
    padding-bottom: 0;
    scrollbar-width: auto;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .ws-side-item {
    display: inline-flex;
    min-width: 0;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    grid-template-columns: none;
    grid-template-rows: none;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
  }
  /* Swap the long desktop label for the short mobile label via data-short */
  .ws-side-label { display: none; }
  .ws-side-item::after {
    content: attr(data-short);
  }
  .ws-side-icon { width: 14px; height: 14px; }
  .ws-side-pill { display: none; } /* "For brokers" hidden on mobile */
  .ws-side-callout { display: none; }
}

.ws-visual {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

/* Layer 1: Inputs */
.ws-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 4px;
}
.ws-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: var(--type-small);
  color: var(--ink-2);
  letter-spacing: -0.01em;
}
.ws-input-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  flex-shrink: 0;
  color: var(--ink-soft);
}
.ws-input-icon svg { width: 100%; height: 100%; }

/* Connector between layers */
.ws-connector {
  height: 20px;
  align-self: center;
  width: 1.5px;
  background-image: linear-gradient(to bottom, rgba(12,12,11,0.2) 50%, transparent 50%);
  background-size: 1.5px 6px;
  background-repeat: repeat-y;
}

/* Layer 2: AI Agents card */
.ws-agents-card {
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 12px;
  padding: 20px;
}
.ws-agents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ws-agents-title {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  color: #5F5E5A;
  letter-spacing: -0.01em;
}
.ws-agents-pill {
  font-family: var(--font-mono);
  font-size: var(--type-micro);
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ECE3F8;
  color: #5E3F8D;
  text-transform: uppercase;
}
.ws-agents-head--end { justify-content: flex-end; }
.ws-agents-head--label { justify-content: flex-start; }

/* "How it works" heading at the top of the right content area */
.ws-section-label {
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--ink);
}
.ws-agents-label {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  color: #5F5E5A;
  letter-spacing: 0;
}

/* Long-form product description (sits above the inputs row, matches dashboard width) */
.ps-description {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.6;
  color: #5F5E5A;
  letter-spacing: -0.01em;
  max-width: none;
}

/* PO Processing: 3-input layout with stacked label + sub */
.ws-inputs.ws-inputs-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 0;
}
.ws-inputs.ws-inputs-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.ws-input.ws-input-stack {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  min-height: 60px;
}
.ws-input-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ws-input-name {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.ws-input-source {
  display: inline-block;
  margin-left: 6px;
  vertical-align: 1px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #993C1D;
  background: #FAF2E5;
  border: 0.5px solid rgba(12,12,11,0.15);
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}
.ws-input-internal {
  background: #FAF2E5 !important;
  border-color: rgba(153,60,29,0.18) !important;
}
.ws-input-sub {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
  line-height: 1.3;
}

/* Funnel: connector lines from 3 inputs down to the workflow card */
.ws-input-funnel {
  width: 100%;
  height: 32px;
  margin: -2px 0 -2px;
  pointer-events: none;
}
.ws-input-funnel svg { width: 100%; height: 100%; display: block; }

/* PO Processing dashboard: 6-column table with header row */
.ps-dash-head--row {
  align-items: flex-end;
  gap: 16px;
}
.ps-dash-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.ps-dash-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12,12,11,0.04);
  border: 0.5px solid rgba(12,12,11,0.10);
  border-radius: 8px;
  padding: 5px 9px;
  max-width: 260px;
}
.ps-dash-search svg { width: 12px; height: 12px; color: var(--ink-soft); flex-shrink: 0; }
.ps-dash-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  color: var(--ink-2);
  width: 100%;
  padding: 0;
}
.ps-dash-search input::placeholder { color: var(--ink-faint); }

.ps-table.ps-table-6col .ps-tr {
  grid-template-columns: 44px minmax(0, 0.9fr) minmax(0, 1fr) 44px minmax(0, 0.9fr) minmax(0, 1.05fr);
  gap: 10px;
}
.ps-table.ps-table-6col .ps-tr-head {
  border-top: 0;
  border-bottom: 1px solid rgba(12,12,11,0.08);
  padding-top: 0;
  padding-bottom: 8px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888780;
}
.ps-table.ps-table-6col .ps-tr-head + .ps-tr { border-top: 0; padding-top: 10px; }
.ps-table.ps-table-6col .ps-tr .amt { text-align: right; }
.ps-table.ps-table-6col .ps-th-right { text-align: right; }

/* Mobile responsive */
@media (max-width: 760px) {
  .ws-panel-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ws-copy { padding-right: 0; }
  .ws-inputs { flex-wrap: wrap; }
  .ws-input { font-size: var(--type-micro); padding: 7px 10px; }
  .ws-agents-card { padding: 16px; }
}

/* ─── Chaos → Sedge → queue animation (10s loop) ─────────────────── */
/*
  Phase 1 (0–2s):     Chaos builds on left; Sedge centered; right empty
  Phase 2 (2–3.5s):   Docs/numbers curve into Sedge (staggered)
  Phase 3 (3.5–4s):   Sedge translates to left-center, scales to 0.6
  Phase 4 (4–9s):     Queue card emerges; rows appear; 3 approvals; new rows enter
  Phase 5 (9–10s):    Queue fades; Sedge returns to center; reset
*/

.chaos-canvas {
  position: relative;
  height: 520px;
  width: 100%;
  max-width: 1320px;
  margin: 64px auto 0;
  overflow: hidden;
  isolation: isolate;
}

/* Warm tint on left zone during chaos buildup (Phase 1 → fades in Phase 2) */
.chaos-tint {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 38%;
  background: radial-gradient(ellipse at 35% 50%, rgba(251,61,40,0.06), transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Document base (white card on a light section bg) ────────── */
.chaos-doc {
  position: absolute;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.15);
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 8px 9px;
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-body);
  z-index: 2;
}

/* Tiny corner type label used by several docs */
.doc-tag {
  position: absolute;
  bottom: 5px;
  left: 7px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.07em;
  color: rgba(12,12,11,0.42);
  text-transform: uppercase;
}

.doc-line {
  display: block;
  height: 3px;
  background: rgba(12,12,11,0.18);
  border-radius: 2px;
}

/* ── 1 · Email doc ───────────────────────── */
.doc-email .doc-email-from {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 12px;
}
.doc-email .doc-avatar {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(12,12,11,0.18);
  flex-shrink: 0;
}
.doc-email .doc-email-subject {
  height: 6px;
  width: 78%;
  background: rgba(12,12,11,0.55);
  border-radius: 2px;
  margin-top: 2px;
}
.doc-email .doc-email-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 12px 12px 0;
  border-color: transparent rgba(12,12,11,0.10) transparent transparent;
}

/* ── 2 · New item form ───────────────────── */
.doc-form { padding: 8px 9px; gap: 5px; }
.doc-form .doc-form-title {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(12,12,11,0.55);
  border-bottom: 0.5px solid rgba(12,12,11,0.10);
  padding-bottom: 4px;
  margin-bottom: 2px;
}
.doc-form .doc-form-row {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 5px;
  align-items: center;
}
.doc-form .doc-form-label {
  height: 3px;
  background: rgba(12,12,11,0.22);
  border-radius: 2px;
}
.doc-form .doc-form-input {
  height: 9px;
  background: rgba(12,12,11,0.04);
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 2px;
}
.doc-form .doc-form-checks {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}
.doc-form .doc-form-checks i {
  width: 7px;
  height: 7px;
  border: 0.5px solid rgba(12,12,11,0.35);
  border-radius: 1px;
  background: #FFFFFF;
}
.doc-form .doc-form-checks i:nth-child(2) { background: rgba(12,12,11,0.55); border-color: rgba(12,12,11,0.55); }

/* ── 3 · BOL / shipping ──────────────────── */
.doc-bol .doc-bol-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 0.5px solid rgba(12,12,11,0.10);
  margin-bottom: 4px;
}
.doc-bol .doc-bol-icon {
  width: 20px;
  height: 20px;
  color: rgba(12,12,11,0.55);
  flex-shrink: 0;
}
.doc-bol .doc-bol-title {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(12,12,11,0.6);
}
.doc-bol .doc-bol-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr;
  gap: 4px;
  margin-top: 3px;
}
.doc-bol .doc-bol-row i {
  height: 8px;
  background: rgba(12,12,11,0.06);
  border-radius: 1px;
}
.doc-bol .doc-bol-row:last-child i:last-child { background: rgba(12,12,11,0.18); }

/* ── 4 · Excel spreadsheet ──────────────── */
.doc-sheet { padding-top: 0; padding-left: 0; padding-right: 0; }
.doc-sheet .doc-sheet-tab {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: #21A366;
  padding: 3px 7px 4px;
  border-radius: 0 0 3px 0;
  margin-bottom: 4px;
  align-self: flex-start;
}
.doc-sheet .doc-sheet-cells {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  padding: 0 6px 6px;
  flex: 1;
}
.doc-sheet .doc-sheet-cells i {
  background: rgba(12,12,11,0.04);
  border: 0.5px solid rgba(12,12,11,0.08);
}
.doc-sheet .doc-sheet-cells i:nth-child(3),
.doc-sheet .doc-sheet-cells i:nth-child(10),
.doc-sheet .doc-sheet-cells i:nth-child(15),
.doc-sheet .doc-sheet-cells i:nth-child(22) { background: rgba(12,12,11,0.16); }

/* ── 5 · PDF one-pager ──────────────────── */
.doc-pdf { padding: 8px 8px; gap: 3px; }
.doc-pdf .doc-pdf-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: #D62B27;
  padding: 2px 5px;
  border-radius: 2px;
}
.doc-pdf .doc-pdf-thumb {
  height: 42px;
  background: rgba(12,12,11,0.08);
  border-radius: 2px;
  margin-bottom: 4px;
}

/* ── 6 · PDF document (red badge + content lines) ─────────── */
.doc-pdf { padding: 8px 8px; gap: 3px; }
.doc-pdf .doc-pdf-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: #D62B27;
  padding: 2px 5px;
  border-radius: 2px;
}
.doc-pdf .doc-pdf-thumb {
  height: 42px;
  background: rgba(12,12,11,0.08);
  border-radius: 2px;
  margin-bottom: 4px;
}

/* ── Whole Foods header (re-used inside doc-form) ─────────── */
.doc-form .doc-form-head {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 4px;
  border-bottom: 0.5px solid rgba(12,12,11,0.10);
  margin-bottom: 2px;
}
.doc-form .doc-form-brand {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  background: #006B3F;
  padding: 2px 5px;
  border-radius: 2px;
}
.doc-form .doc-form-vendor {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.025em;
  color: rgba(12,12,11,0.65);
}

/* ── 7 · PO document (Costco) ──────────────────────────────── */
.doc-po { padding: 8px 9px; gap: 4px; }
.doc-po .doc-po-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 0.5px solid rgba(12,12,11,0.10);
  margin-bottom: 3px;
}
.doc-po .doc-po-badge {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  background: rgba(12,12,11,0.7);
  padding: 2px 5px;
  border-radius: 2px;
}
.doc-po .doc-po-vendor {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.07em;
  color: rgba(12,12,11,0.65);
}
.doc-po .doc-po-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.7fr;
  gap: 4px;
}
.doc-po .doc-po-row i {
  height: 5px;
  background: rgba(12,12,11,0.10);
  border-radius: 1px;
}
.doc-po .doc-po-foot {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
  border-top: 0.5px solid rgba(12,12,11,0.08);
}
.doc-po .doc-po-foot .doc-line { height: 4px; background: rgba(12,12,11,0.16); }

/* ── 8/9/10 · Logo badges (Gmail, Drive, Dropbox) ──────────── */
.doc-folder {
  padding: 0;
  gap: 0;
  align-items: center;
  justify-content: center;
}
.doc-folder-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}
.doc-folder-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.doc-gmail-icon { width: 36px; height: 28px; margin-top: 10px; }
.doc-folder-label {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(12,12,11,0.6);
  margin-top: 6px;
}

/* ── Floating chaos numbers (broker language) ───────────────── */
.chaos-num {
  position: absolute;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  line-height: 1.05;
}
.chaos-num.red  { color: #993C1D; }
.chaos-num.gray { color: #5F5E5A; }
.chaos-num small {
  display: block;
  font-size: var(--type-micro);
  font-weight: 400;
  color: #5F5E5A;
  margin-top: 2px;
  letter-spacing: 0.01em;
}
/* All numbers stay in the left third (≤380px) and curve into Sedge during Phase 2 */
.chaos-num.n1 { top:   5px; left: 175px; --rot: -6deg; --exit-x: 335px; --exit-y:  238px; --curve-y: -50px; --d: 0.10s; }
.chaos-num.n2 { top: 120px; left: 320px; --rot:  3deg; --exit-x: 200px; --exit-y:  118px; --curve-y: -30px; --d: 0.35s; }
.chaos-num.n3 { top: 215px; left: 330px; --rot: -4deg; --exit-x: 190px; --exit-y:   40px; --curve-y: -30px; --d: 0.60s; }
.chaos-num.n4 { top: 460px; left: 235px; --rot:  5deg; --exit-x: 265px; --exit-y: -210px; --curve-y: -70px; --d: 0.85s; }
.chaos-num.n5 { top: 460px; left:  25px; --rot: -3deg; --exit-x: 485px; --exit-y: -210px; --curve-y: -80px; --d: 1.10s; }

/* ── Sedge red brand-mark anchor (center → left in Phase 3) ───── */
.chaos-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 80px;
  transform: translate(-50%, -50%);
  z-index: 4;
  will-change: left, transform;
}
.chaos-center-box {
  width: 100%;
  height: 100%;
  background: #F0391A;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(240, 57, 26, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  transform-origin: center;
}
.chaos-center-logo {
  width: 100%;
  max-width: 96px;
  height: auto;
  display: block;
  /* invert the dark lockup to a clean white version */
  filter: brightness(0) invert(1);
}

/* ── Expanded queue card (right side, Phase 4) ────────────────── */
.chaos-queue {
  position: absolute;
  top: 50%;
  right: 2%;
  width: 660px;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  z-index: 4;
  opacity: 0;
  transform: translateY(-50%) translateX(40px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.chaos-queue.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.chaos-queue-head {
  margin-bottom: 8px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid rgba(12,12,11,0.08);
}
.chaos-queue-title {
  font-family: var(--font-display);
  font-size: var(--type-body);
  font-weight: 600;
  color: #0C0C0B;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}
.chaos-queue-sub {
  font-family: var(--font-body);
  font-size: var(--type-micro);
  font-weight: 400;
  color: #5F5E5A;
  margin-top: 4px;
}
.chaos-queue-rows {
  display: flex;
  flex-direction: column;
}
.chaos-queue-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 0.5px solid rgba(12,12,11,0.08);
  opacity: 0;
  transform: translateX(20px);
  max-height: 80px;
  overflow: hidden;
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    max-height 350ms ease,
    padding-top 350ms ease,
    padding-bottom 350ms ease,
    border-bottom-color 350ms ease;
}
.chaos-queue-row:last-child { border-bottom: 0; }
.chaos-queue-row.visible {
  opacity: 1;
  transform: translateX(0);
}
.chaos-queue-row.row-faded { opacity: 0.5; }
.chaos-queue-row.exited {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}

/* New rows: collapsed until .visible reveals them */
.chaos-queue-row-new {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}
.chaos-queue-row-new.visible {
  max-height: 80px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom-color: rgba(12,12,11,0.08);
}
.chaos-queue-row-new.visible:last-child {
  border-bottom-color: transparent;
}

.chaos-queue-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FAF2E5;
  border-radius: 6px;
  color: #0C0C0B;
}
.chaos-queue-icon svg { width: 14px; height: 14px; }
.chaos-queue-label {
  font-family: var(--font-body);
  font-size: var(--type-small);
  line-height: 1.35;
  color: #0C0C0B;
}

/* Approved pill state (set by JS during Phase 4 approvals) */
.pill-mini.approved {
  background: #C7E8D9;
  color: #0A5F4A;
  transition: background-color 300ms ease, color 300ms ease;
}
.pill-mini.approved svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* ── Animation timeline (10s loop, runs only when .playing on canvas) ─── */
@media (prefers-reduced-motion: no-preference) {

  /*
    Phase 1 (0%–20%):    fade in to scattered position (0–2.0s)
    Phase 2 (20%–35%):   curve via midpoint into Sedge center (per-item delay 0–0.91s)
    35%–100%:            hidden until next cycle reset
  */
  @keyframes chaos-flow {
    0%   { opacity: 0; transform: translate(0, -10px) rotate(var(--rot, 0deg)) scale(0.92); }
    5%   { opacity: 1; transform: translate(0, 0) rotate(var(--rot, 0deg)) scale(1); }
    20%  { opacity: 1; transform: translate(0, 0) rotate(var(--rot, 0deg)) scale(1); }
    22%  {
      opacity: 0.85;
      transform:
        translate(
          calc(var(--exit-x, 0px) * 0.55),
          calc(var(--exit-y, 0px) * 0.4 + var(--curve-y, -40px))
        )
        rotate(calc(var(--rot, 0deg) * 0.4))
        scale(0.55);
    }
    24%  { opacity: 0; transform: translate(var(--exit-x, 0px), var(--exit-y, 0px)) rotate(0deg) scale(0); }
    100% { opacity: 0; transform: translate(var(--exit-x, 0px), var(--exit-y, 0px)) rotate(0deg) scale(0); }
  }
  .chaos-canvas.playing .chaos-doc {
    animation: chaos-flow 10s cubic-bezier(.4,.0,.2,1) infinite both;
    animation-delay: var(--d, 0s);
  }
  .chaos-canvas.playing .chaos-num {
    animation: chaos-flow 10s cubic-bezier(.4,.0,.2,1) infinite both;
    animation-delay: var(--d, 0s);
  }

  /* Left-zone tint glows during build, fades during absorb */
  @keyframes chaos-tint-pulse {
    0%, 3%       { opacity: 0; }
    10%          { opacity: 1; }
    20%          { opacity: 1; }
    30%          { opacity: 0; }
    100%         { opacity: 0; }
  }
  .chaos-canvas.playing .chaos-tint {
    animation: chaos-tint-pulse 10s linear infinite both;
  }

  /* Sedge box: hold center 0–3.5s, slide to left-of-card 3.5–4s, hold 4–9s, slide back 9–10s */
  @keyframes chaos-center-flow {
    0%, 35% { left: 50%; transform: translate(-50%, -50%) scale(1); }
    40%     { left: 32%; transform: translate(-50%, -50%) scale(0.8); }
    90%     { left: 32%; transform: translate(-50%, -50%) scale(0.8); }
    100%    { left: 50%; transform: translate(-50%, -50%) scale(1); }
  }
  .chaos-canvas.playing .chaos-center {
    animation: chaos-center-flow 10s ease-in-out infinite both;
  }

  /* Sedge inner box: 6 absorption pulses during Phase 2 (2.0s → 3.5s, ~250ms apart) */
  @keyframes chaos-center-pulse {
    0%, 20% { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 1 (2.0–2.25s) */
    21%     { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    22.5%   { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 2 (2.25–2.5s) */
    23.5%   { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    25%     { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 3 (2.5–2.75s) */
    26%     { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    27.5%   { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 4 (2.75–3.0s) */
    28.5%   { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    30%     { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 5 (3.0–3.25s) */
    31%     { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    32.5%   { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
    /* Pulse 6 (3.25–3.5s) */
    33.5%   { transform: scale(1.05); box-shadow: 0 6px 18px rgba(240,57,26,0.36); }
    35%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(240,57,26,0.20); }
  }
  .chaos-canvas.playing .chaos-center-box {
    animation: chaos-center-pulse 10s ease-in-out infinite both;
  }
}

/* Pause when scrolled offscreen (JS toggles .paused) */
.chaos-canvas.paused * { animation-play-state: paused !important; }

/* ── Reduced-motion: static end state — Sedge on left + queue with 5 review rows ── */
@media (prefers-reduced-motion: reduce) {
  .chaos-doc, .chaos-num, .chaos-tint { display: none; }
  .chaos-center {
    left: 32%;
    transform: translate(-50%, -50%) scale(0.8);
  }
  .chaos-queue {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
  .chaos-queue-row:not(.chaos-queue-row-new) {
    opacity: 1;
    transform: none;
  }
  .chaos-queue-row-new { display: none; }
}

/* ── Mid widths: tighten queue and shift Sedge so the two read as one composition ── */
@media (max-width: 1099px) {
  .chaos-queue { width: 500px; }
}
@media (max-width: 900px) {
  .chaos-queue { width: 420px; }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes chaos-center-flow {
      0%, 35% { left: 50%; transform: translate(-50%, -50%) scale(1); }
      40%     { left: 28%; transform: translate(-50%, -50%) scale(0.8); }
      90%     { left: 28%; transform: translate(-50%, -50%) scale(0.8); }
      100%    { left: 50%; transform: translate(-50%, -50%) scale(1); }
    }
  }
}

/* ── Mobile: chaos grid → Sedge mark → to-do list (stacked, static) ── */
@media (max-width: 760px) {
  /* Canvas is a flex column. Docs are absolutely positioned in the
     reserved top zone; center + queue flow below at full width. */
  .chaos-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    height: auto;
    min-height: 0;
    margin: 16px 0 0;
    overflow: visible;
    padding: 72px 0 0; /* reserve top zone for the absolutely-positioned doc row */
  }
  .chaos-canvas .chaos-num,
  .chaos-canvas .chaos-tint { display: none; }

  /* Hide PO Costco + PDF (markup has 8 docs; we want 6) */
  .chaos-canvas .doc-po,
  .chaos-canvas .doc-pdf { display: none !important; }

  /* All 6 visible chaos docs share the same 50px-tall row at the top of the
     canvas, layered with a small horizontal offset to create an overlapping
     pile (~⅓ the height of the previous 2x3 grid). */
  .chaos-canvas .chaos-doc {
    position: absolute !important;
    top: 4px !important;
    width: 44px !important;
    height: 44px !important;
    opacity: 1;
    animation: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  /* 6 docs at 38px steps, 6px overlap each, so every logo peeks out */
  .chaos-canvas .doc-gmail   { left: calc(50% - 117px) !important; z-index: 1; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }
  .chaos-canvas .doc-drive   { left: calc(50% -  79px) !important; z-index: 2; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }
  .chaos-canvas .doc-bol     { left: calc(50% -  41px) !important; z-index: 3; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }
  .chaos-canvas .doc-sheet   { left: calc(50% -   3px) !important; z-index: 4; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }
  .chaos-canvas .doc-form    { left: calc(50% +  35px) !important; z-index: 5; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }
  .chaos-canvas .doc-dropbox { left: calc(50% +  73px) !important; z-index: 6; transform: translateX(0) rotate(var(--rot, 0deg)) !important; }

  /* Inflate logos so each card reads as just an icon */
  .chaos-canvas .doc-folder { padding: 0; flex-direction: column; }
  .chaos-canvas .doc-folder-icon { width: 28px; height: 28px; margin: 0; }
  .chaos-canvas .doc-folder-label { display: none; }

  /* Mockup-style docs: show only their hero element, hide the body lines */
  .chaos-canvas .doc-bol > *:not(.doc-bol-head) { display: none; }
  .chaos-canvas .doc-bol .doc-bol-head { border-bottom: 0; padding-bottom: 0; margin: 0; gap: 4px; }
  .chaos-canvas .doc-bol .doc-bol-icon { width: 22px; height: 22px; }
  .chaos-canvas .doc-bol .doc-bol-title { display: none; }

  .chaos-canvas .doc-sheet > *:not(.doc-sheet-tab) { display: none; }
  .chaos-canvas .doc-sheet { align-items: flex-start; padding: 6px 0 0 6px; }
  .chaos-canvas .doc-sheet-tab { font-size: 9px; padding: 4px 7px; border-radius: 3px; }

  .chaos-canvas .doc-form > *:not(.doc-form-title) { display: none; }
  .chaos-canvas .doc-form .doc-form-title { font-size: 8px; letter-spacing: 0.5px; border-bottom: 0; padding: 0; margin: 0; text-align: center; line-height: 1.1; }

  /* Sedge mark sits centered below the doc row */
  .chaos-canvas .chaos-center {
    position: static;
    left: auto;
    top: auto;
    transform: none !important;
    width: 100px;
    height: 40px;
    margin: 0;
    align-self: center;
    animation: none !important;
  }
  .chaos-canvas .chaos-center-box {
    width: 100%;
    height: 100%;
    animation: none !important;
  }
  .chaos-canvas .chaos-center-logo { max-width: 68px; }

  /* Queue card sits directly below Sedge, full width */
  .chaos-canvas .chaos-queue {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    opacity: 1;
    transform: none;
    transition: none;
    padding: 14px 14px;
    margin-top: 4px;
  }
  .chaos-canvas .chaos-queue-head { margin-bottom: 4px; padding-bottom: 10px; }
  .chaos-canvas .chaos-queue-row { padding: 10px 0; }

  /* Freeze the to-do list on mobile: even if the JS approval cycle keeps
     running, force every original row to stay fully visible and ignore the
     row-faded / exited classes that would otherwise collapse rows. */
  .chaos-canvas .chaos-queue-row {
    opacity: 1 !important;
    transform: none !important;
    max-height: none !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-bottom-color: rgba(12,12,11,0.08) !important;
  }
  .chaos-canvas .chaos-queue-row.exited {
    display: grid !important;
    opacity: 1 !important;
  }
  /* New (post-approval) rows still hidden on mobile so the list doesn't grow */
  .chaos-canvas .chaos-queue-row-new { display: none !important; }
}

/* ─── Hero — two-column layout (text left, orbital right) ──────── */
.hero-split { text-align: left; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-col-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 640px;
  min-width: 0;
}

/* Pill row at top of left column (eyebrow + social proof, both pills) */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
/* Text block — centered single column */
.hero-text {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-eyebrow {
  margin: 0;
  text-align: center;
}
.hero-eyebrow-dot {
  display: inline-block;
  margin: 0 0.4em;
  letter-spacing: 0;
  opacity: 0.6;
}

/* Headline — single line at desktop, centered */
h1.display.hero-headline {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--type-display);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  max-width: none;
  text-align: center;
  text-wrap: balance;
  white-space: nowrap;
}

/* Subhead — centered, wide enough to keep on one line at desktop */
.hero-subhead {
  margin-top: 16px;
  max-width: 1040px;
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  text-align: center;
}

.hero-cta {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

/* Arc stage — wide & flat ellipse, tight to the CTA */
.hero-arc-stage {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 32px auto 32px;
  height: 240px;
  overflow: hidden;
  /* --arc-flatten controls how squished the circle becomes (1 = full circle, 0.4 = flat) */
  --arc-flatten: 0.45;
  --arc-flatten-inv: 2.222;
}
.hero-arc-stage .orbital-zone {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  --orbit-radius: 440px;
}
/* Arc geometry: orbital center sits at bottom-center of the stage,
   so pills above the center form the visible 180° arc and pills below
   are clipped by the stage's overflow: hidden. */
.hero-arc-stage .orbital-pill {
  top: auto;
  bottom: 0;
}
.hero-arc-stage .orbital-rings {
  /* Square SVG centered on the bottom-center of the stage, then squished
     vertically so the circles render as ellipses matching the pill arc. */
  position: absolute;
  inset: auto;
  top: auto;
  left: 50%;
  bottom: 0;
  width: calc(var(--orbit-radius) * 2.09);
  height: calc(var(--orbit-radius) * 2.09);
  transform: translate(-50%, 50%) scaleY(var(--arc-flatten));
  overflow: visible;
}
.hero-arc-stage .workspace-card {
  top: auto;
  bottom: 0;
  transform: translate(-50%, 0);
}
/* Ring rotation pivots at bottom-center; ring is also flattened to an ellipse. */
.hero-arc-stage .orbital-ring {
  transform-origin: 50% 100%;
}
/* Counter-scale pill content so the visible pill stays normal-shaped while
   sitting inside a vertically-flattened ring. */
.hero-arc-stage .orbital-pill-content {
  transform: scaleY(var(--arc-flatten-inv));
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  /* Replace the circular ring spin with a flattened ellipse spin. */
  @keyframes arc-orbital-ring-spin {
    from { transform: scaleY(var(--arc-flatten)) rotate(0deg); }
    to   { transform: scaleY(var(--arc-flatten)) rotate(360deg); }
  }
  .hero-arc-stage .orbital-ring {
    animation: arc-orbital-ring-spin 60s linear infinite;
  }

  /* Pulse keyframe that preserves the scaleY counter on pill content. */
  @keyframes arc-orbital-pill-pulse {
    0%   { transform: scaleY(var(--arc-flatten-inv)) scale(1);    border-color: rgba(12,12,11,0.15); }
    30%  { transform: scaleY(var(--arc-flatten-inv)) scale(1.05); border-color: #F0391A; }
    100% { transform: scaleY(var(--arc-flatten-inv)) scale(1);    border-color: rgba(12,12,11,0.15); }
  }
  .hero-arc-stage .orbital-pill.active .orbital-pill-content {
    animation: arc-orbital-pill-pulse 600ms ease-in-out;
  }

  @keyframes arc-workspace-breathe {
    0%, 100% { transform: translate(-50%, 0) scale(1); }
    50%      { transform: translate(-50%, 0) scale(1.005); }
  }
  .hero-arc-stage .workspace-card {
    animation: arc-workspace-breathe 4s ease-in-out infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-arc-stage .orbital-ring { transform: scaleY(var(--arc-flatten)); }
  .hero-arc-stage .workspace-card { animation: none !important; }
}

.hero-sedge {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-style: normal;
  letter-spacing: -0.025em;
}

/* Generic .hero-anim base */
.hero-anim {
  position: relative;
  min-width: 0;
}

/* Responsive: tablet + mobile */
@media (max-width: 1024px) {
  .hero-text { max-width: 600px; }
  h1.display.hero-headline { font-size: 52px; letter-spacing: -0.025em; white-space: normal; }
  .hero-subhead { font-size: var(--type-body); max-width: 480px; }
  .hero-arc-stage { max-width: 880px; height: 240px; margin: 40px auto 32px; }
  .hero-arc-stage .orbital-zone { --orbit-radius: 360px; }
}
@media (max-width: 760px) {
  .sec.hero-arc { padding: 24px 20px 0 !important; }
  .hero-text { max-width: 100%; }
  .hero-eyebrow { font-size: 11px; letter-spacing: 0.1em; }
  h1.display.hero-headline { font-size: 36px !important; line-height: 1.1; letter-spacing: -0.025em; white-space: normal; margin-top: 12px; }
  .hero-subhead { font-size: 15px !important; line-height: 1.5 !important; max-width: none; margin-top: 12px; }
  .hero-cta { margin-top: 20px; }
  /* Horizontal split on mobile: Sedge workspace card on the left,
     vertical list of workflow pills on the right, with a connector line. */
  .hero-arc-stage {
    max-width: 100%;
    height: auto;
    margin: 40px auto 24px;
    overflow: visible;
    padding: 0;
  }
  .hero-arc-stage .orbital-zone {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
    --orbit-radius: 0px;
  }
  /* Hide the SVG concentric arcs — replaced with the horizontal connector */
  .hero-arc-stage .orbital-rings { display: none; }

  /* Workspace card on the LEFT, fixed compact size */
  .hero-arc-stage .workspace-card {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    flex: 0 0 auto;
    width: 120px;
    padding: 12px 14px;
    gap: 6px;
    border-radius: 12px;
    transform: none !important;
    animation: none !important;
    order: 1;
  }
  .hero-arc-stage .workspace-mark { width: 60px; height: 26px; padding: 0 8px; border-radius: 6px; }
  .hero-arc-stage .workspace-sub { font-size: 10px; }

  /* Vertical pill list on the RIGHT with a dashed connector line on its left */
  .hero-arc-stage .orbital-ring {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    overflow: visible;
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 14px;
    /* Freeze rotation + remove the arc scaleY */
    animation: none !important;
    transform: none !important;
  }
  /* Dashed connector line from Sedge card into the pill list */
  .hero-arc-stage .orbital-ring::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 50%;
    width: 26px;
    height: 1.5px;
    background-image: linear-gradient(to right, rgba(12,12,11,0.22) 50%, transparent 50%);
    background-size: 6px 1.5px;
    background-repeat: repeat-x;
    transform: translateY(-50%);
  }

  /* Pills: static, full width of the right column */
  .hero-arc-stage .orbital-pill {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none !important;
    width: 100%;
  }
  .hero-arc-stage .orbital-pill-counter {
    animation: none !important;
    transform: none !important;
    display: block;
    width: 100%;
  }
  .hero-arc-stage .orbital-pill-content {
    padding: 6px 10px;
    font-size: 11px;
    width: 100%;
    justify-content: flex-start;
    /* Cancel the arc-layout's scaleY(2.222) counter-scale so the pill
       renders at its natural height in the vertical list */
    transform: none !important;
    animation: none !important;
  }
  .hero-arc-stage .orbital-pill-icon { width: 13px; height: 13px; }

  /* Show 6 of 8 pills in the vertical list (drop specs + followup) */
  .hero-arc-stage .orbital-pill { display: block; --angle: 0deg !important; }
  .hero-arc-stage .orbital-pill[data-task="specs"],
  .hero-arc-stage .orbital-pill[data-task="followup"] { display: none; }
}

/* Orbital zone — generic fallback */
.orbital-zone {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 480px;
  --orbit-radius: 220px;
}

/* Background concentric circles (static, very faint) */
.orbital-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.orbital-rings circle {
  fill: none;
  stroke: rgba(12,12,11,0.06);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Rotating ring containing 8 task pills */
.orbital-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Each pill is anchored at the center of the zone, then translated outward at its angle */
.orbital-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(calc(-1 * var(--orbit-radius)));
}

/* The counter element rotates opposite to the ring to keep the pill upright. */
.orbital-pill-counter {
  display: inline-block;
  transform: rotate(calc(-1 * var(--angle, 0deg)));
}

/* Visual pill (the rounded rectangle the broker actually reads) */
.orbital-pill-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.15);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 500;
  color: #0C0C0B;
  letter-spacing: -0.01em;
  transform-origin: center;
}
.orbital-pill-icon {
  width: 16px;
  height: 16px;
  color: #5F5E5A;
  flex-shrink: 0;
}
.orbital-pill-label { line-height: 1.1; }

/* Center workspace anchor (logo + "Your workspace" subtitle, no queue) */
.workspace-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  background: #FFFFFF;
  border: 0.5px solid rgba(12,12,11,0.12);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.workspace-mark {
  width: 96px;
  height: 40px;
  background: #F0391A;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  box-shadow: 0 4px 12px rgba(240,57,26,0.20);
}
.workspace-mark img {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.workspace-sub {
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: 400;
  color: #5F5E5A;
  letter-spacing: 0.01em;
}

/* ── Animations (only when motion is allowed) ───────────────── */
@media (prefers-reduced-motion: no-preference) {
  /* Layer 1: ring orbital drift — single 60s rotation on the ring */
  @keyframes orbital-ring-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
  }
  .orbital-ring {
    animation: orbital-ring-spin 60s linear infinite;
    transform-origin: center;
  }

  /* Per-pill counter-rotation so the pill always stays upright in page-space.
     Each pill carries its own --angle; this keyframe references it so the
     counter starts at -angle and goes to -360deg-angle, exactly cancelling
     the ring rotation + the pill's local rotation. */
  @keyframes orbital-pill-counter-spin {
    from { transform: rotate(calc(-1 * var(--angle, 0deg))); }
    to   { transform: rotate(calc(-1 * var(--angle, 0deg) - 360deg)); }
  }
  .orbital-pill-counter {
    animation: orbital-pill-counter-spin 60s linear infinite;
    transform-origin: center;
  }

  /* Layer 2: activation pulse (JS toggles .active on .orbital-pill) */
  @keyframes orbital-pill-pulse {
    0%   { transform: scale(1); border-color: rgba(12,12,11,0.15); }
    30%  { transform: scale(1.05); border-color: #F0391A; }
    100% { transform: scale(1); border-color: rgba(12,12,11,0.15); }
  }
  .orbital-pill.active .orbital-pill-content {
    animation: orbital-pill-pulse 600ms ease-in-out;
    border-color: #F0391A;
  }
  @keyframes orbital-pill-icon-pulse {
    0%, 100% { color: #5F5E5A; }
    30%      { color: #F0391A; }
  }
  .orbital-pill.active .orbital-pill-icon {
    animation: orbital-pill-icon-pulse 600ms ease-in-out;
  }

  /* Layer 3: center card breathing */
  @keyframes workspace-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%      { transform: translate(-50%, -50%) scale(1.005); }
  }
  .workspace-card { animation: workspace-breathe 4s ease-in-out infinite; }
}

/* Reduced motion: full static composition, no animations */
@media (prefers-reduced-motion: reduce) {
  .orbital-ring,
  .orbital-pill-counter,
  .workspace-card,
  .orbital-pill-content { animation: none !important; }
}

/* When the hero scrolls offscreen, JS sets .paused */
.hero-anim.paused .orbital-ring,
.hero-anim.paused .orbital-pill-counter,
.hero-anim.paused .workspace-card,
.hero-anim.paused .orbital-pill-content { animation-play-state: paused !important; }

/* (Legacy hero tablet/mobile rules removed — arc layout has its own.) */

/* ─── Dark section adaptations (old way + What Sedge does) ──────── */
.sec.dark { background: #0C0C0B; color: #F5F5F2; border-bottom: none; }

/* Eyebrow + headline + subhead colors on dark */
.sec.dark .label { color: #F5DEC8; }
.sec.dark .section-title { color: #F5F5F2; }
.sec.dark p.lede,
.sec.dark p.body-lg { color: #C8C7C2; }

/* Mockup cards (inputs/agents/dashboards) keep light surfaces but soften the borders */
.sec.dark .ws-input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.10);
  color: #E8E7E2;
}
.sec.dark .ws-input-icon { color: #F5DEC8; }
.sec.dark .ws-connector { background: rgba(255,255,255,0.12); }
.sec.dark .ws-agents-card {
  background: #FFFFFF;
  color: #0C0C0B;
  border-color: rgba(255,255,255,0.08);
}
.sec.dark .ps-dash {
  background: #FFFFFF;
  color: #0C0C0B;
  border-color: rgba(255,255,255,0.08);
}

/* ─── Mobile module fits — "What you can do with Sedge" panels ─── */
@media (max-width: 760px) {
  /* Layout: sidebar (horizontal scroll) above content */
  .ws-layout { gap: 24px; }
  .ws-sidebar { padding-bottom: 8px; }
  .ws-side-item {
    padding: 10px 14px;
    font-size: 14px;
    column-gap: 8px;
    border-radius: 999px;
    white-space: nowrap;
  }
  .ws-side-icon { width: 16px; height: 16px; }

  /* Tighter What-you-can-do section header on mobile — kill the inline
     24px / 24px / 64px margins so the title/subtitle and the content
     below them don't have a chasm between them. */
  .ws-layout[style] { margin-top: 28px !important; }
  .container > .label + .section-title[style] { margin-top: 10px !important; }
  .container > .section-title + .lede[style] { margin-top: 10px !important; font-size: var(--type-body) !important; line-height: 1.45 !important; }

  /* Inputs row: extra-compact 2-column grid on mobile. Title-only chips
     with tight padding so the whole How it works section fits in one
     mobile viewport. */
  .ws-inputs.ws-inputs-3,
  .ws-inputs.ws-inputs-4 {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .ws-input.ws-input-stack {
    padding: 6px 8px;
    min-height: 0;
    gap: 6px;
    align-items: center;
    border-radius: 6px;
  }
  .ws-input.ws-input-stack .ws-input-icon { width: 12px; height: 12px; }
  .ws-input.ws-input-stack .ws-input-name { font-size: 11px; line-height: 1.2; }
  /* Drop the subtitle so the pills are tight title-only chips */
  .ws-input.ws-input-stack .ws-input-sub { display: none; }

  /* Re-enable the connector funnel from inputs down to the workflow card,
     but render it very short for the compact grid */
  .ws-input-funnel { display: block; height: 16px; margin: 2px 0 -4px; }
  .ws-input-funnel svg { width: 100%; height: 100%; }

  /* Tighten the "How it works" heading + the gap below the description */
  .ws-section-label { margin: 0 0 12px; }
  .ps-description { margin-bottom: 12px; }

  /* Description fits the column */
  .ps-description { font-size: 15px; line-height: 1.55; }

  /* "How it works" section heading sits flush left, smaller gap */
  .ws-section-label { margin: 0 0 16px; font-size: 13px; }

  /* Workflow card */
  .ws-agents-card { padding: 14px; }
  .ws-agents-head { margin-bottom: 12px; }
  .agent-card { min-width: 132px; padding: 10px; gap: 8px; }
  .agent-name { font-size: var(--type-micro); }

  /* Dashboard card padding */
  .ps-dash { padding: 14px; }
  .ps-dash-head--row { flex-wrap: wrap; gap: 10px; }
  .ps-dash-counter { font-size: var(--type-micro); }
  .ps-dash-search { max-width: 100%; }

  /* PO Processing 6-col table: keep Order #, Retailer, Status only on mobile */
  .ps-table.ps-table-6col .ps-tr {
    grid-template-columns: minmax(0, 70px) minmax(0, 1fr) minmax(80px, auto);
    gap: 10px;
    font-size: var(--type-micro);
  }
  .ps-table.ps-table-6col .ps-tr > *:nth-child(1),
  .ps-table.ps-table-6col .ps-tr > *:nth-child(4),
  .ps-table.ps-table-6col .ps-tr > *:nth-child(5) { display: none; }
  .ps-table.ps-table-6col .ps-tr-head { font-size: 10px; }

  /* Kanban: single column on small screens */
  /* Retailer kanban — horizontal scroll, 4 cols at fixed width */
  .ps-kanban.ps-kanban-v2 {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 240px;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .ps-kanban.ps-kanban-v2 .ps-kanban-col { scroll-snap-align: start; }
  .ps-kanban-card { padding: 12px; }
  .ps-kanban-store { font-size: 13px; }

  /* Trade-spend gauge rows */
  .ps-gauge-row {
    grid-template-columns: 100px minmax(0, 1fr) auto;
    gap: 8px;
    font-size: var(--type-micro);
  }
  .ps-hero-num { font-size: var(--type-section-sm) !important; }

  /* For-brokers wrapper inside Commissions panel (if present) */
  .ps-for-brokers-wrap { margin-bottom: 10px; }
}
