/* 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");

/* Keep anchors and focused fields clear of the shared cookie banner. */
html {
  scroll-padding-bottom: calc(var(--ttt-cookie-banner-height, 0px) + 1rem);
}

/* tokens:start (generated by tools/design_tokens/build.py from design/tokens.json; edit the JSON, not this block) */
:root {
  --vs-ink: #14231f;
  --vs-ink-muted: #3a4a45;
  --vs-accent: #0b6b56;
  --vs-accent-hover: #085544;
  --vs-accent-soft: #d9efe8;
  --vs-on-accent: #ffffff;
  --vs-highlight: #c8f0a8;
  --vs-paper: #eef5f2;
  --vs-paper-deep: #e7f0ec;
  --vs-wash-a: #c5e4d8;
  --vs-wash-b: #d7e8f2;
  --vs-surface: #ffffff;
  --vs-surface-tint: #f4faf7;
  --vs-border: #b7c9c2;
  --vs-border-strong: #6f857d;
  --vs-danger: #9b1c1c;
  --vs-danger-bg: #fde8e8;
  --vs-danger-ink: #5c0f0f;
  --vs-warning-bg: #fff4d6;
  --vs-warning-border: #a15c00;
  --vs-warning-ink: #3d2400;
  --vs-focus: #0b6b56;
  --vs-placeholder: #667a74;
  --vs-glass: #ffffff;
  --vs-hero-glow-a: #9fd4c2;
  --vs-hero-glow-b: #b8d4e8;
  --vs-hero-base-a: #d5ebe3;
  --vs-hero-base-b: #e8f2ef;
  --vs-hero-base-c: #dce9f2;
  --vs-nav-bg: rgba(238, 245, 242, 0.94);
  --vs-shadow: 0 1px 0 rgba(20, 35, 31, 0.06);
  --vs-backdrop: rgba(20, 35, 31, 0.5);
  --vs-focus-ring: rgba(11, 107, 86, 0.3);
  color-scheme: light;

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

  --vs-text-sm: 0.9375rem; /* 15px */
  --vs-text-base: 1.125rem; /* 18px */
  --vs-text-lg: 1.25rem; /* 20px */
  --vs-line: 1.6;
  --vs-radius-sm: 0.35rem; /* 5.6px */
  --vs-radius: 0.5rem; /* 8px */
  --vs-radius-lg: 1rem; /* 16px */
  --vs-space-xs: 0.25rem; /* 4px */
  --vs-space-sm: 0.5rem; /* 8px */
  --vs-space-md: 0.75rem; /* 12px */
  --vs-space-lg: 1rem; /* 16px */
  --vs-space: 1.25rem; /* 20px */
  --vs-space-xxl: 2rem; /* 32px */
  --vs-control-h: 3rem; /* 48px */
}

