/* ------------------------------------------------------------------
   /apps/cis

   Loaded after feature-page.css (dark hero, breadcrumb, title, intro) and
   integrations.css (hero grid, jump pills, eyebrows, band titles, accent
   colours). Everything specific to this page carries a `cs-` prefix.
   ------------------------------------------------------------------ */

/* Green is the default accent; integrations.css's .ix-accent-purple and
   .ix-accent-yellow override it. :where() keeps this at zero specificity. */
:where(.cs-step, .cs-line-step) {
  --accent: var(--green);
  --accent-soft: rgba(162, 185, 100, 0.16);
  --accent-ink: #5d7230;
}

.cs-beige {
  background: var(--bg);
}

/* ---------- Hero artwork: one client's tax month ---------- */

.cs-hero-art {
  width: 100%;
  max-width: 440px;
  justify-self: end;
}

.cs-hero-card {
  background: white;
  color: var(--primary);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.cs-hero-card-head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(34, 54, 60, 0.08);
}

.cs-hero-card-head img {
  width: 100%;
  height: auto;
}

.cs-hero-card-head strong,
.cs-hero-card-head small {
  display: block;
}

.cs-hero-card-head small {
  font-size: 0.8rem;
  color: #6b7a7e;
}

.cs-hero-chain {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.cs-hero-chain li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  font-size: 0.9rem;
  font-weight: 600;
}

/* The connector to the next step: solid once a step is done, a flowing dash
   out of the step in progress, a still dash after that. */
.cs-hero-chain li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: calc(50% + 11px);
  height: calc(100% - 22px);
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(93, 114, 48, 0.45) 0 4px, transparent 4px 9px);
}

.cs-hero-chain li.is-done::after {
  background: var(--green);
}

.cs-hero-chain li.is-now::after {
  animation: cs-flow 0.9s linear infinite;
}

@keyframes cs-flow {
  to {
    background-position: 0 9px;
  }
}

.cs-hero-dot {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 3px solid #d3dbbd;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.is-done .cs-hero-dot {
  background: var(--green);
  border-color: var(--green);
}

.is-now .cs-hero-dot {
  border-color: var(--green);
  animation: cs-ping 1.8s ease-out infinite;
}

@keyframes cs-ping {
  from {
    box-shadow: 0 0 0 0 rgba(162, 185, 100, 0.55);
  }
  to {
    box-shadow: 0 0 0 10px rgba(162, 185, 100, 0);
  }
}

.cs-hero-state {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1efe9;
  color: #6b7a7e;
  white-space: nowrap;
}

.is-done .cs-hero-state {
  background: rgba(162, 185, 100, 0.18);
  color: #5d7230;
}

.is-now .cs-hero-state {
  background: rgba(245, 204, 75, 0.3);
  color: #8a6a07;
}

/* ---------- What CIS Manager is ---------- */

.cs-about {
  padding: 88px 0;
  background: white;
}

.cs-about-text {
  max-width: 46em;
}

.cs-about-more {
  display: flex;
  justify-content: flex-end;
}

.cs-about-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.cs-about-head .ix-eyebrow {
  margin: 0;
}

.cs-about-icon {
  width: 56px;
  height: 56px;
  flex: none;
}

.cs-about-text .ix-group-body a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- The month at a glance ---------- */

.cs-month {
  padding: 88px 0 96px;
  scroll-margin-top: var(--header-height);
}

.cs-month-body {
  max-width: 40em;
}

.cs-line {
  position: relative;
  height: 250px;
  margin: 36px 18px 0;
}

.cs-line-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--green) 0 var(--end), var(--yellow) var(--end) 100%);
}

/* The month end: the 5th, where the tax month stops and the filing window starts. */
.cs-line-end {
  position: absolute;
  left: var(--end);
  top: -10px;
  height: 24px;
  border-left: 2px dashed rgba(47, 72, 80, 0.35);
}

.cs-line-pulse {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 3px var(--green), 0 0 14px var(--green);
  /* Linear, so each number's swell (cs-swell, delayed by its position) lands as the dot passes it. */
  animation: cs-travel 8s linear infinite;
}

@keyframes cs-travel {
  to {
    left: 100%;
  }
}

.cs-line-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-line-step {
  position: absolute;
  left: var(--at);
  top: 50%;
}

.cs-line-step a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cs-line-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: white;
  border: 3px solid var(--accent);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  /* The dot reaches a step at --pos% of the 8s trip; peak the swell then. */
  animation: cs-swell 8s linear infinite;
  animation-delay: calc(var(--pos) * 0.08s - 0.35s);
}

.cs-line-dot small {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7a7e;
  margin-bottom: 2px;
}

