/* ==========================================================================
   BPal — design system
   Neutral gray body · black pill CTAs · brand coral reserved for accents
   Brand ramp is anchored on the app's own AppBrand.colorset (#E4574F light,
   #EF6A63 dark), so the site and the app read as one product.
   No JavaScript anywhere (CSP: script-src 'none') — all interaction is CSS.
   ========================================================================== */

/* === Tokens ============================================================== */
:root {
  /* -- Neutral ramp (sRGB hex; no oklch, keep browser support broad) -- */
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;

  /* -- Brand coral, anchored on the app's AppBrand colour #E4574F.
        --brand-400 is the dark-surface variant (the app's dark-mode #EF6A63,
        nudged lighter) so accents keep contrast on the dark CTA panel. -- */
  --brand-50:  #fdf1f0;
  --brand-100: #fadedc;
  --brand-400: #f08b85;
  --brand-600: #E4574F;
  --brand-700: #c4433c;
  --brand-900: #7d2a25;

  /* -- Spacing (4px base) -- */
  --space-1:  .25rem;
  --space-2:  .5rem;
  --space-3:  .75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* -- Type scale -- */
  --text-xs:   .75rem;
  --text-sm:   .875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;

  --leading-tight: 1.2;
  --leading-snug:  1.45;
  --leading-normal:1.6;
  --leading-relaxed:1.75;

  --tracking-tight: -.025em;
  --tracking-snug:  -.015em;

  /* -- Radii -- */
  --radius-sm:   .375rem;
  --radius-md:   .75rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;
  --radius-2xl:  2rem;
  --radius-full: 9999px;

  /* -- Shadows (layered, soft) -- */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.04);

  /* -- Hairline rings (rgba so they composite over any surface) -- */
  --ring-hairline: rgba(0,0,0,.07);
  --ring-hairline-strong: rgba(0,0,0,.12);
  --ring-white-hairline: rgba(255,255,255,.14);

  /* -- Semantic -- */
  --color-text:         var(--gray-900);
  --color-text-strong:  var(--gray-950);
  --color-text-muted:   var(--gray-600);
  --color-text-subtle:  var(--gray-500);
  --color-surface:      #ffffff;
  --color-surface-alt:  var(--gray-50);
  --color-border:       var(--gray-200);
  --color-accent:       var(--brand-600);
  --color-accent-hover: var(--brand-700);
  --color-accent-tint:  var(--brand-50);
  --color-cta-bg:       #000000;
  --color-cta-bg-hover: #1f1f1f;
  --color-cta-text:     #ffffff;
  --color-highlight:    #C9A227;

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

/* === Reset =============================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Sticky footer: on short pages (404, support) the footer sits at the
     bottom of the viewport instead of floating halfway up. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > .site-footer { flex-shrink: 0; margin-top: auto; }

img { max-width: 100%; display: block; }
ul { list-style: none; }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }

svg { display: block; }

/* === Accessibility ======================================================= */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
/* Dark surfaces need a light ring instead — the accent loses contrast there. */
.section--cta :focus-visible,
.site-footer :focus-visible,
.btn--dark:focus-visible {
  outline-color: #ffffff;
}

.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-start: 1rem;
  padding: .6rem 1.1rem;
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  font-weight: 600;
  border-radius: var(--radius-full);
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; color: var(--color-cta-text); text-decoration: none; }

/* === Layout ============================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

h1, h2, h3 { text-wrap: balance; }

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  line-height: var(--leading-tight);
  margin-bottom: .75rem;
}

.section__sub {
  font-size: var(--text-lg);
  color: var(--color-text-subtle);
  margin-bottom: 2rem;
  max-width: 62ch;
  text-wrap: pretty;
}

.section__head--center {
  text-align: center;
  max-width: 46rem;
  margin-inline: auto;
}
.section__head--center .section__sub { margin-inline: auto; }

/* Small uppercase-ish pill sitting above a heading. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .9rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--ring-hairline-strong);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* === Buttons ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--dark {
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  box-shadow: var(--shadow-sm);
}
.btn--dark:hover {
  background: var(--color-cta-bg-hover);
  color: var(--color-cta-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--light {
  background: var(--color-surface);
  color: var(--gray-950);
}
.btn--light:hover {
  background: var(--gray-100);
  color: var(--gray-950);
  transform: translateY(-1px);
}

/* Ring instead of border: no box-model shift between states. */
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--gray-300);
}
.btn--ghost:hover {
  background: var(--gray-50);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--gray-400);
}

