/* Untethered Calories — shared styles
   Colours mirror the app's Palette.swift (D65); fonts are Barlow, SIL OFL. */

/* ---------- Fonts ---------- */
/* Keep /fonts/OFL.txt next to these files (the footer links to it): the SIL Open Font
   License requires its copyright notice and licence to ship with the fonts. */
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/Barlow-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Colour tokens (light) ---------- */
:root {
  color-scheme: light dark;
  --background: #EDF1EB;
  --panel: #F8FAF6;
  --ink: #1E2A23;
  --muted: #5B695F;
  --rule: #D5DDD3;
  --green: #2E6A4E;
  --green-soft: #9DBBA9;
  --ochre: #B7832A;
  --ochre-soft: #E8D6B0;
  --ochre-ink: #8A5D12;
  --plum: #9A3C58;
  --track: #DDE4DA;
  --on-green: #FFFFFF;
  --brand: #2E6A4E;
  --plate: #F7F9F5;

  --font-text: "Barlow", system-ui, -apple-system, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --gutter: 1rem;
  --max-width: 72rem;
  --radius: 1rem;
  --hero-wash: linear-gradient(160deg, #DAE7DD 0%, #E9EEE4 48%, #F3E7CF 100%);
  --shadow-float: 0 1px 0 rgba(255,255,255,0.6) inset, 0 4px 24px -8px rgba(30,42,35,0.25);
  --shadow-phone: 0 30px 60px -20px rgba(30,42,35,0.45), 0 12px 24px -12px rgba(30,42,35,0.3);
}

/* ---------- Colour tokens (dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #131915;
    --panel: #1B221D;
    --ink: #E4EBE5;
    --muted: #9AA89F;
    --rule: #2B352E;
    --green: #6FBE93;
    --green-soft: #3F6B53;
    --ochre: #DDB05A;
    --ochre-soft: #5A4824;
    --ochre-ink: #DDB05A;
    --plum: #DB7A9B;
    --track: #26302A;
    --on-green: #0F1E16;
    --brand: #163627;
    --plate: #E4EBE5;
    --hero-wash: linear-gradient(160deg, #1D3327 0%, #18211B 50%, #2A2416 100%);
    --shadow-float: 0 1px 0 rgba(255,255,255,0.05) inset, 0 4px 24px -8px rgba(0,0,0,0.6);
    --shadow-phone: 0 30px 60px -20px rgba(0,0,0,0.7), 0 12px 24px -12px rgba(0,0,0,0.5);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--green); text-underline-offset: 0.15em; }

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

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--panel);
  border-radius: 0.5rem;
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  line-height: 1.2;
}
.button-primary { background: var(--green); color: var(--on-green); }
.button-primary[aria-disabled="true"] { cursor: default; }
.button-quiet { color: var(--green); padding-inline: 0.5rem; }
.button-quiet:hover { text-decoration: underline; }

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Header: floating capsule ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 0.75rem var(--gutter) 0;
}
.site-header .bar {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.4rem 0.4rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-float);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  white-space: nowrap;
}
.brand { flex-shrink: 0; }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 0.6rem; }

.site-nav ul {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--track); }
.site-nav a[aria-current="page"] { color: var(--on-green); background: var(--green); }
.nav-short { display: none; }

@media (max-width: 38rem) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-nav a { padding-inline: 0.7rem; }
  /* "Bring your own AI" doesn't fit beside the logo on a phone */
  .nav-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-short { display: inline; }
}
/* The smallest phones (iPhone SE 1st gen and similar, 320 px wide) */
@media (max-width: 22.5rem) {
  .site-header .bar { gap: 0.4rem; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding-inline: 0.5rem; font-size: 0.95rem; }
}

/* ---------- Main ---------- */
main { flex: 1; }
.page { padding-block: clamp(2.5rem, 8vw, 5rem); }

.lede { font-size: clamp(1.125rem, 2.2vw, 1.375rem); color: var(--muted); max-width: 36rem; }


