/* ==========================================================================
   BuzzKey — marketing site
   Mobile-first. Every value below comes from a token; nothing is hardcoded
   twice. Interactive surfaces use the -600 ramp so white text clears WCAG AA.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand ramps ---------------------------------------------------------- */
  --blue-100: #eaf3fc;
  --blue-200: #d3e6f9;
  --blue-300: #a9cdf2;
  --blue-400: #7db2ea;
  --blue-500: #4a90e2; /* brand blue — decorative use only */
  --blue-600: #3576c2; /* 4.64:1 on white — safe for white text */
  --blue-700: #275d9c;
  --blue-800: #1c4373;
  --blue-900: #142e4d;

  --green-100: #e8f8ee;
  --green-200: #cdefda;
  --green-300: #a4e2bd;
  --green-400: #74d29b;
  --green-500: #50c878; /* brand green — decorative use only */
  --green-600: #3ba861;
  --green-700: #2c854b; /* 4.60:1 on white — safe for white text */
  --green-800: #1f6036;
  --green-900: #164325;

  --amber-100: #fff7e6;
  --amber-300: #f0dca8;
  --amber-800: #79560f; /* 5.2:1 on --amber-100 */

  --purple-100: #f3eaf9;
  --purple-700: #7d3c96; /* 5.5:1 on white */

  /* Neutrals ------------------------------------------------------------- */
  --white: #ffffff;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #f0f0f0;
  --neutral-300: #dddddd;
  --neutral-400: #c4c4c4;
  --neutral-600: #5c5c5c; /* 6.1:1 on --ground — the muted text floor */
  --neutral-700: #555555;
  --neutral-800: #3d3d3d;
  --neutral-900: #222222;

  /* Semantic ------------------------------------------------------------- */
  --ground: var(--neutral-100);
  --surface: var(--white);
  --surface-sunken: var(--neutral-100);
  --border: var(--neutral-300);
  --border-strong: var(--neutral-400);

  --text: #333333;
  --text-strong: var(--neutral-900);
  --text-secondary: var(--neutral-700);
  --text-muted: var(--neutral-600);
  --text-on-dark: var(--white);
  --text-on-dark-muted: var(--blue-300);

  --accent: var(--blue-500);
  --accent-interactive: var(--blue-600);
  --accent-interactive-hover: var(--blue-700);
  --accent-2: var(--green-500);
  --accent-2-interactive: var(--green-700);

  /* Type scale (fluid) --------------------------------------------------- */
  --font-display: Caprasimo, Georgia, "Times New Roman", serif;
  --font-body: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;

  --step--1: 0.875rem; /* 14px  — captions, legal */
  --step-0: 1rem; /* 16px  — body */
  --step-1: clamp(1.0625rem, 0.25vw + 1rem, 1.1875rem); /* 17 → 19 lead */
  --step-2: clamp(1.25rem, 0.4vw + 1.15rem, 1.4375rem); /* 20 → 23 card h3 */
  --step-3: clamp(1.5rem, 0.9vw + 1.3rem, 2rem); /* 24 → 32 sub-head */
  --step-4: clamp(1.875rem, 2.2vw + 1.35rem, 2.875rem); /* 30 → 46 section h2 */
  --step-5: clamp(2.25rem, 4.2vw + 1.3rem, 4.125rem); /* 36 → 66 hero h1 */

  /* Spacing scale -------------------------------------------------------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;
  --space-9: 4rem;
  --space-10: 5.5rem;

  /* Section rhythm scales with the viewport rather than jumping */
  --section-y: clamp(3.5rem, 7vw, 5.5rem);

  /* Radii ---------------------------------------------------------------- */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 1.75rem;
  --radius-pill: 999px;

  /* Elevation ------------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(20, 46, 77, 0.06),
    0 2px 6px -2px rgba(20, 46, 77, 0.08);
  --shadow-md: 0 4px 12px -4px rgba(20, 46, 77, 0.14);
  --shadow-lg: 0 18px 40px -22px rgba(20, 46, 77, 0.5);

  /* Layout --------------------------------------------------------------- */
  --wrap: 71.25rem; /* 1140px */
  --wrap-narrow: 46rem; /* 736px — prose measure */
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --header-h: 4rem;

  --transition: 160ms cubic-bezier(0.2, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Nothing may push the page sideways, whatever the viewport. */
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
  color: var(--text-strong);
  text-wrap: balance;
}

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

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

