/**
 * Component library. Every page is built from these — a page file should
 * rarely need a one-off style block.
 */

/* ---------- Buttons ---------- */
.btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 46px;
  padding-inline: var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn-sm {
  height: 38px;
  padding-inline: var(--space-5);
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-text-secondary);
  transform: translateY(-1px);
}

.btn-on-dark {
  background: rgba(248, 250, 252, 0.08);
  color: var(--color-dark-text);
  border-color: var(--color-dark-border);
}

.btn-on-dark:hover {
  background: rgba(248, 250, 252, 0.14);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* ---------- Badge / eyebrow pill ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-accent-bg);
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgb(37 99 235 / 0.25);
}

.card-flat {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

/* Icon circle used inside feature cards */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-accent-bg);
  color: var(--color-accent);
  flex-shrink: 0;
}

.icon-circle svg {
  width: 24px;
  height: 24px;
}

.icon-circle-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
}

/* ---------- Site header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 28px;
  width: auto;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-menu {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: inline-flex;
}

/* Tied to the exact same 900px breakpoint as .site-nav/.nav-toggle so Login and
   Request a Demo never show alongside the hamburger — they live in the mobile
   menu below 900px instead. (Not reusing .hide-mobile: that utility is shared
   with unrelated content elsewhere at a different breakpoint.) */
.header-cta {
  display: none;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  .header-cta {
    display: inline-flex;
  }
}

.mobile-menu {
  display: none;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu .container {
  padding-block: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.mobile-menu a {
  padding: var(--space-3) 0;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

@media (min-width: 900px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ---------- Hero ---------- */
/* Layered, atmospheric background — several soft radial glows plus a sparse
 * dot grid, all at low alpha, so the page reads as "lit by the product"
 * rather than a flat white section with a picture on it. Kept as ordinary
 * background-image layers (not pseudo-elements) since nothing here needs a
 * blend mode; the grain texture below is the one layer that does. */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-20) var(--space-16);
  overflow: hidden;
  background-color: #fbfcfe;
  background-image:
    radial-gradient(circle, rgb(37 99 235 / 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 55% 42% at 50% 4%, rgb(99 102 241 / 0.09), transparent 70%),
    radial-gradient(ellipse 65% 55% at 50% 60%, rgb(37 99 235 / 0.13), transparent 70%),
    radial-gradient(ellipse 45% 40% at 92% 96%, rgb(34 211 238 / 0.09), transparent 65%),
    radial-gradient(ellipse 40% 35% at 4% 92%, rgb(167 139 250 / 0.07), transparent 60%),
    radial-gradient(ellipse 90% 70% at 50% 30%, #ffffff, transparent 75%);
  background-size: 26px 26px, auto, auto, auto, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

/* Faint grain so the gradients above read as atmosphere, not a flat digital
 * blend — a tiled SVG turbulence filter at ~2% opacity via overlay blend. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.025;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%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");
}

@media (min-width: 768px) {
  .hero {
    padding-block: var(--space-32) var(--space-24);
  }
}

.hero-content {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-8);
}

@media (min-width: 540px) {
  .hero-actions {
    flex-direction: row;
  }
}

.hero-preview {
  position: relative;
  margin-top: var(--space-16);
  max-width: 1180px;
  margin-inline: auto;
}

/* Lets the dashboard's own blue/indigo/aqua tones bleed well past its
 * rounded corners and dissolve into the hero background, so the glow reads
 * as coming from the product rather than stopping abruptly at its edge. */
.hero-preview::before {
  content: '';
  position: absolute;
  inset: -90px;
  z-index: -1;
  filter: blur(50px);
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 28% 32%, rgb(37 99 235 / 0.22), transparent 65%),
    radial-gradient(ellipse 50% 45% at 74% 26%, rgb(99 102 241 / 0.18), transparent 65%),
    radial-gradient(ellipse 48% 45% at 62% 82%, rgb(34 211 238 / 0.15), transparent 65%);
}

@media (min-width: 768px) {
  .hero-preview::before {
    inset: -160px;
    filter: blur(70px);
  }
}

.hero-dashboard-img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dashboard-img {
    animation: none;
  }
}

/* A wide dashboard shot shrinks to illegible tiny text at mobile widths —
 * crop into the KPI row instead of shrinking the whole composition, so the
 * mobile hero stays legible rather than merely decorative. */
@media (max-width: 767px) {
  .hero-dashboard-img {
    height: 220px;
    object-fit: cover;
    object-position: 32% 28%;
    border-radius: var(--radius-md);
  }
}

/* Wide annotated photos (e.g. the Company page story images) crop hard on
 * the sides at a narrow mobile column if the height stays fixed — reducing
 * the height keeps closer to the source aspect ratio so corner content
 * (callout labels, etc.) doesn't get cut off. */
.split-photo {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

@media (max-width: 767px) {
  .split-photo {
    height: 220px;
  }
}

.hero-preview .pv {
  min-height: 380px;
}

@media (min-width: 640px) {
  .hero-preview .pv {
    min-height: 460px;
  }
}

/* ---------- Stats ---------- */
.stat-value {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.section-dark .stat-value {
  color: var(--color-dark-text);
}

.stat-label {
  margin-top: var(--space-1);
  font-size: 0.9375rem;
}

/* ---------- Testimonial ---------- */
.testimonial-quote {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--color-text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-accent-bg);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

/* ---------- FAQ (native <details>, no JS needed) ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .faq-chevron {
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-out);
  color: var(--color-text-secondary);
}

.faq-item[open] summary .faq-chevron {
  transform: rotate(180deg);
}

.faq-item p {
  padding-bottom: var(--space-5);
  color: var(--color-text-secondary);
}

/* ---------- Forms ---------- */
.form-field {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-focus);
}

.form-input.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-danger);
}

/* Browser autofill otherwise forces a yellow background + its own text color */
.form-input:-webkit-autofill,
.form-textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--color-text);
  box-shadow: 0 0 0 1000px var(--color-bg) inset;
}

