/* The shell every page shares: the announcement line, the glass nav with its
   pill items and full-width menu panel, the phone sheet, the footer, the
   placeholder pages and the sign-in page (the Figma "Log in" screens).
   Motion: the highlight glides between items over 320 ms, menus open after
   90 ms of rest as the panel grows to its one height over 360 ms, and moving
   between items slides the menus the way you moved: the old one leaves in
   160 ms, the new one arrives 60 ms later over 420 ms. Everything closes
   160 ms after the pointer leaves. */

/* ---- Announcement --------------------------------------------------------------- */

.announce {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 36px; padding: 6px var(--gutter);
  background: var(--klavender); color: var(--kblack);
  font-size: var(--step--2); text-align: center;
  /* Above the curtain an open menu lays over the page: the banner isn't
     part of what it dims. */
  position: relative; z-index: 55;
}
.announce-text { opacity: 0.86; }
.announce-cta { display: inline-flex; align-items: center; gap: 4px; flex: none; white-space: nowrap; font-weight: 600; }
.announce-cta .ico { width: 15px; height: 15px; transition: transform var(--dur-fast) var(--ease-ui); }
.announce:hover .announce-cta .ico { transform: translateX(3px); }
/* On phones one line that says where it goes is the link, with its arrow. */
.announce-short { display: none; }
@media (max-width: 720px) {
  .announce-cta b, .announce-cta { font-size: 0; gap: 0; }
  .announce-cta .ico { width: 14px; height: 14px; }
  .announce-text { display: none; }
  .announce-short { display: inline; font-weight: 600; }
}

/* ---- Brand ------------------------------------------------------------------------ */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; flex: none; }
.brand .mark { width: 30px; height: 30px; transition: transform var(--dur-slow) var(--ease-bounce); }
.brand:hover .mark { transform: rotate(-8deg) scale(1.05); }

/* ---- Nav: a glass bar with pill items ------------------------------------------ */

/* The bar's divider is one hairline (.flyout-edge), the same in every state:
   it rests under the bar and rides the menu's wipe down and back up. */
.nav { position: sticky; top: 0; z-index: 60; isolation: isolate; --divider: rgba(255, 255, 255, 0.06); --wipe: 360ms; }
.nav.scrolled { --divider: rgba(255, 255, 255, 0.08); }
[data-theme="light"] .nav { --divider: rgba(30, 29, 30, 0.08); }
/* The glass sits on a pseudo-element: a backdrop filter on the header itself
   would trap the fixed phone sheet inside it. */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(30, 29, 30, 0.55);
  -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  transition: background-color 240ms var(--ease-ui);
}
.nav.scrolled::before { background: rgba(26, 25, 26, 0.72); }
/* Open, and until the wipe back up is done, the bar is the panel's color:
   one surface that grows down and draws back up. */
.nav.menu-open::before, .nav.menu-closing::before, .nav.sheet-open::before { background: #191819; transition-duration: 160ms; }
.nav.menu-closing::before { transition: none; }
[data-theme="light"] .nav::before { background: rgba(255, 255, 255, 0.62); }
[data-theme="light"] .nav.scrolled::before { background: rgba(255, 255, 255, 0.9); }
[data-theme="light"] .nav.menu-open::before, [data-theme="light"] .nav.menu-closing::before, [data-theme="light"] .nav.sheet-open::before { background: #FFFFFF; }

.nav-bar { position: relative; display: flex; align-items: center; gap: 24px; height: var(--nav-h); }
/* The smallest phones: the bar's pieces sit a little closer. */
@media (max-width: 360px) { .nav-bar { gap: 12px; } .nav-cta { padding: 0 12px; } }
.nav-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; }
.nav-pill {
  position: absolute; left: 0; top: 50%; height: 36px; margin-top: -18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0; pointer-events: none;
  transition: transform 320ms var(--ease-ui), width 320ms var(--ease-ui), opacity 200ms var(--ease-ui);
}
.nav-pill.show { opacity: 1; }
[data-theme="light"] .nav-pill { background: rgba(30, 29, 30, 0.06); }
.nav-item {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center;
  height: 36px; padding: 0 16px; border-radius: var(--radius-pill);
  color: var(--muted); font-size: 15px; font-weight: 500;
  transition: color var(--dur-fast) var(--ease-ui);
}
.nav-item:hover, .nav-item.on, .nav-item.current { color: var(--text); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-dash { gap: 6px; }
.nav-dash .ico { width: 15px; height: 15px; transition: transform var(--dur-quick) var(--ease-ui); }
.nav-dash:hover .ico { transform: translateX(2px); }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 700;
}

.burger { display: none; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-pill); transition: background-color var(--dur-fast) var(--ease-ui); }
.burger:active { background: var(--card-hover); }
.burger span { grid-area: 1 / 1; width: 18px; height: 1.6px; border-radius: 2px; background: var(--text); transition: transform var(--dur-fast) var(--ease-ui); }
.burger span:first-child { transform: translateY(-3.5px); }
.burger span:last-child { transform: translateY(3.5px); }
.burger.x span:first-child { transform: rotate(45deg); }
.burger.x span:last-child { transform: rotate(-45deg); }