a {
  color: var(--blue-700);
  text-decoration: none;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Anchor targets clear the sticky header instead of hiding beneath it. */
[id] {
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}

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

::selection {
  background: rgba(74, 144, 226, 0.26);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */

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

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

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

.visually-hidden {
  position: absolute;
  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;
  left: var(--space-4);
  top: var(--space-4);
  z-index: 200;
  transform: translateY(-200%);
  background: var(--surface);
  color: var(--text-strong);
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin: 0;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 36ch;
}

.section__head {
  max-width: 34rem;
}

/* A lead paragraph always breathes after the heading it follows. */
h1 + .lead,
h2 + .lead,
h3 + .lead {
  margin-top: var(--space-4);
}

.section__head .lead {
  margin-top: var(--space-4);
  max-width: 42ch;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.2;
  /* 48px min target on every button, everywhere. */
  min-height: 3rem;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition);
}

.btn--primary {
  background: var(--accent-interactive);
  color: var(--white);
  box-shadow: 0 8px 20px -10px rgba(53, 118, 194, 0.9);
}

.btn--primary:hover {
  background: var(--accent-interactive-hover);
  color: var(--white);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text-strong);
  border-color: var(--border);
}

.btn--secondary:hover {
  background: var(--neutral-200);
  color: var(--text-strong);
}

.btn--ghost-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn__arrow {
  flex: none;
  transition: transform var(--transition);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   5. Store badges
   -------------------------------------------------------------------------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 3.25rem;
  padding: var(--space-2) var(--space-5) var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--white);
  border: 1px solid var(--text);
  transition: background-color var(--transition);
}

.store-badge:hover {
  background: var(--text-strong);
  color: var(--white);
}

.store-badge__glyph {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.16);
}

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

.store-badge__kicker {
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.store-badge__name {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* Pre-launch: the badge is not a link, and says so. */
.store-badge--pending {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed var(--border-strong);
  cursor: default;
}

.store-badge--pending:hover {
  background: transparent;
  color: var(--text-secondary);
}

.store-badge--pending .store-badge__glyph {
  background: var(--neutral-200);
  color: var(--text-secondary);
}

.store-note {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: var(--space-4);
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
}

@supports (backdrop-filter: blur(14px)) {
  .site-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-h);
  padding-block: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: auto;
  color: var(--text-strong);
  flex: none;
}

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

.brand__mark {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius-md);
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  line-height: 1;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-right: calc(var(--space-2) * -1);
  border: 0;
  background: transparent;
  color: var(--text-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.nav-toggle:hover {
  background: var(--neutral-200);
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

/* Mobile: the nav is a sheet below the bar, hidden until toggled. */
.site-nav {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) var(--gutter) var(--space-6);
  display: none;
}

.site-nav[data-open="true"] {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-nav__link {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.site-nav__link:hover {
  background: var(--neutral-200);
  color: var(--text-strong);
}

.site-nav__cta {
  margin-top: var(--space-4);
}

@media (min-width: 60em) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--space-6);
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-6);
  }

  .site-nav__link {
    padding: var(--space-2) 0;
    font-size: 0.9375rem;
  }

  .site-nav__link:hover {
    background: none;
  }

  .site-nav__cta {
    margin-top: 0;
    min-height: 2.75rem;
    padding-inline: var(--space-5);
  }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-block: var(--section-y) var(--space-8);
}

.hero__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.hero__title {
  font-size: var(--step-5);
  margin-top: var(--space-5);
}

.hero__lead {
  margin-top: var(--space-5);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 34ch;
}

.hero__actions {
  margin-top: var(--space-6);
}

.hero__proof {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.hero__proof li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.hero__proof svg {
  flex: none;
  margin-top: 0.2em;
  color: var(--accent-2-interactive);
}

.hero__visual {
  display: flex;
  justify-content: center;
  position: relative;
}

.hero__glow {
  position: absolute;
  top: 4%;
  left: 50%;
  translate: -50% 0;
  width: min(26rem, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 40%,
    var(--blue-200),
    rgba(211, 230, 249, 0)
  );
  pointer-events: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--green-100);
  color: var(--green-800);
  font-size: var(--step--1);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
}

.pill__dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
}

.pill__dot::before,
.pill__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green-600);
}

.pill__dot::before {
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@media (min-width: 60em) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-9);
  }
}

/* --------------------------------------------------------------------------
   8. Phone mockup
   The whole mockup is drawn in multiples of --u, a single "design pixel".
   Custom properties do not compound the way em does, so nesting stays exact
   while the entire device scales down to fit any viewport.
   -------------------------------------------------------------------------- */

