/* Vasker theme — accessible, calm, modern. Tuned for older volunteer treasurers. */

@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Outfit:wght@600;700&display=swap");

:root {
  /* Brand & surfaces — soft sea-mist, not cream paper */
  --vs-ink: #14231f;
  --vs-ink-muted: #3a4a45;
  --vs-accent: #0b6b56;
  --vs-accent-hover: #085544;
  --vs-accent-soft: #d9efe8;
  --vs-highlight: #c8f0a8;
  --vs-paper: #eef5f2;
  --vs-surface: #ffffff;
  --vs-surface-tint: #f4faf7;
  --vs-border: #b7c9c2;
  --vs-border-strong: #6f857d;
  --vs-danger: #9b1c1c;
  --vs-danger-bg: #fde8e8;
  --vs-focus: #0b6b56;
  --vs-nav-bg: rgba(238, 245, 242, 0.94);
  --vs-footer-bg: #e2ebe7;
  --vs-shadow: 0 1px 0 rgba(20, 35, 31, 0.06);

  --vs-display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --vs-body: "Atkinson Hyperlegible", "Segoe UI", "Helvetica Neue", sans-serif;

  --vs-text-base: 1.125rem; /* 18px */
  --vs-text-lg: 1.25rem;
  --vs-line: 1.6;
  --vs-radius: 0.5rem;
  --vs-control-h: 3rem; /* 48px tap target */
  --vs-space: 1.25rem;
}

