/**
 * iPath Solutions - Single Portfolio Case Study
 * Standard case study structure (single-portfolios.php): editorial reading layout.
 */

.cs-page {
  /* Theme palette (scss/_variables.scss) */
  --cs-ink: var(--color-primary, #1B3A5C);
  --cs-text: var(--color-text, #4A4A4A);
  --cs-muted: #595E64;
  --cs-blue: var(--color-secondary, #0B63AE);
  --cs-blue-vivid: var(--color-brand-blue, #0065ab);
  --cs-accent: var(--color-accent, #005590);
  --cs-dark: var(--color-bg-dark, #122438);
  --cs-blue-soft: rgba(11, 99, 174, 0.06);
  --cs-blue-line: rgba(11, 99, 174, 0.15);
  --cs-border: var(--color-border, #dce4eb);
  --cs-tint: var(--color-bg-light, #f4f9fc);
  --cs-card: #FFFFFF;
  --cs-radius: 16px;
  --cs-shadow: 0 4px 20px rgba(11, 99, 174, 0.04);

  font-family: var(--font-primary, 'Inter', sans-serif);
  color: var(--cs-text);
  background: #FFFFFF;
  font-size: 17px;
  line-height: 1.7;
  /* clip (not hidden) so sticky panels inside still stick; hidden is the fallback */
  overflow-x: hidden;
  overflow-x: clip;
}

.cs-page *,
.cs-page *::before,
.cs-page *::after {
  box-sizing: border-box;
}

.cs-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.cs-container--wide {
  max-width: 1180px;
}

/* ==========================================================================
   Hero: title & summary
   ========================================================================== */
.cs-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 8vw, 104px) 0 clamp(56px, 8vw, 96px);
  background: linear-gradient(180deg, var(--cs-tint) 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--cs-border);
}

/* Decorative background: soft glows + fading grid */
.cs-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cs-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.cs-hero-glow--1 {
  top: -18%;
  right: -8%;
  width: 46vw;
  max-width: 640px;
  aspect-ratio: 1;
  background: rgba(11, 99, 174, 0.16);
  animation: cs-drift 18s ease-in-out infinite alternate;
}

.cs-hero-glow--2 {
  bottom: -30%;
  left: -10%;
  width: 36vw;
  max-width: 520px;
  aspect-ratio: 1;
  background: rgba(0, 101, 171, 0.12);
  animation: cs-drift 22s ease-in-out infinite alternate-reverse;
}

.cs-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 99, 174, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 174, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 30%, #000 0%, transparent 75%);
}

@keyframes cs-drift {
  to { transform: translate3d(-40px, 30px, 0) scale(1.08); }
}

/* Layout: copy left, image right */
.cs-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 5vw, 64px);
  align-items: center;
}

.cs-hero.has-media .cs-hero-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.cs-hero:not(.has-media) .cs-hero-copy {
  max-width: 860px;
}

.cs-hero-copy > * {
  animation: cs-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.cs-hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.cs-hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.cs-hero-copy > :nth-child(4) { animation-delay: 0.24s; }

@keyframes cs-rise {
  from { opacity: 0; transform: translateY(16px); }
}

.cs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0.875rem 1.75rem;
  border-radius: 0.375rem;
  background: var(--cs-blue);
  color: #FFFFFF !important;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(11, 99, 174, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.cs-btn:hover {
  background: var(--cs-accent);
  box-shadow: 0 10px 25px rgba(11, 99, 174, 0.3);
}

.cs-btn svg {
  transition: transform 0.25s ease;
}

.cs-btn:hover svg {
  transform: translateX(3px);
}

/* Image: framed browser window with a soft glow and gentle tilt */
.cs-hero-visual {
  position: relative;
  perspective: 1600px;
  animation: cs-rise 0.9s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.cs-hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% 6% -6% 10%;
  z-index: -1;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(11, 99, 174, 0.35), rgba(0, 101, 171, 0.25));
  filter: blur(40px);
}

.cs-hero-window {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid rgba(220, 228, 235, 0.9);
  box-shadow: 0 30px 80px rgba(18, 36, 56, 0.18), 0 2px 6px rgba(18, 36, 56, 0.06);
  transform: rotateY(-6deg) rotateX(2deg);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cs-hero-visual:hover .cs-hero-window {
  transform: rotateY(0) rotateX(0);
}

.cs-hero-window-bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  background: var(--cs-tint);
  border-bottom: 1px solid var(--cs-border);
}

.cs-hero-window-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cs-border);
}


.cs-hero-window-body {
  display: block;
  aspect-ratio: 16 / 10;
  background: #FFFFFF;
}

.cs-hero-window-body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Diagrams are shown whole, never cropped */
.cs-hero-window.is-diagram .cs-hero-window-body {
  aspect-ratio: auto;
  padding: clamp(12px, 2vw, 20px);
}

.cs-hero-window.is-diagram .cs-hero-window-body img {
  height: auto;
  object-fit: contain;
}

.cs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(11, 99, 174, 0.06);
  border: 1px solid rgba(11, 99, 174, 0.15);
  color: var(--cs-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cs-blue);
  box-shadow: 0 0 8px var(--cs-blue);
}

.cs-title {
  margin: 22px 0 0;
  color: var(--cs-ink);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  text-wrap: balance;
  text-transform: capitalize;
}

.cs-summary {
  margin: 22px 0 0;
  max-width: 620px;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--cs-text);
}

