/*
 * id.org.ai auth UI: design tokens.
 * Every value here is copied from the reference mocks (docs/product-update/mocks).
 * Use these variables in the component CSS; never hard-code a colour, shadow or radius.
 * Dark only: auth pages do not have a light theme (emails are light and live in their own templates).
 */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist/GeistMono-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ── Surfaces ─────────────────────────────────────────── */
  --id-bg: oklch(0.155 0.004 286);          /* page */
  --id-card: oklch(0.185 0.005 286);        /* card body */
  --id-card-foot: oklch(0.155 0.004 286);   /* card action band (same as page) */
  --id-panel: oklch(0.188 0.005 286);       /* controls: inputs, secondary buttons, radio cards */
  --id-raised: oklch(0.225 0.006 286);      /* checked radio card, avatar, pills */
  --id-sunk: oklch(0.13 0.004 286);         /* wells: code box, key/value boxes, code blocks */

  /* ── Lines ────────────────────────────────────────────── */
  --id-line: oklch(1 0 0 / 0.08);           /* hairlines, well borders, card foot border */
  --id-line-2: oklch(1 0 0 / 0.14);         /* control borders, card border */
  --id-select: oklch(1 0 0 / 0.55);         /* selected/focused border, focus outline */
  --id-ring: 0 0 0 3px oklch(1 0 0 / 0.07); /* focus/selected halo (box-shadow) */
  --id-dot: oklch(1 0 0 / 0.22);            /* dotted rule dots */
  --id-ring-line: oklch(1 0 0 / 0.42);      /* connector destination ring */
  --id-rail: oklch(1 0 0 / 0.11);           /* step list rail, at rest */
  --id-rail-done: oklch(1 0 0 / 0.26);      /* step list rail under a done step */
  --id-track: oklch(1 0 0 / 0.1);           /* spend bar track */

  /* ── Text ─────────────────────────────────────────────── */
  --id-fg: oklch(0.965 0.002 286);          /* primary text, primary button fill */
  --id-fg-2: oklch(0.78 0.006 286);         /* secondary text, labels, links */
  --id-fg-3: oklch(0.64 0.008 286);         /* tertiary text, hints, icons at rest */

  /* ── Accent: exceptions only (act permissions, warnings, failure X) ── */
  --id-accent: oklch(0.81 0.135 72);
  --id-accent-bg: oklch(0.81 0.135 72 / 0.08);
  --id-accent-line: oklch(0.81 0.135 72 / 0.32);

  /* ── Success: only the connector check and the copied check ── */
  --id-green: oklch(0.8 0.16 152);

  /* ── Depth ────────────────────────────────────────────── */
  --id-sh-ctrl: inset 0 1px 0 0 oklch(1 0 0 / 0.045), 0 1px 2px 0 oklch(0 0 0 / 0.4);
  --id-sh-primary: inset 0 -1px 0 0 oklch(0 0 0 / 0.16), 0 1px 2px 0 oklch(0 0 0 / 0.5), 0 4px 12px -4px oklch(0 0 0 / 0.5);
  --id-sh-input: inset 0 1px 2px 0 oklch(0 0 0 / 0.28);
  --id-sh-card: inset 0 1px 0 0 oklch(1 0 0 / 0.05), 0 2px 4px 0 oklch(0 0 0 / 0.35), 0 32px 64px -24px oklch(0 0 0 / 0.75);
  --id-sh-knob: 0 1px 2px 0 oklch(0 0 0 / 0.4); /* toggle knob, selected billing cell */

  /* ── App tile (bezel) ─────────────────────────────────── */
  --id-bezel-bg: linear-gradient(180deg, oklch(0.28 0.006 286) 0%, oklch(0.2 0.005 286) 100%);
  --id-bezel-border: oklch(0 0 0 / 0.55);
  --id-bezel-shadow: inset 0 1px 0 0 oklch(1 0 0 / 0.14), inset 0 0 0 1px oklch(1 0 0 / 0.05), 0 1px 2px 0 oklch(0 0 0 / 0.5), 0 8px 20px -8px oklch(0 0 0 / 0.7);
  --id-bezel-shadow-sm: inset 0 1px 0 0 oklch(1 0 0 / 0.14), 0 1px 2px 0 oklch(0 0 0 / 0.5); /* 36px mini tile */

  /* ── Hover ────────────────────────────────────────────── */
  --id-hover-ghost: oklch(1 0 0 / 0.05);    /* ghost button hover fill */
  --id-hover-icon: oklch(1 0 0 / 0.06);     /* bare icon button (copy) hover fill */

  /* ── Type ─────────────────────────────────────────────── */
  --id-font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --id-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Radii ────────────────────────────────────────────── */
  --id-r-card: 20px;
  --id-r-well: 14px;
  --id-r-control: 10px;     /* inputs, md buttons, code boxes, code blocks */
  --id-r-option: 12px;      /* radio cards, account rows */
  --id-r-sm: 8px;           /* sm buttons, icon buttons */
  --id-r-bezel: 16px;       /* 56px app tile */
  --id-r-pill: 99px;

  /* ── Layout ───────────────────────────────────────────── */
  --id-column: 560px;       /* card max width */
  --id-gap-body: 22px;      /* between blocks inside the card body */
  --id-control-h: 44px;     /* md buttons and inputs */
  --id-control-h-sm: 32px;
  --id-control-h-phone: 48px; /* action buttons at <=480px (height only) */

  /* ── Motion ───────────────────────────────────────────── */
  --id-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --id-ease-in: cubic-bezier(0.5, 0, 0.75, 0);
  --id-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

/*
 * id.org.ai auth UI: component CSS.
 * Every value reads from tokens.css. Values match the reference mocks
 * (docs/product-update/mocks); see docs/product-update/spec/layout.md and components.md.
 * No !important except in the reduced-motion and phone (<=480px) blocks, as in the mocks.
 */

/* ── Derived radii ─────────────────────────────────────────────────────────
   Radii the mocks use that tokens.css (kept identical to the spec) doesn't name. */

:root {
  --id-r-check: 5px; /* checkbox */
  --id-r-step: 6px; /* step number box */
  --id-r-tile-sm: 7px; /* 28px branded header tile */
  --id-r-icontile: 9px; /* 36px icon tile */
  --id-r-ring: 17px; /* connector ring: the 16px bezel plus its 1px outset */
}

/* ── Base ────────────────────────────────────────────────────────────────── */

/* iOS doesn't inflate text in landscape; pinch zoom still works. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  /* No grey or blue flash on tap: controls show their own pressed and focus states. */
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  background: var(--id-bg);
  color: var(--id-fg);
  font-family: var(--id-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Links: zero specificity, so a component's own colour wins on hover too
   (as the mocks' inline colours do). Plain links read fg-2 and brighten. */
:where(a) {
  color: var(--id-fg-2);
  transition: color 0.15s;
}
:where(a):hover {
  color: var(--id-fg);
}

:focus-visible {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}

input::placeholder,
textarea::placeholder {
  color: var(--id-fg-3);
}

summary::marker {
  color: var(--id-fg-3);
}

/* Native <details> rows hide the marker; their chevrons rotate when open. */
details[data-x] > summary {
  list-style: none;
}
details[data-x] > summary::-webkit-details-marker {
  display: none;
}
[data-chev],
[data-chev-d] {
  transition: transform 0.2s;
}
details[data-x][open] > summary [data-chev] {
  transform: rotate(90deg);
}
details[data-x][open] > summary [data-chev-d] {
  transform: rotate(180deg);
}

.id-icon,
.id-mark {
  flex-shrink: 0;
}
.id-mark__accent {
  fill: var(--id-fg-3);
}

/*
 * The header's mark pours: each mark starts at the centre, small and clear, and
 * settles into the ring, the gray one last (as on the landing page and
 * foundation.org.ai). data-pour="load" plays once on load; pour.js sets "hover"
 * to play it again and clears it when the last mark lands. Reduced motion and
 * the frozen gallery show the ring still.
 */
.id-mark__mk {
  transform-box: fill-box;
  transform-origin: center;
}
.id-mark__mk:nth-child(1) {
  --i: 0;
  --dx: 3.68px;
  --dy: -13.72px;
}
.id-mark__mk:nth-child(2) {
  --i: 1;
  --dx: 13.72px;
  --dy: -3.68px;
}
.id-mark__mk:nth-child(3) {
  --i: 2;
  --dx: 10.04px;
  --dy: 10.04px;
}
.id-mark__mk:nth-child(4) {
  --i: 3;
  --dx: -3.68px;
  --dy: 13.72px;
}
.id-mark__mk:nth-child(5) {
  --i: 4;
  --dx: -13.72px;
  --dy: 3.68px;
}
.id-mark__mk:nth-child(6) {
  --i: 5;
  --dx: -10.04px;
  --dy: -10.04px;
}
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-frozen]) .id-mark[data-pour='load'] .id-mark__mk {
    animation: id-pour 900ms var(--id-ease-out) both;
    animation-delay: calc(220ms + var(--i) * 55ms);
  }
  :root:not([data-frozen]) .id-mark[data-pour='hover'] .id-mark__mk {
    animation: id-pour 820ms var(--id-ease-out) both;
    animation-delay: calc(var(--i) * 38ms);
  }
}
@keyframes id-pour {
  from {
    transform: translate(var(--dx), var(--dy)) scale(0.2);
    opacity: 0;
  }
}