.section { padding-block: clamp(4rem, 10vw, 7rem); }

/* ---------- Hero ---------- */
.hero { padding: 1rem var(--gutter) 0; }
.hero-field {
  max-width: calc(var(--max-width) + 4rem);
  margin-inline: auto;
  border-radius: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--hero-wash);
  overflow: hidden;
  display: grid;
  gap: 2.5rem;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4.5rem) 0;
}
.hero-copy { text-align: center; }
/* The app's name, on phones only: there the header shows just the logo, so the
   name sits at the top of the home page instead (265595d). aria-hidden in the
   HTML: screen readers already hear it in the header's logo link. */
.hero-name { display: none; }
@media (max-width: 38rem) {
  .hero-name {
    display: block;
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.1;
    color: var(--ink);
  }
}
.hero h1 {
  font-size: clamp(3rem, 9vw, 5.75rem);
  line-height: 0.95;
  margin-bottom: 1.25rem;
}
.hero .lede { margin-inline: auto; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 1.75rem 0 1.5rem;
}
.promises {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.promises li { display: flex; align-items: center; gap: 0.4rem; }
.promises li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--green);
}

.hero-phones {
  position: relative;
  height: clamp(23rem, 96vw, 30rem); /* phones run off the bottom of the field */
}
.hero-phones .phone { position: absolute; left: 50%; }
.hero-phones .phone-front {
  --w: clamp(12.5rem, 54vw, 17.5rem);
  top: 0;
  transform: translateX(-30%);
  z-index: 2;
  animation: rise 0.9s cubic-bezier(.2,.7,.2,1) both;
}
.hero-phones .phone-back {
  --w: clamp(10.75rem, 46vw, 15rem);
  top: clamp(2.5rem, 10vw, 3.5rem);
  transform: translateX(-92%) rotate(-6deg);
  animation: rise 1.1s 0.12s cubic-bezier(.2,.7,.2,1) both;
}

@media (min-width: 56rem) {
  .hero-field {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }
  .hero-copy { text-align: left; padding-bottom: clamp(2.5rem, 7vw, 5rem); }
  .hero .lede { margin-inline: 0; }
  .hero-actions, .promises { justify-content: flex-start; }
  .hero-phones { height: 100%; min-height: 36rem; }
  .hero-phones .phone-front { --w: 18.5rem; top: 1rem; transform: translateX(-28%); }
  .hero-phones .phone-back { --w: 16rem; top: 4.5rem; transform: translateX(-90%) rotate(-6deg); }
}

@keyframes rise { from { opacity: 0; translate: 0 2.5rem; } }

/* ---------- Phone frame (drawn in CSS; screenshots have no device frame) ---------- */
.phone {
  --w: 18rem;
  width: var(--w);
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.165);
  background: #0E1210;
  box-shadow:
    inset 0 0 0 calc(var(--w) * 0.006) #3A423D,
    var(--shadow-phone);
  position: relative;
  flex: none;
}
.phone img {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(var(--w) * 0.13);
  background: var(--background);
}
.phone::after { /* Dynamic Island */
  content: "";
  position: absolute;
  top: calc(var(--w) * 0.058);
  left: 50%;
  width: calc(var(--w) * 0.29);
  height: calc(var(--w) * 0.083);
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
}

/* ---------- Feature ---------- */
.feature {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.feature h2 { max-width: 14ch; }
.feature-copy p:last-child { margin-bottom: 0; }
.feature-copy p { color: var(--muted); font-size: 1.1875rem; max-width: 34rem; }
.feature-visual {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 6vw, 3.5rem) 1rem;
  border-radius: clamp(1.5rem, 4vw, 2rem);
  background: var(--panel);
}
.feature-visual .phone { --w: clamp(14rem, 60vw, 18rem); }
@media (min-width: 56rem) {
  /* Side by side: copy and legend share the left column. Stacked, the order is copy → screenshot → legend. */
  .feature {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "copy visual" "legend visual";
    column-gap: 4rem;
    row-gap: 2rem;
  }
  .feature-copy { grid-area: copy; align-self: end; }
  .feature-visual { grid-area: visual; }
  .feature .sources { grid-area: legend; align-self: start; }
}

