/* Arachne Actions + Agent Journey marketing pages
   Dependency-free; all page styles scoped to .ap-page. */

.ap-page {
  --ap-bg: var(--canvas, #f7f8fa);
  --ap-panel: var(--card, #ffffff);
  --ap-ink: var(--ink, #141414);
  --ap-muted: var(--muted, #667085);
  --ap-muted-2: #9a9d96;
  --ap-line: var(--line, #e7e8ec);
  --ap-line-strong: #d7d9e0;
  --ap-accent: var(--violet, #6957e8);
  --ap-accent-deep: #5f46e6;
  --ap-accent-soft: var(--violet-soft, #f0eeff);
  --ap-green: var(--green, #17875d);
  --ap-green-soft: var(--green-soft, #eaf8f2);
  --ap-amber: #a56a18;
  --ap-amber-soft: #fff4df;
  --ap-red: #c45151;
  --ap-red-soft: #fff0f0;
  --ap-dark: #181916;
  --ap-radius: 18px;
  --ap-shadow: 0 24px 70px rgba(25,26,23,.08);

  color: var(--ap-ink);
  background: #fff;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: clip;
}

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

.ap-page button,
.ap-page input { font: inherit; }

.ap-page button,
.ap-page a { -webkit-tap-highlight-color: transparent; }

.ap-wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.ap-hero {
  padding: 110px 0 78px;
  background:
    radial-gradient(circle at 50% -20%, rgba(114,87,245,.10), transparent 34%),
    linear-gradient(#fff, #fbfbf9);
  border-bottom: 1px solid var(--ap-line);
}

.ap-hero__inner { text-align: center; }

.ap-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--ap-line-strong);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 2px 8px rgba(28,29,26,.06);
  color: #4d504a;
  font-size: 12px;
  font-weight: 670;
}

.ap-badge__spark { color: var(--ap-muted-2); }

.ap-badge--soft {
  background: var(--ap-bg);
  box-shadow: none;
}

.ap-hero h1 {
  max-width: 980px;
  margin: 26px auto 0;
  font-size: clamp(52px, 7vw, 92px);
  line-height: .95;
  letter-spacing: -.065em;
  font-weight: 690;
}

.ap-hero h1 span { color: var(--ap-accent); }

.ap-hero__lede {
  max-width: 720px;
  margin: 28px auto 0;
  color: var(--ap-muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.ap-hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ap-btn--primary {
  background: var(--ap-dark);
  color: white;
  box-shadow: 0 10px 28px rgba(20,20,18,.12);
}

.ap-btn--ghost {
  background: white;
  border-color: var(--ap-line-strong);
  color: var(--ap-ink);
}

.ap-btn--small { min-height: 38px; padding-inline: 13px; font-size: 11px; }

@media (hover:hover) and (pointer:fine) {
  .ap-btn:hover { transform: translateY(-1px); }
  .ap-btn--primary:hover { box-shadow: 0 14px 32px rgba(20,20,18,.16); }
  .ap-btn--ghost:hover { border-color: #c6c9c1; }
}

.ap-hero__note {
  margin: 21px auto 0;
  color: var(--ap-muted-2);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .055em;
}

.ap-section { padding: 96px 0; }
.ap-section--tight { padding-top: 82px; }
.ap-section--split { background: var(--ap-bg); border-block: 1px solid var(--ap-line); }

.ap-section-head { max-width: 780px; margin-bottom: 34px; }
.ap-section-head--center { margin-inline: auto; text-align: center; }

.ap-section-head h2,
.ap-copy-block h2,
.ap-cta-card h2 {
  margin: 18px 0 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.055em;
  font-weight: 670;
}

.ap-section-head p,
.ap-copy-block p,
.ap-cta-card p {
  margin: 16px 0 0;
  color: var(--ap-muted);
  font-size: 16px;
  line-height: 1.65;
}

.ap-product-demo {
  overflow: hidden;
  border: 1px solid var(--ap-line-strong);
  border-radius: 24px;
  background: var(--ap-bg);
  box-shadow: var(--ap-shadow);
}

.ap-demo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 13px 18px;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid var(--ap-line);
}

.ap-demo-topbar > div:first-child { display: grid; gap: 3px; }
.ap-demo-topbar strong { font-size: 12px; }
.ap-demo-kicker,
.ap-inspector__eyebrow,
.ap-detail-label {
  color: var(--ap-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.ap-example-label {
  color: var(--ap-muted-2);
  font-size: 9px;
  font-weight: 590;
}

.ap-scenario-switch,
.ap-view-switch,
.ap-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: #eeefeb;
}

.ap-scenario-switch button,
.ap-view-switch button,
.ap-filter-row button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ap-muted);
  font-size: 10px;
  font-weight: 690;
  cursor: pointer;
}

.ap-scenario-switch button.is-active,
.ap-view-switch button.is-active,
.ap-filter-row button.is-active {
  background: white;
  color: var(--ap-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

/* JOURNEY */
.ap-stage-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  background: #f7f7f5;
  border-bottom: 1px solid var(--ap-line);
}

.ap-stage-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 142px;
  padding: 22px 14px 16px;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  border: 0;
  border-right: 1px solid var(--ap-line);
  background: transparent;
  color: var(--ap-muted);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.ap-stage-card:last-child { border-right: 0; }

.ap-stage-card__rail {
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: transparent;
  transition: background 140ms ease;
}

.ap-stage-card__icon {
  color: var(--ap-muted-2);
  font-size: 16px;
}

.ap-stage-card__name {
  margin-top: 3px;
  color: currentColor;
  font-size: 10px;
  font-weight: 790;
  letter-spacing: .04em;
}

.ap-stage-card__question {
  max-width: 130px;
  color: var(--ap-muted-2);
  font-size: 10px;
  line-height: 1.35;
}

.ap-stage-card__status {
  margin-top: auto;
  font-size: 9px;
  font-weight: 720;
}

.ap-stage-card.is-active {
  background: white;
  color: var(--ap-ink);
  box-shadow: 0 6px 20px rgba(20,20,18,.04);
}

.ap-stage-card.is-active .ap-stage-card__rail { background: var(--ap-accent); }
.ap-stage-card[data-status="pass"] .ap-stage-card__status { color: var(--ap-green); }
.ap-stage-card[data-status="partial"] .ap-stage-card__status { color: var(--ap-amber); }
.ap-stage-card[data-status="fail"] .ap-stage-card__status { color: var(--ap-red); }
.ap-stage-card[data-status="blocked"] .ap-stage-card__status { color: var(--ap-accent); }

.ap-journey-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr);
  min-height: 430px;
}

.ap-agent-example {
  min-width: 0;
  padding: 20px 22px 28px;
  background:
    linear-gradient(rgba(255,255,255,.82), rgba(255,255,255,.82)),
    radial-gradient(circle at 50% 10%, rgba(114,87,245,.08), transparent 45%);
  border-right: 1px solid var(--ap-line);
}

.ap-agent-example__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.ap-model-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ap-muted);
  font-size: 10px;
  font-weight: 650;
}

.ap-model-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ap-green);
  box-shadow: 0 0 0 4px var(--ap-green-soft);
}

.ap-user-bubble {
  width: fit-content;
  max-width: min(470px, 74%);
  margin: 28px 0 18px auto;
  padding: 12px 14px;
  border: 1px solid var(--ap-line);
  border-radius: 13px;
  background: #fafaf8;
  color: #555952;
  font-size: 12px;
  line-height: 1.45;
}

.ap-assistant-row {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.ap-agent-avatar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--ap-dark);
  color: white;
  font-size: 10px;
  font-weight: 790;
}

.ap-assistant-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--ap-line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 14px 34px rgba(25,26,23,.06);
}

.ap-assistant-card__copy {
  color: #555951;
  font-size: 12px;
  line-height: 1.72;
}

.ap-assistant-card__copy p { margin: 0 0 12px; }
.ap-assistant-card__copy p:last-child { margin-bottom: 0; }

.ap-evidence-mark {
  position: relative;
  display: inline;
  padding: 1px 2px;
  border-radius: 3px;
  background: transparent;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  cursor: pointer;
}

.ap-evidence-mark.is-selected {
  background: var(--ap-accent-soft);
  color: var(--ap-accent-deep);
  box-shadow: inset 0 -1px 0 rgba(114,87,245,.3);
}

.ap-evidence-mark[data-state="positive"].is-selected {
  background: #dff5e9;
  color: #116945;
  box-shadow: inset 0 -1px 0 rgba(22,132,91,.26);
}

.ap-evidence-mark[data-state="negative"].is-selected {
  background: var(--ap-red-soft);
  color: var(--ap-red);
  box-shadow: inset 0 -1px 0 rgba(196,81,81,.26);
}

.ap-trace-receipt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--ap-line);
  border-radius: 9px;
  background: var(--ap-line);
}

