:root {
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-subtle: #f1f5f9;
  --surface: #ffffff;
  --navy: #0f172a;
  --text: #0f172a;
  --text-muted: #334155;
  --border: #cbd5e1;
  --border-subtle: #e2e8f0;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-tint: #eff6ff;
  --primary-tint-border: #bfdbfe;
  --primary-tint-text: #1e3a8a;
  --emerald: #047857;
  --emerald-tint: #ecfdf5;
  --emerald-tint-border: #a7f3d0;
  --emerald-tint-text: #065f46;
  --focus: #1d4ed8;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1180px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.22);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
}

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

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

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

:where(a:any-link, button, summary, .table-wrap, [tabindex="-1"]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-subtle);
  color: var(--navy);
  padding: 0.12em 0.38em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:hover {
  color: #ffffff;
  background: var(--primary-hover);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  min-block-size: 40px;
}

.brand:hover {
  color: var(--primary);
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.35rem 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-block-size: 36px;
  padding: 0.25rem 0.45rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  border-radius: 6px;
}

.nav-list a:hover {
  color: var(--primary);
  background: var(--primary-tint);
}

.nav-list a[aria-current="page"] {
  color: var(--primary-tint-text);
  background: var(--primary-tint);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 44px;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  line-height: 1.25;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--navy);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border-subtle);
  border-color: var(--primary);
  color: var(--navy);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-tint);
  color: var(--primary-tint-text);
  border-color: var(--primary-hover);
}

/* Badges / Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-emerald {
  background: var(--emerald-tint);
  color: var(--emerald-tint-text);
  border: 1px solid var(--emerald-tint-border);
}

.badge-primary {
  background: var(--primary-tint);
  color: var(--primary-tint-text);
  border: 1px solid var(--primary-tint-border);
}

.badge-solid {
  background: var(--primary);
  color: #ffffff;
}

/* Hero Section */
.hero {
  padding: 3.25rem 0 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  gap: 2.25rem;
  align-items: center;
}

.hero-copy .badge {
  margin-bottom: 0.9rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.lead {
  font-size: 1.07rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.trust-pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

.hero-visual {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-visual-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--navy);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sections */
.section {
  padding: 3.75rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 72ch;
  margin-bottom: 2rem;
}

.section h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.03rem;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin-bottom: 2.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.feature-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--navy);
}

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

/* Visual Gallery */
.gallery-heading {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: var(--navy);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
}

.gallery-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gallery-media {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.gallery-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.gallery-caption {
  padding: 1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.gallery-caption .badge {
  align-self: flex-start;
  font-size: 0.78rem;
  padding: 0.18rem 0.6rem;
}

.gallery-caption strong {
  color: var(--navy);
  font-size: 1rem;
}

.gallery-caption span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive Comparison Table */
.table-wrap {
  overflow-x: auto;
  max-inline-size: 100%;
  container-type: inline-size;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  --col-free: "ChargeLatch Free Core";
  --col-pro: "ChargeLatch Pro Add-on";
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  font-size: 0.95rem;
}

.compare-table thead th {
  background: var(--bg-subtle);
  color: var(--navy);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.compare-table tbody th {
  font-weight: 700;
  color: var(--navy);
  width: 34%;
}

.compare-table tbody td {
  color: var(--text-muted);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.cell-strong {
  color: var(--navy);
  font-weight: 700;
}

@container (width < 600px) {
  .compare-table,
  .compare-table thead,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody tr {
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem;
  }

  .compare-table tbody tr:last-child {
    border-bottom: none;
  }

  .compare-table tbody th,
  .compare-table tbody td {
    border-bottom: none;
    padding: 0.35rem 0;
  }

  .compare-table tbody th {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }

  .compare-table tbody td:nth-child(2)::before {
    content: var(--col-free) ": ";
    font-weight: 700;
    color: var(--emerald-tint-text);
  }

  .compare-table tbody td:nth-child(3)::before {
    content: var(--col-pro) ": ";
    font-weight: 700;
    color: var(--primary-tint-text);
  }
}

/* Pricing Section */
.billing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 2rem;
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-block-size: 40px;
  padding: 0.45rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}

.billing-btn:hover {
  background: var(--border-subtle);
}

.billing-btn.is-active {
  background: var(--primary);
  color: #ffffff;
}

.billing-btn.is-active:hover {
  background: var(--primary-hover);
}

.billing-save {
  display: inline-block;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background: var(--emerald-tint);
  color: var(--emerald-tint-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.billing-btn.is-active .billing-save {
  background: #ffffff;
  color: var(--primary-hover);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  box-shadow: var(--shadow-sm);
}

.price-card-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-md);
}

.plan-badge-row {
  min-block-size: 1.85rem;
  margin-bottom: 0.45rem;
}

.plan-tier {
  margin: 0;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
}

.plan-price {
  margin: 0.5rem 0 0.25rem;
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy);
}

.currency {
  font-size: 1.2rem;
  vertical-align: top;
}

.period {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-muted);
}

.plan-billing-note {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald);
}

