/*
 * Locaflip – website styles.
 * Logical properties (inline/block) throughout, so RTL (ar, he) needs no extra stylesheet.
 * Motion: everything that moves is wrapped in prefers-reduced-motion: no-preference, and content that is
 * hidden before a scroll reveal is hidden only when site.js has put the "js" class on <html>.
 */

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  /* Surfaces and text */
  --bg: #fbfbfd;
  --bg-alt: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --text: #0e141b;
  --text-2: #4f5966;
  --text-3: #8a93a0;
  --line: rgba(14, 20, 27, 0.08);
  --line-strong: rgba(14, 20, 27, 0.15);
  --input-bg: #ffffff;

  /* Accent – the teal of the app icon */
  --accent: #0a7c74;
  --accent-hover: #086860;
  --accent-bright: #12b3a4;
  --accent-text: #ffffff;
  --accent-soft: #e2f4f1;
  --accent-ring: rgba(18, 179, 164, 0.28);
  --accent-glow: rgba(18, 179, 164, 0.55);
  --danger: #b3261e;
  --danger-soft: #fdeeed;
  --danger-line: rgba(179, 38, 30, 0.22);
  --danger-ring: rgba(179, 38, 30, 0.18);
  --focus: #0a7c74;
  --grid-line: rgba(14, 20, 27, 0.045);
  --glow: rgba(18, 179, 164, 0.16);

  --shadow-sm: 0 1px 2px rgba(14, 20, 27, 0.05), 0 2px 8px -2px rgba(14, 20, 27, 0.06);
  --shadow-md: 0 1px 2px rgba(14, 20, 27, 0.05), 0 12px 32px -12px rgba(14, 20, 27, 0.14);
  --shadow-lg: 0 2px 4px rgba(14, 20, 27, 0.04), 0 24px 60px -20px rgba(14, 20, 27, 0.22);
  --shadow-button: 0 1px 2px rgba(6, 60, 55, 0.2), 0 8px 20px -8px rgba(10, 124, 116, 0.55);

  /* Illustration (hero scene) */
  --win-bg: #ffffff;
  --win-chrome: #f5f6f8;
  --win-sidebar: #f2f3f6;
  --win-line: #e2e5e9;
  --win-card: #ffffff;
  --win-edge: rgba(14, 20, 27, 0.1);
  --win-select: rgba(18, 179, 164, 0.14);
  --sk: #dde1e6;
  --sk-strong: #b9c0c9;
  --m-land: #f1efe9;
  --m-park: #d4ebcb;
  --m-water: #b4d9f1;
  --m-minor: #fbfaf7;
  --m-road: #ffffff;
  --m-casing: #dcd8cd;
  --route: #10b0a1;
  --route-done: #9fdad3;
  --route-casing: #ffffff;
  --ios-blue: #0a84ff;
  --phone-body: #17191d;
  --phone-rim: #3b4048;
  --phone-sheet: rgba(255, 255, 255, 0.97);
  --phone-ink: #1d1d1f;
  --cursor-fill: #111111;
  --cursor-edge: #ffffff;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", "Inter", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  --fs-h1: clamp(2.5rem, 1.35rem + 4.6vw, 4.75rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.5vw, 3.25rem);
  --fs-h3: 1.1875rem;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section-y: clamp(80px, 5rem + 4vw, 144px);

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Layout */
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d12;
    --bg-alt: #0f1319;
    --surface: #131820;
    --surface-2: #181e27;
    --text: #eef2f6;
    --text-2: #a0aab6;
    --text-3: #6d7784;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    --input-bg: #0f141b;

    --accent: #3fdccb;
    --accent-hover: #74e8db;
    --accent-bright: #3fdccb;
    --accent-text: #032521;
    --accent-soft: rgba(63, 220, 203, 0.12);
    --accent-ring: rgba(63, 220, 203, 0.3);
    --accent-glow: rgba(63, 220, 203, 0.75);
    --danger: #ff8f86;
    --danger-soft: rgba(255, 110, 100, 0.1);
    --danger-line: rgba(255, 143, 134, 0.28);
    --danger-ring: rgba(255, 143, 134, 0.2);
    --focus: #3fdccb;
    --grid-line: rgba(255, 255, 255, 0.045);
    --glow: rgba(63, 220, 203, 0.16);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 30px 70px -24px rgba(0, 0, 0, 0.75);
    --shadow-button: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(63, 220, 203, 0.45);

    --win-bg: #1a1e25;
    --win-chrome: #22272f;
    --win-sidebar: #1e232a;
    --win-line: #2e343d;
    --win-card: #272d36;
    --win-edge: rgba(255, 255, 255, 0.1);
    --win-select: rgba(63, 220, 203, 0.16);
    --sk: #363d47;
    --sk-strong: #525b67;
    --m-land: #1c2129;
    --m-park: #1d362c;
    --m-water: #173247;
    --m-minor: #262c35;
    --m-road: #37404c;
    --m-casing: #14181e;
    --route: #3fdccb;
    --route-done: #25615b;
    --route-casing: #0f2a28;
    --phone-body: #0b0d10;
    --phone-rim: #454c56;
    --phone-sheet: rgba(30, 35, 42, 0.97);
    --phone-ink: #f2f4f7;
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
  overflow-x: clip;
}

img,
svg { max-width: 100%; }

img { height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

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

::selection { background: var(--accent-ring); }

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 650;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -0.03em; font-weight: 700; }

h2 { font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.03em; font-weight: 680; }

h3 { font-size: var(--fs-h3); letter-spacing: -0.012em; line-height: 1.3; }

p,
ul,
ol,
dl { margin: 0 0 1em; }

p { text-wrap: pretty; }

strong { font-weight: 620; }

code,
kbd { font-family: var(--mono); font-size: 0.9em; }

kbd {
  padding: 0.05em 0.4em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-xs);
  background: var(--surface);
}

hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-7) 0; }

.container { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.narrow { max-width: calc(720px + 2 * var(--gutter)); }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { top: 12px; color: var(--accent-text); }

.muted { color: var(--text-2); }

.small { font-size: var(--fs-small); }

[hidden] { display: none !important; }

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

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

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-button);
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* A soft sheen sweeps across on hover. */
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.button:hover { background: var(--accent-hover); color: var(--accent-text); text-decoration: none; }

.button:active { transform: scale(0.97); transition-duration: 0.08s; }

.button:disabled,
.button[aria-disabled="true"] { cursor: progress; opacity: 0.72; transform: none; }

.button.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

.button.secondary::after { display: none; }

.button.secondary:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--text) 28%, transparent);
  color: var(--text);
}

.button.block { width: 100%; }

.button-lg { min-height: 52px; padding: 0 28px; font-size: 1.0625rem; }

.button-sm,
.button.small-btn { min-height: 36px; padding: 0 16px; font-size: 0.9375rem; gap: 8px; }

.icon-arrow { margin-inline-end: -4px; transition: transform 0.3s var(--ease-out); }

[dir="rtl"] .icon-arrow { transform: scaleX(-1); }