.phone {
  --u: min(1px, calc((100vw - 5rem) / 334));
  width: calc(334 * var(--u));
  flex: none;
  position: relative;
  font-family: var(--font-body);
  padding: calc(11 * var(--u));
  background: #141414;
  border-radius: calc(46 * var(--u));
  box-shadow: 0 calc(30 * var(--u)) calc(60 * var(--u)) calc(-18 * var(--u))
      rgba(20, 40, 70, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

@media (min-width: 60em) {
  /* Inside the hero column the viewport is no longer the constraint. */
  .phone {
    --u: 1px;
  }
}

.phone__screen {
  background: var(--white);
  border-radius: calc(36 * var(--u));
  overflow: hidden;
  height: calc(627 * var(--u));
  display: flex;
  flex-direction: column;
}

.phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12 * var(--u)) calc(22 * var(--u)) calc(2 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.phone__signal {
  display: flex;
  align-items: flex-end;
  gap: calc(2 * var(--u));
}

.phone__signal i {
  display: block;
  width: calc(3 * var(--u));
  background: var(--text);
  border-radius: calc(1 * var(--u));
}

.phone__signal i:nth-child(1) {
  height: calc(5 * var(--u));
}
.phone__signal i:nth-child(2) {
  height: calc(7 * var(--u));
}
.phone__signal i:nth-child(3) {
  height: calc(9 * var(--u));
}
.phone__signal i:nth-child(4) {
  height: calc(11 * var(--u));
}

.phone__battery {
  width: calc(20 * var(--u));
  height: calc(10 * var(--u));
  border: calc(1.5 * var(--u)) solid var(--text);
  border-radius: calc(3 * var(--u));
  padding: calc(1.5 * var(--u));
  margin-left: calc(3 * var(--u));
}

.phone__battery span {
  display: block;
  width: 75%;
  height: 100%;
  background: var(--text);
  border-radius: calc(1 * var(--u));
}

.phone__greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12 * var(--u)) calc(20 * var(--u)) calc(16 * var(--u));
  flex: none;
}

/* The demo builds this icon from script, so it carries no width/height
   attributes of its own and must be sized here. */