.btn__icon { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }

/* Official Apple badge. The artwork itself is never restyled — only placed. */
.badge-btn {
  display: inline-flex;
  align-items: center;
  transition: opacity .2s, transform .15s;
}
.badge-btn:hover { opacity: .85; transform: scale(1.02); text-decoration: none; }
.badge-btn img { height: 44px; width: auto; }

/* Pre-launch state. Until site.config.json carries a real app_store_url,
   build.py renders every store call-to-action as a <span> instead of an <a>;
   these rules make that visually obvious rather than a link that does nothing. */
.is-unavailable {
  cursor: default;
  opacity: .5;
  filter: grayscale(1);
}
.is-unavailable:hover { transform: none; opacity: .5; }

/* === Nav ================================================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-block-end: 1px solid var(--ring-hairline);
  padding-block: .7rem;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-nav { background: rgba(255,255,255,.97); }
}

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

.site-nav__logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-strong);
}
.site-nav__logo:hover { color: var(--color-text-strong); text-decoration: none; opacity: .8; }
.site-nav__logo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px var(--ring-hairline);
  flex-shrink: 0;
}

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav__link,
.site-nav__blog {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: .35rem .1rem;
  transition: color .15s;
}
.site-nav__link:hover,
.site-nav__blog:hover { color: var(--color-text-strong); text-decoration: none; }

.site-nav__badge img { height: 36px; }

/* Text links would crowd the badge on narrow screens; the badge is the priority. */
@media (max-width: 599px) {
  .site-nav__link,
  .site-nav__blog { display: none; }
}

/* === Hero ================================================================ */
.section--hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
}

/* Pure-gradient backdrop: zero network bytes, never competes with the LCP image. */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--color-surface);
  background-image:
    radial-gradient(640px circle at 78% 12%, rgba(228,87,79,.10), transparent 62%),
    radial-gradient(520px circle at 8% 0%, rgba(228,87,79,.05), transparent 60%),
    linear-gradient(rgba(17,24,39,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,.035) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 55%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 55%, transparent 92%);
}

.hero__grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: center;
}

.hero__content { flex: 1 1 auto; max-width: 40rem; }

.hero__h1 {
  font-size: clamp(2.25rem, 5.6vw, 3.9rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  margin-bottom: 1.25rem;
}
.hero__h1 span { color: var(--color-accent); }

.hero__tagline {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--color-text-subtle);
  line-height: var(--leading-snug);
  margin-bottom: 1rem;
  text-wrap: pretty;
}

.hero__sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  max-width: 54ch;
  text-wrap: pretty;
}

.hero__bullets {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.hero__bullets li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: var(--text-base);
  color: var(--color-text);
}
.hero__bullets-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: .18rem;
  color: var(--color-accent);
}
.hero__bullets-icon svg { width: 100%; height: 100%; }

.hero__cta { align-self: flex-start; }

.hero__visual {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

/* === Phone frame (the device bezel is baked into the image pixels) ======== */
.phone-frame {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.phone-frame img {
  display: block;
  width: 220px;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(3,7,18,.22));
}
.hero__visual .phone-frame img { width: min(280px, 72vw); }

/* === Download strip ====================================================== */
.section--download {
  background: var(--color-surface-alt);
  border-block: 1px solid var(--color-border);
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.download__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
}
.download__inner h2 { margin-bottom: 0; }
.download__inner .section__sub { margin-bottom: 0; text-align: center; }
.download__note {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}
.download__inner .badge-btn { margin-top: .4rem; }

/* === Screenshots ========================================================= */
.section--screenshots { background: var(--color-surface); }

.screenshots__gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1.5rem 1.5rem 2rem;
  margin-inline: -1.5rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-300) transparent;
}
.screenshots__gallery::-webkit-scrollbar { height: 6px; }
.screenshots__gallery::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

.screenshots__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  padding: 1.25rem 1rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-sm);
}
.screenshots__item .phone-frame img {
  width: 180px;
  filter: drop-shadow(0 12px 24px rgba(3,7,18,.16));
}
.screenshots__caption {
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--color-text-muted);
  text-align: center;
}

/* === How it works — bento grid =========================================== */
.section--how { background: var(--color-surface-alt); }

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.bento__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  min-height: 300px;
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-sm);
}

.bento__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--color-cta-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.bento__icon svg { width: 1.4rem; height: 1.4rem; }