/* --- Base ----------------------------------------------------------- */

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--vs-body);
  font-size: var(--vs-text-base);
  line-height: var(--vs-line);
  color: var(--vs-ink);
  background-color: var(--vs-paper);
  background-image:
    radial-gradient(ellipse 90% 55% at 0% -5%, #c5e4d8 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 0%, #d7e8f2 0%, transparent 52%),
    linear-gradient(180deg, #eef5f2 0%, #e7f0ec 40%, #eef5f2 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

main {
  min-height: 50vh;
}

h1, h2, h3, .display-brand, .navbar-brand {
  font-family: var(--vs-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vs-ink);
  line-height: 1.25;
}

h1 { font-size: clamp(1.85rem, 3.5vw, 2.5rem); }
h2, .h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
.h5 { font-size: 1.2rem; font-family: var(--vs-display); font-weight: 600; }

p, li, td, th, label, .form-text {
  max-width: 70ch;
}

.text-secondary,
.form-text,
.navbar-text {
  color: var(--vs-ink-muted) !important;
}

a {
  color: var(--vs-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

/* Skip link — keyboard / screen-reader first stop */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 1080;
  padding: 0.75rem 1.1rem;
  background: var(--vs-ink);
  color: #fff;
  border-radius: var(--vs-radius);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
  outline: 3px solid var(--vs-highlight);
  outline-offset: 2px;
}

/* --- Focus (high visibility) --------------------------------------- */

:focus-visible {
  outline: 3px solid var(--vs-focus);
  outline-offset: 3px;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(11, 107, 86, 0.3);
  border-color: var(--vs-accent);
  outline: 3px solid var(--vs-focus);
  outline-offset: 2px;
}

/* --- Navigation ----------------------------------------------------- */

.vs-nav {
  position: relative;
  z-index: 1030; /* above hero; keeps collapse + dropdown menus on top */
  background: var(--vs-nav-bg);
  border-bottom: 1px solid var(--vs-border) !important;
  backdrop-filter: blur(8px);
}

.vs-nav .dropdown-menu,
.vs-nav .navbar-collapse {
  z-index: 1031;
}

.navbar-brand {
  font-size: 1.55rem;
  color: var(--vs-ink) !important;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.nav-link {
  color: var(--vs-ink) !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.7rem 0.9rem !important;
  border-radius: var(--vs-radius);
}

.nav-link:hover,
.nav-link:focus {
  background: var(--vs-accent-soft);
  color: var(--vs-accent-hover) !important;
}

.nav-link:focus-visible,
.dropdown-item:focus-visible,
.navbar-toggler:focus-visible,
button.nav-link.vs-nav-install:focus-visible {
  outline: 3px solid var(--vs-focus);
  outline-offset: 2px;
}

/* Account block: same rhythm as primary links */
.vs-nav-form {
  margin: 0;
  display: block;
}

button.nav-link.vs-nav-install,
.vs-nav-form button.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  min-height: auto;
  box-shadow: none;
  font-family: var(--vs-body);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: inherit;
  color: var(--vs-ink) !important;
  padding: 0.7rem 0.9rem !important;
  border-radius: var(--vs-radius);
  appearance: none;
  -webkit-appearance: none;
}

button.nav-link.vs-nav-install:hover,
button.nav-link.vs-nav-install:focus,
.vs-nav-form button.nav-link:hover,
.vs-nav-form button.nav-link:focus {
  background: var(--vs-accent-soft);
  color: var(--vs-accent-hover) !important;
}

.vs-org-label {
  display: block;
  color: var(--vs-ink) !important;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: default;
}

.vs-org-label:hover,
.vs-org-label:focus {
  background: transparent !important;
  color: var(--vs-ink) !important;
}

@media (max-width: 991.98px) {
  .vs-nav-account {
    width: 100%;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--vs-border);
  }

  .vs-nav-account .nav-item {
    width: 100%;
  }

  .vs-nav-account .nav-link {
    width: 100%;
  }

  /* Keep club name readable but clearly not a link */
  .vs-nav-account .vs-org-label {
    color: var(--vs-ink-muted) !important;
  }

  /* WCAG 2.5.5 / 2.5.8: ≥44px tap target via padding, not min-height
     (min-height inflates each row into a double-spaced list). */
  .vs-nav .nav-link,
  .vs-nav .dropdown-item,
  button.nav-link.vs-nav-install {
    display: flex;
    align-items: center;
    line-height: 1.25;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

@media (min-width: 992px) {
  .vs-nav .navbar-nav {
    flex-wrap: wrap;
    row-gap: 0;
    align-items: center;
  }

  /* Same idea as the footer: keep a padded hit area, but do not let
     wrapped header rows look double-spaced. */
  .vs-nav .nav-link,
  button.nav-link.vs-nav-install {
    line-height: 1.25;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
    margin-top: -0.4rem;
    margin-bottom: -0.4rem;
  }

  .vs-nav-account {
    margin-left: 0.5rem;
  }

  .vs-nav-account .vs-org-label {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vs-nav-install {
    width: auto;
    border: 2px solid var(--vs-border-strong);
    background: var(--vs-surface);
    margin-right: 0.35rem;
  }

  .vs-nav-form .nav-link {
    width: auto;
  }
}

.navbar-toggler {
  border: 2px solid var(--vs-border-strong);
  padding: 0.55rem 0.7rem;
  min-height: 44px;
  min-width: 44px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(11, 107, 86, 0.3);
}

.dropdown-menu {
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  box-shadow: var(--vs-shadow);
  padding: 0.4rem;
  font-size: 1.05rem;
}

.dropdown-item {
  border-radius: 0.35rem;
  padding: 0.65rem 0.9rem;
  font-weight: 700;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--vs-accent-soft);
  color: var(--vs-accent-hover);
}

/* --- Buttons -------------------------------------------------------- */

a.btn,
button.btn,
.btn {
  font-family: var(--vs-body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  min-height: var(--vs-control-h);
  padding: 0 1.25rem;
  border-radius: var(--vs-radius);
  border-width: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  box-sizing: border-box;
}

.btn::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.btn-lg {
  min-height: 3.35rem;
  font-size: 1.15rem;
  padding: 0 1.5rem;
}

/* Chromium/WebKit stretch the anonymous flex item inside <button>, so
   align-items alone leaves the label high. Match line-height to the
   inner control so the glyph sits in the middle of the tap target. */
button.btn {
  line-height: calc(var(--vs-control-h) - 4px);
}

button.btn.btn-lg {
  line-height: calc(3.35rem - 4px);
}

button.btn.btn-sm {
  line-height: calc(2.5rem - 4px);
}

button.btn.btn-link {
  line-height: 1.2;
}

.btn-sm {
  min-height: 2.5rem;
  font-size: 1rem;
  padding: 0 0.9rem;
}

.btn-vasker {
  background: var(--vs-accent);
  border-color: var(--vs-accent);
  color: #fff;
}

.btn-vasker:hover,
.btn-vasker:focus {
  background: var(--vs-accent-hover);
  border-color: var(--vs-accent-hover);
  color: #fff;
}

.btn-outline-secondary {
  color: var(--vs-ink);
  border-color: var(--vs-border-strong);
  background: var(--vs-surface);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: var(--vs-surface-tint);
  border-color: var(--vs-ink);
  color: var(--vs-ink);
}

.btn-link {
  min-height: auto;
  padding: 0.35rem 0.5rem;
}

.btn-link.nav-link {
  min-height: auto;
  border-width: 0;
}

/* --- Forms ---------------------------------------------------------- */

.form-label {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--vs-ink);
}

.form-control,
.form-select {
  font-size: 1.1rem;
  min-height: var(--vs-control-h);
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--vs-border-strong);
  border-radius: var(--vs-radius);
  background: var(--vs-surface);
  color: var(--vs-ink);
}

.form-control::placeholder {
  color: #667a74;
  opacity: 1;
}

.form-check-input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.2rem;
  border: 2px solid var(--vs-border-strong);
}

.form-check-label {
  font-size: 1.05rem;
  padding-left: 0.25rem;
}

.form-text {
  font-size: 1rem;
  color: var(--vs-ink-muted) !important;
}

/* --- Tables (cash book) --------------------------------------------- */

.table {
  font-size: 1.05rem;
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  overflow: hidden;
  --bs-table-bg: var(--vs-surface);
  --bs-table-striped-bg: var(--vs-surface-tint);
  --bs-table-hover-bg: var(--vs-accent-soft);
  --bs-table-color: var(--vs-ink);
}

.table > :not(caption) > * > * {
  padding: 0.85rem 0.9rem;
  border-bottom-color: var(--vs-border);
  vertical-align: middle;
}

.table thead th {
  font-family: var(--vs-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--vs-surface-tint);
  border-bottom: 2px solid var(--vs-border-strong);
  color: var(--vs-ink);
}

.table-hover tbody tr:hover {
  background: var(--vs-accent-soft);
}

/* Keep compact Bootstrap variants readable for older eyes */
.table-sm > :not(caption) > * > * {
  padding: 0.7rem 0.85rem;
}

.form-control-sm,
.form-select-sm {
  min-height: 2.65rem;
  font-size: 1.05rem;
  padding: 0.5rem 0.8rem;
}

.badge {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.45em 0.7em;
  border-radius: 0.35rem;
}

.text-danger {
  color: var(--vs-danger) !important;
  font-weight: 700;
}

/* --- Surfaces / alerts ---------------------------------------------- */

.alert {
  font-size: 1.05rem;
  border-radius: var(--vs-radius);
  border-width: 2px;
  padding: 1rem 1.15rem;
}

.alert-info,
.alert-success {
  background: var(--vs-accent-soft);
  border-color: var(--vs-accent);
  color: var(--vs-ink);
}

.alert-warning {
  background: #fff4d6;
  border-color: #a15c00;
  color: #3d2400;
}

.alert-danger,
.alert-error {
  background: var(--vs-danger-bg);
  border-color: var(--vs-danger);
  color: #5c0f0f;
}

.list-group-item {
  font-size: 1.05rem;
  padding: 0.9rem 1.1rem;
  border-color: var(--vs-border);
}

/* --- Marketing hero ------------------------------------------------- */

.hero-marketing {
  position: relative;
  min-height: min(88vh, 44rem);
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(238, 245, 242, 0.92) 0%, rgba(238, 245, 242, 0.55) 42%, rgba(238, 245, 242, 0.15) 68%),
    radial-gradient(ellipse 50% 70% at 78% 42%, #9fd4c2 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 92% 18%, #b8d4e8 0%, transparent 60%),
    linear-gradient(160deg, #d5ebe3 0%, #e8f2ef 45%, #dce9f2 100%);
}

.hero-visual::after {
  content: "";
  position: absolute;
  right: max(-2rem, 2vw);
  top: 12%;
  bottom: 10%;
  width: min(48vw, 28rem);
  border-radius: 1.25rem 0 0 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 2.1rem,
      rgba(11, 107, 86, 0.08) 2.1rem,
      rgba(11, 107, 86, 0.08) 2.2rem
    );
  border: 1px solid rgba(11, 107, 86, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: rotate(-1.5deg);
  animation: vs-ledger-drift 14s ease-in-out infinite alternate;
}

.hero-marketing .container {
  position: relative;
  z-index: 1;
}

.hero-marketing .brand-mark {
  display: inline-block;
  font-family: var(--vs-display);
  font-size: clamp(2.75rem, 7vw, 4.25rem);
  font-weight: 700;
  color: var(--vs-accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
  animation: vs-fade-up 0.7s ease-out both;
}

.hero-marketing h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  max-width: 22ch;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--vs-ink);
  animation: vs-fade-up 0.75s ease-out 0.08s both;
}

.hero-marketing .lead {
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 36rem;
  color: var(--vs-ink-muted);
  animation: vs-fade-up 0.75s ease-out 0.16s both;
}

.hero-marketing .hero-actions {
  animation: vs-fade-up 0.75s ease-out 0.24s both;
}

/* --- Home page sections --------------------------------------------- */

.home-section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--vs-border);
}