.ap-trace-receipt > div {
  padding: 9px 10px;
  background: #fafaf8;
}

.ap-trace-receipt span {
  display: block;
  color: var(--ap-muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ap-trace-receipt strong {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.ap-good { color: var(--ap-green); }
.ap-bad { color: var(--ap-red); }
.ap-warn { color: var(--ap-amber); }

.ap-inspector {
  padding: 22px 20px;
  background: #fbfbf9;
}

.ap-inspector__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ap-inspector h3,
.ap-action-detail h3,
.ap-capability-detail h3,
.ap-loop-detail h3 {
  margin: 5px 0 0;
  font-size: 19px;
  letter-spacing: -.035em;
}

.ap-status-pill,
.ap-priority-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: .05em;
}

.ap-status-pill--pass { color: var(--ap-green); background: var(--ap-green-soft); }
.ap-status-pill--partial { color: var(--ap-amber); background: var(--ap-amber-soft); }
.ap-status-pill--fail { color: var(--ap-red); background: var(--ap-red-soft); }
.ap-status-pill--blocked { color: var(--ap-accent-deep); background: var(--ap-accent-soft); }

.ap-inspector__summary {
  margin: 18px 0 0;
  color: #555951;
  font-size: 12px;
  line-height: 1.55;
}

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

.ap-inspector__facts > div,
.ap-capability-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--ap-line);
}

