/* ==========================================================================
   iConnect – marketing site
   --------------------------------------------------------------------------
   One stylesheet, three jobs:
     1. the page itself (editorial, ivory + ink, flat fields, no gradients)
     2. the device shell that holds the mockups
     3. a faithful reproduction of the app's own design tokens, so the
        mockups are the product rather than a drawing of it. The values in
        the "app surface" block are lifted from src/theme/semantic.ts and
        should be changed there first.
   ========================================================================== */

/* --- Type ---------------------------------------------------------------- */
/* Self-hosted and subsetted to latin. No runtime dependency on a font CDN:
   a blocked or slow third party must never be able to hold up this page. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/InstrumentSans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/InstrumentSans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/InstrumentSans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/InstrumentSans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/InstrumentSerif-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

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

:root {
  /* Page. Ink carries a violet cast so black and brand sit in one family. */
  --ink: #100d14;
  --ink-2: #1a1620;
  --ink-3: #272031;
  --paper: #f7f5f2;
  --paper-2: #efebe5;
  --violet: #6a329f;
  --violet-deep: #3b1c59;
  --violet-lift: #ac86d4;
  --violet-wash: #f0e9f7;

  --t1: #100d14;
  --t2: #4b4553;
  --t3: #7d7686;
  --line: rgba(16, 13, 20, 0.13);
  --line-strong: rgba(16, 13, 20, 0.24);

  --sans:
    'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', ui-serif, Georgia, 'Times New Roman', serif;

  --shell: min(1280px, 100% - clamp(2.5rem, 8vw, 8rem));
  /* Applied to both sides of a boundary, so two adjacent sections put twice
     this between their content. Kept moderate for that reason. */
  --gap-section: clamp(4.5rem, 8vw, 7.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sections that invert. Set once, inherited by everything inside. */
.on-ink {
  --t1: #f7f5f2;
  --t2: #a9a2b4;
  --t3: #7d7686;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --violet: var(--violet-lift);
  background: var(--ink);
  color: var(--t1);
}

/* --- Reset --------------------------------------------------------------- */

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

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

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--t1);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1;
  overflow-x: hidden;
}

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

/* Author `display` declarations outrank the UA's `[hidden] { display: none }`
   whatever their specificity, so anything given a `display` here would ignore
   the attribute. This puts `hidden` back in charge. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--violet);
  color: #fff;
}

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

.skip {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
  transform: translateY(-140%);
  transition: transform 0.2s;
}
.skip:focus {
  transform: none;
}

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

/* --- Layout primitives --------------------------------------------------- */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

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

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

.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t3);
}

.eyebrow .idx {
  font-variant-numeric: tabular-nums;
  color: var(--violet);
}

.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-0.25em);
}

.eyebrow--bare::after {
  display: none;
}

/* Display type. Line heights stay at or above 1.0 and the block carries a
   little bottom padding, so descenders in "app", "people" and "going" are
   never trimmed by a neighbouring element. Nothing here is clipped. */
.d1 {
  font-size: clamp(2.85rem, 7.6vw, 6.6rem);
  line-height: 1;
  letter-spacing: -0.042em;
  font-weight: 700;
  padding-bottom: 0.06em;
}