/* Dark: follows the system unless the person chose Light; data-theme="dark" forces it.
   Screen only, so printing a page always uses the light colours. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --vs-ink: #e6f0ec;
    --vs-ink-muted: #b4c6bf;
    --vs-accent: #5ccaa7;
    --vs-accent-hover: #8fdfc4;
    --vs-accent-soft: #1c3d34;
    --vs-on-accent: #04201a;
    --vs-highlight: #c8f0a8;
    --vs-paper: #0e1916;
    --vs-paper-deep: #0b1512;
    --vs-wash-a: #123027;
    --vs-wash-b: #14232e;
    --vs-surface: #15231f;
    --vs-surface-tint: #1b2c27;
    --vs-border: #364d45;
    --vs-border-strong: #809a91;
    --vs-danger: #ffa3a3;
    --vs-danger-bg: #3a1818;
    --vs-danger-ink: #ffd6d6;
    --vs-warning-bg: #36290b;
    --vs-warning-border: #e0a64a;
    --vs-warning-ink: #fbe4b6;
    --vs-focus: #8fe3c6;
    --vs-placeholder: #98ada6;
    --vs-glass: #1b2c27;
    --vs-hero-glow-a: #174a3d;
    --vs-hero-glow-b: #1a3242;
    --vs-hero-base-a: #10231e;
    --vs-hero-base-b: #0e1916;
    --vs-hero-base-c: #111d25;
    --vs-nav-bg: rgba(14, 25, 22, 0.94);
    --vs-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
    --vs-backdrop: rgba(0, 0, 0, 0.65);
    --vs-focus-ring: rgba(143, 227, 198, 0.35);
    color-scheme: dark;
  }
}

@media screen {
  :root[data-theme="dark"] {
    --vs-ink: #e6f0ec;
    --vs-ink-muted: #b4c6bf;
    --vs-accent: #5ccaa7;
    --vs-accent-hover: #8fdfc4;
    --vs-accent-soft: #1c3d34;
    --vs-on-accent: #04201a;
    --vs-highlight: #c8f0a8;
    --vs-paper: #0e1916;
    --vs-paper-deep: #0b1512;
    --vs-wash-a: #123027;
    --vs-wash-b: #14232e;
    --vs-surface: #15231f;
    --vs-surface-tint: #1b2c27;
    --vs-border: #364d45;
    --vs-border-strong: #809a91;
    --vs-danger: #ffa3a3;
    --vs-danger-bg: #3a1818;
    --vs-danger-ink: #ffd6d6;
    --vs-warning-bg: #36290b;
    --vs-warning-border: #e0a64a;
    --vs-warning-ink: #fbe4b6;
    --vs-focus: #8fe3c6;
    --vs-placeholder: #98ada6;
    --vs-glass: #1b2c27;
    --vs-hero-glow-a: #174a3d;
    --vs-hero-glow-b: #1a3242;
    --vs-hero-base-a: #10231e;
    --vs-hero-base-b: #0e1916;
    --vs-hero-base-c: #111d25;
    --vs-nav-bg: rgba(14, 25, 22, 0.94);
    --vs-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
    --vs-backdrop: rgba(0, 0, 0, 0.65);
    --vs-focus-ring: rgba(143, 227, 198, 0.35);
    color-scheme: dark;
  }
}
/* tokens:end */

/* Bootstrap 5.3 reads its own variables; point them at ours so its components
   (tables, cards, list groups, modals, badges, dropdowns) follow light and dark.
   :root[data-bs-theme] outranks Bootstrap's [data-bs-theme=dark] block. */
:root,
:root[data-bs-theme] {
  --bs-body-color: var(--vs-ink);
  --bs-body-bg: var(--vs-paper);
  --bs-emphasis-color: var(--vs-ink);
  --bs-secondary-color: var(--vs-ink-muted);
  --bs-tertiary-bg: var(--vs-surface-tint);
  --bs-secondary-bg: var(--vs-surface-tint);
  --bs-border-color: var(--vs-border);
  --bs-link-color: var(--vs-accent);
  --bs-link-hover-color: var(--vs-accent-hover);
  --bs-heading-color: var(--vs-ink);
  --bs-focus-ring-color: var(--vs-focus-ring);
  --bs-danger-text-emphasis: var(--vs-danger-ink);
  --bs-danger-bg-subtle: var(--vs-danger-bg);
  --bs-danger-border-subtle: var(--vs-danger);
  --bs-success-text-emphasis: var(--vs-ink);
  --bs-success-bg-subtle: var(--vs-accent-soft);
  --bs-success-border-subtle: var(--vs-accent);
  --bs-warning-text-emphasis: var(--vs-warning-ink);
  --bs-warning-bg-subtle: var(--vs-warning-bg);
  --bs-warning-border-subtle: var(--vs-warning-border);
}

.card,
.modal-content,
.list-group-item,
.dropdown-menu,
.offcanvas {
  --bs-card-bg: var(--vs-surface);
  --bs-modal-bg: var(--vs-surface);
  --bs-list-group-bg: var(--vs-surface);
  --bs-list-group-color: var(--vs-ink);
  --bs-dropdown-bg: var(--vs-surface);
  --bs-dropdown-link-color: var(--vs-ink);
  --bs-offcanvas-bg: var(--vs-surface);
  color: var(--vs-ink);
}

/* Contain the visually hidden "money out" spans inside a scrolling table, so they
   don't widen the page's own scroll area on a phone. */
.table-responsive {
  position: relative;
}

/* Bootstrap's light chip is fixed near-white; keep it a quiet chip in both themes. */
.badge.text-bg-light {
  background-color: var(--vs-surface-tint) !important;
  color: var(--vs-ink) !important;
  border-color: var(--vs-border) !important;
}

::selection {
  background: var(--vs-accent-soft);
  color: var(--vs-ink);
}