.ap-inspector__facts > div:last-child,
.ap-capability-facts > div:last-child { border-bottom: 0; }

.ap-inspector__facts span,
.ap-capability-facts span { color: var(--ap-muted); font-size: 9px; }
.ap-inspector__facts strong,
.ap-capability-facts strong { font-size: 9px; text-align: right; }

.ap-inspector__why {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: white;
  border: 1px solid var(--ap-line);
}

.ap-inspector__why > span {
  color: var(--ap-muted);
  font-size: 8px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.ap-inspector__why p {
  margin: 6px 0 0;
  color: #53574f;
  font-size: 10px;
  line-height: 1.5;
}

.ap-throughput {
  padding: 14px 18px 17px;
  border-top: 1px solid var(--ap-line);
  background: white;
}

.ap-throughput__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.ap-throughput__head > div { display: grid; gap: 3px; }
.ap-throughput__head span { color: var(--ap-muted); font-size: 9px; }
.ap-throughput__head strong { font-size: 11px; }

.ap-throughput__bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 11px;
}

.ap-throughput-bar {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #eceee9;
}

.ap-throughput-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ap-accent);
  transform-origin: left;
  transition: width 220ms ease;
}

.ap-throughput-bar[data-state="fail"] > i { background: var(--ap-red); }
.ap-throughput-bar[data-state="partial"] > i { background: var(--ap-amber); }
.ap-throughput-bar[data-state="blocked"] > i { background: var(--ap-accent); }

/* Shared split/content */
.ap-two-col {
  display: grid;
  grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr);
  gap: clamp(40px, 7vw, 95px);
  align-items: center;
}