.phone__greeting > svg {
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.phone__greeting-label {
  font-size: calc(14 * var(--u));
  color: var(--text-muted);
  line-height: 1.3;
}

.phone__greeting-name {
  font-size: calc(24 * var(--u));
  font-weight: 700;
  color: var(--text);
  margin-top: calc(4 * var(--u));
  line-height: 1.15;
}

.phone__body {
  background: var(--ground);
  padding-bottom: calc(8 * var(--u));
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.phone__card {
  margin: 0 calc(16 * var(--u)) calc(12 * var(--u));
  padding: calc(14 * var(--u));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(12 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.1);
}

.phone__building {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
}

.phone__building svg {
  flex: none;
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
}

.phone__building-name {
  font-size: calc(18 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.phone__building-meta {
  font-size: calc(14 * var(--u));
  color: var(--text-muted);
  margin-top: calc(4 * var(--u));
}

.phone__building-meta--sm {
  font-size: calc(13 * var(--u));
  margin-top: calc(3 * var(--u));
}

.phone__card--timer {
  overflow: hidden;
  margin-bottom: calc(14 * var(--u));
}

.phone__timer-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--u));
  margin: calc(-14 * var(--u)) calc(-14 * var(--u)) calc(12 * var(--u));
  padding: calc(7 * var(--u)) calc(12 * var(--u));
  background: var(--green-500);
  border-radius: calc(11 * var(--u)) calc(11 * var(--u)) 0 0;
}

.phone__timer-banner svg {
  flex: none;
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.phone__timer-banner span {
  font-size: calc(12.5 * var(--u));
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

.phone__timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone__timer-label {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  font-size: calc(18 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.phone__timer-label svg {
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.phone__switch {
  width: calc(44 * var(--u));
  height: calc(26 * var(--u));
  border-radius: var(--radius-pill);
  background: var(--green-500);
  position: relative;
  flex: none;
}

.phone__switch::after {
  content: "";
  position: absolute;
  top: calc(3 * var(--u));
  right: calc(3 * var(--u));
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, 0.3);
}

.phone__countdown {
  text-align: center;
  margin-top: calc(12 * var(--u));
}

.phone__countdown strong {
  display: block;
  font-size: calc(32 * var(--u));
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.phone__countdown span {
  display: block;
  font-size: calc(12 * var(--u));
  color: var(--text-muted);
  margin-top: calc(3 * var(--u));
}

.phone__progress {
  height: calc(8 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--ground);
  margin-top: calc(12 * var(--u));
  overflow: hidden;
}

.phone__progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--green-500);
  border-radius: calc(4 * var(--u));
}

.phone__section {
  padding: 0 calc(16 * var(--u)) calc(8 * var(--u));
}

.phone__section-title {
  font-size: calc(17 * var(--u));
  font-weight: 600;
  color: var(--text);
  margin-bottom: calc(8 * var(--u));
}

.phone__activity {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  padding: calc(12 * var(--u));
  background: var(--white);
  border-radius: calc(12 * var(--u));
}

.phone__activity-icon {
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: calc(8 * var(--u));
  background: var(--purple-100);
  display: grid;
  place-items: center;
  flex: none;
}

.phone__activity-icon svg {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.phone__activity-body {
  flex: 1;
  min-width: 0;
}

.phone__activity-name {
  font-size: calc(15 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.phone__activity-meta,
.phone__activity-time {
  font-size: calc(13 * var(--u));
  color: var(--text-muted);
}

.phone__activity-time {
  font-size: calc(12 * var(--u));
  flex: none;
}

.phone__tabs {
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: calc(8 * var(--u)) 0 calc(14 * var(--u));
  flex: none;
}

.phone__tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(3 * var(--u));
  padding-top: calc(4 * var(--u));
  color: var(--text-muted);
}

.phone__tab svg {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.phone__tab span {
  font-size: calc(10 * var(--u));
}

.phone__tab--active {
  color: var(--accent);
}

.phone__tab--active span {
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. Promise strip
   -------------------------------------------------------------------------- */

.promises {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.promises__grid {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--space-7);
}

.promise {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.promise svg {
  flex: none;
  margin-top: 0.15em;
  color: var(--accent-2-interactive);
}

.promise__title {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}

.promise__body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

@media (min-width: 40em) {
  .promises__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 64em) {
  .promises__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   10. Feature cards
   -------------------------------------------------------------------------- */

.features__grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.card__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  background: var(--blue-100);
  color: var(--blue-700);
}

.card__icon--purple {
  background: var(--purple-100);
  color: var(--purple-700);
}

.card__icon--green {
  background: var(--green-100);
  color: var(--green-700);
}

.card__icon--neutral {
  background: var(--neutral-200);
  color: var(--text-secondary);
}

.card__title {
  font-size: var(--step-2);
  margin-top: var(--space-5);
}

.card__body {
  font-size: 0.9688rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: var(--space-3);
}

.card--dark {
  background: var(--blue-900);
  border-color: var(--blue-900);
}

.card--dark .card__icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--green-400);
}

.card--dark .card__title {
  color: var(--white);
}

.card--dark .card__body {
  color: var(--text-on-dark-muted);
}

@media (min-width: 40em) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   11. How it works
   -------------------------------------------------------------------------- */

.how {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.how__grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-7);
  counter-reset: step;
}

.step {
  background: var(--surface-sunken);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.step--highlight {
  background: var(--blue-100);
}

.step__num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-interactive);
  color: var(--white);
  font-weight: 700;
  font-size: 1.0625rem;
}

.step__num--done {
  background: var(--accent-2-interactive);
}

.step__title {
  font-size: var(--step-2);
  margin-top: var(--space-4);
}

.step__body {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

@media (min-width: 40em) {
  .how__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (min-width: 64em) {
  .how__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   12. Building / landlord panel
   -------------------------------------------------------------------------- */

.building {
  background: var(--blue-900);
  color: var(--text-on-dark);
}

.building h2,
.building h3 {
  color: var(--white);
}

.building__grid {
  display: grid;
  gap: var(--space-7);
  align-items: start;
}

.building__lead {
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  margin-top: var(--space-4);
  max-width: 40ch;
}

.building__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.building__list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--text-on-dark-muted);
  font-size: 0.9688rem;
  line-height: 1.6;
}

.building__list svg {
  flex: none;
  margin-top: 0.2em;
  color: var(--green-400);
}

.building__list strong {
  color: var(--white);
  font-weight: 600;
}

.template {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.template__label {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-300);
}

.template__text {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--white);
  white-space: pre-line;
}

.template__actions {
  margin-top: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.copy-status {
  font-size: var(--step--1);
  color: var(--green-300);
}

@media (min-width: 60em) {
  .building__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-9);
  }
}

/* --------------------------------------------------------------------------
   13. Pricing
   -------------------------------------------------------------------------- */

.pricing__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
}

.pricing__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.currency {
  display: inline-flex;
  padding: 0.1875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.currency[hidden] {
  display: none;
}

.currency__btn {
  min-height: 2.25rem;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.currency__btn:hover {
  color: var(--accent-interactive);
}

.currency__btn[aria-pressed="true"] {
  background: var(--accent-interactive);
  color: var(--white);
}

.notice {
  background: var(--amber-100);
  border: 1px solid var(--amber-300);
  color: var(--amber-800);
  font-size: 0.875rem;
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
}

.plans {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-7);
  align-items: start;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
}

.plan--featured {
  border: 2px solid var(--accent-interactive);
  box-shadow: var(--shadow-lg);
}

.plan__flag {
  position: absolute;
  top: calc(var(--space-3) * -1);
  left: var(--space-6);
  background: var(--accent-2-interactive);
  color: var(--white);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}

.plan__name {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.plan--featured .plan__name {
  color: var(--blue-700);
}

.plan--family .plan__name {
  color: var(--green-700);
}

.plan__price {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.plan__amount {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-strong);
}

.plan__period {
  font-size: 0.9375rem;
  color: var(--text-muted);
  padding-bottom: 0.3rem;
}

.plan__alt {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.plan__blurb {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-3);
}

.pricing__foot a {
  color: var(--accent-interactive);
}

.plan__rule {
  height: 1px;
  background: var(--border);
  margin-block: var(--space-5);
  border: 0;
}

.plan__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  flex: 1;
}

.plan__features li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.plan__features svg {
  flex: none;
  margin-top: 0.2em;
  color: var(--accent-2-interactive);
}

.plan__features li[data-included="false"] {
  color: var(--text-muted);
}

.plan__features li[data-included="false"] svg {
  color: var(--border-strong);
}

.plan__cta {
  margin-top: var(--space-6);
}

.pricing__foot {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: var(--space-6);
  max-width: 60ch;
}

@media (min-width: 48em) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */

.faq {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.faq__list {
  margin-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  list-style: none;
}

.faq__q::-webkit-details-marker {
  display: none;
}

.faq__q:hover {
  color: var(--accent-interactive);
}

.faq__icon {
  flex: none;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__a {
  padding-bottom: var(--space-5);
  color: var(--text-muted);
  max-width: 68ch;
}

.faq__a p + p {
  margin-top: var(--space-3);
}

.faq__more {
  margin-top: var(--space-6);
  color: var(--text-muted);
  max-width: 68ch;
  scroll-margin-top: calc(var(--header-h) + var(--space-5));
}

/* --------------------------------------------------------------------------
   15. Download + newsletter
   -------------------------------------------------------------------------- */

.download {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.download__grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

.signup {
  background: var(--blue-100);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
}

.signup__title {
  font-size: var(--step-3);
}

.signup__body {
  font-size: 0.9688rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: var(--space-3);
}

.signup__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.signup__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-strong);
}

.signup__input {
  font: inherit;
  font-size: var(--step-0);
  width: 100%;
  min-height: 3rem;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

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

.signup__input[aria-invalid="true"] {
  border-color: #b3261e;
}

.signup__status {
  font-size: 0.9375rem;
  font-weight: 600;
  min-height: 1.5rem;
}

.signup__status[data-state="error"] {
  color: #8c1d18;
}

.signup__status[data-state="success"] {
  color: var(--green-800);
}

.signup__fine {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: var(--space-4);
}

@media (min-width: 30em) {
  .signup__form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .signup__label {
    flex-basis: 100%;
  }

  .signup__input {
    flex: 1;
    min-width: 12rem;
    width: auto;
  }

  .signup__status {
    flex-basis: 100%;
  }
}

@media (min-width: 60em) {
  .download__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-9);
  }
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--ground);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-7);
  padding-block: var(--space-8) var(--space-6);
}

.site-footer__blurb {
  font-size: 0.9063rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
  max-width: 30ch;
}

.site-footer__col-title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: var(--space-3);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.9063rem;
}

.site-footer__links a {
  color: var(--text-muted);
  padding-block: var(--space-1);
}

.site-footer__links a:hover {
  color: var(--accent-interactive);
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  padding-block: var(--space-5) var(--space-8);
  border-top: 1px solid var(--border);
  font-size: 0.8438rem;
  color: var(--text-muted);
}

@media (min-width: 40em) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64em) {
  .site-footer__grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

/* --------------------------------------------------------------------------
   17. Legal / prose pages
   -------------------------------------------------------------------------- */

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: var(--section-y) var(--space-7);
}

