/* =============================================================================
   Payrovia — Payroll Control Room design language (v3)
   Product-UI-first premium layer. Renders real-looking payroll software in
   HTML/CSS: console chrome, statutory-line rows, exception queue, approval
   trail, output-pack cards, route comparison, and redacted proof previews.

   Loads ON TOP of horizon.css (tokens) + payrovia-product-led.css (layout).
   All selectors are namespaced `cr-` to avoid collisions with hz-/pl-/pv-.
   Palette: deep navy control room + off-white paper + one restrained sky accent.
============================================================================= */

:root {
  /* Control-room surfaces (dark) */
  --cr-navy:        #0a1020;
  --cr-navy-2:      #0e1730;
  --cr-panel:       #0f1a33;
  --cr-panel-2:     #14224073;
  --cr-panel-solid: #142240;
  --cr-line:        rgba(148, 163, 196, 0.16);
  --cr-line-strong: rgba(148, 163, 196, 0.28);

  /* Ink on dark */
  --cr-ink:         #eef2fb;
  --cr-ink-2:       #c5cee2;
  --cr-muted:       #8a97b6;
  --cr-faint:       #5d6a8a;

  /* Restrained accent + status semantics */
  --cr-sky:         #59b6f2;
  --cr-sky-deep:    #2b8fd6;
  --cr-mint:        #46d6ab;   /* cleared / positive */
  --cr-amber:       #f3b84a;   /* changed / review   */
  --cr-rose:        #f97d83;   /* blocked / risk     */
  --cr-violet:      #9b8cf0;   /* info / route       */

  /* Light-surface mirrors (reuse horizon ink/paper where possible) */
  --cr-paper:       #f6f4ef;
  --cr-paper-2:     #efece3;
  --cr-card-line:   #e3ddd0;

  --cr-mono:        var(--hz-font-mono, "JetBrains Mono", ui-monospace, monospace);
  --cr-ui:          var(--hz-font-ui, "DM Sans", system-ui, sans-serif);
  --cr-display:     "Fraunces", Georgia, serif;

  --cr-radius:      14px;
  --cr-radius-lg:   22px;
  --cr-radius-sm:   9px;
  --cr-shadow:      0 40px 90px -40px rgba(5, 10, 25, 0.7);
}

/* ----------------------------------------------------------------------------
   1. Section scaffolding
---------------------------------------------------------------------------- */
.cr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: var(--cr-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-sky-deep);
}
.cr-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.cr-eyebrow--ondark { color: var(--cr-sky); }

.cr-section { padding: clamp(64px, 8vw, 116px) 0; }
.cr-section--ink {
  background:
    radial-gradient(1200px 520px at 78% -10%, rgba(89, 182, 242, 0.13), transparent 60%),
    radial-gradient(900px 480px at 6% 8%, rgba(155, 140, 240, 0.10), transparent 55%),
    linear-gradient(180deg, var(--cr-navy) 0%, var(--cr-navy-2) 100%);
  color: var(--cr-ink);
}
.cr-section--ink h2,
.cr-section--ink h3 { color: var(--cr-ink); }
.cr-section--ink p { color: var(--cr-ink-2); }

.cr-kicker { max-width: 760px; margin: 0 0 40px; }
.cr-kicker h2 {
  margin: 0 0 14px;
  font-family: var(--cr-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.cr-kicker p {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--cr-muted);
  max-width: 62ch;
}
.cr-section:not(.cr-section--ink) .cr-kicker p { color: var(--hz-ink-muted, #4a5568); }

/* ----------------------------------------------------------------------------
   2. Hero (deep navy control room)
---------------------------------------------------------------------------- */
.cr-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 82% -8%, rgba(89, 182, 242, 0.16), transparent 58%),
    radial-gradient(820px 520px at -4% 10%, rgba(155, 140, 240, 0.12), transparent 52%),
    linear-gradient(180deg, var(--cr-navy) 0%, #0b1428 60%, var(--cr-navy-2) 100%);
  color: var(--cr-ink);
  border-bottom: 1px solid var(--cr-line);
}
.cr-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 196, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 196, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(1000px 600px at 70% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}
.cr-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(440px, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 7vw, 92px) 0 clamp(52px, 7vw, 96px);
}
.cr-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  margin: 0 0 22px;
  border: 1px solid var(--cr-line-strong);
  border-radius: 999px;
  background: rgba(13, 22, 44, 0.6);
  font-size: 13px;
  font-weight: 600;
  color: var(--cr-ink-2);
}
.cr-hero__badge .cr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cr-mint); box-shadow: 0 0 0 4px rgba(70, 214, 171, 0.18); }
.cr-hero h1 {
  margin: 0 0 20px;
  font-family: var(--cr-display);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #fff;
}
.cr-hero h1 em { font-style: italic; color: var(--cr-sky); }
.cr-hero__lead {
  margin: 0 0 18px;
  max-width: 56ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--cr-ink-2);
}
.cr-hero__challenge {
  margin: 0 0 28px;
  padding-left: 16px;
  border-left: 2px solid var(--cr-sky);
  font-family: var(--cr-display);
  font-style: italic;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.4;
  color: #fff;
}
.cr-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cr-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--cr-muted);
}
.cr-hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.cr-hero__meta span::before { content: "›"; color: var(--cr-sky); font-weight: 700; }