.ap-copy-block .ap-badge { margin-bottom: 3px; }
.ap-copy-block h2 { font-size: clamp(38px,4.8vw,60px); }
.ap-copy-block p { max-width: 560px; }

.ap-text-link {
  display: inline-block;
  margin-top: 23px;
  color: var(--ap-ink);
  font-size: 12px;
  font-weight: 730;
  text-decoration: none;
}

.ap-boundary-card {
  padding: 22px;
  border: 1px solid var(--ap-line-strong);
  border-radius: 20px;
  background: white;
  box-shadow: 0 18px 44px rgba(25,26,23,.05);
}

.ap-boundary-card__row { padding: 14px; }
.ap-boundary-label,
.ap-taxonomy-column > span {
  display: block;
  margin-bottom: 12px;
  color: var(--ap-muted);
  font-size: 8px;
  font-weight: 790;
  letter-spacing: .08em;
}

.ap-boundary-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.ap-boundary-stages span {
  padding: 7px 9px;
  border: 1px solid var(--ap-line);
  border-radius: 7px;
  background: #fafaf8;
  font-size: 8px;
  font-weight: 760;
}

.ap-boundary-stages i { color: var(--ap-muted-2); font-size: 10px; font-style: normal; }

.ap-boundary-stop {
  position: relative;
  margin: 4px 0;
  text-align: center;
}
.ap-boundary-stop::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--ap-line);
}
.ap-boundary-stop span {
  position: relative;
  padding: 0 9px;
  background: white;
  color: var(--ap-red);
  font-size: 8px;
  font-weight: 700;
}

.ap-boundary-card__row--accent {
  margin-top: 8px;
  border: 1px solid #dfd9ff;
  border-radius: 12px;
  background: var(--ap-accent-soft);
}
.ap-boundary-card__row--accent .ap-boundary-stages span {
  border-color: #ddd6ff;
  background: white;
  color: var(--ap-accent-deep);
}

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

.ap-feature {
  padding: 24px;
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  background: #fff;
}

.ap-feature__icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--ap-line);
  border-radius: 9px;
  background: var(--ap-bg);
  color: var(--ap-muted);
  font-size: 14px;
}

.ap-feature h3 {
  margin: 17px 0 0;
  font-size: 16px;
  letter-spacing: -.025em;
}