/* ---- The menu panel: full width under the bar, like Modal's ---------------------- */

/* The panel keeps its height and is revealed by a wipe from the top, made
   of transforms only so the compositor runs it even while the page's
   pictures keep the main thread busy. It's opaque, with no backdrop
   filter: a filtered layer being clipped is what a GPU shows as a black
   box for a frame. The bar's divider is the wipe's edge: it goes down with
   the panel and, closing, back up with it to where it rests, as the panel
   draws back up over its menu. */
.flyout {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 2;
  height: var(--h); overflow: hidden;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear var(--wipe);
}
.flyout.open { visibility: visible; pointer-events: auto; transition: none; }
/* The wipe: the sheet comes down from behind the bar while its contents
   move up by the same amount on the same curve, so they hold still and are
   uncovered rather than carried; closing runs the same way back. */
.flyout-sheet { height: 100%; overflow: hidden; background: #191819; transform: translateY(-100%); transition: transform var(--wipe) var(--ease-ui); }
.flyout-content { position: relative; height: 100%; transform: translateY(100%); transition: transform var(--wipe) var(--ease-ui); }
.flyout.open :is(.flyout-sheet, .flyout-content) { transform: none; }
[data-theme="light"] .flyout-sheet { background: #FFFFFF; }
.flyout-edge {
  position: absolute; left: 0; right: 0; top: calc(100% - 1px); z-index: 3; height: 1px; pointer-events: none;
  background: var(--divider);
  transform: translateY(0);
  transition: transform var(--wipe) var(--ease-ui), background-color 240ms var(--ease-ui);
}
.flyout-edge.open { transform: translateY(var(--h)); }
/* Switching menus is one movement: the old one slides out the way you're
   going and is gone almost at once, as the new one slides in behind it, a
   moment later, so their words barely overlap and the panel never dims. */
.flyout-panel {
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; visibility: hidden;
  transition: opacity 90ms var(--ease-out), transform 320ms var(--ease-ui), visibility 0s linear 320ms;
}
.flyout-panel.left { transform: translateX(-32px); }
.flyout-panel.right { transform: translateX(32px); }
.flyout-panel.active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 200ms var(--ease-out) 50ms, transform 320ms var(--ease-ui), visibility 0s;
}
/* Opening from closed: the menu is there as the wipe reaches it, without
   sliding or fading; closing: it stays as it was while the wipe covers it. */
.flyout:not(.open) .flyout-panel, .flyout.fresh .flyout-panel { transform: none; }
.flyout.fresh .flyout-panel, .flyout:not(.open) .flyout-panel { transition: visibility 0s linear var(--wipe); }
.flyout.fresh .flyout-panel.active { transition: none; }
.flyout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr); padding-top: 36px; padding-bottom: 44px; }
.fcol, .ffeature { padding: 0 32px; border-left: 1px solid rgba(255, 255, 255, 0.07); }
/* Rules only between columns: the first lines up with the logo. */
.flyout-grid > .fcol:first-child { padding-left: 0; border-left: 0; }
[data-theme="light"] .fcol, [data-theme="light"] .ffeature { border-color: rgba(30, 29, 30, 0.08); }
.fcol-title { color: var(--faint); font-size: 14px; margin-bottom: 22px; }
.fcol ul { display: flex; flex-direction: column; gap: 6px; }
.flink { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; margin: 0 -14px; border-radius: 14px; transition: background-color var(--dur-fast) var(--ease-ui); }
.flink:hover, .flink:focus-visible { background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .flink:hover { background: rgba(30, 29, 30, 0.04); }
.flink b { display: inline-flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 500; }
.flink b .ico { width: 17px; height: 17px; color: var(--accent-ink); }
.flink span { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 30ch; }
/* The last column runs to the wrap's edge, under the bar's Get started. */
.ffeature { display: flex; flex-direction: column; gap: 8px; padding-right: 0; }
/* The card: its picture zooms a little inside its own rounded frame, the
   title takes the accent and the arrow steps forward. Nothing outside the
   card's edges changes. */
.ffeature-link { display: flex; flex-direction: column; gap: 8px; border-radius: 12px; }
.ffeature-art { height: 168px; margin-bottom: 6px; border-radius: 12px; overflow: hidden; background: #141314; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.glyph-art { display: block; width: 100%; height: 100%; }
.ffeature-art .glyph-art { transition: transform 600ms var(--ease); }
.ffeature-link:hover .ffeature-art .glyph-art, .ffeature-link:focus-visible .ffeature-art .glyph-art { transform: scale(1.04); }
.ffeature-link b { transition: color var(--dur-fast) var(--ease-ui); }
.ffeature-link:hover b, .ffeature-link:focus-visible b { color: var(--accent-ink); }
.ffeature span { color: var(--muted); font-size: 14px; line-height: 1.5; }
/* When the panel first opens, its contents settle as the wipe passes them:
   a short rise, a few milliseconds apart across the columns. */
.flyout.fresh .flyout-panel.active .fcol-title,
.flyout.fresh .flyout-panel.active .flink,
.flyout.fresh .flyout-panel.active .ffeature > * {
  animation: menu-item 320ms var(--ease) backwards;
  animation-delay: calc(var(--c, 0) * 30ms + var(--r, 0) * 18ms);
}
@keyframes menu-item { from { transform: translateY(-6px); } }
.flyout-panel li { --r: 0; }
.flyout-panel li:nth-child(2) { --r: 1; }
.flyout-panel li:nth-child(3) { --r: 2; }
.flyout-panel li:nth-child(4) { --r: 3; }
.ffeature { --c: 2; }

/* Dims the page under an open menu. No blur: a full-screen backdrop filter
   is slow to fade and flashes black in Chrome while it does. */
.curtain {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 11, 12, 0.42);
  opacity: 0; pointer-events: none;
  transition: opacity 360ms var(--ease-ui);
}
.curtain.show { opacity: 1; pointer-events: auto; transition-duration: 300ms; }
[data-theme="light"] .curtain { background: rgba(30, 29, 30, 0.12); }

/* A plus that turns into a minus (questions, the phone sheet). */
.plus { position: relative; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); transition: background-color var(--dur-fast) var(--ease-ui), border-color var(--dur-fast) var(--ease-ui); }
.plus::before, .plus::after { content: ""; grid-area: 1 / 1; width: 12px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform 380ms var(--ease-ui); }
.plus::after { transform: rotate(90deg); }
[aria-expanded="true"] .plus, .open > * > .plus { background: var(--card-hover); border-color: transparent; }
[aria-expanded="true"] .plus::after { transform: rotate(0deg); }

