/* CPA page. Colors come from the theme tokens in site.css. */

:root {
  --content: min(1180px, calc(100% - 48px));
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: clip; }
body { min-width: 320px; line-height: 1.55; }
a { color: inherit; }
button { font: inherit; }
section { scroll-margin-top: 86px; }

.cpa-page main {
  background:
    radial-gradient(circle at 88% 7%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 29rem),
    radial-gradient(circle at 8% 25%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 27rem);
}

h1, h2, h3 { color: var(--text); }

.kicker {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 15px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  width: var(--content);
  margin-inline: auto;
  padding: 90px 0 116px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(480px, .96fr);
  align-items: center;
  gap: clamp(46px, 6vw, 84px);
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(56px, 6vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
}

.hero-copy > p:not(.kicker) {
  max-width: 680px;
  margin: 20px 0 32px;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.5;
}

.hero-copy .accent-copy { color: var(--accent-soft); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.trust-line span { display: inline-flex; align-items: center; gap: 7px; }
.trust-line svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--accent); }

.grid-pad,
.showcase-pad {
  position: relative;
  padding: 22px;
  border-radius: 34px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  isolation: isolate;
}

.grid-pad::before,
.showcase-pad::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle, transparent 45%, var(--bg) 84%);
}

.showcase-pad::before { background: radial-gradient(circle, transparent 40%, var(--bg) 86%); }

.dashboard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
}

.dash-head {
  padding: 21px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 700;
}

.count { color: var(--accent-text); font-size: 14px; font-weight: 700; }

.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding: 15px 15px 4px;
}

.metric {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.metric strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.05; }
.metric span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.metric.risk strong { color: var(--risk-high-text); }
.metric.ready strong { color: var(--risk-clear-text); }

.queue-label {
  padding: 15px 22px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.queue { padding: 0 12px 12px; }

.client-row {
  display: grid;
  grid-template-columns: 1.15fr .8fr 88px;
  gap: 16px;
  align-items: center;
  min-height: 67px;
  margin-bottom: 8px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  transition: background .2s ease;
}

.client-row:hover { background: var(--surface-3); }
.client-row strong { font-size: 16px; }
.client-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 14px; }
.due { color: var(--muted); font-size: 11px; font-weight: 700; }