.d2 {
  font-size: clamp(2.1rem, 4.4vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  padding-bottom: 0.05em;
}

.d3 {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 600;
  padding-bottom: 0.04em;
}

.lead {
  font-size: clamp(1.1rem, 1.35vw, 1.35rem);
  line-height: 1.55;
  color: var(--t2);
  max-width: 46ch;
}

.body-copy {
  color: var(--t2);
  max-width: 58ch;
}

.body-copy + .body-copy {
  margin-top: 1.1em;
}

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hl {
  color: var(--violet);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* --- Mark ---------------------------------------------------------------- */
/*
 * The disc-and-pill "i". Two optical weights of one drawing:
 *
 *   Lockup (here)  42 x 152, stem 36 - about a fifth heavier than Instrument
 *                  Sans 700's own "i", which is enough to read as a mark while
 *                  still belonging to the word it sits in.
 *   Icon           stem 178 on a 1024 grid, in scripts/generate-icons.js -
 *                  poster weight, because a typographic stem disappears at 16px
 *                  on a home screen.
 *
 * The mark *is* the i of iConnect, so the word beside it is set as "Connect".
 * A hidden "i" keeps the accessible name intact.
 */

.mark {
  height: 1em;
  width: 0.2763em; /* 42 / 152, so it can never stretch */
  flex: none;
  fill: currentColor;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.075em;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand .mark {
  color: var(--violet);
  /* 152 units against an em of 200: the full height of the "i" it replaces. */
  font-size: 0.76em;
  /* The round terminal overshoots the baseline the way the C beside it does. */
  margin-bottom: -0.012em;
}

/* --- Nav ----------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

/* Opaque once scrolled. A translucent bar picks up whatever passes under it,
   and over the dark sections that reads as a grey slab rather than as glass. */
.nav[data-stuck='true'] {
  background: var(--paper);
  border-bottom-color: var(--line);
}

.nav-inner {
  width: var(--shell);
  margin-inline: auto;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav .brand {
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.2vw, 2.1rem);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--t2);
}

/* Text links only. The call to action in the same row is a `.btn`, and the
   sliding underline below was drawing a hairline straight across its pill. */
.nav-links a:not(.btn) {
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-links a:not(.btn):hover {
  color: var(--t1);
}

.nav-links a:not(.btn):hover::after {
  transform: scaleX(1);
}

@media (max-width: 780px) {
  .nav-links .hide-sm {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 3.25rem;
  padding-inline: 1.6rem;
  border-radius: 999px;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease),
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid:hover {
  background: var(--violet-deep);
}

.on-ink .btn--solid {
  background: var(--paper);
  color: var(--ink);
}

.on-ink .btn--solid:hover {
  background: #fff;
}

.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--t1);
}

.btn--ghost:hover {
  border-color: var(--t1);
}

.btn .mark {
  font-size: 1.15em;
}

/* App Store badge, drawn rather than served as a bitmap. */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 3.4rem;
  padding: 0 1.5rem 0 1.25rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  transition:
    transform 0.35s var(--ease),
    background-color 0.25s;
}

.appstore:hover {
  transform: translateY(-2px);
  background: #000;
}

.on-ink .appstore {
  background: var(--paper);
  color: var(--ink);
}

.appstore svg {
  width: 1.65rem;
  height: 1.65rem;
  fill: currentColor;
  flex: none;
}

.appstore .kicker {
  display: block;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
  line-height: 1.3;
}

/* Title case, as Apple's own badge sets it. */
.appstore strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-transform: none;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

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

.hero {
  padding-top: clamp(2rem, 3.5vw, 3.25rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

/* Smaller than the closing statement's `.d1`: this one sits in a half-width
   column beside the device, and at full display size it ran to five lines and
   pushed the device off the first screen. */
.hero h1 {
  font-size: clamp(2.6rem, 4.9vw, 4.6rem);
  max-width: 13ch;
}

/* The italic leans into the word after it; give the numeral its space back. */
.hero h1 .serif {
  padding-right: 0.05em;
}

.hero .lead {
  margin-top: 1.5rem;
  max-width: 44ch;
}

.hero .cta-row {
  margin-top: 2.2rem;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--t3);
}

.hero-proof li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-proof svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: var(--violet);
  flex: none;
}

.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

@media (max-width: 940px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero h1 {
    max-width: 14ch;
  }
}

/* --- Segmented control (drives the hero device) -------------------------- */

/* Both controls under the device share one height so they read as a pair. */
.segmented,
.scheme-switch {
  height: 2.75rem;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  gap: 2px;
}

.on-ink .segmented {
  background: var(--ink-2);
}

.segmented button {
  height: calc(2.75rem - 10px);
  padding-inline: 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--t2);
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}

.segmented button:hover {
  color: var(--t1);
}