.cs-hero:not(.has-media) .cs-summary {
  max-width: 760px;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.cs-section {
  padding: clamp(48px, 7vw, 88px) 0;
}

.cs-section--tint {
  background: var(--cs-tint);
  border-top: 1px solid var(--cs-border);
  border-bottom: 1px solid var(--cs-border);
}

.cs-section--tint + .cs-section--tint {
  border-top: 0;
}

.cs-h2 {
  margin: 0 0 32px;
  color: var(--cs-ink);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  font-weight: 800;
  text-transform: capitalize;
}

.cs-lead {
  margin: 0 0 24px;
  font-size: 1.08rem;
  color: var(--cs-text);
}

.cs-lead:last-child {
  margin-bottom: 0;
}

.cs-prose > :first-child {
  margin-top: 0;
}

.cs-prose > :last-child {
  margin-bottom: 0;
}

.cs-prose p {
  margin: 0 0 1em;
  font-size: 1.08rem;
}

.cs-prose strong {
  color: var(--cs-ink);
  font-weight: 700;
}

.cs-prose a {
  color: var(--cs-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-prose ul,
.cs-prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

/* ==========================================================================
   Overview: display statement
   ========================================================================== */
.cs-ov {
  --p: 0;
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 9vw, 120px) 0;
  background:
    radial-gradient(50% 60% at 100% 50%, rgba(11, 99, 174, 0.06), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--cs-tint) 50%, #FFFFFF 100%);
}

.cs-ov-grid {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 8.8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.cs-ov-side {
  position: sticky;
  top: 120px;
}

.cs-ov-side .cs-h2 {
  margin-bottom: 36px;
}

/* Orbit graphic */
.cs-ov-orb {
  position: relative;
  width: 168px;
  aspect-ratio: 1;
}

.cs-ov-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(11, 99, 174, 0.25);
  animation: cs-spin 18s linear infinite;
}

.cs-ov-ring--1 { inset: 0; }
.cs-ov-ring--2 { inset: 22px; border-style: solid; border-color: rgba(11, 99, 174, 0.16); animation-duration: 12s; animation-direction: reverse; }
.cs-ov-ring--3 { inset: 46px; border-color: rgba(0, 101, 171, 0.3); animation-duration: 8s; }

.cs-ov-ring i {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--cs-blue);
  box-shadow: 0 0 0 4px rgba(11, 99, 174, 0.12), 0 0 16px rgba(11, 99, 174, 0.6);
}

.cs-ov-ring--2 i { width: 8px; height: 8px; margin-left: -4px; top: -4px; background: var(--cs-accent); }
.cs-ov-ring--3 i { width: 6px; height: 6px; margin-left: -3px; top: -3px; background: var(--cs-blue-vivid); }

.cs-ov-core {
  position: absolute;
  inset: 66px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--cs-blue), var(--cs-blue-vivid) 55%, var(--cs-ink));
  box-shadow: 0 10px 30px rgba(11, 99, 174, 0.45), inset 0 -6px 12px rgba(18, 36, 56, 0.35);
  animation: cs-pulse 3.2s ease-in-out infinite;
}

@keyframes cs-spin {
  to { transform: rotate(360deg); }
}

@keyframes cs-pulse {
  50% { transform: scale(1.12); box-shadow: 0 14px 40px rgba(11, 99, 174, 0.6), inset 0 -6px 12px rgba(18, 36, 56, 0.35); }
}

/* Reading progress */
.cs-ov-progress {
  width: 168px;
  height: 4px;
  margin-top: 32px;
  border-radius: 4px;
  background: var(--cs-border);
  overflow: hidden;
}

.cs-ov-progress i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cs-blue), var(--cs-blue-vivid), var(--cs-blue-vivid));
  transform: scaleX(var(--p));
  transform-origin: left;
}

.cs-ov:not(.is-scrub) .cs-ov-progress {
  display: none;
}

/* Statement */
.cs-ov-body {
  position: relative;
  padding-top: 8px;
}