/* Visually hidden, still announced (the mocks' rule). */
.id-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Page shell (layout.md#page-shell) ─────────────────────────────────── */

.id-page {
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.id-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  min-height: 72px;
  box-sizing: border-box;

  /* Stays at the top while the page scrolls, so the brand and the header's right slot (a
     countdown, a setup's status) are always in view. Glass, not a slab: the page colour at
     part opacity over a blur of what scrolls beneath. At rest it sits on the page colour and
     looks exactly as before (owner direction, 2026-11-23). */
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--id-bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
/* Without backdrop blur, or when the person asks for less transparency, the bar is solid. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .id-header {
    background: var(--id-bg);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .id-header {
    background: var(--id-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
/* A field or heading scrolled to by focus or a link stops below the bar, not under it. */
html {
  scroll-padding-top: 72px;
}

.id-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--id-fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.id-main {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 40px;
}
.id-main--top {
  align-items: flex-start;
  padding: 72px 20px 40px;
}

.id-column {
  width: 100%;
  max-width: var(--id-column);
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Sign-in (1a–1g), accounts (2a–2c, 2e) and security (6a–6d): narrower than the mocks’ 560px, by owner direction (2026-10-01). The card reads the same variable. */
.id-column--narrow {
  --id-column: 440px;
}

.id-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 24px 20px;
  font-size: 12px;
}
.id-footer__link {
  color: var(--id-fg-3);
  text-decoration: none;
}

/* ── Card (layout.md#card-anatomy) ─────────────────────────────────────── */

.id-card {
  width: 100%;
  max-width: var(--id-column);
  box-sizing: border-box;
  border-radius: var(--id-r-card);
  background: var(--id-card);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-card);
  overflow: hidden;
  align-self: center;
}

.id-card__body {
  padding: 32px 28px 26px;
  display: flex;
  flex-direction: column;
  gap: var(--id-gap-body);
}

.id-card__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: var(--id-card-foot);
  border-top: 1px solid var(--id-line);
}

/* A form wrapping a card's body and foot (so foot buttons submit body fields). */
.id-form {
  margin: 0;
}

/* ── Card head: connector, then title + description ──────────────────── */

.id-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.id-head__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.id-title {
  margin: 0;
  font-size: 22px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.id-desc {
  margin: 0;
  font-size: 15px;
  line-height: 23px;
  color: var(--id-fg-2);
  text-wrap: balance;
}
/* A name highlighted inside a description: app, email, workspace, person. */
.id-em {
  color: var(--id-fg);
  font-weight: 500;
}

/* ── Stacks (layout glue between blocks inside the body) ───────────────── */

.id-stack {
  display: flex;
  flex-direction: column;
}
.id-stack--2 {
  gap: 2px;
}
.id-stack--4 {
  gap: 4px;
}
.id-stack--6 {
  gap: 6px;
}
.id-stack--8 {
  gap: 8px;
}
.id-stack--10 {
  gap: 10px;
}
.id-stack--12 {
  gap: 12px;
}
.id-stack--14 {
  gap: 14px;
}
.id-stack--18 {
  gap: 18px;
}
.id-stack--22 {
  gap: var(--id-gap-body);
}
.id-row-center {
  display: flex;
  justify-content: center;
}

/* ── Actions and the foot (layout.md#actions) ──────────────────────────── */

.id-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.id-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  line-height: 17px;
  color: var(--id-fg-3);
  text-align: center;
}
.id-foottext {
  font-size: 13px;
  line-height: 20px;
  color: var(--id-fg-3);
  text-align: center;
  text-wrap: balance;
}

/* ── Dotted rule (layout.md#dividers) ─────────────────────────────────── */

.id-rule {
  display: flex;
}
.id-dots {
  flex-grow: 1;
  height: 2px;
  background-image: radial-gradient(circle at 1px 1px, var(--id-dot) 1px, transparent 1.3px);
  background-size: 7px 2px;
  background-repeat: repeat-x;
}
.id-rule--label {
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--id-fg-3);
}

/* ── Button (components.md#button) ─────────────────────────────────────── */

.id-btn {
  box-sizing: border-box;
  min-height: var(--id-control-h);
  flex-shrink: 0;
  padding: 0 16px;
  border-radius: var(--id-r-control);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s, background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.id-btn--sm {
  min-height: var(--id-control-h-sm);
  padding: 0 12px;
  border-radius: var(--id-r-sm);
  font-size: 13px;
}
.id-btn--primary {
  background: var(--id-fg);
  color: var(--id-bg);
  border: 1px solid var(--id-fg);
  box-shadow: var(--id-sh-primary);
}
.id-btn--secondary {
  background: var(--id-panel);
  color: var(--id-fg);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-ctrl);
}
.id-btn--ghost {
  background: transparent;
  color: var(--id-fg-2);
  border: 1px solid transparent;
}
/* Fills its slot: the action band's grid cell, or a column on its own. */
.id-btn--block {
  width: 100%;
}
.id-btn--grow {
  flex: 1 1 0;
}
.id-btn--primary:not(:disabled):hover {
  filter: brightness(0.93);
}
.id-btn--secondary:not(:disabled):hover {
  filter: brightness(1.14);
}
.id-btn--ghost:not(:disabled):hover {
  background-color: var(--id-hover-ghost);
}
.id-btn:not(:disabled):active {
  transform: scale(0.985);
}
.id-btn:disabled,
.id-btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.id-btn[aria-busy='true'] {
  opacity: 0.7;
}

/* ── Provider button (components.md#provider-button) ────────────────────── */

/* One provider per row (owner direction, 2026-10-01; the mocks show a 2×2 grid). */
.id-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.id-btn--provider {
  justify-content: flex-start;
  padding: 0 14px;
}
.id-provider__name {
  flex-grow: 1;
  text-align: left;
}
.id-provider__mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Pill ───────────────────────────────────────────────────────────────── */

.id-pill {
  font-size: 11px;
  line-height: 16px;
  padding: 1px 6px;
  border-radius: var(--id-r-pill);
  background: var(--id-raised);
  color: var(--id-fg-2);
  font-weight: 500;
}
/* The account row's "Last used here" has no explicit line-height in the mock. */
.id-pill--normal {
  line-height: normal;
}
.id-pill--accent {
  background: var(--id-accent-bg);
  color: var(--id-accent);
}

/* ── Field, input, select, textarea ───────────────────────────────────── */

.id-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.id-field__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.id-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--id-fg-2);
}
.id-field__aside {
  color: var(--id-fg-3);
  font-size: 12px;
}
.id-field__hint {
  font-size: 12px;
  line-height: 18px;
  color: var(--id-fg-3);
}
.id-field__error {
  font-size: 12px;
  line-height: 18px;
  color: var(--id-accent);
}
.id-input {
  /* No native field styling (iOS Safari's inner shadow and corners). */
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--id-control-h);
  padding: 0 14px;
  border-radius: var(--id-r-control);
  background: var(--id-panel);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-input);
  color: var(--id-fg);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.id-input:focus {
  border-color: var(--id-select);
  box-shadow: var(--id-sh-input), var(--id-ring);
}
/* Autofill keeps the card's colours: Chrome and Safari otherwise paint the
   field light blue or yellow behind an !important background, and Firefox
   filters it. An inset shadow paints over that background. */
.id-input:-webkit-autofill {
  -webkit-text-fill-color: var(--id-fg);
  caret-color: var(--id-fg);
  box-shadow: var(--id-sh-input), inset 0 0 0 100px var(--id-panel);
  filter: none;
}
.id-input:-webkit-autofill:focus {
  box-shadow: var(--id-sh-input), inset 0 0 0 100px var(--id-panel), var(--id-ring);
}
.id-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.id-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  /* The mocks lay a select's text out once, with the fallback font's 17px line
     box (Chrome doesn't re-lay it when Geist swaps in). A fixed 17px line box
     reproduces that at every offset; at whole-pixel offsets it renders the same
     as Geist's own 18px. Found by the 3a and 5c groups independently. */
  line-height: 17px;
}
.id-select__chev {
  position: absolute;
  right: 12px;
  display: flex;
  color: var(--id-fg-3);
  pointer-events: none;
}
/* The open list (owner direction, 2026-10-01). Where a select can be styled
   (Chrome 135+), its list matches the card instead of the OS menu. It stays a
   real <select>: keyboard, screen readers, autofill and form posts work with
   no script. Safari and Firefox keep their native list. Our chevron replaces
   the built-in picker icon.

   Safari is kept out on purpose (owner direction, 2026-11-23). It now accepts
   the styleable select but drew this list invisible, so on an iPhone a
   dropdown looked dead. `font: -apple-system-body` is a value only Safari's
   engine supports, which makes it the test for "this is Safari" (every iOS
   browser included): there the select stays native, the one list that always
   works. Take the exclusion out only after checking the styled list on a
   real iPhone. */
