:root {
  --paper: #f4f0e8;
  --paper-warm: #ece6d8;
  --paper-deep: #e1d9c6;
  --card: #fbf8f1;
  --ink: #0e2742;
  --ink-soft: #1a3a5c;
  --ink-mid: #34466a;
  --line: #d6cdb8;
  --line-soft: #e2dac6;
  --text: #1c1f29;
  --text-mid: #46505f;
  --text-soft: #6a7484;
  --copper: #b85a31;
  --copper-deep: #8d4322;
  --copper-soft: #e8c9b6;
  --amber: #d9a441;
  --amber-dark: #8a6418;
  --amber-soft: #f3e3bd;
  --on-dark: #e9e4d6;
  --on-dark-soft: #b9b39f;
  --slab-ap: #5c3a24;
  --slab-vco: #14343f;
  --slab-plan: #143028;
  --slab-geo: #3a2a4a;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gut: calc(max(0px, (100vw - 1180px)/2) + 26px);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(14, 39, 66, 0.014) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px
  );
}
a {
  color: var(--copper);
  text-decoration: none;
}
a:hover {
  color: var(--copper-deep);
}
::selection {
  background: var(--copper-soft);
  color: var(--ink);
}
input,
select,
button {
  font-family: inherit;
}
[data-btn="primary"]:hover {
  background: var(--copper-deep);
}
[data-btn="ghost"]:hover {
  border-color: var(--copper);
  color: var(--copper-deep);
}
[data-navlink]:hover {
  color: var(--copper);
}
[data-navlink][data-active] {
  color: var(--copper-deep) !important;
  box-shadow: inset 0 -2px 0 var(--copper);
}
[data-chip]:hover {
  border-color: var(--copper-soft);
}
[data-prod]:hover {
  box-shadow: 0 2px 10px rgba(14, 39, 66, 0.08);
}
[data-plink]:hover {
  border-color: var(--copper);
  background: #fff;
}
[data-play]:hover {
  background: rgba(217, 164, 65, 0.14);
}
@media (max-width: 900px) {
  [data-split] {
    grid-template-columns: 1fr !important;
  }
  [data-half="tactical"] {
    border-left: 0 !important;
    border-top: 1px solid var(--line) !important;
  }
  [data-half] {
    padding-left: 26px !important;
    padding-right: 26px !important;
  }
  [data-accessgrid] {
    grid-template-columns: 1fr !important;
  }
  [data-claims] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 520px) {
  [data-hflow] {
    padding-left: 13px !important;
    padding-right: 13px !important;
  }
  [data-tiles] {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  [data-tiles] > * {
    min-width: 0 !important;
    flex: 1 1 88px !important;
  }
  #video a,
  #evidence a,
  #offices a,
  footer a,
  a[href^="mailto:"] {
    display: inline-block;
    padding: 7px 0;
  }
}
@media (max-width: 760px) {
  [data-navlinks] {
    display: none !important;
  }
  section {
    padding: 56px 0 !important;
  }
}
[data-reveal] {
  opacity: 1;
  transform: none;
}
[data-reveal][data-on] {
  opacity: 1;
  transform: none;
}
[data-bad] {
  border-color: var(--copper) !important;
  background: #fdf1ea !important;
}
nav[data-scrolled="1"] {
  box-shadow:
    0 1px 0 rgba(14, 39, 66, 0.05),
    0 10px 22px -18px rgba(14, 39, 66, 0.45);
}
@keyframes bbFade {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bbDraw {
  from {
    transform: scaleX(0.02);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes bbGrow {
  from {
    transform: scaleY(0.06);
  }
  to {
    transform: scaleY(1);
  }
}
@keyframes bbPick {
  0% {
    background: #9ba5b4;
    height: 2.5px;
  }
  55% {
    background: #9ba5b4;
    height: 2.5px;
  }
  100% {
    background: var(--copper);
    height: 4px;
  }
}
[data-seq][data-on] [data-a="fade"] {
  animation: bbFade 0.25s var(--d, 0s) cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
[data-seq][data-on] [data-a="draw"] {
  transform-origin: left center;
  animation: bbDraw 0.25s var(--d, 0s) cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
[data-seq][data-on] [data-a="grow"] {
  transform-origin: bottom center;
  animation: bbGrow 0.28s var(--d, 0s) cubic-bezier(0.25, 0.7, 0.2, 1) both;
}
[data-seq][data-on] [data-a="pick"] {
  transform-origin: left center;
  animation:
    bbDraw 0.25s 0.84s cubic-bezier(0.25, 0.7, 0.2, 1) both,
    bbPick 0.45s 1.2s ease both;
}
html[data-vis="0"] [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html[data-vis="0"] [data-seq] [data-a] {
  animation: none !important;
}
@media print {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
@keyframes bbSoft {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transform: translateY(9px);
    transition:
      opacity 0.6s linear,
      transform 0.6s linear;
  }
  [data-seq][data-on] [data-a] {
    animation-name: bbSoft !important;
    animation-timing-function: linear !important;
    animation-duration: 0.4s !important;
  }
}

/* mobile footer: stack and centre everything (desktop untouched) */
@media (max-width: 640px) {
  .site-footer .f-wrap {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 20px !important;
  }
  .site-footer .f-left {
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    gap: 12px !important;
  }
  .site-footer .f-left > div {
    justify-content: center !important;
    max-width: none !important;
  }
  .site-footer .f-right {
    align-items: center !important;
    margin-top: 0 !important;
  }
  .site-footer .f-spacer {
    display: none !important;
  }
}

/* ---- mobile: reflow the wide diagrams instead of scrolling them ---- */
@media (max-width: 900px) {
  [data-scroll="flow"],
  [data-scroll="agents"] {
    overflow-x: visible !important;
  }

  /* hero flow: nested grids collapse to a single column, tightly spaced */
  [data-legend] {
    white-space: normal !important;
    flex-wrap: wrap !important;
    column-gap: 6px !important;
    row-gap: 0 !important;
  }
  [data-eyebrow="product"] {
    font-size: 10px !important;
    letter-spacing: 0.045em !important;
    line-height: 1.3 !important;
  }
  [data-eyebrow="aud"] {
    font-size: 9.5px !important;
    letter-spacing: 0.06em !important;
    line-height: 1.3 !important;
  }
  [data-flow="outer"] {
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
    gap: 9px !important;
    padding: 0 !important;
  }
  [data-flow="inner"] {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding: 13px !important;
  }
  [data-flow="inner"] > div > div:first-child {
    margin-bottom: 6px !important;
  }
  /* connectors become short vertical ticks rather than wide sideways arrows */
  [data-flow="conn"] {
    padding-top: 0 !important;
    height: auto !important;
    padding: 3px 0 !important;
  }

  /* fixed desktop slots stop reserving space */
  [data-flow="inner"] [data-fig] {
    height: auto !important;
    flex: none !important;
  }
  [data-flow="inner"] [data-col] {
    height: auto !important;
    display: block !important;
  }
  [data-flow="inner"] [data-bars] {
    height: 56px !important;
  }
  [data-flow="inner"] [style*="width:110px"] {
    width: 100% !important;
  }

  /* 04 card: each agent keeps its own label, stacked as label+block pairs.
     head and body are separate grids, so flatten both with display:contents
     and interleave with order, otherwise the two labels bunch together. */
  [data-agentcard="card"] {
    display: flex !important;
    flex-direction: column !important;
  }
  [data-agentcard="head"],
  [data-agentcard="body"] {
    display: contents !important;
  }
  [data-agentcard="head"] > *:nth-child(1) {
    order: 1;
    margin-bottom: 7px;
  }
  [data-agentcard="body"] > *:nth-child(1) {
    order: 2;
    margin-bottom: 14px;
  }
  [data-agentcard="head"] > *:nth-child(2) {
    order: 3;
    margin-bottom: 7px;
  }
  [data-agentcard="body"] > *:nth-child(2) {
    order: 4;
  }

  /* how the agents work: keep only the chat pane on mobile */
  [data-agents="row"] {
    min-width: 0 !important;
    flex-direction: column !important;
  }
  [data-agents="pane"] {
    width: 100% !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
  }
  [data-agents="conn"] {
    display: none !important;
  }
  [data-agents="app"] {
    display: flex !important;
    width: 100% !important;
    margin-top: 12px;
  }
}

/* screenshots cannot reflow (absolutely positioned mock); make the scroll obvious */
[data-shots] {
  position: relative;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 900px) {
  [data-shots] {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 0,
      #000 88%,
      transparent 100%
    );
    mask-image: linear-gradient(to right, #000 0, #000 88%, transparent 100%);
  }
  [data-shots-hint] {
    display: block !important;
  }
}
[data-shots-hint] {
  display: none;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 8px;
  text-align: center;
}

/* submit confirmation: a transient corner toast, never a permanent banner.
   Shown only when /api/submit sends the browser back with ?sent=1. */
#sent-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: min(340px, calc(100vw - 32px));
  background: #eef4ee;
  border: 1px solid #9db9a4;
  border-left: 3px solid #2f5d40;
  border-radius: 9px;
  padding: 14px 15px 14px 16px;
  box-shadow: 0 8px 26px rgba(14, 39, 66, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0.3s;
}
#sent-toast[data-on] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s;
}
#sent-toast [data-toast-close] {
  flex: 0 0 auto;
  margin: -4px -4px 0 2px;
  padding: 2px 6px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
#sent-toast [data-toast-close]:hover {
  color: var(--ink);
  background: rgba(47, 93, 64, 0.1);
}
@media (max-width: 640px) {
  #sent-toast {
    right: 14px;
    left: 14px;
    bottom: 14px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #sent-toast {
    transition: none;
  }
  #sent-toast[data-on] {
    transition: none;
  }
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 26px;
}
.new-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-row > a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-row > a svg {
  width: 28px;
  height: 28px;
}
#site-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}
#site-menu > a {
  font-size: 14px;
  color: var(--ink);
}
.menu-toggle {
  display: none;
}
.button {
  display: inline-flex;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--copper);
  color: #fff !important;
  border: 1px solid var(--copper-deep);
  font-weight: 600;
}
.button.secondary {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}
.intro {
  padding: 74px 0 60px;
  border-bottom: 1px solid var(--line);
}
.intro h1 {
  max-width: 18ch;
  font-size: clamp(38px, 4.5vw, 60px);
  line-height: 1.07;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 18px 0 22px;
}
.intro p {
  max-width: 60ch;
  color: var(--text-mid);
  font-size: 18px;
  line-height: 1.6;
}
.eyebrow {
  font: 600 11px var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copper-deep);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.workflow-card {
  padding: 28px;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 12px;
}
.workflow-card h2 {
  font-size: 24px;
  margin: 10px 0 24px;
}
.workflow-card ol {
  padding-left: 24px;
  display: grid;
  gap: 20px;
}
.workflow-card li {
  padding-left: 8px;
}
.workflow-card small {
  display: block;
  color: var(--on-dark-soft);
  margin-top: 5px;
  line-height: 1.5;
}
.workflow-card .eyebrow {
  color: var(--copper-soft);
}
.new-section {
  padding: 58px 0;
  border-bottom: 1px solid var(--line);
}
.new-section h2 {
  font-size: 32px;
  line-height: 1.15;
  color: var(--ink);
  margin: 14px 0 22px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.new-card {
  padding: 25px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
}
.new-card h3 {
  font-size: 19px;
  color: var(--ink);
  margin: 12px 0;
}
.new-card p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
}
.new-card a {
  color: var(--copper-deep);
  font-weight: 600;
}
.new-card ul {
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.8;
}
.form-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
.field.wide {
  grid-column: 1/-1;
}
.field input,
.field select,
.field textarea {
  font: 400 15px var(--sans);
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.field textarea {
  min-height: 88px;
  resize: vertical;
}
.form-error {
  margin: 14px 0;
  color: var(--copper-deep);
  font-size: 14px;
}
.form-help {
  font-size: 13px !important;
  margin: 15px 0 !important;
}
.honeypot {
  position: absolute;
  left: -10000px;
}
.confirmation {
  padding: 24px;
  background: #edf2e9;
  border: 1px solid #a0b39a;
  border-radius: 8px;
  margin: 0 0 26px;
}
.confirmation h2 {
  font-size: 24px;
}
.new-card form .button {
  width: 100%;
  margin-top: 17px;
  font-size: 15px;
  cursor: pointer;
}
input[aria-invalid="true"] {
  border-color: var(--copper-deep);
}
:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 4px;
}
section[id],
div[id] {
  scroll-margin-top: 96px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.video-grid video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--ink);
}
.video-grid figure {
  margin: 0;
}
.video-grid figcaption {
  padding: 16px 0;
  color: var(--ink);
}
@media (max-width: 900px) {
  #site-menu {
    gap: 15px;
  }
  #site-menu > a {
    font-size: 12px;
  }
  .hero-grid {
    gap: 24px;
  }
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .wrap {
    padding: 0 20px;
  }
  .intro {
    padding: 42px 0;
  }
  .intro h1 {
    font-size: 39px;
  }
  .hero-grid,
  .form-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }
  .menu-toggle {
    display: block;
    margin-left: auto;
    padding: 9px 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 5px;
    font: inherit;
    color: var(--ink);
  }
  #site-menu {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    padding: 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  #site-menu.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    gap: 20px;
  }
  #site-menu > a {
    font-size: 15px;
  }
  .form-fields {
    gap: 12px;
  }
  .new-section {
    padding: 40px 0;
  }
  .workflow-card {
    padding: 24px;
  }
  .new-card {
    padding: 22px;
  }
  .field {
    font-size: 12px;
  }
}

.skip {
  position: absolute;
  left: -10000px;
  top: 0;
  padding: 12px;
  background: var(--card);
  z-index: 200;
}
.skip:focus {
  left: 12px;
  top: 12px;
}