.segmented button[aria-selected='true'] {
  background: var(--ink);
  color: var(--paper);
}

.on-ink .segmented button[aria-selected='true'] {
  background: var(--paper);
  color: var(--ink);
}

/* --- Marquee statement --------------------------------------------------- */

.statement {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.statement p {
  font-size: clamp(1.6rem, 3.6vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.032em;
  font-weight: 600;
  max-width: 24ch;
  padding-bottom: 0.05em;
}

.statement .sub {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.6rem 2.5rem;
  max-width: 62rem;
}

.statement .sub p {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--t2);
  max-width: none;
}

/* --- Feature rows -------------------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.feature + .feature {
  margin-top: var(--gap-section);
}

.feature[data-flip='true'] .feature-art {
  order: -1;
}

.feature-art {
  display: flex;
  justify-content: center;
}

.feature-copy .d2 {
  margin-top: 1.4rem;
  max-width: 14ch;
}

.feature-copy .body-copy {
  margin-top: 1.3rem;
}

.feature-points {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
  max-width: 34rem;
}

.feature-points li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--t2);
}

.feature-points strong {
  color: var(--t1);
  font-weight: 600;
}

.feature-points svg {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.25rem;
  fill: var(--violet);
  flex: none;
}

.try-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--violet);
}

.try-hint svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .feature[data-flip='true'] .feature-art {
    order: 0;
  }
  .feature-copy .d2 {
    max-width: 18ch;
  }
}

/* --- Privacy band -------------------------------------------------------- */

.band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

@media (max-width: 900px) {
  .band-head {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Four columns under a hairline each, rather than boxed cells. Vertical rules
   between narrow columns left the copy crammed against them and the numerals
   too small to carry the row. */
.facts {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.fact {
  border-top: 1px solid var(--line-strong);
  padding-top: 1.4rem;
}

.fact dt {
  font-size: clamp(3.25rem, 5.6vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.94;
  color: var(--violet);
  font-variant-numeric: tabular-nums;
  padding-bottom: 0.04em;
}

.fact dd {
  margin-top: 1.1rem;
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--t2);
}

.fact-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t1);
}

@media (max-width: 860px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem clamp(1.5rem, 4vw, 2.5rem);
  }
}

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

/* --- Capability grid ----------------------------------------------------- */

.caps {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cap {
  background: var(--paper);
  padding: 2rem 1.75rem;
}

.on-ink .cap {
  background: var(--ink);
}

.cap svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: var(--violet);
  margin-bottom: 1.1rem;
}

.cap h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cap p {
  margin-top: 0.5rem;
  font-size: 0.925rem;
  color: var(--t2);
}

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

.plans {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.plan--pro {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  --t1: #f7f5f2;
  --t2: #a9a2b4;
  --t3: #7d7686;
  --line: rgba(255, 255, 255, 0.16);
  --violet: var(--violet-lift);
}

.plan-name {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t3);
}

.plan-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
}

.plan--pro .plan-tag {
  color: var(--violet-deep);
}

.plan-price {
  margin-top: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: clamp(2.4rem, 3.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  padding-bottom: 0.04em;
}

.plan-price small {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--t2);
}

.plan-note {
  margin-top: 0.6rem;
  font-size: 0.875rem;
  color: var(--t3);
}

.plan ul {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.75rem;
  flex: 1;
}

.plan li {
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  font-size: 0.95rem;
  color: var(--t2);
}

.plan li svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.3rem;
  fill: var(--violet);
  flex: none;
}

.plan .btn {
  margin-top: 2rem;
  width: 100%;
}

.plan--pro .btn--solid {
  background: var(--paper);
  color: var(--ink);
}

.plan-small {
  margin-top: 1.4rem;
  font-size: 0.775rem;
  line-height: 1.55;
  color: var(--t3);
}

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

.faq {
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  max-width: 60rem;
}

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

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 3rem 1.5rem 0;
  position: relative;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

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

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

.faq summary::after {
  content: '';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  margin-top: -0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}

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