/* --- 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%, var(--vs-wash-a) 0%, transparent 58%),
    radial-gradient(ellipse 70% 45% at 100% 0%, var(--vs-wash-b) 0%, transparent 52%),
    linear-gradient(180deg, var(--vs-paper) 0%, var(--vs-paper-deep) 40%, var(--vs-paper) 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: var(--vs-paper);
  border-radius: var(--vs-radius);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--vs-paper);
  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 var(--vs-focus-ring);
  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 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.55rem;
  color: var(--vs-ink) !important;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  text-decoration: none;
}

.navbar-brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
}

.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;
  }

  /* Flatten the marketing "More" dropdown into the hamburger list. */
  .vs-nav-more > .dropdown-toggle {
    display: none;
  }

  .vs-nav-more > .dropdown-menu {
    display: flex;
    flex-direction: column;
    position: static;
    float: none;
    transform: none;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .vs-nav-cta {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.35rem 0 0.15rem;
  }

  .vs-nav-cta .btn-vasker {
    width: 100%;
    min-height: 2.75rem;
    text-decoration: none;
  }
}

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

  /* 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: auto;
    padding-left: 0.75rem;
  }

  .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;
  }

  .vs-nav-cta {
    display: flex;
    align-items: center;
    padding-left: 0.35rem;
  }

  .vs-nav-cta .btn-vasker {
    min-height: 2.5rem;
    font-size: 1rem;
    padding: 0 1rem;
    text-decoration: none;
  }
}

.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 var(--vs-focus-ring);
}

.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);
}


.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: var(--vs-on-accent);
}

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

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

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

.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);
}

/* Text-style buttons: no 48px box, a modest padded hit area. */
.btn-link,
button.btn.btn-link {
  min-height: auto;
  padding: 0.35rem 0.5rem;
  line-height: 1.2;
}

.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-color: var(--vs-surface);
  color: var(--vs-ink);
}

/* Keep Bootstrap's chevron (light or dark) and leave room for it. */
.form-select {
  padding-right: 2.6rem;
  background-position: right 0.9rem center;
}

.form-control::placeholder {
  color: var(--vs-placeholder);
  opacity: 1;
}

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

.form-check-input {
  background-color: var(--vs-surface);
}

/* Ticked boxes and chosen radios in the sea green, not Bootstrap's blue. */
.form-check-input:checked {
  background-color: var(--vs-accent);
  border-color: var(--vs-accent);
}

/* In dark the accent is light, so the dot and tick are drawn in the dark on-accent ink. */
[data-bs-theme="dark"] .form-check-input:checked[type="radio"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%2304201a'/%3e%3c/svg%3e");
}

[data-bs-theme="dark"] .form-check-input:checked[type="checkbox"] {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%2304201a' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.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);
  --bs-table-border-color: var(--vs-border);
  --bs-table-striped-color: var(--vs-ink);
  --bs-table-hover-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: var(--vs-warning-bg);
  border-color: var(--vs-warning-border);
  color: var(--vs-warning-ink);
}

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

.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, color-mix(in srgb, var(--vs-paper) 92%, transparent) 0%, color-mix(in srgb, var(--vs-paper) 55%, transparent) 42%, color-mix(in srgb, var(--vs-paper) 15%, transparent) 68%),
    radial-gradient(ellipse 50% 70% at 78% 42%, var(--vs-hero-glow-a) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 92% 18%, var(--vs-hero-glow-b) 0%, transparent 60%),
    linear-gradient(160deg, var(--vs-hero-base-a) 0%, var(--vs-hero-base-b) 45%, var(--vs-hero-base-c) 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, color-mix(in srgb, var(--vs-glass) 55%, transparent), color-mix(in srgb, var(--vs-glass) 20%, transparent)),
    repeating-linear-gradient(
      180deg,
      transparent 0,
      transparent 2.1rem,
      color-mix(in srgb, var(--vs-accent) 8%, transparent) 2.1rem,
      color-mix(in srgb, var(--vs-accent) 8%, transparent) 2.2rem
    );
  border: 1px solid color-mix(in srgb, var(--vs-accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vs-glass) 35%, transparent);
  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-inline {
  font-size: 1.05rem;
}

.home-why {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--vs-glass) 55%, transparent) 0%, color-mix(in srgb, var(--vs-accent-soft) 35%, transparent) 100%);
}

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

.home-features {
  background: color-mix(in srgb, var(--vs-glass) 40%, transparent);
}