.cs-ov-quote {
  position: absolute;
  top: -0.42em;
  left: -0.08em;
  z-index: -1;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(9rem, 16vw, 14rem);
  line-height: 1;
  background: linear-gradient(135deg, rgba(11, 99, 174, 0.16), rgba(0, 101, 171, 0.04));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.cs-ov-text p {
  margin: 0 0 0.8em;
  color: var(--cs-ink);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.cs-ov-text p:last-child {
  margin-bottom: 0;
}

/* Paragraphs after the first read a size down */
.cs-ov-text p + p {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.cs-ov-text strong,
.cs-ov-text b {
  font-weight: 800;
  color: var(--cs-blue);
}

.cs-ov-text a {
  color: var(--cs-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Scroll scrub: words start pale and light up in reading order */
.cs-ov.is-scrub .cs-w {
  color: #C5CEDC;
  transition: color 0.35s ease;
}

.cs-ov.is-scrub .cs-w.is-lit {
  color: var(--cs-ink);
}

.cs-ov.is-scrub strong .cs-w.is-lit,
.cs-ov.is-scrub b .cs-w.is-lit {
  color: var(--cs-blue);
}

/* ==========================================================================
   Project snapshot
   ========================================================================== */
.cs-snap-section {
  position: relative;
  isolation: isolate;
}

/* Faint dot field behind the grid */
.cs-snap-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(11, 99, 174, 0.12) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 55%, #000, transparent 80%);
  mask-image: radial-gradient(60% 70% at 50% 55%, #000, transparent 80%);
}

.cs-snap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  margin: 0;
}

.cs-snap-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 26px 26px 24px;
  border-radius: var(--cs-radius);
  background:
    radial-gradient(260px circle at var(--mx) var(--my), rgba(11, 99, 174, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 252, 0.96));
  border: 1px solid var(--cs-border);
  box-shadow: 0 1px 2px rgba(18, 36, 56, 0.04), 0 12px 32px rgba(11, 99, 174, 0.05);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

/* Gradient border revealed on hover */
.cs-snap-card::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--cs-blue-vivid), var(--cs-blue-vivid) 50%, var(--cs-accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.cs-snap-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(11, 99, 174, 0.14);
}

.cs-snap-card:hover::after {
  opacity: 1;
}

.cs-snap-card.span-2 { grid-column: span 2; }
.cs-snap-card.span-3 { grid-column: span 3; }

.cs-snap-idx {
  position: absolute;
  top: 18px;
  right: 22px;
  color: rgba(11, 99, 174, 0.12);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.cs-snap-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cs-blue-soft), #FFFFFF);
  border: 1px solid var(--cs-blue-line);
  color: var(--cs-blue-vivid);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cs-snap-card:hover .cs-snap-ico {
  transform: rotate(-6deg) scale(1.06);
}

.cs-snap-ico svg {
  width: 22px;
  height: 22px;
}

.cs-snap dt {
  margin: 0 0 8px;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cs-snap dd {
  margin: 0;
  color: var(--cs-ink);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.55;
}

.cs-snap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.cs-snap-chips li {
  margin: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--cs-border);
  color: var(--cs-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(18, 36, 56, 0.04);
}

/* Lead card (first row, e.g. Client): dark gradient, two rows tall */
.cs-snap-card.is-lead {
  grid-row: span 2;
  justify-content: flex-end;
  min-height: 354px;
  padding: 32px;
  border: 0;
  background:
    radial-gradient(320px circle at var(--mx) var(--my), rgba(11, 99, 174, 0.22), transparent 60%),
    radial-gradient(80% 60% at 100% 0%, rgba(11, 99, 174, 0.45), transparent 70%),
    linear-gradient(150deg, var(--cs-dark) 0%, var(--cs-ink) 100%);
  box-shadow: 0 30px 60px rgba(18, 36, 56, 0.28);
}

/* Orbit rings on the lead card */
.cs-snap-card.is-lead::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.03), 0 0 0 80px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.cs-snap-card.is-lead .cs-snap-idx {
  color: rgba(255, 255, 255, 0.10);
  font-size: 64px;
}

.cs-snap-card.is-lead .cs-snap-ico {
  width: 56px;
  height: 56px;
  margin-bottom: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cs-snap-card.is-lead .cs-snap-ico svg {
  width: 26px;
  height: 26px;
}

.cs-snap-card.is-lead dt {
  margin-top: 40px;
  color: #CBD5E1;
}

.cs-snap-card.is-lead dd {
  color: #FFFFFF;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.cs-snap-card.is-lead .cs-snap-chips li {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

/* Staggered reveal (only once JS has armed it, so content never stays hidden) */
.cs-snap.is-armed .cs-snap-card {
  opacity: 0;
  transform: translateY(24px);
}

.cs-snap.is-armed.is-in .cs-snap-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease calc(var(--i) * 70ms), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 70ms), box-shadow 0.35s ease;
}

.cs-snap.is-armed.is-in .cs-snap-card:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}

/* ==========================================================================
   Points: bold lead-in + text
   ========================================================================== */
.cs-point-title {
  color: var(--cs-ink);
  font-weight: 700;
  text-transform: capitalize;
}

/* ==========================================================================
   The challenge: dark "problem zone"
   ========================================================================== */
.cs-ch {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 10vw, 128px) 0;
  background: linear-gradient(160deg, var(--cs-dark) 0%, var(--cs-dark) 50%, var(--cs-ink) 100%);
  color: #CBD5E1;
}

.cs-ch-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cs-ch-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.cs-ch-glow--1 {
  top: -20%;
  left: -10%;
  width: 50vw;
  max-width: 680px;
  aspect-ratio: 1;
  background: rgba(11, 99, 174, 0.28);
  animation: cs-drift 20s ease-in-out infinite alternate;
}

.cs-ch-glow--2 {
  bottom: -30%;
  right: -10%;
  width: 46vw;
  max-width: 620px;
  aspect-ratio: 1;
  background: rgba(0, 85, 144, 0.30);
  animation: cs-drift 24s ease-in-out infinite alternate-reverse;
}

.cs-ch-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent 80%);
  mask-image: radial-gradient(80% 70% at 50% 40%, #000, transparent 80%);
}

/* Slow scan line sweeping down the section */
.cs-ch-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 20%;
  background: linear-gradient(180deg, transparent, rgba(11, 99, 174, 0.05) 70%, rgba(11, 99, 174, 0.18) 100%);
  border-bottom: 1px solid rgba(11, 99, 174, 0.25);
  animation: cs-scan 9s linear infinite;
}

@keyframes cs-scan {
  to { transform: translateY(600%); }
}

/* Header */
.cs-ch-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.cs-ch .cs-h2 {
  margin: 0;
  color: #FFFFFF;
}

.cs-ch-count {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cs-ch-count-num {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  text-shadow: 0 0 40px rgba(11, 99, 174, 0.6);
}

.cs-ch-count-lbl {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Cards */
.cs-ch-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 26px 26px 28px;
  border-radius: var(--cs-radius);
  background:
    radial-gradient(280px circle at var(--mx) var(--my), rgba(11, 99, 174, 0.22), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Warning bar that grows across the top on hover */
.cs-ch-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cs-blue);
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cs-ch-card:hover {
  transform: translateY(-4px);
  border-color: rgba(11, 99, 174, 0.6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.cs-ch-card:hover::before {
  transform: scaleX(1);
}

.cs-ch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.cs-ch-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--cs-blue);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(11, 99, 174, 0.35);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease;
}

.cs-ch-card:hover .cs-ch-ico {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 10px 25px rgba(11, 99, 174, 0.5);
}

.cs-ch-ico svg {
  width: 22px;
  height: 22px;
}

.cs-ch-idx {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.cs-ch-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.65;
}

.cs-ch-text .cs-point-title {
  display: block;
  margin-bottom: 6px;
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* Staggered drop-in (only once JS has armed it) */
.cs-ch.is-armed .cs-ch-card {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
}

.cs-ch.is-armed.is-in .cs-ch-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease calc(var(--i) * 90ms), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 90ms), border-color 0.35s ease, box-shadow 0.35s ease;
}

.cs-ch.is-armed.is-in .cs-ch-card:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}

/* ==========================================================================
   Our approach: editorial rows with giant outlined step numbers
   ========================================================================== */
.cs-ap {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 0;
  background: #FFFFFF;
}

.cs-ap-head {
  margin-bottom: clamp(32px, 5vw, 56px);
}

.cs-ap-head .cs-h2 {
  margin: 0;
}

.cs-ap-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--cs-border);
}

/* Row: number | icon + title | description | arrow */
.cs-ap-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: clamp(130px, 14vw, 200px) minmax(0, 1fr) minmax(0, 1.3fr) 48px;
  align-items: center;
  gap: 24px clamp(20px, 3vw, 48px);
  margin: 0;
  padding: clamp(24px, 3vw, 36px) clamp(12px, 2vw, 24px);
  border-top: 1px solid var(--cs-border);
}