/* ---- Phones: the sheet --------------------------------------------------------- */

.msheet {
  position: absolute; top: 100%; left: 0; right: 0;
  height: calc(100dvh - var(--sheet-top, var(--nav-h))); overflow: hidden;
  visibility: hidden; pointer-events: none;
  transition: visibility 0s linear var(--wipe);
}
.msheet.open { visibility: visible; pointer-events: auto; transition: none; }
/* Opaque, like the desktop panel: no backdrop filter to flash on a GPU. */
.msheet-sheet { height: 100%; overflow: hidden; background: #191819; transform: translateY(-100%); transition: transform var(--wipe) var(--ease-ui); }
.msheet-scroll {
  height: 100%; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px var(--gutter) 0;
  transform: translateY(100%); transition: transform var(--wipe) var(--ease-ui);
}
.msheet.open :is(.msheet-sheet, .msheet-scroll) { transform: none; }
[data-theme="light"] .msheet-sheet { background: #FFFFFF; }
/* With the sheet open, the bar's divider rides to the foot of the screen. */
.flyout-edge.sheet { transform: translateY(calc(100dvh - var(--sheet-top, var(--nav-h)))); }
.msheet-body { display: flex; flex-direction: column; }
/* Opening plays the rows' entrance as the wipe uncovers them; closing,
   they stay put while the sheet draws back up over them. */
.mrow { border-bottom: 1px solid var(--border); }
.msheet.open .mrow { animation: item-in 300ms var(--ease) backwards; animation-delay: var(--d); }
@keyframes item-in { from { opacity: 0; transform: translateY(6px); } }
.mrow-head { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 64px; font-size: 20px; font-weight: 500; }
/* A menu row's caret turns over as it opens. */
.mrow-head .caret { display: grid; place-items: center; flex: none; width: 30px; height: 30px; color: var(--muted); transition: transform 380ms var(--ease-ui), color var(--dur-fast) var(--ease-ui); }
.mrow-head .caret .ico { width: 20px; height: 20px; }
.mrow-head[aria-expanded="true"] .caret { transform: rotate(180deg); color: var(--text); }
.macc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-ui); }
.macc.open { grid-template-rows: 1fr; }
.macc-in { overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.macc.open .macc-in { padding-bottom: 14px; }
.mlink { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; }
.mlink b { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.mlink b .ico { width: 17px; height: 17px; color: var(--accent-ink); }
.mlink small { color: var(--muted); font-size: 14px; }
.mlink.overview b { color: var(--accent-ink); }
/* The products at a glance, under the menus. */
.msheet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 20px; border: 0; }
.mcard { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcard-art { display: block; height: 104px; margin-bottom: 8px; border-radius: 12px; overflow: hidden; background: #141314; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.mcard b { font-weight: 600; font-size: 15px; }
.mcard small { color: var(--muted); font-size: 13px; line-height: 1.35; }
/* Its buttons wait at the foot of the screen, where a thumb is, and stay
   there while a menu opens above them. */
.msheet-actions {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding: 20px 0 32px; border: 0;
  background: #191819;
}
[data-theme="light"] .msheet-actions { background: #FFFFFF; }
/* The sheet has its own Get started; the bar's steps aside while it's open. */
.nav.sheet-open .nav-cta { opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease-ui), visibility 0s linear var(--dur-fast); }
.nav-cta { transition: opacity var(--dur-fast) var(--ease-ui); }

@media (max-width: 900px) {
  .nav-center, .flyout, .curtain { display: none; }
  .burger { display: grid; }
}
@media (max-width: 520px) { .nav-login { display: none; } }

/* ---- Theme ---------------------------------------------------------------------- */

/* Changing theme: the new one grows in a circle from where it was asked for
   (the AI page's terminal). Only for that (html.theming, theme.rs): going
   from page to page is the browser's own cross-fade (base.css). */
.theming::view-transition-old(root), .theming::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theming::view-transition-new(root) { animation: theme-in 620ms var(--ease-ui); }
@keyframes theme-in {
  from { clip-path: circle(0 at var(--tx, 50%) var(--ty, 0)); }
  to { clip-path: circle(var(--tr, 150vmax) at var(--tx, 50%) var(--ty, 0)); }
}

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

.footer { border-top: 1px solid var(--border); padding: var(--space-2xl) 0 var(--space-l); }
.footer-top { display: grid; grid-template-columns: 1fr 1.8fr; gap: var(--space-xl); }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-brand p { color: var(--muted); font-size: var(--step--1); }
.social { display: flex; gap: 6px; margin-left: -8px; }
.social-link { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--muted); transition: color var(--dur-fast) var(--ease-ui), background-color var(--dur-fast) var(--ease-ui); }
a.social-link:hover, a.social-link:focus-visible { color: var(--text); background: var(--card-hover); }
.social-link.later { opacity: 0.7; cursor: default; }
.social-mark { display: grid; width: 19px; height: 19px; }
.social-mark svg { width: 19px; height: 19px; fill: currentColor; }
.social-mark title { display: none; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-m); }
.footer-col h2 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--muted); font-size: 14px; transition: color var(--dur-fast) var(--ease-ui); }
.footer-col a:hover { color: var(--text); }
/* The rule spans the content, not the gutters the wrap pads with. */
.footer-bottom {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-m); flex-wrap: wrap;
  margin-top: var(--space-xl); padding-top: var(--space-s);
  background: linear-gradient(var(--border), var(--border)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px;
  color: var(--faint); font-size: 13px;
}
.legal { max-width: 60em; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; row-gap: var(--space-l); }
}