.sources {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 30rem;
}
.sources li {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0.25rem 1rem;
  align-items: start;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--panel);
}
.sources strong { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.sources span { grid-column: 2; color: var(--muted); font-size: 0.9875rem; }
.sources .swatch {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.6rem;
}
.swatch-label { background: var(--green); }
.swatch-estimate {
  background: repeating-linear-gradient(45deg, var(--green) 0 4px, var(--green-soft) 4px 9px);
}
.swatch-photo {
  background: repeating-linear-gradient(-45deg, var(--ochre) 0 4px, var(--ochre-soft) 4px 9px);
}

/* ---------- Progress ---------- */
.section-progress { padding-top: 0; }
.section-intro { text-align: center; max-width: 44rem; margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.section-intro .lede { margin-inline: auto; }
.progress-grid {
  display: grid;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 40rem) { .progress-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .progress-grid { grid-template-columns: repeat(4, 1fr); } }
.progress-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem 0;
  border-radius: clamp(1.5rem, 4vw, 2rem);
  background: var(--panel);
  overflow: hidden;
}
.progress-card h3 { font-size: 1.625rem; margin-bottom: 0.4rem; }
.progress-card p { color: var(--muted); font-size: 1rem; }
.progress-shot {
  margin-top: auto;
  height: 19rem; /* shows the top of the screen; the phone runs off the card */
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
}
.progress-shot .phone { --w: 14.5rem; }

/* ---------- Bring your own AI page ---------- */
.section-flush { padding-top: 0; }

/* A hero field with no phones: centred copy at every width */
.hero-field-solo { display: block; padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero-field-solo .hero-copy { text-align: center; max-width: 46rem; margin-inline: auto; padding-bottom: 0; }
.hero-field-solo .lede { margin-inline: auto; }
.hero-field-solo .hero-actions { justify-content: center; margin-bottom: 0; }
.hero-end { padding-top: 0; }
.hero-end h2 { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 0.95; margin-bottom: 1.25rem; }
.share-status { min-height: 1.55em; margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.share-status:empty { min-height: 0; margin: 0; }
button.button { border: 0; font-family: inherit; cursor: pointer; }
.button[hidden] { display: none; }

.split { display: grid; gap: 2rem; align-items: center; }
.split h2 { max-width: 14ch; }
.split-copy p { color: var(--muted); font-size: 1.1875rem; max-width: 34rem; }
.split-copy strong { color: var(--ink); }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; column-gap: 4rem; } }

.facts { display: grid; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.facts li {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 1.25rem 1.1rem 1.5rem;
  border-radius: var(--radius);
  background: var(--panel);
  border-left: 4px solid var(--green);
}
.facts strong { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; }
.facts span { color: var(--muted); font-size: 0.9875rem; }

/* Today vs. bring your own AI */
.compare { display: grid; gap: 1.25rem; }
@media (min-width: 56rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-card {
  margin: 0;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) clamp(1.25rem, 4vw, 2rem);
  border-radius: clamp(1.5rem, 4vw, 2rem);
  background: var(--panel);
}
.compare-card figcaption { display: grid; gap: 0.25rem; margin-bottom: 1.25rem; }
.compare-card figcaption strong { font-family: var(--font-display); font-size: 1.625rem; line-height: 1.1; }
.compare-card figcaption span { color: var(--muted); font-size: 1rem; }
.compare-card-byo { background: var(--hero-wash); }
.diagram { width: 100%; max-width: 28rem; height: auto; display: block; margin-inline: auto; overflow: visible; }
.diagram text { font-family: var(--font-text); font-size: 14px; font-weight: 600; fill: var(--ink); }
.d-chip rect:first-child { fill: var(--background); stroke: var(--rule); }
.compare-card-byo .d-chip rect:first-child { fill: var(--panel); }
.d-app-1 { fill: var(--green); }
.d-app-2 { fill: var(--ochre); }
.d-app-3 { fill: var(--plum); }
.d-server { fill: var(--muted); }
.d-chip .d-fee { font-size: 12px; font-weight: 600; fill: var(--plum); }
.d-line { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.d-line-key { stroke: var(--green); stroke-width: 2.5; stroke-dasharray: none; }
.d-ai { fill: var(--green); }
.diagram .d-ai-text { font-family: var(--font-display); font-size: 24px; font-weight: 700; fill: var(--on-green); }
.d-key rect { fill: var(--ochre-soft); }
.d-key circle, .d-key path { fill: none; stroke: var(--ochre-ink); stroke-width: 2.5; stroke-linecap: round; }
.diagram .d-key text { fill: var(--ink); font-size: 15px; font-weight: 700; }
.diagram .d-note { font-size: 13px; fill: var(--green); font-weight: 700; }

.benefits { display: grid; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 40rem) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 72rem) { .benefits { grid-template-columns: repeat(4, 1fr); } }
.benefits li { padding: 1.75rem 1.5rem; border-radius: clamp(1.5rem, 4vw, 2rem); background: var(--panel); }
.benefits h3 { font-size: 1.625rem; margin-bottom: 0.4rem; }
.benefits p { color: var(--muted); font-size: 1rem; margin: 0; }
.aside {
  max-width: 44rem;
  margin: 2rem auto 0;
  padding: 1.1rem 1.4rem;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
}
.aside strong { color: var(--ink); }

/* Two overlapping phones inside a feature panel */
.phone-pair { position: relative; min-height: clamp(24rem, 100vw, 34rem); overflow: hidden; }
.phone-pair .phone { position: absolute; left: 50%; }
.phone-pair .phone-front { --w: clamp(12rem, 50vw, 17rem); top: clamp(2rem, 6vw, 3.5rem); transform: translateX(-22%); z-index: 2; }
.phone-pair .phone-back { --w: clamp(10.5rem, 44vw, 15rem); top: clamp(3.5rem, 12vw, 6rem); transform: translateX(-86%) rotate(-6deg); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem 1.5rem;
}
@media (min-width: 40rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand .brand { margin-bottom: 0.75rem; }
.footer-brand p { max-width: 22rem; margin: 0; }
.site-footer h2 {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.site-footer ul { display: grid; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.small-print {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}
.small-print p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Tutorial page ---------- */
.part-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
}
.part-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem 0.5rem 0.5rem;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-float);
}
.part-nav a:hover { color: var(--green); }
.part-num {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--on-green);
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.part { scroll-margin-top: 5rem; }
.step { scroll-margin-top: 5rem; }

/* One step: copy beside a screenshot (or cards); stacked on phones, copy first */
.step {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3rem);
}
.step + .step { border-top: 1px solid var(--rule); }
.step h3 { font-size: clamp(1.625rem, 3.2vw, 2.25rem); }
.step-copy p { color: var(--muted); max-width: 34rem; }
.step-copy strong { color: var(--ink); }
.step-copy p:last-child { margin-bottom: 0; }
.step-more { font-weight: 600; }
.step-visual {
  display: flex;
  justify-content: center;
  padding: clamp(2rem, 6vw, 3rem) 1rem;
  border-radius: clamp(1.5rem, 4vw, 2rem);
  background: var(--panel);
}
.step-visual .phone { --w: clamp(13rem, 58vw, 15rem); }
.step-visual.phone-pair { display: block; padding: 0; min-height: clamp(22rem, 92vw, 28rem); }
.step-visual.phone-pair .phone-front { --w: clamp(11.5rem, 48vw, 15rem); top: clamp(1.75rem, 5vw, 2.5rem); }
.step-visual.phone-pair .phone-back { --w: clamp(10rem, 42vw, 13rem); top: clamp(3rem, 10vw, 4.5rem); }
.step-text .step-copy { align-self: start; }
.step-copy .facts { margin-top: 1.5rem; }
@media (min-width: 56rem) {
  .step { grid-template-columns: 1.1fr 1fr; column-gap: 4rem; }
  .step-text { grid-template-columns: 1fr 1.6fr; }
}

.step-cards { display: grid; gap: 1rem; }
.how-card { padding: 1.5rem; border-radius: clamp(1.25rem, 3vw, 1.5rem); background: var(--panel); }
.how-card h4 { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; margin: 0 0 0.75rem; }
.how-card ol { margin: 0; padding-left: 1.4rem; display: grid; gap: 0.5rem; }
.how-card li { padding-left: 0.25rem; }
.how-card li::marker { color: var(--green); font-weight: 700; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.35em;
  background: var(--track);
  color: var(--ink); /* muted text on track is just under AA */
}

.sources-compact { margin-top: 1.5rem; gap: 0.5rem; }
.sources-compact li { grid-template-columns: 1.75rem 1fr; padding: 0.75rem 1rem; gap: 0 0.85rem; }
.sources-compact .swatch { width: 1.75rem; height: 1.75rem; border-radius: 0.45rem; }
.sources-compact strong { font-size: 1.125rem; }
.sources-compact span:not(.swatch) { font-size: 0.9375rem; }

.tips { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.tips strong { color: var(--ink); }

/* Floating "Back to top": hidden until the hero leaves the screen (js/back-to-top.js) */
.to-top {
  position: fixed;
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  box-shadow: var(--shadow-float), 0 8px 24px -10px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  translate: 0 0.75rem;
  transition: opacity 0.25s, translate 0.25s, visibility 0s 0.25s;
}
.to-top.is-shown { opacity: 1; visibility: visible; translate: 0 0; transition: opacity 0.25s, translate 0.25s; }
.to-top[hidden] { display: none; }
#top { scroll-margin-top: 10rem; } /* land at the very top, under the sticky header */
.to-top:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: no-preference) {
  html:has(.to-top) { scroll-behavior: smooth; }
}

/* ---------- Developers ---------- */
/* A quiet invitation at the top of every footer */
.dev-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.dev-invite p { margin: 0; color: var(--muted); }
.dev-invite strong { color: var(--ink); }
.site-footer .dev-invite a { color: var(--green); font-weight: 600; }
.hero-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.split-copy a, .facts a { color: var(--green); }

/* ---------- Text pages: privacy and support ---------- */
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
.prose h2 { margin-top: 2.5em; }
.prose h3 { margin-top: 1.75em; font-size: 1.5rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--green); }
.prose strong { color: var(--ink); }
.prose .facts { padding: 0; margin-top: 2rem; }
.prose .facts li::marker { content: none; }
.updated { color: var(--muted); font-size: 0.9375rem; }

.contact-card {
  margin-top: 2rem;
  padding: 1.75rem 1.5rem;
  border-radius: clamp(1.5rem, 4vw, 2rem);
  background: var(--hero-wash);
}
.contact-card h2 { margin-top: 0; font-size: 1.75rem; }
.contact-card .button { overflow-wrap: anywhere; }
.contact-card p:last-child { margin-bottom: 0; color: var(--muted); }

.faq { display: grid; gap: 0.75rem; }
.faq details { border-radius: var(--radius); background: var(--panel); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-size: 1.5rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > :not(summary) { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq details > ul { padding-left: 2.5rem; }

/* ---------- Consent bar (js/consent.js) and Cookie settings ---------- */
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.link-button:hover { color: var(--ink); }
.link-button[hidden] { display: none; }
.small-print .link-button { margin-left: 0.75rem; }

.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  z-index: 20;
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border-radius: 1.5rem;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-float), 0 0 0 1px var(--rule);
  font-size: 0.9375rem;
}
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 18rem; }
.consent-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.consent .button { padding: 0.6rem 1.2rem; font-size: 1rem; }
.consent .button-quiet { border: 0; background: var(--track); color: var(--ink); cursor: pointer; }
.consent .button-primary { border: 0; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