.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%, color-mix(in srgb, var(--vs-hero-glow-b) 35%, transparent) 0%, transparent 55%),
    color-mix(in srgb, var(--vs-glass) 45%, transparent);
}

.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-grid--paid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.container.billing-manage {
  max-width: 56rem;
}

/* Page widths: three steps for single-column pages (forms, details, articles).
   Declared after .container.billing-manage so a notice page can narrow it. */
.page-narrow,
.container.page-narrow {
  max-width: 30rem;
}

.page-medium,
.container.page-medium {
  max-width: 38rem;
}

.page-wide,
.container.page-wide {
  max-width: 46rem;
}

.home-plan h2,
.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-plan-grid--detailed .home-plan {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: 0.85rem;
  box-shadow: var(--vs-shadow);
}

.home-plan-grid--detailed .home-plan h2 {
  font-size: 1.55rem;
}

.home-plan-grid--detailed .home-plan > p:not(.price) {
  color: var(--vs-ink-muted);
  max-width: none;
}

.home-plan__includes {
  font-size: 1rem !important;
  font-weight: 700;
  margin: 1rem 0 0.5rem;
  color: var(--vs-ink);
}

.home-plan__list {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
}

.home-plan__list li {
  position: relative;
  max-width: none;
  margin: 0 0 0.45rem;
  padding-left: 1.35rem;
  color: var(--vs-ink);
  line-height: 1.4;
}

.home-plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7rem;
  height: 0.35rem;
  border-left: 2px solid var(--vs-accent);
  border-bottom: 2px solid var(--vs-accent);
  transform: rotate(-45deg);
}

.home-plan-grid--detailed .home-plan .btn {
  align-self: flex-start;
}

.home-plan.is-shot {
  border-color: var(--vs-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--vs-accent) 18%, transparent);
}

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

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

.home-join {
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--vs-accent-soft) 55%, transparent) 0%, color-mix(in srgb, var(--vs-paper) 90%, transparent) 55%, color-mix(in srgb, var(--vs-paper-deep) 95%, transparent) 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: color-mix(in srgb, var(--vs-glass) 35%, transparent);
}

.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;
}

.account-panel {
  background: var(--vs-surface);
  border: 2px solid var(--vs-border);
  border-radius: var(--vs-radius);
  padding: 1.25rem 1.35rem;
}

.account-panel--danger {
  border-color: var(--vs-danger);
  background: var(--vs-danger-bg);
}

.account-panel .form-check-label,
.account-panel p {
  max-width: none;
}