@supports (appearance: base-select) and (not (font: -apple-system-body)) {
  .id-select,
  .id-select::picker(select) {
    appearance: base-select;
  }
  /* A styleable select lays its text out at the top; centre it as the native one does. */
  .id-select {
    display: flex;
    align-items: center;
  }
  .id-select::picker-icon {
    display: none;
  }
  /* Focus moves into the list while it's open; the box keeps its focus border. */
  .id-select:open {
    border-color: var(--id-select);
  }
  .id-select::picker(select) {
    box-sizing: border-box;
    margin-block: 6px;
    padding: 4px;
    border: 1px solid var(--id-line-2);
    border-radius: var(--id-r-option);
    background: var(--id-card);
    box-shadow: var(--id-sh-card);
    color: var(--id-fg);
    /* Visible is the resting state. The fade-in below is the only thing layered on it, so a
       browser that misreads any of this loses the animation, never the list. (It used to rest
       hidden and rely on the popover's open state to show it, which Safari never matched.) */
    transition:
      opacity 140ms var(--id-ease-out),
      translate 140ms var(--id-ease-out);
  }
  @starting-style {
    .id-select::picker(select) {
      opacity: 0;
      translate: 0 -4px;
    }
  }
  .id-select option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: var(--id-r-sm);
    color: var(--id-fg-2);
    font-size: 14px;
    cursor: pointer;
  }
  .id-select option:hover,
  .id-select option:focus-visible {
    background: var(--id-hover-ghost);
    color: var(--id-fg);
    outline: none;
  }
  .id-select option:checked {
    color: var(--id-fg);
    font-weight: 500;
  }
  .id-select option::checkmark {
    order: 1;
    margin-left: auto;
  }
  @media (prefers-reduced-motion: reduce) {
    .id-select::picker(select) {
      transition: none;
    }
  }
}
.id-textarea {
  min-height: 0;
  height: auto;
  padding: 12px 14px;
  line-height: 20px;
  resize: none;
}

/* ── Code input (components.md#code-input) ─────────────────────────────── */

.id-code {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.id-code__box {
  box-sizing: border-box;
  width: 46px;
  height: 54px;
  border-radius: var(--id-r-control);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-input);
  color: var(--id-fg);
  text-align: center;
  font-family: var(--id-mono);
  font-size: 22px;
  font-weight: 500;
  outline: none;
  flex: 1 1 0;
  min-width: 0;
}
.id-code--device .id-code__box {
  width: 42px;
  height: 52px;
  font-size: 20px;
}
.id-code__box:focus,
.id-code__box.is-focused {
  border-color: var(--id-select);
  box-shadow: var(--id-sh-input), var(--id-ring);
}
/* The line under code boxes: 4c's hint, and every code screen's error (accent, role=alert). */
.id-codehint {
  font-size: 13px;
  color: var(--id-fg-3);
  text-align: center;
}
.id-codehint--error {
  color: var(--id-accent);
}
.id-code__sep {
  color: var(--id-fg-3);
  font-size: 18px;
  align-self: center;
}

/* ── Radio card (components.md#radio-card) ─────────────────────────────── */

.id-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.id-group-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--id-fg-2);
}
.id-radios--row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.id-radio {
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--id-r-option);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-ctrl);
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.id-radio:has(.id-hidden-input:checked) {
  border-color: var(--id-select);
  background: var(--id-raised);
  box-shadow: var(--id-sh-ctrl), var(--id-ring);
}
.id-hidden-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.id-radio__ring {
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: var(--id-r-pill);
  border: 1.5px solid var(--id-fg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.id-radio__dot {
  display: none;
  width: 8px;
  height: 8px;
  border-radius: var(--id-r-pill);
  background: var(--id-fg);
}
.id-radio:has(.id-hidden-input:checked) .id-radio__ring {
  border-color: var(--id-fg);
}
.id-radio:has(.id-hidden-input:checked) .id-radio__dot {
  display: block;
}
.id-radio:has(.id-hidden-input:focus-visible) {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}
.id-radio__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}
.id-radio__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--id-fg);
}
.id-radio__desc {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-3);
}
.id-accent-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--id-r-pill);
  background: var(--id-accent);
  flex-shrink: 0;
}

/* ── Checkbox ───────────────────────────────────────────────────────────── */

.id-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--id-fg-2);
  cursor: pointer;
  min-height: 24px;
}
.id-check__box {
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: var(--id-r-check);
  border: 1.5px solid var(--id-fg-3);
  background: transparent;
  color: var(--id-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.id-check__tick {
  display: none;
}
.id-check:has(.id-hidden-input:checked) .id-check__box {
  border-color: var(--id-fg);
  background: var(--id-fg);
}
.id-check:has(.id-hidden-input:checked) .id-check__tick {
  display: flex;
}
.id-check:has(.id-hidden-input:focus-visible) .id-check__box {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}

/* ── Link ───────────────────────────────────────────────────────────────── */

.id-link {
  font-size: 13px;
  color: var(--id-fg-2);
  text-decoration: underline;
  text-decoration-color: var(--id-line-2);
  text-underline-offset: 3px;
}
.id-link:hover {
  color: var(--id-fg);
}
/* A link-styled button (1b "Resend code" posts): the link's look, no button chrome. */
button.id-link {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}
button.id-link[hidden] {
  display: none;
}

/* Alternate links under a single foot action (6d: "Use a passkey instead"). */
.id-footlinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
}

/* ── Copy button (components.md#copy-button) ───────────────────────────── */

.id-copy {
  display: flex;
  align-items: center;
  width: 32px;
  height: 32px;
  justify-content: center;
  border-radius: var(--id-r-sm);
  border: 0;
  background: transparent;
  color: var(--id-fg-3);
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: color 0.15s, background-color 0.15s;
}
.id-copy:hover {
  color: var(--id-fg);
  background-color: var(--id-hover-icon);
}
.id-copy[hidden] {
  display: none;
}
.id-copy--label {
  width: auto;
  height: 32px;
  padding: 0 8px;
  margin-left: -8px;
  gap: 6px;
  font-size: 12px;
  align-self: flex-start;
}
.id-copy__done {
  display: none;
  align-items: center;
  gap: 6px;
  color: var(--id-fg-2);
}
.id-copy__idle {
  display: flex;
  align-items: center;
  gap: 6px;
}
.id-copy[data-copied] .id-copy__done {
  display: flex;
}
.id-copy[data-copied] .id-copy__idle {
  display: none;
}
.id-copy__check {
  color: var(--id-green);
  stroke-width: 2.25;
}

/* ── Avatar, who row, account rows (components.md#who-row) ─────────────── */

.id-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--id-r-pill);
  background: var(--id-raised);
  border: 1px solid var(--id-line-2);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--id-fg);
  flex-shrink: 0;
  overflow: hidden;
}
.id-avatar--34 {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.id-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.id-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px;
}
.id-namesub {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}
.id-namesub__name {
  font-size: 14px;
  font-weight: 500;
}
.id-namesub__sub {
  font-size: 13px;
  color: var(--id-fg-3);
  overflow-wrap: anywhere;
}
.id-who__meta {
  font-size: 13px;
  color: var(--id-fg-3);
  white-space: nowrap;
}
.id-accounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.id-account {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--id-r-option);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-ctrl);
  color: var(--id-fg);
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 60px;
  transition: filter 0.15s, background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.id-account:hover {
  color: var(--id-fg);
  filter: brightness(1.14);
}
.id-account:active {
  transform: scale(0.985);
}
.id-account__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-grow: 1;
  min-width: 0;
}
.id-account__name {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.id-account__email {
  font-size: 13px;
  color: var(--id-fg-3);
  overflow-wrap: anywhere;
}
.id-account__chev {
  color: var(--id-fg-3);
}
.id-account--another {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--id-line-2);
  color: var(--id-fg-2);
  font-size: 14px;
  font-weight: 400;
}
.id-account--another:hover {
  color: var(--id-fg-2);
}
.id-account__plus {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--id-fg-2);
}

/* ── App tile (bezel) and icon tile ─────────────────────────────────────── */