.page-head__title {
  font-size: var(--step-4);
}

.page-head__meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
}

.callout {
  background: var(--amber-100);
  border: 1px solid var(--amber-300);
  color: var(--amber-800);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: 0.9375rem;
  margin-top: var(--space-5);
}

.callout strong {
  display: block;
  margin-bottom: var(--space-1);
}

.prose {
  padding-block: var(--space-8) var(--space-10);
  color: var(--text-secondary);
}

.prose h2 {
  font-size: var(--step-3);
  margin-top: var(--space-8);
  padding-top: var(--space-2);
}

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

.prose h3 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--text-strong);
  margin-top: var(--space-6);
}

.prose p,
.prose ul,
.prose ol {
  margin-top: var(--space-4);
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}

/* Numbered steps on the help and account-deletion pages. */
.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
}

.prose ol > li::marker {
  color: var(--text-muted);
  font-weight: 700;
}

.prose li {
  margin-top: var(--space-2);
}

.prose li::marker {
  color: var(--border-strong);
}

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

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Wide tables scroll inside their own box; the page never does. */
.table-scroll {
  margin-top: var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th {
  font-weight: 700;
  color: var(--text-strong);
  background: var(--neutral-50);
  white-space: nowrap;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   18. Error page
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: var(--space-10);
}

.error-page__code {
  font-family: var(--font-display);
  font-size: var(--step-5);
  color: var(--blue-300);
  line-height: 1;
}

.error-page__title {
  font-size: var(--step-4);
  margin-top: var(--space-4);
}

.error-page__body {
  color: var(--text-muted);
  margin-top: var(--space-4);
  max-width: 40ch;
  margin-inline: auto;
}

.error-page__actions {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   19. Interactive demo
   A hand-built prototype, not the real app — the app's native call, push and
   keychain modules have no web equivalent. Colours, labels and icons are
   lifted from the real screens so it behaves like what it depicts.
   -------------------------------------------------------------------------- */

.demo {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.demo__grid {
  display: grid;
  gap: var(--space-7);
  margin-top: var(--space-7);
  align-items: center;
}

.demo__stage {
  display: flex;
  justify-content: center;
  position: relative;
}

.demo__panel {
  min-width: 0;
}

/* Reserving the height stops the panel resizing as captions swap. */
.demo__caption {
  min-height: 8.5rem;
}

.demo__caption-title {
  font-size: var(--step-2);
}

.demo__caption-body {
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text-muted);
  margin-top: var(--space-3);
  max-width: 44ch;
}

.demo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-5);
}

