/* EV Mileage Tracker marketing site (Eleventy)
   - Mobile-first
   - Light/dark via prefers-color-scheme + manual override
   - Based on the same marketing site foundation/style used across BPS app sites
*/

/* Icons: Font Awesome (loaded via CDN in base layout) */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  --accent: #23c483;
  --accent-2: #5b7cff;
  --success: #23c483;

  --bg: #f7f8ff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-2: rgba(245, 247, 255, 0.92);
  --card: #ffffff;

  --text: #0b1020;
  --muted: #4a5568;
  --border: rgba(17, 24, 39, 0.10);
  --shadow: 0 16px 50px rgba(17, 24, 39, 0.10);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --container: 1120px;
}

/* Slightly stronger muted text for readability */
:root {
  --muted: #3e4a5f;
}

:root[data-theme="dark"] {
  --bg: #060812;
  --surface: rgba(12, 14, 28, 0.88);
  --surface-2: rgba(255, 255, 255, 0.07);
  --card: rgba(12, 14, 28, 0.94);

  --text: #eef2ff;
  --muted: rgba(238, 242, 255, 0.75);
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}

/* Screenshot tone adjustment in dark mode (keep light mode true-to-image) */
:root[data-theme="dark"] .hero__shot,
:root[data-theme="dark"] .screens__img {
  filter: brightness(0.72) contrast(0.98) saturate(0.92);
}

:root[data-theme="dark"] .hero__shot:hover,
:root[data-theme="dark"] .hero__shot:focus-visible,
:root[data-theme="dark"] .screens__img:hover,
:root[data-theme="dark"] .screens__img:focus-visible {
  filter: none;
}

:root[data-theme="dark"] .hero__illustration img {
  filter: brightness(0.78) contrast(0.98) saturate(0.92);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060812;
    --surface: rgba(12, 14, 28, 0.88);
    --surface-2: rgba(255, 255, 255, 0.07);
    --card: rgba(12, 14, 28, 0.94);

    --text: #eef2ff;
    --muted: rgba(238, 242, 255, 0.75);
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
  }

  :root:not([data-theme="light"]) .hero__shot,
  :root:not([data-theme="light"]) .screens__img {
    filter: brightness(0.72) contrast(0.98) saturate(0.92);
  }

  :root:not([data-theme="light"]) .hero__shot:hover,
  :root:not([data-theme="light"]) .hero__shot:focus-visible,
  :root:not([data-theme="light"]) .screens__img:hover,
  :root:not([data-theme="light"]) .screens__img:focus-visible {
    filter: none;
  }

  :root:not([data-theme="light"]) .hero__illustration img {
    filter: brightness(0.78) contrast(0.98) saturate(0.92);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Subtle global background texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1000px 520px at 18% 10%, rgba(91,124,255,0.05), transparent 55%),
    radial-gradient(900px 480px at 85% 20%, rgba(35,196,131,0.04), transparent 60%),
    radial-gradient(900px 500px at 55% 70%, rgba(124,77,255,0.035), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02) 1px, transparent 1px, transparent 7px);
  opacity: 0.9;
}

:root[data-theme="dark"] body::before {
  background:
    radial-gradient(1000px 520px at 18% 10%, rgba(91,124,255,0.08), transparent 55%),
    radial-gradient(900px 480px at 85% 20%, rgba(35,196,131,0.06), transparent 60%),
    radial-gradient(900px 500px at 55% 70%, rgba(124,77,255,0.06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 1px, transparent 8px);
  opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    background:
      radial-gradient(1000px 520px at 18% 10%, rgba(91,124,255,0.08), transparent 55%),
      radial-gradient(900px 480px at 85% 20%, rgba(35,196,131,0.06), transparent 60%),
      radial-gradient(900px 500px at 55% 70%, rgba(124,77,255,0.06), transparent 60%),
      repeating-linear-gradient(0deg, rgba(255,255,255,0.03), rgba(255,255,255,0.03) 1px, transparent 1px, transparent 8px);
    opacity: 0.55;
  }
}

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

/* Unified focus style */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 70%, white 30%);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Inline link styling (especially inside cards) */
.card a:not(.btn) {
  color: color-mix(in srgb, var(--accent-2) 88%, var(--text) 12%);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-2) 55%, transparent);
  text-underline-offset: 3px;
  font-weight: 700;
}