.id-tile-wrap {
  position: relative;
  display: flex;
  flex-shrink: 0;
}
.id-tile {
  width: 56px;
  height: 56px;
  box-sizing: border-box;
  border-radius: var(--id-r-bezel);
  background: var(--id-bezel-bg);
  border: 1px solid var(--id-bezel-border);
  box-shadow: var(--id-bezel-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--id-fg);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.id-tile--m1 {
  font-size: 22px;
}
.id-tile--m2 {
  font-size: 19px;
}
.id-tile__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.id-icontile {
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border-radius: var(--id-r-icontile);
  background: var(--id-panel);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-ctrl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--id-fg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* Branded sign-in (1g): the app's 28px tile in the header. */
.id-brand--app {
  gap: 10px;
  font-weight: 600;
  letter-spacing: normal;
}
.id-apptile-sm {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border-radius: var(--id-r-tile-sm);
  background: var(--id-panel);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-ctrl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--id-fg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.id-footer--secured {
  align-items: center;
  gap: 8px;
  color: var(--id-fg-3);
}
.id-secured {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--id-fg-2);
}

/* ── Well and its contents (components.md#well) ────────────────────────── */

.id-well {
  box-sizing: border-box;
  border-radius: var(--id-r-well);
  background: var(--id-sunk);
  border: 1px solid var(--id-line);
  box-shadow: var(--id-sh-input);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.id-well--tight {
  gap: 6px;
}
.id-well--stats {
  gap: 14px;
}
.id-well--quote {
  padding: 14px 16px;
}
.id-well--code {
  padding: 22px 16px;
  gap: 10px;
  align-items: center;
}
.id-devicecode {
  font-family: var(--id-mono);
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--id-fg);
}
.id-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--id-fg-3);
}
.id-quote {
  display: flex;
  gap: 12px;
}
.id-quote__icon {
  display: flex;
  color: var(--id-fg-3);
  padding-top: 3px;
}
.id-quote__text {
  font-size: 14px;
  line-height: 21px;
  color: var(--id-fg-2);
}
.id-excerpt {
  border-top: 1px solid var(--id-line);
  margin-top: 4px;
  padding-top: 10px;
  font-size: 13px;
  line-height: 20px;
  color: var(--id-fg-2);
}

/* ── KeyValue ───────────────────────────────────────────────────────────── */

.id-kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 20px;
}
.id-kv__key {
  color: var(--id-fg-3);
  flex-shrink: 0;
}
.id-kv__value {
  color: var(--id-fg);
  text-align: right;
  overflow-wrap: anywhere;
}
.id-kv__value--mono {
  font-family: var(--id-mono);
  font-size: 12px;
}

/* ── Permission list (components.md#permission-list-expandable) ─────────── */

.id-perm + .id-perm {
  border-top: 1px solid var(--id-line);
}
.id-perm__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}
.id-perm__icon {
  display: flex;
  color: var(--id-fg-2);
}
.id-perm__icon--act {
  color: var(--id-accent);
}
.id-perm__text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.id-perm__title {
  font-size: 14px;
  line-height: 20px;
  color: var(--id-fg);
}
.id-perm__title--act {
  font-weight: 500;
}
.id-perm__note {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-accent);
}
.id-chev {
  display: flex;
  color: var(--id-fg-3);
}
.id-perm__panel {
  padding: 0 0 12px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.id-perm__detail {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-2);
}
.id-scope {
  font-family: var(--id-mono);
  font-size: 12px;
  color: var(--id-fg-3);
}

/* ── Source row (components.md#source-row-who-is-asking) ────────────────── */

.id-source {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.id-source__details {
  flex-grow: 1;
  min-width: 0;
}
.id-source__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 32px;
}
.id-source__value {
  font-size: 14px;
  color: var(--id-fg);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--id-fg-3);
  text-underline-offset: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-source__value--mono {
  font-family: var(--id-mono);
  font-size: 13px;
}
.id-source__panel {
  padding: 8px 0 2px 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.id-source__links {
  display: flex;
  gap: 16px;
  padding-top: 4px;
  font-size: 13px;
}

/* ── Disclosure (developer details) and code blocks ─────────────────────── */

.id-disclosure__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  min-height: 28px;
  font-size: 13px;
  color: var(--id-fg-2);
}
.id-disclosure__panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 0 22px;
}
.id-pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--id-r-control);
  background: var(--id-sunk);
  border: 1px solid var(--id-line);
  font-family: var(--id-mono);
  font-size: 12px;
  line-height: 19px;
  color: var(--id-fg-2);
  overflow: auto;
}
.id-codeblock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--id-r-control);
  background: var(--id-sunk);
  border: 1px solid var(--id-line);
  box-shadow: var(--id-sh-input);
}
.id-codeblock__code {
  flex-grow: 1;
  font-family: var(--id-mono);
  font-size: 13px;
  color: var(--id-fg);
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Warning callout and note ───────────────────────────────────────────── */

.id-warning {
  box-sizing: border-box;
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--id-r-well);
  background: var(--id-accent-bg);
  border: 1px solid var(--id-accent-line);
}
.id-warning__icon {
  display: flex;
  color: var(--id-accent);
  padding-top: 2px;
}
.id-warning__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--id-fg);
}
.id-warning__body {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-2);
}
.id-note {
  display: flex;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--id-fg-3);
}
.id-note__icon {
  margin-top: 2px;
}
.id-note__text {
  text-wrap: pretty;
}

/* ── Steps, status list, stats (5c, 5d) ─────────────────────────────────── */

.id-step {
  display: flex;
  gap: 14px;
}
.id-step__num {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: var(--id-r-step);
  border: 1px solid var(--id-line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--id-fg-2);
  margin-top: 1px;
}
.id-step__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}
.id-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.id-status + .id-status {
  border-top: 1px solid var(--id-line);
}
.id-status__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--id-r-pill);
  box-sizing: border-box;
  flex-shrink: 0;
  border: 1.5px solid var(--id-fg-3);
}
.id-status--current .id-status__dot {
  border: 0;
  background: var(--id-fg);
  animation: idwave 2s linear infinite;
}
.id-status__text {
  display: flex;
  flex-direction: column;
}
.id-status__title {
  font-size: 14px;
  color: var(--id-fg-3);
}
.id-status--current .id-status__title {
  color: var(--id-fg);
}
.id-status__sub {
  font-size: 12px;
  color: var(--id-fg-3);
}
.id-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.id-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.id-stat__num {
  font-size: 22px;
  line-height: normal;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.id-stat__label {
  font-size: 13px;
  color: var(--id-fg-3);
}
.id-stats__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--id-line);
  padding-top: 12px;
  font-size: 13px;
  color: var(--id-fg-2);
}

/* ── Countdown (5b header, 1b resend) ───────────────────────────────────── */

.id-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--id-fg-2);
}
.id-countdown[data-urgent] {
  color: var(--id-accent);
}
.id-resend {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--id-fg-3);
}

/* ── Accent helpers ─────────────────────────────────────────────────────── */

.id-accent {
  display: flex;
  color: var(--id-accent);
}
.id-fg3 {
  display: flex;
  color: var(--id-fg-3);
}
.id-fg2 {
  display: flex;
  color: var(--id-fg-2);
}

/* ── Connector (motion.md) ──────────────────────────────────────────────── */

.id-conn {
  display: flex;
  align-items: center;
  gap: 10px;
}
.id-conn__wire {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
.id-conn__dots {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
}
.id-conn__dot {
  border-radius: var(--id-r-pill);
  display: block;
  background: var(--id-fg);
  opacity: 0.3;
}
.id-conn__dot--0 {
  width: 3.8px;
  height: 3.8px;
}
.id-conn__dot--1 {
  width: 4.7px;
  height: 4.7px;
}
.id-conn__dot--2 {
  width: 5.6px;
  height: 5.6px;
}
.id-conn__dot--3 {
  width: 6.6px;
  height: 6.6px;
}
.id-conn__dot--4 {
  width: 7.5px;
  height: 7.5px;
}
.id-conn__mid {
  position: relative;
  display: flex;
}
.id-conn__morph {
  display: flex;
}
.id-conn__glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  display: none;
}
.id-conn__x {
  display: flex;
  color: var(--id-accent);
}
.id-conn__x .id-icon {
  stroke-width: 2.25;
}
.id-conn__check {
  color: var(--id-green);
}
.id-conn__check path {
  stroke-dashoffset: 0;
}
.id-conn__ring {
  position: absolute;
  inset: -1px;
  border-radius: var(--id-r-ring);
  pointer-events: none;
  opacity: 0;
  border: 1.5px solid var(--id-ring-line);
}

/* connecting: every dot pulses, the destination ring answers each pulse */
.id-conn[data-state='connecting'] .id-conn__dot {
  opacity: 0.45;
  animation: idwave 2s linear infinite;
  will-change: transform, opacity;
}
.id-conn[data-state='connecting'] .id-conn__dot--1 {
  animation-delay: 0.155s;
}
.id-conn[data-state='connecting'] .id-conn__dot--2 {
  animation-delay: 0.31s;
}
.id-conn[data-state='connecting'] .id-conn__dot--3 {
  animation-delay: 0.465s;
}
.id-conn[data-state='connecting'] .id-conn__dot--4 {
  animation-delay: 0.62s;
}
.id-conn[data-state='connecting'] .id-conn__ring {
  animation: idring 2s var(--id-ease-out) 0.9s infinite;
}