.form-error {
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--color-danger);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  margin-bottom: var(--space-5);
}

.form-alert.alert-success {
  background: var(--color-success-bg);
  color: #15803d;
  border: 1px solid rgb(34 197 94 / 0.25);
}

.form-alert.alert-danger {
  background: var(--color-danger-bg);
  color: #b91c1c;
  border: 1px solid rgb(239 68 68 / 0.25);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark-bg);
  color: var(--color-dark-text-secondary);
  padding-block: var(--space-16) var(--space-8);
}

.site-footer h6 {
  color: var(--color-dark-text);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.site-footer a {
  color: var(--color-dark-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
}

.site-footer a:hover {
  color: var(--color-dark-text);
}

.site-footer .site-logo img {
  filter: brightness(0) invert(1);
}

.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 0.9375rem;
}

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-dark-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.social-links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-dark-border);
}

.social-links svg {
  width: 16px;
  height: 16px;
}

/* ---------- Breadcrumb (used on secondary-page headers) ---------- */
.page-header {
  padding-block: var(--space-12) var(--space-10);
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.breadcrumb a {
  color: var(--color-text-secondary);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb .current {
  color: var(--color-text);
  font-weight: 500;
}

/* ---------- Legal page body (Privacy Policy / Terms) ---------- */
.legal-content > p {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.legal-content h2 {
  font-size: 1.375rem;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 1.0625rem;
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
}

.legal-content ul {
  color: var(--color-text-secondary);
  line-height: 1.7;
  padding-left: 1.25rem;
  margin-bottom: var(--space-6);
}

.legal-content ul li {
  margin-bottom: var(--space-2);
}

.legal-content .legal-contact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

.legal-content .legal-contact svg {
  color: var(--color-accent);
}

/* ---------- Product visuals ----------
 * Composed "product moments" for hero/feature sections — floating cards,
 * KPI stats, rings, bars — never a real app screenshot. Each .pv is a
 * self-contained stage: soft gradient + blurred color blobs behind,
 * one or two focal cards floating above. Keep every composition cropped
 * and partial; nothing here should render like a full app screen.
 */
/* No background, border, or radius of its own — this is layout space, not
 * a container. The illustration inside supplies its own elevation (see
 * .pv-card / .pv-photo) and is meant to read as an object floating in the
 * page's own whitespace, not a card nested inside another card. */
.pv {
  position: relative;
  min-height: 320px;
  padding: var(--space-10) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .pv {
    min-height: 380px;
    padding: var(--space-16) var(--space-12);
  }
}

.pv-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
}

/* Layered shadow — a crisp near shadow, a soft mid shadow, and a wide,
 * very low-opacity blue-tinted shadow standing in for ambient glow beneath
 * the object. This is what makes the illustration read as an elevated
 * product render rather than a flat panel. */
.pv-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.06),
    0 10px 20px -8px rgb(15 23 42 / 0.10),
    0 32px 56px -20px rgb(15 23 42 / 0.14),
    0 40px 70px -24px rgb(37 99 235 / 0.16);
  padding: var(--space-6);
}