.home-section-inner {
  max-width: 48rem;
}

.home-section h2 {
  margin-bottom: 0.75rem;
}

.home-section-lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--vs-ink-muted);
  max-width: 40rem;
  margin-bottom: 0;
}

.home-after-gap .home-section-lead {
  margin-bottom: 1.5rem;
}

.home-after-gap-inline {
  font-size: 1.05rem;
}

.home-why {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(217, 239, 232, 0.35) 100%);
}

.home-why .home-section-lead {
  margin-top: 0.85rem;
}

.home-features {
  background: rgba(255, 255, 255, 0.4);
}

.home-features .home-section-lead {
  margin-bottom: 2rem;
}

.home-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.75rem;
}

.home-feature-list h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--vs-accent);
}

.home-feature-list p {
  margin-bottom: 0;
  color: var(--vs-ink-muted);
  max-width: 42rem;
}

.home-plans {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(184, 212, 232, 0.35) 0%, transparent 55%),
    rgba(255, 255, 255, 0.45);
}

.home-plans .home-section-lead {
  margin-bottom: 2rem;
}

.home-plan-grid {
  display: grid;
  gap: 1.75rem 2.5rem;
}

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

.home-plan h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.home-plan .price {
  font-family: var(--vs-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vs-accent);
  margin-bottom: 0.35rem;
  line-height: 1.2;
}