/* Tint that sweeps in from the left on hover */
.cs-ap-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(11, 99, 174, 0.07), rgba(11, 99, 174, 0.02));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cs-ap-row:hover::before {
  transform: scaleX(1);
}

/* Giant outlined number; fills blue on hover */
.cs-ap-num {
  color: transparent;
  -webkit-text-stroke: 2px rgba(11, 99, 174, 0.35);
  font-size: clamp(4.5rem, 8vw, 7.5rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s ease, -webkit-text-stroke-color 0.4s ease;
}

.cs-ap-row:hover .cs-ap-num {
  color: var(--cs-blue);
  -webkit-text-stroke-color: var(--cs-blue);
}

.cs-ap-head-col {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cs-ap-ico {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(11, 99, 174, 0.06);
  border: 1px solid rgba(11, 99, 174, 0.15);
  color: var(--cs-blue);
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.cs-ap-ico svg {
  width: 22px;
  height: 22px;
}

.cs-ap-row:hover .cs-ap-ico {
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(11, 99, 174, 0.3);
}

.cs-ap-title {
  margin: 0;
  color: var(--cs-ink);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  transition: color 0.3s ease;
  text-transform: capitalize;
}

.cs-ap-row:hover .cs-ap-title {
  color: var(--cs-blue);
}

.cs-ap-desc {
  margin: 0;
  color: var(--cs-text);
  font-size: 1.08rem;
  line-height: 1.65;
}

/* Arrow slides in on hover */
.cs-ap-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--cs-border);
  color: var(--cs-muted);
  opacity: 0.5;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.cs-ap-arrow svg {
  width: 20px;
  height: 20px;
}

.cs-ap-row:hover .cs-ap-arrow {
  opacity: 1;
  transform: none;
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  color: #FFFFFF;
}

/* Rows fade up in turn (only once JS has armed the list) */
.cs-ap-rows.is-armed .cs-ap-row {
  opacity: 0;
  transform: translateY(24px);
}

.cs-ap-rows.is-armed.is-in .cs-ap-row {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease calc(var(--i) * 110ms), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 110ms);
}

/* ==========================================================================
   Adaptive card grids (columns picked from the item count in PHP)
   ========================================================================== */
.cs-grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-grid > * {
  grid-column: span var(--span, 1);
}

/* Shared staggered reveal (JS adds is-armed, then is-in) */
.is-armed > .cs-rs-card {
  opacity: 0;
  transform: translateY(22px);
}

.is-armed.is-in > .cs-rs-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease calc(var(--i) * 60ms), transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 60ms), border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

/* ==========================================================================
   What we built: modules shown as the product's own app
   ========================================================================== */
.cs-md {
  position: relative;
  isolation: isolate;
  padding: clamp(72px, 10vw, 120px) 0;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(11, 99, 174, 0.10), transparent 70%),
    var(--cs-tint);
  border-top: 1px solid var(--cs-border);
  border-bottom: 1px solid var(--cs-border);
}

/* Head (shared with Tech stack) */
.cs-md-head,
.cs-ts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.cs-md-head {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.cs-md-head .cs-h2,
.cs-ts-head .cs-h2 {
  margin: 0;
}

.cs-md-head-text {
  max-width: 760px;
}

.cs-md-intro {
  margin-top: 14px;
  color: var(--cs-text);
  font-size: 1.12rem;
  line-height: 1.65;
}

.cs-md-intro p {
  margin: 0 0 0.6em;
  color: inherit;
}

.cs-md-intro p:last-child {
  margin-bottom: 0;
}

.cs-md-intro strong {
  color: var(--cs-blue);
  font-weight: 700;
}

.cs-md-count {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-md-count b {
  color: var(--cs-blue);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

/* App window */
.cs-app {
  overflow: hidden;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--cs-border);
  box-shadow: 0 40px 100px rgba(18, 36, 56, 0.16), 0 2px 8px rgba(18, 36, 56, 0.05);
}

.cs-app-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--cs-border);
}

.cs-app-dots {
  display: flex;
  gap: 7px;
}

.cs-app-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cs-border);
}

.cs-app-url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  justify-content: center;
  padding: 6px 18px;
  border-radius: 100px;
  background: var(--cs-tint);
  border: 1px solid var(--cs-border);
  color: var(--cs-muted);
  font-size: 13px;
  font-weight: 600;
}

.cs-app-url svg {
  width: 13px;
  height: 13px;
  color: var(--cs-blue);
}

.cs-app-body {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  min-height: 520px;
}

/* Sidebar (navy, like the product's menu) */
.cs-app-side {
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  background: linear-gradient(180deg, var(--cs-ink) 0%, var(--cs-dark) 100%);
}

.cs-app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cs-app-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cs-blue);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(11, 99, 174, 0.45);
}

.cs-app-brand-name {
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cs-app-side-label {
  padding: 0 10px 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-app-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-app-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.cs-app-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.cs-app-item:focus-visible {
  outline: 2px solid #FFFFFF !important;
  outline-offset: -2px;
}

.cs-app-item.is-active {
  background: var(--cs-blue);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(11, 99, 174, 0.4);
}

.cs-app-item-ico {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.cs-app-item-ico svg {
  width: 19px;
  height: 19px;
}

.cs-app-item-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cs-app-item-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  text-transform: capitalize;
}

/* Inline descriptions are for small screens only (the screen shows them on desktop) */
.cs-app-item-desc {
  display: none;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.5;
}

/* Main screen */
.cs-app-main {
  display: grid;
  padding: clamp(24px, 3vw, 40px);
  background:
    linear-gradient(rgba(11, 99, 174, 0.035) 1px, transparent 1px) 0 0 / 100% 32px,
    #FFFFFF;
}

.cs-app-panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.4s;
}

.cs-app-panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.4s ease 0.08s, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s, visibility 0s;
}

.cs-app-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 26px;
  color: var(--cs-muted);
  font-size: 13px;
}

.cs-app-crumbs svg {
  width: 13px;
  height: 13px;
}

.cs-app-crumbs b {
  color: var(--cs-ink);
  font-weight: 700;
  text-transform: capitalize;
}