/* done and broken: one last pulse, then the middle dot becomes the verdict */
.id-conn[data-state='done'] .id-conn__dot,
.id-conn[data-state='broken'] .id-conn__dot--0,
.id-conn[data-state='broken'] .id-conn__dot--1,
.id-conn[data-state='broken'] .id-conn__dot--2 {
  animation: idwave 2s linear 0.2s 1;
}
.id-conn[data-state='done'] .id-conn__dot--1,
.id-conn[data-state='broken'] .id-conn__dot--1 {
  animation-delay: 0.355s;
}
.id-conn[data-state='done'] .id-conn__dot--2,
.id-conn[data-state='broken'] .id-conn__dot--2 {
  animation-delay: 0.51s;
}
.id-conn[data-state='done'] .id-conn__dot--3 {
  animation-delay: 0.665s;
}
.id-conn[data-state='done'] .id-conn__dot--4 {
  animation-delay: 0.82s;
}
.id-conn:is([data-state='done'], [data-state='broken'], [data-state='ok'], [data-state='fail']) .id-conn__morph {
  opacity: 0;
  transform: scale(0);
}
.id-conn[data-state='done'] .id-conn__morph {
  animation: idmorph 0.2s var(--id-ease-in) 1.15s backwards;
}
.id-conn[data-state='broken'] .id-conn__morph {
  animation: idmorph 0.2s var(--id-ease-in) 0.82s backwards;
}
.id-conn:is([data-state='done'], [data-state='ok']) .id-conn__glyph--check,
.id-conn:is([data-state='broken'], [data-state='fail']) .id-conn__glyph--x {
  display: flex;
}
.id-conn[data-state='done'] .id-conn__glyph--check {
  animation: idbreak 0.3s var(--id-ease-out) 1.25s both;
}
.id-conn[data-state='done'] .id-conn__check path {
  animation: idcheck 0.3s var(--id-ease-inout) 1.27s backwards;
}
.id-conn[data-state='broken'] .id-conn__glyph--x {
  animation: idbreak 0.3s var(--id-ease-out) 0.92s both;
}
.id-conn:is([data-state='broken'], [data-state='fail']) .id-conn__dot--3,
.id-conn:is([data-state='broken'], [data-state='fail']) .id-conn__dot--4 {
  opacity: 0.12;
}

/* Content swapped in place (4b signed / cancelled) */
.id-fade {
  animation: idfadein 0.35s var(--id-ease-out) both;
}

@keyframes idwave {
  0% {
    opacity: 0.3;
    transform: scale(1);
    animation-timing-function: cubic-bezier(0.33, 0, 0.15, 1);
  }
  14% {
    opacity: 0.85;
    transform: scale(1.2);
    animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
  }
  45%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}
@keyframes idring {
  0% {
    transform: scale(1);
    opacity: 0.45;
  }
  50%,
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}
@keyframes idmorph {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0);
    opacity: 0;
  }
}
@keyframes idbreak {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes idcheck {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes idfadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Reduced motion (motion.md#rules): every animation off, states still swap ── */

@media (prefers-reduced-motion: reduce) {
  .id-conn *,
  .id-fade,
  .id-status__dot {
    animation: none !important;
  }
}

/* ── Phones (layout.md#phones-viewport--480px) ─────────────────────────── */

@media (max-width: 480px) {
  /* The card fills the screen between the header and the footer links (owner direction,
     2026-11-23): no gap above or below it, and its action band sits at the bottom, so a short
     card puts its buttons in thumb reach instead of floating above empty space. A long card
     is unchanged: the buttons still come after the content. Nothing is pinned to the
     viewport, so nobody can approve past what they haven't scrolled through. */
  .id-page {
    min-height: 100dvh;
  }
  /* The card takes the whole screen under the header, so the Privacy, Terms and Status links
     sit just below the fold: there when scrolled to, never taking space from the card (owner
     direction, 2026-11-23). Branded sign-in keeps "Secured by id.org.ai" in view: it says who
     is asking for the password. */
  .id-page:not(:has(.id-footer--secured)) .id-main {
    min-height: calc(100dvh - 72px);
    box-sizing: border-box;
  }
  /* Every page, the one that pins its card to the top on desktop (4b) included: on a phone
     the card already starts at the header, so its top edge stays still either way. */
  .id-main,
  .id-main--top {
    padding-top: 0;
    padding-bottom: 0;
    align-items: stretch;
  }
  /* Only the form that wraps the card grows: a page may hold another, empty form (1b's resend). */
  .id-column > .id-form:has(.id-card),
  .id-main .id-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  .id-main .id-card__body {
    flex-grow: 1;
  }
  .id-card {
    align-self: stretch !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 -20px !important;
    border-radius: 0 !important;
    /* No outer border at all on phones: the card is the screen, and its surface colour is
       enough against the header (owner direction, 2026-11-23; top and bottom were kept before). */
    border: 0 !important;
    box-shadow: none !important;
  }
  .id-card__body {
    padding: 28px 20px 24px !important;
  }
  /* Two actions stack, primary on top; the DOM keeps secondary first. */
  .id-actions {
    grid-template-columns: 1fr !important;
  }
  .id-actions > :last-child {
    order: -1;
  }
  .id-actions > * {
    min-height: var(--id-control-h-phone) !important;
  }
  /* Two quiet actions have no primary, so they keep their order when stacked: Pause above
     Remove, Back above Export (owner direction, 2026-11-23). */
  .id-actions > .id-btn--secondary:last-child {
    order: 0;
  }
  /* Titles, descriptions and foot lines fill each line before wrapping (balanced lines break
     too early on a narrow screen) and never leave one word alone on the last line. Browsers
     without `pretty` wrap plainly (owner direction, 2026-11-23). */
  .id-title,
  .id-desc,
  .id-foottext {
    text-wrap: wrap;
    text-wrap: pretty;
  }
  /* Side-by-side radio cards (3a's Access) stack, in DOM order (owner direction, 2026-10-01). */
  .id-radios--row {
    flex-direction: column;
  }
  .id-radios--row > .id-radio {
    flex-basis: auto;
  }
  /* The connector shrinks (owner direction, 2026-10-06): 48px tiles (56 × 0.857,
     content and ring with them) and the middle three dots. The middle dot still
     becomes the verdict, and the pulse still runs toward the destination. */
  .id-tile-wrap {
    zoom: 0.857;
  }
  .id-conn__dot--0,
  .id-conn__dot--4 {
    display: none;
  }
  /* Every md control is 48px, as the action band's buttons are (owner direction, 2026-10-06). */
  .id-input:not(.id-textarea),
  .id-btn:not(.id-btn--sm) {
    min-height: var(--id-control-h-phone);
  }
  .id-check {
    min-height: 44px;
  }
}

/* Phones and touch screens (owner direction, 2026-10-06). Field text is 16px:
   below that, iOS Safari zooms the page when a field takes focus. A coarse
   pointer covers landscape phones, which are wider than 480px. */
@media (max-width: 480px), (pointer: coarse) {
  .id-input,
  .id-select option {
    font-size: 16px;
  }
  .id-select option {
    min-height: 44px;
  }
}

/* ── Agent setup, payments and connect (screens 9 to 24, docs/agent-setup) ── */

/* Radii these screens use that tokens.css doesn't name. */
:root {
  --id-r-minitile: 11px; /* 36px mini tile */
  --id-r-tag: 6px; /* step tag */
  --id-r-method: 7px; /* 40×28 payment method mark */
}

/* ── Header status (setup pages, header right slot) ─────────────────────── */

.id-hstatus {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--id-fg-2);
}
.id-sdot {
  width: 6px;
  height: 6px;
  border-radius: var(--id-r-pill);
  background: var(--id-green);
  flex-shrink: 0;
}
.id-sdot--warn {
  background: var(--id-accent);
}
/* Still working: the listening dot and a comparison that is still running. */
.id-sdot--busy {
  background: var(--id-fg);
  animation: idlisten 1.6s ease-in-out infinite;
}

/* ── Connector: hold (not moving, needs someone) ────────────────────────── */

.id-conn[data-state='hold'] .id-conn__dot--2 {
  background: var(--id-accent);
  opacity: 1;
}

/* ── Mini tile and chip ─────────────────────────────────────────────────── */

.id-minitile {
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border-radius: var(--id-r-minitile);
  background: var(--id-bezel-bg);
  border: 1px solid var(--id-bezel-border);
  box-shadow: var(--id-bezel-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--id-fg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.id-chip {
  font-size: 11px;
  line-height: 16px;
  padding: 1px 7px;
  border-radius: var(--id-r-pill);
  background: var(--id-raised);
  color: var(--id-fg-2);
  font-weight: 500;
  white-space: nowrap;
}

/* ── Step list ──────────────────────────────────────────────────────────── */

.id-steps {
  display: flex;
  flex-direction: column;
}
.id-sstep {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 14px;
}
.id-sstep__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.id-sstep__glyph {
  width: 18px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.id-sstep--done .id-sstep__glyph {
  color: var(--id-green);
}
.id-sstep--fail .id-sstep__glyph {
  color: var(--id-accent);
}
.id-sstep--held .id-sstep__glyph {
  color: var(--id-fg-2);
}
.id-sstep--done .id-sstep__glyph .id-icon,
.id-sstep--fail .id-sstep__glyph .id-icon {
  stroke-width: 2.25;
}
.id-sstep__dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: var(--id-r-pill);
  background: var(--id-fg);
  display: block;
  position: relative;
}
.id-sstep--you .id-sstep__dot {
  background: var(--id-accent);
}
.id-sstep--todo .id-sstep__dot {
  width: 5.6px;
  height: 5.6px;
  opacity: 0.3;
}
.id-sstep__pulse {
  position: absolute;
  width: 7.5px;
  height: 7.5px;
  border-radius: var(--id-r-pill);
  background: var(--id-fg);
  animation: idpulse 2s var(--id-ease-out) infinite;
}
.id-sstep__line {
  flex-grow: 1;
  width: 2px;
  margin: 5px 0 5px;
  background-image: radial-gradient(circle at 1px 1px, var(--id-rail) 1px, transparent 1.3px);
  background-size: 2px 7px;
  background-repeat: repeat-y;
}
.id-sstep--done .id-sstep__line {
  background-image: radial-gradient(circle at 1px 1px, var(--id-rail-done) 1px, transparent 1.3px);
}
.id-sstep__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 18px;
  min-width: 0;
}
.id-sstep:last-child .id-sstep__body {
  padding-bottom: 0;
}
/* No rail after the last step. */
.id-sstep:last-child .id-sstep__line {
  display: none;
}
.id-sstep__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.id-sstep__title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--id-fg);
}
.id-sstep--todo .id-sstep__title {
  color: var(--id-fg-3);
}
.id-sstep__when {
  font-size: 12px;
  line-height: 20px;
  color: var(--id-fg-2);
  flex-shrink: 0;
  white-space: nowrap;
}
.id-sstep--done .id-sstep__when {
  font-family: var(--id-mono);
  color: var(--id-fg-3);
}
.id-sstep--you .id-sstep__when,
.id-sstep--fail .id-sstep__when {
  font-weight: 500;
  color: var(--id-accent);
}
.id-sstep__detail {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-2);
  text-wrap: pretty;
}
.id-sstep--done .id-sstep__detail,
.id-sstep--todo .id-sstep__detail {
  color: var(--id-fg-3);
}
.id-sstep__evidence {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.id-steptag {
  display: inline-block;
  font-family: var(--id-mono);
  font-size: 11.5px;
  line-height: 17px;
  color: var(--id-fg-2);
  border: 1px solid var(--id-line-2);
  border-radius: var(--id-r-tag);
  padding: 0 6px;
  margin-right: 7px;
  white-space: nowrap;
}

/* ── Evidence ───────────────────────────────────────────────────────────── */

/* A well with a 10px gap (call result, field mapping) or 12px (Stripe's fields). */
.id-well--ten,
.id-well--10 {
  gap: 10px;
}
.id-well--12 {
  gap: 12px;
}
.id-well--prompt {
  gap: 6px;
  padding-top: 10px;
}
.id-well--quoted {
  padding: 14px 16px;
}
.id-evrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.id-evrow--wrap {
  flex-wrap: wrap;
}
.id-listen {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.id-listen__text {
  font-family: var(--id-mono);
  font-size: 12.5px;
  line-height: 20px;
  color: var(--id-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-listen__time {
  font-family: var(--id-mono);
  font-size: 12px;
  line-height: 20px;
  color: var(--id-fg-3);
  flex-shrink: 0;
}
/* 13/19 helper text: evidence notes, the spend helper line, sub lines. */
.id-help {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-3);
}
.id-help--top {
  padding-top: 2px;
}
.id-call__req {
  font-family: var(--id-mono);
  font-size: 12.5px;
  line-height: 20px;
  color: var(--id-fg);
  overflow-wrap: anywhere;
  min-width: 0;
}
.id-call__method {
  color: var(--id-fg-3);
}
.id-call__status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--id-mono);
  font-size: 12px;
  line-height: 20px;
  color: var(--id-fg-2);
  flex-shrink: 0;
}
.id-call__rows {
  border-top: 1px solid var(--id-line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.id-prompt__text {
  font-family: var(--id-mono);
  font-size: 12.5px;
  line-height: 20px;
  color: var(--id-fg);
  overflow-wrap: anywhere;
}
.id-compare__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 20px;
}
.id-compare__row + .id-compare__row {
  border-top: 1px solid var(--id-line);
  padding-top: 8px;
}
.id-compare__name {
  color: var(--id-fg);
}
.id-compare__state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--id-mono);
  font-size: 12px;
  color: var(--id-fg-2);
  white-space: nowrap;
}
.id-fieldmap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
}
.id-fieldmap__col {
  font-family: var(--id-mono);
  font-size: 12.5px;
  color: var(--id-fg);
  overflow-wrap: anywhere;
}
/* Rates under a plan's price, inside the plan evidence well. */
.id-rates {
  border-top: 1px solid var(--id-line);
  margin-top: 2px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Pays-with line ─────────────────────────────────────────────────────── */

.id-payline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 20px;
  padding: 0 2px;
}
.id-payline__method {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--id-fg-2);
  min-width: 0;
}
.id-fg {
  color: var(--id-fg);
}