@keyframes cs-swell {
  0%,
  9%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  4.4% {
    transform: translate(-50%, -50%) scale(1.22);
  }
}

.cs-line-step a:hover .cs-line-dot {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.08);
}

.cs-line-label {
  position: absolute;
  left: 0;
  bottom: 33px;
  transform: translateX(-50%);
  display: grid;
  gap: 2px;
  width: max-content;
  max-width: 180px;
  text-align: center;
}

.cs-line-step.is-below .cs-line-label {
  bottom: auto;
  top: 33px;
}

.cs-line-step:first-child .cs-line-label {
  transform: translateX(-24px);
  text-align: left;
}

.cs-line-step:last-child .cs-line-label {
  transform: translateX(calc(-100% + 24px));
  text-align: right;
}

.cs-line-label strong {
  font-size: 1rem;
  color: var(--primary);
}

.cs-line-label small {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.cs-line-spans {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: var(--end) minmax(0, 1fr);
  font-size: 0.82rem;
  color: #6b7a7e;
}

.cs-line-span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  margin-right: 6px;
  border-top: 2px solid rgba(162, 185, 100, 0.6);
}

.cs-line-span-file {
  margin: 0 0 0 6px;
  border-top-color: rgba(245, 204, 75, 0.85);
}

.cs-line-span strong {
  color: var(--primary);
}

/* ---------- Sticky step tracker over the step bands ---------- */

.cs-tracker {
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(34, 54, 60, 0.08);
  box-shadow: 0 6px 18px rgba(34, 54, 60, 0.06);
}

body:has(.promo-banner) .cs-tracker {
  top: calc(var(--promo-banner-height) + var(--header-height));
}

.cs-tracker ol {
  list-style: none;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.cs-tracker a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 11px;
  border-bottom: 3px solid transparent;
  color: #6b7a7e;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cs-tracker a:hover {
  color: var(--primary);
}

.cs-tracker a.is-active {
  color: var(--primary);
  border-bottom-color: var(--green);
}

.cs-tracker-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(34, 54, 60, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.cs-tracker a.is-active .cs-tracker-num {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

/* ---------- Bands: one per step, plus set-up and the extras ---------- */

.cs-step {
  padding: 96px 0;
  background: white;
  scroll-margin-top: calc(var(--header-height) + 56px);
  /* The tilted shape behind each screenshot pokes past narrow screens; clip keeps the sticky tracker working. */
  overflow-x: clip;
}

.cs-step.cs-beige {
  background: var(--bg);
}

body:has(.promo-banner) .cs-step {
  scroll-margin-top: calc(var(--promo-banner-height) + var(--header-height) + 56px);
}

.cs-step-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}

.cs-step-flip .cs-step-inner {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.cs-step-flip .cs-step-text {
  order: 2;
}

.cs-step-num {
  display: block;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent);
  opacity: 0.55;
  margin-bottom: 10px;
}

/* A soft block of the band's accent behind the screenshots. */
.cs-step-media {
  position: relative;
}

.cs-step-media::before {
  content: "";
  position: absolute;
  inset: -6% -4%;
  border-radius: 32px;
  background: var(--accent-soft);
  transform: rotate(-2deg);
}

.cs-step-flip .cs-step-media::before {
  transform: rotate(2deg);
}

/* ---------- Screenshot frame ---------- */

.cs-shot {
  position: relative;
  z-index: 1;
  margin: 0;
  background: white;
  border-radius: 14px;
  border: 1px solid rgba(34, 54, 60, 0.08);
  box-shadow: 0 24px 60px rgba(34, 54, 60, 0.16);
  overflow: hidden;
}

.cs-shot-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #f4f1ea;
  border-bottom: 1px solid rgba(34, 54, 60, 0.06);
}

.cs-shot-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
}

.cs-shot-bar i:nth-child(2) {
  background: var(--yellow);
}

.cs-shot-bar i:nth-child(3) {
  background: var(--green);
}

.cs-shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Two screenshots: the second, smaller, overlapping the first's lower corner. */
.cs-shot-small {
  width: 58%;
  margin: -12% 0 0 auto;
  box-shadow: 0 28px 64px rgba(34, 54, 60, 0.24);
}

.cs-step-flip .cs-shot-small {
  margin-left: 0;
  margin-right: auto;
}

/* ---------- Drawn illustrations beside each step ---------- */

.cs-art {
  width: 100%;
  max-width: 440px;
  margin: 4px 0 0;
  padding: 14px 16px;
  background: white;
  border-radius: 14px;
  border: 1px solid rgba(34, 54, 60, 0.08);
  box-shadow: 0 10px 30px rgba(34, 54, 60, 0.08);
  color: var(--primary);
}

.cs-art strong,
.cs-art small {
  display: block;
}