.faq .answer {
  padding-bottom: 1.75rem;
  color: var(--t2);
  max-width: 62ch;
}

.faq .answer p + p {
  margin-top: 0.9rem;
}

/* --- Closing CTA --------------------------------------------------------- */

.closing {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing .d1 {
  max-width: 16ch;
}

.closing .lead {
  margin-top: 1.4rem;
  margin-inline: auto;
}

.closing .cta-row {
  margin-top: 2.2rem;
  justify-content: center;
}

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

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer .brand {
  font-size: 1.1rem;
}

.footer-tag {
  margin-top: 0.7rem;
  font-size: 0.875rem;
  color: var(--t3);
  max-width: 30ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.9rem;
  font-size: 0.9rem;
  color: var(--t2);
}

.footer-links a:hover {
  color: var(--t1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-base {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--t3);
}

/* --- Reveal -------------------------------------------------------------- */
/* Opacity and a small lift only. Nothing here masks a text block, so no
   descender can be trimmed on the way in. */

[data-reveal] {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

html.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Device shell
   ========================================================================== */

.device-frame {
  --s: 0.76;
  width: calc(410px * var(--s));
  height: calc(864px * var(--s));
  flex: none;
  position: relative;
}

.device-frame > .device {
  position: absolute;
  inset: 0 auto auto 0;
  transform: scale(var(--s));
  transform-origin: top left;
}

.device {
  width: 410px;
  height: 864px;
  border-radius: 56px;
  padding: 10px;
  background: #16141a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.09),
    0 1px 0 1px rgba(0, 0, 0, 0.5),
    0 34px 60px -20px rgba(16, 13, 20, 0.45),
    0 10px 24px -12px rgba(16, 13, 20, 0.3);
}

.on-ink .device {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 34px 70px -24px rgba(0, 0, 0, 0.8);
}

.device-screen {
  width: 390px;
  height: 844px;
  border-radius: 47px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.device-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 34px;
  border-radius: 999px;
  background: #000;
  z-index: 40;
  pointer-events: none;
}

.device-frame--sm {
  --s: 0.74;
}

/* Stepped rather than fluid: `min()` cannot compare a unitless scale with a
   length, and an invalid `--s` drops the transform entirely, which lets the
   410px device push the page sideways. Fixed steps cannot fail that way. */
@media (max-width: 940px) {
  .device-frame,
  .device-frame--sm {
    --s: 0.78;
  }
}

@media (max-width: 400px) {
  .device-frame,
  .device-frame--sm {
    --s: 0.7;
  }
}

@media (max-width: 360px) {
  .device-frame,
  .device-frame--sm {
    --s: 0.62;
  }
}

/* ==========================================================================
   App surface – mirrors src/theme/semantic.ts
   ========================================================================== */

.app {
  --s-bg: #f2f2f7;
  --s-surface: #ffffff;
  --s-t1: #1c1c1e;
  --s-t2: #636366;
  --s-t3: #8e8e93;
  --s-accent: #6a329f;
  --s-accent-subtle: rgba(106, 50, 159, 0.12);
  --s-on-accent-subtle: #5a2a88;
  --s-on-accent: #ffffff;
  --s-sep: rgba(28, 28, 30, 0.12);
  --s-fill: rgba(142, 142, 147, 0.14);
  --s-warning: #b25000;
  --s-success: #248a3d;
  --s-danger: #d70015;
  --s-chrome: rgba(255, 255, 255, 0.82);
  --s-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);

  position: absolute;
  inset: 0;
  background: var(--s-bg);
  color: var(--s-t1);
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, ui-sans-serif, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.41px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app[data-scheme='dark'] {
  --s-bg: #0d0d0f;
  --s-surface: #1c1c1e;
  --s-t1: #f2f2f7;
  --s-t2: #aeaeb2;
  --s-t3: #8e8e93;
  --s-accent: #ac86d4;
  --s-accent-subtle: rgba(172, 134, 212, 0.22);
  --s-on-accent-subtle: #c9b0e3;
  --s-on-accent: #28133c;
  --s-sep: rgba(255, 255, 255, 0.16);
  --s-fill: rgba(255, 255, 255, 0.12);
  --s-warning: #ff9f0a;
  --s-success: #30d158;
  --s-danger: #ff453a;
  --s-chrome: rgba(28, 28, 30, 0.78);
  --s-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* Screens stack; only the current one is shown. */
.app[hidden] {
  display: none;
}

/* --- Status bar ---------------------------------------------------------- */

.st-bar {
  height: 54px;
  flex: none;
  padding: 0 30px 0 34px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  padding-bottom: 4px;
}

.st-bar time {
  font-variant-numeric: tabular-nums;
}

.st-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-icons svg {
  fill: currentColor;
  height: 12px;
}

/* --- Screen chrome ------------------------------------------------------- */

.ap-head {
  flex: none;
  padding: 6px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ap-title {
  font-size: 34px;
  line-height: 41px;
  font-weight: 700;
  letter-spacing: 0.37px;
}

/*
 * The home header's lockup, at the numbers `Wordmark` actually renders:
 * <Wordmark size={30} />, so 30px type, the mark at 0.76 of that, a 0.075em
 * side bearing and -0.03em tracking. The mockup is a claim about the app, so
 * where the app has real numbers the mockup uses those and not a likeness.
 */
.ap-title--brand {
  font-family: var(--sans);
  font-size: 30px;
  line-height: 37.5px;
  letter-spacing: -0.9px;
  display: inline-flex;
  align-items: baseline;
  gap: 2.25px;
}

.ap-title--brand .mark {
  color: var(--s-accent);
  font-size: 22.8px; /* 0.76 x 30 */
  margin-bottom: -0.36px; /* the terminal's overshoot, 0.012 x 30 */
}

.ap-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--s-fill);
  color: var(--s-accent);
  display: grid;
  place-items: center;
  flex: none;
}

.ap-icon-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.ap-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 92%, transparent 100%);
}

.ap-scroll-inner {
  padding-bottom: 12px;
}

/* Nav bar for pushed screens (contact detail). */
.ap-navbar {
  flex: none;
  height: 44px;
  padding-inline: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--s-sep);
  font-size: 17px;
}