/* ---- Pages on their way, and 404 ------------------------------------------------- */

.soon { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-xs); padding: var(--space-3xl) var(--gutter); min-height: 70svh; }
.soon-title { font-size: var(--step-5); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; }
/* The not-found page: her oracle ball, and under it what happened and
   where to go, centered. */
.lost { display: flex; flex-direction: column; align-items: center; gap: var(--space-xs); padding: var(--space-xl) var(--gutter) var(--space-3xl); min-height: 70svh; text-align: center; }
.lost-ball { width: min(64vw, 300px); aspect-ratio: 1; margin-bottom: var(--space-xs); }
.lost-title { max-width: 15ch; font-size: var(--step-5); line-height: 1.05; letter-spacing: -0.03em; font-weight: 500; text-wrap: balance; }
.lost .lede { max-width: 34ch; }
.soon-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--step--1); }
.soon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-wash); }
/* Where to go instead: home from a dead end, and the two products. */
.elsewhere { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-s) var(--space-m); margin-top: var(--space-m); }
.lost .elsewhere { justify-content: center; }
@media (max-width: 520px) { .lost .elsewhere { flex-direction: column; } }


/* ---- Log in and sign up: the Figma screens --------------------------------------- */

.site:has(.auth) .announce,
.site:has(.auth) .nav,
.site:has(.auth) .footer,
.site:has(.auth) .curtain { display: none; }
.auth {
  --raised: #292729;
  --hairline: rgba(255, 255, 255, 0.08);
  --wash: color-mix(in srgb, var(--klavender) 14%, transparent);
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--bg);
}
[data-theme="light"] .auth { --raised: #F4EFF4; --hairline: rgba(30, 29, 30, 0.1); --wash: color-mix(in srgb, var(--strong-klavender) 12%, transparent); }
/* Where the header's logo sits on every other page, so it doesn't jump. */
.auth-logo { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); top: 17px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.auth-logo .mark { width: 30px; height: 30px; }
.auth-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 96px 16px 32px; }
.auth-page { width: min(100%, 400px); display: flex; flex-direction: column; align-items: center; gap: 24px; }
.auth-page.wide { width: min(100%, 400px); gap: 20px; }
/* Arriving, the first step is simply there; each later step swaps in as
   the Brandkit's page changes do: from 8px below, through a 3px blur, in
   350ms on the smooth curve (start.rs sets .stepped once the step changes).
   With reduced motion, nothing on these screens moves; colours still ease. */