.cs-app-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.cs-app-hero-ico {
  display: grid;
  place-items: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--cs-blue);
  color: #FFFFFF;
  box-shadow: 0 12px 28px rgba(11, 99, 174, 0.35);
}

.cs-app-hero-ico svg {
  width: 28px;
  height: 28px;
}

.cs-app-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--cs-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-app-title {
  margin: 0;
  color: var(--cs-ink);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  text-transform: capitalize;
}

.cs-app-text {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--cs-text);
  font-size: 1.12rem;
  line-height: 1.65;
}

/* Placeholder UI: stat tiles, a chart and list rows */
.cs-app-ui {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
}

.cs-app-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cs-app-stats span {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  background: var(--cs-tint);
  border: 1px solid var(--cs-border);
}

.cs-app-stats i,
.cs-app-stats b,
.cs-app-rows span {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #E6EDF4 0%, #F4F8FB 50%, #E6EDF4 100%);
  background-size: 200% 100%;
  animation: cs-app-shimmer 2.4s ease-in-out infinite;
}

.cs-app-stats i {
  width: 45%;
  height: 8px;
}

.cs-app-stats b {
  width: 70%;
  height: 16px;
  background: linear-gradient(90deg, rgba(11, 99, 174, 0.35), rgba(11, 99, 174, 0.15));
  animation: none;
}

@keyframes cs-app-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.cs-app-panes {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
}

.cs-app-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 130px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
}

.cs-app-chart i {
  flex: 1;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--cs-blue), rgba(11, 99, 174, 0.35));
  transform: scaleY(0);
  transform-origin: bottom;
}

.cs-app-panel.is-active .cs-app-chart i {
  transform: scaleY(1);
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.15s + var(--b) * 50ms);
}

.cs-app-rows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
}

.cs-app-rows span {
  height: 10px;
}

.cs-app-rows span:nth-child(2) { width: 80%; }
.cs-app-rows span:nth-child(3) { width: 92%; }
.cs-app-rows span:nth-child(4) { width: 60%; }

/* ==========================================================================
   Architecture: diagram on a blueprint canvas
   ========================================================================== */
.cs-arch {
  padding: clamp(72px, 10vw, 120px) 0;
  background: #FFFFFF;
}

.cs-arch-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.cs-arch-head .cs-h2 {
  margin: 0;
}

.cs-arch-fig {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--cs-border);
  box-shadow: 0 30px 80px rgba(18, 36, 56, 0.1), 0 2px 8px rgba(18, 36, 56, 0.04);
}

/* Top bar: window dots, caption, full-size link */
.cs-arch-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid var(--cs-border);
  background: #FFFFFF;
}

.cs-arch-dots {
  display: flex;
  gap: 7px;
}

.cs-arch-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--cs-border);
}

.cs-arch-caption {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--cs-ink);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-transform: capitalize;
}

.cs-arch-zoom {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--cs-border);
  color: var(--cs-blue) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.cs-arch-zoom svg {
  width: 14px;
  height: 14px;
}

.cs-arch-zoom:hover {
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  color: #FFFFFF !important;
}

/* Canvas: dotted blueprint grid with corner marks */
.cs-arch-canvas {
  position: relative;
  display: block;
  padding: clamp(20px, 4vw, 48px);
  background:
    radial-gradient(rgba(11, 99, 174, 0.14) 1px, transparent 1.3px) 0 0 / 20px 20px,
    var(--cs-tint);
}

.cs-arch-canvas img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cs-arch-canvas:hover img {
  transform: scale(1.01);
}

.cs-arch-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--cs-blue);
  opacity: 0.6;
}

.cs-arch-corner--tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.cs-arch-corner--tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-top-right-radius: 4px; }
.cs-arch-corner--bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-bottom-left-radius: 4px; }
.cs-arch-corner--br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }

/* ==========================================================================
   Tech stack: dark code-editor panel
   ========================================================================== */
.cs-ts {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 10vw, 120px) 0;
  background: linear-gradient(160deg, var(--cs-dark) 0%, var(--cs-dark) 50%, var(--cs-ink) 100%);
}

.cs-ts-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cs-ts-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.cs-ts-glow--1 {
  top: -20%;
  left: 10%;
  width: 46vw;
  max-width: 640px;
  aspect-ratio: 1;
  background: rgba(11, 99, 174, 0.3);
  animation: cs-drift 22s ease-in-out infinite alternate;
}

.cs-ts-glow--2 {
  bottom: -35%;
  right: -5%;
  width: 40vw;
  max-width: 560px;
  aspect-ratio: 1;
  background: rgba(0, 85, 144, 0.3);
  animation: cs-drift 26s ease-in-out infinite alternate-reverse;
}

.cs-ts .cs-h2 {
  color: #FFFFFF;
}

.cs-ts-stats {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-ts-stats b {
  margin-right: 4px;
  color: #FFFFFF;
  font-size: 20px;
  letter-spacing: 0;
}

.cs-ts-stats i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cs-blue);
}

/* Editor window */
.cs-term {
  --mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Consolas, 'Liberation Mono', monospace;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(8, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
}

/* header.php forces the site font with !important on span, li, p…, so the code font must too */
.cs-term * {
  font-family: var(--mono) !important;
}

.cs-term-bar {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-term-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 0;
}

.cs-term-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

/* Active file tab */
.cs-term-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 0 18px;
  background: rgba(8, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-color: transparent;
  border-top: 2px solid var(--cs-blue);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.cs-term-tab svg {
  width: 14px;
  height: 14px;
  color: var(--cs-blue);
  filter: brightness(1.6);
}

/* Code lines with line numbers */
.cs-term-code {
  margin: 0;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3.5vw, 44px) clamp(28px, 3.5vw, 44px) clamp(12px, 1.5vw, 20px);
  list-style: none;
  counter-reset: cs-ln;
  font-size: 15px;
  line-height: 2;
}

.cs-term-line {
  position: relative;
  display: grid;
  grid-template-columns: 64px max-content minmax(0, 1fr);
  align-items: start;
  margin: 0;
  padding: 3px 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  counter-increment: cs-ln;
}

.cs-term-line::before {
  content: counter(cs-ln);
  padding-right: 28px;
  color: rgba(255, 255, 255, 0.28);
  text-align: right;
  user-select: none;
}

/* Layer entries are indented; tokens wrap in their own column */
.cs-term-line.is-entry {
  padding: 7px 0;
}

.cs-term-line.is-entry .cs-term-key {
  padding-left: 3ch;
}

.cs-term-line:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cs-term-key {
  padding-right: 1.5ch;
  color: #FFFFFF;
  font-weight: 700;
  white-space: nowrap;
  text-transform: capitalize;
}

.cs-term-key i,
.cs-term-tok i {
  font-style: normal;
  opacity: 0.45;
}

.cs-term-p {
  color: rgba(255, 255, 255, 0.4);
}

.cs-term-vals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 4px;
}

