:root {
  --brand-red: #c41e3a;
  --brand-navy: #1e3a5f;
  --brand-blue-light: #e8f4fc;
  --brand-blue: #d0e8f5;
  --brand-blue-dark: #1a6b9a;
  --brand-green: #2e7d32;
  --text-muted: rgba(30, 58, 95, 0.7);
  --text-muted-light: rgba(30, 58, 95, 0.5);
  --max-width: 72rem;
  --radius: 1rem;
  --radius-full: 9999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--brand-navy);
  background: linear-gradient(180deg, var(--brand-blue-light) 0%, #ffffff 40%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  flex: 1;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
}

.page-narrow {
  width: 100%;
  max-width: 48rem;
  min-width: 0;
  margin: 0 auto;
  padding: 3rem 1rem;
}

h1 {
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  margin: 0;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.card-shadow {
  box-shadow: 0 4px 24px rgba(30, 58, 95, 0.08);
  transition: box-shadow 0.2s;
}

.card-shadow:hover {
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.12);
}

.site-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.menu-toggle .site-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(208, 232, 245, 0.6);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

/* Homepage promo / coupon banner (js/promos.js → PROMO_BANNER) */
.promo-banner {
  background: linear-gradient(90deg, var(--brand-navy) 0%, #243f66 55%, var(--brand-blue-dark) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.promo-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  text-align: center;
}

.promo-banner-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  flex-shrink: 0;
}

.promo-banner-icon .site-icon,
.promo-banner-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.promo-banner-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.promo-banner-description {
  font-weight: 600;
  color: #fff;
}

.promo-banner-code {
  display: inline-block;
  margin: 0 0.2rem;
  padding: 0.12rem 0.5rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.promo-banner-sep {
  margin: 0 0.4rem;
  opacity: 0.55;
}

.promo-banner-end {
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.85);
}

@media (min-width: 640px) {
  .promo-banner-text {
    font-size: 0.9375rem;
  }
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-badge {
  display: inline-block;
  border: 2px solid var(--brand-navy);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.logo-fill { color: var(--brand-red); }
.logo-sight { color: var(--brand-navy); }

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(30, 58, 95, 0.8);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-red);
}

.btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--brand-red);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  position: relative;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.22);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.btn-cart:hover {
  background: #a01830;
  color: #fff;
  box-shadow: 0 6px 18px rgba(196, 30, 58, 0.38);
  transform: translateY(-1px);
}

.btn-cart:active {
  background: #8b1428;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.28);
  transform: translateY(0);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--brand-navy);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  display: none; /* shown via JS as flex when count >= 1 */
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.cart-badge-sm {
  width: 1rem;
  height: 1rem;
  font-size: 0.625rem;
  top: 0;
  right: 0;
  background: var(--brand-red);
}

.nav-mobile-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cart-icon-mobile {
  position: relative;
  padding: 0.5rem;
  color: var(--brand-navy);
}

.menu-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: var(--brand-navy);
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--brand-blue-light);
}