.ap-navbar .back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--s-accent);
  font-size: 17px;
}

.ap-navbar .back svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.ap-navbar .title {
  font-size: 17px;
  font-weight: 600;
}

.ap-navbar .action {
  color: var(--s-accent);
  font-size: 17px;
}

/* --- Cards, rows, sections ---------------------------------------------- */

.ap-stats {
  display: flex;
  gap: 12px;
  padding: 4px 20px 8px;
}

.ap-card {
  background: var(--s-surface);
  border-radius: 16px;
  box-shadow: var(--s-shadow);
}

.ap-stat {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
}

.ap-stat b {
  display: block;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: 0.36px;
  color: var(--s-accent);
  font-variant-numeric: tabular-nums;
}

.ap-stat span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0;
  color: var(--s-t2);
}

.ap-sec {
  padding: 20px 20px 8px;
  font-size: 20px;
  line-height: 25px;
  font-weight: 600;
  letter-spacing: 0.38px;
}

.ap-hscroll {
  display: flex;
  gap: 12px;
  padding: 0 20px 8px;
  overflow: hidden;
}

.ap-fu {
  width: 168px;
  flex: none;
  padding: 14px;
}

.ap-fu .nm {
  margin-top: 8px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-fu .nt {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  color: var(--s-t2);
}

.ap-fu .due {
  margin-top: 6px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--s-warning);
}

.ap-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 0.5px solid var(--s-sep);
}

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

.ap-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.ap-row-name {
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
  letter-spacing: -0.32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-row-when {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  color: var(--s-t3);
  flex: none;
}

.ap-row-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  color: var(--s-t2);
}

.ap-row-meta svg {
  width: 13px;
  height: 13px;
  fill: var(--s-t3);
  flex: none;
}