/* 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); }
}

.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;
}

.vs-advice-notice {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  max-width: 70ch;
  background: var(--vs-surface-tint);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  color: var(--vs-ink-muted);
  font-size: 1rem;
}

.vs-advice-notice--compact {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.98rem;
}

.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, var(--vs-surface-tint) 0%, var(--vs-surface) 55%, var(--vs-surface-tint) 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: var(--vs-backdrop);
}

.vs-pwa-prompt__panel {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  padding: 1.35rem 1.35rem 1.25rem;
  background:
    linear-gradient(165deg, var(--vs-surface-tint) 0%, var(--vs-surface) 45%, var(--vs-surface-tint) 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__options[hidden] {
  display: none !important;
}

.vs-pwa-prompt__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.vs-pwa-prompt__option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  min-height: 3.25rem;
  text-align: left;
  text-decoration: none;
  color: var(--vs-ink);
  background: var(--vs-surface);
  border: 2px solid var(--vs-border-strong);
  border-radius: var(--vs-radius);
  box-shadow: none;
  font-family: var(--vs-body);
  font-size: 1rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.vs-pwa-prompt__option:hover,
.vs-pwa-prompt__option:focus {
  text-decoration: none;
  color: var(--vs-accent-hover);
  border-color: var(--vs-accent);
  background: var(--vs-accent-soft);
}

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

.vs-pwa-prompt__option-icon {
  flex: 0 0 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: var(--vs-accent-soft);
  color: var(--vs-accent);
}

.vs-pwa-prompt__option:hover .vs-pwa-prompt__option-icon,
.vs-pwa-prompt__option:focus .vs-pwa-prompt__option-icon {
  background: var(--vs-surface);
  color: var(--vs-accent-hover);
}

.vs-pwa-prompt__option-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.vs-pwa-prompt__option-title,
.vs-pwa-prompt__option-meta {
  max-width: none;
}

.vs-pwa-prompt__option-title {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}

.vs-pwa-prompt__option-meta {
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 400;
  color: var(--vs-ink-muted);
}

.vs-pwa-prompt__option:hover .vs-pwa-prompt__option-meta,
.vs-pwa-prompt__option:focus .vs-pwa-prompt__option-meta {
  color: var(--vs-accent-hover);
}

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

[data-pwa-install][hidden] {
  display: none !important;
}

.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;
  }
}

.vs-funding-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vs-funding-card {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  box-shadow: var(--vs-shadow);
}

.vs-funding-card__score {
  flex: 0 0 4.5rem;
  text-align: center;
  background: var(--vs-accent-soft);
  border-radius: var(--vs-radius);
  padding: 0.65rem 0.4rem;
}

.vs-funding-card__score strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--vs-accent);
}

.vs-funding-card__score span {
  font-size: 0.85rem;
  color: var(--vs-ink-muted);
}

.vs-funding-card__meta {
  color: var(--vs-ink-muted);
  font-size: 0.95rem;
}

.vs-funding-scoreboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.vs-funding-scoreboard > div {
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  padding: 0.85rem;
  text-align: center;
}

.vs-funding-scoreboard__value {
  font-family: var(--vs-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  color: var(--vs-accent);
}

.vs-funding-scoreboard__label {
  margin: 0;
  color: var(--vs-ink-muted);
}

.vs-funding-segments {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.vs-funding-segments li {
  max-width: none;
  margin: 0 0 0.9rem;
}

.vs-funding-segments__head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.vs-funding-bar {
  height: 0.55rem;
  background: var(--vs-accent-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.3rem 0;
}

.vs-funding-bar span {
  display: block;
  height: 100%;
  background: var(--vs-accent);
}

@media (max-width: 640px) {
  .vs-funding-card {
    flex-direction: column;
  }

  .vs-funding-card__score {
    flex-basis: auto;
    width: 5.5rem;
  }
}

.vs-return-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.15rem;
}

.vs-return-switch__btn {
  appearance: none;
  -webkit-appearance: none;
  min-height: var(--vs-control-h);
  padding: 0.55rem 0.95rem;
  border: 2px solid var(--vs-border-strong);
  border-radius: var(--vs-radius);
  background: var(--vs-surface);
  color: var(--vs-ink);
  font-family: var(--vs-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

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

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

.vs-return-switch__btn.is-active {
  background: var(--vs-accent);
  border-color: var(--vs-accent);
  color: var(--vs-on-accent);
}

.vs-return-switch__hint {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
}

.vs-return-pack {
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  padding: 1.15rem 1.2rem 0.4rem;
  box-shadow: var(--vs-shadow);
}

.vs-return-pack__due {
  font-weight: 700;
}

.vs-return-pack__notes {
  color: var(--vs-ink-muted);
  max-width: 70ch;
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
}

.vs-return-pack__notes li + li {
  margin-top: 0.35rem;
}

@media print {
  .vs-return-switch {
    display: none;
  }

  .vs-return-pack {
    display: block !important;
    break-inside: avoid;
    margin-bottom: 1.5rem;
    box-shadow: none;
  }
}

/* --- Walkthroughs and videos (/walkthroughs/) ------------------------- */

.vs-videos__inner {
  max-width: 66rem;
}

.vs-videos__aside {
  margin: 1.75rem 0 0;
  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);
}

.vs-videos__aside h2 {
  margin: 0 0 0.5rem;
}

.vs-videos__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0 0;
}

@media (min-width: 768px) {
  .vs-videos__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.vs-video {
  display: flex;
  flex-direction: column;
  background: var(--vs-surface);
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  overflow: hidden;
  box-shadow: var(--vs-shadow);
}

.vs-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1b17;
}

.vs-video__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vs-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: rgba(13, 27, 23, 0.4);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.vs-video__play:hover {
  background: rgba(13, 27, 23, 0.6);
  color: #ffffff;
}

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

.vs-video__play-icon {
  width: 0;
  height: 0;
  border-top: 0.85rem solid transparent;
  border-bottom: 0.85rem solid transparent;
  border-left: 1.35rem solid #ffffff;
}

.vs-video__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vs-video__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.15rem 1.15rem;
}

.vs-video__title {
  margin: 0 0 0.5rem;
}