.status {
  justify-self: end;
  min-width: 75px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.status.high, .signal-pill.high { color: var(--risk-high-text); background: var(--risk-high-bg); }
.status.medium, .signal-pill.warn { color: var(--risk-medium-text); background: var(--risk-medium-bg); }
.status.clear, .signal-pill.good { color: var(--risk-clear-text); background: var(--risk-clear-bg); }

.recommended {
  margin: 0 15px 12px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: var(--tint);
}

.recommended small { display: block; color: var(--accent-text); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.recommended strong { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; }
.recommended span { color: var(--accent-text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dash-foot { padding: 0 22px 15px; color: var(--muted); font-size: 11px; text-align: center; }

/* ---------- Workflow demo ---------- */
.operations {
  width: var(--content);
  margin-inline: auto;
  padding: 120px 0 96px;
}

.section-heading { max-width: 790px; margin-bottom: 44px; }

.operations h2 {
  margin: 0;
  font-size: clamp(37px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -.035em;
}

.section-heading > p:not(.kicker) {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.service-switcher { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }

.switch-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--btn-secondary-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.switch-btn:hover { color: var(--text); border-color: var(--line-strong); }

.switch-btn[aria-selected="true"] {
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-border);
  background: var(--btn-primary-bg);
  box-shadow: var(--btn-primary-shadow);
}

.showcase-shell {
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.showcase-panel {
  display: none;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr);
  min-height: 500px;
}

.showcase-panel.active { display: grid; }

.showcase-copy {
  padding: clamp(32px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: var(--tint);
}

.showcase-copy .view-label { margin: 0 0 13px; color: var(--accent-text); font-size: 13px; font-weight: 800; }

.showcase-copy h3 {
  max-width: 470px;
  margin: 0;
  font-size: clamp(30px, 3.5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.showcase-copy > p:not(.view-label) { max-width: 470px; margin: 18px 0 0; color: var(--muted); font-size: 17px; }
.view-points { margin: 25px 0 0; padding: 0; list-style: none; }

.view-points li {
  position: relative;
  margin-top: 10px;
  padding-left: 20px;
  color: var(--text-soft);
  font-size: 14px;
}

.view-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 8px;
  height: 2px;
  border-radius: 99px;
  background: var(--accent);
}

.showcase-visual {
  min-width: 0;
  padding: clamp(24px, 4vw, 46px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpa-chat {
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.cpa-chat-head {
  min-height: 54px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.cpa-chat-head b { font-size: 14px; }
.cpa-chat-head span { color: var(--accent-text); font-size: 11px; font-weight: 800; }

.cpa-thread {
  min-height: 382px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  background: var(--bg-2);
}

.cpa-bubble {
  max-width: 92%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  transition: opacity .35s ease, transform .4s var(--ease);
}

.cpa-bubble.user {
  align-self: flex-end;
  border-color: var(--accent-line);
  border-radius: 15px 15px 5px 15px;
  background: var(--tint-strong);
  font-size: 14px;
}

.cpa-bubble.ai {
  align-self: flex-start;
  width: 100%;
  max-width: 100%;
  border-radius: 15px 15px 15px 5px;
  background: var(--surface);
}

.cpa-bubble.pending,
.cpa-answer.pending { opacity: 0; transform: translateY(8px); }

.cpa-ai-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 800;
}

/* The logo mark on a dark tile, in both themes, matching the landing page demos. */
.cpa-ai-mark {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  background: linear-gradient(145deg, #0b1316, #030607);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.cpa-ai-mark img {
  display: block;
  width: 80%;
  height: 80%;
}

.cpa-typed-intro { min-height: 19px; margin: 0 0 10px; color: var(--text); }

.cpa-typing {
  min-height: 42px;
  padding: 10px 14px;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.cpa-typing[hidden] { display: none; }

.cpa-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: cpa-typing-dot 1.1s infinite ease-in-out;
}

.cpa-typing i:nth-child(2) { animation-delay: .14s; }
.cpa-typing i:nth-child(3) { animation-delay: .28s; }
.cpa-typing span { margin-left: 6px; }

@keyframes cpa-typing-dot {
  0%, 65%, 100% { transform: translateY(0); opacity: .35; }
  35% { transform: translateY(-3px); opacity: 1; }
}

.cpa-answer-stack { display: grid; gap: 7px; }

.cpa-answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  transition: opacity .35s ease, transform .4s var(--ease);
}

.cpa-answer b { display: block; font-size: 12px; }
.cpa-answer small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.cpa-answer.action {
  display: block;
  border-color: var(--accent-line);
  background: var(--tint);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.cpa-answer.action b { margin-bottom: 2px; color: var(--accent-text); }

.signal-pill {
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.cpa-chat-foot {
  padding: 9px 17px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

/* ---------- CPA oversight ---------- */
.operating-section {
  width: var(--content);
  margin-inline: auto;
  padding: 48px 0 120px;
}

.operating-card {
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  border-block: 1px solid var(--line);
}

.review-loop { padding: 54px 50px 54px 0; }

.review-loop h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 42px;
}

.loop-step { padding-top: 16px; border-top: 1px solid var(--line); }
.loop-step span { color: var(--accent-text); font-size: 12px; font-weight: 800; }
.loop-step h3 { margin: 10px 0 7px; font-size: 19px; line-height: 1.25; }
.loop-step p { margin: 0; color: var(--muted); font-size: 14px; }

.capacity-callout {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--line);
  background: var(--tint);
}

.capacity-callout span { color: var(--accent-text); font-size: 13px; font-weight: 800; }

.capacity-callout strong {
  margin-top: 12px;
  font-size: clamp(29px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.capacity-callout p { margin: 14px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Partner CTA ---------- */
.cta {
  position: relative;
  width: var(--content);
  margin: 24px auto 70px;
  padding: clamp(32px, 4.5vw, 48px) clamp(26px, 5.5vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px clamp(34px, 7vw, 82px);
  overflow: hidden;
  border: 1px solid var(--accent-line);
  border-radius: 24px;
  background: var(--tint-strong), var(--surface);
  box-shadow: var(--shadow);
}

.cta::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -95px;
  top: -120px;
  border: 50px solid color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.cta-copy,
.cta-action,
.partner-panel { position: relative; z-index: 1; }

.cta .kicker { margin-bottom: 9px; }

.cta h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(32px, 4.1vw, 48px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -.035em;
}

.cta-copy > p:not(.kicker) { max-width: 680px; margin: 13px 0 0; color: var(--muted); font-size: 17px; }
.cta-action { min-width: 190px; text-align: center; }
.cta-action .button { min-width: 178px; }
.cta-action small { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }

.partner-panel {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: left;
}

.partner-panel.open { display: block; }
.partner-panel p { margin: 0 0 15px; color: var(--muted); font-size: 15px; }
.message-box { display: flex; align-items: center; gap: 12px; }

.message-box blockquote {
  flex: 1;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 15px;
}

.copy-btn {
  flex: 0 0 auto;
  min-height: 45px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--btn-secondary-bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.copy-btn:hover { background: var(--btn-secondary-bg-hover); }

/* ---------- Motion ---------- */
.motion-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity .66s var(--ease), transform .66s var(--ease); }
.motion-ready .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --content: min(100% - 34px, 760px); }
  .hero { grid-template-columns: 1fr; padding: 66px 0 90px; gap: 54px; }
  .hero-copy > p:not(.kicker) { max-width: 650px; }
  .grid-pad { width: 100%; max-width: 680px; margin-inline: auto; }
  .operations { padding: 92px 0 72px; }
  .showcase-panel { grid-template-columns: 1fr; }
  .showcase-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .operating-section { padding: 36px 0 92px; }
  .operating-card { grid-template-columns: 1fr; }
  .review-loop { padding: 46px 0; }
  .capacity-callout { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 560px) {
  :root { --content: calc(100% - 28px); }
  .hero { padding-top: 56px; }
  .hero .kicker { margin-bottom: 10px; font-size: 12px; }
  .hero h1 { font-size: 44px; line-height: 1.04; }
  .hero-copy > p:not(.kicker) { margin: 16px 0 26px; font-size: 18.4px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button,
  .cta-action .button { width: 100%; }
  .grid-pad,
  .showcase-pad { padding: 10px; border-radius: 25px; }
  .dashboard { border-radius: 18px; }
  .dash-head { padding: 16px; }
  .dash-head .count { font-size: 12px; }
  .dash-metrics { gap: 6px; padding: 10px 9px 2px; }
  .metric { padding: 10px 8px; }
  .metric strong { font-size: 19px; }
  .metric span { font-size: 10px; }
  .queue-label { padding-inline: 16px; }
  .queue { padding-inline: 8px; }
  .recommended { margin-inline: 9px; grid-template-columns: 1fr; }
  .recommended span { white-space: normal; }
  .client-row { grid-template-columns: 1fr auto; gap: 7px 12px; min-height: 78px; }
  .client-meta { grid-column: 1; }
  .status { grid-column: 2; grid-row: 1 / span 2; }
  .section-heading { margin-bottom: 34px; }
  .service-switcher { display: grid; grid-template-columns: 1fr 1fr; }
  .switch-btn { width: 100%; padding-inline: 10px; font-size: 12px; }
  .showcase-shell { min-height: 0; border-radius: 18px; }
  .showcase-panel { min-height: 0; }
  .showcase-copy { padding: 30px 22px; }
  .showcase-copy h3 { font-size: 32px; }
  .showcase-visual { padding: 16px 10px 12px; }
  .cpa-chat { border-radius: 14px; }
  .cpa-thread { min-height: 400px; padding: 12px; gap: 10px; }
  .cpa-bubble { max-width: 96%; padding: 11px 12px; }
  .cpa-answer { padding: 8px 9px; }
  .loop-steps { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; }
  .review-loop { padding: 42px 0; }
  .capacity-callout { padding: 34px 22px; }
  .cta { grid-template-columns: 1fr; gap: 24px; padding: 30px 22px; }
  .cta-action { min-width: 0; text-align: left; }
  .cta-action small { text-align: center; }
  .message-box { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .motion-ready .reveal { opacity: 1; transform: none; }
}