.cs-art small {
  font-size: 0.84rem;
  color: #6b7a7e;
  margin-top: 2px;
}

.cs-art-rows {
  list-style: none;
  display: grid;
  gap: 10px;
}

.cs-art-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(34, 54, 60, 0.14);
}

.cs-art-rows li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.cs-art-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.cs-art-detail {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: #46585e;
}

.cs-art-detail strong {
  display: inline;
  color: var(--primary);
}

.cs-art-stop {
  color: #b4442f;
  font-weight: 700;
}

.cs-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.cs-chip-ok {
  background: rgba(162, 185, 100, 0.2);
  color: #5d7230;
}

.cs-chip-wait {
  background: rgba(245, 204, 75, 0.28);
  color: #8a6a07;
}

.cs-art-rows li.cs-art-flag {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(245, 204, 75, 0.18);
  color: #8a6a07;
  font-size: 0.85rem;
  font-weight: 600;
}

.cs-art-flag svg {
  flex: none;
}

.cs-art-bubble,
.cs-art-accepted {
  display: flex;
  gap: 14px;
  align-items: center;
}

.cs-art-bell {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  animation: cs-ring 4s ease-in-out infinite;
}

@keyframes cs-ring {
  0%,
  80%,
  100% {
    transform: rotate(0);
  }
  84% {
    transform: rotate(-14deg);
  }
  88% {
    transform: rotate(12deg);
  }
  92% {
    transform: rotate(-8deg);
  }
  96% {
    transform: rotate(4deg);
  }
}

.cs-art-return {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: space-between;
}

.cs-art-buttons {
  display: flex;
  gap: 8px;
}

.cs-art-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(34, 54, 60, 0.18);
  font-size: 0.85rem;
  font-weight: 600;
}

.cs-art-btn-go {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.cs-art-stamp {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: white;
  animation: cs-ping 2.4s ease-out infinite;
}

/* ---------- The extras: nil returns, one client record, your brand ---------- */

.cs-extras {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.cs-extras li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  line-height: 1.6;
  color: #46585e;
}

.cs-extras strong {
  display: block;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.cs-extras-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* ---------- Call to action ---------- */

/* The pricing band's drawing sits where the other bands have a screenshot. */
.cs-price-art {
  position: relative;
  margin: 0 auto;
}

.cs-cta {
  padding: 88px 0;
  background: white;
}

.cs-cta .section-header {
  margin-bottom: 0;
}

.cs-cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .cs-hero-chain li.is-now::after,
  .is-now .cs-hero-dot,
  .cs-art-bell,
  .cs-art-stamp {
    animation: none;
  }

  .cs-line-pulse {
    display: none;
  }

  .cs-line-dot {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .cs-hero-art {
    justify-self: center;
  }
}

@media (max-width: 860px) {
  .cs-about {
    padding: 64px 0;
  }
}

@media (max-width: 860px) {
  .cs-month,
  .cs-step,
  .cs-cta {
    padding: 64px 0;
  }

  .cs-step-inner,
  .cs-step-flip .cs-step-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .cs-step-flip .cs-step-text {
    order: 0;
  }

  .cs-step-num {
    font-size: 3.6rem;
  }

  /* The timeline turns on its side: a vertical line with the steps listed down it. */
  .cs-line {
    height: auto;
    margin: 32px 0 0;
  }

  .cs-line-track {
    left: 22px;
    right: auto;
    top: 24px;
    bottom: 24px;
    width: 4px;
    height: auto;
    margin: 0;
    background: linear-gradient(to bottom, var(--green) 0 var(--end), var(--yellow) var(--end) 100%);
  }

  .cs-line-end,
  .cs-line-pulse,
  .cs-line-spans {
    display: none;
  }

  .cs-line-steps {
    position: relative;
    display: grid;
    gap: 20px;
  }

  .cs-line-step {
    position: static;
  }

  .cs-line-step a {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .cs-line-dot,
  .cs-line-step a:hover .cs-line-dot {
    position: relative;
    flex: none;
    transform: none;
    animation: none;
  }

  .cs-line-label,
  .cs-line-step.is-below .cs-line-label,
  .cs-line-step:first-child .cs-line-label,
  .cs-line-step:last-child .cs-line-label {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  /* Numbers only on the tracker, with the current step named. */
  .cs-tracker-label {
    display: none;
  }

  .cs-tracker a.is-active .cs-tracker-label {
    display: inline;
  }

  .cs-tracker a {
    font-size: 0.86rem;
    gap: 8px;
  }

  .cs-shot-small {
    width: 72%;
    margin-top: -8%;
  }

  .cs-hero-card {
    padding: 18px 16px;
  }

  .cs-hero-chain li {
    font-size: 0.84rem;
    gap: 10px;
  }
}