/* ----------------------------------------------------------------------------
   3. Buttons (control room)
---------------------------------------------------------------------------- */
.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--cr-ui);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.18s ease, background 0.16s ease, border-color 0.16s ease;
}
.cr-btn[hidden] { display: none !important; }
.cr-btn__icon { font-size: 16px; transition: transform 0.18s ease; }
.cr-btn:hover .cr-btn__icon { transform: translateX(3px); }
.cr-btn--primary {
  background: linear-gradient(180deg, var(--cr-sky) 0%, var(--cr-sky-deep) 100%);
  color: #06101f;
  box-shadow: 0 14px 34px -14px rgba(89, 182, 242, 0.7);
}
.cr-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(89, 182, 242, 0.8); }
.cr-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--cr-line-strong);
  color: var(--cr-ink);
}
.cr-btn--ghost:hover { border-color: var(--cr-sky); background: rgba(89, 182, 242, 0.08); }
.cr-btn--dark {
  background: var(--cr-navy);
  color: #fff;
}
.cr-btn--dark:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -16px rgba(10, 16, 32, 0.6); }
.cr-btn--lg { min-height: 56px; padding: 0 30px; font-size: 16px; }

/* ----------------------------------------------------------------------------
   4. The Console — a real-looking payroll software window
---------------------------------------------------------------------------- */
.cr-console {
  border-radius: var(--cr-radius-lg);
  background: linear-gradient(180deg, var(--cr-panel) 0%, #0c152b 100%);
  border: 1px solid var(--cr-line-strong);
  box-shadow: var(--cr-shadow);
  overflow: hidden;
  color: var(--cr-ink);
}
.cr-console--floating { transform: perspective(1600px) rotateY(-3deg) rotateX(1.5deg); }
@media (max-width: 980px) { .cr-console--floating { transform: none; } }

.cr-console__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cr-line);
  background: rgba(8, 14, 30, 0.6);
}
.cr-console__dots { display: flex; gap: 7px; }
.cr-console__dots i { width: 11px; height: 11px; border-radius: 50%; background: #2b3858; display: block; }
.cr-console__dots i:nth-child(1) { background: #f9706f; }
.cr-console__dots i:nth-child(2) { background: #f3b84a; }
.cr-console__dots i:nth-child(3) { background: #46d6ab; }
.cr-console__path {
  font-family: var(--cr-mono);
  font-size: 12px;
  color: var(--cr-muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cr-console__path .fi { width: 18px; height: 13px; border-radius: 2px; }
.cr-console__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--cr-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cr-mint);
}
.cr-console__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--cr-mint); animation: cr-pulse 2s infinite; }
@keyframes cr-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.cr-console__tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  border-bottom: 1px solid var(--cr-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.cr-console__tabs::-webkit-scrollbar { display: none; }
.cr-console__tab {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cr-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none; border-left: none; border-right: none;
  cursor: pointer;
  font-family: var(--cr-ui);
}
.cr-console__tab[aria-selected="true"], .cr-console__tab.is-active { color: var(--cr-ink); border-bottom-color: var(--cr-sky); }

.cr-console__body { padding: 18px; display: grid; gap: 14px; }
.cr-console__summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cr-stat {
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}
.cr-stat__label { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cr-faint); }
.cr-stat__value { margin-top: 5px; font-family: var(--cr-mono); font-size: 20px; font-weight: 600; color: #fff; }
.cr-stat__value small { font-size: 12px; color: var(--cr-muted); font-weight: 500; }

/* ----------------------------------------------------------------------------
   5. Statutory-line rows  (the heart of the "explainable" story)
---------------------------------------------------------------------------- */
.cr-lines { display: grid; gap: 2px; }
.cr-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: rgba(255, 255, 255, 0.015);
}
.cr-line__name { font-size: 13.5px; font-weight: 600; color: var(--cr-ink); }
.cr-line__sub { display: block; font-family: var(--cr-mono); font-size: 11px; color: var(--cr-faint); margin-top: 2px; }
.cr-line__amt { font-family: var(--cr-mono); font-size: 13.5px; color: var(--cr-ink-2); text-align: right; }

.cr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--cr-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cr-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cr-chip--cleared { color: var(--cr-mint);   background: rgba(70, 214, 171, 0.1);  border-color: rgba(70, 214, 171, 0.32); }
.cr-chip--changed { color: var(--cr-amber);  background: rgba(243, 184, 74, 0.1);  border-color: rgba(243, 184, 74, 0.32); }
.cr-chip--blocked { color: var(--cr-rose);   background: rgba(249, 125, 131, 0.1); border-color: rgba(249, 125, 131, 0.34); }
.cr-chip--review  { color: var(--cr-sky);    background: rgba(89, 182, 242, 0.1);  border-color: rgba(89, 182, 242, 0.32); }
.cr-chip--info    { color: var(--cr-violet); background: rgba(155, 140, 240, 0.1); border-color: rgba(155, 140, 240, 0.3); }

/* Static statutory chip set (light surfaces, e.g. country term clouds) */
.cr-termcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-term {
  font-family: var(--cr-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--cr-card-line);
  background: #fff;
  color: var(--hz-ink, #0c1222);
}
.cr-section--ink .cr-term { background: rgba(255,255,255,0.03); border-color: var(--cr-line); color: var(--cr-ink-2); }

/* ----------------------------------------------------------------------------
   6. Exception queue
---------------------------------------------------------------------------- */
.cr-queue { display: grid; gap: 8px; }
.cr-queue__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--cr-line);
  border-left-width: 3px;
  border-radius: var(--cr-radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.cr-queue__row--blocked { border-left-color: var(--cr-rose); }
.cr-queue__row--changed { border-left-color: var(--cr-amber); }
.cr-queue__row--cleared { border-left-color: var(--cr-mint); }
.cr-queue__icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--cr-mono);
  font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,0.04);
}
.cr-queue__row--blocked .cr-queue__icon { color: var(--cr-rose); }
.cr-queue__row--changed .cr-queue__icon { color: var(--cr-amber); }
.cr-queue__row--cleared .cr-queue__icon { color: var(--cr-mint); }
.cr-queue__title { font-size: 13.5px; font-weight: 600; color: var(--cr-ink); }
.cr-queue__desc { font-size: 12px; color: var(--cr-muted); margin-top: 2px; }
.cr-queue__owner { font-family: var(--cr-mono); font-size: 11px; color: var(--cr-faint); white-space: nowrap; }