/* A line under the actions, or in the body, fills before it wraps (balanced lines break
   early), without leaving one word alone on the last line. */
.id-foottext--fill {
  text-wrap: wrap;
  text-wrap: pretty;
}

/* A button whose icon follows its label (the arrow on actions that leave for another site). */
.id-btn--icon-end .id-icon {
  order: 1;
}

/* ── Two-line checkbox, terms line ──────────────────────────────────────── */

.id-check--top {
  position: relative;
  align-items: flex-start;
  line-height: 20px;
}
/* One or two 20px lines: the hit area reaches 44px. */
.id-check--top::before {
  content: '';
  position: absolute;
  inset: -12px 0;
}
.id-check--top .id-check__box {
  margin-top: 2px;
}
.id-check--top .id-check__tick .id-icon {
  stroke-width: 3.25;
}
.id-check--terms {
  padding: 0 2px;
}
.id-check__lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.id-check__sub {
  color: var(--id-fg-3);
}
/* The primary action waits for the terms line: dimmed here, and terms.js sets
   `disabled` too. The checkbox is `required`, so the form can't post without it. */
.id-card:has([data-terms]:not(:checked)) [data-needs-terms] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* ── Toggle (role="switch") ─────────────────────────────────────────────── */

.id-toggle {
  position: relative;
  display: flex;
  flex-shrink: 0;
  cursor: pointer;
}
/* Small by design (36×22): the hit area is 44px. */
.id-toggle::before {
  content: '';
  position: absolute;
  inset: -11px -4px;
}
.id-toggle__track {
  width: 36px;
  height: 22px;
  box-sizing: border-box;
  border-radius: var(--id-r-pill);
  background: var(--id-line-2);
  display: flex;
  align-items: center;
  transition: background-color 0.15s;
}
.id-toggle__knob {
  width: 18px;
  height: 18px;
  border-radius: var(--id-r-pill);
  background: var(--id-fg-2);
  margin-left: 2px;
  box-shadow: var(--id-sh-knob);
  transition: margin-left 0.15s var(--id-ease-out), background-color 0.15s;
}
.id-toggle:has(.id-hidden-input:checked) .id-toggle__track {
  background: var(--id-fg);
}
.id-toggle:has(.id-hidden-input:checked) .id-toggle__knob {
  background: var(--id-bg);
  margin-left: 16px;
}
.id-toggle:has(.id-hidden-input:focus-visible) .id-toggle__track {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}
/* A labelled toggle row (20d): text on the left, the switch on the right. */
.id-togglerow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  min-height: 44px;
}
.id-line14 {
  font-size: 14px;
  line-height: 20px;
  color: var(--id-fg);
}

/* ── Spend alerts row ───────────────────────────────────────────────────── */

.id-alerts__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.id-alerts__title {
  flex-grow: 1;
  font-size: 14px;
  line-height: 20px;
  color: var(--id-fg);
  cursor: pointer;
}
.id-alerts__row .id-toggle {
  margin: -1px 2px -1px 0;
}
.id-alerts__panel {
  padding: 0 0 12px 28px;
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-2);
}
.id-alerts__panel[hidden] {
  display: none;
}
/* A bare chevron button that shows or hides a panel (aria-expanded). */
.id-chevbtn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--id-fg-3);
  cursor: pointer;
  border-radius: var(--id-r-sm);
}
.id-chevbtn::before {
  content: '';
  position: absolute;
  inset: -15px;
}
.id-chevbtn .id-icon {
  transition: transform 0.2s;
}
.id-chevbtn--r[aria-expanded='true'] .id-icon {
  transform: rotate(90deg);
}
.id-chevbtn--d[aria-expanded='true'] .id-icon {
  transform: rotate(180deg);
}

/* ── Segmented tabs (19a) and the billing toggle (24a) ──────────────────── */

.id-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--id-r-option);
  background: var(--id-sunk);
  border: 1px solid var(--id-line);
}
.id-seg__cell {
  flex: 1 1 0;
  height: 36px;
  box-sizing: border-box;
  border-radius: var(--id-r-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--id-fg-2);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
/* 36px cells: the hit area is 44px. */
.id-seg__cell::before {
  content: '';
  position: absolute;
  inset: -4px 0;
}
.id-seg__cell:has(.id-hidden-input:checked) {
  background: var(--id-raised);
  color: var(--id-fg);
  border-color: var(--id-line-2);
  box-shadow: var(--id-sh-ctrl);
}
.id-seg__cell:has(.id-hidden-input:focus-visible),
.id-billing__cell:has(.id-hidden-input:focus-visible) {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}
.id-billing {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--id-r-pill);
  background: var(--id-sunk);
  border: 1px solid var(--id-line);
}
.id-billing__cell {
  height: 26px;
  padding: 0 12px;
  border-radius: var(--id-r-pill);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--id-fg-3);
  display: flex;
  align-items: center;
  position: relative;
}
/* 26px cells, small by design: the hit area is 44px. */
.id-billing__cell::before {
  content: '';
  position: absolute;
  inset: -9px 0;
}
.id-billing__cell:has(.id-hidden-input:checked) {
  background: var(--id-raised);
  color: var(--id-fg);
  box-shadow: var(--id-sh-knob);
}