.nav-mobile {
  border-top: 1px solid rgba(208, 232, 245, 0.4);
  background: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-mobile[hidden] {
  display: none;
}

.nav-mobile-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-mobile-link:hover,
.nav-mobile-link.active {
  background: var(--brand-blue-light);
  color: var(--brand-red);
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-mobile-tools { display: none; }
  .nav-mobile { display: none !important; }
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(208, 232, 245, 0.6);
  background: var(--brand-navy);
  color: white;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  gap: 2rem;
}

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

.footer-logo {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.footer-muted {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0.5rem 0 0;
}

.footer-heading {
  font-weight: 600;
  margin: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: white;
}

.footer-legal {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-legal a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary,
a.btn-primary,
button.btn-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.22);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.btn-primary:hover:not(:disabled),
a.btn-primary:hover,
button.btn-primary:hover:not(:disabled) {
  background: #a01830;
  color: #fff;
  box-shadow: 0 6px 18px rgba(196, 30, 58, 0.38);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled),
a.btn-primary:active,
button.btn-primary:active:not(:disabled) {
  background: #8b1428;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.28);
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-green,
a.btn-green,
button.btn-green {
  background: #1f5c3d;
  color: #fff;
  box-shadow: 0 4px 14px rgba(31, 92, 61, 0.28);
}

.btn-green:hover:not(:disabled),
a.btn-green:hover,
button.btn-green:hover:not(:disabled) {
  background: #174a30;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--brand-navy);
  border: 2px solid var(--brand-navy);
}

.btn-outline:hover {
  background: var(--brand-navy);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted-light);
  font-size: 0.875rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-text:hover { color: var(--brand-red); }

/* Hero */
.hero {
  background: linear-gradient(135deg, #e8f4fc 0%, #d0e8f5 50%, #b8dff0 100%);
  border-bottom: 2px solid rgba(26, 107, 154, 0.28);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 1023px) {
  .hero-image-wrap {
    order: -1;
  }
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    padding: 6rem 1.5rem;
  }
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-blue-dark);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3rem);
}

.text-red { color: var(--brand-red); }

.hero-price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

.hero-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Shared sale / list price display (home, product, cart) */
.price-block {
  margin-top: 1.5rem;
}

.price-block--hero {
  margin-top: 1.5rem;
}

.price-block--product {
  margin-top: 1.5rem;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.price-now {
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.2;
}

.price-block--hero .price-now {
  font-size: 1.5rem;
}

.price-block--product .price-now {
  font-size: 2.25rem;
}

.price-block--sale .price-now {
  color: var(--brand-red);
}

.price-currency {
  font-weight: 400;
  color: var(--text-muted);
}

.price-block--hero .price-currency {
  font-size: 1rem;
}

.price-block--product .price-currency {
  font-size: 1.125rem;
  color: var(--text-muted-light);
}

.price-was {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.price-block--hero .price-was {
  font-size: 1.125rem;
}

.price-block--product .price-was {
  font-size: 1.25rem;
}

.sale-pill {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.cart-line-unit-price--sale {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}

.cart-line-price-now {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-red);
  white-space: nowrap;
}

.cart-line-price-was {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-box {
  border: 2px solid #1a1a1a;
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
}

.made-in-usa {
  position: absolute;
  bottom: -1rem;
  left: -1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #ffffff;
  color: var(--brand-navy);
  padding: 0.5rem 0.875rem 0.5rem 0.625rem;
  border-radius: var(--radius-full);
  border: 2px solid #B22234;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.18);
}

.made-in-usa-flag {
  width: 2.25rem;
  height: auto;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.made-in-usa-text {
  line-height: 1.2;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Sections */
.section-white {
  background: rgba(255, 255, 255, 0.6);
  padding: 4rem 0;
}

.two-col {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.home-main {
  background: rgba(255, 255, 255, 0.6);
  padding: 2.5rem 0;
}

.home-main .page {
  padding-top: 0;
  padding-bottom: 0;
}

.home-story-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .home-story-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.story-card {
  background: white;
  border: 2px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.story-card--problem {
  border-color: #9a1830;
}

.story-card--solution {
  border-color: #1f5c3d;
}

.story-card-image {
  padding: 1.25rem 1.25rem 0.75rem;
}

.story-card--problem .story-card-image {
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

.story-card--solution .story-card-image {
  background: linear-gradient(180deg, rgba(45, 122, 79, 0.12) 0%, rgba(255, 255, 255, 0) 100%);
}

.story-card-image img {
  display: block;
  width: 100%;
  max-height: 22rem;
  margin: 0 auto;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}

.story-card-content {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.story-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-card--problem .story-label {
  background: rgba(196, 30, 58, 0.12);
  color: var(--brand-red);
}

.story-card--solution .story-label {
  background: rgba(45, 122, 79, 0.14);
  color: #2d7a4f;
}

.story-label svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.story-card-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

@media (min-width: 1024px) {
  .story-card-image {
    padding: 1.5rem 1.5rem 1rem;
  }

  .story-card-image img {
    max-height: 28rem;
  }
}

.home-what-is {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
}

.home-what-is .home-features-title {
  margin-top: 2.5rem;
}

.home-what-is .home-feature-grid {
  margin-top: 1.5rem;
}

.two-col-reverse .col-image {
  order: 2;
}

@media (min-width: 1024px) {
  .two-col-reverse { direction: rtl; }
  .two-col-reverse > * { direction: ltr; }
}

.image-rounded {
  border-radius: var(--radius);
  overflow: hidden;
}

.image-box {
  border: 1px solid rgba(208, 232, 245, 0.4);
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
}

/* Feature cards */
.feature-grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.feature-card {
  background: white;
  border: 2px solid #1a1a1a;
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--brand-blue-light);
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Bullet list */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  max-width: 48rem;
  display: grid;
  gap: 0.75rem;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--text-muted);
}

.bullet-list svg,
.bullet-list .check-icon {
  color: var(--brand-green);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Product page */
.product-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

.product-grid .image-box {
  border: 2px solid #1a1a1a;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.thumb-grid img {
  height: 6rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

.spec-table {
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
}

.spec-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(208, 232, 245, 0.4);
}

.spec-row:last-child { border-bottom: none; }
.spec-row dt { font-weight: 500; margin: 0; }
.spec-row dd { color: var(--text-muted); margin: 0; }

.kit-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.kit-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.kit-list svg { color: var(--brand-green); flex-shrink: 0; margin-top: 2px; }

.product-price {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
}

.product-price span {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-muted-light);
}

/* Steps */
.step-card {
  display: flex;
  gap: 1.25rem;
  background: white;
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.step-num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--brand-red);
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-card h2 { font-size: 1.125rem; }
.step-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

.steps-grid {
  display: grid;
  gap: 1rem;
}

.info-box {
  background: var(--brand-blue-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.info-box--important {
  background: #fff5f6;
  border: 2px solid var(--brand-red);
  box-shadow: 0 4px 16px rgba(196, 30, 58, 0.12);
  padding: 0;
  overflow: hidden;
}

.info-box--important .info-box-label {
  display: block;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0;
  background: var(--brand-red);
  color: white;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-box--important .info-box-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.info-box a:not(.btn) {
  color: var(--brand-red);
  font-weight: 500;
}

.info-box a:not(.btn):hover { text-decoration: underline; }

/* FAQ */
.faq-item {
  background: white;
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
}

.faq-item summary {
  padding: 1rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-toggle {
  color: var(--brand-red);
  transition: transform 0.2s;
}

.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(208, 232, 245, 0.3);
  padding-top: 1rem;
  margin: 0 1.5rem 1rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.support-section-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: var(--brand-navy);
}

.support-faq-section {
  margin-top: 3rem;
}

/* About */
.about-text {
  max-width: 42rem;
  margin: 0 auto;
  padding-left: 1.5rem;
}

@media (min-width: 640px) {
  .about-text { padding-left: 2.5rem; }
}

@media (min-width: 1024px) {
  .about-text { padding-left: 4rem; }
}

.about-text p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.banner-navy {
  background: var(--brand-navy);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
}

.banner-navy p { margin: 0; }
.banner-navy .sub { font-size: 0.875rem; color: rgba(255,255,255,0.7); margin-top: 0.25rem; }

/* Contact */
.contact-card {
  max-width: 28rem;
  margin: 2.5rem auto 0;
  background: white;
  border: 2px solid #1a1a1a;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}



.contact-links {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.contact-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.contact-links a:hover { color: var(--brand-red); }
.contact-links svg { color: var(--brand-red); }

/* Cart */
.cart-items-panel {
  border: 2px solid rgba(30, 58, 95, 0.1);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.06);
  overflow: hidden;
}

.cart-items-panel-header {
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid rgba(208, 232, 245, 0.7);
  background: rgba(255, 255, 255, 0.72);
}

.cart-items-panel-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.cart-items-list {
  list-style: none;
  margin: 0;
  padding: 1rem 1rem 0.875rem;
  display: grid;
  gap: 0.875rem;
}

.cart-items-panel-summary {
  padding: 1rem 1.25rem 1.125rem;
  border-top: 1px solid rgba(208, 232, 245, 0.75);
  background: rgba(255, 255, 255, 0.72);
}

.cart-items-panel-summary .summary-row:first-child {
  margin-top: 0;
}

.cart-items-panel-summary .cart-checkout-note {
  margin: 0.75rem 0 0;
}

.cart-items-list-item {
  margin: 0;
}

.cart-line-item {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(208, 232, 245, 0.85);
  border-radius: var(--radius);
  background: #ffffff;
}

.cart-line-media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(208, 232, 245, 0.8);
  background: #f8fbfe;
  min-height: 5.5rem;
}

.cart-line-image {
  width: 100%;
  max-height: 4.75rem;
  object-fit: contain;
}

.cart-line-content {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

.cart-line-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.cart-line-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--brand-navy);
}

.cart-line-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.375rem;
  flex-shrink: 0;
}

.cart-line-unit-price {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--brand-navy);
  white-space: nowrap;
}

.cart-line-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(208, 232, 245, 0.7);
}

.cart-line-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
}

.cart-line-remove-btn--icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.cart-line-remove-btn:hover {
  color: var(--brand-red);
  background: rgba(196, 30, 58, 0.06);
}

.cart-line-remove-btn:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.35);
  outline-offset: 2px;
}

.cart-line-remove-btn svg {
  width: 1rem;
  height: 1rem;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(208, 232, 245, 0.9);
  background: #f8fbfe;
  flex-shrink: 0;
}

.qty-controls .qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border: 1px solid rgba(208, 232, 245, 0.8);
  background: white;
  border-radius: 0.5rem;
  padding: 0;
  cursor: pointer;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
  color: var(--brand-navy);
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(30, 58, 95, 0.05);
  touch-action: manipulation;
}

.qty-controls .qty-btn span {
  display: block;
  margin-top: -0.125rem;
}

.qty-controls .qty-btn:hover {
  background: var(--brand-blue-light);
  border-color: var(--brand-blue);
}

.qty-controls .qty-btn:focus-visible {
  outline: 2px solid rgba(196, 30, 58, 0.35);
  outline-offset: 2px;
}

.qty-controls .qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f3f7fb;
}

#cart-content.cart-nav-guard a {
  pointer-events: none;
}

.cart-continue-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brand-navy);
  text-decoration: none;
  transition: color 0.2s;
}