/* Same elevation treatment for illustrations that are a plain photo/image
 * rather than a composed .pv-card (e.g. the Reporting screenshot). */
.pv-photo {
  display: block;
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.06),
    0 10px 20px -8px rgb(15 23 42 / 0.10),
    0 32px 56px -20px rgb(15 23 42 / 0.14),
    0 40px 70px -24px rgb(37 99 235 / 0.16);
}

.pv-card-sm {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
}

.pv-float {
  position: absolute;
  z-index: 2;
  transition: transform var(--duration-slow) var(--ease-out);
}

/* A composition with 4+ floating cards is too crowded on a narrow stage —
 * this trims secondary cards below 640px rather than reusing .hide-mobile,
 * whose `display: initial` reset would collapse these to inline and break
 * their box model. */
.pv-float.pv-hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .pv-float.pv-hide-mobile {
    display: block;
  }
}

.pv:hover .pv-float {
  transform: translateY(-4px) rotate(var(--pv-rot, 0deg));
}

/* ---------- Rings / bars / sparklines ---------- */
.pv-ring {
  display: block;
}

.pv-ring-track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 8;
}

.pv-ring-fill {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 8;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
}

.pv-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pv-ring-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
}

.pv-ring-caption {
  margin-top: var(--space-1);
  max-width: 78%;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.pv-bar-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  overflow: hidden;
}

.pv-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

.pv-sparkline {
  display: block;
  overflow: visible;
}

/* ---------- Stats, trends, pills, avatars ---------- */
.pv-stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.1;
}

.pv-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.pv-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  font-weight: 700;
}

.pv-trend svg {
  width: 14px;
  height: 14px;
}

.pv-trend-up { color: var(--color-success); }
.pv-trend-down { color: var(--color-danger); }
.pv-trend-flat { color: var(--color-text-secondary); }

.pv-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pv-pill svg { width: 13px; height: 13px; }

.pv-pill-accent { background: var(--color-accent-bg); color: var(--color-accent); }
.pv-pill-success { background: var(--color-success-bg); color: #15803d; }
.pv-pill-danger { background: var(--color-danger-bg); color: #b91c1c; }
.pv-pill-warning { background: #fffbeb; color: #b45309; }
.pv-pill-neutral { background: var(--color-bg-secondary); color: var(--color-text-secondary); }

.pv-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-accent-bg);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Notification / toast card ---------- */
.pv-notification {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  max-width: 240px;
  border-left: 4px solid var(--color-border);
}

.pv-notification.sev-danger { border-left-color: var(--color-danger); }
.pv-notification.sev-warning { border-left-color: #d97706; }
.pv-notification.sev-accent { border-left-color: var(--color-accent); }
.pv-notification.sev-success { border-left-color: var(--color-success); }

.pv-notification-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.pv-notification-icon svg { width: 16px; height: 16px; }

.pv-notification-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.pv-notification-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

/* ---------- Certificate card ---------- */
.pv-certificate {
  position: relative;
  text-align: center;
  border: 1px solid rgb(180 140 60 / 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgb(217 180 80 / 0.14), transparent 70%),
    #fffdf8;
}

.pv-certificate::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgb(180 140 60 / 0.25);
  border-radius: calc(var(--radius-md) - 2px);
  pointer-events: none;
}

.pv-certificate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: #fdf3d8;
  color: #b45309;
  margin-bottom: var(--space-2);
}

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

.pv-certificate-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
}

.pv-certificate-name {
  margin-top: var(--space-1);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.pv-certificate-course {
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* ---------- Timeline snippet ---------- */
.pv-timeline {
  display: flex;
  align-items: center;
}

.pv-timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  position: relative;
}

.pv-timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-border);
  z-index: 1;
}

