/* KeySigner public site: home, pricing and start.
   System fonts and locally served connection logos. The look is a signing instrument: ruled
   lines, mono field labels, and one credential above a visible boundary.
   Colors stay in the console's teal family. */

:root {
  color-scheme: light dark;
  --paper: light-dark(#F2F3EE, #0C1211);
  --surface: light-dark(#FBFBF8, #141C1A);
  --surface-2: light-dark(#E7EAE4, #1D2826);
  --ink: light-dark(#12201C, #EAEFEB);
  --muted: light-dark(#4C5A55, #A9B6B1);
  --line: light-dark(#D6DBD4, #28332F);
  --line-strong: light-dark(#ABB5AE, #475651);
  --control: light-dark(#6F7D77, #748781);
  --accent: light-dark(#0B5F58, #6AD3C4);
  --accent-strong: light-dark(#07443F, #9BE6DA);
  --accent-ink: light-dark(#FFFFFF, #07120F);
  --accent-soft: light-dark(#DAECE6, #12332F);
  --signal: light-dark(#8A4309, #F0AB66);
  --signal-soft: light-dark(#F7E8D6, #33240F);
  --good: light-dark(#14602F, #74D69E);
  --good-soft: light-dark(#DDF0E2, #14301F);
  --warn: light-dark(#6F4800, #E8C15A);
  --warn-soft: light-dark(#F8EED1, #33290F);
  --bad: light-dark(#A61F15, #F4978E);
  --bad-soft: light-dark(#FAE3E0, #3A1A17);
  /* light-dark() takes colors only, so shadows switch by theme selector below. */
  --shadow-light: 0 1px 1px rgb(18 32 28 / 5%), 0 18px 40px -28px rgb(18 32 28 / 35%);
  --shadow-dark: 0 1px 1px rgb(0 0 0 / 30%), 0 20px 44px -28px rgb(0 0 0 / 80%);
  --shadow: var(--shadow-light);

  /* The closing band and the enforce level stay deep in both modes; dark mode adds a bright edge so they lift off the page. */
  --deep: light-dark(#0A3531, #0E4640);
  --deep-edge: light-dark(#0A3531, #6AD3C4);
  --deep-bar: light-dark(#F2F3EE, #6AD3C4);
  --on-deep: #F2F3EE;
  --on-deep-muted: #C2D4CE;
  --on-deep-line: #2F5F59;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, "Bitstream Charter", "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 5px;
  --radius-lg: 9px;
  --gutter: 16px;
  --wrap: 1240px;
  --header-h: 64px;

  /* Two display sizes for everything below a section heading. */
  --type-card: 1.625rem;
  --type-sub: 1.3125rem;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; --shadow: var(--shadow-dark); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --shadow: var(--shadow-dark); }
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 40px; }
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-sans);
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
main:focus { outline: none; }
/* Step headings take focus from script so screen readers announce the new step; they are not controls. */
[data-step] h2:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--paper); }

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

/* ---------- Type helpers ---------- */

.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}

.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.button:hover { border-color: var(--ink); background: var(--surface-2); color: var(--ink); }
.button:active:not([disabled], [aria-disabled="true"]) { transform: translateY(1px); }
.button[disabled],
.button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.button-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-ink);
}

.button-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding-inline: 10px;
}
.button-quiet:hover { background: transparent; border-color: transparent; color: var(--accent-strong); text-decoration: underline; }

.button-block { width: 100%; }

.button[data-busy="true"]::after {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow::after { content: "\00a0\2192"; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header and menu ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: var(--header-h);
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: -0.005em;
}
.brand:hover { color: var(--ink); }

/* Use the lock-and-nib icon from the installed console. */
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: center / contain no-repeat url("/keysigner-icon.png");
  flex: none;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle:hover { border-color: var(--ink); background: var(--surface-2); }
.menu-toggle-label { display: inline-block; min-width: 5ch; text-align: left; }
.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 16px; height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 160ms ease, background-color 160ms ease;
}
.menu-toggle-icon { position: relative; }
.menu-toggle-icon::before,
.menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle-icon::before { top: -5px; }
.menu-toggle-icon::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { background: var(--ink); transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { background: var(--ink); transform: translateY(-5px) rotate(-45deg); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a:not(.button) {
  display: inline-block;
  padding: 11px 0;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:not(.button):hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.site-nav a.button[aria-current="page"] { border-radius: 0; }
.nav-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* The menu collapses only where scripts can run to reopen it, so the
   links stay reachable with scripting off. */
@media (max-width: 859px) and (scripting: none) {
  .site-header { position: static; }
}
@media (max-width: 859px) and (scripting: enabled) {
  .site-header .menu-toggle { display: inline-flex; }
  .site-header .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8px 0 16px;
  }
  .site-header:not([data-menu-open]) .site-nav { display: none; }
  .site-header .site-nav ul { flex-direction: column; gap: 0; }
  .site-header .site-nav a:not(.button) {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .site-header .site-nav a[aria-current="page"] { box-shadow: none; font-weight: 700; }
  .site-header .nav-actions .button { flex: 1 1 120px; }
}

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

main { display: block; }

.section { padding-block: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.section-tint { background: var(--surface); }

.section-head {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-bottom: 40px;
  max-width: 70ch;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.55rem + 1.9vw, 3.125rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

@media (min-width: 1024px) {
  .section { padding-block: 96px; }
  .section-head { margin-bottom: 48px; }
}

/* The first section under a page header continues it. */
.page-head + .section { padding-top: 0; }

/* Wide screens set the heading against its lede instead of leaving the right half empty. */
@media (min-width: 1100px) {
  .section:not(#powers, #faq, #plans) > .wrap:not(.split) > .section-head:has(> .lede) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: 72px;
    align-items: end;
    max-width: none;
  }
  #protected .section-head > :is(h2, .lede) { align-self: start; }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.split-body { display: grid; gap: 24px; min-width: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .split .section-head {
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }
}

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

.hero { padding-block: 20px 72px; overflow-x: clip; }
.hero-stack {
  display: grid;
  grid-template-areas: "demo" "title" "side";
  justify-items: center;
  gap: 20px;
  text-align: center;
}
.hero-title { grid-area: title; }
.hero-side { grid-area: side; }
.hero-stack > .demo { grid-area: demo; margin-bottom: 20px; }
.hero-copy { display: grid; gap: 20px; justify-items: center; max-width: 760px; min-width: 0; }
.hero-copy .lede { max-width: 46ch; }
.hero-copy .actions { justify-content: center; }
/* On a desktop the words sit either side of the phone, so the phone can run the full screen height. */
@media (min-width: 1000px) {
  .hero { padding-block: 16px 72px; }
  .hero-stack {
    grid-template-areas: "title demo side";
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(32px, 4vw, 64px);
  }
  .hero-stack > .demo { margin-bottom: 0; }
  .hero-title { justify-self: end; text-align: right; justify-items: end; }
  .hero-side { justify-self: start; text-align: left; justify-items: start; }
  .hero-side .actions { justify-content: flex-start; }
  .hero h1 { font-size: clamp(2.5rem, 0.25rem + 3.4vw, 4rem); }
  .hero h1 em { display: block; }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.75rem + 3.5vw, 4.5rem);
  letter-spacing: -0.022em;
  line-height: 1.03;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

@media (max-width: 559px) {
  .hero-copy .actions { justify-self: stretch; }
  .hero-copy .actions .button,
  .band .actions .button { flex: 1 1 140px; }
}

/* ---------- Hero phone: the real iPhone app, one request start to finish ---------- */
/* The phone reproduces the KeySigner iPhone app's own screens: the lock-screen
   notification, the request sheet with Hold to approve, the system Face ID and
   NFC prompts, the Devices tab, the recovery review and the Accounts tab.
   The script moves data-scene/data-phase on the figure and data-key-state on each
   key row; everything visible here follows from those attributes. Sizes are in cqi
   so 1 iOS point is 1/3.93 cqi on a 393-point-wide screen. */

:root { --gmail-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='52 42 88 66'%3E%3Cpath fill='%234285f4' d='M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6'/%3E%3Cpath fill='%2334a853' d='M120 108h14c3.32 0 6-2.69 6-6V59l-20 15'/%3E%3Cpath fill='%23fbbc04' d='M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2'/%3E%3Cpath fill='%23ea4335' d='M72 74V48l24 18 24-18v26L96 92'/%3E%3Cpath fill='%23c5221f' d='M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2'/%3E%3C/svg%3E"); }
.gmail-mark { display: inline-block; flex: none; aspect-ratio: 88 / 66; background: var(--gmail-mark) center / contain no-repeat; }

.demo {
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
  animation: demo-rise 1100ms cubic-bezier(0.16, 1, 0.3, 1) 150ms both;
}
@keyframes demo-rise { from { opacity: 0; transform: translateY(120px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .demo { animation: none; } }

.phone {
  position: relative;
  /* On a phone the step words and the whole phone share the first screen. */
  width: clamp(240px, calc((100svh - var(--header-h, 67px) - 215px) * 393 / 852), min(460px, 90vw));
  aspect-ratio: 393 / 852;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(145deg, #3A3D3C, #161817 40%, #2B2E2D);
  box-shadow: 0 0 0 1.5px #55595A inset, 0 30px 60px -24px rgb(10 20 18 / 0.45), 0 12px 24px -12px rgb(10 20 18 / 0.3);
}
/* On a desktop the phone runs from just under the header to the bottom of the screen. */
@media (min-width: 1000px) {
  /* The caption under the phone shares its width; the reserve covers it and the examples. */
  .demo { --phone-w: clamp(200px, calc((100svh - var(--header-h, 67px) - 124px) * 393 / 852), 560px); }
  .phone { width: var(--phone-w); }
}
.phone-button {
  position: absolute;
  inset-inline-end: -3px;
  top: 26%;
  width: 3px;
  height: 12%;
  border-radius: 0 3px 3px 0;
  background: #2B2E2D;
}

.ios {
  --ios-bg: #F2F2F7;
  --ios-card: #FFFFFF;
  --ios-label: #000000;
  --ios-muted: rgb(60 60 67 / 0.82);
  --ios-sep: rgb(60 60 67 / 0.16);
  --ios-tint: #0D786E;
  --ios-tint-soft: rgb(13 120 110 / 0.16);
  --ios-deny: #CC2E29;
  --ios-caution: #CC8005;
  --ios-caution-bg: #F2E9DE;
  --ios-caution-text: #8C5203;
  --ios-good-bg: #E3F1EC;
  --ios-good: #0D786E;
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 43px;
  background: var(--ios-bg);
  color: var(--ios-label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans);
  font-size: 4.33cqi;
  line-height: 1.25;
  letter-spacing: -0.01em;
  container-type: inline-size;
  isolation: isolate;
}
.ios p, .ios h3 { margin: 0; }
.ios b { font-weight: 600; }

/* Status bar and home indicator */
.ios-status {
  position: absolute;
  z-index: 20;
  inset: 0 0 auto;
  height: 13cqi;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1cqi 7cqi 0 9cqi;
  font-size: 4.3cqi;
  font-weight: 600;
  color: var(--ios-label);
  transition: color 300ms ease;
}
.ios-island { width: 31cqi; height: 9.3cqi; border-radius: 99px; background: #000; }
.ios-icons { display: flex; justify-self: end; align-items: center; gap: 1.4cqi; }
.ios-icons svg { width: 4.6cqi; height: 3.1cqi; fill: currentColor; }
.ios-battery { width: 6.6cqi; height: 3.2cqi; padding: 0.5cqi; border: 1px solid color-mix(in srgb, currentColor 45%, transparent); border-radius: 1.1cqi; }
.ios-battery i { display: block; width: 80%; height: 100%; border-radius: 0.5cqi; background: currentColor; }
.ios-home { position: absolute; z-index: 30; inset-inline: 34%; bottom: 2cqi; height: 1.3cqi; border-radius: 99px; background: #000; transition: background 300ms ease; }

/* Lock screen */
.ios-lock {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: 18cqi 4cqi 0;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(120% 70% at 20% 0%, #2F8F80 0%, transparent 60%),
    radial-gradient(90% 60% at 100% 100%, #C9A15A 0%, transparent 70%),
    linear-gradient(170deg, #0F4A44, #133A3F 55%, #2D3A2E);
  transition: none;
}
.ios-lock-date { font-size: 4.8cqi; font-weight: 600; opacity: 0.9; }
.ios-lock-time { font-size: 24cqi; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-top: 0.5cqi; }
.ios-notice {
  display: flex;
  gap: 2.6cqi;
  margin-top: 46cqi;
  padding: 3.4cqi;
  border-radius: 6.5cqi;
  text-align: start;
  color: #000;
  background: rgb(246 246 246 / 0.72);
  backdrop-filter: blur(12px) saturate(1.6);
  opacity: 0;
  transform: translateY(6cqi) scale(0.96);
  transition: transform 450ms cubic-bezier(.2,1.2,.4,1), opacity 300ms ease;
}
.ios-app-icon {
  flex: none;
  width: 9.5cqi;
  height: 9.5cqi;
  border-radius: 2.3cqi;
  background: linear-gradient(160deg, #1A9384, #0B5F57) center / cover;
  position: relative;
}
.ios-app-icon::before {
  content: "";
  position: absolute;
  inset: 27% 22% 27% 22%;
  border: 0.9cqi solid #fff;
  border-radius: 50% 0 0 50%;
  border-inline-end: 0;
  width: 30%;
}
.ios-app-icon::after { content: ""; position: absolute; top: 46%; left: 50%; width: 32%; height: 0.9cqi; background: #fff; border-radius: 1px; }
.ios-notice-text { min-width: 0; flex: 1; font-size: 4.3cqi; }
.ios-notice-head { display: flex; justify-content: space-between; gap: 2cqi; }
.ios-notice-head span { color: rgb(0 0 0 / 0.5); font-size: 3.8cqi; }
.ios-lock-tools { position: absolute; inset: auto 12cqi 10cqi; display: flex; justify-content: space-between; }
.ios-lock-tools span { width: 12.5cqi; height: 12.5cqi; border-radius: 50%; background: rgb(255 255 255 / 0.18); backdrop-filter: blur(8px); }

/* App and tabs */
.ios-app { position: absolute; inset: 0; transition: transform 420ms cubic-bezier(.3,.7,.2,1), filter 420ms ease, border-radius 420ms ease; transform-origin: 50% 0; }
.ios-tab { position: absolute; inset: 0; padding: 14cqi 4.5cqi 24cqi; opacity: 0; visibility: hidden; }
.ios-large { font-size: 8.7cqi; font-weight: 700; letter-spacing: -0.02em; margin: 3cqi 0 3cqi 1cqi; }
.ios-section { display: flex; justify-content: space-between; align-items: baseline; padding: 3cqi 4cqi 1.6cqi; font-size: 3.8cqi; color: var(--ios-muted); text-transform: none; }
.ios-rule { font-weight: 600; color: var(--ios-tint); }
.ios-foot { padding: 1.5cqi 4cqi 0; font-size: 3.6cqi; color: var(--ios-muted); }
.ios-card { background: var(--ios-card); border-radius: 6cqi; padding: 0 4cqi; }
.ios-row { display: flex; align-items: center; gap: 3cqi; min-height: 13cqi; padding: 2.2cqi 0; border-top: 0.5px solid var(--ios-sep); transition: opacity 300ms ease; }
.ios-card > .ios-row:first-child, .ios-card > [data-key-state="hidden"] + .ios-row { border-top: 0; }
.ios-row-text { display: grid; flex: 1; min-width: 0; }
.ios-row-text b { font-size: 4.5cqi; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-row-text small { font-size: 3.7cqi; color: var(--ios-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-row-meta { font-size: 3.7cqi; color: var(--ios-muted); align-self: start; padding-top: 0.6cqi; }
.ios-chev { width: 1.9cqi; height: 1.9cqi; border: solid rgb(60 60 67 / 0.5); border-width: 0.6cqi 0.6cqi 0 0; transform: rotate(45deg); margin-inline-end: 1cqi; }
.ios-pill { font-size: 3.5cqi; font-weight: 600; padding: 0.8cqi 2.2cqi; border-radius: 99px; color: var(--ios-good); background: var(--ios-good-bg); }
.ios-same { font-size: 3.7cqi; font-weight: 600; color: var(--ios-good); }
.ios-strike { text-decoration: line-through; color: var(--ios-muted); }
.ios-bad-text { color: var(--ios-deny) !important; font-weight: 600; }

/* Kind glyphs: rounded gradient squares with a white symbol, as in the app */
.ios-glyph { position: relative; flex: none; width: 10cqi; height: 10cqi; border-radius: 2.8cqi; background: linear-gradient(160deg, #18A79E, #0E7F7A); }
.ios-glyph-lg { width: 14.8cqi; height: 14.8cqi; border-radius: 4.1cqi; }
.ios-glyph-git { background: linear-gradient(160deg, #F07B3F, #C9531F); }
.ios-glyph-net { background: linear-gradient(160deg, #3E4A55, #1E262E); }
.ios-glyph::before, .ios-glyph::after { content: ""; position: absolute; }
.ios-glyph-git::before { left: 30%; top: 24%; width: 0.8cqi; height: 52%; background: #fff; }
.ios-glyph-git::after { left: 48%; top: 22%; width: 22%; height: 22%; border: 0.8cqi solid #fff; border-radius: 50%; }
.ios-glyph-net::before { inset: 24%; background: radial-gradient(circle, #fff 0 12%, transparent 13%) 0 0 / 33.3% 33.3%; }
.ios-glyph-mail { background: #fff var(--gmail-mark) center / 62% auto no-repeat; box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 0.14); }
.ios-glyph-mail::before, .ios-glyph-mail::after { content: none; }
.ios-glyph-coin { background: linear-gradient(160deg, #7C82A8, #4A4F73); }
.ios-glyph-coin::before { left: 32%; top: 18%; width: 36%; height: 64%; background: #fff; clip-path: polygon(50% 0, 100% 52%, 50% 76%, 0 52%); }
.ios-glyph-coin::after { left: 32%; top: 18%; width: 36%; height: 64%; background: #fff; opacity: 0.7; clip-path: polygon(0 60%, 50% 84%, 100% 60%, 50% 100%); }

/* Device symbols */
.ios-dev { position: relative; flex: none; width: 7cqi; height: 7cqi; color: var(--ios-tint); }
.ios-dev::before { content: ""; position: absolute; box-sizing: border-box; border: 0.6cqi solid currentColor; }
.ios-dev-phone::before { inset: 0 20%; border-radius: 1.2cqi; }
.ios-dev-yubi::before { inset: 0 28% 0 28%; border-radius: 1cqi 1cqi 1.8cqi 1.8cqi; }
.ios-dev-yubi::after { content: ""; position: absolute; left: 50%; top: 30%; width: 1.6cqi; height: 1.6cqi; margin-left: -0.8cqi; border-radius: 50%; background: currentColor; }

/* Tab bar: floating glass, selected tab in a gray pill */
.ios-tabbar {
  position: absolute;
  inset: auto 3.5cqi 5cqi;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 1.2cqi;
  border-radius: 99px;
  background: rgb(250 250 252 / 0.82);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 4px 18px rgb(0 0 0 / 0.08);
}
.ios-tabitem { display: grid; justify-items: center; gap: 0.6cqi; padding: 1.4cqi 0 1.2cqi; border-radius: 99px; font-size: 2.8cqi; font-weight: 600; color: #1C1C1E; white-space: nowrap; transition: background 250ms ease, color 250ms ease; }
.ti { position: relative; width: 5.6cqi; height: 5.6cqi; border-radius: 1.2cqi; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ti-inbox { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16l3 11v6a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-6zm2 2-2.4 8H8l1.5 3h5L16 13h4.4L18 5z'/%3E%3C/svg%3E"); }
.ti-accounts { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 1h14v2H5zM3 4h18v2H3zm-1 3h20a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm10 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-5 11h10a5 5 0 0 0-10 0z'/%3E%3C/svg%3E"); }
.ti-auth { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1 3 4.5V11c0 5.6 3.8 10.3 9 12 5.2-1.7 9-6.4 9-12V4.5zm0 6a3 3 0 0 1 3 3v1h1v6H8v-6h1v-1a3 3 0 0 1 3-3zm0 2a1 1 0 0 0-1 1v1h2v-1a1 1 0 0 0-1-1z'/%3E%3C/svg%3E"); }
.ti-devices { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 1h8a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H8a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3zm0 2a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-1.5l-.5 1h-4l-.5-1z'/%3E%3C/svg%3E"); }
.ti-you { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 0 0 22 11 11 0 0 0 0-22zm0 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 16a9 9 0 0 1-6.6-2.9C6.8 15.6 9.2 14.5 12 14.5s5.2 1.1 6.6 3.6A9 9 0 0 1 12 21z'/%3E%3C/svg%3E"); }
.ios-badge { position: absolute; top: -1.6cqi; right: -2.6cqi; min-width: 4cqi; height: 4cqi; padding: 0 1cqi; border-radius: 99px; background: #FF3B30; color: #fff; font: 600 2.6cqi/4cqi var(--font-sans); font-style: normal; text-align: center; -webkit-mask: none; mask: none; }
.ti-inbox { -webkit-mask: none; mask: none; background: none; }
.ti-inbox::before { content: ""; position: absolute; inset: 0; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }

/* Sheets */
.ios-sheet {
  position: absolute;
  z-index: 5;
  inset: 15cqi 0 0;
  display: flex;
  flex-direction: column;
  padding: 0 4.5cqi;
  border-radius: 9cqi 9cqi 0 0;
  background: var(--ios-bg);
  box-shadow: 0 -1px 0 rgb(0 0 0 / 0.04), 0 -10px 30px rgb(0 0 0 / 0.12);
  transform: translateY(105%);
  transition: transform 480ms cubic-bezier(.3,.8,.2,1);
}
.ios-grabber { align-self: center; width: 9.5cqi; height: 1.3cqi; margin-top: 2cqi; border-radius: 99px; background: rgb(60 60 67 / 0.3); }
.ios-nav { position: relative; display: flex; justify-content: center; align-items: center; min-height: 12cqi; font-size: 4.3cqi; }
.ios-close { position: absolute; inset-inline-start: 0; padding: 2cqi 4cqi; border-radius: 99px; color: var(--ios-tint); background: rgb(255 255 255 / 0.85); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.08), 0 2px 6px rgb(0 0 0 / 0.06); font-size: 4.1cqi; }
.ios-head { display: flex; gap: 3.6cqi; align-items: center; margin: 2cqi 0 3.5cqi; }
.ios-head-title { font-size: 5.6cqi; font-weight: 700; letter-spacing: -0.02em; }
.ios-head-sub { font-size: 4cqi; color: var(--ios-muted); }
.ios-facts { padding-block: 0.6cqi; }
.ios-facts > div { display: flex; justify-content: space-between; gap: 3cqi; padding: 2.6cqi 0; border-top: 0.5px solid var(--ios-sep); font-size: 4.1cqi; }
.ios-facts > div:first-child { border-top: 0; }
.ios-facts span { color: var(--ios-muted); }
.ios-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 3.9cqi; }
.ios-match { color: var(--ios-good); }
.ios-match::before { content: "✓ "; }

.ios-approvals { margin-top: 3cqi; padding-block: 1.6cqi; }
.ios-approvals .ios-caption { display: flex; justify-content: space-between; padding: 1cqi 0 1.4cqi; font-size: 3.7cqi; color: var(--ios-muted); }
.ios-approvals .ios-caption span:last-child { font-weight: 600; color: var(--ios-tint); }
.ios-approvals > div { display: flex; align-items: center; gap: 2.4cqi; padding: 1.7cqi 0; font-size: 4.1cqi; }
.ios-approvals > div > span:nth-child(2) { flex: 1; }
.ios-approvals .ios-dev { width: 5.6cqi; height: 5.6cqi; color: var(--ios-muted); }
.ios-approvals em { font-style: normal; font-size: 3.9cqi; font-weight: 500; color: rgb(60 60 67 / 0.92); display: inline-flex; align-items: center; gap: 1.2cqi; }
.ios-approvals em::before { content: ""; width: 4.2cqi; height: 4.2cqi; border-radius: 50%; border: 0.6cqi solid rgb(60 60 67 / 0.75); box-sizing: border-box; }
.ios-approvals [data-key-state="signed"] em { color: var(--ios-good); font-size: 0; }
.ios-approvals [data-key-state="signed"] em::after { content: "Signed"; font-size: 3.9cqi; font-weight: 600; order: 2; }
.ios-approvals [data-key-state="signed"] em::before { border: 0; background: var(--ios-good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; animation: ios-pop 320ms cubic-bezier(.2,1.5,.4,1); }
.ios-approvals [data-key-state="signed"] .ios-dev { color: var(--ios-good); }

.ios-bottom { position: relative; margin-top: auto; display: grid; gap: 2.4cqi; padding: 3.5cqi 0 9cqi; }
.ios-hold { position: relative; display: grid; place-items: center; height: 14.3cqi; overflow: hidden; border-radius: 99px; background: var(--ios-tint-soft); color: var(--ios-tint); font-size: 4.3cqi; font-weight: 600; }
.ios-hold-fill { position: absolute; inset: 0; background: var(--ios-tint); transform: scaleX(0); transform-origin: left; }
.ios-hold-label { position: relative; display: inline-flex; align-items: center; gap: 1.6cqi; }
.ios-hold-label::before { content: ""; width: 4.4cqi; height: 4.4cqi; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2a2 2 0 0 1 2 2v6.2l.6-.1a2 2 0 0 1 2.2 1.1l.1.2.3-.1a2 2 0 0 1 2.4 1l.1.3h.3a2 2 0 0 1 2 2V18a5 5 0 0 1-5 5h-2.5a5 5 0 0 1-4-2l-3.4-4.6a1.8 1.8 0 0 1 2.7-2.4L7 15V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2a2 2 0 0 1 2 2v6.2l.6-.1a2 2 0 0 1 2.2 1.1l.1.2.3-.1a2 2 0 0 1 2.4 1l.1.3h.3a2 2 0 0 1 2 2V18a5 5 0 0 1-5 5h-2.5a5 5 0 0 1-4-2l-3.4-4.6a1.8 1.8 0 0 1 2.7-2.4L7 15V4a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.ios-deny { justify-self: center; padding: 1cqi; font-size: 4.3cqi; font-weight: 600; color: var(--ios-deny); }
.ios-button { display: grid; place-items: center; height: 12.5cqi; padding: 0 5cqi; border-radius: 99px; font-size: 4.1cqi; font-weight: 600; }
.ios-button-fill { background: var(--ios-tint); color: #fff; }
.ios-button-tint { margin-top: 3cqi; justify-self: center; width: max-content; background: var(--ios-tint-soft); color: var(--ios-tint); }
.ios-tab-devices { display: grid; align-content: start; }
.ios-tab-devices .ios-button { justify-self: center; }

.ios-callout { display: flex; gap: 2.4cqi; align-items: start; padding: 3.2cqi 3.6cqi; border-radius: 4.5cqi; background: var(--ios-caution-bg); font-size: 4.1cqi; }
.ios-callout-good { background: var(--ios-good-bg); }
.ios-warn, .ios-done { flex: none; width: 4.6cqi; height: 4.6cqi; margin-top: 0.2cqi; }
.ios-warn { background: var(--ios-caution); clip-path: polygon(50% 4%, 98% 92%, 2% 92%); position: relative; }
.ios-warn::after { content: "!"; position: absolute; inset: 22% 0 0; text-align: center; color: #fff; font: 800 2.8cqi/1 var(--font-sans); }
.ios-done { border-radius: 50%; background: var(--ios-good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.6L12 5.6' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat; }
.ios-tab-accounts .ios-callout { margin-bottom: 4cqi; }
.result-lost { margin-top: 3.5cqi; }
.result-signed { position: absolute; inset: 3.5cqi 0 auto; opacity: 0; transform: translateY(3cqi); transition: opacity 300ms ease, transform 300ms ease; }

/* Key rows in Devices */
.ios-ok, .ios-bad { display: inline; }
.ios-bad { display: none; color: var(--ios-deny); font-weight: 600; }
[data-key-state="lost"] .ios-ok { display: none; }
[data-key-state="lost"] .ios-bad { display: inline; }
.ios-row[data-key-state="lost"] .ios-dev { color: var(--ios-deny); }
.ios-row[data-key-state="lost"] b { color: var(--ios-muted); }
.ios-row[data-key-state="hidden"], .ios-row[data-key-state="gone"] { display: none; }
.ios-row[data-key-state="arriving"] { animation: ios-arrive 500ms ease both; }

/* System Face ID HUD */
.ios-faceid {
  position: absolute;
  z-index: 15;
  left: 50%;
  top: 44%;
  display: grid;
  justify-items: center;
  gap: 3cqi;
  width: 40cqi;
  padding: 7cqi 0 5cqi;
  border-radius: 8cqi;
  background: rgb(30 30 32 / 0.86);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 3.8cqi;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 220ms ease, transform 220ms ease;
}
.ios-faceid svg { width: 19cqi; height: 19cqi; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.fid-ring, .fid-check { opacity: 0; }
.fid-check { stroke: #34C759; stroke-width: 4; stroke-dasharray: 40; stroke-dashoffset: 40; }
.fid-ring { stroke: #34C759; }

/* System NFC sheet */
.ios-nfc {
  position: absolute;
  z-index: 15;
  inset: auto 2.5cqi 2.5cqi;
  display: grid;
  justify-items: center;
  gap: 3cqi;
  padding: 6cqi 5cqi 5cqi;
  border-radius: 11cqi;
  background: #FFFFFF;
  box-shadow: 0 -2px 30px rgb(0 0 0 / 0.18);
  transform: translateY(110%);
  transition: transform 420ms cubic-bezier(.3,.8,.2,1);
}
.ios-nfc-title { font-size: 6.6cqi; font-weight: 500; color: rgb(60 60 67 / 0.82); }
.ios-nfc-art { position: relative; width: 22cqi; height: 22cqi; }
.ios-nfc-art svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #0A84FF; stroke-width: 3; stroke-linecap: round; transition: opacity 250ms ease; }
.ios-nfc-done { opacity: 0; }
.ios-nfc-done path { stroke-dasharray: 40; stroke-dashoffset: 40; }
.ios-nfc-text { font-size: 4.4cqi; text-align: center; min-height: 2.5em; }
.ios-nfc-cancel { display: grid; place-items: center; width: 100%; height: 12cqi; border-radius: 4cqi; background: #E9E9EB; font-size: 4.2cqi; font-weight: 600; }

/* Safari on Google's sign-in page */
.ios-tab-safari { padding: 14cqi 0 0; background: #fff; }
.gsi { display: grid; gap: 3cqi; padding: 4cqi 6cqi; color: #1F1F1F; text-align: left; }
.gsi-mark { width: 9cqi; }
.gsi-step { display: grid; gap: 2.4cqi; }
.gsi-title { margin: 1cqi 0 0; font: 400 7.6cqi/1.15 var(--font-sans); letter-spacing: 0; color: #1F1F1F; }
.gsi-sub { margin: 0; font-size: 4.1cqi; color: #444746; }
.gsi-field { position: relative; margin-top: 5cqi; padding: 4cqi 3.6cqi; border: 0.5cqi solid #0B57D0; border-radius: 1.4cqi; font-size: 4.3cqi; }
.gsi-label { position: absolute; top: -2.2cqi; left: 2.6cqi; padding: 0 1cqi; background: #fff; font-size: 3.1cqi; color: #0B57D0; }
.gsi-link { margin: 0; font-size: 3.9cqi; font-weight: 600; color: #0B57D0; }
.gsi-chip { display: inline-flex; align-items: center; gap: 1.6cqi; justify-self: start; margin: 0; padding: 0.8cqi 3cqi 0.8cqi 0.8cqi; border: 0.3cqi solid #C4C7C5; border-radius: 99px; font-size: 3.8cqi; font-weight: 600; }
.gsi-avatar { display: grid; place-items: center; width: 5.4cqi; height: 5.4cqi; border-radius: 50%; background: #7B1FA2; color: #fff; font-size: 3cqi; }
.gsi-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8cqi; }
.gsi-next { padding: 2.6cqi 6cqi; border-radius: 99px; background: #0B57D0; color: #fff; font-size: 3.9cqi; font-weight: 600; }
.gsi-step-passkey { display: none; }
.ios-urlbar { position: absolute; inset: auto 4cqi 7cqi; display: flex; align-items: center; justify-content: space-between; height: 11cqi; padding: 0 4cqi; border-radius: 99px; background: rgb(242 242 247 / 0.94); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.1), 0 4px 18px rgb(0 0 0 / 0.08); font-size: 3.9cqi; color: #1C1C1E; }
.ios-urlbar-aa { font-size: 3.4cqi; font-weight: 600; }
.ios-urlbar-host { display: inline-flex; align-items: center; gap: 1.2cqi; }
.ios-urlbar-host svg { width: 2.4cqi; fill: currentColor; opacity: 0.6; }
.ios-urlbar-reload { width: 3.6cqi; height: 3.6cqi; border: 0.45cqi solid currentColor; border-top-color: transparent; border-radius: 50%; opacity: 0.7; }

/* System passkey sheet */
.ios-passkey {
  position: absolute;
  z-index: 15;
  inset: auto 2.5cqi 2.5cqi;
  display: grid;
  justify-items: center;
  gap: 3.4cqi;
  padding: 7cqi 5cqi 5cqi;
  border-radius: 11cqi;
  background: #fff;
  color: #000;
  box-shadow: 0 -2px 30px rgb(0 0 0 / 0.18);
  transform: translateY(110%);
  transition: transform 420ms cubic-bezier(.3,.8,.2,1);
}
.ios-passkey-close { position: absolute; top: 4cqi; right: 4cqi; width: 7cqi; height: 7cqi; border-radius: 50%; background: #E9E9EB; }
.ios-passkey-close::before, .ios-passkey-close::after { content: ""; position: absolute; left: 30%; top: 47%; width: 40%; height: 0.6cqi; border-radius: 1px; background: #8A8A8E; transform: rotate(45deg); }
.ios-passkey-close::after { transform: rotate(-45deg); }
.ios-passkey-icon svg { width: 12cqi; height: 12cqi; fill: none; stroke: #0A84FF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ios-passkey-title { margin: 0; font-size: 5.2cqi; font-weight: 600; text-align: center; }
.ios-passkey-account { display: flex; align-items: center; gap: 3cqi; width: 100%; padding: 3cqi 3.6cqi; border-radius: 4cqi; background: #F2F2F7; }
.ios-passkey-account .ios-app-icon { position: relative; flex: none; width: 10cqi; height: 10cqi; border-radius: 2.6cqi; }
.ios-passkey-account span:last-child { display: grid; gap: 0.6cqi; }
.ios-passkey-account b { font-size: 4.2cqi; font-weight: 600; }
.ios-passkey-account small { font-size: 3.6cqi; color: var(--ios-muted); }
.ios-passkey-go { display: grid; place-items: center; width: 100%; height: 12.5cqi; border-radius: 4cqi; background: #0A84FF; color: #fff; font-size: 4.4cqi; font-weight: 600; }

/* ---------- Scenes ---------- */
/* lock: notification arrives */
.demo:not([data-scene="lock"]) .ios-lock { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
/* locking and unlocking are instant cuts, so the lock screen never overlaps the app */
.demo[data-scene="lock"] .ios-status { color: #fff; }
.demo[data-scene="lock"] .ios-home { background: #fff; }
.demo[data-scene="lock"][data-phase="in"] .ios-notice { opacity: 1; transform: none; }

/* which tab shows */
.demo:is([data-scene="lock"], [data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .ios-tab-inbox,
.demo:is([data-scene="lost"], [data-scene="replace"][data-phase="approve"]) .ios-tab-devices,
.demo[data-scene="replace"][data-phase="done"] .ios-tab-accounts { opacity: 1; visibility: visible; }
/* the email example happens in Safari: Google's page sits behind every sheet, with no app tab bar */
.demo[data-story="signin"]:is([data-scene="gmail"], [data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .ios-tab-safari { opacity: 1; visibility: visible; }
.demo[data-story="signin"]:is([data-scene="gmail"], [data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) :is(.ios-tab-inbox, .ios-tabbar) { opacity: 0; visibility: hidden; }
.demo[data-scene="gmail"][data-phase="passkey"] .gsi-step-email,
.demo[data-story="signin"]:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .gsi-step-email { display: none; }
.demo[data-scene="gmail"][data-phase="passkey"] .gsi-step-passkey,
.demo[data-story="signin"]:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .gsi-step-passkey { display: grid; }
.demo[data-scene="gmail"][data-phase="passkey"] .ios-passkey { transform: none; }
.demo:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .ios-passkey { transition: none; }
/* leaving a sheet for another tab: drop it at once so two screens never overlap */
.demo:is([data-scene="lost"], [data-scene="lock"], [data-scene="replace"][data-phase="done"]) :is(.ios-sheet-request, .ios-sheet-recovery) { visibility: hidden; transition: none; }
.demo:is([data-scene="lock"], [data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) [data-tab="inbox"],
.demo:is([data-scene="lost"], [data-scene="replace"][data-phase="approve"]) [data-tab="devices"],
.demo[data-scene="replace"][data-phase="done"] [data-tab="accounts"] { background: rgb(118 118 128 / 0.16); color: var(--ios-tint); }
.demo:is([data-scene="signed"], [data-scene="lost"], [data-scene="replace"]) .ios-badge { display: none; }

/* sheets up: the app behind scales back like an iOS page sheet */
.demo:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"]) .ios-sheet-request,
.demo[data-scene="replace"][data-phase="approve"] .ios-sheet-recovery { transform: none; }
.demo:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"], [data-scene="replace"][data-phase="approve"]) .ios-app { transform: translateY(12.5cqi) scale(0.92); filter: brightness(0.82); border-radius: 9cqi; overflow: hidden; }
.demo:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"], [data-scene="replace"][data-phase="approve"]) .ios { background: #000; }
.demo:is([data-scene="review"], [data-scene="faceid"], [data-scene="nfc"], [data-scene="signed"], [data-scene="replace"][data-phase="approve"]) .ios-status { color: #fff; }

/* hold to approve fills left to right, then the system prompts take over */
.demo[data-scene="review"][data-phase="hold"] .ios-hold-fill { transform: scaleX(1); transition: transform 750ms linear; }
.demo[data-scene="review"][data-phase="hold"] .ios-hold-label { color: #fff; transition: color 200ms ease 500ms; }
.demo[data-scene="review"][data-phase="hold"] .ios-hold-label::after { content: ""; }
.demo:is([data-scene="faceid"], [data-scene="nfc"]) .ios-hold-fill { transform: scaleX(1); }
.demo:is([data-scene="faceid"], [data-scene="nfc"]) .ios-hold-label { color: #fff; }

/* Face ID */
.demo[data-scene="faceid"] .ios-faceid { opacity: 1; transform: translate(-50%, -50%); }
.demo[data-scene="faceid"][data-phase="scan"] .ios-faceid svg { animation: ios-scan 1.1s ease-in-out infinite; }
.demo[data-scene="faceid"][data-phase="done"] .fid-frame,
.demo[data-scene="faceid"][data-phase="done"] .fid-face { opacity: 0; transition: opacity 200ms ease; }
.demo[data-scene="faceid"][data-phase="done"] .fid-ring { opacity: 1; transition: opacity 200ms ease; }
.demo[data-scene="faceid"][data-phase="done"] .fid-check { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 350ms ease 120ms, opacity 0s; }

/* NFC */
.demo[data-scene="nfc"] .ios-nfc { transform: none; }
.demo[data-scene="nfc"][data-phase="wait"] .ios-nfc-wait path { animation: ios-wave 1.2s ease-in-out infinite; }
.demo[data-scene="nfc"][data-phase="done"] .ios-nfc-wait { opacity: 0; }
.demo[data-scene="nfc"][data-phase="done"] .ios-nfc-done { opacity: 1; }
.demo[data-scene="nfc"][data-phase="done"] .ios-nfc-done path { stroke-dashoffset: 0; transition: stroke-dashoffset 350ms ease 100ms; }

/* A security key floats over the top of the phone while the NFC sheet waits, then lifts away. */
.nfc-key {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 7%;
  width: 24%;
  aspect-ratio: 100 / 250;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -18%) scale(1.08);
  transition: opacity 260ms ease, transform 520ms cubic-bezier(.3,.8,.2,1);
}
.nfc-key-float { position: absolute; inset: 0; display: block; }
.nfc-key-model {
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: perspective(700px) rotateX(48deg) rotateZ(-24deg);
  filter: drop-shadow(0 2px 1px rgb(0 0 0 / 0.35));
}
.nfc-key-halo { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0.8); transition: opacity 220ms ease, transform 320ms ease; }
.nfc-key-shadow {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 44%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), transparent);
  filter: blur(6px);
  transform: translateY(26%);
}
.nfc-key-waves {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 190%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}
.nfc-key-waves i {
  position: absolute;
  inset: 0;
  border: 2px solid rgb(10 132 255 / 0.8);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
}

.demo[data-scene="nfc"] .nfc-key { opacity: 1; transform: translate(-50%, 0); }
.demo[data-scene="nfc"][data-phase="wait"] .nfc-key-float { animation: nfc-key-bob 1.7s ease-in-out infinite; }
.demo[data-scene="nfc"][data-phase="wait"] .nfc-key-shadow { animation: nfc-key-shadow 1.7s ease-in-out infinite; }
.demo[data-scene="nfc"][data-phase="wait"] .nfc-key-waves i { animation: nfc-key-wave 1.5s ease-out infinite; }
.demo[data-scene="nfc"][data-phase="wait"] .nfc-key-waves i:nth-child(2) { animation-delay: 500ms; }
.demo[data-scene="nfc"][data-phase="wait"] .nfc-key-waves i:nth-child(3) { animation-delay: 1000ms; }
.demo[data-scene="nfc"][data-phase="done"] .nfc-key-halo { opacity: 1; transform: none; }
.demo[data-scene="nfc"][data-phase="done"] .nfc-key-waves i:first-child { border-color: rgb(52 199 89 / 0.9); animation: nfc-key-wave 700ms ease-out 1 both; }

/* Where WebGL runs, a 3D key takes over from the drawn one; the rings stay. */
.nfc-key-3d { position: absolute; inset: 0; z-index: 31; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.nfc-key[data-model="3d"] .nfc-key-float,
.nfc-key[data-model="3d"] .nfc-key-shadow { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .nfc-key-3d { display: none; }
  .nfc-key[data-model="3d"] .nfc-key-float,
  .nfc-key[data-model="3d"] .nfc-key-shadow { visibility: visible; }
}

@keyframes nfc-key-bob { 0%, 100% { transform: translateY(-5%); } 50% { transform: translateY(3%); } }
@keyframes nfc-key-shadow { 0%, 100% { opacity: 0.55; transform: translateY(26%) scale(0.86); } 50% { opacity: 0.9; transform: translateY(26%) scale(1); } }
@keyframes nfc-key-wave { 0% { opacity: 0.9; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.5); } }

/* signed: the bottom bar becomes the result */
.demo[data-scene="signed"] .ios-hold,
.demo[data-scene="signed"] .ios-deny { visibility: hidden; }
.demo[data-scene="signed"] .result-signed { opacity: 1; transform: none; }

/* lost: the callout only while a key is lost */
.demo:not([data-scene="lost"]) .result-lost { display: none; }
.demo:not([data-scene="lost"]) .ios-tab-devices .ios-button { display: none; }

@keyframes ios-pop { from { transform: scale(0.4); } to { transform: none; } }
@keyframes ios-arrive { from { opacity: 0; transform: translateY(-2cqi); } to { opacity: 1; transform: none; } }
@keyframes ios-scan { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.92); } }
@keyframes ios-wave { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Story-specific copy inside the phone */
.demo:not([data-story="signin"]) [data-only="signin"],
.demo:not([data-story="crypto"]) [data-only="crypto"] { display: none; }

/* Example picker: one segmented control, above the phone on small screens and under it on a desktop. */
.demo-stories {
  order: -2;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--line);
}
.demo-stories button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px 8px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 600 0.9375rem/1 var(--font-sans);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.demo-stories button:hover { color: var(--ink); }
.demo-stories button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 2px 6px -2px rgb(10 20 18 / 0.18); }
.demo-stories button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.demo-stories svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.demo-stories .gmail-mark { width: 18px; }
.demo-stories button:not([aria-pressed="true"]) .gmail-mark { filter: grayscale(1) opacity(0.6); }
@media (min-width: 1000px) {
  .demo-stories { order: 0; margin: 16px 0 0; }
}

/* What is happening on the phone, in plain words: one short step at a time, set
   large, with a six-part bar for where the story is. On a phone it sits over the
   demo at the top of the page; on a desktop it fills the space right of the phone. */
.demo-progress {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.demo-progress > li { height: 4px; border-radius: 2px; background: var(--line); transition: background-color 300ms ease; }
.demo-progress > li[data-state="done"] { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.demo-progress > li[data-state="current"] { background: var(--accent); }
.demo-caption {
  order: -1;
  display: grid;
  gap: 12px;
  width: min(340px, 100%);
  margin-bottom: 8px;
  text-align: center;
}
.demo-caption-text,
.hero-now-text {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.demo-caption-text { min-height: 2.3em; font-size: 1.75rem; line-height: 1.15; }
.hero-now { display: none; }
@media (min-width: 1000px) {
  .demo-caption { display: none; }
  .hero-now { display: grid; gap: 20px; width: 100%; min-width: 0; }
  .hero-now .demo-progress { width: min(260px, 100%); }
  .hero-now-text { min-height: 2.1em; margin: 0; max-width: 8.5em; font-size: clamp(2.25rem, 0.5rem + 2.6vw, 3.5rem); line-height: 1.05; }
  .hero-side { gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-progress > li { transition: none; }
}

/* Pause: off screen until a keyboard user reaches it. */
.demo-pause {
  position: absolute;
  inset-block-end: 16px;
  left: 50%;
  translate: -50% 0;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.8125rem/1 var(--font-sans);
  cursor: pointer;
}
.demo-pause:not(:focus-visible) {
  width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (scripting: none) { .demo-pause { display: none; } }

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

.steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  counter-reset: step;
  list-style: none;
  padding: 0;
}
.steps > li {
  counter-increment: step;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  font: 600 0.8125rem/1 var(--font-mono);
  color: var(--accent);
}
.steps h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-card); }
.steps p { color: var(--muted); max-width: 44ch; }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}
@media (min-width: 1024px) {
  .steps { gap: 48px; }
}

/* ---------- Protection levels: aligned cards; the level bars and the deep Enforce card carry the order ---------- */

.section-cta {
  display: grid;
  gap: 16px;
  justify-items: start;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.section-cta-copy { display: grid; gap: 4px; max-width: 62ch; }
.section-cta-copy > p { color: var(--muted); }
.section-cta-copy > .section-cta-title {
  font-family: var(--font-display);
  font-size: var(--type-card);
  line-height: 1.2;
  color: var(--ink);
}
@media (min-width: 860px) {
  .section-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 48px; }
}
@media (max-width: 559px) {
  .section-cta > .actions { justify-self: stretch; }
  .section-cta > .actions .button { flex: 1 1 140px; }
}

.levels {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  list-style: none;
  padding: 0;
}
.level {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.level-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.level h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-card); }
.level p { color: var(--muted); }
.level-bar { display: flex; gap: 4px; }
.level-bar span {
  width: 20px; height: 8px;
  border-radius: 2px;
  border: 1px solid var(--control);
}
.level[data-level="observe"] .level-bar span:nth-child(-n+1),
.level[data-level="coordinate"] .level-bar span:nth-child(-n+2),
.level[data-level="enforce"] .level-bar span { background: var(--accent); border-color: var(--accent); }

.level-verdict {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font: 600 0.8125rem/1.45 var(--font-mono);
}
.level p.level-verdict { color: var(--ink); }

.level[data-level="enforce"] {
  background: var(--deep);
  border-color: var(--deep-edge);
  box-shadow: inset 0 3px 0 var(--deep-edge);
  color: var(--on-deep);
}
.level[data-level="enforce"] p { color: var(--on-deep-muted); }
.level[data-level="enforce"] p.level-verdict { color: var(--on-deep); border-top-color: var(--on-deep-line); }
.level[data-level="enforce"] .level-bar span { background: var(--deep-bar); border-color: var(--deep-bar); }

@media (min-width: 1024px) {
  .levels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .level { padding: 28px; }
}

/* ---------- Separate powers ---------- */

.powers {
  display: grid;
  list-style: none;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.powers > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 28px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.powers h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-sub); }
.powers p { color: var(--muted); max-width: 68ch; }
@media (min-width: 560px) {
  .powers > li { grid-template-columns: 130px minmax(0, 1fr); align-items: baseline; }
}

.callout {
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}
.powers + .callout { margin-top: 32px; }

/* Long lists sit beside their heading, as the recovery section does. */
@media (min-width: 1100px) {
  #powers > .wrap,
  #faq > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 72px;
    align-items: start;
  }
  #powers .section-head,
  #faq .section-head {
    grid-row: 1 / span 2;
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
  #powers .powers,
  #powers .callout,
  #faq .faq { grid-column: 2; }
}

/* ---------- Accounts ---------- */

.account-modes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 40px;
  margin-bottom: 36px;
  list-style: none;
  padding: 0;
}
.account-modes li { padding: 14px 22px 0; border-top: 2px solid var(--ink); }
.account-modes strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--type-sub); line-height: 1.25; }
.account-modes span { color: var(--muted); }
/* Same outer border and gaps as the cards below, so the two rows share edges. */
@media (min-width: 640px) {
  .account-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1px; padding-inline: 1px; }
}

/* The rule runs the full width so the cards read as one set, not as children of the two modes above. */
.accounts-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  font: 600 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.accounts-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.accounts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  list-style: none;
  padding: 0;
}
.account {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  background: var(--surface);
}
.account-kind {
  font: 600 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.account h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-sub); }
.account p { color: var(--muted); font-size: 0.9375rem; }
.account p.account-credential {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--control);
  font-size: 0.875rem;
  color: var(--ink);
}
.account-credential strong { font-weight: 600; }

@media (min-width: 640px) {
  .accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .accounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Limits ---------- */

.limits {
  display: grid;
  list-style: none;
  padding: 0;
  border-top: 2px solid var(--signal);
}
.limits > li {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.limits strong { font-weight: 600; }
.limits p { color: var(--muted); font-size: 0.9375rem; }

/* ---------- Plans and prices ---------- */

.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}
@media (min-width: 720px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
#plans .plans,
#plans .plans-foot { max-width: 880px; }
@media (min-width: 1280px) {
  #plans > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 72px;
    align-items: start;
  }
  #plans .section-head { grid-row: 1 / span 2; margin-bottom: 0; }
  #plans .plans,
  #plans .plans-foot { grid-column: 2; max-width: none; }
  #plans .plan { padding: 28px; }
  #plans .plan h3 { font-size: 1.75rem; }
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 28px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
@media (min-width: 1024px) {
  .plan { padding: 36px; }
}
.plan[data-plan-emphasis="true"] {
  border-color: var(--accent);
  box-shadow: inset 0 3px 0 var(--accent), var(--shadow);
}
/* Side by side, plans share rows: description, price, trial, features, button. */
@media (min-width: 720px) {
  .plan { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
  .plan:has(> .plan-features) { grid-row: span 5; }
}
.plan-head { display: grid; gap: 6px; align-content: start; }
.plan-head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
@media (max-width: 559px) {
  /* Keep the badge above the plan name. */
  .plan-head-row { flex-direction: column-reverse; align-items: flex-start; flex-wrap: nowrap; }
}
.plan h2,
.plan h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
}
.plan-for { color: var(--muted); }
.plan-price,
.plan-trial {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.plan-features {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  align-content: start;
}
.plan-features li {
  position: relative;
  padding-left: 26px;
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.45em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.plan > .button { margin-top: auto; }

/* Price slots. Markup starts as "unavailable" so the fallback shows
   without scripts; the script moves the slot to loading, then ready.
   No amount is ever written into this file or the pages. */
.price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}
.plan-price > .price { display: flex; min-height: 3.25rem; align-items: center; }
.plan-price > .price[data-price-state="available"] { align-items: baseline; }
.price-value {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
}
.price-inline .price-value { font-family: inherit; font-size: inherit; font-weight: 700; letter-spacing: 0; }
.price-unit { color: var(--muted); font-size: 0.9375rem; }
.price-label { color: var(--muted); }
.price-fallback { color: var(--muted); font-size: 0.9375rem; }
.plan-price .price-fallback { font-family: var(--font-display); font-size: var(--type-card); line-height: 1.2; color: var(--ink); }
.price-inline .price-fallback { font-size: inherit; }
.choice-text .price-fallback { color: var(--ink); font-weight: 600; }
.choice-text > .price-inline { display: flex; margin-top: 2px; }
.price-value { white-space: nowrap; }
@media (min-width: 560px) {
  .price-inline > .price-unit { white-space: nowrap; }
}

.price[data-price-state="unavailable"] .price-value,
.price[data-price-state="unavailable"] .price-unit,
.price[data-price-state="loading"] .price-unit,
.price[data-price-state="loading"] .price-fallback,
.price[data-price-state="available"] .price-fallback { display: none; }

.price[data-price-state="loading"] .price-value {
  display: inline-block;
  min-width: 5ch;
  min-height: 1em;
  border-radius: 4px;
  color: transparent;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.price-inline[data-price-state="loading"] .price-value { min-width: 4ch; }

.price-note {
  font-size: 0.875rem;
  color: var(--muted);
}
.plan-trial .price-note { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.plans-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  margin-top: 20px;
}

/* ---------- Page header (pricing, start) ---------- */

.page-head {
  padding-block: 44px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.page-head-copy { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.page-head-copy > .status { justify-self: stretch; }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 1.8rem + 3.1vw, 4.25rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
}
@media (min-width: 1000px) {
  .page-head { padding-block: 80px 44px; }
  .page-head-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 72px; align-items: end; }
}

/* The self-service path, read top to bottom. */
.path {
  display: grid;
  list-style: none;
  padding: 0;
  counter-reset: path;
  border-top: 2px solid var(--ink);
}
.path li {
  counter-increment: path;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.path li::before {
  content: counter(path);
  font: 600 0.8125rem/1.8 var(--font-mono);
  color: var(--accent);
}
.path strong { color: var(--ink); font-weight: 600; }
.path-title {
  margin-bottom: 10px;
  font: 600 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Comparison table ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare caption {
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  color: var(--muted);
  font-size: 0.875rem;
}
.compare th,
.compare td {
  padding: 15px 24px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th {
  font: 600 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare tbody th { font-weight: 500; width: 44%; }
.compare th:nth-child(3),
.compare td:nth-child(3) { background: var(--accent-soft); }
.compare thead th:nth-child(3) { color: var(--accent-strong); }
@media (max-width: 559px) {
  .compare { table-layout: fixed; font-size: 0.875rem; }
  .compare caption { padding: 16px 12px 12px; }
  .compare th,
  .compare td { padding: 12px 6px; }
  .compare th:first-child { padding-left: 12px; }
  .compare td:last-child,
  .compare thead th:last-child { padding-right: 10px; }
  .compare thead th { font-size: 0.75rem; letter-spacing: 0; }
  .compare thead th:nth-child(1),
  .compare tbody th { width: 38%; }
  .compare thead th:nth-child(2) { width: 28%; }
  .compare thead th:nth-child(3) { width: 34%; }
}
.yes { color: var(--good); font-weight: 600; }
.no { color: var(--muted); }
@media (min-width: 560px) and (max-width: 1023px) {
  .compare td.no { white-space: nowrap; }
}

/* ---------- Fee modes ---------- */

.fee-modes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}
@media (min-width: 720px) {
  .fee-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
.fee-mode {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0 0;
  border-top: 2px solid var(--ink);
}
.fee-mode h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-card); }
.fee-mode p { color: var(--muted); max-width: 54ch; }
.fee-mode .price { margin-top: auto; padding-top: 8px; }
@media (min-width: 560px) and (max-width: 1023px) {
  .fee-mode .price-value + .price-unit { flex-basis: 100%; }
}

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

.faq {
  display: grid;
  border-top: 2px solid var(--ink);
  max-width: 82ch;
}
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 400 1.5rem/1 var(--font-mono);
  color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 20px; color: var(--muted); display: grid; gap: 10px; max-width: 68ch; }

/* ---------- Closing band ---------- */

.band {
  padding-block: 72px;
  border-top: 3px solid var(--deep-edge);
  background: var(--deep);
  color: var(--on-deep);
}
.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.band h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.55rem + 1.9vw, 3.125rem);
  letter-spacing: -0.015em;
  line-height: 1.08;
}
.band p { color: var(--on-deep-muted); max-width: 56ch; }
.band .button { border-color: var(--on-deep-muted); background: transparent; color: var(--on-deep); }
.band .button:hover { border-color: var(--on-deep); background: var(--on-deep-line); color: var(--on-deep); }
.band .button-primary { background: var(--on-deep); border-color: var(--on-deep); color: var(--deep); }
.band .button-primary:hover { background: var(--on-deep-muted); border-color: var(--on-deep-muted); color: var(--deep); }
.band :focus-visible { outline-color: var(--on-deep); }
@media (min-width: 860px) {
  .band-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 64px; }
  .band-inner h2 { grid-column: 1; }
  .band-inner p { grid-column: 1; }
  .band-inner .actions { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 1024px) {
  .band { padding-block: 88px; }
}

/* ---------- Start flow ---------- */

/* A task page: the heading steps back so the current step sits higher. */
.start-head { padding-block: 32px 20px; }
.start-head h1 { font-size: clamp(2.125rem, 1.8rem + 1.5vw, 3rem); }
@media (min-width: 1000px) {
  .start-head { padding-top: 56px; }
}
.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 80px;
}
@media (min-width: 1000px) {
  .start-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start; }
  .start-aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: stepper;
}
@media (min-width: 640px) {
  .stepper { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.stepper li {
  counter-increment: stepper;
  display: grid;
  grid-template-rows: 5px auto;
  gap: 2px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.stepper li::before {
  content: "";
  align-self: end;
  height: 2px;
  background: var(--control);
}
.stepper li[data-step-state="complete"]::before { height: 3px; background: var(--accent); }
.stepper li[data-step-state="current"]::before { height: 5px; background: var(--ink); }
.stepper li[data-step-state="skipped"]::before { background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 8px); }
.stepper li[data-step-state="current"] { color: var(--ink); font-weight: 600; }
.stepper a {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.stepper a::before {
  content: counter(stepper);
  font: 600 0.75rem/1 var(--font-mono);
  color: var(--accent);
}
.stepper li[data-step-state="complete"] a::before { content: "\2713"; }
.stepper li[data-step-state="skipped"] a::before { content: "\2013"; }
.stepper a:hover { text-decoration: underline; }
/* Steps that cannot be opened yet should not look clickable. */
.stepper a[aria-disabled="true"] { cursor: default; }
.stepper a[aria-disabled="true"]:hover { text-decoration: none; }
.stepper a[aria-disabled="true"]::before { color: var(--muted); }
@media (max-width: 559px) {
  .stepper a { align-items: baseline; padding-top: 6px; }
  .stepper li[data-step-state="skipped"] a { flex-wrap: wrap; align-content: flex-start; row-gap: 0; }
  .stepper li[data-step-state="skipped"] a::after {
    content: "Not needed";
    flex-basis: 100%;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
  }
}

.flow,
.flow form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.flow { gap: 20px; }

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: transparent;
}
@media (min-width: 720px) {
  .step { padding: 20px 32px; }
}
.step-head { display: grid; gap: 6px; }
.step h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--muted);
}
.step-help { color: var(--muted); max-width: 62ch; }
.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}
@media (max-width: 559px) {
  .step-actions .button { flex: 1 1 100%; }
}
/* Email code sign-in, on the setup page and the sign-in page. */
.code-sign-in:not([hidden]),
.code-sign-in-part:not([hidden]) { display: grid; gap: 18px; }
.code-sign-in-part p { margin: 0; }
.input-code {
  max-width: 11ch;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
}
.code-sign-in-company {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.code-sign-in-company .text-button { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.signin-layout { display: grid; gap: 18px; max-width: 640px; padding-bottom: 96px; }
.signin-card h2 { color: var(--ink); }
.signin-alt { margin: 0; color: var(--muted); }
/* With no primary action beside it, the lone Back lines up with the card text. */
[data-action="retry-checkout"][hidden] + [data-from-step="checkout"] { padding-inline-start: 0; justify-content: flex-start; }

/* One step is open at a time and the stepper carries the rest. If no step is
   marked current, or scripts cannot run, every step is shown. */
.step[data-step-state="current"],
.step:target {
  padding-block: 28px;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: inset 0 3px 0 var(--accent), var(--shadow);
}
@media (min-width: 720px) {
  .step[data-step-state="current"],
  .step:target { padding-block: 36px; }
}
.step[data-step-state="current"] h2,
.step:target h2 { font-size: clamp(1.625rem, 1.4rem + 1vw, 2.125rem); color: var(--ink); }

@media (scripting: enabled) {
  .flow form:has(.step[data-step-state="current"]) { gap: 0; }
  .flow form:has(.step[data-step-state="current"]) .step:not([data-step-state="current"]) { display: none; }
}

/* On a phone the stepper carries progress, so the open step follows it directly. */
@media (max-width: 559px) {
  .start-head { padding-block: 16px 12px; }
  .start-head .page-head-copy { gap: 8px; }
  .start-head h1 { font-size: 1.75rem; }
  .start-layout { gap: 20px; }
  .flow { gap: 12px; }
  .step[data-step-state="current"],
  .step:target { padding-block: 20px; }
}
@media (max-width: 559px) {
  .start-head .lede { font-size: 1rem; }
}
/* The introduction only helps on Choose. Later steps open with their own heading. */
@media (scripting: enabled) {
  main:has([data-step="intent"]:not([data-step-state="current"])) .start-head .lede { display: none; }
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
@media (min-width: 720px) {
  .choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.choice:hover { border-color: var(--ink); }
/* Drawn by hand: a native dark radio fills unselected controls and reads as selected. */
.choice input {
  appearance: none;
  display: grid;
  place-content: center;
  width: 20px; height: 20px;
  margin: 2px 0 0;
  border: 2px solid var(--control);
  border-radius: 50%;
  background: transparent;
  flex: none;
}
.choice input:checked { border-color: var(--accent); }
.choice input:checked::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.choice-body { display: grid; gap: 4px; min-width: 0; }
.choice-title { font-weight: 600; }
.choice-text { color: var(--muted); font-size: 0.9375rem; }
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice:has(input:checked) .choice-text { color: var(--ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice input:focus-visible { outline: none; }
.choice:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }

.field { display: grid; gap: 8px; max-width: 520px; }
.field label { font-weight: 600; }
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--control);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 1rem;
}
.input:hover { border-color: var(--ink); }
.input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.legal-acceptance {
  max-width: 56rem;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}
.legal-acceptance label {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
  font-weight: 500;
}
.legal-acceptance input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
}
.legal-acceptance:has(input[aria-invalid="true"]) { border-color: var(--bad); }

.field-error {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--bad);
  font-size: 0.9375rem;
  font-weight: 600;
}
.field-error::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--bad);
  color: var(--surface);
  font: 700 0.75rem/1 var(--font-sans);
}

.error-summary {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 2px solid var(--bad);
  border-radius: var(--radius);
  background: var(--bad-soft);
}
.error-summary h2 { font-size: 1rem; color: var(--bad); }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--bad); font-weight: 600; }

/* Review sheet */
.review {
  display: grid;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
}
.review > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.review > div:last-child { border-bottom: 0; }
.review dt { color: var(--muted); font-size: 0.875rem; }
.review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 560px) {
  .review > div { grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: baseline; }
}
[data-review-field]:empty::before,
[data-summary-field]:empty::before {
  content: "Not set yet";
  color: var(--muted);
  font-weight: 400;
}

.fine-print { font-size: 0.875rem; color: var(--muted); max-width: 62ch; }
.review-billing { max-width: 62ch; }
.flow:has(input[name="plan"][value="personal"]:checked) [data-plan-only="organization"],
.flow:has([data-organization-name]:disabled) [data-new-organization-only] { display: none; }

/* Status panels share one tone scale keyed on data-state. An idle panel
   leaves the layout but stays a live region, so its first message is read. */
.status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.status::before {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status > div { display: grid; gap: 6px; min-width: 0; }
.status p { margin: 0; }
.status-block:not([hidden]) { display: grid; gap: 10px; justify-items: start; }
.status[data-state="idle"],
.status[data-state="signed-out"] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.status[data-state="loading"],
.status[data-state="redirecting"],
.status[data-state="returned"],
.status[data-state="pending"] { background: var(--accent-soft); border-color: transparent; }
.status[data-state="loading"]::before,
.status[data-state="redirecting"]::before,
.status[data-state="returned"]::before {
  background: transparent;
  width: 14px; height: 14px; margin-top: 5px;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  animation: spin 800ms linear infinite;
}
.status[data-state="pending"]::before { background: var(--accent); }
.status[data-state="signed-in"],
.status[data-state="confirmed"],
.status[data-state="success"] { background: var(--good-soft); border-color: transparent; }
.status[data-state="signed-in"]::before,
.status[data-state="confirmed"]::before,
.status[data-state="success"]::before { background: var(--good); }
.status[data-state="canceled"],
.status[data-state="warning"] { background: var(--warn-soft); border-color: transparent; }
.status[data-state="canceled"]::before,
.status[data-state="warning"]::before { background: var(--warn); }
.status[data-state="failed"],
.status[data-state="error"] { background: var(--bad-soft); border-color: var(--bad); }
.status[data-state="failed"]::before,
.status[data-state="error"]::before { background: var(--bad); }

.site-status {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  width: min(560px, calc(100% - 2 * var(--gutter)));
  transform: translateX(-50%);
  box-shadow: var(--shadow);
}
.site-status:empty { display: none; }

/* Summary aside */
.summary-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.summary-card h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-sub); }
.summary { display: grid; border-top: 1px solid var(--line); }
.summary > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.summary > div:last-child { padding-bottom: 0; border-bottom: 0; }
.summary dt { font-size: 0.8125rem; color: var(--muted); }
.summary dd { margin: 0; font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 560px) and (max-width: 999px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; border-top: 0; }
  .summary > div,
  .summary > div:last-child { padding-block: 10px; border-top: 1px solid var(--line); border-bottom: 0; }
}
.summary-path {
  display: grid;
  list-style: none;
  padding: 0;
  font-size: 0.9375rem;
}
.summary-path li {
  position: relative;
  padding: 0 0 12px 22px;
  color: var(--muted);
}
.summary-path li::before {
  content: "";
  position: absolute;
  left: 2px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--control);
  background: var(--paper);
}
.summary-path li::after {
  content: "";
  position: absolute;
  left: 6px; top: 18px; bottom: 0;
  width: 2px;
  background: var(--line);
}
.summary-path li:last-child { padding-bottom: 0; }
.summary-path li:last-child::after { display: none; }
.summary-path strong { color: var(--ink); font-weight: 600; }

.notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.9375rem;
}
.notice > .actions { margin-top: 14px; }
.step-actions:not(:has(> :not([hidden]))) { display: none; }
.scope-note {
  padding-left: 14px;
  border-left: 2px solid var(--signal);
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Consent ---------- */

.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 70;
  display: grid;
  gap: 14px;
  max-width: 520px;
  margin-left: auto;
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.consent h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--type-sub); }
.consent p { color: var(--muted); font-size: 0.9375rem; }
.consent .actions .button { flex: 1 1 120px; }

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

.site-footer {
  padding-block: 56px 40px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.footer-grid h2 {
  font: 600 0.75rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; }
.footer-grid li > a,
.footer-grid li > .text-button { display: inline-block; padding-block: 6px; min-height: 36px; }
@media (pointer: coarse) {
  .footer-grid li > a,
  .footer-grid li > .text-button { display: inline-flex; align-items: center; min-height: 44px; }
}
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); text-decoration: underline; }
.footer-about { display: grid; gap: 10px; max-width: 40ch; color: var(--muted); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
/* Stays out of the layout and the accessibility tree until it holds links. */
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-legal:empty { display: none; }
.footer-legal a { display: inline-block; min-height: 36px; padding-block: 6px; color: var(--ink); text-decoration: none; }
.footer-legal a:hover { color: var(--accent); text-decoration: underline; }
.footer-legal a[aria-current="page"] { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 720px) {
  .footer-base > span:last-child { margin-left: auto; }
}
.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.text-button:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(2, minmax(0, 1fr)); }
}

/* ---------- Legal pages ---------- */

.legal-layout {
  max-width: calc(44rem + 2 * var(--gutter));
  padding-block: 64px;
}
.legal-head {
  display: grid;
  gap: 16px;
  justify-items: start;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--line-strong);
}
.legal-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 2.2rem + 1.2vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.legal-copy { display: grid; gap: 40px; overflow-wrap: break-word; }
.legal-copy section { display: grid; gap: 12px; }
.legal-copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
}
.legal-copy p { line-height: 1.65; }

/* ---------- Motion and contrast preferences ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

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

@media (forced-colors: active) {
  .stepper li::before { forced-color-adjust: none; background: CanvasText; }
  .level-bar span { forced-color-adjust: none; border-color: CanvasText; }
  .level[data-level="observe"] .level-bar span:nth-child(-n+1),
  .level[data-level="coordinate"] .level-bar span:nth-child(-n+2),
  .level[data-level="enforce"] .level-bar span { background: CanvasText; }
  .stepper li[data-step-state]::before { background: CanvasText; }
  .stepper li[data-step-state="skipped"]::before { background: repeating-linear-gradient(90deg, CanvasText 0 4px, transparent 4px 8px); }
  .stepper li[data-step-state="current"] { font-weight: 700; }
  .choice:has(input:checked) { outline: 2px solid Highlight; }
  .choice:has(input:focus-visible) { outline: 3px solid CanvasText; outline-offset: 2px; }
  .choice input { forced-color-adjust: none; border-color: CanvasText; }
  .choice input:checked { border-color: Highlight; }
  .choice input:checked::before { background: Highlight; }
  .status, .error-summary, .consent, .level, .plan, .step { border: 1px solid CanvasText; }
  .key-tile[data-key-state="signed"] { forced-color-adjust: none; outline: 3px solid Highlight; }
}

@media print {
  .site-header, .consent, .site-status, .band { display: none !important; }
  body { background: #fff; color: #000; }
  .level[data-level="enforce"] { background: none; color: #000; border-color: #000; box-shadow: none; }
  .level[data-level="enforce"] p, .level[data-level="enforce"] p.level-verdict { color: #000; }
}

/* Homepage fact lists read as plain facts, not warnings. */
:is(#signs, #trust, #teams) .limits { border-top-color: var(--ink); }
#teams .section-head .actions { margin-top: 6px; }

/* Connection identities and static explanations on the home page. */
.connection-strip { border-block: 1px solid var(--line); padding: 30px 0; background: var(--surface); }
.connection-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 22px 0; }
.connection-list li { display: grid; gap: 8px; }
.app-logo { display: inline-flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 650; line-height: 1.3; }
.app-logo img { object-fit: contain; background: #fff; border: 1px solid #d6dbd4; padding: 8px; border-radius: 10px; width: 46px; height: 46px; }
.connection-role, .connection-note, .visual-note { color: var(--muted); font-size: .875rem; }
.connection-note { max-width: 80ch; }
.account-logos { display: flex; gap: 12px; flex-wrap: wrap; min-height: 66px; align-items: start; }
.account-logos .app-logo { font-size: .8125rem; gap: 7px; }
.account-logos .app-logo img { width: 36px; height: 36px; padding: 6px; }
.protocol-mark { display: flex; align-items: center; gap: 10px; min-height: 66px; font-weight: 600; font-size: .8125rem; color: var(--accent); }
.protocol-mark > span { font-size: 2.5rem; line-height: 1; }
.step-visual { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 10px; margin-block: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-align: center; }
.key-trio { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.key-token { display: grid; justify-items: center; gap: 10px; padding: 12px 8px; min-width: 62px; border: 1px solid var(--control); border-radius: 5px; font-size: .75rem; color: var(--muted); }
.key-token::before { content: ''; width: 14px; height: 24px; border: 2px solid currentColor; border-radius: 9px 9px 3px 3px; background: radial-gradient(circle at 50% 7px, currentColor 2px, transparent 3px); }
.key-token.selected, .approval-token { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.key-token.lost { border-style: dashed; color: var(--bad); text-decoration: line-through; }
.flow-arrow { color: var(--accent); font-size: 1.375rem; line-height: 1; }
.flow-node { border: 1px solid var(--control); padding: 10px 18px; border-radius: 5px; font-size: .875rem; background: var(--surface); }
.credential-node { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.approval-token { padding: 12px; border: 1px solid; border-radius: 5px; font-size: .875rem; }
.level-route { display: flex; flex-direction: column; align-items: center; gap: 8px; border-bottom: 1px solid currentColor; padding-bottom: 18px; margin-bottom: 20px; }
.route-node { font-size: .875rem; padding: 8px 12px; border: 1px solid currentColor; border-radius: 4px; text-align: center; }
.level[data-level="enforce"] .flow-arrow { color: inherit; }
.powers .power-route { font-family: var(--font-mono); font-size: .8125rem; color: var(--accent); }
.recovery-visual { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 16px; margin-top: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.recovery-visual figcaption { font-size: .875rem; font-weight: 600; margin-bottom: 8px; }
@media (max-width: 719px) { .connection-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; } .step-visual { min-height: 210px; } }
@media (max-width: 359px) { .connection-list { grid-template-columns: 1fr; } }

.powers > li { display: flex; flex-direction: column; gap: 8px; }
.powers > li > .app-logo { margin-bottom: 4px; }

.limits .app-logo { margin-bottom: 10px; }
.limits .app-logo + strong { display: block; }
.supporting-service { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
/* The simulated phone keeps its own light palette in both site themes. */
.ios-hold-label { color: #005b56; }
#recovery .split-body { align-content: start; }

/* Familiar brand marks identify connection options, not customer endorsements. */
.connection-strip { padding: 52px 0 32px; }
.connection-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.connection-heading h2 { font-family: var(--font-display); font-weight: 400; margin: 10px 0 0; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.text-link { color: var(--accent); font-weight: 650; text-underline-offset: 5px; }
.connection-list.brand-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 36px; margin: 36px 0 24px; }
.brand-wall li { display: block; }
.brand-wall a { display: flex; align-items: center; gap: 12px; min-height: 82px; text-decoration: none; font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.brand-icon { width: 32px; height: 32px; object-fit: contain; flex: 0 0 32px; }
.integration-code-mark { display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink); letter-spacing: .1em; box-sizing: border-box; }
.brand-wall a:hover { color: var(--accent); }
.brand-wall a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.directory-intro { max-width: 790px; }
.directory-intro h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1.05; margin: 20px 0 24px; }
.directory-controls { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; padding-block: 24px; border-block: 1px solid var(--line-strong); }
.directory-controls[hidden], .integration-entry[hidden], .directory-empty[hidden] { display: none; }
.directory-controls label { display: block; font-weight: 650; margin-bottom: 8px; }
.directory-controls :is(input, select) { box-sizing: border-box; width: 100%; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit; }
.directory-controls :is(input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.directory-count { margin: 24px 0 12px; color: var(--muted); font-size: .875rem; }
.integration-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; list-style: none; padding: 0; margin: 0; }
.integration-entry { border-top: 1px solid var(--line); }
.integration-entry a { display: grid; grid-template-columns: 32px 1fr 12px; column-gap: 12px; align-items: center; padding: 24px 0; color: var(--ink); text-decoration: none; min-height: 108px; }
.integration-entry .brand-icon { grid-row: 1 / span 2; align-self: start; }
.integration-name { font-size: 1rem; font-weight: 650; }
.integration-summary { grid-column: 2; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.integration-visit { grid-column: 3; grid-row: 1; color: var(--muted); }
.integration-entry a:hover .integration-name { text-decoration: underline; text-underline-offset: 4px; }
.integration-entry a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.directory-empty { padding: 40px 0; }
@media (prefers-color-scheme: dark) { .brand-icon-mono { filter: invert(1); } }
@media (max-width: 1000px) { .integration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719px) {
  .connection-heading { align-items: start; flex-direction: column; gap: 16px; }
  .connection-list.brand-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; margin-top: 22px; }
  .brand-wall a { font-size: .9rem; min-height: 76px; gap: 10px; }
  .brand-wall .brand-icon { width: 26px; height: 26px; flex-basis: 26px; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .directory-controls { grid-template-columns: 1fr; gap: 16px; }
  .integration-entry a { grid-template-columns: 1fr; min-height: 150px; padding: 20px 0; align-content: start; gap: 12px; }
  .integration-entry .brand-icon { grid-row: auto; }
  .integration-summary { grid-column: 1; margin: 0; }
  .integration-visit { display: none; }
}
@media (prefers-color-scheme: dark) {
  img.brand-icon:not(.brand-icon-mono) { background: #fff; border-radius: 4px; padding: 2px; box-sizing: border-box; }
}

.integration-detail-heading { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1rem; }
.integration-detail-heading h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.12; margin: 0; overflow-wrap: anywhere; }
.integration-detail-heading .brand-icon { flex: 0 0 64px; }
.integration-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 3rem; margin: 3rem 0; }

.catalog-section { margin-block: clamp(2.5rem, 6vw, 5rem); }
#featured { margin-block: 2rem; }
.catalog-section > h2, .integration-article h2, .integration-sidebar h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.18;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
.catalog-section > p { margin-bottom: 1rem; }
.catalog-section > .text-link, .catalog-section > button { margin-top: 1.5rem; }
.integration-entry a { align-content: center; grid-template-rows: auto auto; row-gap: .2rem; }
.integration-name, .integration-summary { overflow-wrap: anywhere; }

.integration-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .65rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.integration-categories li { display: flex; }
.integration-categories a {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: .75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.integration-categories a:hover, .integration-categories [aria-current] { background: var(--surface); text-decoration: underline; }
.integration-categories span { float: right; margin-left: .35rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.integration-sidebar .integration-categories { grid-template-columns: 1fr; }

.integration-workflow-map {
  --branch-length: 1.25rem;
  --branch-gap: .75rem;
  position: relative;
  text-align: center;
}
.integration-workflow-map > h2 {
  display: inline-block;
  margin: 0;
  padding: .45rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.integration-workflow-map ul {
  display: grid;
  position: relative;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--branch-gap);
  margin: 0;
  padding: calc(2 * var(--branch-length)) 0 0;
  list-style: none;
  text-align: left;
}
.integration-workflow-map ul::before, .integration-workflow-map ul::after,
.integration-workflow-map li::before {
  content: "";
  position: absolute;
  pointer-events: none;
}
.integration-workflow-map ul::before {
  top: 0;
  left: 50%;
  height: var(--branch-length);
  border-left: 1px solid var(--line-strong);
}
.integration-workflow-map ul::after {
  top: var(--branch-length);
  inset-inline: calc((100% - 4 * var(--branch-gap)) / 10);
  border-top: 1px solid var(--line-strong);
}
.integration-workflow-map li { display: flex; position: relative; }
.integration-workflow-map li::before {
  bottom: 100%;
  left: 50%;
  height: var(--branch-length);
  border-left: 1px solid var(--line-strong);
}
.integration-workflow-map a {
  display: grid;
  position: relative;
  grid-template-rows: auto 1fr;
  gap: .65rem;
  width: 100%;
  padding: .8rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}
.integration-workflow-map a:hover, .integration-workflow-map a:focus-visible { background: var(--surface); }
.integration-workflow-map a:is(:hover, :focus-visible) strong { text-decoration: underline; }
.integration-workflow-map strong { display: block; padding-right: 1.05rem; font-size: .95rem; }
.integration-workflow-arrow { position: absolute; top: .8rem; right: .7rem; color: var(--muted); }
.integration-workflow-examples { align-self: end; display: grid; gap: .45rem; color: var(--muted); font-size: .8rem; }
.integration-workflow-examples > span { display: flex; gap: .4rem; align-items: center; }
.integration-workflow-examples .brand-icon { width: 20px; height: 20px; flex-basis: 20px; }

@media (max-width: 800px) {
  .integration-workflow-map { text-align: left; }
  .integration-workflow-map ul {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--branch-length) 0 0 var(--branch-length);
  }
  .integration-workflow-map ul::before {
    left: .65rem;
    height: 100%;
  }
  .integration-workflow-map ul::after { display: none; }
  .integration-workflow-map li::before {
    left: -.6rem;
    top: 1.45rem;
    bottom: auto;
    width: .6rem;
    height: 0;
    border: 0;
    border-top: 1px solid var(--line-strong);
  }
  .integration-workflow-map li:last-child::after {
    content: "";
    position: absolute;
    top: calc(1.45rem + 1px);
    bottom: 0;
    left: -.6rem;
    border-left: 1px solid var(--paper);
  }
  .integration-workflow-examples { display: flex; flex-wrap: wrap; gap: .45rem .85rem; }
}

.integration-detail-heading .brand-icon { width: 64px; height: 64px; }
.integration-breadcrumbs { margin-bottom: 2rem; color: var(--muted); font-size: .9rem; }
.integration-article { max-width: 70ch; }
.integration-article section + section { margin-top: 2.5rem; }
.integration-article p, .integration-sidebar p { margin: .75rem 0 1rem; line-height: 1.65; }
.integration-article :is(section, details), .catalog-section { scroll-margin-top: 8rem; }
.integration-jump, .integration-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  padding-block: .85rem;
  border-block: 1px solid var(--line-strong);
}
.integration-jump { margin-bottom: 1.75rem; }
.integration-jump a { color: var(--ink); }
.integration-article details { border-top: 1px solid var(--line); padding: .65rem 0; }
.integration-article summary { cursor: pointer; font-weight: 600; }
.integration-sidebar { align-self: start; padding: 1.25rem; border: 1px solid var(--line-strong); border-radius: 6px; }
.integration-flow { padding-left: 1.25rem; margin: 1.15rem 0; }
.integration-flow li + li { margin-top: .3rem; }
#what-to-test { scroll-margin-top: 6rem; }
#what-to-test .integration-flow li + li { margin-top: .65rem; }
#what-to-test .integration-flow li::marker { color: var(--accent); font-weight: 650; }
.integration-resource-links { padding-left: 1rem; }
.integration-resource-links li { margin: .8rem 0; }

.integration-prerequisites {
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.integration-prerequisites h2 { margin: 0 0 .7rem; }
.integration-prerequisites p { margin: .6rem 0; }
.integration-prerequisites ul { margin: 0; padding-left: 1.2rem; }
.integration-rehearsal-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.integration-prerequisites li + li { margin-top: .5rem; }
.integration-setup-actions { list-style: none; padding: 0; margin: 0; }
.integration-setup-actions li { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.integration-setup-actions small { display: block; margin-top: .3rem; color: var(--muted); }
.integration-setup-matrix { margin-top: 1.25rem; }
.integration-setup-search { grid-template-columns: minmax(0, 28rem); gap: .45rem; }
.integration-setup-search .directory-count { margin: 0; }

.integration-requirements { width: 100%; margin-top: 1.5rem; border-collapse: collapse; }
.integration-requirements :is(th, td) {
  padding: 1rem clamp(.55rem, 2.2vw, 1.5rem);
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.integration-requirements thead th { background: var(--surface); }
.integration-requirements tr { scroll-margin-top: 8rem; }
.integration-requirements tbody th { width: 22%; }
.integration-requirements .integration-app-icons { flex-wrap: wrap; gap: .4rem .65rem; }
.integration-requirements td p { margin: .4rem 0 .65rem; }
.integration-requirement-devices { color: var(--muted); font-size: .875rem; }
.integration-requirement + .integration-requirement {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
}
#troubleshooting { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line-strong); }
#troubleshooting h3 { margin-top: .75rem; }

@media (max-width: 580px) {
  .integration-requirements :is(tbody, tr, th, td) { display: block; }
  .integration-requirements thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .integration-requirements tbody th { width: auto; border-bottom: 0; padding: 1rem 0 .5rem; }
  .integration-requirements td { padding: 0 0 1rem; }
}
.integration-requirements [data-setup-tool][hidden] { display: none; }

.integration-guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  gap: 1rem;
}
.integration-guide-list a {
  display: grid;
  height: 100%;
  align-content: start;
  gap: .5rem;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
}
.integration-guide-list a:hover strong { text-decoration: underline; }
.integration-guide-list small { color: var(--muted); }
.integration-guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1rem;
  margin-top: 1.25rem;
}
.integration-guide-actions .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.integration-guide-actions [role="status"] { flex-basis: 100%; margin: 0; color: var(--muted); }
.integration-guide-actions [role="status"]:not(:empty) { margin-top: .5rem; }
.integration-guide-validation {
  margin-block: 1.5rem 2rem;
  padding: .85rem 1rem;
  border-inline-start: 2px solid var(--accent);
  background: var(--surface-2);
}
.integration-guide-validation p { margin-bottom: 0; }
.integration-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr));
  gap: 1rem;
  margin-block: 1.5rem 2rem;
}
.integration-evidence-grid section {
  padding: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.integration-evidence-grid h2 { margin: 0; }
.integration-evidence-grid p { margin: .75rem 0; }
.integration-app-icons { display: flex; gap: .7rem; align-items: center; }
.integration-steps { padding-left: 1.7rem; }
.integration-steps > li { scroll-margin-top: 8rem; }
.integration-steps li + li { margin-top: 1.4rem; }
.integration-steps li::marker { font-weight: 650; color: var(--accent); }
.integration-step-options-title { margin: 1.25rem 0 .75rem; }
.integration-step-options { margin: .75rem 0 0; }
.integration-step-options > div { padding: .75rem 0; border-top: 1px solid var(--line-strong); }
#provider-availability .integration-step-options > div { scroll-margin-top: 5rem; }
.integration-step-options dt { display: flex; align-items: center; gap: .55rem; font-weight: 650; }
.integration-step-options dd { margin: .3rem 0 0; }
.integration-policy-options, .integration-service-check .integration-step-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .5rem 1.5rem;
}
.integration-service-check { max-width: 48rem; }
.integration-service-check h2, .integration-provider-status h2 { margin-bottom: .5rem; }
.integration-service-check button { margin-bottom: .75rem; }
.integration-service-check button[aria-disabled="true"] { cursor: wait; }
.integration-service-check [data-service-time] { color: var(--muted); margin-block: .75rem 1rem; }
.integration-service-check [data-service-time]:empty { display: none; }
.integration-incident-updates { max-width: 48rem; }
.integration-incident-updates h2 { margin-bottom: .5rem; }
.integration-incident-updates h3 { margin-block: 1.5rem .75rem; }
.integration-incident-updates summary { padding-block: .5rem; cursor: pointer; }
.integration-incident-updates summary h3 { display: inline; margin: 0; }
.integration-incident-updates article { margin-block: .75rem 1.5rem; }
.integration-incident-updates h4 a { color: var(--ink); }
.integration-incident-updates .integration-step-options dt { display: block; }
.integration-incident-updates time { display: inline-block; }
.integration-incident-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-block: 1rem; }
.integration-status-history h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); }
.integration-status-history .catalog-section { margin-block: 1.75rem; }
@media (max-width: 42rem) and (min-width: 22rem) {
  .integration-status-history .directory-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .integration-status-history .directory-controls > div:first-child { grid-column: 1 / -1; }
}
.integration-provider-status > .catalog-section:first-of-type { margin-block-start: 2rem; }
.integration-provider-status h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.integration-steps pre, .integration-example-code pre {
  margin: .75rem 0 0;
  padding: .75rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  font-size: .95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.integration-example-code button { margin: .25rem .5rem .25rem 0; }
.integration-example-code button[hidden] { display: none; }
.integration-example-code [role="status"] { color: var(--muted); font-size: .9rem; }
.integration-picker { max-width: 38rem; padding-block: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.integration-picker .directory-count { grid-column: 1 / -1; margin: 0; }
.integration-guide-example { margin: 1.5rem 0; }
.integration-guide-example img { display: block; width: min(100%, 232px); height: auto; border-radius: 12px; }
.integration-steps .integration-guide-example img,
.integration-guide-example-wide img { width: auto; max-width: 100%; }
.integration-guide-example figcaption { margin-top: .65rem; color: var(--muted); }
.integration-walkthrough { margin-block: 1.75rem 2rem; }
.integration-walkthrough video { display: block; max-width: 100%; height: auto; border-radius: 12px; background: var(--surface-2); }
.integration-walkthrough details { margin-top: .85rem; }
.integration-directory:has(.integration-watch) { padding-top: clamp(1.75rem, 4vw, 3rem); }
.integration-watch { max-width: 54rem; }
.integration-watch h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 1rem 0;
}
.integration-watch-layout { display: grid; gap: 1.5rem 2rem; margin-top: 1.5rem; }
.integration-watch-layout .integration-walkthrough { margin: 0; }
.integration-watch-layout video { width: min(100%, 19rem); }
.integration-watch-layout h2 { margin-top: 0; }
@media (min-width: 740px) {
  .integration-watch-layout { grid-template-columns: 20rem minmax(0, 1fr); }
  .integration-watch-layout video { width: 100%; }
}
.integration-guide-list [hidden], [data-directory-more][hidden] { display: none; }

@media (max-width: 900px) {
  .integration-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .integration-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .integration-picker { grid-template-columns: 1fr; }
  .integration-entry a { align-content: start; row-gap: .45rem; }
  .integration-entry .brand-icon { grid-row: auto; }
  .integration-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.integration-message-intro h1 { max-width: none; font-size: clamp(2rem, 5vw, 3.5rem); }
.integration-message-intro .lede { margin-bottom: 1.25rem; }
.integration-message-search { grid-template-columns: 1fr; gap: .45rem; }
.integration-message-search .directory-count { margin: 0; }
.integration-article .integration-message {
  margin-top: 0;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line-strong);
}
.integration-message h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.65rem); }
.integration-message .integration-message-location { margin-top: .3rem; color: var(--muted); font-size: .875rem; }
.integration-message p { margin: .65rem 0; }
.integration-message .integration-resource-links { margin-bottom: 0; }

.integration-recovery-worksheet { max-width: 54rem; }
.recovery-paper {
  padding: clamp(1rem, 5vw, 2.5rem);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.recovery-paper .directory-intro { margin-bottom: 1rem; }
.recovery-paper h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
.integration-recovery-worksheet > nav { margin-top: 1.25rem; }
.recovery-actions { margin-bottom: 1.25rem; }
.recovery-actions p { flex-basis: 100%; margin: 0; }
.recovery-privacy { padding-inline-start: 1rem; border-inline-start: 3px solid var(--accent); }
.recovery-paper section { margin-top: 1.5rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.recovery-paper h2 { font-size: 1.375rem; }
.recovery-paper dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: .75rem 0 0;
}
.recovery-paper dl > div { display: flex; flex-direction: column; }
.recovery-paper dt { font-weight: 650; }
.recovery-paper dd { flex: 1; margin: .25rem 0 0; color: var(--muted); }
.recovery-paper dl > div::after {
  content: "";
  display: block;
  height: 1.75rem;
  margin-top: .25rem;
  border-bottom: 1px solid var(--line-strong);
}
.recovery-retest { margin-top: 1.5rem; }
.worksheet-origin { display: none; }

@media screen and (max-width: 560px) {
  .recovery-paper dl { grid-template-columns: 1fr; gap: .9rem; }
  .recovery-actions .button { flex-basis: 100%; }
}

@media print {
  body:has(.recovery-paper) :is(.site-footer, .skip-link, .integration-breadcrumbs),
  .integration-recovery-worksheet > nav,
  .recovery-paper .recovery-actions { display: none !important; }
  body:has(.recovery-paper) .integration-directory { padding: 0; }
  body:has(.recovery-paper) .integration-directory > .wrap { width: 100%; max-width: none; }
  .integration-recovery-worksheet { max-width: none; }
  .recovery-paper {
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    font-size: 10pt;
    line-height: 1.4;
  }
  .recovery-paper h1 { font-size: 25pt; }
  .recovery-paper h2 { font-size: 14pt; }
  .recovery-paper :is(.lede, dd) { color: #222; font-size: inherit; }
  .recovery-paper .recovery-privacy { border-color: #555; }
  .recovery-paper section { break-inside: avoid; border-color: #b0b0b0; }
  .recovery-paper dl > div::after { height: 2.5rem; border-color: #555; }
  .worksheet-origin { display: block; margin-top: 1rem; font-size: 9pt; }
}

.integration-rule-preview {
  margin-top: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: clamp(.85rem, 3vw, 1.5rem);
}
.integration-rule-controls, .integration-rule-recovery {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .75rem;
}
.integration-rule-controls select {
  min-height: 2.75rem;
  padding-inline: .75rem;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}
.integration-rule-keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: .65rem;
  margin: 1rem 0;
}
.integration-rule-key {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: var(--surface);
  padding: .65rem;
  border-radius: 5px;
}
.integration-rule-key span { font-size: .875rem; }
.integration-rule-key label, .integration-rule-recovery { min-height: 2.75rem; }
.integration-rule-key label { display: flex; align-items: center; gap: .45rem; }
.integration-rule-preview input { flex: none; width: 1.125rem; height: 1.125rem; margin: 0; }
.integration-rule-results { border-top: 1px solid var(--line-strong); margin-top: .75rem; }
.integration-rule-results dl { display: grid; gap: .6rem; margin: 1rem 0; }
.integration-rule-results dt, .integration-rule-results p { font-weight: 650; }
.integration-rule-results dd { margin-inline-start: 0; }
.integration-rule-results p { margin-bottom: 0; }

.integration-rollout-progress {
  margin-block: 1.5rem;
  padding: clamp(.85rem, 3vw, 1.5rem);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.integration-rollout-input label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 650;
}

.integration-rollout-input input {
  max-width: 100%;
  min-height: 2.75rem;
  color: inherit;
  font: inherit;
}

.integration-rollout-input input::file-selector-button {
  min-height: 2.75rem;
  margin-inline-end: .5rem;
  padding-inline: .65rem;
  border: 1px solid var(--control);
  border-radius: 5px;
  color: inherit;
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}

.integration-rollout-progress [role="status"]:empty { margin: 0; }

.integration-rollout-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin-block: 1rem;
}

.integration-rollout-counts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  background: var(--surface);
  padding: .55rem;
  border-inline-start: 3px solid var(--rollout-state);
  border-radius: 5px;
}

.integration-rollout-counts > div:nth-child(1) { --rollout-state: var(--good); }
.integration-rollout-counts > div:nth-child(2) { --rollout-state: var(--warn); }
.integration-rollout-counts > div:nth-child(3) { --rollout-state: var(--bad); }
.integration-rollout-counts dt { font-size: .9rem; }
.integration-rollout-counts dd {
  margin: 0;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.integration-rollout-entries { margin: 0; padding: 0; list-style: none; }
.integration-rollout-entries li {
  display: grid;
  gap: .2rem;
  border-top: 1px solid var(--line-strong);
  padding-block: .75rem;
  overflow-wrap: anywhere;
}
.integration-rollout-entries span { color: var(--muted); }
.integration-rollout-entries strong + span + span { font-weight: 650; }
.integration-rollout-entries [data-rollout-state="passed"] strong + span + span { color: var(--good); }
.integration-rollout-entries [data-rollout-state="untested"] strong + span + span { color: var(--warn); }
.integration-rollout-entries [data-rollout-state="failed"] strong + span + span { color: var(--bad); }
.integration-rollout-entries strong + span:empty { display: none; }