.home-plan p:last-child {
  margin-bottom: 0;
  color: var(--vs-ink-muted);
}

.home-plans-more {
  margin: 1.75rem 0 0;
}

#pricing {
  scroll-margin-top: 1.25rem;
}

.home-join {
  background:
    linear-gradient(165deg, rgba(217, 239, 232, 0.55) 0%, rgba(238, 245, 242, 0.9) 55%, rgba(231, 240, 236, 0.95) 100%);
  border-bottom: 1px solid var(--vs-border);
}

.home-join .home-section-lead {
  margin-bottom: 1.5rem;
}

.home-join-steps {
  font-size: 1.15rem;
  padding-left: 1.35rem;
  margin: 0 0 2rem;
  max-width: 40rem;
}

.home-join-steps li {
  margin-bottom: 0.75rem;
  padding-left: 0.35rem;
}

.home-join-steps li::marker {
  font-family: var(--vs-display);
  font-weight: 700;
  color: var(--vs-accent);
}

.home-join-actions {
  animation: vs-fade-up 0.75s ease-out 0.12s both;
}

.page-home .home-why,
.page-home .home-features,
.page-home .home-plans,
.page-home .home-join {
  animation: vs-fade-up 0.8s ease-out both;
}

.page-home .home-features { animation-delay: 0.04s; }
.page-home .home-plans { animation-delay: 0.08s; }
.page-home .home-join { animation-delay: 0.12s; }

/* Legacy pricing block (kept for any older markup) */
.pricing-section {
  padding: 3rem 0 4rem;
  border-top: 2px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.35);
}

.pricing-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}

.pricing-section .price {
  font-family: var(--vs-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vs-accent);
}

