/* NXT AP page. Layout comes from the shared px system (css/px.css); only
   what this page adds lives here, prefixed ap-. Hairlines, not boxes. */

/* ---------- Hero ---------- */
.ap-hero-lead { max-width: 52ch; margin: -12px auto 32px !important; font-size: 16px; line-height: 1.65; color: var(--nxt-gray); }
.ap-hero-more { margin: 24px 0 0 !important; }
.ap-three { padding-top: 88px; }
.ap-three h2 { font-size: 19px; line-height: 1.35; letter-spacing: -0.01em; margin: 0 0 10px; }
.ap-three p { font-size: 15px; line-height: 1.65; color: var(--nxt-graphite); margin: 0; }

/* ---------- Value statements: large lines next to the photo ---------- */
.ap-values li {
  padding: 18px 0; border-top: 1px solid var(--border-subtle);
  font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; line-height: 1.35; letter-spacing: -0.025em; color: var(--nxt-midnight);
}
.ap-values li:last-child { border-bottom: 1px solid var(--border-subtle); }

/* ---------- Checklist: two hairline columns ---------- */
.ap-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.ap-checklist li {
  position: relative; padding: 16px 0 16px 32px; border-top: 1px solid var(--border-subtle);
  font-size: 16px; line-height: 1.55; color: var(--nxt-midnight);
}
.ap-checklist li::before {
  content: ""; position: absolute; left: 2px; top: 1.45em; width: 12px; height: 6px;
  border-left: 2px solid var(--nxt-cobalt); border-bottom: 2px solid var(--nxt-cobalt); transform: rotate(-45deg);
}

/* ---------- Hairline-topped text grids built from lists ---------- */
.ap-grid li { padding-top: 20px; border-top: 1px solid var(--border-default); }
.ap-grid strong { font-weight: 500; color: var(--nxt-midnight); }
.ap-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Comparison table ---------- */
.ap-table-wrap { max-width: 100%; overflow-x: auto; }
.ap-compare { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.ap-compare th, .ap-compare td { text-align: left; vertical-align: top; padding: 20px 24px 20px 0; border-bottom: 1px solid var(--border-subtle); }
.ap-compare thead th { font-size: 15px; font-weight: 500; color: var(--nxt-midnight); vertical-align: middle; border-bottom-color: var(--border-default); }
.ap-compare thead img { display: inline-block; vertical-align: middle; width: auto; height: 28px; margin-right: 10px; }
.ap-compare tbody th { width: 24%; font-weight: 500; color: var(--nxt-midnight); }
.ap-compare td { color: var(--nxt-gray); }
.ap-compare td.ap-compare-nxt { color: var(--nxt-midnight); }
.ap-compare thead .ap-compare-nxt { color: var(--nxt-cobalt); }

/* ---------- Core stack ---------- */
.ap-feature-top { align-items: start; }
.ap-layers { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: ap-layer; }
.ap-layers li {
  counter-increment: ap-layer; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px;
  padding: 16px 0; border-top: 1px solid var(--border-subtle);
}
.ap-layers li:last-child { border-bottom: 1px solid var(--border-subtle); }
.ap-layers li::before { content: "0" counter(ap-layer); grid-row: span 2; padding-top: 3px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--nxt-cobalt); }
.ap-layers strong { font-weight: 500; color: var(--nxt-midnight); }
.ap-layers span { font-size: 15px; line-height: 1.6; color: var(--nxt-graphite); }
.ap-actions-left { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0 !important; }

/* ---------- Why NXT AP ---------- */
.ap-feature-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); margin-top: 112px; }
.ap-statement, .px-feature-body > .ap-statement {
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; letter-spacing: -0.02em; color: var(--nxt-midnight);
}
.ap-statement strong { font-weight: 500; }