@media (prefers-reduced-motion: no-preference) {
  .button:not(:disabled):hover { transform: translateY(-1px); }

  .button:not(:disabled):active { transform: translateY(0) scale(0.97); }

  .button:hover::after { transform: translateX(120%); transition: transform 0.8s var(--ease-out); }

  .button:hover .icon-arrow { transform: translateX(3px); }

  [dir="rtl"] .button:hover .icon-arrow { transform: scaleX(-1) translateX(3px); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
  opacity: 0.9;
}

.spinner-lg { width: 26px; height: 26px; border-width: 2.5px; }

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

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header {
    background: color-mix(in srgb, var(--bg) 76%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

/* Transparent at the very top, frosted once the page scrolls (site.js toggles .is-scrolled). */
.js .site-header:not(.is-scrolled):not(.nav-open) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-bar { display: flex; align-items: center; gap: var(--s-5); min-height: var(--header-h); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 680;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  flex-shrink: 0;
}

.brand:hover { color: var(--text); }

.brand img { width: 30px; height: 30px; border-radius: 8px; transition: transform 0.4s var(--ease-spring); }

@media (prefers-reduced-motion: no-preference) {
  .brand:hover img { transform: rotate(-8deg) scale(1.06); }
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  flex: 1;
  min-width: 0;
}

.site-nav { margin-inline: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-pill);
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }

.site-nav a[aria-current="page"] { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-2);
}

.lang-switch .lang-icon { position: absolute; inset-inline-start: 10px; pointer-events: none; }

.lang-switch select {
  max-width: 10em;
  min-height: 34px;
  padding-block: 4px;
  padding-inline: 32px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-switch select option { background: var(--surface); color: var(--text); }

.lang-switch select:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }

.header-cta { flex-shrink: 0; }

/* Download is always available, with or without a key (config.js → downloadUrl). */
.header-download { flex-shrink: 0; gap: 7px; padding-inline: 14px; }

.header-download .icon { margin-inline-start: -2px; }

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  margin: auto;
}

.nav-toggle-bars span {
  position: absolute;
  inset-inline: 0;
  height: 1.75px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}

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

.nav-toggle-bars span:last-child { top: 8.5px; }

.nav-open .nav-toggle-bars span:first-child { top: 5.25px; transform: rotate(45deg); }

.nav-open .nav-toggle-bars span:last-child { top: 5.25px; transform: rotate(-45deg); }

@media (max-width: 1099px) {
  .header-cta { display: none; }

  /* Medium widths: icon only (the label stays for screen readers). */
  .header-download { width: 36px; padding: 0; }

  .header-download span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 899px) {
  /* Without JavaScript the navigation wraps onto a second row. */
  .header-bar { flex-wrap: wrap; row-gap: 0; padding-top: 8px; }

  .nav-panel { flex-basis: 100%; flex-wrap: wrap; padding-bottom: 10px; }

  .site-nav { margin-inline: 0; }

  .site-nav ul { flex-wrap: wrap; margin-inline: -12px; }

  .lang-switch { display: none; }

  /* With JavaScript: a menu button and a dropdown panel. */
  .js .header-bar { flex-wrap: nowrap; padding-top: 0; }

  .js .nav-toggle { display: grid; place-items: center; }

  .js .nav-panel {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-4);
    padding: var(--s-3) var(--gutter) var(--s-5);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
  }

  .js .nav-open .nav-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.35s var(--ease-out), visibility 0s;
  }

  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }

  .js .site-nav li + li { border-top: 1px solid var(--line); }

  .js .site-nav a { padding: 14px 4px; border-radius: 0; font-size: 1.0625rem; color: var(--text); }

  .js .site-nav a:hover,
  .js .site-nav a[aria-current="page"] { background: transparent; color: var(--accent); }

  .js .lang-switch { display: flex; }

  .js .lang-switch select { max-width: none; width: 100%; min-height: 44px; }

  .js .header-cta { display: inline-flex; min-height: 48px; }

  .header-download { width: auto; padding-inline: 16px; }

  .header-download span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }

  .js .header-download { min-height: 48px; }
}

/* Language suggestion (created by site.js on the English home page). */
.lang-banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 0.9375rem; }

.lang-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-block: 12px;
}

.lang-banner p { margin: 0; }

.lang-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Sections ---------- */

main { display: block; }

.section { position: relative; padding-block: var(--section-y); }

.section.alt { background: var(--bg-alt); }

.section-head { max-width: 700px; margin-bottom: clamp(40px, 5vw, 64px); }

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

.section-head h2 { margin-bottom: 0.4em; }

.section-head p { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.5; margin: 0; }

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

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

.hero {
  position: relative;
  padding-block: clamp(32px, 1rem + 3vw, 72px) clamp(64px, 6vw, 112px);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 62%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(75% 60% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(75% 60% at 50% 40%, #000 30%, transparent 80%);
}

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

.hero-icon { width: 96px; height: 96px; margin-bottom: 18px; filter: drop-shadow(0 14px 22px rgba(10, 60, 70, 0.3)); }

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.eyebrow-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-ring);
  flex-shrink: 0;
}

.hero h1 { max-width: 15ch; margin: 0 auto 22px; }

.hero .lead {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-note { color: var(--text-2); font-size: var(--fs-small); margin: 0; }

/* Muted detail inside a button ("macOS 14+"). */
.button-meta { color: var(--text-2); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; }

.hero-download .button-meta { padding-inline-start: 10px; border-inline-start: 1px solid var(--line-strong); }

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding-inline: 10px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-link:hover { color: var(--accent); }

.hero-link .icon { transition: transform 0.3s var(--ease-out); }

@media (prefers-reduced-motion: no-preference) {
  .hero-link:hover .icon { transform: translateY(2px); }
}

@media (max-width: 560px) {
  .hero-icon { width: 80px; height: 80px; margin-bottom: 14px; }

  .hero-actions { width: 100%; }

  .hero-actions .button { width: 100%; }

  .hero-link { min-height: 44px; }
}

/* Product visual */

.shot { margin: clamp(44px, 5vw, 72px) auto 0; max-width: var(--max); }

@media (max-width: 560px) {
  .shot { margin-inline: calc(8px - var(--gutter)); }
}

.shot figcaption { margin-top: 22px; color: var(--text-2); font-size: var(--fs-small); }

.shot-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--win-edge), var(--shadow-lg);
  background: var(--surface);
}

.shot-frame img { width: 100%; height: auto; }

/* ---- Hero scene (animated illustration, see initScene() in site.js) ---- */

.scene {
  position: relative;
  direction: ltr;
  aspect-ratio: 1200 / 800;
  width: 100%;
  margin-inline: auto;
  text-align: start;
}

.scene svg { display: block; width: 100%; height: auto; overflow: hidden; }

.scene-glow {
  position: absolute;
  inset: 12% 6% -4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(20px);
  pointer-events: none;
}

.scene-mac {
  position: absolute;
  left: 0.5%;
  top: 5%;
  width: 80%;
  border-radius: 1.46% / 2.26%;
  overflow: hidden;
  background: var(--win-bg);
  box-shadow:
    0 0 0 1px var(--win-edge),
    0 2px 4px rgba(10, 20, 30, 0.06),
    0 30px 80px -24px rgba(10, 30, 40, 0.38);
}

.scene-phone {
  position: absolute;
  left: 73.3%;
  top: 25%;
  width: 22.5%;
  border-radius: 17% / 8.2%;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 40px 70px -24px rgba(5, 15, 25, 0.55);
}