.vs-video__summary {
  color: var(--vs-ink-muted);
}

.vs-video__links {
  margin-top: auto;
}

.vs-video__dot {
  margin: 0 0.35rem;
  color: var(--vs-ink-muted);
}

/* HandHoldly guide launcher on the home page (see templates/marketing/home.html) */
.launch {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1030;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Bank picker on Connect your bank (templates/bankfeeds/connect.html, js/bank-picker.js) */
.vs-bank-list {
  /* Bootstrap floats a fieldset's legend; without this the folded list wraps it. */
  clear: both;
  max-height: 20rem;
  overflow-y: auto;
  border: 1px solid var(--vs-border);
  border-radius: var(--vs-radius);
  background: var(--vs-surface);
}

.vs-bank-picker.is-folded .vs-bank-list {
  max-height: none;
  overflow: visible;
}

.vs-bank + .vs-bank {
  border-top: 1px solid var(--vs-border);
}

.vs-bank-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--vs-control-h);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.vs-bank-label img,
.vs-bank-logo-blank {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 0.375rem;
  object-fit: contain;
  background: var(--vs-surface-tint);
}

.vs-bank-label:hover {
  background: var(--vs-surface-tint);
}

.vs-bank input:checked + .vs-bank-label {
  background: var(--vs-accent-soft);
  font-weight: 700;
}

.vs-bank input:focus-visible + .vs-bank-label {
  outline: 3px solid var(--vs-focus);
  outline-offset: -3px;
}

/* --- Long lists: summary line, pager, money and reconcile toggle ---- */

.list-summary {
  font-size: 1.05rem;
  color: var(--vs-ink);
}

.vs-pager-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}

.vs-pager-status {
  font-weight: 700;
}

.vs-pager-jump {
  font-size: 1rem;
}

/* Amounts line up digit for digit down the column. */
.money-cell,
.money {
  font-variant-numeric: tabular-nums;
}

.reconcile-form {
  margin: 0;
}

/* Cash book on a phone: one card per line instead of the wide table. */
.cashbook-cards {
  display: grid;
  gap: 0.75rem;
}

.cashbook-card {
  padding: 0.85rem 1rem;
  background: var(--vs-surface);
  border: 2px solid var(--vs-border);
  border-radius: var(--vs-radius);
  min-width: 0;
}

.cashbook-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.35rem;
}

.cashbook-card-date {
  color: var(--vs-ink-muted);
}

.cashbook-card-amount {
  font-weight: 700;
  font-size: 1.1rem;
}

.cashbook-card-direction {
  font-weight: 600;
  margin-right: 0.25rem;
}

.cashbook-card-description,
.cashbook-card-meta {
  overflow-wrap: anywhere;
}

.cashbook-card .reconcile-toggle {
  white-space: normal;
  text-align: start;
}

.reconcile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

/* Busy: a spinner while a slow form posts (static/js/busy.js) or the reconcile
   toggle waits for HTMX. The label stays, so the button keeps its name. */
.vs-spinner {
  display: none;
}

.btn.is-busy::after,
.htmx-request .vs-spinner {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: vs-spin 0.8s linear infinite;
}

.btn.is-busy,
.htmx-request .btn,
[aria-busy="true"] .btn {
  cursor: progress;
}

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

@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::after,
  .htmx-request .vs-spinner {
    animation: none;
    border-right-color: currentColor;
    border-style: dotted;
  }
}

.reconcile-icon {
  flex: none;
}

.reconcile-status {
  font-size: 1rem;
}

/* Dashboard: what is still to do, and a short recent activity list. */
.status-list,
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--vs-border);
}

.status-list li:first-child {
  border-top: 1px solid var(--vs-border);
}

.status-figure {
  font-family: var(--vs-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--vs-ink);
  min-width: 2.5rem;
}

.status-list a {
  font-weight: 700;
  margin-left: 0.25rem;
}

.activity-list li {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.75rem;
  margin-bottom: 0.5rem;
}

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

.books-setup-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--vs-border);
}

.books-setup-list li:first-child {
  border-top: 1px solid var(--vs-border);
}

.books-setup-list a {
  font-weight: 700;
  font-size: 1.15rem;
}

/* Form fields with an error: the message sits under the box, in words. */
.field-error {
  color: var(--vs-danger);
  font-weight: 700;
  margin-top: 0.35rem;
}

.field-error p {
  margin: 0;
}
