/* Sufle Teleprompter — website theme "Studio night".
   Modeled on the app's App Store artwork: a deep violet studio darkness
   with soft purple light spills, bold white headlines with lavender
   gradient accents, black glassy device surfaces, and the coral-red
   record button as a sparing highlight.
   One dark theme only (print stays white). System fonts, no frameworks. */

:root {
  color-scheme: dark;

  --bg-top: #250b4d;
  --bg-mid: #150632;
  --bg-bottom: #070211;

  --surface: #1a0c36;
  --surface-deep: #0e0522;
  --menu-bg: #221045;
  --chip-bg: #271349;

  --ink: #f5f2ff;
  --ink-soft: #ccc2e8;
  --ink-faint: #9b8ec2;

  --violet: #a78bfa;
  --violet-soft: #c4b5fd;
  --violet-hover: #ddd2ff;
  --btn-top: #8b5cf6;
  --btn-bottom: #6d28d9;
  --rec: #ff453a;

  --card-border: rgba(255, 255, 255, 0.09);
  --divider: rgba(255, 255, 255, 0.08);
  --glow-violet: rgba(139, 92, 246, 0.45);
  --header-bg: rgba(18, 8, 38, 0.7);
  --focus-ring: #c9b8ff;

  /* Device mockup */
  --phone-frame: #0b0714;
  --phone-ring: rgba(255, 255, 255, 0.22);
  --phone-screen: #050507;

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-body);
  font-size: 100%;
  line-height: 1.7;
  color: var(--ink-soft);
  /* This colour also paints the canvas outside the viewport — the strip under
     the iOS status bar and the overscroll bounce — so it matches the top of
     the backdrop below, not its near-black bottom, and matches <meta theme-color>. */
  background-color: var(--bg-top);
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  /* Keep content clear of the notch and home indicator; the backdrop still
     bleeds edge to edge behind it (viewport-fit=cover). */
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

/* The studio backdrop lives on a fixed layer so it always fills the viewport,
   even on very long legal pages. Its height is pinned to the large viewport:
   iOS resizes fixed boxes while the toolbar collapses, which would otherwise
   slide the gradient around mid-scroll. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  background:
    radial-gradient(46rem 32rem at 12% -6%, rgba(139, 92, 246, 0.38) 0%, transparent 62%),
    radial-gradient(40rem 30rem at 96% 16%, rgba(109, 40, 217, 0.3) 0%, transparent 58%),
    radial-gradient(44rem 30rem at 50% 108%, rgba(124, 58, 237, 0.26) 0%, transparent 60%),
    linear-gradient(to bottom, var(--bg-top), var(--bg-mid) 44%, var(--bg-bottom));
  background-repeat: no-repeat;
  pointer-events: none;
}

/* A faint vignette keeps the middle of the frame stage-dark, like the
   screenshots, without flattening the corner glows. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(90rem 60rem at 50% 42%, transparent 55%, rgba(4, 1, 10, 0.5) 100%);
}

::selection {
  background: rgba(139, 92, 246, 0.45);
  color: #fff;
}

a {
  color: var(--violet-soft);
  font-weight: 500;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(196, 181, 253, 0.4);
}

a:hover {
  color: var(--violet-hover);
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 30;
  padding: 0.7rem 1.1rem;
  color: #fff;
  background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
  border-radius: 999px;
  box-shadow: 0 8px 24px var(--glow-violet);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}

/* ---------- Header (floating glass bar) ---------- */

.site-header {
  position: sticky;
  top: clamp(0.5rem, 1.6vw, 0.9rem);
  top: calc(env(safe-area-inset-top) + clamp(0.5rem, 1.6vw, 0.9rem));
  z-index: 20;
  padding-inline: clamp(0.6rem, 2vw, 1.25rem);
}

/* Brand | centred links | download: a slim capsule of frosted glass with a
   hairline edge and a soft violet bloom. On phones it becomes a flex row
   (brand, download, menu toggle) and the links drop into a card below. */