.ap-row-note {
  margin-top: 1px;
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  color: var(--s-t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-row-note mark {
  background: var(--s-accent-subtle);
  color: var(--s-on-accent-subtle);
  border-radius: 3px;
  padding: 0 1px;
}

.ap-row-name mark {
  background: var(--s-accent-subtle);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

/* --- Avatar -------------------------------------------------------------- */

.av {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.av--sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.av--lg {
  width: 76px;
  height: 76px;
  font-size: 28px;
}

/* --- Tab bar ------------------------------------------------------------- */

.ap-tabs {
  flex: none;
  height: 82px;
  padding: 8px 8px 22px;
  display: flex;
  background: var(--s-chrome);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 0.5px solid var(--s-sep);
}

.ap-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--s-t3);
  font-size: 10px;
  letter-spacing: 0.07px;
  transition: color 0.2s;
}

.ap-tab svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.ap-tab[aria-current='true'] {
  color: var(--s-accent);
}

.ap-home-ind {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  border-radius: 3px;
  background: var(--s-t1);
  opacity: 0.35;
  z-index: 30;
  pointer-events: none;
}

/* --- Search -------------------------------------------------------------- */

.ap-search {
  margin: 0 20px 10px;
  height: 36px;
  border-radius: 10px;
  background: var(--s-fill);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 8px;
  font-size: 17px;
  color: var(--s-t3);
}

.ap-search svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: none;
}

.ap-search .q {
  color: var(--s-t1);
  white-space: nowrap;
  overflow: hidden;
}

.ap-search .caret {
  width: 2px;
  height: 20px;
  background: var(--s-accent);
  flex: none;
  animation: ap-caret 1.06s steps(1, end) infinite;
}

@keyframes ap-caret {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.ap-pills {
  display: flex;
  gap: 8px;
  padding: 0 20px 10px;
}

.ap-pill {
  height: 30px;
  padding-inline: 13px;
  border-radius: 999px;
  background: var(--s-fill);
  color: var(--s-t2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background-color 0.25s,
    color 0.25s;
}

.ap-pill[aria-pressed='true'] {
  background: var(--s-accent);
  color: var(--s-on-accent);
}

.ap-pill .swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ap-hint {
  margin: 2px 20px 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--s-accent-subtle);
  color: var(--s-on-accent-subtle);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: -0.08px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-hint svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  flex: none;
}

.ap-sec-label {
  padding: 12px 20px 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--s-t2);
}

.ap-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--s-t3);
  font-size: 15px;
}

/* --- Record screen ------------------------------------------------------- */

.ap-record {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  min-height: 0;
}

.ap-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.ap-who .lbl {
  font-size: 13px;
  color: var(--s-t2);
  letter-spacing: -0.08px;
}

.ap-who .nm {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.32px;
}

.ap-who .chev {
  margin-left: auto;
  width: 14px;
  height: 14px;
  fill: var(--s-t3);
  flex: none;
}

.ap-mic-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}

.ap-mic {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--s-accent);
  color: var(--s-on-accent);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--s-accent) 55%, transparent);
  transition:
    transform 0.25s var(--ease),
    background-color 0.3s;
  position: relative;
}

.ap-mic svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.ap-mic:hover {
  transform: scale(1.04);
}

.ap-mic[data-on='true'] {
  background: var(--s-danger);
  color: #fff;
}

/* The halo is driven by the same amplitude the bars are, in script – it is
   a level meter, not decoration on a timer. */
.ap-mic::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: calc(var(--amp, 0) * 0.45);
  transform: scale(calc(1 + var(--amp, 0) * 0.14));
  pointer-events: none;
}

.ap-mic-label {
  font-size: 15px;
  letter-spacing: -0.24px;
  color: var(--s-t2);
  min-height: 20px;
}

.ap-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  width: 100%;
}

.ap-wave i {
  display: block;
  width: 3px;
  min-height: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--s-accent);
  opacity: 0.85;
}