.auth.stepped .auth-page { animation: page-step var(--dur-medium) var(--ease) backwards; }
@keyframes page-step { from { opacity: 0; filter: blur(3px); transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before, .auth *::after { transition-property: color, background-color, border-color, opacity, box-shadow !important; }
}
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth-head h1 { font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.auth-head p { color: var(--muted); font-size: 16px; line-height: 1.35; }
.auth-form { width: 100%; display: flex; flex-direction: column; }

/* The field: raised and quiet when empty; a ring and a floating label when
   you're in it; a tinted chip with your initial once your email is known. */
.afield {
  position: relative; display: block; height: 56px; width: 100%;
  border-radius: 12px; background: var(--raised);
  box-shadow: inset 0 0 0 1.5px transparent;
  cursor: text;
  transition: background-color 150ms cubic-bezier(.3, .3, .3, 1), box-shadow 150ms cubic-bezier(.3, .3, .3, 1);
}
.afield.focus, .afield:focus-within { background: transparent; box-shadow: inset 0 0 0 1.5px var(--focus); }
.afield.bad { box-shadow: inset 0 0 0 1.5px var(--negative); }
.afield-label {
  position: absolute; left: 16px; top: 19px;
  color: var(--muted); font-size: 16px; line-height: 1.2; pointer-events: none;
  transform-origin: left top;
  transition: transform 150ms cubic-bezier(.3, .3, .3, 1), left var(--dur-fast) var(--ease-ui), opacity 150ms;
}
.afield.focus .afield-label, .afield:focus-within .afield-label, .afield.filled .afield-label { transform: translateY(-10px) scale(0.8); }
.afield input {
  position: absolute; inset: 0; width: 100%; padding: 25px 48px 6px 16px;
  background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 16px;
  transition: padding-left var(--dur-fast) var(--ease-ui), color var(--dur-fast);
}
.afield-avatar {
  position: absolute; left: 16px; top: 12px; z-index: 1;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px;
  opacity: 0; transform: scale(0.2);
  transition: opacity 200ms var(--ease-ui), transform var(--dur-fast) var(--ease-bounce);
}
.afield-spin { position: absolute; right: 16px; top: 20px; opacity: 0; transform: scale(0.6); transition: opacity 200ms, transform 200ms; }
.afield.checking .afield-spin { opacity: 1; transform: none; transition-delay: 150ms; }
.afield-clear {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: var(--muted); opacity: 0; pointer-events: none;
  transition: opacity 200ms, background-color 150ms;
}
.afield-clear .ico { width: 18px; height: 18px; }
.afield-clear:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.afield.known { background: var(--wash); box-shadow: none; cursor: default; }
/* The address slides over first; the avatar grows in where it was. */
.afield.known .afield-avatar { opacity: 1; transform: none; transition: opacity 200ms var(--ease-ui) 120ms, transform var(--dur-fast) var(--ease-bounce) 120ms; }
/* Recognised: the label is gone before the address slides in under it. */
.afield.known .afield-label { opacity: 0; left: 64px; transition: transform 150ms cubic-bezier(.3, .3, .3, 1), left var(--dur-fast) var(--ease-ui), opacity 70ms var(--ease-out); }
.afield.known input {
  padding: 0 52px 0 64px; font-weight: 500; cursor: default;
  transition: padding-left 300ms var(--ease-ui), padding-top 300ms var(--ease-ui), padding-bottom 300ms var(--ease-ui), color 300ms;
  background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent-ink) 38%, var(--text) 50%, var(--accent-ink) 62%, var(--accent-ink) 100%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer-text 1.6s var(--ease) 200ms both;
}
@keyframes shimmer-text { from { background-position: 100% 0; } to { background-position: 0 0; } }
.afield.known .afield-clear { opacity: 1; pointer-events: auto; }
.afield.name { margin-top: 8px; }

/* Slots open to their content (a hint, the username, the terms) and close. */
.aslot { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--dur-fast) var(--ease-ui), opacity var(--dur-fast) var(--ease-ui); }
.aslot.open { grid-template-rows: 1fr; opacity: 1; }
.aslot > div { overflow: hidden; min-height: 0; }
.aslot.alt { transform-origin: center top; transition: grid-template-rows var(--dur-fast) var(--ease-ui), opacity var(--dur-fast) var(--ease-ui), transform var(--dur-fast) var(--ease-ui); }
.aslot.alt:not(.open) { transform: scale(0.96); }
.ahint { display: flex; align-items: center; gap: 8px; padding: 10px 2px 2px; color: var(--muted); font-size: 12.8px; line-height: 1.2; }
.ahint .ico { width: 16px; height: 16px; flex: none; }
.ahint.ok { color: var(--positive); }
.ahint.bad { color: var(--negative); }
.ahint.center { justify-content: center; padding: 0; min-height: 0; opacity: 0; transform: translateY(6px); transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
.ahint.center.show { opacity: 1; transform: none; }
.auth-legal { padding-top: 20px; color: var(--muted); font-size: 12.8px; line-height: 1.4; text-align: center; }
.auth-legal a { color: var(--text); }

/* The button: its three labels roll in a clipped strip. */
.acta-slot { padding-top: 24px; }
.acta {
  position: relative; display: block; width: 100%; height: 52px; overflow: hidden;
  border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
  font-size: 16px; font-weight: 600;
  transition: transform 300ms var(--ease-ui), background-color var(--dur-fast) var(--ease-ui), color var(--dur-fast) var(--ease-ui);
}
/* Not ready yet: quiet, so it doesn't look pressable. */
.acta.off { background: var(--card-hover); color: var(--muted); box-shadow: inset 0 0 0 1px var(--border); }
.acta:active { transform: scale(0.99); }
.acta-labels { position: absolute; left: 0; right: 0; top: 50%; height: 20px; margin-top: -10px; overflow: hidden; transition: opacity 200ms; }
.acta-labels span { position: absolute; inset: 0; line-height: 20px; transition: transform 240ms var(--ease-ui), opacity 200ms var(--ease-ui); }
.acta .l-login { transform: translateY(-110%); opacity: 0; }
.acta .l-signup { transform: translateY(110%); opacity: 0; }
.acta[data-label="login"] .l-login, .acta[data-label="signup"] .l-signup { transform: none; opacity: 1; }
.acta[data-label="login"] .l-continue { transform: translateY(110%); opacity: 0; }
.acta[data-label="signup"] .l-continue, .acta[data-label="signup"] .l-login { transform: translateY(-110%); opacity: 0; }
.acta.off .acta-labels { opacity: 1; }
.acta .spinner { position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -8px; opacity: 0; color: var(--bg); }
.acta.loading .acta-labels { opacity: 0; }
.acta.loading .spinner { opacity: 1; }

.aalt {
  position: relative; display: block; width: 100%; height: 52px; margin-top: 8px; overflow: hidden;
  border-radius: var(--radius-pill); background: var(--raised);
  font-size: 16px; font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease-ui), transform 300ms var(--ease-ui);
}
.aalt:hover { background: #312F31; }
[data-theme="light"] .aalt:hover { background: #ECE5EC; }
.aalt:active { transform: scale(0.99); }
.aalt-labels { position: absolute; left: 0; right: 0; top: 50%; height: 24px; margin-top: -12px; }
.aalt-labels > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform 240ms var(--ease-ui), opacity 200ms var(--ease-ui); }
.aalt .l-passkey { transform: translateY(-110%); opacity: 0; }
.aalt.passkey .l-wallet { transform: translateY(110%); opacity: 0; }
.aalt.passkey .l-passkey { transform: none; opacity: 1; }
.aalt .l-passkey .ico { width: 18px; height: 18px; }
.logo-stack { display: inline-flex; }
.logo-stack img { width: 20px; height: 20px; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--raised); }
.logo-stack img + img { margin-left: -5px; }