.ap-feature p {
  margin: 8px 0 0;
  color: var(--ap-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* ACTIONS */
.ap-actions-summary {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  border-bottom: 1px solid var(--ap-line);
  background: white;
}

.ap-actions-summary > div {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--ap-line);
}

.ap-actions-summary > div:last-child { border-right: 0; }
.ap-actions-summary span { display:block; color:var(--ap-muted); font-size:9px; font-weight:650; }
.ap-actions-summary strong { display:block; margin-top:6px; font-size:23px; letter-spacing:-.04em; }
.ap-actions-summary small { display:block; margin-top:2px; color:var(--ap-muted-2); font-size:8px; }

.ap-filter-row {
  width: fit-content;
  max-width: calc(100% - 36px);
  margin: 15px 18px 0;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.ap-actions-workbench {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(310px,.85fr);
  min-height: 510px;
  margin-top: 14px;
  border-top: 1px solid var(--ap-line);
}

.ap-action-list {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid var(--ap-line);
  background: #fafaf8;
}

.ap-action-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  gap: 13px;
  align-items: start;
  width: 100%;
  min-height: 112px;
  margin-bottom: 7px;
  padding: 14px;
  border: 1px solid var(--ap-line);
  border-radius: 12px;
  background: white;
  color: var(--ap-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ap-action-card:last-child { margin-bottom: 0; }

.ap-action-card.is-active {
  border-color: #d8d0ff;
  box-shadow: 0 7px 24px rgba(54,42,128,.07);
}

.ap-action-card.is-planned::after {
  content: "PLANNED";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--ap-green);
  font-size: 7px;
  font-weight: 820;
  letter-spacing: .07em;
}

@media (hover:hover) and (pointer:fine) {
  .ap-action-card:hover { transform: translateY(-1px); border-color: #d6d8d1; }
}

.ap-action-card__score,
.ap-score-orb {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #dcd6ff;
  border-radius: 13px;
  background: var(--ap-accent-soft);
  color: var(--ap-accent-deep);
  font-size: 18px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.ap-action-card__type {
  color: var(--ap-muted);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .055em;
}

.ap-action-card__title {
  display:block;
  margin-top:5px;
  font-size:13px;
  letter-spacing:-.018em;
}

.ap-action-card__reason {
  display:block;
  max-width: 520px;
  margin-top:6px;
  color:var(--ap-muted);
  font-size:9px;
  line-height:1.45;
}

.ap-action-card__priority { font-size:8px; font-weight:800; letter-spacing:.04em; }
.ap-action-card__priority[data-priority="HIGH"] { color:var(--ap-red); }
.ap-action-card__priority[data-priority="MEDIUM"] { color:var(--ap-amber); }
.ap-action-card__priority[data-priority="LOW"] { color:var(--ap-green); }

.ap-action-empty {
  padding: 40px 20px;
  text-align:center;
  color:var(--ap-muted);
  font-size:11px;
}

.ap-action-detail { padding: 22px; background:white; }
.ap-action-detail__head {
  display:grid;
  grid-template-columns: 58px minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
}

.ap-priority-pill--high { color:var(--ap-red); background:var(--ap-red-soft); }
.ap-priority-pill--medium { color:var(--ap-amber); background:var(--ap-amber-soft); }
.ap-priority-pill--low { color:var(--ap-green); background:var(--ap-green-soft); }

.ap-action-detail__reason {
  margin: 18px 0 0;
  color:#555951;
  font-size:12px;
  line-height:1.55;
}

.ap-impact-chips {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:14px;
}

.ap-impact-chips span {
  padding:5px 7px;
  border:1px solid #dfd9ff;
  border-radius:6px;
  background:var(--ap-accent-soft);
  color:var(--ap-accent-deep);
  font-size:8px;
  font-weight:750;
}

.ap-detail-section { margin-top:20px; }
.ap-evidence-list {
  display:grid;
  gap:8px;
  margin:9px 0 0;
  padding:0;
  list-style:none;
}

.ap-evidence-list li {
  position:relative;
  padding-left:15px;
  color:#555951;
  font-size:10px;
  line-height:1.45;
}
.ap-evidence-list li::before {
  content:"";
  position:absolute;
  left:0; top:.5em;
  width:6px; height:6px;
  border-radius:50%;
  background:var(--ap-accent);
}

.ap-verification-box {
  padding:12px;
  border:1px solid var(--ap-line);
  border-radius:10px;
  background:var(--ap-bg);
}
.ap-verification-box p {
  margin:6px 0 0;
  color:#555951;
  font-size:10px;
  line-height:1.5;
}

.ap-detail-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:18px;
}
.ap-action-detail > .ap-example-label { display:block; margin-top:10px; }

.ap-capability-layout {
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);
  min-height:510px;
}

.ap-capability-table-wrap {
  min-width:0;
  padding:16px;
  border-right:1px solid var(--ap-line);
  background:#fafaf8;
  overflow-x:auto;
}

.ap-capability-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0 6px;
  min-width:620px;
}

.ap-capability-table th {
  padding:0 11px 5px;
  color:var(--ap-muted);
  font-size:8px;
  font-weight:760;
  text-align:left;
  letter-spacing:.055em;
  text-transform:uppercase;
}

.ap-capability-table td {
  padding:13px 11px;
  background:white;
  border-block:1px solid var(--ap-line);
  font-size:9px;
}

.ap-capability-table td:first-child {
  border-left:1px solid var(--ap-line);
  border-radius:9px 0 0 9px;
  font-weight:700;
}
.ap-capability-table td:last-child {
  border-right:1px solid var(--ap-line);
  border-radius:0 9px 9px 0;
}

.ap-capability-table tr[data-capability] { cursor:pointer; }
.ap-capability-table tr.is-active td { background:var(--ap-accent-soft); border-color:#ded8ff; }
.ap-capability-status { color:var(--ap-green); font-weight:750; }
.ap-capability-risk--high { color:var(--ap-red); }
.ap-capability-risk--medium { color:var(--ap-amber); }
.ap-capability-risk--safe { color:var(--ap-green); }

.ap-capability-detail { padding:22px; background:white; }
.ap-capability-detail code {
  display:block;
  width:fit-content;
  max-width:100%;
  margin-top:8px;
  padding:6px 8px;
  border-radius:6px;
  background:var(--ap-dark);
  color:#f5f5f2;
  font-size:9px;
  overflow-wrap:anywhere;
}
.ap-capability-facts { display:grid; margin-top:18px; border-block:1px solid var(--ap-line); }

.ap-policy-flow {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  align-items:center;
  margin-top:18px;
}
.ap-policy-flow span {
  padding:6px 7px;
  border:1px solid var(--ap-line);
  border-radius:7px;
  background:var(--ap-bg);
  font-size:8px;
  font-weight:700;
}
.ap-policy-flow i { color:var(--ap-muted-2); font-style:normal; font-size:9px; }

.ap-action-taxonomy {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:14px;
  align-items:center;
}
.ap-taxonomy-column {
  display:grid;
  gap:6px;
  padding:18px;
  border:1px solid var(--ap-line);
  border-radius:16px;
  background:white;
}
.ap-taxonomy-column strong {
  padding:8px 10px;
  border-radius:8px;
  background:var(--ap-bg);
  font-size:10px;
  font-weight:650;
}
.ap-taxonomy-column--accent {
  border-color:#ddd6ff;
  background:var(--ap-accent-soft);
}
.ap-taxonomy-column--accent strong { background:white; color:var(--ap-accent-deep); }
.ap-taxonomy-arrow { color:var(--ap-muted-2); font-size:22px; }

.ap-loop-demo {
  overflow:hidden;
  border:1px solid var(--ap-line-strong);
  border-radius:20px;
  background:white;
  box-shadow:0 18px 44px rgba(25,26,23,.05);
}
.ap-loop-steps {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:6px;
  padding:15px;
  background:var(--ap-bg);
  border-bottom:1px solid var(--ap-line);
}
.ap-loop-steps button {
  min-height:32px;
  padding:0 9px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:var(--ap-muted);
  font-size:8px;
  font-weight:790;
  letter-spacing:.04em;
  cursor:pointer;
}
.ap-loop-steps button.is-active {
  border-color:#ddd6ff;
  background:white;
  color:var(--ap-accent-deep);
}
.ap-loop-steps i { color:var(--ap-muted-2); font-style:normal; font-size:9px; }
.ap-loop-detail {
  display:grid;
  grid-template-columns:74px minmax(0,1fr);
  gap:18px;
  align-items:center;
  max-width:800px;
  min-height:180px;
  margin:auto;
  padding:28px;
}
.ap-loop-number {
  color:var(--ap-accent-soft);
  font-size:62px;
  font-weight:820;
  letter-spacing:-.07em;
  line-height:1;
  -webkit-text-stroke:1px #d7d0ff;
}
.ap-loop-detail p {
  margin:7px 0 0;
  color:var(--ap-muted);
  font-size:11px;
  line-height:1.55;
}

/* CTA */
.ap-cta-section { padding: 28px 0 90px; }
.ap-cta-card {
  display:flex;
  justify-content:space-between;
  gap:28px;
  align-items:center;
  padding:38px;
  border-radius:22px;
  background:var(--ap-dark);
  color:white;
}
.ap-cta-card > div { max-width:760px; }
.ap-cta-card h2 { font-size:clamp(34px,4vw,52px); }
.ap-cta-card p { color:#aeb1aa; }
.ap-cta-card .ap-demo-kicker { color:#92958e; }
.ap-cta-card .ap-btn--primary {
  flex:0 0 auto;
  background:white;
  color:var(--ap-ink);
}

/* Responsive */
@media (max-width: 980px) {
  .ap-stage-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .ap-stage-card:nth-child(4) { border-right:0; }
  .ap-stage-card:nth-child(n+5) { border-top:1px solid var(--ap-line); }
  .ap-journey-workbench,
  .ap-actions-workbench,
  .ap-capability-layout,
  .ap-two-col { grid-template-columns:1fr; }
  .ap-agent-example,
  .ap-action-list,
  .ap-capability-table-wrap { border-right:0; border-bottom:1px solid var(--ap-line); }
  .ap-action-list { max-height:none; }
  .ap-actions-workbench { min-height:0; }
  .ap-action-detail,
  .ap-capability-detail { min-height:360px; }
}

@media (max-width: 720px) {
  .ap-wrap { width:min(100% - 24px,1180px); }
  .ap-hero { padding:82px 0 58px; }
  .ap-hero h1 { font-size:clamp(45px,14vw,68px); }
  .ap-section { padding:68px 0; }

  .ap-demo-topbar,
  .ap-cta-card {
    align-items:flex-start;
    flex-direction:column;
  }

  .ap-demo-topbar { padding:14px; }
  .ap-scenario-switch,
  .ap-view-switch { width:100%; overflow-x:auto; flex-wrap:nowrap; }

  .ap-stage-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ap-stage-card { min-height:126px; }
  .ap-stage-card:nth-child(even) { border-right:0; }
  .ap-stage-card:nth-child(n+3) { border-top:1px solid var(--ap-line); }

  .ap-agent-example { padding:16px 13px 20px; }
  .ap-user-bubble { max-width:86%; }
  .ap-assistant-row { grid-template-columns:23px minmax(0,1fr); gap:8px; }
  .ap-agent-avatar { width:23px; height:23px; }
  .ap-assistant-card { padding:13px; }
  .ap-inspector { padding:18px 15px; }

  .ap-feature-grid--3,
  .ap-actions-summary { grid-template-columns:1fr; }
  .ap-actions-summary > div { border-right:0; border-bottom:1px solid var(--ap-line); }
  .ap-actions-summary > div:last-child { border-bottom:0; }

  .ap-action-card { grid-template-columns:44px minmax(0,1fr); }
  .ap-action-card__score { width:40px; height:40px; font-size:15px; }
  .ap-action-card__priority { grid-column:2; }
  .ap-action-detail__head { grid-template-columns:50px minmax(0,1fr); }
  .ap-action-detail__head .ap-priority-pill { grid-column:2; width:fit-content; }
  .ap-score-orb { width:46px; height:46px; }

  .ap-action-taxonomy { grid-template-columns:1fr; }
  .ap-taxonomy-arrow { transform:rotate(90deg); text-align:center; }

  .ap-loop-steps { justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; }
  .ap-loop-steps button,
  .ap-loop-steps i { flex:0 0 auto; }
  .ap-loop-detail { grid-template-columns:1fr; }
  .ap-loop-number { font-size:48px; }

  .ap-cta-card { padding:28px 22px; }
}

@media (max-width: 430px) {
  .ap-stage-grid { grid-template-columns:1fr; }
  .ap-stage-card,
  .ap-stage-card:nth-child(4),
  .ap-stage-card:nth-child(even) {
    min-height:104px;
    border-right:0;
    border-top:1px solid var(--ap-line);
  }
  .ap-stage-card:first-child { border-top:0; }
  .ap-stage-card__question { max-width:none; }
  .ap-throughput__bars { gap:3px; }
  .ap-trace-receipt { grid-template-columns:1fr; }
  .ap-agent-example__top { align-items:flex-start; flex-direction:column; }
  .ap-hero__actions .ap-btn { width:100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-page *,
  .ap-page *::before,
  .ap-page *::after {
    scroll-behavior:auto !important;
    animation-duration:.001ms !important;
    transition-duration:.001ms !important;
  }
}