.card a:not(.btn):hover {
  text-decoration-color: color-mix(in srgb, var(--accent-2) 85%, transparent);
}

.card a:not(.btn):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-2) 75%, white 25%);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__logo {
  width: 48px;
  height: 48px;
  display: block;
  border-radius: 14px;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.98));
  box-shadow: 0 8px 22px rgba(91, 124, 255, 0.12);
  border: 1px solid rgba(91, 124, 255, 0.14);
}

:root[data-theme="dark"] .brand__logo {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
  }
}

.brand__name {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
}

.nav__links {
  grid-column: 1 / -1;
  display: none;
  list-style: none;
  padding: 0.5rem 0 0;
  margin: 0;
  gap: 0.25rem;
}

/* Mobile menu animation */
.nav__links {
  transform-origin: top;
  transform: translateY(-6px);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

@media (min-width: 720px) {
  .nav__links {
    transform: none;
    opacity: 1;
    transition: none;
  }
}

.nav__links[data-open="true"] {
  display: grid;
  opacity: 1;
  transform: translateY(0);
}

.nav__link {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 700;
}

.nav__linkIcon {
  margin-right: 0.5rem;
  opacity: 0.85;
}

/* Reserve fixed space for the theme icon to avoid layout shift on load */
.nav__themeToggle {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
}

.nav__link.is-active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
  text-decoration: none;
}


.hero {
  position: relative;
  padding: 3.4rem 0 1.6rem;
}

/* Top-only gradient background (avoid repeating/banding down the page) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(91,124,255,0.12), transparent 55%),
    radial-gradient(1000px 520px at 90% 0%, rgba(124,77,255,0.10), transparent 60%),
    radial-gradient(800px 500px at 60% 40%, rgba(35,196,131,0.08), transparent 55%);
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background:
      /* Fade the whole hero glow into the page background to avoid a visible edge line. */
      linear-gradient(to bottom, transparent 0%, var(--bg) 92%),
      radial-gradient(1200px 600px at 20% -10%, rgba(91,124,255,0.22), transparent 55%),
      radial-gradient(1000px 520px at 90% 0%, rgba(124,77,255,0.18), transparent 60%),
      radial-gradient(800px 500px at 60% 40%, rgba(35,196,131,0.10), transparent 55%);
  }
}

/* Explicit bottom fade to guarantee a smooth transition into the page background */
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.hero__copy {
  display: grid;
  gap: 1rem;
  align-content: start;
  order: 1;
}

.hero__screens {
  display: grid;
  justify-content: center;
  order: 2;
}

.hero__visual {
  order: 2;
  display: grid;
  justify-content: center;
}

.downloadBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.downloadBadge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.downloadBadge img {
  height: 54px;
  width: auto;
  display: block;
}

.downloadBadge--disabled {
  opacity: 0.6;
  filter: grayscale(0.2);
  cursor: not-allowed;
}

.hero__shot {
  width: min(240px, 70vw);
  height: auto;
  border-radius: 28px;
}

.screens {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screens__img {
  width: 190px;
  height: auto;
  border-radius: 26px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: filter 180ms ease;
}

.screens--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: visible;
  scroll-snap-type: none;
  padding: 0;
  margin-top: 0.75rem;
  justify-items: center;
}

.screens--grid .screens__img {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
}

@media (min-width: 720px) {
  .hero {
    padding: 4.2rem 0 2.2rem;
  }

  .hero__inner {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 2.25rem;
  }

  .hero__copy { order: 1; }
  .hero__visual { order: 2; }

  .hero__screens,
  .hero__visual {
    justify-content: center;
  }

  .hero__shot {
    width: 260px;
    transform: rotate(-2.2deg) translateY(8px);
  }

  .screens {
    overflow: visible;
    padding: 0;
  }

  .screens--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 980px;
    margin-inline: auto;
  }
}

.hero__illustration img {
  width: min(340px, 86vw);
  height: auto;
  display: block;
  max-height: 320px;
  object-fit: contain;
}