.demo__hint {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  max-width: 46ch;
}

.demo__noscript {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: var(--space-4);
}

@media (min-width: 60em) {
  .demo__grid {
    grid-template-columns: auto 1fr;
    gap: var(--space-9);
  }
}

/* The demo phone is the centrepiece, so it may run larger than the hero's. */
.phone--demo {
  --u: min(1.08px, calc((100vw - 4rem) / 334));
}

@media (min-width: 60em) {
  .phone--demo {
    --u: 1.08px;
  }
}

/* Taller than the hero's, so a whole screen is visible without scrolling
   inside the device. It still scrolls when a list runs long, as the app does. */
.phone--demo .phone__screen {
  height: calc(690 * var(--u));
}

/* Screens ---------------------------------------------------------------- */

.scr {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--ground);
}

.scr[data-active="true"] {
  display: block;
}

.scr--pad {
  padding: calc(14 * var(--u)) calc(16 * var(--u));
}

.scr__title {
  font-size: calc(17 * var(--u));
  font-weight: 700;
  color: var(--text);
  margin-bottom: calc(10 * var(--u));
}

.scr__title--sub {
  margin-top: calc(18 * var(--u));
}

.scr__empty {
  font-size: calc(13 * var(--u));
  color: var(--text-muted);
}

/* Duration picker (Home) ------------------------------------------------- */

.dur {
  display: flex;
  gap: calc(6 * var(--u));
  margin-top: calc(12 * var(--u));
}

.dur__btn {
  flex: 1;
  font: inherit;
  font-size: calc(12 * var(--u));
  font-weight: 600;
  padding: calc(8 * var(--u)) 0;
  border-radius: calc(9 * var(--u));
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
}

.dur__btn[aria-pressed="true"] {
  background: var(--accent-interactive);
  border-color: var(--accent-interactive);
  color: var(--white);
}