.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: min(100%, 64rem);
  min-height: 3.5rem;
  margin-inline: auto;
  padding: 0.4rem 0.45rem 0.4rem 0.95rem;
  background: var(--header-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px -10px rgba(0, 0, 0, 0.5),
    0 0 44px -18px var(--glow-violet);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  flex: none;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}

.primary-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.primary-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(139, 92, 246, 0.26);
  box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.22);
}

/* Compact App Store call to action living inside the capsule */

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  justify-self: end;
  min-height: 2.5rem;
  padding: 0 1.05rem 0 0.9rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
  box-shadow: 0 6px 18px -6px var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.header-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.header-cta:active {
  transform: translateY(0) scale(0.97);
}

.header-cta:focus-visible {
  border-radius: 999px;
}

.header-cta svg {
  width: 1rem;
  height: 1rem;
  margin-top: -0.12em;
  fill: currentColor;
}

/* Menu toggle: rendered only on phones, and only once nav.js has run
   (it ships with the `hidden` attribute). Two bars that fold into a cross. */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle[hidden] {
  display: none;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle:focus-visible {
  border-radius: 999px;
}

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 1.05rem;
  height: 0.65rem;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle-bars span:first-child {
  top: 0;
}

.nav-toggle-bars span:last-child {
  bottom: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  top: calc(50% - 1px);
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  bottom: calc(50% - 1px);
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4.5rem;
  padding-inline: clamp(0.6rem, 2vw, 1.25rem);
}

/* Links and the language switcher share the first row; the copyright line
   runs underneath across the full width. */
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.1rem 1.5rem;
  width: min(100%, 64rem);
  margin-inline: auto;
  padding-block: 1.9rem 2.2rem;
  border-top: 1px solid var(--divider);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.35rem;
}

.footer-links a {
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 400;
}

/* Language switcher: a small segmented pill. The current language carries
   aria-current; the other one links to the same page in that language. */

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  justify-self: end;
  padding: 0.22rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 999px;
}

.language-switcher svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  margin-inline: 0.55rem 0.25rem;
  color: var(--ink-faint);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0 0.8rem;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
}