.brand-kicker {
  font-family: var(--vs-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vs-accent);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.auth-shell {
  max-width: 28rem;
}

/* Tighten login/signup field rhythm. Do not shrink inputs below 44px
   and do not retarget .form-check (consent ticks). */
.auth-shell h1.mb-4 {
  margin-bottom: 1rem !important;
}

.auth-shell form > .mb-4:not(.form-check) {
  margin-bottom: 0.85rem !important;
}

.auth-shell .cf-turnstile.mb-4 {
  margin-bottom: 0.85rem !important;
}

.auth-shell form > .mb-4:not(.form-check) .form-label {
  margin-bottom: 0.25rem;
}

.auth-shell > p.mt-3,
.auth-shell > p.mt-4 {
  margin-top: 0.55rem !important;
}

/* Login/signup auxiliary links (Forgot password, Sign in). Padding grows
   the hit area; negative margin keeps the paragraph from looking 44px tall.
   Do not target .form-check-label a (consent ticks). */
.auth-shell > p a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1.2;
  padding: 0.7rem 0.45rem;
  margin: -0.45rem -0.1rem;
  border-radius: var(--vs-radius);
  box-sizing: border-box;
}

.result-panel {
  background: var(--vs-surface);
  border: 2px solid var(--vs-accent);
  border-radius: var(--vs-radius);
  padding: 1.5rem 1.65rem;
  box-shadow: var(--vs-shadow);
}

.gap-figure {
  font-family: var(--vs-display);
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--vs-accent);
  line-height: 1.1;
}

/* App surfaces */
.page-intro {
  margin-bottom: 1.5rem;
}

.page-intro p {
  font-size: 1.1rem;
  color: var(--vs-ink-muted);
}

.balance-chip {
  display: inline-block;
  min-width: 9rem;
  padding: 0.85rem 1.1rem;
  background: var(--vs-surface);
  border: 2px solid var(--vs-border);
  border-radius: var(--vs-radius);
}

.balance-chip .label {
  font-size: 1rem;
  color: var(--vs-ink-muted);
  margin-bottom: 0.15rem;
}

.balance-chip .value {
  font-family: var(--vs-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vs-ink);
}

.shortcut-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shortcut-list li {
  margin-bottom: 0.55rem;
}

.shortcut-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.shortcut-list a:hover,
.shortcut-list a:focus {
  border-bottom-color: var(--vs-accent);
}

.welcome-steps {
  font-size: 1.15rem;
  padding-left: 1.35rem;
  margin-bottom: 1.75rem;
}

.welcome-steps li {
  margin-bottom: 0.85rem;
}

.toolbar-links {
  font-size: 1.05rem;
  font-weight: 700;
}

.toolbar-links a {
  text-decoration: none;
}

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

/* Soft transitions on interactive controls */
.btn,
.nav-link,
.form-control,
.form-select {
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

@keyframes vs-fade-up {
  from {
    opacity: 0;
    transform: translateY(0.7rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes vs-ledger-drift {
  from { transform: rotate(-1.5deg) translateY(0); }
  to { transform: rotate(-0.5deg) translateY(0.6rem); }
}

/* Footer */
.vs-footer {
  background: var(--vs-footer-bg);
  border-top: 1px solid var(--vs-border) !important;
  margin-top: 3.5rem;
}

.vs-footer p {
  font-size: 1.05rem;
  color: var(--vs-ink-muted);
  max-width: none;
}

.vs-footer__meta {
  font-size: 0.98rem;
}

.vs-footer__nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.15rem;
  row-gap: 0;
  align-items: center;
}

.vs-footer__nav a,
.vs-footer__install {
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
  /* ≥44px tap target from padding; negative margin keeps wrapping rows tight. */
  padding: 0.75rem 0.6rem;
  margin: -0.55rem -0.2rem;
  border-radius: var(--vs-radius);
  box-sizing: border-box;
}

.vs-footer__nav a:hover,
.vs-footer__nav a:focus,
.vs-footer__install:hover,
.vs-footer__install:focus {
  text-decoration: underline;
  background: var(--vs-accent-soft);
  color: var(--vs-accent-hover);
}

.vs-footer__nav a:focus-visible,
.vs-footer__install:focus-visible {
  outline: 3px solid var(--vs-focus);
  outline-offset: 2px;
}

.vs-footer__install {
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

.vs-footer__policies {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--vs-border);
}

.vs-footer__policies-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--vs-ink-muted);
  margin: 0 0 0.65rem;
}

.guides-policies__list li {
  margin-bottom: 0.4rem;
}

.guides-policies__list a {
  font-weight: 700;
  text-decoration: none;
}

.guides-policies__list a:hover,
.guides-policies__list a:focus {
  text-decoration: underline;
}

/* Alpine cloak — avoid flash of unstyled progressive calculator panel */
[x-cloak] {
  display: none !important;
}

.home-gap-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0 1.75rem;
}