.bento__title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-strong);
  margin-bottom: .4rem;
}
.bento__text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  max-width: 40ch;
}

/* Screenshot bleeds past the card's rounded bottom edge and is clipped by it.
   The crop line runs through the phone's baked-in bezel — no CSS bezel added. */
.bento__shot {
  position: relative;
  inset-inline: 0;
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.bento__shot img {
  width: 165px;
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(3,7,18,.18));
}

/* === Guides ============================================================== */
.section--guides { background: var(--color-surface); }

.guides__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}

.guide-card {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.75rem;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease;
}
.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--ring-hairline-strong), var(--shadow-md);
}
.guide-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-strong);
}
.guide-card__text {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  flex: 1;
}
.guide-card__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  align-self: flex-start;
  margin-top: .75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}
.guide-card__link:hover { text-decoration: none; }
/* Stretched link: the whole card is clickable. */
.guide-card__link::after { content: ""; position: absolute; inset: 0; }
.guide-card__arrow {
  width: 1rem;
  height: 1rem;
  transition: transform .18s ease;
}
.guide-card__arrow svg { width: 100%; height: 100%; }
.guide-card:hover .guide-card__arrow { transform: translateX(3px); }

/* === FAQ ================================================================= */
.section--faq { background: var(--color-surface-alt); }

.faq__list {
  margin-top: 2.5rem;
  max-width: 52rem;
  border-block-start: 1px solid var(--color-border);
}
.faq__item { border-block-end: 1px solid var(--color-border); }

.faq__question {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.35rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-strong);
  cursor: pointer;
  user-select: none;
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { content: ""; }
.faq__question:hover { color: var(--color-accent); }

.faq__chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gray-400);
  transition: transform .25s ease, color .25s ease;
}
.faq__chevron svg { width: 100%; height: 100%; }
.faq__item[open] .faq__chevron { transform: rotate(180deg); color: var(--color-accent); }

/* `display: block` overrides the UA rule that hides children while closed,
   so max-height/opacity can animate. No JS is available to measure height. */
.faq__answer {
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  transition: max-height .3s ease, opacity .2s ease;
}
.faq__item[open] .faq__answer {
  max-height: 640px; /* longest answer on the site is ~510 characters */
  opacity: 1;
  padding-block-end: 1.35rem;
}
.faq__answer > p { max-width: 68ch; }

.faq__learn-more {
  display: inline-block;
  margin-top: .5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}

/* === Final CTA (dark panel) ============================================== */
.section--cta { background: var(--color-surface); }

.cta__box {
  background: var(--gray-950);
  border-radius: var(--radius-2xl);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  background-image: radial-gradient(600px circle at 50% -10%, rgba(228,87,79,.35), transparent 65%);
}
.cta__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: #fff;
}
.cta__text {
  font-size: var(--text-lg);
  color: var(--gray-400);
  max-width: 46ch;
  text-wrap: pretty;
}
.cta__btn { margin-top: .75rem; }

/* === Footer ============================================================== */
.site-footer,
.section--footer {
  background: var(--gray-950);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.footer__nav-label {
  display: block;
  width: 100%;
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: .5rem;
}
.footer__tagline {
  color: var(--gray-400);
  font-size: var(--text-sm);
  max-width: 34ch;
}
.footer__lang { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.footer__lang a {
  color: var(--gray-400);
  font-size: var(--text-xs);
  padding: .25rem .6rem;
  border-radius: var(--radius-full);
  box-shadow: inset 0 0 0 1px var(--ring-white-hairline);
  transition: color .15s, background-color .15s, box-shadow .15s;
}
.footer__lang a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
  text-decoration: none;
}
.footer__lang a[aria-current="page"] {
  color: var(--brand-400);
  background: rgba(228,87,79,.16);
  box-shadow: inset 0 0 0 1px rgba(240,139,133,.4);
}
.footer__legal,
.footer__blog { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.footer__legal a,
.footer__blog a { color: var(--gray-400); font-size: var(--text-sm); }
.footer__legal a:hover,
.footer__blog a:hover { color: #fff; }
.footer__copy { color: var(--gray-500); font-size: var(--text-xs); }
.footer__apple-note {
  font-size: var(--text-xs);
  color: var(--gray-600);
  max-width: 46ch;
  line-height: var(--leading-snug);
}

/* === Guide page ========================================================== */
.breadcrumb { padding: 1.25rem 0 .25rem; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  list-style: none;
  font-size: var(--text-sm);
}
.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-text-subtle);
}
.breadcrumb__item + .breadcrumb__item::before {
  content: "›";
  color: var(--gray-300);
}

.guide-article { padding: 1rem 0 clamp(3rem, 7vw, 5rem); }
.guide-article .container { max-width: 820px; }

.guide-h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-strong);
  margin: 1rem 0 .5rem;
}