.language-switcher a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.language-switcher a[aria-current] {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.language-switcher a:focus-visible {
  border-radius: 999px;
}

/* ---------- Shared type ---------- */

.page-shell {
  width: min(100% - 2.25rem, 70rem);
  margin-inline: auto;
  padding-block: clamp(2.25rem, 6vw, 4.5rem);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.22;
  color: var(--ink);
}

p,
li {
  max-width: 72ch;
}

.eyebrow {
  margin: 0;
  color: var(--violet);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lead {
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.3vw, 1.26rem);
}

/* Lavender gradient accent inside headlines, as on the App Store artwork. */
.grad {
  background: linear-gradient(105deg, #ddd2ff 5%, var(--violet) 55%, #8460f0 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Section scaffolding shared by features / steps / platforms / FAQ */

.section {
  max-width: 62rem;
  margin-inline: auto;
  padding-top: clamp(3rem, 7vw, 4.75rem);
  scroll-margin-top: 5.5rem;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.1rem);
}

.section-head h2 {
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
}

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

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.65rem 1.9rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  background: linear-gradient(to bottom, var(--btn-top), var(--btn-bottom));
  box-shadow: 0 8px 26px var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cta-button:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 11px 32px rgba(139, 92, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-button:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 5px 18px var(--glow-violet), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-button:focus-visible {
  border-radius: 999px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.65rem 1.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.ghost-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

/* App Store badge, shaped like the neighbouring site actions. */

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0.6rem 1.45rem 0.65rem 1.15rem;
  color: #fff;
  text-decoration: none;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.appstore-badge:hover {
  color: #fff;
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 30px -12px var(--glow-violet);
}

.appstore-badge:active {
  transform: translateY(0) scale(0.98);
}

.appstore-badge:focus-visible {
  border-radius: 999px;
}

.appstore-badge svg {
  width: 1.9rem;
  height: 1.9rem;
  fill: #fff;
}

.badge-lines {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.badge-small {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  opacity: 0.85;
}

.badge-big {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(1.5rem, 4.5vw, 3.5rem) clamp(1rem, 3vw, 2rem);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero h1 {
  margin: 0.55rem 0 0.85rem;
  font-size: clamp(2.1rem, 4.6vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: #fff;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
}

.hero .lead {
  margin: 0;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.9rem;
}

/* Fact chips under the hero actions: rating, codec, languages, privacy. */

.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.7rem 0 0;
  padding: 0;
  list-style: none;
}

.fact-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.85rem;
  color: #d9cff6;
  background: var(--chip-bg);
  border: 1px solid var(--divider);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.fact-row .star {
  color: #ffd60a;
}

/* ---------- Animated phone mockup ---------- */

.hero-device {
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 300 / 610;
  padding: 12px;
  background: var(--phone-frame);
  border-radius: 48px;
  box-shadow:
    inset 0 0 0 2px var(--phone-ring),
    inset 0 0 0 7px #000,
    0 40px 90px rgba(0, 0, 0, 0.6),
    0 0 80px -20px var(--glow-violet);
}

.phone-screen {
  position: relative;
  overflow: hidden;
  height: 100%;
  background: var(--phone-screen);
  border-radius: 37px;
}

.phone-island {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 4;
  width: 84px;
  height: 24px;
  transform: translateX(-50%);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
}

.phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  z-index: 4;
  width: 96px;
  height: 4px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

/* The prompter text scrolls behind soft fades, like the app mid-recording.
   The inner block holds the copy twice, so a -50% translate loops cleanly. */

.prompter-mask {
  position: absolute;
  inset: 0 0 20%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 22%, #000 62%, transparent 92%);
  mask-image: linear-gradient(to bottom, transparent 4%, #000 22%, #000 62%, transparent 92%);
}

.prompter-scroll {
  padding: 5.4rem 1.15rem 0;
  /* The prompter reads left-aligned even when the stacked hero centers text. */
  text-align: left;
}

.prompter-scroll p {
  margin: 0 0 1.05em;
  max-width: none;
  color: #fdfdff;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

/* Recording HUD: red REC chip and the control row from the capture screen. */

.phone-hud {
  position: absolute;
  left: 50%;
  bottom: 26%;
  z-index: 3;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  background: rgba(20, 20, 24, 0.72);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.rec-dot {
  width: 0.55rem;
  height: 0.55rem;
  background: var(--rec);
  border-radius: 50%;
}

.phone-controls {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.55rem;
}

.ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: rgba(44, 44, 50, 0.85);
  border-radius: 50%;
}

.ctrl svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ctrl-rec {
  width: 62px;
  height: 62px;
  background: transparent;
  border: 3px solid #fff;
}

.ctrl-rec::before {
  content: "";
  width: 44px;
  height: 44px;
  background: var(--rec);
  border-radius: 50%;
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-card {
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 1.4rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4), 0 0 34px -10px var(--glow-violet);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1rem;
  color: var(--violet-soft);
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.28), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 14px;
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.14rem;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
}

/* ---------- How it works ---------- */

.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  counter-increment: step;
  max-width: none;
  padding: 1.4rem 1.4rem 1.5rem;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px dashed rgba(167, 139, 250, 0.3);
  border-radius: 22px;
}

.step-list li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.7rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(115deg, #ddd2ff, var(--violet) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.step-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.step-list p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.62;
}

/* ---------- Platforms ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: none;
  padding: 1.5rem 1rem 1.4rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.platform-card svg {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--violet-soft);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.platform-card p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.84rem;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 46rem;
}

.faq-item {
  margin-bottom: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
}

.faq-item[open] {
  border-color: rgba(167, 139, 250, 0.4);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  user-select: none;
  border-radius: 18px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  flex: none;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.15em;
  border-right: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  transform: rotate(45deg);
}

.faq-item[open] summary::after {
  transform: rotate(-135deg);
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.15rem;
  font-size: 0.95rem;
}

/* ---------- Download banner ---------- */

.app-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  max-width: 62rem;
  margin: clamp(3rem, 7vw, 4.75rem) auto 0;
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1.4rem, 4vw, 2.5rem);
  background:
    linear-gradient(120deg, #241046, #180b33 55%, #200e42) padding-box,
    linear-gradient(115deg, rgba(167, 139, 250, 0.5), rgba(139, 92, 246, 0.3) 45%, rgba(167, 139, 250, 0.12)) border-box;
  border: 1px solid transparent;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 50px -20px var(--glow-violet);
}

.app-banner-text h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
}

.app-banner-text p {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
}

/* ---------- Guides index ---------- */

.guides-intro {
  max-width: 50rem;
  margin-inline: auto;
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.guides-intro h1 {
  margin: 0.55rem auto 0.85rem;
  max-width: 16ch;
  font-size: clamp(2.15rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  color: #fff;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
}

.guides-intro .lead {
  margin: 0 auto;
  max-width: 43rem;
}

.guide-list {
  display: grid;
  gap: 1.35rem;
  max-width: 58rem;
  margin-inline: auto;
}

.guide-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  background:
    radial-gradient(28rem 18rem at 100% 0, rgba(139, 92, 246, 0.2), transparent 70%),
    var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 44px -22px var(--glow-violet);
}

.guide-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  color: var(--violet-soft);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.guide-card h2 {
  margin: 0.8rem 0 0.6rem;
  max-width: 24ch;
  font-size: clamp(1.45rem, 3.8vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.guide-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.guide-card h2 a:hover {
  color: var(--violet-hover);
}

.guide-card > p {
  margin: 0;
  max-width: 60ch;
  font-size: 1.02rem;
}

.guide-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 750;
  text-decoration: none;
}

/* ---------- Guide articles ---------- */

.article-shell {
  width: min(100% - 2.25rem, 74rem);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 5vw, 3.75rem);
}

.breadcrumbs {
  max-width: 64rem;
  margin: 0 auto clamp(1.6rem, 4vw, 2.5rem);
  font-family: var(--font-display);
  font-size: 0.82rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-faint);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: rgba(196, 181, 253, 0.45);
}

.breadcrumbs a {
  text-decoration: none;
}

.guide-article {
  max-width: 64rem;
  margin-inline: auto;
}

.article-header {
  max-width: 51rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}

.article-header h1 {
  margin: 0.6rem auto 1rem;
  font-size: clamp(2.15rem, 5.2vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: #fff;
  text-wrap: balance;
  text-shadow: 0 0 42px rgba(139, 92, 246, 0.32);
}

.article-deck {
  margin: 0 auto;
  max-width: 45rem;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 2.4vw, 1.3rem);
  line-height: 1.62;
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.6rem;
  margin-top: 1.45rem;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.article-byline p {
  margin: 0;
  line-height: 1.45;
}

.article-byline p + p {
  padding-left: 1.6rem;
  border-left: 1px solid var(--divider);
}

.article-byline strong {
  color: var(--ink);
  font-weight: 750;
}

.article-byline span {
  color: var(--ink-faint);
}

.article-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 47rem);
  align-items: start;
  gap: clamp(2rem, 5vw, 4rem);
}

.article-toc {
  position: sticky;
  top: 7.25rem;
  padding: 1.05rem 1.05rem 1.1rem;
  background: rgba(26, 12, 54, 0.68);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.article-toc > p {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-toc ol {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  line-height: 1.35;
}

.article-toc a {
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.article-toc a:hover {
  color: var(--violet-hover);
}

.article-body {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 1.03rem;
  line-height: 1.78;
}

.article-body section {
  scroll-margin-top: 7.5rem;
}

.article-body p,
.article-body li {
  max-width: 72ch;
}

.article-body h2 {
  margin: 3.2rem 0 0.9rem;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.article-body h3 {
  margin: 2rem 0 0.5rem;
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  font-weight: 750;
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.35rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin-bottom: 0.55rem;
  padding-left: 0.22rem;
}

.article-body li::marker {
  color: var(--violet);
  font-family: var(--font-display);
  font-weight: 800;
}

.article-summary,
.article-callout {
  margin: 0 0 1.65rem;
  padding: 1.2rem 1.3rem;
  color: var(--ink);
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24), 0 0 30px -18px var(--glow-violet);
}

.article-summary p,
.article-callout p {
  margin: 0;
}

.article-callout {
  margin-block: 1.7rem;
  background: rgba(255, 255, 255, 0.045);
  border-left: 4px solid var(--violet);
  border-radius: 7px 18px 18px 7px;
}

.developer-note .eyebrow {
  margin-bottom: 0.45rem;
}

.article-figure {
  margin: 2rem 0 2.25rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  background:
    radial-gradient(28rem 18rem at 50% 20%, rgba(139, 92, 246, 0.16), transparent 70%),
    rgba(14, 5, 34, 0.52);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.32);
}

.article-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
  border-radius: 18px;
}

.article-figure-phone img {
  width: min(100%, 26rem);
}

.article-figure figcaption {
  max-width: 58ch;
  margin: 0.9rem auto 0;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: center;
}

.article-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
}

.article-example-card {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 18px;
}

.article-example-card.is-after {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22), 0 0 28px -20px var(--glow-violet);
}

.article-example-label {
  margin: 0 0 0.7rem;
  color: var(--violet-soft);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-example-card blockquote {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.68;
}

.article-template {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1.5rem 0 1.65rem;
  overflow: hidden;
  background: rgba(14, 5, 34, 0.5);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.article-template p {
  max-width: none;
  margin: 0;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--divider);
}

.article-template p:nth-child(odd) {
  border-right: 1px solid var(--divider);
}

.article-template p:nth-last-child(-n + 2) {
  border-bottom: none;
}

.article-template strong {
  color: var(--violet-soft);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.45rem 0 1.65rem;
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.article-body table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  background: rgba(14, 5, 34, 0.5);
  font-size: 0.9rem;
  line-height: 1.5;
}

.article-body th,
.article-body td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--divider);
}

.article-body thead th {
  color: var(--ink);
  background: rgba(139, 92, 246, 0.16);
  font-family: var(--font-display);
  font-weight: 750;
}

.article-body tbody th {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}

.article-body tbody tr:last-child th,
.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  margin-block: 2.3rem 2.7rem;
  padding: clamp(1.35rem, 4vw, 2rem);
  background:
    linear-gradient(120deg, #241046, #180b33 55%, #200e42) padding-box,
    linear-gradient(115deg, rgba(167, 139, 250, 0.5), rgba(139, 92, 246, 0.18)) border-box;
  border: 1px solid transparent;
  border-radius: 24px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4), 0 0 42px -22px var(--glow-violet);
}