/* ── Plan cards (24a) ───────────────────────────────────────────────────── */

.id-plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.id-plans__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.id-plans__list {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Monthly is the default; the yearly price shows when the Yearly cell is picked. */
.id-plans [data-price='yearly'],
.id-plans:has([data-billing='yearly']:checked) [data-price='monthly'] {
  display: none;
}
.id-plans:has([data-billing='yearly']:checked) [data-price='yearly'] {
  display: inline;
}
.id-plan {
  box-sizing: border-box;
  border-radius: var(--id-r-option);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-ctrl);
  transition: border-color 0.15s, background 0.15s;
}
.id-plan:has(.id-hidden-input:checked) {
  border-color: var(--id-select);
  background: var(--id-raised);
  box-shadow: var(--id-sh-ctrl), var(--id-ring);
}
.id-plan:has(.id-hidden-input:focus-visible) {
  outline: 2px solid var(--id-select);
  outline-offset: 2px;
}
.id-plan__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
}
.id-plan__pick {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-grow: 1;
  min-width: 0;
  cursor: pointer;
}
/* The radio's hit area fills the card's padding, up to the chevron's own. */
.id-plan__pick::before {
  content: '';
  position: absolute;
  inset: -14px 0 -14px -14px;
}
.id-plan:has(.id-hidden-input:checked) .id-radio__ring {
  border-color: var(--id-fg);
}
.id-plan:has(.id-hidden-input:checked) .id-radio__dot {
  display: block;
}
.id-plan__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  min-width: 0;
}
.id-plan__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 6px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: var(--id-fg);
}
/* The name takes the spare room, so the price sits at the right; on a narrow
   phone the price and its note drop to their own line, under the name. */
.id-plan__name {
  flex-grow: 1;
}
.id-plan__cost {
  display: flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.id-plan__price {
  font-variant-numeric: tabular-nums;
}
.id-plan__note {
  font-size: 13px;
  font-weight: 400;
  color: var(--id-fg-3);
}
/* "$299/month + data fees": a note that starts with a slash sits against the price. */
.id-plan__note--slash {
  margin-left: -6px;
}
.id-plan__more {
  margin-top: 3px;
}
.id-plan__panel {
  margin: 0 14px 14px 42px;
  padding-top: 12px;
  border-top: 1px solid var(--id-line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.id-plan__panel[hidden] {
  display: none;
}
.id-plan__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 20px;
}
.id-plan__label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--id-fg-2);
  min-width: 0;
}
.id-plan__label .id-icon {
  color: var(--id-fg-3);
  stroke-width: 2;
}
.id-plan__value {
  font-family: var(--id-mono);
  font-size: 12px;
  color: var(--id-fg-2);
  white-space: nowrap;
}

/* ── Stripe's fields (19a) ──────────────────────────────────────────────── */

/* The picture of Stripe's method tabs: an icon over its label, as Stripe draws them (the
   Appearance API restyles a tab but can't remove its icon). Sizes measured from the real element. */