.answer-box {
  background: var(--color-surface);
  border-inline-start: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-sm);
  margin: 1.5rem 0 2.5rem;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.guide-section { margin-bottom: 2.75rem; }
.guide-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin-bottom: 1rem;
}
.guide-section p { margin-bottom: 1rem; color: var(--color-text-muted); line-height: var(--leading-relaxed); }
.guide-section ul,
.guide-section ol { padding-inline-start: 1.5rem; margin-bottom: 1rem; color: var(--color-text-muted); }
.guide-section li { margin-bottom: .4rem; }
.guide-section ul { list-style: disc; }
.guide-section ol { list-style: decimal; }
.guide-section strong { color: var(--color-text); font-weight: 600; }

.howto__steps { display: flex; flex-direction: column; gap: 1.5rem; }
.howto__step { display: flex; gap: 1.25rem; align-items: flex-start; }
.howto__step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--color-cta-bg);
  color: #fff;
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.howto__step-content strong {
  display: block;
  font-weight: 600;
  color: var(--color-text-strong);
  margin-bottom: .2rem;
}
.howto__step-content p { color: var(--color-text-muted); font-size: var(--text-base); }
.howto__screenshot-aside {
  float: inline-end;
  margin-block-end: 1rem;
  margin-inline-start: 1.75rem;
  clear: inline-end;
}
.howto__screenshot-aside .phone-frame img { width: 170px; }

.mini-faq { margin-top: 2.5rem; }
.mini-faq .faq__list { margin-top: 1rem; }

.app-cta-block {
  background: var(--gray-950);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  background-image: radial-gradient(500px circle at 50% -20%, rgba(228,87,79,.35), transparent 65%);
}
.app-cta-block h2,
.app-cta-block h3 {
  color: #fff;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  margin-bottom: 0;
}
.app-cta-block p { color: var(--gray-400); font-size: var(--text-base); max-width: 46ch; }

.guide-cards-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

/* === Hub ================================================================= */
.hub-main { max-width: 640px; margin: 0 auto; padding: 4rem 1.5rem 3rem; }
.hub-header { text-align: center; margin-bottom: 2.5rem; }
.hub-header__title {
  font-size: clamp(1.9rem, 4.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  margin-bottom: .5rem;
}
.hub-tagline { color: var(--color-text-subtle); font-size: var(--text-lg); }
.hub__apps { display: flex; flex-direction: column; gap: 1rem; }
.hub__app-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-xs);
  transition: box-shadow .18s, transform .18s;
}
.hub__app-card:hover {
  box-shadow: 0 0 0 1px var(--ring-hairline-strong), var(--shadow-md);
  transform: translateY(-2px);
}
.hub__app-link { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; }
.hub__app-link:hover { text-decoration: none; }
.hub__app-icon { width: 72px; height: 72px; border-radius: 16px; flex-shrink: 0; }
.hub__app-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: .15rem;
}
.hub__app-tagline { color: var(--color-text-muted); font-size: var(--text-sm); }
.hub-footer { text-align: center; margin-top: 3rem; color: var(--color-text-subtle); font-size: var(--text-sm); }

/* === Blog ================================================================ */
.blog-index { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.blog-index__header { margin-bottom: 1rem; }
.blog-index__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  margin-bottom: .5rem;
}
.blog-index__sub { color: var(--color-text-subtle); font-size: var(--text-lg); }

.blog-card {
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.75rem;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 1px var(--ring-hairline), var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease;
}
.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--ring-hairline-strong), var(--shadow-md);
}
.blog-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-strong);
}
.blog-card__link { color: inherit; }
.blog-card__link:hover { color: inherit; text-decoration: none; }
.blog-card__link::after { content: ""; position: absolute; inset: 0; }
.blog-card__date,
.blog-card__meta { font-size: var(--text-sm); color: var(--color-text-subtle); }
.blog-card__description,
.blog-card__desc { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--color-text-muted); flex: 1; }
.blog-card__tags { font-size: var(--text-xs); color: var(--gray-400); }

