:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-900: #0f172a;
  --accent-50: #fef3c7;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --radius-card: 16px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
}

/* Layered so it still resets browser defaults (the deep-link .html pages have
   no Tailwind) but loses to Tailwind v4's zero-specificity :where() utilities
   such as space-y-*, which an unlayered `*` rule later in the cascade beats. */
@layer reset {
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  line-height: 1.6;
  color: var(--secondary-900);
  background: linear-gradient(to bottom, transparent, var(--secondary-50))
    var(--primary-50);
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.header-content {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

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

.header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary-900);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.header-title:hover {
  color: var(--primary-600);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.mr-2 {
  margin-right: 8px;
}
.nav-link {
  font-size: 14px;
  color: var(--secondary-600);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-600);
}

/* Header nav links get an underline indicator on hover */
.header-nav .nav-link {
  font-size: 15px;
  font-weight: 500;
  padding: 4px 0;
}

.header-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary-600);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.header-nav .nav-link:hover::after {
  width: 100%;
}

.header-cta {
  background: var(--primary-600);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s;
}

.header-cta:hover {
  background: var(--primary-700);
  color: white;
}

.main-content {
  flex: 1;
}

.container {
  /* max-width: 448px;
  padding: 60px 16px; */
  /* margin: 0 auto;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center; */
}
.custom-container{
  padding: 60px 16px;
  max-width: 448px;
  margin: 0 auto;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.app-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 20px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.app-title {
  text-align: center;
  color: var(--secondary-900);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.app-subtitle {
  text-align: center;
  color: var(--secondary-600);
  font-size: 18px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.match-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.match-teams {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 0;
  color: var(--secondary-900);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  background: #ef4444;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 24px;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.score-display {
  text-align: center;
  margin-bottom: 24px;
}

.team-score {
  margin-bottom: 16px;
}

.team-name {
  font-size: 16px;
  color: var(--secondary-600);
  margin-bottom: 8px;
  font-weight: 500;
}

.score {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-600);
}

.overs {
  font-size: 14px;
  color: var(--secondary-500);
}

.features {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.features-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--secondary-900);
}

.features ul, .feature-list {
  list-style: none;
}

.features ul > li, .feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--secondary-700);
}

.feature-item:last-child {
  margin-bottom: 0;
}

.feature-icon {
  margin-right: 12px;
  font-size: 16px;
}

.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: var(--primary-600);
  padding: 14px 24px;
  border: 2px solid var(--primary-600);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--primary-600);
  color: white;
  text-decoration: none;
}

.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

.store-badge:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Apple badge is tightly cropped; Google Play has built-in padding.
   Setting different heights makes them appear visually the same size. */
.store-badge img[alt="Download on the App Store"] {
  height: 44px;
  width: auto;
}

.store-badge img[alt="Get it on Google Play"] {
  height: 64px;
  width: auto;
}

.disclaimer {
  text-align: center;
  color: var(--secondary-500);
  font-size: 14px;
}

.footer {
  border-top: 1px solid #e5e7eb;
  background: white;
}

.footer-content {
  max-width: 1152px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

@media (min-width: 640px) {
  .footer-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-900);
  margin-bottom: 4px;
}

.footer-col .nav-link {
  font-size: 14px;
}

.footer-col-more {
  font-size: 13px;
  color: var(--primary-600);
  font-weight: 500;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s ease;
}

.footer-col-more:hover {
  color: var(--primary-700);
}

.footer-bottom {
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--secondary-500);
}

.hidden {
  display: none;
}
.d-block {
  display: block;
}

/* Mobile side menu (see src/components/Header.astro). Below 768px the inline
   nav is replaced by a hamburger that opens a slide-in drawer. */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--secondary-900);
  cursor: pointer;
}
.menu-toggle:hover {
  background: var(--secondary-100);
}
.menu-toggle:focus-visible,
.drawer-link:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 71;
  display: flex;
  flex-direction: column;
  width: min(300px, 82vw);
  padding: 12px 20px 24px;
  background: white;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.15);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