@media (min-width: 720px) {
  .hero__illustration img {
    width: 420px;
    max-width: 100%;
    max-height: 340px;
  }

  /* Some pages benefit from a slightly smaller hero visual */
  .hero__visual[data-hero-key="press"] .hero__illustration img {
    width: 280px;
    max-height: 300px;
  }

  .hero__visual[data-hero-key="coverage"] .hero__illustration img {
    width: 280px;
    max-height: 300px;
  }
}

/* Screenshot lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(8px);
}

.lightbox[data-open="true"] { display: flex; }

.lightbox__dialog {
  width: min(980px, 100%);
  position: relative;
  display: block;
}

.lightbox__imgWrap {
  display: grid;
  place-items: center;
}

.lightbox__img {
  width: min(360px, 88vw);
  height: auto;
  border-radius: 22px;
}

.lightbox__btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.lightbox__btn i.fa-solid {
  font-size: 18px;
}

.lightbox__close i.fa-solid {
  font-size: 20px;
}

.lightbox__btn:hover { background: rgba(255,255,255,0.14); }

.lightbox__close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  z-index: 3;
}

.lightbox__btn[data-lightbox-prev],
.lightbox__btn[data-lightbox-next] {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.lightbox__btn[data-lightbox-prev] {
  left: calc(12px + env(safe-area-inset-left));
}

.lightbox__btn[data-lightbox-next] {
  right: calc(12px + env(safe-area-inset-right));
}

.section__head {
  display: grid;
  gap: 0.25rem;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.78rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

@media (min-width: 720px) {
  .hero__title {
    line-height: 1.06;
  }
}

/* Small utilities */
.mt-sm { margin-top: 1rem; }
.mt-md { margin-top: 1.25rem; }

.card--flat {
  box-shadow: none;
}

.grid--center {
  align-items: center;
}

/* Trust strip */
.trustStrip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.trustPill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  font-weight: 800;
  color: var(--text);
}

.trustPill > span[aria-hidden="true"] {
  font-size: 16px;
  line-height: 1;
}

.trustPill i.fa-solid {
  font-size: 16px;
}

/* Reserve space for hero visuals to reduce layout shift */
.hero__visual {
  min-height: 320px;
}

@media (min-width: 720px) {
  .hero__visual {
    min-height: 360px;
  }
}

.hero__tagline {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.hero__glow {
  position: absolute;
  inset: -60px 0 auto 0;
  height: 260px;
  background: radial-gradient(
    closest-side,
    rgba(91, 124, 255, 0.16),
    transparent 70%
  );
  filter: blur(12px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  font-weight: 800;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(-1px);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  box-shadow: 0 18px 50px rgba(91, 124, 255, 0.22), 0 10px 22px rgba(17, 24, 39, 0.12);
  filter: brightness(1.05) saturate(1.05);
}

:root[data-theme="dark"] .btn--primary:hover,
:root[data-theme="dark"] .btn--primary:focus-visible {
  box-shadow: 0 18px 60px rgba(91, 124, 255, 0.18), 0 12px 26px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary:hover,
  :root:not([data-theme="light"]) .btn--primary:focus-visible {
    box-shadow: 0 18px 60px rgba(91, 124, 255, 0.18), 0 12px 26px rgba(0, 0, 0, 0.35);
  }
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border-color: color-mix(in srgb, var(--accent-2) 25%, var(--border) 75%);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.10);
}

:root[data-theme="dark"] .btn--ghost:hover,
:root[data-theme="dark"] .btn--ghost:focus-visible {
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--ghost:hover,
  :root:not([data-theme="light"]) .btn--ghost:focus-visible {
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  }
}

.btn i.fa-solid {
  font-size: 18px;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-color: rgba(255,255,255,0.14);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn--primary {
    /* Keep it primary, just darker in dark mode */
    background: linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 72%, var(--bg) 28%),
      color-mix(in srgb, var(--accent-2) 72%, var(--bg) 28%)
    );
    border-color: rgba(255, 255, 255, 0.16);
  }
}

:root[data-theme="dark"] .btn--primary {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 72%, var(--bg) 28%),
    color-mix(in srgb, var(--accent-2) 72%, var(--bg) 28%)
  );
  border-color: rgba(255, 255, 255, 0.16);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.main { padding: 1.25rem 0 3.5rem; }