/* ----------------------------------------------------------------------------
   7. Approval trail (timeline)
---------------------------------------------------------------------------- */
.cr-trail { display: grid; gap: 0; position: relative; padding-left: 26px; }
.cr-trail::before {
  content: "";
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--cr-line-strong);
}
.cr-trail__step { position: relative; padding: 0 0 18px; }
.cr-trail__step:last-child { padding-bottom: 0; }
.cr-trail__step::before {
  content: "";
  position: absolute;
  left: -22px; top: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cr-navy);
  border: 2px solid var(--cr-sky);
}
.cr-trail__step--done::before { background: var(--cr-mint); border-color: var(--cr-mint); }
.cr-trail__step--now::before  { background: var(--cr-amber); border-color: var(--cr-amber); box-shadow: 0 0 0 4px rgba(243,184,74,0.18); }
.cr-trail__step--wait::before { background: var(--cr-navy); border-color: var(--cr-faint); }
.cr-trail__who { font-size: 13.5px; font-weight: 600; color: var(--cr-ink); }
.cr-trail__what { font-size: 12.5px; color: var(--cr-muted); margin-top: 2px; }
.cr-trail__time { font-family: var(--cr-mono); font-size: 11px; color: var(--cr-faint); margin-top: 3px; display: block; }

/* ----------------------------------------------------------------------------
   8. Output-pack cards (downloadable artifacts)
---------------------------------------------------------------------------- */
.cr-outputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cr-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.cr-file__ext {
  width: 40px; height: 40px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-family: var(--cr-mono);
  font-size: 10px; font-weight: 700;
  color: #06101f;
  background: var(--cr-sky);
  flex-shrink: 0;
}
.cr-file__ext--csv { background: var(--cr-mint); }
.cr-file__ext--pdf { background: var(--cr-rose); }
.cr-file__ext--xml { background: var(--cr-violet); }
.cr-file__ext--txt { background: var(--cr-amber); }
.cr-file__name { font-size: 13px; font-weight: 600; color: var(--cr-ink); }
.cr-file__meta { font-family: var(--cr-mono); font-size: 11px; color: var(--cr-faint); margin-top: 2px; }