/* The code step. */
.auth-icon {
  position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px;
  border-radius: 50%; background: var(--raised); border: 1px solid var(--hairline);
  box-shadow: 0 1px 1px rgba(30, 29, 30, 0.6);
}
.auth-icon .ico { width: 20px; height: 20px; }
.auth-badge { position: absolute; right: -2px; top: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--negative); box-shadow: 0 0 0 3px var(--bg); animation: badge-in 260ms var(--ease) 600ms backwards; }
@keyframes badge-in { from { opacity: 0; transform: translate(-8px, 12px) scale(0.3); } }
.code { position: relative; display: grid; grid-template-columns: repeat(6, 48px); gap: 8px; cursor: text; }
.code input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; caret-color: transparent; z-index: 1; }
.code-box {
  position: relative; display: grid; place-items: center; height: 56px; border-radius: 12px;
  background: var(--raised); box-shadow: inset 0 0 0 1.5px transparent;
  font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color 80ms, box-shadow 80ms;
}
.code-box b { animation: digit-in 250ms var(--ease) backwards; }
@keyframes digit-in { from { opacity: 0; transform: translateY(8px); } }
.code:focus-within .code-box.current { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--focus); }
.code:focus-within .code-box.current::after { content: ""; width: 1.5px; height: 24px; background: var(--text); animation: blink 1s steps(1) infinite; }
.code-sweep { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; pointer-events: none; opacity: 0; }
.code-sweep::before { content: ""; position: absolute; top: 0; bottom: 0; left: -200px; width: 200px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)); }
.code.verifying .code-sweep { opacity: 1; }
.code.verifying .code-sweep::before { animation: sweep 2s var(--ease) 300ms infinite; }
@keyframes sweep { to { transform: translateX(540px); } }
.code.wrong { animation: code-shake 400ms var(--ease-ui); }
.code.wrong .code-box { box-shadow: inset 0 0 0 1.5px var(--negative); color: var(--negative); }
@keyframes code-shake { 25% { transform: translateX(8px); } 50% { transform: translateX(-6px); } 75% { transform: translateX(4px); } }
.auth-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.btn.outline { height: 44px; padding: 0 24px; background: var(--bg); border: 1px solid var(--hairline); color: var(--text); font-weight: 500; }
.btn.outline:hover { border-color: var(--border-strong); }
.btn.text.quiet { color: var(--faint); font-size: 14px; }
.resend { margin: 0; color: var(--faint); font-size: 14px; line-height: 36px; }
.resend button { padding: 0; border: 0; background: none; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.resend button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.resend button:disabled { color: var(--faint); font-weight: 400; cursor: default; }

/* Wallets. */
.wallet-group { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.wallet-group-title { display: flex; gap: 6px; padding: 0 4px; color: var(--muted); font-size: 12.8px; font-weight: 500; }
.wallet-group-title span { font-weight: 400; }
.wallet-list { display: flex; flex-direction: column; padding: 4px; border-radius: 16px; background: var(--raised); }
.wallet-list .wallet-row { display: flex; align-items: center; gap: 12px; height: 60px; padding: 12px 14px 12px 12px; border-radius: 12px; text-align: left; width: 100%; }
.wallet-list .wallet-row:hover { background: rgba(255, 255, 255, 0.06); }
.wallet-logo { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.wallet-name { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; line-height: 1.2; }
.wallet-name b { font-weight: 500; font-size: 16px; }
.wallet-name small { color: var(--muted); font-size: 12.8px; }
.wallet-tag { padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 12.8px; font-weight: 500; }
.wallet-tag.here { background: var(--positive-wash); color: var(--positive); }
.wallet-chev { width: 18px; height: 18px; color: var(--muted); flex: none; transition: transform var(--dur-fast) var(--ease-ui); }
.wallet-row:hover .wallet-chev { transform: translateX(2px); }
.wallet-wait { position: relative; display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 10px; }
.wallet-wait img { border-radius: 14px; }
.wallet-wait .spinner { position: absolute; inset: 0; width: 80px; height: 80px; border-width: 2px; color: var(--accent); }
.auth-check { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 10px; border-radius: 50%; background: var(--positive-wash); color: var(--positive); animation: pop 520ms var(--ease-bounce); }
.auth-check .ico { width: 30px; height: 30px; }

.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 16px 32px; }
.auth-help { display: grid; place-items: center; height: 40px; padding: 0 22px; border-radius: var(--radius-pill); background: var(--raised); font-size: 12.8px; font-weight: 500; transition: background-color var(--dur-fast) var(--ease-ui); }
.auth-help:hover { background: #312F31; }
.auth-foot nav { display: flex; gap: 16px; color: var(--muted); font-size: 12.8px; }
.auth-foot nav a:hover { color: var(--text); }
@media (max-width: 560px) {
  .auth-logo { left: 16px; top: 16px; }
  .auth-main { padding-top: 80px; }
  .code { grid-template-columns: repeat(6, minmax(0, 48px)); gap: 6px; }
}

/* Approving a terminal's sign-in (/start/device, start.rs `Device`): the
   code as the terminal shows it, who you're signed in as, Cancel and
   Approve. */
/* The same round mark as the code step's (.auth-icon). */
.device-art { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 50%; background: var(--raised); border: 1px solid var(--hairline); color: var(--text); }
.device-art .ico { width: 20px; height: 20px; }
.device-code {
  margin: 8px 0 0; padding: 18px 12px; border-radius: var(--radius-box); background: var(--card); border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: 0.14em; text-align: center; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.device-who { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 100%; min-width: 0; margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.device-who .avatar { width: 20px; height: 20px; font-size: 10px; }
/* The computer and the account: one line each, shortened rather than wrapped. */
.device-chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; height: 34px; padding: 0 12px 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--card); color: var(--text); }
.device-chip > span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The page column may be narrower than a long name: the name shortens instead. */
.auth-main, .auth-page { min-width: 0; }
.device-chip > .ico { flex: none; width: 18px; height: 18px; margin-left: 2px; color: var(--accent-ink); }
.device-chip .avatar { flex: none; }
.device-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 24px; }
.device-actions .btn { height: 52px; }
.device-actions .acta .l-continue { transform: none; opacity: 1; }
.device-note { margin: 16px 0 0; color: var(--faint); font-size: 13px; line-height: 1.5; text-align: center; }
a.acta.link { display: grid; place-items: center; margin-top: 24px; text-decoration: none; }
.device-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.device-input {
  width: 100%; height: 72px; padding: 0 12px; border-radius: var(--radius-box); border: 1px solid var(--border); background: var(--card); color: var(--text);
  font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: 0.14em; text-align: center; text-transform: uppercase;
  transition: border-color var(--dur-quick) var(--ease-ui), box-shadow var(--dur-quick) var(--ease-ui);
}
.device-input::placeholder { color: var(--faint); opacity: 0.6; }
.device-input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-wash); }
.auth-head code { font-family: var(--font-mono); font-size: 0.92em; color: var(--text); }