/* Readable long-form widths (privacy/terms etc.) */
.prose {
  max-width: 72ch;
}

.prose h2, .prose h3 {
  scroll-margin-top: 96px;
}

.articleProse {
  max-width: 74ch;
}

.articleCta {
  margin-top: 3rem;
  padding: 1.5rem 0 0;
}

.articleCta__inner {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, white 8%), var(--surface));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.articleCta__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.articleCta__title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.articleCta__text {
  margin: 0.9rem 0 0;
  max-width: 52ch;
  color: var(--muted);
}

.articleCta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.articleHero {
  position: relative;
  min-height: clamp(280px, 48vw, 460px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.articleHero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.articleHero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 18, 0.18) 0%, rgba(6, 8, 18, 0.72) 65%, rgba(6, 8, 18, 0.86) 100%);
}

.articleHero__inner {
  position: relative;
  z-index: 1;
  width: min(var(--container), calc(100% - 2rem));
  padding: 3rem 0 2.2rem;
  margin: 0 auto;
}

.articleHero__content {
  width: min(100%, 74ch);
  margin-inline: auto;
  text-align: left;
}

.articleHero__meta {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.articleHero__title {
  margin: 0;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.blogCard {
  overflow: hidden;
}

.blogCard__link,
.blogCard__link:visited,
.blogCard__link:hover,
.blogCard__link:focus,
.blogCard__link:active,
.blogCard__link *,
.blogCard__link:visited *,
.blogCard__link:hover *,
.blogCard__link:focus *,
.blogCard__link:active * {
  display: block;
  text-decoration: none !important;
}

.blogCard__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  margin-bottom: 0.9rem;
}

.blogCard__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

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

.blogCard__meta {
  margin: 0 0 0.3rem;
}

.blogCard__title {
  margin: 0 0 0.45rem;
}

.blogCard__excerpt {
  margin: 0;
  color: var(--muted);
}

/* Section spacing utility */
.section { margin-top: 1.25rem; }


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

.cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

/* Consistent vertical rhythm for page sections */
.section {
  margin-top: 1.25rem;
}

.section--sm {
  margin-top: 1rem;
}

@media (min-width: 720px) {
  .nav__inner { grid-template-columns: 1fr auto auto; }
  .nav__links {
    display: flex;
    grid-column: auto;
    padding: 0;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
  }
  .nav__toggle { display: none; }

  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

/* Corner ribbon */
.card--ribbon {
  position: relative;
  overflow: hidden;
}

.ribbon {
  position: absolute;
  top: 14px;
  right: -48px;
  transform: rotate(35deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  height: 26px;
  padding: 0 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.18);
}

:root[data-theme="dark"] .ribbon {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ribbon {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  }
}

/* Typography spacing inside cards */
.card h2,
.card h3 {
  margin-top: 1.15rem;
  margin-bottom: 0.55rem;
  line-height: 1.2;
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

/* Card title with subtle icon */
.card__iconTitle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.card__iconTitle i.fa-solid {
  color: color-mix(in srgb, var(--accent-2) 70%, var(--muted) 30%);
  font-size: 1rem;
}

.card__iconTitle i.fa-brands {
  color: color-mix(in srgb, var(--accent-2) 70%, var(--muted) 30%);
  font-size: 1rem;
}

.footer__links i.fa-solid,
.footer__links i.fa-brands {
  font-size: 0.95em;
  margin-right: 0.4rem;
  opacity: 0.9;
}

.card p {
  margin: 0.6rem 0;
  color: var(--muted);
}

.card ul,
.card ol {
  margin: 0.6rem 0 0.8rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.card li { margin: 0.35rem 0; }

.card .small {
  margin: 0.4rem 0 0.8rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.footer__inner {
  display: grid;
  gap: 1rem;
  text-align: center;
}

.footer__brand {
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

@media (min-width: 720px) {
  .footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
    text-align: left;
  }

  .footer__brand {
    justify-items: start;
  }

  .footer__links {
    justify-content: flex-end;
  }
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

/* (Material Symbols removed) */

/* Prevent a brief icon flash before JS initialises */
:root:not([data-theme-ready="true"]) [data-theme-icon] {
  visibility: hidden;
}