.cart-continue-link:hover {
  color: var(--brand-red);
}

.cart-continue-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.qty-display {
  min-width: 2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--brand-navy);
}

@media (max-width: 640px) {
  .cart-line-item {
    grid-template-columns: 1fr;
  }

  .cart-line-media {
    min-height: auto;
    max-width: 8rem;
  }

}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.cart-checkout-note {
  text-align: center;
}

.summary-row[hidden] {
  display: none !important;
}

.disclaimer-box {
  padding: 1.25rem 1.25rem 1.375rem;
  border-radius: var(--radius);
  border: 2px solid #d97706;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 8px 22px rgba(217, 119, 6, 0.12);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.disclaimer-box:has(#disclaimer-ack:checked),
.disclaimer-box.is-acknowledged {
  border-color: #1f5c3d;
  background: linear-gradient(180deg, #edf9f1 0%, #ffffff 100%);
  box-shadow: 0 8px 22px rgba(31, 92, 61, 0.12);
}

.disclaimer-box:has(#disclaimer-ack:checked) .disclaimer-box-icon,
.disclaimer-box.is-acknowledged .disclaimer-box-icon {
  background: #1f5c3d;
  box-shadow: 0 4px 12px rgba(31, 92, 61, 0.28);
}

.disclaimer-box:has(#disclaimer-ack:checked) .disclaimer-box-title,
.disclaimer-box.is-acknowledged .disclaimer-box-title {
  color: #1f5c3d;
}

.disclaimer-box:has(#disclaimer-ack:checked) .disclaimer-box-body,
.disclaimer-box.is-acknowledged .disclaimer-box-body {
  border-color: rgba(31, 92, 61, 0.22);
}

.disclaimer-box-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.disclaimer-box-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #d97706;
  color: #fff;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}

.disclaimer-box-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.disclaimer-box-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #92400e;
  line-height: 1.3;
}

.disclaimer-box-lead {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.disclaimer-box-body {
  padding: 1.125rem 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(217, 119, 6, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.disclaimer-box-copy {
  display: grid;
  gap: 0.875rem;
}

.disclaimer-box-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.disclaimer-box-text + .disclaimer-box-text {
  margin-top: 0;
}

.disclaimer-box-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid rgba(217, 119, 6, 0.16);
}

.disclaimer-box-link {
  display: inline-block;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-red);
  text-decoration: none;
}

.disclaimer-box-link:hover {
  text-decoration: underline;
}

.disclaimer-acknowledge {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-top: 1.125rem;
  padding: 1rem 1.125rem;
  border-radius: calc(var(--radius) - 2px);
  border: 2px solid rgba(217, 119, 6, 0.28);
  background: #fffdf7;
  cursor: pointer;
}

.disclaimer-acknowledge:has(input:checked),
.disclaimer-acknowledge.is-acknowledged {
  border-color: #1f5c3d;
  background: linear-gradient(180deg, #edf9f1 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(31, 92, 61, 0.1);
}

.disclaimer-acknowledge input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: var(--brand-red);
  cursor: pointer;
}

.disclaimer-acknowledge-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.disclaimer-acknowledge-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.35;
}

.disclaimer-acknowledge-detail {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.disclaimer-acknowledge-detail strong {
  color: #92400e;
}

.disclaimer-acknowledge:has(input:checked) .disclaimer-acknowledge-title,
.disclaimer-acknowledge.is-acknowledged .disclaimer-acknowledge-title {
  color: #1f5c3d;
}

.disclaimer-acknowledge:has(input:checked) .disclaimer-acknowledge-detail strong,
.disclaimer-acknowledge.is-acknowledged .disclaimer-acknowledge-detail strong {
  color: #1f5c3d;
}

.disclaimer-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.disclaimer-check input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: var(--brand-red);
  cursor: pointer;
}

#checkout-hint {
  color: var(--text-muted-light);
}

.cart-checkout-section {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  min-width: 0;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 2px solid rgba(30, 58, 95, 0.14);
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
  box-shadow: 0 8px 22px rgba(30, 58, 95, 0.08);
}

.cart-checkout-section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.cart-checkout-section .cart-tax-panel {
  margin-top: 0;
}

.cart-checkout-section .disclaimer-box {
  margin-top: 0;
}

.cart-checkout-actions {
  display: grid;
  gap: 0.75rem;
}

.cart-checkout-terms {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.cart-checkout-terms a {
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cart-checkout-terms a:hover {
  color: var(--brand-red);
}



.disclaimer-expand-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-red);
  cursor: pointer;
  text-decoration: none;
}

.disclaimer-expand-btn:hover {
  text-decoration: underline;
}

.disclaimer-box-expandable {
  display: none;
  gap: 0.875rem;
  margin-top: 0.875rem;
}

.disclaimer-box-expandable.is-expanded {
  display: grid;
}

.cart-sticky-checkout {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(208, 232, 245, 0.9);
  box-shadow: 0 -8px 24px rgba(30, 58, 95, 0.12);
  backdrop-filter: blur(8px);
}

.cart-sticky-checkout.is-visible {
  display: block;
}

.cart-sticky-checkout-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.cart-sticky-checkout-total {
  flex: 1;
  min-width: 0;
}

.cart-sticky-checkout-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted-light);
}

.cart-sticky-checkout-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.2;
}

.cart-sticky-checkout-btn {
  flex-shrink: 0;
  min-width: 10.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  touch-action: manipulation;
}

.cart-checkout-actions .js-checkout-btn {
  touch-action: manipulation;
}

@media (min-width: 769px) {
  .cart-sticky-checkout {
    display: none !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .cart-sticky-checkout {
    display: none !important;
  }

  #cart-content.cart-content-has-sticky {
    padding-bottom: 0;
  }
}

@media (max-width: 768px) {
  #cart-content.cart-content-has-sticky {
    padding-bottom: 5.75rem;
  }
}