/* ----------------------------------------------------------------------------
   9. Generic light data card (sharp, product-grade)
---------------------------------------------------------------------------- */
.cr-grid { display: grid; gap: 16px; }
.cr-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cr-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cr-grid--4 { grid-template-columns: repeat(4, 1fr); }

.cr-card {
  border: 1px solid var(--cr-card-line);
  border-radius: var(--cr-radius);
  background: #fff;
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cr-card:hover { transform: translateY(-3px); border-color: var(--cr-sky-deep); box-shadow: 0 22px 50px -28px rgba(10,16,32,0.34); }
.cr-card__num {
  font-family: var(--cr-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--cr-sky-deep);
}
.cr-card h3 { margin: 10px 0 8px; font-size: 18px; line-height: 1.25; color: var(--hz-ink, #0c1222); }
.cr-card p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--hz-ink-muted, #4a5568); }
.cr-section--ink .cr-card { background: var(--cr-panel-solid); border-color: var(--cr-line); }
.cr-section--ink .cr-card h3 { color: var(--cr-ink); }
.cr-section--ink .cr-card p { color: var(--cr-muted); }
.cr-section--ink .cr-card:hover { border-color: var(--cr-sky); }

/* "What breaks before payroll closes" — break cards */
.cr-break { border-left: 3px solid var(--cr-rose); }
.cr-break .cr-card__num { color: var(--cr-rose); }
.cr-break__fix {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--cr-line);
  font-size: 13.5px;
  color: var(--cr-ink-2);
}
.cr-break__fix b { color: var(--cr-mint); font-weight: 700; }

/* ----------------------------------------------------------------------------
   10. Route comparison cards
---------------------------------------------------------------------------- */
.cr-routes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cr-route {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cr-card-line);
  border-radius: var(--cr-radius);
  background: #fff;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cr-route:hover { transform: translateY(-3px); border-color: var(--cr-sky-deep); box-shadow: 0 22px 50px -28px rgba(10,16,32,0.34); }
.cr-route__tag {
  align-self: flex-start;
  font-family: var(--cr-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.cr-route--entity  .cr-route__tag { color: var(--cr-sky-deep); background: rgba(43,143,214,0.12); }
.cr-route--eor     .cr-route__tag { color: #b06d12;          background: rgba(243,184,74,0.16); }
.cr-route--partner .cr-route__tag { color: #6b5bd0;          background: rgba(155,140,240,0.16); }
.cr-route--migrate .cr-route__tag { color: #1aa37a;          background: rgba(70,214,171,0.16); }
.cr-route h3 { margin: 0 0 8px; font-size: 19px; color: var(--hz-ink, #0c1222); }
.cr-route p { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--hz-ink-muted,#4a5568); flex: 1; }
.cr-route__when {
  font-size: 12.5px;
  color: var(--hz-ink-muted,#4a5568);
  padding-top: 12px;
  border-top: 1px solid var(--cr-card-line);
}
.cr-route__when b { color: var(--hz-ink,#0c1222); }

/* ----------------------------------------------------------------------------
   11. Proof preview (redacted artifact frame)
---------------------------------------------------------------------------- */
.cr-proofgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cr-proof {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cr-line);
  border-radius: var(--cr-radius);
  background: linear-gradient(180deg, var(--cr-panel) 0%, #0c152b 100%);
  overflow: hidden;
  color: var(--cr-ink);
}
.cr-proof__head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cr-line);
  font-family: var(--cr-mono);
  font-size: 11.5px;
  color: var(--cr-muted);
}
.cr-proof__head .cr-tag-redacted {
  margin-left: auto;
  color: var(--cr-amber);
  border: 1px solid rgba(243,184,74,0.4);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.cr-proof__win { padding: 14px; flex: 1; display: grid; gap: 7px; align-content: start; }
.cr-redact {
  height: 11px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, rgba(148,163,196,0.22) 0 14px, transparent 14px 20px);
}
.cr-redact--w40 { width: 40%; }
.cr-redact--w60 { width: 60%; }
.cr-redact--w80 { width: 80%; }
.cr-proof__row {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--cr-mono); font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(148,163,196,0.1);
}
.cr-proof__row span:first-child { color: var(--cr-muted); }
.cr-proof__row span:last-child { color: var(--cr-ink); }
.cr-proof__foot {
  padding: 12px 14px;
  border-top: 1px solid var(--cr-line);
}
.cr-proof__foot h3 { margin: 0 0 4px; font-size: 15px; color: #fff; }
.cr-proof__foot p { margin: 0; font-size: 12.5px; color: var(--cr-muted); line-height: 1.45; }

/* ----------------------------------------------------------------------------
   12. Sample pricing (market cards)
---------------------------------------------------------------------------- */
.cr-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.cr-price {
  border: 1px solid var(--cr-card-line);
  border-radius: var(--cr-radius);
  background: #fff;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.cr-price:hover { transform: translateY(-2px); border-color: var(--cr-sky-deep); box-shadow: 0 18px 40px -24px rgba(10,16,32,0.3); }
.cr-price__cc { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--hz-ink,#0c1222); }
.cr-price__cc .fi { width: 22px; height: 16px; border-radius: 2px; }
.cr-price__val { margin: 12px 0 2px; font-family: var(--cr-mono); font-size: 22px; font-weight: 600; color: var(--hz-ink,#0c1222); }
.cr-price__unit { font-size: 12px; color: var(--hz-ink-muted,#4a5568); }
.cr-price__from { font-family: var(--cr-mono); font-size: 11px; color: var(--cr-sky-deep); text-transform: uppercase; letter-spacing: 0.04em; }

/* ----------------------------------------------------------------------------
   13. CTA band
---------------------------------------------------------------------------- */
.cr-cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--cr-radius-lg);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
  background:
    radial-gradient(700px 360px at 88% 0%, rgba(89,182,242,0.2), transparent 60%),
    linear-gradient(180deg, var(--cr-navy) 0%, var(--cr-navy-2) 100%);
  color: var(--cr-ink);
  text-align: center;
}
.cr-cta h2 { margin: 0 0 14px; font-family: var(--cr-display); font-weight: 600; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; color: #fff; }
.cr-cta p { margin: 0 auto 26px; max-width: 56ch; color: var(--cr-ink-2); font-size: 17px; }
.cr-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ----------------------------------------------------------------------------
   14. Conversion stepper (Build payroll preview)
---------------------------------------------------------------------------- */
.cr-flow { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.cr-flow > * { min-width: 0; }
.cr-rail {
  position: sticky;
  top: 92px;
  border: 1px solid var(--cr-card-line);
  border-radius: var(--cr-radius-lg);
  background: #fff;
  padding: 22px;
}
.cr-rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: cr-step; }
.cr-rail li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 8px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--hz-ink-muted,#4a5568);
}
.cr-rail li::before {
  counter-increment: cr-step;
  content: counter(cr-step);
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--cr-mono); font-size: 12px; font-weight: 700;
  background: var(--cr-paper-2); color: var(--hz-ink-muted,#4a5568);
}
.cr-rail li.is-active { color: var(--hz-ink,#0c1222); font-weight: 600; background: rgba(89,182,242,0.08); }
.cr-rail li.is-active::before { background: var(--cr-sky-deep); color: #fff; }
.cr-rail li.is-done::before { background: var(--cr-mint); color: #06101f; content: "✓"; }

.cr-panel-form {
  border: 1px solid var(--cr-card-line);
  border-radius: var(--cr-radius-lg);
  background: #fff;
  padding: clamp(22px, 3vw, 36px);
}
.cr-step { display: none; }
.cr-step.is-active { display: block; animation: cr-fade 0.3s ease; }
@keyframes cr-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cr-step__eyebrow { font-family: var(--cr-mono); font-size: 12px; color: var(--cr-sky-deep); letter-spacing: 0.06em; text-transform: uppercase; }
.cr-step h2 { margin: 8px 0 6px; font-family: var(--cr-display); font-weight: 600; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; }
.cr-step__hint { margin: 0 0 22px; color: var(--hz-ink-muted,#4a5568); font-size: 15px; }

.cr-options { display: grid; gap: 10px; }
.cr-options--2 { grid-template-columns: repeat(2, 1fr); }
.cr-options--3 { grid-template-columns: repeat(3, 1fr); }
.cr-opt {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px;
  border: 1px solid var(--cr-card-line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cr-opt:hover { border-color: var(--cr-sky-deep); }
.cr-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cr-opt__title { font-weight: 700; font-size: 15px; }
.cr-opt__desc { font-size: 13px; color: var(--hz-ink-muted,#4a5568); }
.cr-opt:has(input:checked) { border-color: var(--cr-sky-deep); background: rgba(89,182,242,0.07); box-shadow: inset 0 0 0 1px var(--cr-sky-deep); }
.cr-opt:has(input:focus-visible) { outline: 2px solid var(--cr-sky-deep); outline-offset: 2px; }

.cr-field { display: grid; gap: 7px; margin-bottom: 16px; }
.cr-field label { font-size: 14px; font-weight: 600; }
.cr-field input, .cr-field select, .cr-field textarea {
  font-family: var(--cr-ui);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--cr-card-line);
  border-radius: 10px;
  background: #fff;
  color: var(--hz-ink,#0c1222);
  width: 100%;
}
.cr-field input:focus, .cr-field select:focus, .cr-field textarea:focus {
  outline: none; border-color: var(--cr-sky-deep); box-shadow: 0 0 0 3px rgba(89,182,242,0.18);
}
.cr-field--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.cr-warn {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(243,184,74,0.4);
  background: rgba(243,184,74,0.08);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #7a5a12;
  margin: 4px 0 20px;
}
.cr-warn__icon { font-size: 18px; flex-shrink: 0; }

.cr-flow__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--cr-card-line); }

.cr-confirm { text-align: center; padding: 20px 0; }
.cr-confirm__check {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(70,214,171,0.14);
  color: #1aa37a;
  font-size: 30px;
}
.cr-confirm h2 { font-family: var(--cr-display); font-weight: 600; }
.cr-confirm__summary {
  text-align: left;
  margin: 22px auto 0;
  max-width: 520px;
  border: 1px solid var(--cr-card-line);
  border-radius: 12px;
  overflow: hidden;
}
.cr-confirm__summary div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--cr-card-line);
}
.cr-confirm__summary div:last-child { border-bottom: none; }
.cr-confirm__summary dt { color: var(--hz-ink-muted,#4a5568); margin: 0; }
.cr-confirm__summary dd { margin: 0; font-weight: 600; text-align: right; }

/* ----------------------------------------------------------------------------
   15. Responsive
---------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .cr-routes { grid-template-columns: repeat(2, 1fr); }
  .cr-proofgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .cr-hero__inner { grid-template-columns: 1fr; }
  .cr-flow { grid-template-columns: minmax(0, 1fr); }
  .cr-rail { position: static; }
  .cr-grid--3, .cr-grid--4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .cr-console__summary { grid-template-columns: 1fr; }
  .cr-outputs { grid-template-columns: 1fr; }
  .cr-routes, .cr-proofgrid, .cr-grid--2, .cr-grid--3, .cr-grid--4 { grid-template-columns: 1fr; }
  .cr-options--2, .cr-options--3 { grid-template-columns: 1fr; }
  .cr-field--2 { grid-template-columns: 1fr; }
  .cr-line { grid-template-columns: 1fr auto; }
  .cr-line__amt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-btn, .cr-card, .cr-route, .cr-price, .cr-step { transition: none; animation: none; }
  .cr-console__live i { animation: none; }
}

/* =============================================================================
   16. Design-house premium layer (v3.1)
   Goal: typographic drama, one signature living moment (filing ticker +
   console boot), atmosphere (grain, depth), and refined spring interactions.
   Everything degrades to the static v3 look without JS and under reduced motion.
============================================================================= */

/* --- 16.1 Atmosphere: fine grain over dark surfaces ----------------------- */
.cr-hero::before,
.cr-section--ink::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cr-section--ink { position: relative; }
.cr-section--ink > .hz-container { position: relative; z-index: 1; }

/* --- 16.2 Hero typography: sharper, more contrast, optical sizing --------- */
.cr-hero h1 {
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.cr-hero h1 em {
  font-style: italic;
  color: var(--cr-sky);
  background: linear-gradient(120deg, #7fcbff 0%, var(--cr-sky) 42%, #c9b4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cr-hero__badge {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11.5px;
  font-family: var(--cr-mono);
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.cr-hero__challenge { border-left-width: 3px; }

/* Staggered hero entrance (load-time, JS-gated via .cr-stage on <html> so
   no-JS users always see fully-rendered copy). */
.cr-stage .cr-hero__copy > * {
  opacity: 0;
  transform: translateY(16px);
  animation: cr-rise 0.72s cubic-bezier(0.16, 0.84, 0.34, 1) forwards;
}
.cr-stage .cr-hero__copy > *:nth-child(1) { animation-delay: 0.05s; }
.cr-stage .cr-hero__copy > *:nth-child(2) { animation-delay: 0.13s; }
.cr-stage .cr-hero__copy > *:nth-child(3) { animation-delay: 0.21s; }
.cr-stage .cr-hero__copy > *:nth-child(4) { animation-delay: 0.29s; }
.cr-stage .cr-hero__copy > *:nth-child(5) { animation-delay: 0.37s; }
.cr-stage .cr-hero__copy > *:nth-child(6) { animation-delay: 0.45s; }
@keyframes cr-rise { to { opacity: 1; transform: none; } }

/* --- 16.3 Statutory filing ticker (signature control-room motion) -------- */
.cr-ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--cr-line);
  border-bottom: 1px solid var(--cr-line);
  background: rgba(6, 11, 24, 0.55);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.cr-ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  padding: 10px 0;
  will-change: transform;
  animation: cr-marquee 64s linear infinite;
}
.cr-ticker:hover .cr-ticker__track { animation-play-state: paused; }
.cr-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px;
  font-family: var(--cr-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cr-ink-2);
  border-right: 1px solid var(--cr-line);
}
.cr-ticker__item .fi { width: 17px; height: 12px; border-radius: 2px; }
.cr-ticker__item b { color: var(--cr-ink); font-weight: 600; }
.cr-ticker__item span { color: var(--cr-faint); }
.cr-ticker__item em { font-style: normal; color: var(--cr-sky); }
@keyframes cr-marquee { to { transform: translateX(-50%); } }

/* --- 16.4 Console: boot cascade + alive details -------------------------- */
.cr-console { position: relative; }
.cr-console__scan {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(89, 182, 242, 0.06) 48%, transparent 52%);
  opacity: 0;
}
.cr-stage .cr-console--floating .cr-console__scan { animation: cr-scan 4.2s ease-in-out 1s infinite; }
@keyframes cr-scan {
  0% { opacity: 0; transform: translateY(-100%); }
  12% { opacity: 1; }
  40% { opacity: 0; transform: translateY(120%); }
  100% { opacity: 0; transform: translateY(120%); }
}
/* Lines hidden then cascade in only when boot is armed */
.cr-boot .cr-console__summary .cr-stat,
.cr-boot .cr-lines .cr-line { opacity: 0; transform: translateY(8px); }
.cr-boot.is-booting .cr-console__summary .cr-stat,
.cr-boot.is-booting .cr-lines .cr-line {
  animation: cr-rise 0.5s cubic-bezier(0.16, 0.84, 0.34, 1) forwards;
}
.cr-boot.is-booting .cr-console__summary .cr-stat:nth-child(1) { animation-delay: 0.30s; }
.cr-boot.is-booting .cr-console__summary .cr-stat:nth-child(2) { animation-delay: 0.38s; }
.cr-boot.is-booting .cr-console__summary .cr-stat:nth-child(3) { animation-delay: 0.46s; }
.cr-boot.is-booting .cr-lines .cr-line:nth-child(1) { animation-delay: 0.54s; }
.cr-boot.is-booting .cr-lines .cr-line:nth-child(2) { animation-delay: 0.62s; }
.cr-boot.is-booting .cr-lines .cr-line:nth-child(3) { animation-delay: 0.70s; }
.cr-boot.is-booting .cr-lines .cr-line:nth-child(4) { animation-delay: 0.78s; }
.cr-boot.is-booting .cr-lines .cr-line:nth-child(5) { animation-delay: 0.86s; }
.cr-line:last-child .cr-chip--blocked { animation: cr-blink 2.4s steps(1, end) 1.6s 3; }
@keyframes cr-blink { 0%, 60% { opacity: 1; } 30% { opacity: 0.35; } }

/* --- 16.5 Layered depth: floating exception toast over the hero console -- */
.cr-herostage { position: relative; }
.cr-stage .cr-herostage { animation: cr-fadein 0.85s ease 0.15s both; }
@keyframes cr-fadein { from { opacity: 0; } to { opacity: 1; } }
.cr-toast {
  position: absolute;
  left: -26px;
  bottom: -22px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(13, 22, 44, 0.86);
  border: 1px solid var(--cr-line-strong);
  box-shadow: 0 26px 60px -28px rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  max-width: 290px;
}
.cr-toast__dot {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(70, 214, 171, 0.14);
  color: var(--cr-mint);
  font-size: 15px;
}
.cr-toast__t { font-size: 13px; font-weight: 600; color: var(--cr-ink); }
.cr-toast__s { display: block; margin-top: 2px; font-family: var(--cr-mono); font-size: 11px; color: var(--cr-muted); }
.cr-stage .cr-toast { animation: cr-rise 0.7s cubic-bezier(0.16,0.84,0.34,1) 1.2s both; }
@media (max-width: 980px) { .cr-toast { display: none; } }

/* --- 16.6 Refined spring interactions ----------------------------------- */
.cr-card, .cr-route, .cr-price {
  transition: transform 0.32s cubic-bezier(0.16, 0.84, 0.34, 1),
              border-color 0.2s ease, box-shadow 0.32s ease;
}
.cr-card:hover, .cr-route:hover { transform: translateY(-5px); }
.cr-price:hover { transform: translateY(-4px); }
.cr-btn:focus-visible,
.cr-price:focus-visible,
.cr-card a:focus-visible { outline: 2px solid var(--cr-sky); outline-offset: 3px; }

/* --- 16.7 Reduced-motion / no-JS safety --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .cr-hero::before, .cr-section--ink::before { display: none; }
  .cr-stage .cr-hero__copy > * { opacity: 1; transform: none; animation: none; }
  .cr-boot .cr-console__summary .cr-stat,
  .cr-boot .cr-lines .cr-line { opacity: 1; transform: none; animation: none; }
  .cr-ticker__track { animation: none; }
  .cr-console__scan { display: none; }
  .cr-line:last-child .cr-chip--blocked { animation: none; }
  .cr-toast { animation: none; }
  .cr-stage .cr-herostage { animation: none; opacity: 1; }
}

/* --- 16.8 Country hero: task chooser + route cards on dark ink ---------- */
.cr-hero .pv-choice-grid { margin: 22px 0; gap: 10px; }
.cr-hero .pv-choice {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--cr-line-strong);
  color: var(--cr-ink);
}
.cr-hero .pv-choice:hover { border-color: var(--cr-sky); background: rgba(89, 182, 242, 0.08); }
.cr-hero .pv-choice small { color: var(--cr-muted); }
.cr-hero .pv-choice em { color: var(--cr-sky); }
.cr-hero .pl-action-panel {
  margin: 20px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--cr-line-strong);
  border-radius: var(--cr-radius);
  background: rgba(8, 14, 30, 0.45);
}
.cr-hero .pl-action-panel__title { color: var(--cr-ink-2); font-size: 13px; }
.cr-hero .pl-route-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--cr-line);
  color: var(--cr-ink-2);
}
.cr-hero .pl-route-card strong { color: var(--cr-ink); }
.cr-hero .pl-route-card:hover { border-color: var(--cr-sky); }
.cr-hero .cr-hero__ctas { margin-top: 18px; }

.cr-card--link { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.cr-card--link:hover { border-color: var(--cr-sky-deep); }

/* --- 16.9 Reusable production utilities -------------------------------- */
.cr-section--paper { background: var(--cr-paper); }
.cr-section--flush-top { padding-top: 0; }
.cr-section--form-top { padding-top: clamp(32px, 4vw, 56px); }
.cr-hero--no-border { border-bottom: 0; }
.cr-hero__inner--single { grid-template-columns: 1fr; }
.cr-hero__inner--preview { padding-bottom: clamp(28px, 4vw, 44px); }
.cr-hero__inner--proof { padding-bottom: clamp(36px, 5vw, 64px); }
.cr-hero__copy--narrow { max-width: 760px; }
.cr-hero__copy--wide { max-width: 820px; }
.cr-flow--single { grid-template-columns: 1fr; }
.cr-panel-form--center { max-width: 720px; margin: 0 auto; }
.cr-form-title {
  font-family: var(--cr-display);
  font-weight: 600;
  margin: 8px 0 6px;
}
.cr-status-mint { color: var(--cr-mint); }
.cr-status-amber { color: var(--cr-amber); }
.cr-status-faint { color: var(--cr-faint); }
.cr-status-rose { color: var(--cr-rose); }
.cr-link-sky { color: var(--cr-sky); }
.cr-text-faint { color: var(--cr-faint); }
.cr-text-ink-muted { color: var(--hz-ink-muted); }
.cr-sample-note { color: var(--cr-faint); margin: 6px 0 0; }
.cr-mt-12 { margin-top: 12px; }
.cr-mt-16 { margin-top: 16px; }
.cr-mt-18 { margin-top: 18px; }
.cr-mt-22 { margin-top: 22px; }
.cr-mb-8 { margin: 0 0 8px; }
.cr-proof__win--tight { gap: 9px; }
.cr-file--subtle { background: rgba(255, 255, 255, 0.02); }
.cr-btn--paper-ghost {
  border-color: var(--cr-card-line);
  color: var(--hz-ink);
}