.article-cta > div {
  flex: 1 1 20rem;
}

.article-app-icon {
  flex: 0 0 auto;
  width: 6rem;
  height: 6rem;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.34));
}

.article-cta h2 {
  margin: 0.35rem 0 0.3rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.article-cta p {
  margin: 0;
}

.article-cta .cta-button {
  flex: 0 0 auto;
}

.article-conclusion {
  margin-top: 3.25rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--divider);
}

/* ---------- Legal documents ---------- */

.legal-document {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 5vw, 3.25rem);
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 60px -24px var(--glow-violet);
}

.legal-document h1,
.legal-document h2,
.legal-document h3 {
  color: var(--ink);
}

.legal-document p,
.legal-document li {
  max-width: 76ch;
}

.legal-document h1 {
  margin: 0.8rem 0 1.1rem;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

.legal-document h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(to right, var(--violet), rgba(167, 139, 250, 0.1));
  box-shadow: 0 0 18px var(--glow-violet);
}

.legal-document h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 2.5rem;
  font-size: clamp(1.28rem, 3vw, 1.55rem);
  font-weight: 700;
}

.legal-document h2::before {
  content: "";
  flex: none;
  width: 0.55em;
  height: 0.55em;
  border-radius: 0.18em;
  background: var(--violet);
  transform: rotate(45deg) translateY(-0.06em);
  box-shadow: 0 0 12px var(--glow-violet);
}