.blog-post { padding: clamp(2rem, 5vw, 3rem) 0 clamp(3rem, 7vw, 5rem); }
.blog-post .container { max-width: 780px; }
.blog-post__header {
  margin-bottom: 2rem;
  border-block-end: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
}
.blog-post__meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.blog-post__meta time { font-size: var(--text-sm); color: var(--color-text-subtle); }
.blog-post__tags { font-size: var(--text-xs); color: var(--gray-400); }
.blog-post__title {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  line-height: var(--leading-tight);
  margin-bottom: .75rem;
}
.blog-post__byline { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: .25rem; }
.blog-post__reviewed { font-size: var(--text-sm); color: var(--gray-400); font-style: italic; min-height: 1rem; }

.blog-post__body { font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--color-text-muted); }
.blog-post__body h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 2.5rem 0 .75rem;
}
.blog-post__body h3 { font-size: var(--text-xl); font-weight: 600; margin: 1.75rem 0 .5rem; color: var(--color-text-strong); }
.blog-post__body p { margin-bottom: 1.25rem; }
.blog-post__body ul, .blog-post__body ol { padding-inline-start: 1.5rem; margin-bottom: 1.25rem; }
.blog-post__body ul { list-style: disc; }
.blog-post__body ol { list-style: decimal; }
.blog-post__body li { margin-bottom: .4rem; }
.blog-post__body strong { font-weight: 600; color: var(--color-text); }

.disclaimer-box {
  background: #FFFBEB;
  border-inline-start: 4px solid var(--color-highlight);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: var(--text-sm);
  color: var(--gray-700);
  line-height: var(--leading-normal);
}

.blog-sources { margin: 2.5rem 0; padding-top: 1.5rem; border-block-start: 1px solid var(--color-border); }
.blog-sources h2 { font-size: var(--text-xl); font-weight: 600; margin-bottom: .75rem; }
.blog-sources ul,
.blog__sources { padding-inline-start: 1.25rem; list-style: disc; }
.blog-sources li,
.blog__sources li { margin-bottom: .35rem; font-size: var(--text-sm); }

.related-posts { margin-top: 3rem; }
.related-posts h2 { margin-bottom: 1.25rem; }

/* === FAQ page (standalone) =============================================== */
/* Sits inside .section--faq, which already supplies the top rhythm. */
.faq-page__header { padding: 0 0 2rem; }
.faq-page__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-strong);
  margin-bottom: .75rem;
}
.faq-page__intro {
  font-size: var(--text-lg);
  color: var(--color-text-subtle);
  max-width: 62ch;
  margin-bottom: 1.25rem;
  text-wrap: pretty;
}
.faq-page__notice {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  box-shadow: inset 0 0 0 1px var(--ring-hairline);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  max-width: 68ch;
}
.faq-page__contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-block-start: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* === Legal / prose pages ================================================= */
.legal-page { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.legal-page .container { max-width: 780px; }
.legal-page__header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.legal-page__header img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--ring-hairline);
  flex-shrink: 0;
}
.legal-page__title,
.legal-page__header h1 {
  font-size: clamp(1.65rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  line-height: var(--leading-tight);
  margin-bottom: .15rem;
}
.legal-page__meta { color: var(--color-text-subtle); font-size: var(--text-sm); }

.prose {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  max-width: 70ch;
}
.prose h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text-strong);
  letter-spacing: var(--tracking-snug);
  margin: 2.25rem 0 .75rem;
}
.prose h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-strong);
  margin: 1.5rem 0 .5rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-inline-start: 1.5rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--color-text); font-weight: 600; }
.prose hr { border: 0; border-block-start: 1px solid var(--color-border); margin: 2rem 0; }
/* === Tables ==============================================================
   Blood pressure category tables are load-bearing content in the guides and
   the blog, so they get the same treatment in all three prose contexts.
   `display: block` + `overflow-x: auto` keeps a wide table scrolling inside
   itself on a phone instead of widening the whole page. */