/* Legal */
.legal-content {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-content h1 {
  color: var(--brand-navy);
}

.legal-content h2 {
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin-top: 2.5rem;
}

.legal-content h3 {
  font-size: 1.0625rem;
  color: var(--brand-navy);
  margin-top: 1.75rem;
}

#disclaimer-text {
  white-space: pre-line;
}

.legal-list {
  margin: 0.75rem 0 1rem;
  padding-left: 1.25rem;
}

.legal-list li {
  margin-bottom: 0.5rem;
}

/* Device icons */
.device-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.device-icons img {
  width: 4rem;
  height: 4rem;
}

.page-banner {
  background: linear-gradient(135deg, #e8f4fc 0%, #d0e8f5 50%, #b8dff0 100%);
  border-bottom: 2px solid rgba(26, 107, 154, 0.28);
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.05);
  overflow: hidden;
}

.page-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.75rem 1rem 3.5rem;
  text-align: center;
}

.page-banner-eyebrow {
  margin: 0.625rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-red);
}

.page-banner h1 {
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  line-height: 1.2;
}

.page-banner-lead {
  margin: 1rem auto 0;
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(30, 58, 95, 0.82);
}

/* Compact page banner: title only, less vertical space */
.page-banner--compact .page-banner-inner {
  padding: 1.25rem 1rem 1.15rem;
}

.page-banner--compact h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0;
  line-height: 1.25;
}

.page-banner--cart .page-banner-inner--cart {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 1.375rem 1rem 1.25rem;
  text-align: center;
}

.page-banner--cart .cart-continue-link {
  grid-column: 1;
  justify-self: start;
}