body.drawer-open {
  overflow: hidden;
}
body.drawer-open .drawer-backdrop {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease;
}
body.drawer-open .drawer {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  margin-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.drawer-head .menu-toggle {
  display: inline-flex;
}
.drawer-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary-500);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
}
.drawer-link {
  padding: 14px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 17px;
  font-weight: 500;
  color: #1e293b; /* slate-800; no --secondary-800 token is defined */
  text-decoration: none;
}
.drawer-link:hover,
.drawer-link.is-active {
  color: var(--primary-600);
}

.drawer-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.drawer-cta {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 15px;
}
.drawer-cta--outline {
  border: 1px solid var(--primary-600);
  border-radius: 6px;
  color: var(--primary-600);
  font-weight: 500;
  text-decoration: none;
}
.drawer-cta--outline:hover {
  background: var(--primary-50);
}

@media (max-width: 767px) {
  .header-content {
    height: 60px;
    padding: 0 16px;
  }
  .header-title img {
    width: 36px;
    height: 36px;
  }
  .header-nav {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .drawer,
  .drawer-backdrop {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer,
  .drawer-backdrop,
  body.drawer-open .drawer,
  body.drawer-open .drawer-backdrop {
    transition: none;
  }
}

@media (max-width: 480px) {
  /* .container {
    padding: 60px 16px;
  } */

  .app-title {
    font-size: 28px;
  }

  .match-teams {
    font-size: 22px;
  }

  .score {
    font-size: 32px;
  }
}

/* Privacy Policy and Terms Page Styles */
.main-content-pt {
  flex: 1;
  padding: 80px 0;
  background: white;
}

.container-pt {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
}
.prose {
  max-width: none;
}

h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary-900);
  margin-bottom: 24px;
  line-height: 1.2;
}

.effective-date {
  font-size: 18px;
  color: var(--secondary-600);
  margin-bottom: 32px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary-900);
  margin: 32px 0 16px 0;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--secondary-900);
  margin: 0 0 12px 0;
}

p {
  color: var(--secondary-700);
  margin-bottom: 24px;
  line-height: 1.75;
}

ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 24px;
  color: var(--secondary-700);
}

ul li {
  margin-bottom: 8px;
}

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-700);
}

/* Only underline prose/inline links on hover, not cards */
.prose a:hover,
.main-content-pt a:hover {
  text-decoration: underline;
}
.prose a.cta-btn,
.prose a.cta-btn:hover {
  color: white;
  text-decoration: none;
}
.contact-box {
  background: var(--secondary-50);
  padding: 24px;
  border-radius: 8px;
  margin: 32px 0;
}

