/* =====================================================================
   Aarveta content/article pages (Resources guides).
   Loaded only on pages with <body class="... article-page">, so the landing,
   pricing, demo and signup pages are untouched.

   Design tokens and the shared header/footer live in public-chrome.css, which
   every public page loads; this file only styles article content.
   ===================================================================== */

/* ---------- 2. Page shell ---------- */
body.article-page {
  min-height: 100vh;
  margin: 0;
  background: var(--ap-glow), var(--ap-page);
  background-attachment: fixed;
  color: var(--ap-body);
  font-family: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

/* The shared shell adds a card + margins on other public pages; the article
   pages use their own container instead. */
body.article-page .site-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  border: 0;
}

body.article-page main > .section,
body.article-page .site-shell > main {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  min-width: 0;
}

.ap-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 4. Hero: breadcrumb, h1, intro ---------- */
.ap-hero {
  padding: 40px 0 28px;
}

.ap-breadcrumb {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--ap-muted);
}

.ap-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--ap-muted);
}

.ap-breadcrumb a {
  color: var(--ap-muted);
  text-decoration: none;
}

.ap-breadcrumb a:hover {
  color: var(--ap-link);
  text-decoration: underline;
}

.ap-breadcrumb [aria-current="page"] {
  color: var(--ap-heading);
  font-weight: 600;
}

body.article-page h1 {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--ap-heading);
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.ap-intro {
  max-width: 820px;
  margin: 0;
  color: var(--ap-body);
  font-size: 19px;
  line-height: 1.65;
}

/* ---------- 5. Two-column layout ---------- */
.ap-layout {
  display: grid;
  grid-template-columns: 800px 336px;
  gap: 64px;
  align-items: start;
  padding-bottom: 56px;
}

.ap-article {
  min-width: 0;
}

.ap-aside {
  position: sticky;
  top: calc(var(--ap-nav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ---------- 5a. Sidebar cards ---------- */
.ap-card {
  padding: 18px;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-card);
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
}

.ap-card-label {
  display: block;
  margin: 0 0 10px;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ap-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.ap-toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ap-body);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background var(--ap-ease), color var(--ap-ease);
}

.ap-toc a:hover {
  background: var(--ap-fill);
  color: var(--ap-heading);
}

.ap-toc a[aria-current="location"] {
  background: var(--ap-tint);
  color: var(--ap-link);
  font-weight: 600;
}

.ap-trial-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 11px;
  background: var(--ap-tint);
  color: var(--ap-link);
}

.ap-trial-icon svg {
  width: 20px;
  height: 20px;
}

.ap-trial h2,
.ap-trial p {
  margin: 0;
}

.ap-trial h2 {
  color: var(--ap-heading);
  font-size: 17px;
  font-weight: 700;
}

.ap-trial p {
  margin: 4px 0 14px;
  color: var(--ap-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ap-trial .ap-btn {
  width: 100%;
  height: 46px;
}

/* ---------- 6. Article content ---------- */
.ap-article section {
  margin-bottom: 56px;
}

.ap-article section:last-of-type {
  margin-bottom: 0;
}

.ap-article h2 {
  margin: 0 0 20px;
  color: var(--ap-heading);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--ap-nav-h) + 24px);
}

.ap-article p {
  margin: 0 0 16px;
  color: var(--ap-body);
  font-size: 17px;
  line-height: 1.7;
}

.ap-article p:last-child {
  margin-bottom: 0;
}

.ap-article strong {
  color: var(--ap-heading);
  font-weight: 700;
}

.ap-article a {
  color: var(--ap-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-thickness var(--ap-ease);
}

.ap-article a:hover {
  text-decoration-thickness: 2.5px;
}

/* ---------- 6a. Comparison table ---------- */
.ap-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ap-border);
  border-radius: var(--ap-radius-card);
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
}

.ap-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  line-height: 1.5;
}

.ap-table col.ap-col-need { width: 190px; }
.ap-table col.ap-col-sheet { width: 265px; }

.ap-table thead th {
  padding: 14px 20px;
  border-bottom: 1px solid var(--ap-line);
  background: var(--ap-fill);
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  vertical-align: middle;
}

.ap-table thead th.ap-col-ours {
  background: var(--ap-tint);
  color: var(--ap-link);
}

.ap-table tbody th,
.ap-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--ap-line);
  text-align: left;
  vertical-align: top;
}

.ap-table tbody tr:last-child th,
.ap-table tbody tr:last-child td {
  border-bottom: 0;
}

.ap-table tbody th {
  color: var(--ap-heading);
  font-weight: 700;
}

.ap-table tbody td {
  color: var(--ap-muted);
}

.ap-table tbody td.ap-col-ours {
  background: var(--ap-tint-soft);
  color: var(--ap-heading);
}

/* ---------- 6b. "Signs" cards ---------- */
.ap-signs {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-signs li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
  color: var(--ap-body);
  font-size: 16px;
  line-height: 1.6;
}

.ap-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ap-amber-tint);
  color: var(--ap-amber);
}

.ap-icon svg {
  width: 20px;
  height: 20px;
}

/* ---------- 6c. Callout ---------- */
.ap-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 20px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--ap-tint-line);
  border-radius: 14px;
  background: var(--ap-tint-soft);
  color: var(--ap-body);
  font-size: 16px;
  line-height: 1.65;
}

.ap-note svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--ap-link);
}

.ap-note p {
  margin: 0;
  font-size: 16px;
}