.page-banner--cart h1 {
  grid-column: 2;
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.page-banner--cart ~ .page-narrow.page--with-banner,
.page-banner--cart ~ .page.page--with-banner {
  padding-top: 2rem;
}

@media (max-width: 639px) {
  .page-banner--cart .page-banner-inner--cart {
    grid-template-columns: 1fr;
    padding-top: 1.125rem;
    padding-bottom: 1.125rem;
  }

  .page-banner--cart .cart-continue-link {
    grid-column: 1;
    justify-self: start;
  }

  .page-banner--cart h1 {
    grid-column: 1;
    justify-self: center;
  }
}

.page--with-banner {
  padding-top: 3rem;
}

.page-narrow.page--with-banner {
  padding-top: 3rem;
}

.page--with-banner .feature-sections {
  margin-top: 0;
}

@media (min-width: 1024px) {
  .page-banner-inner {
    padding: 4.5rem 1.5rem 4rem;
  }

  .page--with-banner,
  .page-narrow.page--with-banner {
    padding-top: 3.75rem;
  }

  .page-banner--cart .page-banner-inner--cart {
    padding: 1.5rem 1.5rem 1.375rem;
  }

  .page-banner--cart ~ .page-narrow.page--with-banner,
  .page-banner--cart ~ .page.page--with-banner {
    padding-top: 2.5rem;
  }
}

.feature-sections {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.feature-section {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.feature-section-media {
  max-width: 17rem;
  margin: 0 auto;
  width: 100%;
}

.feature-section-media img {
  display: block;
  width: 100%;
  max-height: 13rem;
  object-fit: contain;
}

.feature-section-media img.feature-section-img--tall {
  max-height: 18.75rem;
}

.feature-section-body h2 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.feature-section-devices {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.feature-section-devices img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
}

.feature-section--footer {
  display: block;
  margin-top: 0.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(208, 232, 245, 0.85);
}

.feature-section--footer .feature-section-body {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.feature-section--footer .feature-section-devices {
  justify-content: center;
}

.feature-section--text-only .feature-section-body {
  max-width: none;
  margin: 0;
}

@media (max-width: 1023px) {
  .feature-section {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(208, 232, 245, 0.85);
  }

  .feature-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .feature-section-media {
    order: -1;
  }

  .feature-section-body {
    text-align: center;
  }

  .feature-section + .feature-section--footer {
    border-top: none;
    margin-top: 0;
    padding-top: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .feature-sections {
    gap: 4rem;
    margin-top: 3rem;
  }

  .feature-section {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    gap: 2.5rem;
    padding-bottom: 0;
    border-bottom: none;
  }

  .feature-section--reverse {
    grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  }

  .feature-section--reverse .feature-section-media {
    order: 2;
  }

  .feature-section--reverse .feature-section-body {
    order: 1;
    text-align: left;
  }

  .feature-section-body {
    text-align: left;
  }

  .feature-section-media {
    margin: 0;
  }

  .feature-section-devices {
    justify-content: flex-start;
  }

  .feature-section--footer {
    padding-top: 3rem;
  }

  .feature-section--footer .feature-section-body {
    text-align: center;
  }

  .feature-section--text-only {
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  }

  .feature-section--text-only .feature-section-body {
    grid-column: 2;
    text-align: left;
  }

  .feature-section--text-only.feature-section--reverse {
    grid-template-columns: minmax(0, 1fr) minmax(0, 17rem);
  }

  .feature-section--text-only.feature-section--reverse .feature-section-body {
    grid-column: 1;
    text-align: left;
  }

  .feature-section--text-only .feature-section-devices {
    justify-content: flex-start;
  }
}

.elevated-shadow {
  box-shadow:
    0 4px 14px rgba(30, 58, 95, 0.16),
    0 18px 44px rgba(30, 58, 95, 0.26);
  transition: box-shadow 0.25s ease;
}

.elevated-shadow:hover {
  box-shadow:
    0 6px 18px rgba(30, 58, 95, 0.18),
    0 24px 52px rgba(30, 58, 95, 0.32);
}

/* App store links */
.app-store-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .app-store-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.app-store-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.app-store-icon {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}

.app-store-item h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--brand-navy);
}

.app-store-link {
  display: inline-block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-red);
}

.app-store-link:hover {
  text-decoration: underline;
}

/* Documentation downloads */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.doc-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: white;
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.doc-item-info {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  flex: 1;
  min-width: 12rem;
}

.doc-icon {
  color: var(--brand-red);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.doc-title {
  font-weight: 600;
  color: var(--brand-navy);
}

.doc-title:hover {
  color: var(--brand-red);
}

.doc-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

.doc-download {
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  white-space: nowrap;
}

/* Sales tax exemption */
.tax-form-intro {
  max-width: 42rem;
}

.tax-form-steps {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tax-form-steps li {
  margin-bottom: 0.5rem;
}

.tax-upload-callout {
  background: #fff5f6;
  border: 2px solid var(--brand-red);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--brand-navy);
  line-height: 1.6;
}

.tax-upload-callout p {
  margin: 0;
}

.tax-upload-field input[type="file"] {
  padding: 0.75rem;
  border: 2px dashed rgba(196, 30, 58, 0.35);
  border-radius: 0.5rem;
  background: #fffafb;
  width: 100%;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.numbered-steps {
  margin: 1rem 0 0 1.25rem;
  padding: 0;
}

.numbered-steps li {
  margin-bottom: 0.5rem;
}

.numbered-steps a {
  color: var(--brand-red);
  font-weight: 500;
}

.tax-form {
  max-width: 42rem;
  background: white;
  border: 1px solid rgba(208, 232, 245, 0.4);
  border-radius: var(--radius);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .tax-form { padding: 2rem; }
}

.tax-form-section {
  border: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.tax-form-section legend {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--brand-navy);
  margin-bottom: 1rem;
  padding: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field input,
.form-field select {
  border: 1px solid rgba(208, 232, 245, 0.8);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: var(--brand-navy);
  background: white;
}

.form-field input:focus,
.form-field select:focus {
  outline: 2px solid rgba(196, 30, 58, 0.25);
  border-color: var(--brand-red);
}

.signature-wrap {
  margin-top: 0.75rem;
}

#signature-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 140px;
  border: 1px dashed rgba(208, 232, 245, 0.9);
  border-radius: 0.5rem;
  background: #fafafa;
  touch-action: none;
  cursor: crosshair;
}

.form-status {
  margin-top: 1rem;
  font-size: 0.875rem;
  min-height: 1.25rem;
}

.form-status.success {
  color: #166534;
}

.form-status.error {
  color: var(--brand-red);
}

.tax-success-page-title {
  color: #1f5c3d;
}

.tax-form-page--success {
  padding-top: 2rem;
}

.tax-form-success {
  max-width: 42rem;
  margin: 1.5rem auto 0;
  animation: tax-success-in 0.45s ease;
}

@keyframes tax-success-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tax-success-card {
  background: linear-gradient(180deg, #edf9f1 0%, #ffffff 45%);
  border: 3px solid #1f5c3d;
  border-radius: var(--radius);
  padding: 0 1.5rem 2rem;
  text-align: center;
  box-shadow:
    0 4px 14px rgba(31, 92, 61, 0.16),
    0 18px 44px rgba(31, 92, 61, 0.2);
  overflow: hidden;
}

.tax-success-banner {
  margin: 0 -1.5rem 1.5rem;
  padding: 0.85rem 1rem;
  background: #1f5c3d;
  color: white;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tax-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #1f5c3d;
  color: white;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(31, 92, 61, 0.28);
}

.tax-success-icon svg {
  width: 2.75rem;
  height: 2.75rem;
}

.tax-success-title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  color: var(--brand-navy);
  line-height: 1.25;
}

.tax-success-message {
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: white;
  border: 2px solid rgba(31, 92, 61, 0.25);
  color: #1f5c3d;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.55;
}

.tax-success-next {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--brand-blue-light);
  text-align: left;
}

.tax-success-next p {
  margin: 0 0 0.75rem;
}

.tax-success-next ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tax-success-next li {
  margin-bottom: 0.5rem;
}

.tax-success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tax-success-notice {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: #edf9f1;
  border: 1px solid rgba(31, 92, 61, 0.25);
  color: #1f5c3d;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

.cart-tax-panel {
  display: grid;
  gap: 0.625rem;
  width: 100%;
  min-width: 0;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(30, 58, 95, 0.1);
  background: #f8fbfe;
}

.cart-tax-panel > * {
  min-width: 0;
}

.cart-tax-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.3;
  text-align: center;
}

.cart-email-field {
  margin: 0;
}

.cart-email-field span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.cart-email-field input {
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
}

.exemption-status {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.exemption-status--success {
  color: #1f5c3d;
}

.exemption-status--warning {
  color: #7a5200;
}

.exemption-status--idle,
.exemption-status--loading,
.exemption-status--info {
  color: var(--text-muted);
}

.cart-tax-panel-footnote {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

.cart-tax-panel-footnote a {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: none;
}

.cart-tax-panel-footnote a:hover {
  text-decoration: underline;
}

/* Testimonials */
.testimonial-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

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

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

.testimonial-card {
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(30, 58, 95, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0;
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
  box-shadow: 0 8px 22px rgba(30, 58, 95, 0.08);
}

.testimonial-stars {
  color: #d97706;
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.testimonial-quote {
  flex: 1;
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: normal;
}

.testimonial-author {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(208, 232, 245, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.testimonial-author strong {
  color: var(--brand-navy);
  font-size: 0.9375rem;
}

.testimonial-meta {
  font-size: 0.8125rem;
  color: var(--text-muted-light);
}

/* Order success */
.order-success-page {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.order-success-card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1.75rem 1.75rem;
  background: #ffffff;
  border: 1px solid rgba(208, 232, 245, 0.95);
  border-radius: var(--radius);
  text-align: center;
}

.order-success-card--loading {
  padding: 3rem 1.75rem;
}

.order-success-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-success-status svg,
.order-success-status i {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.order-success-status--confirmed {
  color: var(--brand-green);
  background: rgba(46, 125, 50, 0.1);
}

.order-success-status--error {
  color: var(--brand-red);
  background: rgba(196, 30, 58, 0.08);
}

.order-success-status--pending {
  color: var(--brand-navy);
  background: rgba(30, 58, 95, 0.06);
}

.order-success-spinner {
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(30, 58, 95, 0.15);
  border-top-color: var(--brand-navy);
  border-radius: 50%;
  animation: order-success-spin 0.8s linear infinite;
}

@keyframes order-success-spin {
  to { transform: rotate(360deg); }
}

.order-success-card h1 {
  margin-top: 1.25rem;
  font-size: clamp(1.625rem, 4vw, 2rem);
}

.order-success-lead {
  margin: 0.875rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.order-success-receipt {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(208, 232, 245, 0.9);
  text-align: left;
}

.order-success-receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.order-success-receipt-row + .order-success-receipt-row {
  margin-top: 0.75rem;
}

.order-success-receipt-row span:last-child {
  color: var(--brand-navy);
  font-weight: 600;
  text-align: right;
}

.order-success-receipt-row--total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(208, 232, 245, 0.9);
  font-size: 1rem;
  color: var(--brand-navy);
}

.order-success-receipt-row--total span:first-child {
  font-weight: 600;
  color: var(--brand-navy);
}

.order-success-receipt-row--total span:last-child {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  line-height: 1.1;
}

.order-success-steps {
  margin-top: 1.75rem;
  padding: 1.375rem 1.25rem 1.25rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--brand-blue-light);
  text-align: left;
}

.order-success-steps h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-navy);
  text-align: center;
}

.order-success-steps ol {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.875rem;
  counter-reset: order-step;
}

.order-success-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
  counter-increment: order-step;
}

.order-success-steps li > span {
  flex: 1;
  min-width: 0;
}

.order-success-steps li::before {
  content: counter(order-step);
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.order-success-steps a {
  color: var(--brand-red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.order-success-steps a:hover {
  color: var(--brand-navy);
}

.order-success-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .order-success-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .order-success-actions .btn {
    width: 100%;
  }
}

/* Videos page */
.video-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 2px solid rgba(30, 58, 95, 0.12);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.video-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: var(--brand-navy);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.video-card-thumb:hover img,
.video-card-thumb:focus-visible img {
  transform: scale(1.03);
  opacity: 0.92;
}

.video-card-thumb:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 2px;
}

.video-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-card-play::before {
  content: "";
  position: absolute;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-full);
  background: rgba(196, 30, 58, 0.92);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.video-card-play .site-icon,
.video-card-play svg {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  color: #fff;
  margin-left: 0.15rem;
}

.video-card-body {
  padding: 1.25rem 1.35rem 1.4rem;
}

.video-card-category {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-blue-dark);
}

.video-card-body h2 {
  font-size: 1.125rem;
  margin: 0;
}

.video-card-desc {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
}

body.video-modal-open {
  overflow: hidden;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 46, 0.72);
  backdrop-filter: blur(4px);
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(56rem, 100%);
  background: #0f1c2e;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.video-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--brand-navy);
  color: #fff;
}

.video-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.video-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.video-modal-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.video-modal-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Calibration consistency evaluator */
.cal-eval-page {
  max-width: 100rem;
  width: 100%;
}

/* Shown only on small screens — tool is desktop-oriented */
.cal-mobile-notice {
  display: none;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid rgba(180, 120, 20, 0.45);
  background: linear-gradient(180deg, #fff8ec 0%, #fffdf8 100%);
  color: #7c4a03;
  box-shadow: 0 2px 8px rgba(124, 74, 3, 0.06);
}

.cal-mobile-notice-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: #92400e;
}

.cal-mobile-notice-lead {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cal-mobile-notice-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  line-height: 1.45;
  display: grid;
  gap: 0.3rem;
}

.cal-mobile-notice-list li::marker {
  color: #b45309;
}

@media (max-width: 768px) {
  .cal-mobile-notice {
    display: block;
  }
}

.cal-intro {
  background: #fff;
  border: 2px solid rgba(30, 58, 95, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
  margin-bottom: 1.75rem;
}

.cal-intro h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.cal-intro-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.4rem;
}

.cal-intro-note {
  margin: 1rem 0 0;
  line-height: 1.45;
}

/* Action bar above the tables — centered, grouped boxes by purpose */
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.85rem;
  background: #fff;
  border: 2px solid rgba(30, 58, 95, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1.1rem;
  margin-bottom: 1.25rem;
}

.cal-toolbar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
  padding: 0.75rem 1rem 0.85rem;
  background: linear-gradient(180deg, #f8fbfe 0%, #f3f7fb 100%);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(30, 58, 95, 0.04);
}

.cal-toolbar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.cal-toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

/* Keep toolbar links (e.g. Calibration Worksheet PDF) matching button font/size */
.cal-toolbar .btn,
.cal-toolbar a.btn {
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
  text-decoration: none;
  box-sizing: border-box;
  padding: 0.55rem 1.15rem;
}

.cal-tables-shell {
  background: #fff;
  border: 2px solid rgba(30, 58, 95, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-unified-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #f8fbfe 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(208, 232, 245, 0.7);
}

.cal-unified-toolbar-note {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}

.cal-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cal-toolbar-actions .btn {
  font-size: 0.8125rem;
  padding: 0.4rem 0.85rem;
  line-height: 1.25;
}

.cal-undo-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cal-unified-scroll {
  overflow: auto;
  max-height: min(72vh, 42rem);
  -webkit-overflow-scrolling: touch;
}

.cal-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}

/*
 * Fluid unified table: fills the scroll container and scales with window width.
 * Sticky left columns use fixed rem widths only (no %); data cols have no width
 * so leftover space goes to Monitor/Sensor/Δ/Tank — sticky never grows.
 */
.cal-data-table--unified {
  /* Just above min for # / checkbox / + & trash side-by-side */
  --cal-w-step: 1.25rem;
  --cal-w-include: 1.15rem;
  --cal-w-actions: 2.3rem;
  --cal-w-sticky: calc(var(--cal-w-step) + var(--cal-w-include) + var(--cal-w-actions));
  /* Monitor/Sensor: 6 digits ("000000") + padding/border + native spinner buttons */
  --cal-w-input-digits: 6ch;
  --cal-w-input-spinner: 1.35rem; /* up/down steppers (browser chrome) */
  --cal-w-input-pad: 0.55rem; /* horizontal padding + border */
  --cal-w-input: calc(
    var(--cal-w-input-digits) + var(--cal-w-input-spinner) + var(--cal-w-input-pad)
  );
  /* Angle header fields: 15% wider than Monitor / Sensor */
  --cal-w-angle: calc(var(--cal-w-input) * 1.15);
  /* Δ Gallons / Δ Sensor / Tank Volume — original-ish readable width */
  --cal-w-computed-min: 3rem;
  width: 100%;
  min-width: calc(
    var(--cal-w-sticky) + 6 * var(--cal-w-input) + 9 * var(--cal-w-computed-min)
  );
  table-layout: fixed;
}

/* Sticky left — locked; do not use % (that lets wide windows expand them) */
.cal-data-table--unified col.cal-col-w-step {
  width: var(--cal-w-step);
}

.cal-data-table--unified col.cal-col-w-include {
  width: var(--cal-w-include);
}

.cal-data-table--unified col.cal-col-w-actions {
  width: var(--cal-w-actions);
}

/* Monitor / Sensor — current size is the floor; grow when window widens */
.cal-data-table--unified col.cal-col-w-input {
  width: var(--cal-w-input);
  min-width: var(--cal-w-input);
  /* no max-width — share leftover space with computed cols */
}

/* Computed text cols — also grow from their min when window widens */
.cal-data-table--unified col.cal-col-w-computed {
  width: var(--cal-w-computed-min);
  min-width: var(--cal-w-computed-min);
}

.cal-data-table th,
.cal-data-table td {
  padding: 0.22rem 0.1rem;
  border-bottom: 1px solid rgba(208, 232, 245, 0.75);
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.cal-data-table thead th {
  position: sticky;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #e8f1f8;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}

/* Two-row sticky header */
.cal-data-table thead tr:first-child th {
  top: 0;
}

.cal-data-table thead tr:nth-child(2) th {
  top: 4.1rem;
  background: #eef6fb;
  z-index: 2;
  height: 3.25rem;
  line-height: 1.2;
  white-space: normal;
  vertical-align: middle;
  text-align: center;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.cal-data-table th.cal-group-head {
  text-align: center !important;
  color: var(--brand-navy) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.5rem 0.4rem 0.55rem;
  border-left: 1px solid rgba(30, 58, 95, 0.12);
  vertical-align: middle;
}

.cal-group-head-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.cal-group-head-title {
  display: block;
  line-height: 1.2;
}

.cal-group-angle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: inherit;
  opacity: 0.95;
  max-width: 100%;
}

.cal-group-angle-label {
  white-space: nowrap;
}

/* Column bands: Negative (red) / Level (green) / Positive (yellow) — full height */
.cal-group-head--0 {
  background: #f5b8c2 !important;
  color: #8b1528 !important;
}

.cal-group-head--1 {
  background: #a8d5ab !important;
  color: #1b5e20 !important;
}

.cal-group-head--2 {
  background: #ffe566 !important;
  color: #8a6d00 !important;
}

.cal-group-sub {
  border-left: 1px solid rgba(30, 58, 95, 0.08);
  color: var(--text-muted) !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  text-transform: none;
  min-width: 0;
  padding-left: 0.12rem !important;
  padding-right: 0.12rem !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-group-sub--0 {
  background: #f8c9d0 !important;
}

.cal-group-sub--1 {
  background: #bce3be !important;
}

.cal-group-sub--2 {
  background: #ffef8a !important;
}

.cal-group-cell {
  border-left: 1px solid rgba(30, 58, 95, 0.06);
}

/* Body: tinted columns with light zebra within each band */
.cal-data-table tbody tr.cal-row-even td.cal-group-cell--0 {
  background: #fdecef;
}

.cal-data-table tbody tr.cal-row-odd td.cal-group-cell--0 {
  background: #f8d4da;
}

.cal-data-table tbody tr.cal-row-even td.cal-group-cell--1 {
  background: #eef8ef;
}

.cal-data-table tbody tr.cal-row-odd td.cal-group-cell--1 {
  background: #d8edd9;
}

.cal-data-table tbody tr.cal-row-even td.cal-group-cell--2 {
  background: #fff9d6;
}

.cal-data-table tbody tr.cal-row-odd td.cal-group-cell--2 {
  background: #fff0a8;
}

.cal-data-table tbody tr:hover td.cal-group-cell--0 {
  background: #e89aa6;
}

.cal-data-table tbody tr:hover td.cal-group-cell--1 {
  background: #9fd4a3;
}

.cal-data-table tbody tr:hover td.cal-group-cell--2 {
  background: #ffd54a;
}

/* Shared step controls stay neutral grey zebra */
.cal-data-table tbody tr.cal-row-even td.cal-sticky-col {
  background: #ffffff;
}

.cal-data-table tbody tr.cal-row-odd td.cal-sticky-col {
  background: #eef0f3;
}

.cal-data-table tbody tr:hover td.cal-sticky-col {
  background: #cfd6de;
}

.cal-sticky-col {
  position: sticky;
  z-index: 1;
  box-shadow: 1px 0 0 rgba(30, 58, 95, 0.08);
}

.cal-data-table thead th.cal-sticky-col {
  z-index: 3;
  background: #e8f1f8;
}

.cal-data-table thead tr:nth-child(2) th.cal-sticky-col {
  background: #eef6fb;
}

/* Sticky left: # / On / actions — hard max = min usable width (never grows) */
.cal-data-table th.cal-sticky-col:nth-child(1),
.cal-data-table td.cal-sticky-col:nth-child(1) {
  left: 0;
  width: var(--cal-w-step);
  min-width: var(--cal-w-step);
  max-width: var(--cal-w-step);
  padding: 0.18rem 0.05rem;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.cal-data-table th.cal-sticky-col:nth-child(2),
.cal-data-table td.cal-sticky-col:nth-child(2) {
  left: var(--cal-w-step);
  width: var(--cal-w-include);
  min-width: var(--cal-w-include);
  max-width: var(--cal-w-include);
  padding: 0.18rem 0;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.cal-data-table th.cal-sticky-col:nth-child(3),
.cal-data-table td.cal-sticky-col:nth-child(3) {
  left: calc(var(--cal-w-step) + var(--cal-w-include));
  width: var(--cal-w-actions);
  min-width: var(--cal-w-actions);
  max-width: var(--cal-w-actions);
  padding: 0.12rem 0;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

/* Corner note spans sticky trio — same locked total */
.cal-data-table thead th.cal-corner-note {
  left: 0;
  width: var(--cal-w-sticky);
  min-width: var(--cal-w-sticky);
  max-width: var(--cal-w-sticky);
  padding: 0.25rem 0.12rem;
  vertical-align: middle;
  box-shadow: 1px 0 0 rgba(30, 58, 95, 0.08);
  background: #e8f1f8;
  box-sizing: border-box;
  overflow: hidden;
}

.cal-corner-note-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 0.5rem;
  font-weight: 500;
  line-height: 1.15;
  color: rgba(30, 58, 95, 0.78);
  letter-spacing: 0;
  white-space: normal;
  overflow: hidden;
}

.cal-corner-note-inner strong {
  font-weight: 700;
  color: var(--brand-navy);
}

.cal-corner-note-sep {
  display: block;
  font-size: 0.7rem;
  line-height: 1;
  color: rgba(30, 58, 95, 0.45);
  font-weight: 600;
}

.cal-data-table input[type="number"] {
  width: 100%;
  max-width: 100%;
  padding: 0.2rem 0.12rem;
  border: 1px solid rgba(30, 58, 95, 0.18);
  border-radius: 0.3rem;
  font: inherit;
  font-size: clamp(0.7rem, 0.7vw + 0.4rem, 0.8125rem);
  font-variant-numeric: tabular-nums;
  color: var(--brand-navy);
  background: #fff;
  text-align: center;
  box-sizing: border-box;
}

/*
 * Angle fields live in a colspan header; without an override they inherit
 * width:100% from the rule above and stretch across the whole tilt group.
 * Size = Monitor / Sensor + 15% (--cal-w-angle).
 */
.cal-data-table .cal-group-angle input[type="number"],
.cal-data-table input[data-cal-angle] {
  width: var(--cal-w-angle);
  min-width: var(--cal-w-angle);
  max-width: var(--cal-w-angle);
  flex: 0 0 var(--cal-w-angle);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(30, 58, 95, 0.22);
}

/* Row Monitor / Sensor: fill cell; cell grows with window above the min floor */
.cal-data-table tbody input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.cal-data-table tbody td.cal-group-cell:has(input[type="number"]) {
  min-width: var(--cal-w-input);
  padding-left: 0.08rem;
  padding-right: 0.08rem;
  box-sizing: border-box;
}

.cal-data-table td.cal-col-computed {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: var(--cal-w-computed-min);
  font-size: 0.7rem;
  text-align: center;
  padding-left: 0.15rem;
  padding-right: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sub-headers track the same min floors; columns may grow */
.cal-data-table thead tr:nth-child(2) th:nth-child(5n + 1),
.cal-data-table thead tr:nth-child(2) th:nth-child(5n + 2) {
  min-width: var(--cal-w-input);
}

.cal-data-table thead tr:nth-child(2) th:nth-child(5n + 3),
.cal-data-table thead tr:nth-child(2) th:nth-child(5n + 4),
.cal-data-table thead tr:nth-child(2) th:nth-child(5n + 5) {
  min-width: var(--cal-w-computed-min);
  padding-left: 0.12rem !important;
  padding-right: 0.12rem !important;
  font-size: 0.6rem !important;
}

.cal-col-step {
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.cal-col-include {
  text-align: center;
}

.cal-col-actions {
  text-align: center;
}

.cal-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
}

.cal-row-insert,
.cal-row-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  line-height: 1;
  cursor: pointer;
  padding: 0.08rem;
  border-radius: 0.25rem;
}

.cal-row-insert:hover {
  color: var(--brand-green);
  background: rgba(46, 125, 50, 0.1);
}

.cal-row-remove:hover {
  color: var(--brand-red);
  background: rgba(196, 30, 58, 0.08);
}

.cal-action-icon {
  width: 0.875rem;
  height: 0.875rem;
  min-width: 0.875rem;
  min-height: 0.875rem;
  display: block;
  flex-shrink: 0;
}

.cal-col-include input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

.cal-muted {
  color: var(--text-muted-light);
}

.cal-add-row,
.cal-undo-row {
  font-size: 0.8125rem;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

.cal-unified-hint {
  margin: 0;
  padding: 0.65rem 1rem 0.85rem;
  border-top: 1px solid rgba(208, 232, 245, 0.7);
}

@media (max-width: 720px) {
  .cal-unified-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Extra tightening when the window is mid-width or smaller */
@media (max-width: 1100px) {
  .cal-data-table {
    font-size: 0.78rem;
  }

  .cal-data-table th.cal-group-head {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.25rem 0.45rem;
  }

  .cal-group-sub {
    font-size: 0.55rem !important;
  }

  .cal-data-table thead tr:nth-child(2) th {
    height: 2.9rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
}

@media (max-width: 900px) {
  .cal-data-table--unified {
    min-width: 38rem;
  }

  .cal-data-table th,
  .cal-data-table td {
    padding: 0.18rem 0.06rem;
  }

  /* Keep sticky action cells full size; only compress data cells */
  .cal-data-table th.cal-sticky-col,
  .cal-data-table td.cal-sticky-col {
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }

  .cal-data-table th.cal-group-head {
    font-size: 0.78rem !important;
  }

  .cal-corner-note-inner {
    font-size: 0.58rem;
  }
}

.cal-results {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
  /* Allow grid children to shrink below content intrinsic width */
  min-width: 0;
}

@media (min-width: 1024px) {
  .cal-results {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: start;
  }
}

.cal-chart-card {
  background: #fff;
  border: 2px solid rgba(30, 58, 95, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1rem 0.85rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Hover readout + undo drag share the top of the chart card */
.cal-chart-topbar {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  min-height: 2.5rem;
}

.cal-chart-hover-bar {
  flex: 1;
  min-width: 0;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #f4f8fc 0%, #eaf2f8 100%);
  border: 1px solid rgba(30, 58, 95, 0.12);
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--brand-navy);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.cal-chart-hover-placeholder {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.cal-chart-hover-row {
  font-weight: 700;
  margin-right: 0.25rem;
}

.cal-chart-hover-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cal-chart-hover-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-chart-hover-item strong {
  font-weight: 700;
}

.cal-chart-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  /* Scale plot height down as the window narrows; cap at the original desktop size */
  height: clamp(12rem, 28vw + 6rem, 22rem);
}

.cal-chart-wrap canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
}

.cal-chart-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.cal-chart-fallback--error {
  color: var(--brand-red);
  background: rgba(196, 30, 58, 0.05);
  border-radius: 0.75rem;
}

.cal-chart-caption {
  margin: 0.75rem 0.25rem 0.25rem;
}

.cal-chart-caption-note {
  margin-top: 0.45rem;
}

.cal-undo-drag {
  align-self: stretch;
  font-size: 0.8125rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cal-undo-drag:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .cal-chart-topbar {
    flex-direction: column;
  }

  .cal-undo-drag {
    align-self: flex-end;
  }
}

.cal-assess-card {
  background: #fff;
  border: 2px solid rgba(30, 58, 95, 0.12);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.cal-assess-card--good {
  border-color: rgba(46, 125, 50, 0.35);
  background: linear-gradient(180deg, #f3faf3 0%, #ffffff 55%);
}

.cal-assess-card--warn {
  border-color: rgba(180, 120, 20, 0.4);
  background: linear-gradient(180deg, #fff8ec 0%, #ffffff 55%);
}

.cal-assess-card--bad {
  border-color: rgba(196, 30, 58, 0.35);
  background: linear-gradient(180deg, #fff5f6 0%, #ffffff 55%);
}

.cal-assess-card h2 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.cal-assess-top {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.cal-assess-summary {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.cal-grade {
  margin: 0;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--brand-navy);
  color: #fff;
  white-space: nowrap;
}

.cal-assess-card--good .cal-grade {
  background: var(--brand-green);
}

.cal-assess-card--warn .cal-grade {
  background: #b45309;
}

.cal-assess-card--bad .cal-grade {
  background: var(--brand-red);
}

.cal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.15rem 0 0;
}

.cal-metrics > div {
  background: rgba(232, 244, 252, 0.55);
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
}

.cal-metrics .cal-metric-wide {
  grid-column: 1 / -1;
}

.cal-metrics dt {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cal-metrics dd {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy);
  font-variant-numeric: tabular-nums;
}

.cal-metrics dd.cal-metric-text {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: normal;
}

.cal-quality-warn {
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(180, 120, 20, 0.45);
  background: #fff8ec;
  color: #7c4a03;
  font-size: 0.9rem;
  line-height: 1.45;
}

.cal-quality-warn strong {
  color: #92400e;
}

.cal-quality-warn--limit {
  border-color: rgba(196, 30, 58, 0.4);
  background: #fff5f6;
  color: #8b1530;
}

.cal-quality-warn--limit strong {
  color: #9f1239;
}

.cal-metrics .cal-metric-warn {
  border: 1px solid rgba(196, 30, 58, 0.35);
  background: #fff5f6;
}

.cal-metrics .cal-metric-warn dd {
  color: var(--brand-red);
}

.cal-outlier-list {
  margin-top: 1.15rem;
}

.cal-outlier-list h3 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}

.cal-outlier-list ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.35rem;
}

.cal-outlier-detail {
  display: block;
  font-size: 0.8125rem;
  margin-top: 0.15rem;
  color: var(--text-muted-light);
}

.cal-assess-note {
  margin: 1rem 0 0;
}