/* ---------- Subscriptions band ---------- */
.ap-subscribe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.ap-subscribe .px-big { margin-bottom: 16px !important; }
.ap-subscribe-kicker { font-size: 19px; color: rgba(255, 255, 255, 0.82); }
.ap-subscribe-copy { font-size: 16px; color: rgba(255, 255, 255, 0.72); }
.ap-plans { list-style: none; margin: 0 0 24px; padding: 0; }
.ap-plans li { padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, 0.28); font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, 0.82); }
.ap-plans li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.ap-plans strong { font-weight: 500; color: #fff; }
.ap-btn-inverse { background: #fff; color: var(--nxt-midnight); }
.ap-btn-inverse:hover { background: var(--nxt-ink-100); color: var(--nxt-midnight); }

/* ---------- NXT AP Intelligence ---------- */
.ap-lead { max-width: 48ch; margin: 0 0 64px !important; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: var(--nxt-graphite); }
.ap-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ap-cards p { margin-top: 18px !important; }
.ap-cards strong { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--nxt-midnight); }
.ap-intel-split { margin-top: 112px; }
.ap-lines strong { font-weight: 500; color: var(--nxt-midnight); }

/* ---------- Document Analyzer ---------- */
.ap-big-long { max-width: 26ch; }
.ap-analyzer p + h3 { margin-top: 32px; }
.ap-head-h3 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
.ap-steps { list-style: none; margin: 0; padding: 0; }
.ap-steps li {
  padding: 20px 0; border-top: 1px solid var(--border-subtle);
  font-size: clamp(18px, 1.6vw, 21px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; color: var(--nxt-midnight);
}
.ap-steps li:last-child { border-bottom: 1px solid var(--border-subtle); }
.ap-steps span { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 0.04em; color: var(--nxt-cobalt); }
.ap-features { margin-top: 112px; }
.ap-features-wide { grid-column: span 2; }
.ap-dots li { position: relative; padding-left: 18px; margin-bottom: 10px; }
.ap-dots li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--nxt-cobalt); }

/* ---------- Agentic finance automation ---------- */
.ap-agentic { align-items: start; }
.ap-agentic h2 { font-size: clamp(26px, 3.15vw, 39px); line-height: 1.1; letter-spacing: -0.035em; }
.ap-agentic p { font-size: 18px; line-height: 1.65; }

/* ---------- What are AI agents ---------- */
.ap-more-row { margin-top: 28px !important; }
.ap-more-wrap { white-space: normal; }