/* ---------- 6c-bis. Answer block ----------
   A direct answer to the page's question, first thing in the article. Written
   to be liftable whole: search snippets and AI answer engines quote a short
   self-contained paragraph far more readily than they summarise a long one. */
.ap-answer {
  margin: 0 0 28px;
  padding: 22px 24px;
  border: 1px solid var(--ap-tint-line);
  border-left: 3px solid var(--ap-accent);
  border-radius: 14px;
  background: var(--ap-tint-soft);
}

.ap-answer-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ap-link);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ap-answer p {
  margin: 0;
  color: var(--ap-heading);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
}

.ap-answer ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--ap-body);
  font-size: 15.5px;
  line-height: 1.65;
}

.ap-answer li + li {
  margin-top: 6px;
}

/* Publish/update date: recency is a ranking signal for answer engines, so it
   is stated on the page as well as in the Article markup. */
.ap-meta {
  margin: 0 0 20px;
  color: var(--ap-muted);
  font-size: 14px;
}

/* ---------- 6d. Stat cards ---------- */
.ap-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ap-stat {
  padding: 20px;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
}

.ap-stat-label {
  display: block;
  color: var(--ap-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ap-stat-figure {
  display: block;
  margin: 8px 0 6px;
  color: var(--ap-heading);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.ap-stat-caption {
  display: block;
  color: var(--ap-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- 6e. Numbered timeline ---------- */
.ap-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ap-step;
}

.ap-steps li {
  position: relative;
  padding: 0 0 26px 56px;
  color: var(--ap-body);
  font-size: 16px;
  line-height: 1.65;
}

.ap-steps li:last-child {
  padding-bottom: 0;
}

.ap-steps li::before {
  counter-increment: ap-step;
  content: counter(ap-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ap-accent-grad);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

/* Connector down to the next step */
.ap-steps li::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 8px;
  width: 2px;
  background: var(--ap-line);
}

.ap-steps li:last-child::after {
  display: none;
}

/* Final step is "done": green circle with a check instead of a number */
.ap-steps li:last-child::before {
  content: "";
  background:
    var(--ap-check-icon) center / 18px 18px no-repeat,
    var(--ap-green-solid, #10b981);
}

/* A paragraph after the timeline needs its own breathing room. */
.ap-steps + p {
  margin-top: 20px;
}

.ap-steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ap-heading);
  font-size: 18px;
  font-weight: 700;
}

/* ---------- 7. Buttons used in content ---------- */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--ap-radius-btn);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter var(--ap-ease), background var(--ap-ease), border-color var(--ap-ease);
}

.ap-btn-primary {
  background: var(--ap-accent-grad);
  color: var(--ap-on-accent);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.ap-btn-primary:hover {
  filter: brightness(1.07);
}

.ap-btn-on-accent {
  background: #ffffff;
  color: var(--ap-accent-deep);
}

.ap-btn-outline-light {
  border-color: rgba(255, 255, 255, 0.65);
  background: transparent;
  color: #ffffff;
}

.ap-btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- 8. Closing call to action ---------- */
.ap-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 56px;
  padding: 32px;
  border-radius: 20px;
  background: var(--ap-accent-grad);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.ap-cta h2 {
  margin: 0;
  max-width: 620px;
  color: #ffffff;
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--ap-nav-h) + 24px);
}

.ap-cta p {
  margin: 6px 0 0;
  /* 0.86 white on the lighter gradient stop measures 4.25:1; 0.94 clears AA. */
  color: rgba(255, 255, 255, 0.94);
  font-size: 15px;
}

.ap-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 9. FAQ + related cards ---------- */
body.article-page .pricing-faq {
  display: grid;
  gap: 10px;
}

body.article-page .pricing-faq details {
  padding: 16px 18px;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
}

body.article-page .pricing-faq summary {
  color: var(--ap-heading);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

body.article-page .pricing-faq p {
  margin: 10px 0 0;
  color: var(--ap-body);
  font-size: 16px;
}

.ap-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-links a {
  display: block;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--ap-border);
  border-radius: 14px;
  background: var(--ap-card-bg);
  box-shadow: var(--ap-shadow);
  color: var(--ap-heading);
  text-decoration: none;
  transition: border-color var(--ap-ease), box-shadow var(--ap-ease), transform var(--ap-ease);
}

.ap-links a:hover {
  border-color: var(--ap-tint-line);
  box-shadow: var(--ap-shadow-lift);
  transform: translateY(-2px);
}

.ap-links strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.ap-links span {
  color: var(--ap-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- 11. Focus, motion, responsive ---------- */
body.article-page a:focus-visible,
body.article-page button:focus-visible,
body.article-page summary:focus-visible {
  outline: 2px solid var(--ap-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  body.article-page * {
    transition: none !important;
  }
  .ap-links a:hover {
    transform: none;
  }
}

@media (max-width: 1160px) {
  .ap-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .ap-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ap-aside > * {
    flex: 1 1 280px;
  }
}

@media (max-width: 768px) {
  .ap-hero {
    padding: 28px 0 20px;
  }
  .ap-container {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* The table of contents is a convenience, not content: hide it rather than
     pushing 6 links above the article on a phone. */
  .ap-toc {
    display: none;
  }
  .ap-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .ap-cta {
    padding: 24px;
  }
  .ap-cta-actions {
    width: 100%;
  }
  .ap-cta-actions .ap-btn {
    flex: 1 1 100%;
  }
}