.phone__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--u));
  width: 100%;
  font: inherit;
  font-size: calc(15 * var(--u));
  font-weight: 700;
  margin-top: calc(12 * var(--u));
  padding: calc(12 * var(--u));
  border: 0;
  border-radius: calc(11 * var(--u));
  background: var(--accent-interactive);
  color: var(--white);
  cursor: pointer;
}

.phone__cta--stop {
  background: var(--white);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.phone__cta svg {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  flex: none;
}

/* Activity list ---------------------------------------------------------- */

.act__day {
  font-size: calc(11 * var(--u));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: calc(14 * var(--u)) 0 calc(8 * var(--u));
}

.act__day:first-child {
  margin-top: 0;
}

.act__row {
  display: flex;
  align-items: center;
  gap: calc(11 * var(--u));
  padding: calc(11 * var(--u));
  background: var(--white);
  border-radius: calc(11 * var(--u));
  margin-bottom: calc(7 * var(--u));
}

.act__icon {
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: calc(8 * var(--u));
  display: grid;
  place-items: center;
  flex: none;
}

.act__icon svg {
  width: calc(17 * var(--u));
  height: calc(17 * var(--u));
}

.act__body {
  flex: 1;
  min-width: 0;
}

.act__name {
  font-size: calc(14.5 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.act__kind {
  font-size: calc(12.5 * var(--u));
  color: var(--text-muted);
  margin-top: calc(1 * var(--u));
}

.act__time {
  font-size: calc(11.5 * var(--u));
  color: var(--text-muted);
  flex: none;
}

.act__stats {
  display: flex;
  background: var(--white);
  border-radius: calc(11 * var(--u));
  padding: calc(12 * var(--u)) 0;
  margin-bottom: calc(14 * var(--u));
}

.act__stat {
  flex: 1;
  text-align: center;
  padding: 0 calc(4 * var(--u));
}

.act__stat + .act__stat {
  border-left: 1px solid var(--border);
}

.act__stat strong {
  display: block;
  font-size: calc(17 * var(--u));
  color: var(--accent);
}

.act__stat span {
  display: block;
  font-size: calc(10.5 * var(--u));
  color: var(--text-muted);
  margin-top: calc(2 * var(--u));
}

/* Access & Keys ---------------------------------------------------------- */

.code {
  display: flex;
  align-items: center;
  gap: calc(11 * var(--u));
  padding: calc(12 * var(--u));
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(11 * var(--u));
  margin-bottom: calc(8 * var(--u));
}

.code__body {
  flex: 1;
  min-width: 0;
}

.code__name {
  font-size: calc(14.5 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.code__value {
  font-size: calc(15 * var(--u));
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-top: calc(3 * var(--u));
  font-variant-numeric: tabular-nums;
}

.code__meta {
  font-size: calc(11.5 * var(--u));
  color: var(--text-muted);
  margin-top: calc(3 * var(--u));
}

.code__eye {
  flex: none;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: calc(8 * var(--u));
  cursor: pointer;
}

.code__eye:hover {
  background: var(--neutral-200);
}

.code__eye svg {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
}

.sched {
  display: flex;
  align-items: center;
  gap: calc(11 * var(--u));
  padding: calc(12 * var(--u));
  background: var(--white);
  border-radius: calc(11 * var(--u));
  margin-bottom: calc(8 * var(--u));
}

/* Script-built, so it carries no width/height attributes and must be sized
   here — otherwise it stretches and squeezes the text beside it. */
.sched > svg {
  flex: none;
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.sched__body {
  flex: 1;
  min-width: 0;
}

.sched__name {
  font-size: calc(14.5 * var(--u));
  font-weight: 600;
  color: var(--text);
}

.sched__when {
  font-size: calc(12 * var(--u));
  color: var(--text-muted);
  margin-top: calc(2 * var(--u));
}

/* A miniature switch, reused across Access and Settings. */
.mini-switch {
  flex: none;
  width: calc(38 * var(--u));
  height: calc(22 * var(--u));
  border-radius: var(--radius-pill);
  border: 0;
  padding: 0;
  background: var(--neutral-400);
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition);
}

.mini-switch::after {
  content: "";
  position: absolute;
  top: calc(3 * var(--u));
  left: calc(3 * var(--u));
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 calc(1 * var(--u)) calc(2 * var(--u)) rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}

.mini-switch[aria-pressed="true"] {
  background: var(--green-500);
}

.mini-switch[aria-pressed="true"]::after {
  transform: translateX(calc(16 * var(--u)));
}

/* Settings --------------------------------------------------------------- */

.set__group {
  background: var(--white);
  border-radius: calc(11 * var(--u));
  margin-bottom: calc(10 * var(--u));
  overflow: hidden;
}

.set__row {
  display: flex;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(11 * var(--u)) calc(12 * var(--u));
}

.set__row + .set__row {
  border-top: 1px solid var(--neutral-200);
}

.set__row svg {
  flex: none;
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
  color: var(--accent);
}

.set__label {
  flex: 1;
  min-width: 0;
  font-size: calc(13.5 * var(--u));
  color: var(--text);
}

.set__value {
  font-size: calc(12.5 * var(--u));
  color: var(--text-muted);
  flex: none;
}

/* Incoming call overlay -------------------------------------------------- */

.call {
  position: absolute;
  /* Sits over the screen, not the bezel, so the radii line up. */
  inset: calc(11 * var(--u));
  z-index: 5;
  background: #0f172a;
  border-radius: calc(36 * var(--u));
  display: none;
  flex-direction: column;
  align-items: center;
  padding: calc(30 * var(--u)) calc(20 * var(--u));
  text-align: center;
}

.call[data-active="true"] {
  display: flex;
}

.call__kind {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.call__kind svg {
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
}

.call__building {
  font-size: calc(26 * var(--u));
  font-weight: 700;
  color: #ffffff;
  margin-top: calc(14 * var(--u));
  line-height: 1.15;
}

.call__caller {
  font-size: calc(18 * var(--u));
  color: #38bdf8;
  margin-top: calc(6 * var(--u));
}

.call__timer {
  font-size: calc(17 * var(--u));
  color: #94a3b8;
  margin-top: calc(6 * var(--u));
  font-variant-numeric: tabular-nums;
}

.call__avatar {
  position: relative;
  width: calc(150 * var(--u));
  height: calc(150 * var(--u));
  display: grid;
  place-items: center;
  margin: calc(18 * var(--u)) 0;
  flex: none;
}

.call__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  animation: pulse 2s ease-out infinite;
}

.call__disc {
  position: relative;
  width: calc(110 * var(--u));
  height: calc(110 * var(--u));
  border-radius: 50%;
  background: #1e293b;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.call__disc svg {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
}

.call__controls {
  width: 100%;
  margin-top: auto;
}

.call__door {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(9 * var(--u));
  width: 100%;
  font: inherit;
  font-size: calc(16 * var(--u));
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: calc(15 * var(--u));
  border: 0;
  border-radius: calc(16 * var(--u));
  /* The app uses #3B82F6 and #22C55E here. On a web page those give white
     text only 3.68:1 and 2.28:1, so both are darkened one step to clear AA
     at every scale the device renders at. */
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  transition: background-color var(--transition);
}

.call__door svg {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
  flex: none;
}

.call__door[data-open="true"] {
  background: #15803d;
}

.call__row {
  display: flex;
  justify-content: center;
  gap: calc(30 * var(--u));
  margin-top: calc(22 * var(--u));
}

.call__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(7 * var(--u));
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.call__circle {
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.call__circle svg {
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
}

.call__circle--decline {
  background: #ef4444;
}

/* Icon-only, so this needs 3:1 as a graphical object rather than 4.5:1. */
.call__circle--answer {
  background: #16a34a;
}

.call__circle--speaker {
  background: #334155;
}

.call__action[aria-pressed="true"] .call__circle--speaker {
  background: #2563eb;
}

.call__action:disabled {
  cursor: default;
  opacity: 0.45;
}

.call__action span {
  font-size: calc(12 * var(--u));
  color: #cbd5e1;
}

.call__action[hidden] {
  display: none;
}

/* Interactive affordances ------------------------------------------------ */

.phone--demo .phone__tab {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding-top: calc(4 * var(--u));
}

.phone--demo .phone__tab:hover {
  color: var(--accent-interactive);
}

.phone--demo .phone__switch {
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--neutral-400);
  transition: background-color var(--transition);
}

.phone--demo .phone__switch[aria-pressed="true"] {
  background: var(--green-500);
}

.phone--demo .phone__switch::after {
  transition: transform var(--transition);
  transform: translateX(calc(-18 * var(--u)));
}

.phone--demo .phone__switch[aria-pressed="true"]::after {
  transform: translateX(0);
}

/* Keyboard focus has to stay visible against the dark call overlay too. */
.phone--demo :focus-visible,
.call :focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   20. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .callout,
  .demo {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #555;
  }
}