.pv-timeline-item.is-done .pv-timeline-dot,
.pv-timeline-item.is-active .pv-timeline-dot {
  background: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.pv-timeline-item::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.pv-timeline-item:first-child::before {
  display: none;
}

.pv-timeline-item.is-done::before {
  background: var(--color-accent);
}

.pv-timeline-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-align: center;
}

.pv-timeline-item.is-done .pv-timeline-label,
.pv-timeline-item.is-active .pv-timeline-label {
  color: var(--color-text);
}

.pv-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pv-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.pv-mini-bars {
  display: flex;
  align-items: flex-end;
  align-self: stretch;
  gap: 5px;
  height: 44px;
}

.pv-mini-bars > span {
  flex: 1;
  border-radius: 3px;
  background: var(--color-accent);
  opacity: 0.85;
}

/* ---------- KPI tile wall (Dashboard) ---------- */
.pv-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.pv-tile {
  padding: var(--space-5) var(--space-4);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.pv-tile:nth-child(3n) {
  border-right: none;
}

.pv-tile:nth-child(n+4) {
  border-bottom: none;
}

/* A full-width strip beneath the tile grid — extra density so the
 * dashboard reads as a wide, data-dense enterprise widget wall rather
 * than a small stat card. */
.pv-tile-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
  border-top: 1px solid var(--color-border);
}

.pv-tile-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pv-tile-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.pv-tile-value {
  margin-top: var(--space-1);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

/* ---------- Stage stepper (Actions, Documents) ---------- */
.pv-stepper {
  display: flex;
  align-items: flex-start;
  padding-inline: var(--space-2);
}

.pv-stepper-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
}

.pv-stepper-step::before {
  content: '';
  position: absolute;
  top: 21px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.pv-stepper-step:first-child::before {
  display: none;
}

.pv-stepper-step.is-done::before {
  background: #86efac;
}

.pv-stepper-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  border: 2px solid var(--color-border);
}

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

.pv-stepper-step.is-done .pv-stepper-icon {
  background: var(--color-success-bg);
  color: #15803d;
  border-color: #86efac;
  box-shadow: 0 0 0 4px var(--color-success-bg);
}

.pv-stepper-step.is-active .pv-stepper-icon {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-bg);
}

.pv-stepper-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-align: center;
}

.pv-stepper-step.is-done .pv-stepper-label,
.pv-stepper-step.is-active .pv-stepper-label {
  color: var(--color-text);
}

/* Accent wash behind a stepper to raise its visual weight within a card
 * (used for Documents, where the approval workflow should read as the
 * primary content rather than a footnote under the title). */
.pv-stepper-band {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-3);
}

/* ---------- Calendar grid (Compliance Calendar) ---------- */
.pv-calendar {
  width: 100%;
}

.pv-calendar-head {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.pv-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.pv-calendar-dow {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-align: center;
  text-transform: uppercase;
  padding-bottom: 2px;
}

.pv-calendar-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

.pv-calendar-cell.is-today {
  background: var(--color-accent);
  color: #fff;
}

.pv-calendar-cell.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-secondary);
}

.pv-calendar-cell.tone-accent::after { background: var(--color-accent); }
.pv-calendar-cell.tone-warning::after { background: #d97706; }
.pv-calendar-cell.tone-success::after { background: var(--color-success); }
.pv-calendar-cell.is-today.has-event::after { background: #fff; }

.pv-calendar-legend {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.pv-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.pv-calendar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- ID card + QR motif (Assets) ---------- */
.pv-idcard {
  width: 232px;
  text-align: center;
}

.pv-idcard-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px dashed var(--color-border);
}

.pv-qr {
  display: inline-grid;
  grid-template-columns: repeat(11, 6px);
  grid-auto-rows: 6px;
  gap: 1.5px;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.pv-qr span {
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
}

.pv-qr span.on {
  background: #0f172a;
}

.pv-qr span.off {
  background: transparent;
}

/* ---------- Combo chart (Reporting) ---------- */
.pv-combo-chart {
  display: block;
  overflow: visible;
}

/* ---------- Feature chapter divider ---------- */
/* Understated category label used to break the features page into
 * chapters (Operations / Compliance / Workforce / Assets) — whitespace
 * and a hairline rather than a heavy section block. */
.pv-chapter {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.pv-chapter-label {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
}

.pv-chapter-rule {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