.cs-term-tok {
  display: inline-block;
  margin: 0 2px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(11, 99, 174, 0.28);
  border: 1px solid rgba(11, 99, 174, 0.55);
  color: #E2EEFA;
  line-height: 1.7;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cs-term-tok:hover {
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  color: #FFFFFF;
}

.cs-term-cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  margin-left: 4px;
  vertical-align: -0.2em;
  background: var(--cs-blue);
  filter: brightness(1.5);
  animation: cs-term-blink 1.1s steps(1) infinite;
}

@keyframes cs-term-blink {
  50% { opacity: 0; }
}

/* Lines type in one after another when the editor scrolls into view */
.cs-term.is-armed .cs-term-line {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

.cs-term.is-armed.is-in .cs-term-line {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transition: opacity 0.2s ease calc(var(--i) * 160ms), clip-path 0.55s steps(24, end) calc(var(--i) * 160ms);
}

/* Status bar */
.cs-term-status {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px;
  background: var(--cs-blue);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.cs-term-status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #FFFFFF;
}

/* Visually hidden, still read by screen readers */
.cs-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Security and quality: padlock statement
   ========================================================================== */
.cs-sq {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(80px, 11vw, 136px) 0;
  background:
    radial-gradient(45% 55% at 50% 30%, rgba(11, 99, 174, 0.10), transparent 70%),
    #FFFFFF;
  text-align: center;
}

/* Faint concentric rings radiating from the padlock */
.cs-sq-bg {
  position: absolute;
  top: clamp(40px, 7vw, 80px);
  left: 50%;
  z-index: -1;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cs-sq-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(11, 99, 174, 0.1);
  transform: translate(-50%, -50%);
}

.cs-sq-ring--1 { width: 260px; height: 260px; }
.cs-sq-ring--2 { width: 480px; height: 480px; border-style: dashed; animation: cs-spin 60s linear infinite; }
.cs-sq-ring--3 { width: 720px; height: 720px; border-color: rgba(11, 99, 174, 0.06); }

.cs-sq-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* Padlock */
.cs-sq-lock {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: 0 auto 28px;
  border-radius: 36px;
  background: linear-gradient(150deg, var(--cs-blue), var(--cs-ink));
  color: #FFFFFF;
  box-shadow: 0 24px 60px rgba(11, 99, 174, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.cs-sq-lock svg {
  position: relative;
  width: 60px;
  height: 72px;
  overflow: visible;
}

.cs-sq-body {
  fill: #FFFFFF;
}

.cs-sq-hole {
  fill: var(--cs-blue);
  stroke: var(--cs-blue);
}

/* Shackle: open (lifted and swung out) until the section locks */
.cs-sq-shackle {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  transition: transform 0.55s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.cs-sq.is-armed:not(.is-locked) .cs-sq-shackle {
  transform: translateY(-9px) rotate(-28deg);
}

/* Ring burst when it locks */
.cs-sq-burst {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--cs-blue);
  opacity: 0;
  pointer-events: none;
}

.cs-sq.is-locked .cs-sq-burst {
  animation: cs-sq-burst 1.1s ease-out 0.35s;
}

.cs-sq.is-locked .cs-sq-burst--2 {
  animation-delay: 0.6s;
}

@keyframes cs-sq-burst {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.7); }
}

.cs-sq .cs-h2 {
  margin-bottom: 22px;
}

/* Statement with tagged terms */
.cs-sq-text {
  color: var(--cs-text);
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.85;
}

.cs-sq-text p {
  margin: 0 0 0.8em;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.cs-sq-text p:last-child {
  margin-bottom: 0;
}

.cs-sq-text strong {
  color: var(--cs-ink);
}

.cs-sq-tag {
  display: inline-block;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(11, 99, 174, 0.08);
  border: 1px solid rgba(11, 99, 174, 0.2);
  color: var(--cs-blue);
  font-weight: 700;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cs-sq-tag:hover {
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  color: #FFFFFF;
}

/* Tags settle in after the lock closes */
.cs-sq.is-armed .cs-sq-tag {
  background: transparent;
  border-color: transparent;
}

.cs-sq.is-armed.is-locked .cs-sq-tag {
  background: rgba(11, 99, 174, 0.08);
  border-color: rgba(11, 99, 174, 0.2);
  transition-delay: 0.6s;
}

.cs-sq.is-armed.is-locked .cs-sq-tag:hover {
  background: var(--cs-blue);
  border-color: var(--cs-blue);
  transition-delay: 0s;
}

/* ==========================================================================
   Results: trophy wall
   ========================================================================== */
.cs-rs {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 0;
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(11, 99, 174, 0.08), transparent 70%),
    var(--cs-tint);
  border-top: 1px solid var(--cs-border);
}

.cs-rs-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.cs-rs-head .cs-h2 {
  margin: 0;
}

.cs-rs-count {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--cs-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-rs-count b {
  color: var(--cs-blue);
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.cs-rs-grid {
  --cols: 3;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* With three columns the hero column is a little wider */
.cs-rs-grid[style*="--cols: 3"] {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
}

.cs-rs-card {
  grid-column: span var(--span, 1);
  grid-row: span var(--rows, 1);
  margin: 0;
}

/* Inner tile carries the tilt so it never fights the reveal on the card */
.cs-rs-inner {
  --rx: 0deg;
  --ry: 0deg;
  --gx: 50%;
  --gy: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 200px;
  padding: 26px 26px 28px;
  overflow: hidden;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--cs-border);
  box-shadow: var(--cs-shadow);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s ease-out, box-shadow 0.35s ease, border-color 0.35s ease;
}

/* Glare that follows the pointer */
.cs-rs-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--gx) var(--gy), rgba(11, 99, 174, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cs-rs-inner:hover {
  border-color: var(--cs-blue-line);
  box-shadow: 0 24px 50px rgba(11, 99, 174, 0.16);
}

.cs-rs-inner:hover::after {
  opacity: 1;
}

.cs-rs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.cs-rs-num,
.cs-rs-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11, 99, 174, 0.08);
  border: 1px solid rgba(11, 99, 174, 0.18);
  color: var(--cs-blue);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.cs-rs-ico svg {
  width: 20px;
  height: 20px;
}

.cs-rs-inner:hover .cs-rs-num,
.cs-rs-inner:hover .cs-rs-ico {
  background: var(--cs-blue);
  color: #FFFFFF;
}

.cs-rs-tick {
  color: var(--cs-blue);
  opacity: 0.5;
}

.cs-rs-tick svg {
  width: 20px;
  height: 20px;
}

.cs-rs .cs-rs-title {
  position: relative;
  margin: 0 0 8px;
  color: var(--cs-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: capitalize;
}

.cs-rs-text {
  position: relative;
  margin: 0;
  color: var(--cs-text);
  font-size: 15.5px;
  line-height: 1.6;
}

/* Hero tile (first result) */
.cs-rs-card.is-hero .cs-rs-inner {
  justify-content: flex-end;
  min-height: 300px;
  padding: clamp(28px, 3.5vw, 44px);
  border: 0;
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(11, 99, 174, 0.55), transparent 70%),
    linear-gradient(150deg, var(--cs-dark) 0%, var(--cs-ink) 100%);
  box-shadow: 0 30px 70px rgba(18, 36, 56, 0.3);
}

.cs-rs-card.is-hero .cs-rs-inner::after {
  background: radial-gradient(360px circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.12), transparent 60%);
}

/* Oversized tick, top left, with a soft ring */
.cs-rs-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: auto;
  border-radius: 50%;
  background: var(--cs-blue);
  color: #FFFFFF;
  box-shadow: 0 0 0 10px rgba(11, 99, 174, 0.25), 0 16px 40px rgba(11, 99, 174, 0.5);
}

.cs-rs-mark svg {
  width: 34px;
  height: 34px;
}

/* Giant faint tick watermark */
.cs-rs-card.is-hero .cs-rs-inner::before {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -50px;
  width: 260px;
  height: 260px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
  opacity: 0.06;
  pointer-events: none;
}

/* A hero that shares one row with the others stays compact */
.cs-rs-card.is-hero:not([style*="--rows"]) .cs-rs-inner {
  min-height: 0;
  padding: 28px 30px 30px;
}

.cs-rs-card.is-hero:not([style*="--rows"]) .cs-rs-mark {
  width: 52px;
  height: 52px;
  box-shadow: 0 0 0 7px rgba(11, 99, 174, 0.25), 0 12px 30px rgba(11, 99, 174, 0.5);
}

.cs-rs-card.is-hero:not([style*="--rows"]) .cs-rs-mark svg {
  width: 26px;
  height: 26px;
}

.cs-rs-card.is-hero .cs-rs-title {
  margin-top: 24px;
}

.cs-rs-kicker {
  position: relative;
  margin: 28px 0 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cs-rs .cs-rs-card.is-hero .cs-rs-title {
  color: #FFFFFF;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
}

.cs-rs-card.is-hero .cs-rs-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 17px;
}

/* ==========================================================================
   Conclusion: floating quote card
   ========================================================================== */
.cs-cn {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
  background:
    radial-gradient(50% 60% at 50% 55%, rgba(11, 99, 174, 0.08), transparent 70%),
    var(--cs-tint);
  border-top: 1px solid var(--cs-border);
  text-align: center;
}

.cs-cn .cs-h2 {
  margin-bottom: clamp(32px, 4vw, 48px);
}

.cs-cn-stage {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}

/* Soft blue glow under the card */
.cs-cn-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -30px;
  height: 60%;
  border-radius: 50%;
  background: rgba(11, 99, 174, 0.28);
  filter: blur(60px);
  pointer-events: none;
}