.ap-transcript {
  padding: 14px 16px;
  min-height: 104px;
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.32px;
  color: var(--s-t1);
}

.ap-transcript .ph {
  color: var(--s-t3);
}

.ap-transcript .cursor {
  display: inline-block;
  width: 2px;
  height: 17px;
  vertical-align: -3px;
  margin-left: 1px;
  background: var(--s-accent);
  animation: ap-caret 1.06s steps(1, end) infinite;
}

.ap-type-row {
  display: flex;
  gap: 8px;
  padding: 14px 0 10px;
  flex-wrap: wrap;
}

.ap-btn {
  height: 50px;
  border-radius: 14px;
  background: var(--s-accent);
  color: var(--s-on-accent);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.41px;
  display: grid;
  place-items: center;
  width: 100%;
  transition:
    opacity 0.25s,
    transform 0.25s var(--ease);
}

.ap-btn[disabled] {
  opacity: 0.4;
}

.ap-btn:not([disabled]):hover {
  transform: translateY(-1px);
}

/* Toast, as the app shows it. */
.ap-toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 96px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--s-t1);
  color: var(--s-bg);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.24px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s var(--ease),
    transform 0.4s var(--ease);
  z-index: 35;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.ap-toast svg {
  width: 17px;
  height: 17px;
  fill: var(--s-success);
  flex: none;
}

.ap-toast[data-show='true'] {
  opacity: 1;
  transform: none;
}

/* --- Contact detail ------------------------------------------------------ */

.ap-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 20px 16px;
  text-align: center;
}

.ap-profile .nm {
  margin-top: 12px;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: 0.36px;
}

.ap-profile .rl {
  margin-top: 2px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.24px;
  color: var(--s-t2);
}

.ap-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ap-tag {
  height: 26px;
  padding-inline: 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.08px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ap-quick {
  display: flex;
  gap: 10px;
  padding: 0 20px 6px;
}

.ap-quick button {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  background: var(--s-surface);
  box-shadow: var(--s-shadow);
  color: var(--s-accent);
  display: grid;
  place-items: center;
  gap: 2px;
}

.ap-quick svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.ap-quick span {
  font-size: 11px;
  letter-spacing: 0;
}

.ap-field {
  margin: 0 20px;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--s-sep);
}

.ap-field:first-of-type {
  border-radius: 14px 14px 0 0;
}

.ap-field:last-of-type {
  border-bottom: 0;
  border-radius: 0 0 14px 14px;
}

.ap-group {
  margin: 0 20px 4px;
  background: var(--s-surface);
  border-radius: 14px;
  box-shadow: var(--s-shadow);
  overflow: hidden;
}

.ap-group .ap-field {
  margin: 0;
}

.ap-field .k {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--s-t2);
}

.ap-field .v {
  margin-top: 2px;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.41px;
}

/* Follow-up callout inside the detail screen. */
.ap-followup {
  margin: 8px 20px 4px;
  padding: 14px;
  border-radius: 14px;
  background: var(--s-accent-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ap-followup svg {
  width: 22px;
  height: 22px;
  fill: var(--s-on-accent-subtle);
  flex: none;
}

.ap-followup .k,
.ap-followup .v,
.ap-followup .w {
  display: block;
}

.ap-followup .k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--s-on-accent-subtle);
  text-transform: uppercase;
}

.ap-followup .v {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.32px;
  margin-top: 1px;
}

.ap-followup .w {
  font-size: 13px;
  letter-spacing: -0.08px;
  color: var(--s-t2);
}

/* --- Notification (lock-screen style banner) ----------------------------- */

.ap-notif {
  position: absolute;
  top: 60px;
  left: 12px;
  right: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--s-chrome);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 0.5px solid var(--s-sep);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  display: flex;
  gap: 11px;
  align-items: flex-start;
  z-index: 38;
  opacity: 0;
  transform: translateY(-16px) scale(0.97);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.ap-notif[data-show='true'] {
  opacity: 1;
  transform: none;
}

.ap-notif .icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--s-accent);
  color: var(--s-on-accent);
  display: grid;
  place-items: center;
  flex: none;
}