/* Colours of the illustration parts */
.win-bg { fill: var(--win-bg); }
.win-chrome { fill: var(--win-chrome); }
.win-sidebar { fill: var(--win-sidebar); }
.win-line { fill: none; stroke: var(--win-line); stroke-width: 1; }
.tl-close { fill: #ff5f57; }
.tl-min { fill: #febc2e; }
.tl-max { fill: #28c840; }
.sk { fill: var(--sk); }
.sk-strong { fill: var(--sk-strong); }
.sk-label { fill: var(--sk); opacity: 0.8; }
.sk-title { fill: var(--sk-strong); }
.sk-icon { fill: none; stroke: var(--sk-strong); stroke-width: 2; }
.sk-stroke { fill: none; stroke: var(--sk-strong); stroke-width: 2; stroke-linecap: round; }
.side-card { fill: var(--win-card); stroke: var(--win-line); }
.side-phone { fill: none; stroke: var(--sk-strong); stroke-width: 2; }
.side-status { fill: var(--route); }
.side-select { fill: var(--win-select); }
.side-list circle { fill: var(--sk); }
.side-list rect { fill: var(--sk); }
.side-list rect:nth-of-type(odd) { fill: var(--sk-strong); opacity: 0.7; }
.side-list circle:nth-of-type(2) { fill: var(--route); }
.side-glyph { fill: #ffffff; }
.side-seg { fill: var(--sk); opacity: 0.55; }
.side-seg-on { fill: var(--win-card); }
.side-hold { fill: var(--win-card); stroke: var(--win-line); }
.side-toggle { fill: var(--route); }
.side-toggle-knob { fill: #ffffff; }

.m-land { fill: var(--m-land); }
.m-park { fill: var(--m-park); }
.m-water { fill: var(--m-water); }
.m-river { fill: none; stroke: var(--m-water); stroke-width: 54; stroke-linecap: round; }
.m-minor { fill: none; stroke: var(--m-minor); stroke-width: 5; }
.m-casing { fill: none; stroke: var(--m-casing); stroke-width: 14; stroke-linecap: round; }
.m-road { fill: none; stroke: var(--m-road); stroke-width: 10; stroke-linecap: round; }

.route-casing { fill: none; stroke: var(--route-casing); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke: var(--route); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.route-done { fill: none; stroke: var(--route-done); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.route-start { fill: var(--win-bg); stroke: var(--route); stroke-width: 3.5; }
.dest-pin { fill: var(--route); stroke: var(--route-casing); stroke-width: 2; }
.dest-dot { fill: #ffffff; }
.dest-shadow { fill: #000000; opacity: 0.18; }
.click-ripple circle { fill: none; stroke: var(--route); stroke-width: 2.5; }
.puck-pulse { fill: var(--route); opacity: 0.2; }
.puck-ring { fill: #ffffff; }
.puck-core { fill: var(--route); }

.float rect:first-child,
.chip-bg,
.controls-bg { fill: var(--win-bg); stroke: var(--win-line); }

.float rect:first-child,
.chip-bg,
.controls-bg,
.phone-sheet { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08)); }

.chip-arrow { fill: var(--sk-strong); transition: fill 0.4s ease; }
.chip-track { fill: var(--sk); }
.chip-fill { fill: var(--route); }
.chip-end { fill: var(--sk); transition: fill 0.4s ease; }
.chip-check { fill: none; stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 14; stroke-dashoffset: 14; }
.scene[data-state="playing"] .chip-arrow,
.scene[data-state="set"] .chip-arrow { fill: var(--route); }
.scene[data-state="set"] .chip-end { fill: var(--route); }
.scene[data-state="set"] .chip-check { stroke-dashoffset: 0; transition: stroke-dashoffset 0.45s var(--ease-out) 0.1s; }

.ctl-hit { fill: transparent; }
.ctl-glyph { fill: none; stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctl-play-bg { fill: var(--route); }
.ctl-play-glyph { fill: #ffffff; }
.ctl { transform-box: fill-box; transform-origin: center; transition: transform 0.18s var(--ease-out); }
.ctl.is-pressed { transform: scale(0.86); }

.cursor path { fill: var(--cursor-fill); stroke: var(--cursor-edge); stroke-width: 1.4; stroke-linejoin: round; }
.scene:not(.is-live) :is(.cursor, .click-ripple) { visibility: hidden; }

.phone-body { fill: var(--phone-body); }
.phone-rim { fill: none; stroke: var(--phone-rim); stroke-width: 1.5; }
.phone-island { fill: #000000; }
.phone-fade-a { stop-color: var(--m-land); stop-opacity: 0.95; }
.phone-fade-b { stop-color: var(--m-land); stop-opacity: 0; }
.phone-time,
.phone-status rect { fill: var(--phone-ink); }
.phone-status .phone-batt { fill: none; stroke: var(--phone-ink); stroke-width: 1.2; opacity: 0.5; }
.ios-arrow { fill: var(--ios-blue); opacity: 0; transition: opacity 0.4s ease; }
.scene[data-state="playing"] .ios-arrow,
.scene[data-state="set"] .ios-arrow { opacity: 1; }
.ios-pulse { fill: var(--ios-blue); opacity: 0.16; }
.ios-halo { fill: #ffffff; }
.ios-dot { fill: var(--ios-blue); }
.phone-sheet { fill: var(--phone-sheet); }
.sheet-grabber { fill: var(--sk-strong); opacity: 0.6; }
.sheet-icon { fill: var(--route); }
.sheet-icon-glyph { fill: #ffffff; }
.sheet-btn { fill: var(--sk); opacity: 0.6; }
.phone-home { fill: var(--phone-ink); opacity: 0.8; }

/* Ambient pulses (location dot, moving puck) */
.ios-pulse,
.puck-pulse { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  .ios-pulse { animation: dot-pulse 2.4s var(--ease-out) infinite; }

  .puck-pulse { animation: dot-pulse 2.4s var(--ease-out) 0.6s infinite; }

  .scene[data-state="set"] .chip-end { animation: pop 0.5s var(--ease-spring); }
}

@keyframes dot-pulse {
  0% { transform: scale(0.5); opacity: 0.35; }
  70%,
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes pop {
  0% { transform: scale(0.6); }
  100% { transform: none; }
}

.chip-end { transform-box: fill-box; transform-origin: center; }

/* Hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 0.9s var(--ease-out) both; }

  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
  .hero-copy > :nth-child(6) { animation-delay: 0.3s; }

  .hero-icon {
    animation:
      rise 0.9s var(--ease-out) both,
      hover 7s ease-in-out 1s infinite;
  }

  .shot { animation: rise-far 1.3s var(--ease-out) 0.3s both; }

  .scene-phone { animation: phone-in 1.3s var(--ease-out) 0.65s both; }

  .scene-glow { animation: fade-in 2s ease 0.6s both; }
}

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

@keyframes rise-far {
  from { opacity: 0; transform: translateY(56px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes phone-in {
  from { opacity: 0; transform: translate(12%, 10%) rotate(4deg); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hover {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Scroll-linked: the product visual settles from a slight tilt as it scrolls into view (where supported). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .scene { animation: settle linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  }
}

@keyframes settle {
  from { transform: perspective(1800px) rotateX(12deg) scale(0.95); }
  to { transform: none; }
}

/* ---------- Who it's for ---------- */

.audience { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }

.audience-item { padding-top: 28px; border-top: 1px solid var(--line-strong); }

.audience-item h3 { margin-bottom: 10px; }

.audience-item p { color: var(--text-2); margin: 0; }

.tile-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

@media (max-width: 800px) {
  .audience { grid-template-columns: 1fr; gap: 0; }

  .audience-item { padding-block: 28px; }
}

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

.steps {
  --steps-gap: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--steps-gap);
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(40px, 5vw, 64px);
}

.step { position: relative; }

.step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Markers light up as the progress line reaches them (site.js adds .is-tracking); otherwise all are lit. */
.step-marker {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-sm);
}

.steps.is-tracking .step:not(.is-active) .step-marker {
  color: var(--text-2);
  border-color: var(--line-strong);
  box-shadow: 0 0 0 0 var(--accent-soft), var(--shadow-sm);
}

.step-line {
  position: absolute;
  top: 27px;
  inset-inline-start: 72px;
  width: calc(100% + var(--steps-gap) - 88px);
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
  overflow: hidden;
}

.step-line-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-bright), var(--accent));
  transform: scaleX(var(--seg, 1));
  transform-origin: left center;
}

[dir="rtl"] .step-line-fill { transform-origin: right center; background: linear-gradient(270deg, var(--accent-bright), var(--accent)); }

.step h3 { margin-bottom: 10px; }

.step p { color: var(--text-2); margin: 0; }

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }

  .step { padding-inline-start: 76px; min-height: 56px; }

  .step-marker { position: absolute; inset-inline-start: 0; top: 0; margin: 0; }

  .step-line { top: 64px; inset-inline-start: 27px; width: 2px; height: calc(100% - 72px + 36px); }

  .step-line-fill { transform: scaleY(var(--seg, 1)); transform-origin: center top; }

  [dir="rtl"] .step-line-fill { transform-origin: center top; }

  .step-line-fill,
  [dir="rtl"] .step-line-fill { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
}

.callout {
  padding: 18px 22px;
  border-inline-start: 3px solid var(--accent-bright);
  background: var(--accent-soft);
  border-start-end-radius: var(--r-sm);
  border-end-end-radius: var(--r-sm);
}

.callout p:last-child { margin-bottom: 0; }

.callout-reset {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 820px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.callout-reset p { margin: 0; color: var(--text-2); }

.callout-reset strong { color: var(--text); }

.callout-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .callout-reset:hover .callout-icon .icon { transform: rotate(-300deg); transition: transform 0.9s var(--ease-out); }
}

/* ---------- Features (bento) ---------- */

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }

.card {
  position: relative;
  grid-column: span 3;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.4s ease;
}

.card-wide { grid-column: span 6; }

/* Soft spotlight that follows the pointer (position set by site.js). */
.card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -200px;
  left: -200px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0;
  transform: translate(var(--mx, -999px), var(--my, -999px));
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); box-shadow: var(--shadow-md); }

.card:hover::before { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-4px); }
}

.card h3 { margin-bottom: 14px; }

.card ul { list-style: none; padding: 0; margin: 0; }

.card li { margin-bottom: 10px; color: var(--text-2); font-size: 0.96875rem; line-height: 1.5; }

.card li:last-child { margin-bottom: 0; }

.card li strong { color: var(--text); }

.card-art {
  display: block;
  width: calc(100% + 56px);
  max-width: none;
  height: 128px;
  margin: -28px -28px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}

.art-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.art-road { fill: none; stroke: var(--line-strong); stroke-width: 8; stroke-linecap: round; }
.art-road-thin { stroke-width: 4; opacity: 0.7; }
.art-shadow { fill: var(--text); opacity: 0.12; }
.art-pin-shape { fill: var(--accent-bright); }
.art-pin-dot { fill: #ffffff; }
.art-route-line { fill: none; stroke: var(--accent-bright); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 0; }
.art-route-a { fill: var(--surface); stroke: var(--accent-bright); stroke-width: 3; }
.art-route-b { fill: var(--accent-bright); }

.art-pin-drop { transform-box: fill-box; transform-origin: 50% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .art-route-line { transition: stroke-dashoffset 1.6s var(--ease-in-out) 0.3s; }

  .js [data-reveal]:not(.is-revealed) .art-route-line { stroke-dashoffset: 520; }

  .js [data-reveal]:not(.is-revealed) .art-pin-drop { opacity: 0; transform: translateY(-24px); }

  .art-pin-drop { transition: transform 0.7s var(--ease-spring) 0.35s, opacity 0.3s ease 0.35s; }

  .card:hover .art-pin-drop { animation: bob 0.9s var(--ease-out); }

  .card:hover .art-route-b { animation: beacon 1.2s var(--ease-out); }

  .art-route-b { transform-box: fill-box; transform-origin: center; }
}

@keyframes bob {
  0%,
  100% { transform: none; }
  40% { transform: translateY(-9px); }
}

@keyframes beacon {
  0%,
  100% { transform: none; }
  40% { transform: scale(1.5); }
}

@media (max-width: 1023px) {
  .card,
  .card-wide { grid-column: span 6; }
}

@media (max-width: 640px) {
  .card,
  .card-wide { grid-column: 1 / -1; padding: 24px; }

  .card-art { width: calc(100% + 48px); margin: -24px -24px 22px; }
}

/* ---------- Requirements ---------- */

.spec { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }

.spec > div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 18px;
  align-content: start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.spec-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.spec dt {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.3;
  margin: 2px 0 4px;
}

.spec dd { margin: 0; color: var(--text-2); font-size: 0.96875rem; line-height: 1.5; }

@media (max-width: 720px) {
  .spec { grid-template-columns: 1fr; }

  .spec > div { padding: 20px; }
}

/* ---------- Pricing ---------- */

.section-pricing { overflow: hidden; isolation: isolate; }

.section-pricing::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 30% 10% 0;
  background: radial-gradient(40% 45% at 50% 45%, var(--glow), transparent 70%);
  pointer-events: none;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 860px;
  margin-inline: auto;
}

/* Only the monthly plan is on sale (no yearly price in config.js). */
.plans.single { grid-template-columns: minmax(0, 440px); justify-content: center; }

.plan {
  position: relative;
  display: flex;
  border-radius: var(--r-xl);
  background: var(--line-strong);
  padding: 1px;
  isolation: isolate;
  overflow: hidden;
}

.plan-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(28px, 4vw, 40px);
  border-radius: calc(var(--r-xl) - 1px);
  background: var(--surface);
}

.plan.featured {
  background: color-mix(in srgb, var(--accent-bright) 22%, var(--line-strong));
  box-shadow: 0 30px 80px -32px color-mix(in srgb, var(--accent-bright) 55%, transparent), var(--shadow-md);
}

.plan.featured .plan-inner {
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent-bright) 9%, transparent), transparent 60%),
    var(--surface);
}