.home-gap-stat__figure {
  font-family: var(--vs-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--vs-accent);
  letter-spacing: -0.03em;
  line-height: 1;
}

.home-gap-stat__label {
  flex: 1 1 14rem;
  color: var(--vs-ink-muted);
  max-width: 36ch;
}

.trust-page__inner,
.guide-article__inner {
  max-width: 42rem;
}

.trust-page h2,
.guide-article__body h2 {
  margin-top: 2rem;
}

.guide-list__item {
  padding: 1.35rem 0;
  border-top: 1px solid var(--vs-border);
}

.guide-list__item:last-child {
  border-bottom: 1px solid var(--vs-border);
}

.guide-article__body p,
.guide-article__body li {
  max-width: 70ch;
}

.guide-tldr {
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.25rem 1.2rem;
  background: var(--vs-surface-tint);
  border: 1px solid var(--vs-border);
  border-left: 4px solid var(--vs-accent);
  border-radius: var(--vs-radius);
}

.guide-tldr h2 {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
}

.guide-tldr ol {
  margin: 0;
  padding-left: 1.35rem;
}

.guide-tldr li + li {
  margin-top: 0.4rem;
}

.guides-index .guide-tldr {
  margin-bottom: 2rem;
}

.guide-cta {
  padding: 1.25rem 1.35rem;
  background: linear-gradient(165deg, #f7fcfa 0%, var(--vs-surface) 55%, #f0f7f4 100%);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
}

.result-panel--live {
  border-style: dashed;
}

/* --- PWA install suggestion (true modal) ---------------------------- */

body.vs-pwa-modal-open {
  overflow: hidden;
}

.vs-pwa-prompt[hidden] {
  display: none !important;
}

.vs-pwa-prompt {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.vs-pwa-prompt.vs-pwa-prompt--visible {
  opacity: 1;
  pointer-events: auto;
}

.vs-pwa-prompt__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 35, 31, 0.5);
}

.vs-pwa-prompt__panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  padding: 1.35rem 1.35rem 1.25rem;
  background:
    linear-gradient(165deg, #f7fcfa 0%, var(--vs-surface) 45%, #f0f7f4 100%);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  box-shadow: 0 0.75rem 2.5rem rgba(20, 35, 31, 0.22);
}

.vs-pwa-prompt__title {
  font-family: var(--vs-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--vs-ink);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.vs-pwa-prompt__body {
  margin: 0;
  color: var(--vs-ink-muted);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: none;
}

.vs-pwa-prompt__hint {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  background: var(--vs-accent-soft);
  border-radius: 0.4rem;
  color: var(--vs-accent-hover);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  max-width: none;
}

.vs-pwa-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.15rem;
}

.vs-pwa-prompt__actions .btn {
  min-height: var(--vs-control-h);
  padding-left: 1.15rem;
  padding-right: 1.15rem;
  font-weight: 700;
}

.vs-pwa-prompt__dismiss {
  border-width: 2px;
  border-color: var(--vs-border-strong);
  color: var(--vs-ink);
  background: var(--vs-surface);
}

.vs-pwa-prompt__dismiss:hover,
.vs-pwa-prompt__dismiss:focus {
  border-color: var(--vs-accent);
  color: var(--vs-accent-hover);
  background: var(--vs-accent-soft);
}

@media (max-width: 575.98px) {
  .vs-pwa-prompt__actions {
    width: 100%;
  }

  .vs-pwa-prompt__actions .btn {
    flex: 1 1 auto;
  }
}

/* Reduce motion for vestibular comfort */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-visual::after {
    animation: none;
  }

  .vs-pwa-prompt {
    transition: none;
  }
}

/* Slightly larger type on wide screens — easier evening reading */
@media (min-width: 992px) {
  body { font-size: 1.15rem; }
}

@media (max-width: 767.98px) {
  .hero-visual::after {
    opacity: 0.35;
    width: 70%;
    right: -20%;
  }

  .hero-marketing {
    min-height: auto;
  }
}