.cs-cn-card {
  position: relative;
  margin: 0;
  padding: clamp(48px, 6vw, 68px) clamp(28px, 6vw, 72px) clamp(44px, 5vw, 64px);
  border-radius: 24px;
  background: #FFFFFF;
  border: 1px solid var(--cs-border);
  box-shadow: 0 30px 80px rgba(18, 36, 56, 0.12);
  text-align: left;
  animation: cs-cn-float 6s ease-in-out infinite;
}

@keyframes cs-cn-float {
  50% { transform: translateY(-8px); }
}

/* Big opening quote mark breaking out of the top edge */
.cs-cn-mark {
  position: absolute;
  top: -34px;
  left: clamp(24px, 5vw, 60px);
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--cs-blue), var(--cs-accent));
  color: #FFFFFF;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 72px;
  line-height: 1;
  padding-top: 26px;
  box-shadow: 0 14px 34px rgba(11, 99, 174, 0.4);
}

.cs-cn-text {
  color: var(--cs-ink);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -0.005em;
}

.cs-cn-text p {
  margin: 0 0 0.8em;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.cs-cn-text p:last-child {
  margin-bottom: 0;
}

.cs-cn-text strong {
  color: var(--cs-blue);
}

/* Footer: product logo tile + name */
.cs-cn-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(28px, 3vw, 40px);
  padding-top: 24px;
  border-top: 1px solid var(--cs-border);
}

.cs-cn-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cs-blue);
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(11, 99, 174, 0.3);
}

.cs-cn-name {
  color: var(--cs-ink);
  font-size: 18px;
  font-weight: 800;
  text-transform: capitalize;
}

/* Admin quick edit */
.cs-admin-edit {
  padding-bottom: 40px;
  text-align: right;
}