/* A slow light that travels around the border of the recommended plan. */
.plan.featured::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 180%;
  aspect-ratio: 1;
  background: conic-gradient(from 0deg, transparent 0 55%, var(--accent-glow) 70%, transparent 85%);
  transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
  .plan.featured::before { animation: orbit 7s linear infinite; }
}

@keyframes orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.plan-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 6px;
  font-family: var(--font-display);
  line-height: 1;
}

.price .amount {
  font-size: clamp(3.25rem, 2.4rem + 3vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.price .per { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; color: var(--text-2); }

.plan-sub { color: var(--text-2); font-size: 0.9375rem; margin-bottom: 26px; }

.plan ul {
  list-style: none;
  padding: 24px 0 0;
  margin: 0 0 30px;
  border-top: 1px solid var(--line);
  flex-grow: 1;
}

.plan ul > li { position: relative; padding-inline-start: 32px; margin-bottom: 12px; font-size: 0.99rem; }

.plan ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.12em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.plan ul > li::after {
  content: "";
  position: absolute;
  inset-inline-start: 6.5px;
  top: calc(0.12em + 6px);
  width: 7px;
  height: 4px;
  border-left: 1.75px solid var(--accent);
  border-bottom: 1.75px solid var(--accent);
  transform: rotate(-45deg);
}

.pricing-foot {
  max-width: 640px;
  margin: 36px auto 0;
  color: var(--text-2);
  font-size: var(--fs-small);
  line-height: 1.55;
  text-align: center;
}

.pricing-foot p { margin-bottom: 0.8em; }

.pricing-foot .pricing-existing { margin-top: 1.4em; font-size: 0.9375rem; color: var(--text); }

#checkout-error { max-width: 440px; margin-inline: auto; }

@media (max-width: 700px) {
  .plans { grid-template-columns: 1fr; }
}

/* ---------- Free beta signup (mode "beta": replaces the pricing cards, same premium card) ---------- */

.plans.plans-beta { grid-template-columns: minmax(0, 560px); }

/* The card grows when the key appears – a larger orbit square keeps the border light going all the way round. */
.plan-beta.featured::before { width: max(320%, 1600px); }

/* Not a scroll container: moving focus to the result heading must never scroll the card's contents sideways. */
.plan-beta { overflow: clip; }

.plan-beta .price .amount { font-size: clamp(2.75rem, 2rem + 2.6vw, 3.75rem); letter-spacing: -0.04em; }

.plan-beta .price .per { font-size: 1rem; }

.beta-form .field { margin-bottom: 14px; }

.beta-form .alert { margin-top: 14px; }

.beta-legal { margin: 16px 0 0; color: var(--text-2); font-size: 0.8125rem; line-height: 1.55; }

.beta-legal a,
.beta-form .alert a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

.beta-legal a:hover,
.beta-form .alert a:hover { color: var(--accent); }

.beta-intro { transition: opacity 0.24s ease, transform 0.24s var(--ease-in-out); }

.beta-intro.is-leaving { opacity: 0; transform: translateY(-10px); }

.beta-result .done-check { width: 56px; height: 56px; margin-bottom: 20px; }

.beta-result-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); letter-spacing: -0.025em; margin-bottom: 0.35em; }