.legal-document h3 {
  margin-top: 1.6rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.document-meta {
  display: inline-block;
  margin: 0;
  padding: 0.32rem 0.85rem;
  color: #d9cff6;
  background: var(--chip-bg);
  border: 1px solid var(--divider);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notice {
  margin-block: 1.5rem;
  padding: 1rem 1.2rem;
  color: var(--ink);
  background: rgba(139, 92, 246, 0.14);
  border-left: 5px solid var(--violet);
  border-radius: 8px 18px 18px 8px;
  box-shadow: 0 0 28px -10px var(--glow-violet);
}

.contact-block {
  font-style: normal;
}

/* Technical tokens in the policy (URL schemes, Bonjour service names) */
.legal-document code {
  padding: 0.1em 0.45em;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: #e6ddff;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-radius: 6px;
  white-space: nowrap;
}

/* ---------- 404 ---------- */

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 44rem;
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.error-page h1 {
  margin: 1.1rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 34px rgba(139, 92, 246, 0.4);
}

.error-page .lead {
  margin: 0 auto;
  max-width: 34rem;
}

.error-art {
  width: clamp(150px, 26vw, 200px);
  height: auto;
  filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.35));
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.9rem;
}

/* ---------- Motion (gentle, and only when welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes drop-in {
    from {
      opacity: 0;
      transform: translateY(-14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes bloom-in {
    from {
      opacity: 0;
      transform: scale(0.94);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .header-inner {
    animation: drop-in 550ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-copy > * {
    animation: rise-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-copy > *:nth-child(2) { animation-delay: 120ms; }
  .hero-copy > *:nth-child(3) { animation-delay: 220ms; }
  .hero-copy > *:nth-child(4) { animation-delay: 320ms; }
  .hero-copy > *:nth-child(5) { animation-delay: 420ms; }

  .hero-device {
    animation: bloom-in 800ms cubic-bezier(0.22, 1, 0.36, 1) 250ms both;
  }

  .legal-document,
  .guides-intro > *,
  .guide-card,
  .article-header,
  .article-layout,
  .error-page > * {
    animation: rise-in 650ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
  }

  .app-banner {
    animation: rise-in 650ms cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
  }

  /* The prompter loop: content is duplicated, so -50% restarts seamlessly. */
  @keyframes prompter-roll {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
  }

  .prompter-scroll {
    animation: prompter-roll 26s linear infinite;
  }

  .rec-dot {
    animation: rec-blink 1.4s steps(2, jump-none) infinite;
  }

  @keyframes rec-blink {
    from { opacity: 1; }
    to { opacity: 0.35; }
  }

  a,
  .primary-nav a,
  .nav-toggle,
  .ghost-button {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
  }

  .nav-toggle-bars span {
    transition: top 220ms ease, bottom 220ms ease, transform 220ms ease;
  }

  .header-cta {
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 160ms ease;
  }

  @keyframes menu-in {
    from {
      opacity: 0;
      transform: translateY(-6px) scale(0.98);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .site-header.nav-open .primary-nav {
    animation: menu-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .feature-card {
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  }

  .cta-button,
  .appstore-badge {
    transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 160ms ease, border-color 160ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Freeze the prompter mid-script rather than at the blank lead-in. */
  .prompter-scroll {
    transform: translateY(-12%);
  }
}

/* ---------- Medium screens: hero stacks, device goes below the copy ---------- */

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .hero-actions,
  .fact-row {
    justify-content: center;
  }

  .section-head {
    margin-inline: auto;
    text-align: center;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .article-toc {
    position: static;
    max-width: 34rem;
    margin-inline: auto;
  }

  .article-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1rem;
  }
}

/* ---------- Compact header & footer (phones and small tablets) ---------- */

@media (max-width: 48rem) {
  .header-inner {
    display: flex;
    gap: 0.5rem;
    min-height: 3.25rem;
    padding: 0.3rem 0.35rem 0.3rem 0.7rem;
  }

  .brand {
    margin-right: auto;
    font-size: 1.02rem;
  }

  .brand-mark {
    width: 1.85rem;
    height: 1.85rem;
  }

  .header-cta {
    order: 1;
    min-height: 2.3rem;
    padding: 0 0.85rem 0 0.75rem;
    font-size: 0.84rem;
  }

  .nav-toggle {
    order: 2;
    display: inline-flex;
    width: 2.3rem;
    height: 2.3rem;
  }

  .nav-toggle[hidden] {
    display: none;
  }

  /* The menu drops under the capsule as its own card, spanning its width. */
  .primary-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    display: none;
    padding: 0.45rem;
    background: var(--menu-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px -18px var(--glow-violet);
  }

  .site-header.nav-open .primary-nav {
    display: block;
  }

  .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .primary-nav a {
    display: flex;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border-radius: 16px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.95rem;
    padding-block: 1.5rem 1.9rem;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .language-switcher {
    justify-self: center;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
  .hero-actions {
    width: 100%;
    flex-direction: column;
  }

  .hero-actions > * {
    width: min(100%, 20rem);
  }

  .app-banner {
    flex-direction: column;
    text-align: center;
  }

  .app-banner-text p {
    margin-inline: auto;
  }

  .article-byline {
    flex-direction: column;
  }

  .article-byline p + p {
    padding-top: 0.55rem;
    padding-left: 0;
    border-top: 1px solid var(--divider);
    border-left: none;
  }

  .article-toc ol {
    grid-template-columns: 1fr;
  }

  .article-cta {
    flex-direction: column;
    text-align: center;
  }

  .article-app-icon {
    width: 5.5rem;
    height: 5.5rem;
  }

  .article-cta .cta-button {
    width: 100%;
  }

  .article-example-grid,
  .article-template {
    grid-template-columns: 1fr;
  }

  .article-template p,
  .article-template p:nth-child(odd),
  .article-template p:nth-last-child(-n + 2) {
    border-right: none;
    border-bottom: 1px solid var(--divider);
  }

  .article-template p:last-child {
    border-bottom: none;
  }
}

/* ---------- Narrow phones: the brand shortens to "Sufle" so the actions breathe ---------- */

@media (max-width: 26rem) {
  .brand-tail {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* ---------- Print (legal pages should print cleanly) ---------- */

@media print {
  body::before,
  body::after,
  .skip-link,
  .site-header,
  .site-footer,
  .app-banner,
  .article-toc,
  .article-cta,
  .breadcrumbs {
    display: none;
  }

  html,
  body {
    color: #000;
    background: #fff;
  }

  .legal-document {
    max-width: none;
    padding: 0;
    color: #000;
    background: #fff;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .legal-document h1,
  .legal-document h2,
  .legal-document h3 {
    color: #000;
  }

  .article-shell {
    width: auto;
    padding: 0;
  }

  .article-layout {
    display: block;
  }

  .article-header,
  .article-header h1,
  .article-deck,
  .article-body,
  .article-body h2,
  .article-body h3,
  .article-summary,
  .article-callout {
    color: #000;
    text-shadow: none;
  }

  .legal-document h1::after,
  .legal-document h2::before {
    display: none;
  }

  .legal-document a {
    color: #000;
  }

  .document-meta {
    padding: 0;
    color: #000;
    background: none;
    border: none;
  }

  .notice {
    background: none;
    border: 1px solid #000;
    border-left-width: 5px;
    color: #000;
    box-shadow: none;
  }

  .legal-document code {
    padding: 0;
    color: #000;
    background: none;
    border: none;
  }
}