.cs-admin-edit a {
  color: var(--cs-muted);
  font-size: 14px;
  text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
  /* App: menu becomes the full module list with descriptions; the screen is hidden */
  .cs-app-body {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .cs-app-main {
    display: none;
  }

  .cs-app-item,
  .cs-app-item.is-active {
    align-items: flex-start;
    padding: 14px 12px;
    background: transparent;
    color: #FFFFFF;
    box-shadow: none;
    cursor: default;
  }

  .cs-app-item + .cs-app-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
  }

  .cs-app-item-ico {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--cs-blue);
  }

  .cs-app-item-desc {
    display: block;
  }

  .cs-app-url {
    min-width: 0;
  }

  .cs-ap-row {
    grid-template-columns: clamp(90px, 16vw, 130px) minmax(0, 1fr);
    align-items: start;
    gap: 12px 24px;
  }

  .cs-ap-num {
    grid-row: span 2;
  }

  .cs-ap-desc {
    grid-column: 2;
  }

  .cs-ap-arrow {
    display: none;
  }

  .cs-ov-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .cs-ov-side {
    position: relative;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .cs-ov-side .cs-h2 {
    margin-bottom: 28px;
  }

  .cs-ov-orb {
    width: 96px;
    flex: 0 0 96px;
    margin-top: -12px;
  }

  .cs-ov-ring--2 { inset: 13px; }
  .cs-ov-ring--3 { inset: 26px; }
  .cs-ov-core { inset: 38px; }

  .cs-ov-progress {
    display: none;
  }

  .cs-hero.has-media .cs-hero-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .cs-summary {
    max-width: 720px;
  }

  .cs-hero-visual {
    max-width: 720px;
  }

  .cs-hero-window {
    transform: none;
  }

  /* Results: hero full width on top, the rest 2-up; a lone last tile fills its row */
  .cs-rs-grid,
  .cs-rs-grid[style*="--cols: 3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-rs-card {
    grid-column: auto;
    grid-row: auto;
  }

  .cs-rs-card.is-hero {
    grid-column: 1 / -1;
  }

  .cs-rs-card:not(.is-hero):last-child:nth-child(even) {
    grid-column: 1 / -1;
  }

  .cs-rs-card.is-hero .cs-rs-inner {
    min-height: 240px;
  }

  /* Card grids: 2 per row, a lone last card fills its row */
  .cs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-grid > * {
    grid-column: auto;
  }

  .cs-grid > :last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .cs-term-code {
    font-size: 14px;
  }

  .cs-sq-ring--3 {
    display: none;
  }

  /* Snapshot: lead card full width on top, the rest 2-up; last card fills its row */
  .cs-snap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cs-snap-card.is-lead {
    grid-column: span 2;
    grid-row: auto;
    min-height: 240px;
  }

  .cs-snap-card.span-2,
  .cs-snap-card.span-3 {
    grid-column: auto;
  }

  .cs-snap-card:last-child:nth-child(even) {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .cs-page {
    font-size: 16px;
  }

  .cs-arch-zoom span,
  .cs-arch-corner,
  .cs-arch-dots {
    display: none;
  }

  .cs-sq-lock {
    width: 92px;
    height: 92px;
    border-radius: 26px;
  }

  .cs-sq-lock svg {
    width: 44px;
    height: 52px;
  }

  .cs-arch-bar {
    padding: 10px 10px 10px 16px;
  }

  .cs-arch-caption {
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
  }

  .cs-ap-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 16px;
    padding: 22px 4px;
  }

  .cs-ap-num {
    font-size: 3.4rem;
    -webkit-text-stroke-width: 1.5px;
  }

  .cs-ap-ico {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .cs-snap,
  .cs-grid,
  .cs-rs-grid,
  .cs-rs-grid[style*="--cols: 3"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .cs-rs-card:not(.is-hero):last-child:nth-child(even) {
    grid-column: auto;
  }

  .cs-rs-inner {
    min-height: 0;
  }

  .cs-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .cs-term-code {
    padding: 24px 20px;
    font-size: 13px;
  }

  .cs-term-line {
    grid-template-columns: minmax(0, 1fr);
  }

  .cs-term-line::before {
    display: none;
  }

  .cs-term-line.is-entry {
    padding: 8px 0 12px 2ch;
  }

  .cs-term-line.is-entry .cs-term-key {
    padding-left: 0;
  }

  .cs-term-status span:last-child {
    display: none;
  }

  .cs-ch-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .cs-snap-card.is-lead,
  .cs-snap-card:last-child:nth-child(even) {
    grid-column: auto;
  }

  .cs-snap-card {
    min-height: 0;
  }

  .cs-snap-card.is-lead {
    min-height: 220px;
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cs-hero-window,
  .cs-btn {
    transition: none;
  }

  .cs-hero-glow,
  .cs-hero-copy > *,
  .cs-hero-visual,
  .cs-ov-ring,
  .cs-ov-core,
  .cs-ch-glow,
  .cs-ch-scan {
    animation: none;
  }

  .cs-ch-scan {
    display: none;
  }

  .cs-ap-row::before,
  .cs-ap-num,
  .cs-ap-ico,
  .cs-ap-arrow {
    transition: none !important;
  }

  .cs-ch-card,
  .cs-ch-card:hover,
  .cs-ch-ico {
    transform: none !important;
    transition: none !important;
  }

  .cs-snap.is-armed .cs-snap-card,
  .cs-snap-card,
  .cs-snap-card:hover,
  .cs-snap-ico {
    opacity: 1;
    transform: none !important;
    transition: none !important;
  }

  .cs-hero-window {
    transform: none;
  }

  .is-armed > .cs-rs-card,
  .cs-rs-inner {
    opacity: 1;
    transform: none !important;
  }

  .cs-cn-card,
  .cs-ts-glow,
  .cs-term-cursor,
  .cs-sq-ring,
  .cs-sq-burst,
  .cs-app-stats i,
  .cs-app-rows span {
    animation: none;
  }

  .cs-app-panel,
  .cs-app-item,
  .cs-app-panel.is-active .cs-app-chart i {
    transition: none !important;
  }
}