.beta-result-title:focus { outline: none; }

.beta-result-lead { color: var(--text-2); margin-bottom: 20px; }

.beta-result-lead strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }

.beta-result .key-box { margin-top: 0; padding: 20px; }

.beta-result .license-key { font-size: clamp(0.8125rem, 0.45rem + 1.4vw, 1.15rem); }

.copy-status { min-height: 1.5em; margin-bottom: 12px; }

.beta-download { gap: 10px; padding-inline: 20px; text-align: center; }

/* Phones: the whole key (29 characters) stays on one line. */
@media (max-width: 480px) {
  .beta-result .key-box { padding: 16px; }

  .beta-result .license-key { letter-spacing: 0.01em; }
}

.beta-result .next-steps { margin-top: 28px; }

.beta-result .next-steps > li { padding-block: 18px; }

.beta-result .next-steps > li::before { top: 16px; }

.next-steps :is(h3, h4) { margin-bottom: 6px; }

.beta-keep { margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  .beta-result-title,
  .beta-result-lead { animation: rise 0.7s var(--ease-out) both; }

  .beta-result-title { animation-delay: 0.15s; }

  .beta-result-lead { animation-delay: 0.25s; }

  .beta-download { animation: rise 0.7s var(--ease-out) 0.45s both; }

  .beta-keep { animation: rise 0.7s var(--ease-out) 0.8s both; }

  .button.is-copied { animation: copied 0.5s var(--ease-spring); }
}

@keyframes copied {
  0% { transform: scale(0.92); }
  100% { transform: none; }
}

/* Download without a key, below the signup form. */
.beta-alt { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }

.beta-alt .button { min-height: 48px; }

.beta-alt-note { margin: 10px 0 0; color: var(--text-2); font-size: 0.8125rem; text-align: center; }

/* Account page in beta mode: nothing to manage, a pointer to Lost license key. */
.beta-account { max-width: 520px; }

.beta-account p { margin-bottom: 18px; }

.beta-account p:last-child { margin-bottom: 0; }

/* ---------- Alerts ---------- */

.alert {
  position: relative;
  margin: 16px 0 0;
  padding: 13px 16px 13px 44px;
  padding-inline: 44px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.alert::before {
  content: "";
  position: absolute;
  inset-inline-start: 15px;
  top: 14px;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--alert-icon) center / contain no-repeat;
  mask: var(--alert-icon) center / contain no-repeat;
}

.alert.error {
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E");
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

.alert.info {
  --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.3 2.7 2.7L16 9.5'/%3E%3C/svg%3E");
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
}

.alert.info::before { color: var(--accent); background: var(--accent); }

.alert p { margin: 0 0 0.4em; }

.alert p:last-child { margin-bottom: 0; }

.alert:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .alert { animation: alert-in 0.4s var(--ease-out); }
}

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

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

.faq-layout { display: grid; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 960px) {
  .faq-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; align-items: start; }

  .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

.faq { border-top: 1px solid var(--line-strong); }

.faq details { border-bottom: 1px solid var(--line-strong); }

.faq summary {
  position: relative;
  display: block;
  padding-block: 22px;
  padding-inline: 0 48px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  border-radius: var(--r-xs);
  transition: color 0.2s ease;
}

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

.faq summary:hover { color: var(--accent); }

/* Plus sign that turns into a cross. */
.faq summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 11px 1.75px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.75px 11px no-repeat,
    var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-2);
  transition: transform 0.35s var(--ease-out);
}

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

.faq .answer { padding: 0 48px 24px 0; padding-inline: 0 48px; color: var(--text-2); }

.faq details.is-animating .answer { overflow: hidden; }

.faq details.is-closing > summary::after { transform: none; }

.faq .answer p:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .faq .answer { padding-inline-end: 0; }
}

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

.site-footer { padding: 64px 0 48px; border-top: 1px solid var(--line); color: var(--text-2); font-size: var(--fs-small); }

.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }

.footer-grid h2 {
  margin-bottom: 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }

.footer-grid li { margin-bottom: 10px; }

.site-footer a { color: var(--text-2); text-decoration: none; transition: color 0.2s ease; }

.site-footer a:hover,
.site-footer .brand { color: var(--text); }

.footer-brand p { max-width: 290px; margin-top: 14px; line-height: 1.55; }

.footer-note { max-width: 260px; margin: 14px 0 0; font-size: 0.8125rem; color: var(--text-2); }

.lang-picker { margin-bottom: 28px; padding-top: 24px; border-top: 1px solid var(--line); }

.lang-picker summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--text-2);
  list-style: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lang-picker summary::-webkit-details-marker { display: none; }

.lang-picker summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-inline-start: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.lang-picker[open] summary::after { transform: translateY(1px) rotate(-135deg); }

.lang-picker summary:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }

.lang-icon { flex-shrink: 0; }

.lang-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px 24px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.lang-list a[aria-current="true"] { color: var(--accent); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .lang-picker[open] .lang-list { animation: rise 0.45s var(--ease-out); }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.8125rem;
}

.footer-bottom p { margin: 0; }

.footer-bottom a { color: var(--text-2); }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 340px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Secondary pages ---------- */

.page { position: relative; isolation: isolate; padding-block: clamp(48px, 3rem + 4vw, 104px) clamp(80px, 8vw, 128px); }

.page::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 460px;
  background:
    radial-gradient(50% 70% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
  pointer-events: none;
}

.page-head { margin-bottom: clamp(32px, 4vw, 48px); }

.page-head h1 { font-size: clamp(2.25rem, 1.55rem + 2.6vw, 3.4rem); letter-spacing: -0.032em; margin-bottom: 0.35em; }

.page-head .lead {
  color: var(--text-2);
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 640px;
  margin: 0;
}

.page-icon,
.state-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 26px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  box-shadow: var(--shadow-md);
}

.state-icon-error { color: var(--danger); }

.state-icon-loading { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .page-icon,
  .page-head,
  .page .panel,
  .doc > .toc,
  .doc > .prose,
  .center-page > * { animation: rise 0.8s var(--ease-out) both; }

  .page-head { animation-delay: 0.05s; }
  .page .panel,
  .doc > .toc { animation-delay: 0.12s; }
  .doc > .prose { animation-delay: 0.18s; }
}

/* Article typography (help, support, legal) */

.prose { max-width: 68ch; }

.prose h2 {
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  letter-spacing: -0.022em;
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 { font-size: 1.125rem; margin-top: 2em; }

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

.prose p,
.prose li { color: var(--text); line-height: 1.7; }

.prose ul,
.prose ol { padding-inline-start: 0; list-style: none; }

.prose li { position: relative; margin-bottom: 0.55em; padding-inline-start: 1.6em; }

.prose ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.35em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
}

.prose ol { counter-reset: prose-ol; }

.prose ol > li { counter-increment: prose-ol; padding-inline-start: 2.4em; }