.contact-box p {
  margin-bottom: 8px;
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.divider {
  margin: 32px 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.last-updated {
  font-size: 14px;
  color: var(--secondary-500);
  font-style: italic;
  margin-bottom: 0;
}

.mr-2 {
  margin-right: 0.5rem;
}

.inline-block {
  display: inline-block;
}

@media (min-width: 768px) {
  h1 {
    font-size: 48px;
  }
}

/* ===== Card & Interactive Hover Styles ===== */

/* Tool & Blog cards */
.card-hover {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-200, #bae6fd);
  text-decoration: none;
  color: inherit;
}

.card-hover:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-hover .card-title {
  color: var(--secondary-900);
  transition: color 0.2s ease;
}

.card-hover:hover .card-title {
  color: var(--primary-600);
}

.card-hover .card-icon {
  transition: transform 0.3s ease;
}

.card-hover:hover .card-icon {
  transform: scale(1.15);
}

/* CTA button hover */
.cta-btn {
  display: inline-block;
  background: var(--primary-600);
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin: 4px;
}

.cta-btn:hover {
  background: var(--primary-700);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

/* Tag pills */
.tag-pill {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.card-hover:hover .tag-pill {
  background: var(--primary-100);
  color: var(--primary-900);
}

/* Arrow link hover ("View all tools →") */
.arrow-link {
  color: var(--primary-600);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.arrow-link:hover {
  color: var(--primary-700);
  text-decoration: none;
  gap: 8px;
}

/* Footer link hover */
.footer .nav-link {
  transition: color 0.2s ease;
}

.footer .nav-link:hover {
  color: var(--primary-600);
}

/* Blog card date on hover */
.card-hover .card-meta {
  color: var(--secondary-400);
  transition: color 0.2s ease;
}

.card-hover:hover .card-meta {
  color: var(--secondary-500);
}

/* Calculator button hover */
.calc-btn {
  /* width: 100%; */
  background: var(--primary-600);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  /* margin-top: 28px; */
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.calc-btn:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.calc-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Breadcrumb link hover */
.breadcrumb a {
  color: var(--secondary-500);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-600);
  text-decoration: none;
}

/* Design system utilities */
.section {
  padding: 64px 0;
}

.hero-section {
  background: linear-gradient(to bottom, var(--primary-50), white);
}

.icon-container {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Advanced calculator UI primitives ---------- */
.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--secondary-100);
  padding-bottom: 4px;
}
.tool-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--secondary-600);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tool-tab:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}
.tool-tab[aria-selected="true"] {
  color: var(--primary-700);
  background: var(--primary-50);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 1px 0 rgba(14, 165, 233, 0.15);
}
.tool-tab-panel { display: none; }
.tool-tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.field-group {
  display: grid;
  gap: 14px;
}
.field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 8px;
  row-gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary-700);
  margin-bottom: 6px;
  line-height: 1.35;
  min-height: 1.35em;
}
.field-hint {
  color: var(--secondary-500);
  font-size: 11px;
  font-weight: 400;
}
.field-help {
  margin-top: 4px;
  font-size: 11px;
  color: var(--secondary-500);
  line-height: 1.3;
}

/* Auto-fit row for top controls that may have a conditionally-shown column */
.fields-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: baseline;
}

/* Make every grid cell that holds a field-label behave as a flex column,
   so labels sit at the top and inputs/sliders snap to the bottom of the row. */
:where(.grid, .fields-row, .field-group) > div:has(> .field-label) {
  display: flex;
  flex-direction: column;
}
:where(.grid, .fields-row, .field-group) > div:has(> .field-label) > .tool-input,
:where(.grid, .fields-row, .field-group) > div:has(> .field-label) > select.tool-input,
:where(.grid, .fields-row, .field-group) > div:has(> .field-label) > .range-row {
  margin-top: auto;
}
.field-section {
  padding: 16px;
  border-radius: 12px;
  background: #fafbfc;
  border: 1px solid var(--secondary-100);
}
.field-section.tinted-primary { background: rgba(14, 165, 233, 0.05); border-color: rgba(14, 165, 233, 0.18); }
.field-section.tinted-warn { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.22); }
.field-section.tinted-danger { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.22); }
.field-section h3,
.field-section h4 { margin: 0 0 12px; }

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.metric-card {
  background: white;
  border: 1px solid var(--secondary-100);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  border-color: var(--primary-100);
}
.metric-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--secondary-500); font-weight: 600; }
.metric-card .value { font-size: 22px; font-weight: 700; color: var(--secondary-900); margin-top: 4px; }
.metric-card .sub { font-size: 11px; color: var(--secondary-500); margin-top: 2px; }
.metric-card.danger .value { color: #b91c1c; }
.metric-card.success .value { color: #166534; }
.metric-card.warn .value { color: #b45309; }
.metric-card.info .value { color: #0369a1; }

.range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--primary-600);
}
.range-row .range-value {
  min-width: 56px;
  text-align: center;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.gauge-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.gauge-wrap svg { width: 100%; height: auto; display: block; }
.gauge-value {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(8%);
  pointer-events: none;
}
.gauge-value .num { font-size: 38px; font-weight: 800; line-height: 1; color: var(--secondary-900); font-variant-numeric: tabular-nums; }
.gauge-value .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--secondary-500); font-weight: 600; margin-top: 6px; }

.split-bar {
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--secondary-100);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.split-bar > div {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.split-bar > div span { padding: 0 8px; white-space: nowrap; }

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline .row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.timeline .row .lab { color: var(--secondary-500); font-weight: 500; }
.timeline .row .bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--primary-400), var(--primary-600));
  transition: width 0.5s ease;
}
.timeline .row .val { font-weight: 700; color: var(--secondary-800); font-variant-numeric: tabular-nums; min-width: 60px; text-align: right; }