.prose table,
.guide-section table,
.blog-post__body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}
.prose th, .prose td,
.guide-section th, .guide-section td,
.blog-post__body th, .blog-post__body td {
  text-align: start;
  padding: .65rem .9rem;
  border-block-end: 1px solid var(--color-border);
  white-space: nowrap;
}
.prose thead th,
.guide-section thead th,
.blog-post__body thead th {
  color: var(--color-text-strong);
  font-weight: 600;
  background: var(--color-surface-alt);
  border-block-end: 2px solid var(--color-border);
  white-space: normal;
}
/* First column carries the category name — let it breathe and stand out. */
.guide-section tbody td:first-child,
.blog-post__body tbody td:first-child,
.prose tbody td:first-child {
  color: var(--color-text);
  font-weight: 600;
}
.guide-section tbody tr:last-child td,
.blog-post__body tbody tr:last-child td,
.prose tbody tr:last-child td { border-block-end: 0; }
/* The and/or column between the two number columns is a connector, not data. */
.guide-section tbody td:not(:first-child),
.blog-post__body tbody td:not(:first-child),
.prose tbody td:not(:first-child) { color: var(--color-text-muted); }

.support-card,
.prose .support-card {
  background: var(--color-surface-alt);
  border-inline-start: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.support-card strong {
  display: block;
  margin-bottom: .25rem;
  color: var(--color-text-strong);
}
.privacy-note,
.prose .privacy-note {
  background: #FFFBEB;
  border-inline-start: 4px solid var(--color-highlight);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: var(--text-sm);
}

/* === 404 ================================================================= */
.section--error {
  text-align: center;
  padding: clamp(4rem, 12vw, 8rem) 0;
}
.section--error h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-strong);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.section--error p {
  font-size: var(--text-lg);
  color: var(--color-text-subtle);
  max-width: 46ch;
  margin: 0 auto 2rem;
}
.section--error .btn { margin-inline: auto; }

/* === Responsive: 640px =================================================== */
@media (min-width: 640px) {
  .guides__grid,
  .guide-cards-row { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .screenshots__item { width: 250px; }
  .screenshots__item .phone-frame img { width: 200px; }
  .footer__lang,
  .footer__legal,
  .footer__blog { justify-content: flex-start; }
}

/* === Responsive: 768px =================================================== */
@media (min-width: 768px) {
  .footer__inner { align-items: flex-start; text-align: start; }
  .footer__tagline { max-width: 42ch; }
}

/* === Responsive: 1024px ================================================== */
@media (min-width: 1024px) {
  .hero__grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
  }
  .hero__content { max-width: 34rem; }
  .hero__visual .phone-frame img { width: 320px; }

  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "a a b"
      "c d b";
  }
  .bento__card--a { grid-area: a; }
  .bento__card--b { grid-area: b; }
  .bento__card--c { grid-area: c; }
  .bento__card--d { grid-area: d; }
  .bento__card { min-height: 330px; padding: 2rem; }
  /* Bleed the screenshot past the card's bottom edge; overflow:hidden clips it.
     Each card reserves padding-bottom >= the image's visible height, so long
     translations grow the card instead of running under the screenshot.
     Visible height = 2.041 * width + bottom offset (images are 640x1306). */
  .bento__shot { position: absolute; inset-inline: 0; bottom: -6rem; margin-top: 0; }

  /* Wide card: text on the inline-start, device hugging the inline-end. */
  .bento__card--a { padding-bottom: 2rem; }
  .bento__card--a .bento__title,
  .bento__card--a .bento__text { max-width: 30ch; }
  .bento__card--a .bento__shot {
    inset-inline: auto 2rem;
    bottom: -5rem;
    justify-content: flex-end;
  }

  .bento__card--b { padding-bottom: 19rem; }        /* 190px wide -> 292px visible */
  .bento__card--b .bento__shot img { width: 190px; }
  .bento__card--c,
  .bento__card--d { padding-bottom: 13.5rem; }      /* 150px wide -> 210px visible */
  .bento__card--c .bento__shot img,
  .bento__card--d .bento__shot img { width: 150px; }

  .guides__grid,
  .guide-cards-row { grid-template-columns: repeat(3, 1fr); }

  .footer__inner { flex-direction: row; justify-content: space-between; }
}

/* === RTL ================================================================= */
[dir="rtl"] .answer-box,
[dir="rtl"] .support-card,
[dir="rtl"] .privacy-note,
[dir="rtl"] .disclaimer-box {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
[dir="rtl"] .breadcrumb__item + .breadcrumb__item::before { content: "‹"; }
[dir="rtl"] .guide-card__arrow svg { transform: scaleX(-1); }
[dir="rtl"] .guide-card:hover .guide-card__arrow { transform: translateX(-3px); }

/* === Reduced motion ====================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