.prose ol > li::before {
  content: counter(prose-ol);
  position: absolute;
  inset-inline-start: 0;
  top: 0.2em;
  display: grid;
  place-items: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85em;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.prose .callout {
  margin: 1.4em 0;
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-inline-start: 3px solid var(--accent-bright);
  border-radius: var(--r-md);
  color: var(--text);
}

.prose strong { color: var(--text); }

.path { font-weight: 600; }

/* Help and legal: sticky table of contents beside the article on wide screens. */

.doc { max-width: calc(1040px + 2 * var(--gutter)); }

.toc {
  margin: 0 0 40px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 0.9375rem;
}

.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }

.toc li { counter-increment: toc; margin: 0; }

.toc a {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc a::before { content: counter(toc); min-width: 1.4em; color: var(--text-3); font-variant-numeric: tabular-nums; }

.toc a:hover,
.toc a.is-active { color: var(--accent); }

@media (min-width: 1024px) {
  .doc { display: grid; grid-template-columns: 232px minmax(0, 720px); column-gap: 72px; justify-content: center; }

  .doc > * { grid-column: 2; }

  .doc > .toc {
    grid-column: 1;
    grid-row: 1 / span 12;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin: 0;
    padding: 4px 0;
    border: 0;
    border-inline-start: 1px solid var(--line-strong);
    border-radius: 0;
    background: transparent;
    font-size: 0.875rem;
  }

  .doc > .toc a { position: relative; padding: 7px 0; padding-inline-start: 18px; }

  .doc > .toc a::after {
    content: "";
    position: absolute;
    inset-inline-start: -1px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out);
  }

  .doc > .toc a.is-active::after { opacity: 1; transform: none; }
}

/* Legal */

.legal-draft-note {
  margin: 0 0 32px;
  padding: 10px 14px;
  border: 1px dashed var(--danger);
  border-radius: var(--r-sm);
  color: var(--danger);
  font-size: var(--fs-small);
}

/* Add class "legal-final" to <body> to hide the draft notice. */
.legal-final .legal-draft-note { display: none; }

.legal-meta { color: var(--text-2); font-size: 0.9375rem; }

.placeholder { padding: 0 0.25em; border-radius: 4px; background: var(--accent-soft); }

.doc-legal .prose h2 { font-size: clamp(1.25rem, 1.12rem + 0.5vw, 1.45rem); }

/* ---------- Guides (articles, index, home block) ---------- */

.breadcrumb { margin-bottom: 22px; color: var(--text-2); font-size: var(--fs-small); }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }

.breadcrumb li { display: flex; gap: 8px; min-width: 0; }

.breadcrumb li + li::before { content: "/"; color: var(--text-3); }

.breadcrumb a { color: var(--text-2); text-decoration: none; }

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb [aria-current="page"] { color: var(--text-3); }

.doc-guide .page-head h1 { font-size: clamp(2rem, 1.45rem + 2.2vw, 3rem); overflow-wrap: break-word; }

.guide-meta { margin: 18px 0 0; color: var(--text-2); font-size: var(--fs-small); }

.takeaways {
  margin: 0 0 40px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}

.takeaways h2 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.takeaways ul { margin: 0; padding: 0; list-style: none; }

.takeaways li { position: relative; margin-bottom: 8px; padding-inline-start: 1.5em; line-height: 1.6; }

.takeaways li:last-child { margin-bottom: 0; }

.takeaways li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.3em;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
}

@media (prefers-reduced-motion: no-preference) {
  .doc > .takeaways,
  .guides-index > .guide-cards { animation: rise 0.8s var(--ease-out) 0.14s both; }
}

.doc-guide .prose { overflow-wrap: break-word; }

.doc-guide .prose h2 { margin-top: 2.2em; }

.doc-guide .prose h3 { scroll-margin-top: calc(var(--header-h) + 24px); }

.doc-guide .prose .note {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-inline-start: 3px solid var(--line-strong);
  border-start-end-radius: var(--r-sm);
  border-end-end-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.96875rem;
}

.doc-guide .prose .note p:last-child { margin-bottom: 0; }

.doc-guide .prose .sources li { color: var(--text-2); font-size: 0.96875rem; }

.guide-faq h3 { margin-top: 1.6em; }

.guide-faq h3:first-child { margin-top: 0; }

/* Product card at the end of the guides that are about changing location. */
.guide-cta {
  display: flex;
  gap: 20px;
  max-width: 68ch;
  margin-top: 56px;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.guide-cta img { flex-shrink: 0; width: 56px; height: 56px; }

.guide-cta-copy { min-width: 0; }

.guide-cta h2 { margin: 0 0 8px; font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.2; }

.guide-cta p { margin: 0 0 18px; color: var(--text-2); }

.guide-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 16px; }

.guide-cta .guide-cta-note { margin: 0; color: var(--text-3); font-size: 0.8125rem; line-height: 1.5; }

@media (max-width: 560px) {
  .guide-cta { flex-direction: column; gap: 14px; }
}

.guide-related { max-width: 68ch; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-strong); }

.guide-related h2 { margin: 0 0 14px; font-size: 1.125rem; letter-spacing: -0.012em; line-height: 1.3; }

.guide-related ul { margin: 0; padding: 0; list-style: none; }

.guide-related li { margin-bottom: 10px; }

.guide-about { max-width: 68ch; margin: 40px 0 0; color: var(--text-3); font-size: var(--fs-small); }

.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  text-decoration: none;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.4s ease;
}

.guide-card:hover { border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); box-shadow: var(--shadow-md); color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .guide-card:hover { transform: translateY(-4px); }

  .guide-card:hover .guide-card-more .icon { transform: translateX(3px); }

  [dir="rtl"] .guide-card:hover .guide-card-more .icon { transform: scaleX(-1) translateX(3px); }
}

.guide-card :is(h2, h3) { margin: 0; font-size: var(--fs-h3); letter-spacing: -0.012em; line-height: 1.3; font-weight: 650; overflow-wrap: break-word; }

.guide-card p { margin: 0; color: var(--text-2); font-size: 0.96875rem; line-height: 1.5; }

.guide-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.guide-card-more .icon { transition: transform 0.3s var(--ease-out); }

[dir="rtl"] .guide-card-more .icon,
[dir="rtl"] .icon-forward { transform: scaleX(-1); }

.guide-all { margin: 20px 0 0; }

.guide-all .hero-link { padding-inline: 0; color: var(--accent); }

.guide-all .hero-link:hover .icon { transform: translateX(3px); }

[dir="rtl"] .guide-all .hero-link:hover .icon { transform: scaleX(-1) translateX(3px); }

.guides-index { max-width: calc(1040px + 2 * var(--gutter)); }

@media (max-width: 899px) {
  .guide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .guide-cards { grid-template-columns: minmax(0, 1fr); }

  .guide-card { padding: 22px; }
}

/* Forms (account, recover) */

.form { max-width: 520px; }

.panel {
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.panel .button { width: 100%; min-height: 50px; }

.field { margin-bottom: 20px; }

.field label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9375rem; }

.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.field input::placeholder { color: var(--text-3); opacity: 1; }

.field input:hover { border-color: color-mix(in srgb, var(--text) 32%, transparent); }

.field input.mono { font-family: var(--mono); font-size: 0.97rem; letter-spacing: 0.03em; }

.field input:focus-visible,
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }

.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-ring); }

@media (prefers-reduced-motion: no-preference) {
  .field input[aria-invalid="true"] { animation: shake 0.4s var(--ease-out); }
}