.breakdown {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--secondary-100);
  border-radius: 12px;
  padding: 18px;
}
.breakdown ol { padding-left: 20px; }
.breakdown li {
  margin-bottom: 10px;
  color: var(--secondary-700);
  line-height: 1.65;
  font-size: 14px;
}
.breakdown code {
  background: white;
  border: 1px solid var(--secondary-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--secondary-800);
  font-family: 'SF Mono', Menlo, monospace;
}
.breakdown .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary-600);
  color: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
}
.callout.info { background: rgba(14, 165, 233, 0.08); color: var(--primary-700); }
.callout.warn { background: rgba(245, 158, 11, 0.12); color: #92400e; }
.callout.success { background: rgba(34, 197, 94, 0.1); color: #15803d; }
.callout .ico { font-size: 18px; line-height: 1; }

.scenario-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--secondary-100);
  color: var(--secondary-700);
}
.scenario-pill.live { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.scenario-pill.live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.matrix-table th,
.matrix-table td {
  padding: 6px 8px;
  text-align: center;
  border: 1px solid var(--secondary-100);
}
.matrix-table th {
  background: var(--secondary-50);
  font-weight: 600;
  color: var(--secondary-700);
}
.matrix-table tbody th { text-align: right; background: #f8fafc; }
.matrix-cell { color: white; font-weight: 600; }

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.history-card {
  border: 1px solid var(--secondary-100);
  border-radius: 12px;
  padding: 14px 16px;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.history-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.history-card .title { font-size: 14px; font-weight: 700; color: var(--secondary-900); }
.history-card .meta { font-size: 12px; color: var(--secondary-500); margin: 2px 0 8px; }
.history-card .desc { font-size: 13px; color: var(--secondary-600); line-height: 1.5; }
.history-card .btn-link {
  background: none;
  border: none;
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}
.history-card .btn-link:hover { text-decoration: underline; }

.btn-ghost {
  background: white;
  color: var(--secondary-700);
  border: 1px solid var(--secondary-200);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-ghost:hover {
  border-color: var(--primary-300);
  color: var(--primary-700);
}

.tool-input--inline { padding: 8px 10px; font-size: 14px; }
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toggle-row .pill {
  border: 1px solid var(--secondary-200);
  background: white;
  color: var(--secondary-700);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}
.toggle-row .pill:hover { border-color: var(--primary-300); color: var(--primary-700); }
.toggle-row .pill[aria-pressed="true"] {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

@media (max-width: 640px) {
  .metric-card .value { font-size: 18px; }
  .timeline .row { grid-template-columns: 70px 1fr auto; font-size: 12px; }
  .tool-tab { padding: 7px 10px; font-size: 13px; }
}

/* Floating WhatsApp button (see src/components/WhatsAppButton.astro).
   Above the sticky header (z-index 50), below the consent banner so the
   cookie choice always stays reachable. */
.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.whatsapp-fab svg {
  width: 30px;
  height: 30px;
}
.whatsapp-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #ffffff;
}
.whatsapp-fab:focus-visible {
  outline: 3px solid #128c7e;
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .whatsapp-fab {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-fab svg {
    width: 28px;
    height: 28px;
  }
}
/* Stay out of the way while the cookie banner is open (consent.js removes
   #cp-consent-banner once the visitor chooses). */
body:has(#cp-consent-banner) .whatsapp-fab {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab {
    transition: none;
  }
  .whatsapp-fab:hover {
    transform: none;
  }
}