.plan-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.price-card ul {
  margin: 0 0 1.4rem;
  padding-left: 1.15rem;
  flex: 1;
  font-size: 0.91rem;
  color: var(--text-muted);
}

.price-card li + li {
  margin-top: 0.4rem;
}

.pricing-footnote {
  margin: 1.65rem 0 0;
  padding: 0.95rem 1.2rem;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 860px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.05rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}

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

.faq-item summary::before {
  content: "";
  inline-size: 0.65rem;
  block-size: 0.65rem;
  flex-shrink: 0;
  border-right: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  transform: rotate(-45deg);
}

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

.faq-item summary:hover {
  background: var(--bg-alt);
}

.faq-answer {
  padding: 0 1.25rem 1.15rem 2.6rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 0.65rem;
}

.faq-item::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.faq-item:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item summary::before {
    transition: transform 0.18s ease;
  }

  .faq-item::details-content {
    transition: block-size 0.25s ease, content-visibility 0.25s ease allow-discrete;
  }
}

/* Support & Legal Pages */
.page-banner {
  padding: 2.5rem 0 2rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-subtle);
}

.page-banner p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  max-width: 68ch;
}

.legal-doc {
  padding: 2.75rem 0 3.5rem;
  max-width: 82ch;
}

.legal-doc h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.35rem;
  color: var(--navy);
}

.legal-doc h2:first-of-type {
  margin-top: 0.5rem;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-muted);
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.35rem;
}

.legal-doc li + li {
  margin-top: 0.4rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin: 1.5rem 0 2rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.info-card h2,
.info-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  color: var(--navy);
}

.info-card p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.checklist-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
}

.checklist-box h2 {
  margin-top: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0;
  background: var(--bg-alt);
}

.footer-disclaimer {
  margin: 0 0 1.4rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-disclaimer strong {
  color: var(--navy);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.footer-links a {
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Native Modal Dialog */
.modal-dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 540px;
  width: calc(100% - 2rem);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

dialog:modal {
  overscroll-behavior: contain;
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.65);
  overflow: hidden;
  overscroll-behavior: contain;
}

.modal-card {
  padding: 1.5rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--navy);
}

.modal-close {
  background: var(--surface);
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-inline-size: 40px;
  min-block-size: 40px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--bg-subtle);
}

.modal-body {
  margin: 1rem 0 1.25rem;
  color: var(--text-muted);
}

.modal-body p {
  margin: 0 0 0.85rem;
}

.modal-body p:last-child {
  margin-bottom: 0;
}

.modal-plan-pill {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--primary-tint);
  color: var(--primary-tint-text);
  font-weight: 700;
  font-size: 0.92rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 1060px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-list {
    gap: 0.15rem 0.45rem;
  }

  .nav-list a {
    font-size: 0.88rem;
    padding: 0.25rem 0.32rem;
  }

  .feature-grid,
  .info-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.25rem 0 2.5rem;
  }

  .section {
    padding: 2.75rem 0;
  }

  .faq-answer {
    padding: 0 1.1rem 1rem 1.25rem;
  }
}