@keyframes shake {
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.field .hint { margin: 8px 0 0; color: var(--text-2); font-size: var(--fs-small); }

.page hr { margin: 40px 0 28px; }

.alert-done { max-width: 520px; padding-block: 20px; font-size: 1rem; }

.alert-done::before { top: 21px; }

.alert-done:focus { outline: none; }

/* Order complete */

.status-block { color: var(--text-2); font-size: var(--fs-lead); line-height: 1.5; margin: 0; }

.done-check { display: block; width: 64px; height: 64px; margin-bottom: 26px; }

.done-check-ring { fill: var(--accent-soft); stroke: var(--accent-bright); stroke-width: 2.5; }

.done-check-mark {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: no-preference) {
  .done-check { animation: pop 0.6s var(--ease-spring) both; }

  .done-check-ring {
    stroke-dasharray: 183;
    stroke-dashoffset: 183;
    animation: draw 0.8s var(--ease-out) 0.1s forwards;
    transform: rotate(-90deg);
    transform-origin: center;
  }

  .done-check-mark { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw 0.5s var(--ease-out) 0.55s forwards; }

  .key-box { animation: rise 0.8s var(--ease-out) 0.35s both; }

  .key-box::after { animation: sheen 1.4s var(--ease-out) 1s both; }

  .next-steps > li { animation: rise 0.7s var(--ease-out) both; }

  .next-steps > li:nth-child(1) { animation-delay: 0.5s; }
  .next-steps > li:nth-child(2) { animation-delay: 0.6s; }
  .next-steps > li:nth-child(3) { animation-delay: 0.7s; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.key-box {
  position: relative;
  margin: 8px 0 12px;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line-strong));
  border-radius: var(--r-lg);
  background:
    radial-gradient(90% 120% at 0% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  box-shadow: 0 24px 60px -30px color-mix(in srgb, var(--accent-bright) 60%, transparent), var(--shadow-sm);
  overflow: hidden;
}

.key-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%);
  transform: translateX(-100%);
  pointer-events: none;
}

.key-label {
  display: block;
  margin-bottom: 12px;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
}

.key-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.license-key {
  font-family: var(--mono);
  font-size: clamp(0.875rem, 0.4rem + 2.4vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.next-steps { list-style: none; padding: 0; margin: 36px 0 0; counter-reset: ns; }

.next-steps > li {
  counter-increment: ns;
  position: relative;
  padding-block: 22px;
  padding-inline: 52px 0;
  border-top: 1px solid var(--line);
}

.next-steps > li::before {
  content: counter(ns);
  position: absolute;
  inset-inline-start: 0;
  top: 20px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.next-steps h2 { margin-bottom: 6px; }

.next-steps p { margin: 0 0 12px; color: var(--text-2); }

.next-steps p:last-child { margin-bottom: 0; }

/* 404 */

.center-page { text-align: center; }

.center-page .page-head .lead { margin-inline: auto; }

.lost-art { display: block; width: 240px; height: auto; margin: 0 auto 32px; }

.lost-art .art-grid { stroke: var(--line-strong); }

.lost-path {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 9;
}

.lost-start { fill: var(--surface); stroke: var(--accent-bright); stroke-width: 3; }

.lost-pin path { fill: var(--text-3); }

.lost-pin circle { fill: var(--bg); }

.lost-pin { transform-box: fill-box; transform-origin: 50% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .lost-path { animation: march 1.6s linear infinite; }

  .lost-pin { animation: wobble 3.2s ease-in-out infinite; }
}

@keyframes march {
  to { stroke-dashoffset: -22; }
}

@keyframes wobble {
  0%,
  100% { transform: rotate(0); }
  25% { transform: rotate(-9deg); }
  75% { transform: rotate(9deg); }
}

.h3 { font-size: var(--fs-h3); letter-spacing: -0.012em; }

/* Headings that receive focus from a script need no visible ring. */
h1[tabindex="-1"]:focus { outline: none; }

#checkout-result { min-height: 45vh; }

/* ---------- Install page (/install/) – also inlined into the DMG's offline guide by tools/make-install-html.mjs ---------- */

.install { max-width: calc(860px + 2 * var(--gutter)); }

.install-head .install-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  filter: drop-shadow(0 10px 22px rgba(14, 20, 27, 0.18));
}

.install-head .lead { max-width: 660px; }

.install-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 clamp(40px, 5vw, 64px);
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.install-download .install-auto { flex-basis: 100%; margin: 0; }

.install-download-meta { margin: 0; color: var(--text-2); font-size: var(--fs-small); }

.install-section { margin-top: clamp(40px, 5vw, 64px); }

.install-section > h2 {
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.85rem);
  letter-spacing: -0.022em;
  margin-bottom: 0.35em;
}

.install-hint,
.install-note { color: var(--text-2); font-size: 0.9375rem; }

.install-hint { margin-bottom: 8px; }

.install-note { margin-top: 0.8em; }

.install-hint strong,
.install-note strong { color: var(--text); }

/* Numbered steps: text on one side, a small drawing of the macOS window on the other. */

.install-steps { margin: 0; padding: 0; list-style: none; counter-reset: install-step; }

.install-step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px 40px;
  padding-block: 28px;
  padding-inline-start: 52px;
  border-top: 1px solid var(--line);
  counter-increment: install-step;
}

.install-step::before {
  content: counter(install-step);
  position: absolute;
  inset-inline-start: 0;
  top: 26px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 680;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.install-step-last::before {
  content: "";
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.6 3.6 7.4-8'/%3E%3C/svg%3E") center / 18px no-repeat,
    var(--accent-bright);
}

.install-step h3 { margin: 4px 0 0.45em; font-size: 1.1875rem; }

.install-step-copy p { margin-bottom: 0.7em; line-height: 1.65; }

.install-step-copy p:last-child { margin-bottom: 0; }

.install-steps-compact .install-step { padding-block: 18px; }

.install-steps-compact .install-step::before { top: 16px; width: 30px; height: 30px; font-size: 0.875rem; }

.install-steps-compact .install-step-copy { padding-top: 2px; }

@media (min-width: 820px) {
  .install-step { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; }

  .install-step-copy:only-child { grid-column: 1 / -1; }
}

/* The drawings. Text comes from install.art.* (Apple's wording); they are aria-hidden. */

.mac-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 26px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(80% 70% at 50% 0%, var(--glow), transparent 70%),
    var(--bg-alt);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.3;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
}

.mac-art img { display: block; }

.mac-window {
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--win-edge);
  border-radius: 12px;
  background: var(--win-bg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mac-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  height: 28px;
  padding-inline: 10px;
  border-bottom: 1px solid var(--win-line);
  background: var(--win-chrome);
}

.mac-title {
  position: absolute;
  inset-inline: 70px;
  text-align: center;
  font-weight: 600;
  color: var(--text-2);
}

.mac-lights { display: inline-flex; gap: 6px; }

.mac-lights i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }

.mac-lights i:nth-child(2) { background: #febc2e; }

.mac-lights i:nth-child(3) { background: #28c840; }

.mac-dmg-body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 6px;
  padding: 24px 14px 20px;
}

.mac-file { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }

.mac-file-icon { width: 54px; height: 54px; }

.mac-file-name {
  max-width: 96px;
  padding: 1px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mac-file-name.is-selected { background: var(--ios-blue); color: #fff; }

.mac-folder-back { fill: #4aa8f2; }

.mac-folder-front { fill: #7cc3fa; }

.mac-folder-glyph { fill: none; stroke: #2a86d6; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.mac-drag { flex-shrink: 1; width: 64px; height: auto; color: var(--accent-bright); overflow: visible; }

.mac-drag-line { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1 6; }

.mac-drag-head { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

[dir="rtl"] .mac-drag { transform: scaleX(-1); }

/* macOS 15+ alert "… Not Opened" */

.mac-alert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 250px;
  padding: 18px 16px 14px;
  border: 1px solid var(--win-edge);
  border-radius: 14px;
  background: var(--win-bg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.mac-alert-icon { position: relative; width: 54px; height: 54px; margin-bottom: 4px; }

.mac-alert-icon img { width: 54px; height: 54px; }

.mac-alert-badge { position: absolute; inset-inline-end: -6px; bottom: -4px; width: 24px; height: 24px; }

.mac-alert-badge path:first-child { fill: #ffcc00; stroke: #ffffff; stroke-width: 1.6; stroke-linejoin: round; }

.mac-alert-mark { fill: none; stroke: #1d1d1f; stroke-width: 2.2; stroke-linecap: round; }

.mac-alert-title { font-size: 12.5px; font-weight: 700; }

.mac-alert-text { margin-bottom: 6px; color: var(--text-2); font-size: 10.5px; }

.mac-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--text) 9%, transparent);
  font-weight: 500;
  white-space: nowrap;
}

.mac-btn-default { background: var(--ios-blue); color: #fff; }

.mac-btn-small {
  width: auto;
  min-height: 22px;
  padding: 3px 10px;
  border: 1px solid var(--win-line);
  border-radius: 6px;
  background: var(--win-card);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

/* The control to click: a teal ring (the site accent) and a pointer. */
.is-target { z-index: 1; box-shadow: 0 0 0 2px var(--win-bg), 0 0 0 4.5px var(--accent-bright); }

.mac-cursor {
  position: absolute;
  inset-inline-end: 18%;
  bottom: -14px;
  width: 22px;
  height: 22px;
  fill: var(--cursor-fill);
  stroke: var(--cursor-edge);
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .is-target::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: inherit;
    border: 2px solid var(--accent-bright);
    opacity: 0;
    animation: target-ping 2.4s var(--ease-out) infinite;
    pointer-events: none;
  }

  .mac-drag-line { animation: drag-flow 1.2s linear infinite; }
}

@keyframes target-ping {
  0% { opacity: 0.7; transform: scale(1); }
  70%,
  100% { opacity: 0; transform: scale(1.18, 1.5); }
}

@keyframes drag-flow {
  to { stroke-dashoffset: -14; }
}

/* System Settings → Privacy & Security → Security → Open Anyway */

.mac-settings { display: grid; grid-template-columns: 104px minmax(0, 1fr); max-width: 360px; min-height: 196px; }

.mac-settings-side {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 7px;
  border-inline-end: 1px solid var(--win-line);
  background: var(--win-sidebar);
}

.mac-settings-side .mac-lights { margin: 0 3px 6px; }

.mac-search { height: 16px; margin-bottom: 4px; border-radius: 5px; background: color-mix(in srgb, var(--text) 7%, transparent); }

.mac-side-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 9.5px;
  line-height: 1.15;
}

.mac-side-row b { flex: 1; height: 5px; border-radius: 3px; background: var(--sk); }

.mac-side-row.is-selected { background: var(--ios-blue); color: #fff; }

.mac-glyph { display: grid; place-items: center; flex-shrink: 0; width: 13px; height: 13px; border-radius: 4px; background: #8e8e93; }

.mac-glyph-a { background: #8e8e93; }

.mac-glyph-b { background: #ff9f0a; }

.mac-glyph-c { background: #30b0c7; }

.mac-glyph-privacy { background: #ffffff; }

.mac-glyph-privacy svg { width: 10px; height: 10px; fill: var(--ios-blue); }

.mac-settings-main { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 12px; }

.mac-pane-title { font-size: 12.5px; font-weight: 700; }

.mac-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--win-line);
  border-radius: 8px;
  background: var(--win-card);
}

.mac-group-faint b { height: 5px; border-radius: 3px; background: var(--sk); }

.mac-group-faint b + b { width: 60%; }

.mac-group-label { margin-top: 4px; font-size: 10px; font-weight: 700; color: var(--text-2); }

.mac-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

.mac-row-text { flex: 1 1 110px; min-width: 0; font-size: 10px; }

@media (max-width: 400px) {
  .mac-settings { grid-template-columns: minmax(0, 1fr); min-height: 0; }

  .mac-settings-side { display: none; }
}

/* macOS 14: Finder shortcut menu → Open */

.mac-menu-scene { display: flex; align-items: flex-start; }

.mac-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 140px;
  margin-top: 26px;
  margin-inline-start: 2px;
  padding: 5px;
  border: 1px solid var(--win-edge);
  border-radius: 9px;
  background: var(--win-bg);
  box-shadow: var(--shadow-md);
}

.mac-menu-item { position: relative; display: flex; align-items: center; min-height: 21px; padding: 2px 9px; border-radius: 5px; font-size: 11.5px; }

.mac-menu-item b { width: 70%; height: 5px; border-radius: 3px; background: var(--sk); }

.mac-menu-item b.short { width: 45%; }

.mac-menu-item.is-target { background: var(--ios-blue); color: #fff; }

.mac-menu-sep { height: 1px; margin: 3px 8px; background: var(--win-line); }

/* Collapsible blocks: macOS 14 steps, Terminal */

.install-more {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.install-more > summary {
  position: relative;
  display: block;
  padding-block: 18px;
  padding-inline: 22px 56px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 620;
  font-size: 1.0625rem;
  border-radius: var(--r-lg);
}

.install-more > summary::-webkit-details-marker { display: none; }

.install-more > summary::after {
  content: "";
  position: absolute;
  inset-inline-end: 22px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-inline-end: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

[dir="rtl"] .install-more > summary::after { transform: rotate(-45deg); }

.install-more[open] > summary::after,
[dir="rtl"] .install-more[open] > summary::after { transform: rotate(225deg); margin-top: -2px; }

.install-more > summary:hover { color: var(--accent); }

.install-more-body { padding: 0 22px 22px; }

.install-more-body > p:last-child { margin-bottom: 0; }

.install-more .install-steps { border-bottom: 0; }

.install-code {
  margin: 0 0 1em;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
  user-select: all;
  -webkit-user-select: all;
}

.install-code code { font-size: inherit; white-space: pre; }

.install-why > p {
  margin: 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--accent-bright);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  line-height: 1.65;
}

.install-faq { margin-top: 18px; }

@media (max-width: 560px) {
  .install-step { padding-inline-start: 44px; }

  .install-step::before { width: 30px; height: 30px; font-size: 0.875rem; }

  .install-step .mac-art { margin-inline-start: -44px; padding: 22px 12px; }

  .install-download .button { width: 100%; }
}

/* ---------- Scroll reveal (progressive enhancement – only with JS and motion allowed) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    transition:
      opacity 0.9s var(--ease-out) var(--reveal-delay, 0s),
      transform 0.9s var(--ease-out) var(--reveal-delay, 0s);
  }

  .js [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(28px); }
}

/* ---------- Reduced motion: no movement at all ---------- */

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

/* ---------- Scripts and writing direction ---------- */

/* Negative tracking suits Latin display type only; it breaks Arabic joining and crowds other scripts. */
:is(:lang(ar), :lang(he), :lang(hi), :lang(th), :lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3, h4, .eyebrow, .price, .amount, .brand, summary) {
  letter-spacing: 0;
}

:lang(ar) body,
:lang(hi) body,
:lang(th) body { line-height: 1.75; }

:lang(ar) :is(h1, h2),
:lang(hi) :is(h1, h2),
:lang(th) :is(h1, h2) { line-height: 1.3; }

:lang(ja) :is(h1, h2),
:lang(zh) :is(h1, h2),
:lang(ko) :is(h1, h2) { line-height: 1.25; }

/* Break Japanese headings at phrase boundaries where supported. */
:lang(ja) :is(h1, h2) { word-break: auto-phrase; }

/* License keys, e-mail addresses and codes always read left to right. */
[dir="rtl"] .license-key,
[dir="rtl"] input[dir="ltr"] { text-align: end; }