/* ---------- AI Harness ---------- */
.ap-last { padding-bottom: 128px; }
.ap-wide-media { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.ap-harness { margin-top: 64px; }
.ap-harness h2 { font-size: clamp(25px, 2.48vw, 33px); line-height: 1.15; letter-spacing: -0.03em; }
.ap-harness-kicker { margin-top: 16px !important; font-size: 17px; color: var(--nxt-gray); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1020px) {
  .ap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-subscribe { gap: 40px; }
}
@media (max-width: 720px) {
  .ap-three { padding-top: 56px; }
  .ap-checklist, .ap-grid-2, .ap-subscribe { grid-template-columns: 1fr; }
  .ap-subscribe { gap: 24px; }
  .ap-feature-flip { grid-template-columns: 1fr; margin-top: 80px; }
  .ap-features-wide { grid-column: auto; }
  .ap-intel-split, .ap-features { margin-top: 80px; }
  .ap-lead { margin-bottom: 48px !important; }
  .ap-last { padding-bottom: 88px; }
  .ap-wide-media { aspect-ratio: 4 / 3; }
  .ap-harness { margin-top: 40px; gap: 24px; }
}

/* ======================================================================
   7 Nov 2026 restructure (content and flow only): new pieces, prefixed
   ap3-, drawn in this page's own hairline style with brand colours.
   ====================================================================== */

.ap3-more { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0 !important; }

/* ---------- 2 Foundation visual: built from the shared nx- glass kit
   (css/px.css); only the layout lives here ---------- */
.ap3-found-lead { max-width: 62ch; margin: 0 0 56px !important; }
.ap3-fd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 0.42fr); align-items: center; }
.ap3-fd-harness { grid-column: 1; grid-row: 1; }
.ap3-fd-gov, .ap3-fd-flow, .ap3-fd-skills { list-style: none; display: grid; gap: 10px; margin: 0 0 18px; padding: 0; }
.ap3-fd-gov { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ap3-fd-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.ap3-fd-skills { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.ap3-fd-flow > .nx-tile { position: relative; align-items: center; text-align: center; }
.ap3-fd-flow > .nx-tile span { font-size: 12px; letter-spacing: 0.04em; color: var(--nxt-cobalt); }
.ap3-fd-flow > .nx-tile:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -15px; width: 12px; border-top: 1.5px solid #AEB4CC; }
.ap3-fd-flow > .nx-tile.is-branch { box-shadow: inset 0 0 0 2px var(--nxt-cobalt); }
.ap3-fd-link { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 10px; }
.ap3-fd-link-t { font-size: 12px; line-height: 1.35; font-weight: 500; text-align: center; color: var(--nxt-cobalt); }
.ap3-fd-sap { grid-column: 3; grid-row: 1; gap: 8px; padding: 22px; }
.ap3-fd-sap-n { display: block; font-size: 24px !important; font-weight: 600; letter-spacing: -0.01em; }
/* exception branch, from step 03 (about 61% across the Harness box) */
.ap3-fd-exc { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: end; max-width: 640px; margin-left: calc((100% - 150px) / 1.42 * 0.61 - 19px); }
.ap3-fd-exc-line { height: 56px; margin: 0 0 24px 18px; border-left: 2px dashed var(--nxt-cobalt); border-bottom: 2px dashed var(--nxt-cobalt); border-bottom-left-radius: 14px; }
.ap3-fd-exc .nx-tile { flex-direction: row; align-items: flex-start; gap: 12px; font-size: 14.5px; line-height: 1.55; }
.ap3-fd-exc .nx-tile strong { font-size: inherit; }

/* ---------- 3 Invoice example: prominent simulation flag, two gates ---------- */
.ap3-sim-flag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px !important; padding: 10px 16px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-default); font-size: 14px; color: var(--nxt-graphite); }
.ap3-sim-flag b { padding: 2px 10px; border-radius: 999px; background: var(--nxt-midnight); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.ap3-gates { margin: 0 0 14px; }
.ap3-gate-rows { display: grid; gap: 8px; }
.ap3-gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-radius: 12px; background: #F7F8FC; box-shadow: inset 0 0 0 1px #E6E9F5; }
.ap3-gate-h { display: flex; flex-direction: column; }
.ap3-gate-h strong { font-size: 14px; font-weight: 600; color: #10164D; }
.ap3-gate-q { font-size: 12.5px; color: #6B7090; }
.ap3-gate-s { align-self: start; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ap3-gate-t { grid-column: 1 / -1; margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: #4A5170; }
.ap3-gate.is-pass .ap3-gate-s { background: #E8F7EE; color: #1E7B45; }
.ap3-gate.is-wait .ap3-gate-s { background: #FFF1D6; color: #8A5A00; }
.ap3-gate.is-fail .ap3-gate-s, .ap3-gate.is-stop .ap3-gate-s { background: #FDEEEE; color: #A23131; }
.ap-demo-out .ap3-out-k { font-size: 11.5px !important; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6B7090 !important; }
.hp-sim .ap3-gate-rows { margin-bottom: 14px; }

/* ---------- 4 Invoice processing ---------- */
.ap3-scope { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; margin: 0 0 24px; padding: 0; counter-reset: s; }
.ap3-scope li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding: 22px 0 24px; border-top: 1px solid var(--border-default); }
.ap3-scope li::before { content: "0" counter(s); font-size: 13px; letter-spacing: 0.04em; color: var(--nxt-cobalt); }
.ap3-scope b { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--nxt-midnight); }
.ap3-scope span { font-size: 15px; line-height: 1.6; color: var(--nxt-graphite); }
.ap3-scope i { font-style: normal; font-size: 13px; font-weight: 500; color: var(--nxt-gray); }

/* ---------- 5 Skills ---------- */
.ap3-badge { display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--nxt-ink-50); box-shadow: inset 0 0 0 1px var(--border-default); font-size: 12px; font-weight: 500; letter-spacing: 0; vertical-align: middle; color: var(--nxt-cobalt); }

/* ---------- 7 SAP fit, formats, expandable details ---------- */
.ap3-net { margin: 18px 0 0 !important; font-size: 15px; color: var(--nxt-graphite); }
.ap3-details { margin-top: 64px; border-top: 1px solid var(--border-default); }
.ap3-details details { border-bottom: 1px solid var(--border-subtle); }
.ap3-details summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 500; color: var(--nxt-midnight); }
.ap3-details summary::-webkit-details-marker { display: none; }
.ap3-details summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; line-height: 1; color: var(--nxt-cobalt); transition: transform 200ms var(--ease-out); }
.ap3-details details[open] summary::after { transform: rotate(45deg); }
.ap3-details summary:hover { color: var(--nxt-cobalt); }
.ap3-details details > p { max-width: 80ch; margin: 0 0 20px !important; font-size: 15px; line-height: 1.65; color: var(--nxt-graphite); }
.ap3-layers { list-style: none; max-width: 860px; margin: 0 0 22px; padding: 0; }
.ap3-layers li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: 15px; line-height: 1.55; color: var(--nxt-graphite); }
.ap3-layers li:first-child { border-top: 0; }
.ap3-layers b { font-weight: 500; color: var(--nxt-midnight); }

/* ---------- 7b White papers ---------- */
.ap3-pb { margin-bottom: 56px; }
.ap3-pb-media { display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 24px; background: var(--nxt-gradient); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.ap3-pb h3 { margin-bottom: 12px; font-size: clamp(22px, 2.2vw, 28px); }
.ap3-wp-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin: 0; padding: 0; }
.ap3-wp a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.ap3-wp img { width: 100%; aspect-ratio: 1600 / 2071; object-fit: cover; background: var(--nxt-ink-50); transition: transform 300ms var(--ease-out); }
.ap3-wp a:hover img { transform: translateY(-4px); }
.ap3-wp-t { margin-top: 14px; font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--nxt-midnight); }
.ap3-wp a:hover .ap3-wp-t { color: var(--nxt-cobalt); }
.ap3-wp-m { margin-top: 4px; font-size: 13px; color: var(--nxt-gray); }
.ap3-wp-all a { justify-content: flex-end; aspect-ratio: 1600 / 2071; height: auto; padding: 24px; background: var(--nxt-ink-50); }
.ap3-wp-all .ap3-wp-m { color: var(--nxt-cobalt); font-weight: 500; }

/* ---------- 8 Results, close ---------- */
.ap3-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 0; }
.ap3-reading { margin: 32px 0 0 !important; font-size: 14px; color: var(--nxt-gray); }
.ap3-reading a { color: var(--nxt-midnight); }