.id-stripe__tabs {
  display: flex;
  gap: 7px;
}
.id-stripe__tab {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  height: 52px;
  padding: 8px 12px;
  border-radius: var(--id-r-sm);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  line-height: 15px;
  color: var(--id-fg-2);
}
.id-stripe__tab--on {
  background: var(--id-raised);
  border-color: var(--id-line-2);
  box-shadow: var(--id-sh-ctrl);
  color: var(--id-fg);
}
/* Stripe's fields sit straight on the card, as our own fields do: no sunk box around them. */
.id-stripe {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Stripe's Payment Element mounts here. Until it does, the box holds a picture
   of it (aria-hidden, never real inputs), which the element replaces. */
.id-stripe__picture {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Once Stripe's element mounts, the picture and its spoken stand-in go. */
.id-stripe__picture[hidden] {
  display: none;
}
.id-stripe__pair {
  display: flex;
  gap: 12px;
}
.id-stripe__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
}
.id-stripe__box {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--id-r-control);
  background: var(--id-panel);
  border: 1px solid var(--id-line-2);
  box-shadow: var(--id-sh-input);
  color: var(--id-fg-3);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* A pictured field never wraps: it truncates, as a real input would. */
.id-stripe__text {
  min-width: 0;
  /* Room for a glyph's overhang, so truncation never clips the last letter's edge. */
  padding: 0 2px;
  margin: 0 -2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-stripe__box--value {
  color: var(--id-fg);
}
.id-stripe__box .id-icon {
  color: var(--id-fg-3);
  margin-right: -3px;
}

/* ── Agents list (10a) and activity (10e) ───────────────────────────────── */

.id-agentrow {
  box-sizing: border-box;
  border-radius: var(--id-r-option);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-ctrl);
}
.id-agentrow__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 60px;
  box-sizing: border-box;
  border-radius: var(--id-r-option);
}
.id-rowtext {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex-grow: 1;
  min-width: 0;
}
.id-rowtext--fit {
  flex-grow: 0;
}
.id-rowtext__name {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--id-fg);
}
.id-rowtext__name--plain {
  line-height: 20px;
  font-weight: 400;
}
.id-rowtext__sub {
  font-size: 13px;
  color: var(--id-fg-3);
}
.id-rowtext__sub--clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.id-agentrow__panel {
  padding: 2px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.id-agentrow__facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--id-line);
}
.id-connrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.id-connrow + .id-connrow {
  border-top: 1px solid var(--id-line);
}
.id-linkrow {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.id-activity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
}
.id-activity + .id-activity {
  border-top: 1px solid var(--id-line);
}
.id-activity__icon {
  display: flex;
  color: var(--id-fg-2);
  padding-top: 2px;
}
.id-activity--money .id-activity__icon {
  color: var(--id-accent);
}
.id-activity__text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.id-activity__more {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-3);
  overflow-wrap: anywhere;
}
.id-activity--money .id-activity__more {
  color: var(--id-accent);
}
.id-when {
  font-family: var(--id-mono);
  font-size: 12px;
  line-height: 20px;
  color: var(--id-fg-3);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Money: methods, spend, charges, bar, total (19g, 20a to 20c) ───────── */

.id-method {
  box-sizing: border-box;
  border-radius: var(--id-r-option);
  border: 1px solid var(--id-line-2);
  background: var(--id-panel);
  box-shadow: var(--id-sh-ctrl);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  min-height: 60px;
}
.id-method > .id-link,
.id-connrow > .id-link {
  white-space: nowrap;
  flex-shrink: 0;
}
.id-method__mark {
  width: 40px;
  height: 28px;
  box-sizing: border-box;
  border-radius: var(--id-r-method);
  background: var(--id-raised);
  border: 1px solid var(--id-line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--id-fg-2);
  flex-shrink: 0;
}
.id-moneyrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}
.id-moneyrow--charge {
  padding: 11px 0;
}
.id-moneyrow + .id-moneyrow {
  border-top: 1px solid var(--id-line);
}
.id-spend__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  min-width: 0;
}
.id-spend__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.id-amount {
  font-family: var(--id-mono);
  font-size: 12.5px;
  line-height: 20px;
  color: var(--id-fg);
  white-space: nowrap;
  flex-shrink: 0;
}
.id-amount__of {
  color: var(--id-fg-3);
}
.id-bar {
  height: 4px;
  border-radius: var(--id-r-pill);
  background: var(--id-track);
  overflow: hidden;
}
.id-bar__fill {
  width: 0;
  height: 100%;
  border-radius: var(--id-r-pill);
  background: var(--id-fg);
  opacity: 0.82;
}
.id-bar--full .id-bar__fill {
  background: var(--id-accent);
  opacity: 1;
}
/* One rule per whole percent: the page's security policy allows no inline style. */
.id-bar__fill[data-p='1'] {
  width: 1%;
}
.id-bar__fill[data-p='2'] {
  width: 2%;
}
.id-bar__fill[data-p='3'] {
  width: 3%;
}
.id-bar__fill[data-p='4'] {
  width: 4%;
}
.id-bar__fill[data-p='5'] {
  width: 5%;
}
.id-bar__fill[data-p='6'] {
  width: 6%;
}
.id-bar__fill[data-p='7'] {
  width: 7%;
}
.id-bar__fill[data-p='8'] {
  width: 8%;
}
.id-bar__fill[data-p='9'] {
  width: 9%;
}
.id-bar__fill[data-p='10'] {
  width: 10%;
}
.id-bar__fill[data-p='11'] {
  width: 11%;
}
.id-bar__fill[data-p='12'] {
  width: 12%;
}
.id-bar__fill[data-p='13'] {
  width: 13%;
}
.id-bar__fill[data-p='14'] {
  width: 14%;
}
.id-bar__fill[data-p='15'] {
  width: 15%;
}
.id-bar__fill[data-p='16'] {
  width: 16%;
}
.id-bar__fill[data-p='17'] {
  width: 17%;
}
.id-bar__fill[data-p='18'] {
  width: 18%;
}
.id-bar__fill[data-p='19'] {
  width: 19%;
}
.id-bar__fill[data-p='20'] {
  width: 20%;
}
.id-bar__fill[data-p='21'] {
  width: 21%;
}
.id-bar__fill[data-p='22'] {
  width: 22%;
}
.id-bar__fill[data-p='23'] {
  width: 23%;
}
.id-bar__fill[data-p='24'] {
  width: 24%;
}
.id-bar__fill[data-p='25'] {
  width: 25%;
}
.id-bar__fill[data-p='26'] {
  width: 26%;
}
.id-bar__fill[data-p='27'] {
  width: 27%;
}
.id-bar__fill[data-p='28'] {
  width: 28%;
}
.id-bar__fill[data-p='29'] {
  width: 29%;
}
.id-bar__fill[data-p='30'] {
  width: 30%;
}
.id-bar__fill[data-p='31'] {
  width: 31%;
}
.id-bar__fill[data-p='32'] {
  width: 32%;
}
.id-bar__fill[data-p='33'] {
  width: 33%;
}
.id-bar__fill[data-p='34'] {
  width: 34%;
}
.id-bar__fill[data-p='35'] {
  width: 35%;
}
.id-bar__fill[data-p='36'] {
  width: 36%;
}
.id-bar__fill[data-p='37'] {
  width: 37%;
}
.id-bar__fill[data-p='38'] {
  width: 38%;
}
.id-bar__fill[data-p='39'] {
  width: 39%;
}
.id-bar__fill[data-p='40'] {
  width: 40%;
}
.id-bar__fill[data-p='41'] {
  width: 41%;
}
.id-bar__fill[data-p='42'] {
  width: 42%;
}
.id-bar__fill[data-p='43'] {
  width: 43%;
}
.id-bar__fill[data-p='44'] {
  width: 44%;
}
.id-bar__fill[data-p='45'] {
  width: 45%;
}
.id-bar__fill[data-p='46'] {
  width: 46%;
}
.id-bar__fill[data-p='47'] {
  width: 47%;
}
.id-bar__fill[data-p='48'] {
  width: 48%;
}
.id-bar__fill[data-p='49'] {
  width: 49%;
}
.id-bar__fill[data-p='50'] {
  width: 50%;
}
.id-bar__fill[data-p='51'] {
  width: 51%;
}
.id-bar__fill[data-p='52'] {
  width: 52%;
}
.id-bar__fill[data-p='53'] {
  width: 53%;
}
.id-bar__fill[data-p='54'] {
  width: 54%;
}
.id-bar__fill[data-p='55'] {
  width: 55%;
}
.id-bar__fill[data-p='56'] {
  width: 56%;
}
.id-bar__fill[data-p='57'] {
  width: 57%;
}
.id-bar__fill[data-p='58'] {
  width: 58%;
}
.id-bar__fill[data-p='59'] {
  width: 59%;
}
.id-bar__fill[data-p='60'] {
  width: 60%;
}
.id-bar__fill[data-p='61'] {
  width: 61%;
}
.id-bar__fill[data-p='62'] {
  width: 62%;
}
.id-bar__fill[data-p='63'] {
  width: 63%;
}
.id-bar__fill[data-p='64'] {
  width: 64%;
}
.id-bar__fill[data-p='65'] {
  width: 65%;
}
.id-bar__fill[data-p='66'] {
  width: 66%;
}
.id-bar__fill[data-p='67'] {
  width: 67%;
}
.id-bar__fill[data-p='68'] {
  width: 68%;
}
.id-bar__fill[data-p='69'] {
  width: 69%;
}
.id-bar__fill[data-p='70'] {
  width: 70%;
}
.id-bar__fill[data-p='71'] {
  width: 71%;
}
.id-bar__fill[data-p='72'] {
  width: 72%;
}
.id-bar__fill[data-p='73'] {
  width: 73%;
}
.id-bar__fill[data-p='74'] {
  width: 74%;
}
.id-bar__fill[data-p='75'] {
  width: 75%;
}
.id-bar__fill[data-p='76'] {
  width: 76%;
}
.id-bar__fill[data-p='77'] {
  width: 77%;
}
.id-bar__fill[data-p='78'] {
  width: 78%;
}
.id-bar__fill[data-p='79'] {
  width: 79%;
}
.id-bar__fill[data-p='80'] {
  width: 80%;
}
.id-bar__fill[data-p='81'] {
  width: 81%;
}
.id-bar__fill[data-p='82'] {
  width: 82%;
}
.id-bar__fill[data-p='83'] {
  width: 83%;
}
.id-bar__fill[data-p='84'] {
  width: 84%;
}
.id-bar__fill[data-p='85'] {
  width: 85%;
}
.id-bar__fill[data-p='86'] {
  width: 86%;
}
.id-bar__fill[data-p='87'] {
  width: 87%;
}
.id-bar__fill[data-p='88'] {
  width: 88%;
}
.id-bar__fill[data-p='89'] {
  width: 89%;
}
.id-bar__fill[data-p='90'] {
  width: 90%;
}
.id-bar__fill[data-p='91'] {
  width: 91%;
}
.id-bar__fill[data-p='92'] {
  width: 92%;
}
.id-bar__fill[data-p='93'] {
  width: 93%;
}
.id-bar__fill[data-p='94'] {
  width: 94%;
}
.id-bar__fill[data-p='95'] {
  width: 95%;
}
.id-bar__fill[data-p='96'] {
  width: 96%;
}
.id-bar__fill[data-p='97'] {
  width: 97%;
}
.id-bar__fill[data-p='98'] {
  width: 98%;
}
.id-bar__fill[data-p='99'] {
  width: 99%;
}
.id-bar__fill[data-p='100'] {
  width: 100%;
}
.id-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.id-total__num {
  font-size: 40px;
  line-height: 44px;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.id-total__note {
  font-size: 13px;
  line-height: 19px;
  color: var(--id-fg-3);
  text-wrap: balance;
}
/* The month's limit inside a well (19g): label and amount, the bar, then the lines. */
.id-limit__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.id-limit__label {
  font-size: 13px;
  color: var(--id-fg-2);
}
.id-limit__lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}

/* Money rows (a limit's lines, a plan's rates): the amount never breaks; a long label wraps instead. */
.id-limit__lines .id-kv__key,
.id-rates .id-kv__key {
  flex-shrink: 1;
}
.id-limit__lines .id-kv__value,
.id-rates .id-kv__value {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Motion ─────────────────────────────────────────────────────────────── */

@keyframes idpulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70%,
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}
@keyframes idlisten {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .id-sstep__pulse,
  .id-sdot--busy {
    animation: none !important;
  }
  .id-toggle__track,
  .id-toggle__knob,
  .id-chevbtn .id-icon,
  .id-plan {
    transition: none;
  }
}

/* ── Phones ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  /* What a step carries under its description (a well, a field, the plan's limit and alerts)
     runs the full width of the card instead of sitting inside the rail's 32px indent: on a
     phone that is a tenth of the width, and this is the part a person reads and taps. The
     dotted rail pauses behind it and picks up again underneath (owner direction, 2026-11-23). */
  .id-sstep__evidence {
    position: relative;
    margin-left: -32px;
    padding-bottom: 4px;
    background: var(--id-card);
  }
  /* Field mapping (18a): the column's name sits above its select instead of beside it, so
     the select gets the full width and a long destination isn't cut off (owner direction,
     2026-11-23). */
  .id-fieldmap {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .id-fieldmap + .id-fieldmap {
    margin-top: 4px;
  }
  /* The repo's phone rules for controls (ui.css, owner direction 2026-10-06), applied to the
     new ones: every md control is 48px, so the method tabs' well is 48px (40px cells) and the
     picture of Stripe's fields matches the real inputs beside it. */
  .id-seg__cell {
    height: 40px;
  }
  .id-stripe__box {
    height: var(--id-control-h-phone);
  }
}

/* Field text is 16px on phones and touch screens (ui.css); the pictured fields follow. */
@media (max-width: 480px), (pointer: coarse) {
  .id-stripe__box {
    font-size: 16px;
  }
  /* Stripe's tabs measure 53px at its 16px base size. */
  .id-stripe__tab {
    height: 53px;
  }
}

/* ── Agents (5a–5d) ─────────────────────────────────────────────────────── */

/*
 * 5a: spend limit and expiry side by side, one column on phones (the mock's
 * grid at a 12px gap). The only grid of its kind now that the sign-in
 * providers (.id-providers) stack one per row.
 */
.id-agent-limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 12px;
}

/*
 * Sign-in screens (1a–1g): the few components only they use.
 * Tokens only (tokens.css); values match docs/product-update/mocks.
 */

/* ── Organisation row (1c SSO well) ───────────────────────────────────── */

.id-orgrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