.ap-notif .icon .mark {
  font-size: 22px;
}

.ap-notif .t {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.24px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ap-notif .t span:last-child {
  font-size: 12px;
  font-weight: 400;
  color: var(--s-t3);
  flex: none;
}

.ap-notif .b {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.24px;
  color: var(--s-t2);
  margin-top: 1px;
}

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

.ap-set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 0.5px solid var(--s-sep);
  font-size: 17px;
  letter-spacing: -0.41px;
}

.ap-set-row:last-child {
  border-bottom: 0;
}

.ap-set-row .ic {
  width: 29px;
  height: 29px;
  border-radius: 7px;
  background: var(--s-accent);
  color: var(--s-on-accent);
  display: grid;
  place-items: center;
  flex: none;
}

.ap-set-row .ic svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.ap-set-row .val {
  margin-left: auto;
  color: var(--s-t3);
  font-size: 17px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ap-set-row .val svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.ap-seg {
  margin-left: auto;
  display: inline-flex;
  padding: 2px;
  border-radius: 9px;
  background: var(--s-fill);
  gap: 2px;
}

.ap-seg button {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.08px;
  color: var(--s-t2);
  transition:
    background-color 0.25s,
    color 0.25s;
}

.ap-seg button[aria-pressed='true'] {
  background: var(--s-surface);
  color: var(--s-t1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

/* --- Mockup control strip ------------------------------------------------ */

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* The dark-mode control, built as the switch iOS uses in Settings: a track
   that fills with the accent and a knob that slides across. Height matches
   the segmented control beside it. */
.scheme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 5px 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--t2);
  transition:
    border-color 0.25s,
    color 0.25s;
}

.scheme-switch:hover {
  color: var(--t1);
  border-color: var(--line-strong);
}

.scheme-switch svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.switch-track {
  position: relative;
  width: 46px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 0.3s var(--ease);
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.2);
  /* Apple's own switch curve. `--ease` is front-loaded enough that the knob
     is 96% across by 150ms, which reads as a jump rather than a slide. */
  transition:
    transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.2s cubic-bezier(0.32, 0.72, 0, 1);
}

.scheme-switch[aria-checked='true'] .switch-track {
  background: var(--violet);
}

.scheme-switch[aria-checked='true'] .switch-knob {
  transform: translateX(18px);
}

/* iOS stretches the knob while the thumb is down. Held from the correct edge
   in each state so the pill grows inwards rather than off the track. */
.scheme-switch:active .switch-knob {
  width: 29px;
}

.scheme-switch[aria-checked='true']:active .switch-knob {
  transform: translateX(13px);
}

@media (prefers-reduced-motion: reduce) {
  .switch-knob {
    transition: none;
  }
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal-head {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.legal-head .updated {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--t3);
}

.legal {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 6vw, 5rem) var(--gap-section);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 6rem;
  font-size: 0.875rem;
}

.legal-toc p {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t3);
  margin-bottom: 1rem;
}

.legal-toc ol {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  counter-reset: toc;
}

.legal-toc a {
  color: var(--t2);
  transition: color 0.2s;
}

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

.legal-body {
  max-width: 68ch;
}

.legal-body h2 {
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 6rem;
}

.legal-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-body p {
  margin-top: 1rem;
  color: var(--t2);
}

.legal-body ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
  padding-left: 1.1rem;
}

.legal-body li {
  color: var(--t2);
}

.legal-body li::marker {
  color: var(--violet);
}

.legal-body strong {
  color: var(--t1);
  font-weight: 600;
}

.legal-body a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal-callout {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--violet-wash);
  color: var(--violet-deep);
  font-weight: 500;
}

.legal-callout p {
  color: inherit;
  margin-top: 0;
}

@media (max-width: 900px) {
  .legal {
    grid-template-columns: 1fr;
  }
  .legal-toc {
    position: static;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
  }
  .legal-toc ol {
    grid-auto-flow: row;
  }
}