@media (max-width: 1100px) {
  .ap3-fd-grid { grid-template-columns: 1fr; }
  .ap3-fd-harness, .ap3-fd-link, .ap3-fd-sap, .ap3-fd-exc { grid-column: 1; grid-row: auto; }
  .ap3-fd-exc { order: 2; margin: 0 0 4px; grid-template-columns: 30px minmax(0, 1fr); align-items: start; }
  .ap3-fd-exc-line { height: 48px; margin: 0 0 0 16px; }
  .ap3-fd-exc .nx-tile { margin-top: 24px; }
  .ap3-fd-link { order: 3; padding: 14px 0; }
  .ap3-fd-link .nx-link { width: 0; height: 28px; margin: 0 auto; border-top: 0; border-left: 2px solid var(--nxt-cobalt); }
  .ap3-fd-link .nx-link::after { right: auto; left: -6px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--nxt-cobalt); }
  .ap3-fd-sap { order: 4; }
  .ap3-wp-grid, .ap3-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nx-panel.ap3-fd { padding: 20px 14px; }
  .ap3-fd-gov { grid-template-columns: 1fr; }
  .ap3-fd-flow, .ap3-fd-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap3-fd-flow > .nx-tile:nth-child(2n)::after { display: none; }
  .ap3-scope { grid-template-columns: 1fr; }
  .ap3-layers li { grid-template-columns: 1fr; gap: 2px; }
  .ap3-found-lead { margin-bottom: 44px !important; }
}
