:root {
  --paper: #fbfaf8;
  --paper-soft: #fefdfc;
  --card: #ffffff;
  --ink: #1c1a22;
  --ink-soft: #5d5867;
  --ink-faint: #8b8794;
  --violet: #805ad5;
  --violet-dark: #6b46c1;
  --violet-50: #f1ebfb;
  --violet-100: #e6dbf8;
  --green: #1f9d5e;
  --green-50: #e6f5ec;
  --line: rgba(28, 26, 34, 0.08);
  --shadow-md: 0 18px 38px -16px rgba(43, 28, 80, 0.28);
  --shadow-sm: 0 8px 20px -10px rgba(43, 28, 80, 0.22);
  --pocketknife-purple: #6c0fd7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 600px at 78% -8%, rgba(128, 90, 213, 0.12), rgba(128, 90, 213, 0) 60%),
    radial-gradient(900px 500px at 8% 0%, rgba(128, 90, 213, 0.05), rgba(128, 90, 213, 0) 55%),
    radial-gradient(rgba(28, 26, 34, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
main { padding: 0 0 104px; }
.integration-hero { padding: 56px 0 0; position: relative; overflow: hidden; }
.integration-hero .wrap { position: relative; z-index: 1; }
.hero-logo { height: 52px; display: flex; align-items: center; margin-bottom: 22px; }
.hero-logo img { max-height: 100%; max-width: 200px; object-fit: contain; }
.kicker {
  color: var(--violet-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.62;
}
.badge {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--green-50);
  color: var(--green);
  border: 1px solid rgba(31, 157, 94, 0.2);
}
h1, h2, h3 {
  font-family: "Cal Sans", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}
h1 {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 18ch;
}
.lead {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
  margin: 20px 0 0;
  max-width: 720px;
}
.section { margin: 48px 0 0; padding: 0; }
.cs-brief { margin-top: 40px; }
.prose h2 { font-size: 28px; margin: 0 0 12px; }
.prose h3 { font-size: 20px; margin: 28px 0 12px; }
.prose h3:first-child { margin-top: 0; }
.prose p { font-size: 16px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 14px; max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--violet-dark); font-weight: 600; text-underline-offset: 3px; }
.prose a:hover { color: var(--pocketknife-purple); }
.brief-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 28px;
  align-items: start;
  margin: 0;
}
.brief-col h2 { margin: 0 0 16px; font-size: 22px; }
.brief-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.brief-features { padding-top: 0; }
.brief-pair {
  display: flex;
  gap: 22px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.brief-field dt, .brief-site dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pocketknife-purple);
  font-weight: 700;
  margin-bottom: 4px;
}
.brief-field dd, .brief-site dd {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}
.brief-services { margin: 0 0 12px; }
.brief-services dd { color: var(--ink-soft); font-weight: 400; }
.brief-integration {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin: 0 0 12px;
}
.brief-integration dt { margin-bottom: 4px; }
.integration-items { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: 10px; row-gap: 6px; }
.integration-logo { display: block; width: 80px; height: auto; }
.integration-plain { display: inline; margin: 0; line-height: 1.45; }
.brief-site { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.brief-site a { color: var(--violet-dark); font-weight: 600; text-underline-offset: 3px; }
.brief-site a:hover { color: var(--pocketknife-purple); }
.feature-links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  margin: 0;
}
.feature-links li {
  border-top: 1px solid var(--line);
  padding: 11px 0 12px;
}
.feature-links li:nth-child(-n+2) { border-top: none; padding-top: 0; }
.feature-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.feature-links a span { color: var(--violet); font-weight: 700; }
.feature-links a:hover { color: var(--violet-dark); }
.feature-links p {
  margin: 3px 0 0;
  max-width: none;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  font-weight: 400;
}
.outcome-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  background: #f7f0fe;
  border: 1px solid rgba(108, 15, 215, 0.14);
  border-radius: 16px;
  padding: 24px;
  margin: 12px 0 24px;
}
.outcome-panel .stat { min-width: 150px; }
.stat-value {
  display: block;
  font-family: "Cal Sans", sans-serif;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1.05;
  color: var(--pocketknife-purple);
}
.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.story-connection-container {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin: 0 0 18px;
}
.story-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pocketknife-purple);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.story-connection-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.system-node {
  font-size: 12px;
  font-weight: 600;
  background: var(--paper-soft);
  color: var(--ink-soft);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.system-node.highlight-node {
  background: #f1ebfb;
  color: var(--pocketknife-purple);
  border-color: rgba(108, 15, 215, 0.24);
}
.system-arrow { color: var(--ink-faint); font-weight: 700; font-size: 14px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.story-tag {
  font-size: 12px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-weight: 500;
}
.figure {
  margin: 8px 0 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.figure img { width: 100%; height: auto; display: block; border-radius: 10px; }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.page-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.back-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.back-link:hover { color: var(--violet-dark); }
.btn {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: #6c0fd7;
  color: #fff;
  min-height: 44px;
  box-shadow: 0 8px 18px -8px rgba(108, 15, 215, 0.7);
}
.prose .btn, .prose .btn span { color: #fff; }
.btn:hover { background: var(--violet-dark); }
.prose .btn:hover, .prose .btn:hover span { color: #fff; }
.btn:focus-visible {
  background: #6c0fd7;
  outline: 3px solid var(--violet-100);
  outline-offset: 2px;
}
.prose .btn:focus-visible, .prose .btn:focus-visible span { color: #fff; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 800px) {
  .section { margin-top: 32px; }
  .figure-pair { grid-template-columns: 1fr; }
  .brief-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-links { grid-template-columns: 1fr; gap: 0; }
  .feature-links li { border-top: 1px solid var(--line); padding: 11px 0 12px; }
  .feature-links li:first-child { border-top: none; padding-top: 0; }
  .outcome-panel { padding: 16px; gap: 20px; }
  .page-nav { margin-top: 32px; }
  h1 { max-width: none; }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 44px, 1180px); }
}
