/* Account and sign-in surfaces share the Lab's compact, compound panel grammar. */

.account-surface .wrap { max-width: 1180px; }
/* .wrap is a class and main is an element, so .wrap's padding wins and leaves
   main none below: the last panel sat against the bottom of the page. */
.account-surface main { padding-top: var(--space-7); padding-bottom: var(--space-8); }

/* --- the shell: a rail and a column ----------------------------- */
/* The rail is accountNav() in src/lib/render.js, and every other child
   of the shell is the page. The grid places them, so no page wraps its
   own content: the rail takes the first column for the page's whole
   height and whatever else a page emits lands in the second. The rail
   spans more rows than any page has; the spare ones are empty and take
   no height.

   The staff tools carried a .subnav of their own until 2026-10-13, a row
   of tabs; they sit in the team console now, under its bar (/staff.css). */
.account-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  column-gap: var(--space-8);
  align-items: start;
  margin: 0;
  padding: 0;
  border: 0;
}
.account-shell > * { grid-column: 2; min-width: 0; }
.account-shell > .subnav {
  grid-column: 1;
  grid-row: 1 / span 8;
  position: sticky;
  top: var(--space-6);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: var(--space-1);
  margin: 0;
  font-size: var(--text-base);
}
.rail-label {
  margin: 0;
  padding: 0 var(--space-4) var(--space-3);
  color: var(--muted);
  font-size: var(--text-sm);
}
.account-shell > .subnav a + .rail-label { margin-top: var(--space-6); }
.account-shell > .subnav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-control);
  color: var(--sec);
}
.account-shell > .subnav svg { flex: none; }
.account-shell > .subnav a:hover { background: var(--raised); color: var(--text); }
.account-shell > .subnav a[aria-current] { background: var(--active); color: var(--text); }
/* The mark beside the open entry is the text colour and never the accent:
   it says where the reader is, and says nothing about how anything is. */
.account-shell > .subnav a[aria-current]::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: var(--text);
}

/* The team console's door (accountNav in src/lib/render.js): a card under
   the rail's entries, drawn only for the people the console opens for. A
   card and not a fifth entry because it is not a place in the account: it
   is the way out of it, into somewhere else, and should look like one. */
.account-shell > .subnav a.rail-console {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  min-height: 0;
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--chrome);
  border-radius: var(--radius-control);
  background: var(--raised);
  color: var(--text);
}
.account-shell > .subnav a.rail-console:hover {
  border-color: var(--muted);
  background: var(--raised);
}
.rail-console-name {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--sec);
}
.rail-console-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-control);
  background: var(--active);
  color: var(--text);
  font-weight: 500;
}
.rail-console:hover .rail-console-open {
  background: color-mix(in srgb, var(--accent) 16%, var(--raised));
}

.account-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
  color: var(--muted);
  font-size: var(--text-base);
}
.account-crumb a { color: var(--muted); text-decoration: none; }
.account-crumb a:hover { color: var(--text); }
.account-crumb [aria-current] { color: var(--text); }

/* The rail is on every account page, so it holds still while the page
   beside it settles: a rail that slid in on each click would read as the
   whole area reloading. */
.account-shell > :not(.subnav),
.auth-layout { animation: account-settle var(--dur-260) var(--ease) both; }

@keyframes account-settle {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .account-shell > :not(.subnav),
  .auth-layout { animation: none; }
}

.account-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-8);
  padding: 0;
}
.account-hero h1 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.account-hero .lead { margin: 0; color: var(--sec); }

.account-kicker {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-xs);
}

.account-reference {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: var(--space-7);
  margin: 0;
}
.account-reference div { min-width: 140px; }
.account-reference dt { color: var(--muted); font-size: var(--text-sm); }
.account-reference dd { margin: var(--space-2) 0 0; color: var(--text); }

.account-state {
  margin-top: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border-left: 1px solid var(--field);
  background: var(--panel);
}
.account-state p { margin-bottom: var(--space-2); }
.account-state p:last-child { margin-bottom: 0; }

.account-ledger {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.account-ledger section,
.account-ledger section + section {
  margin: 0;
  padding: 0;
  border: 1px solid var(--chrome);
  border-radius: var(--radius-panel);
  background: var(--panel);
  overflow: hidden;
}
.account-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-6);
  border-bottom: 1px solid var(--line);
  background: var(--head);
}
.account-panel-head h2 { margin: 0; font-size: var(--text-xl); }

.account-panel-full { grid-column: 1 / -1; }
.account-panel-wide { grid-column: span 8; }
.account-panel-narrow { grid-column: span 4; }
.account-panel-half { grid-column: span 6; }
.account-panel-body { padding: var(--space-6); }
.account-panel-body > :first-child { margin-top: 0; }
.account-panel-body > :last-child { margin-bottom: 0; }
.account-panel-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--line);
}
.account-panel-actions form,
.account-panel-actions p { margin: 0; }
.account-panel-copy { color: var(--sec); }
.account-panel-copy p:last-child { margin-bottom: 0; }

.account-table { width: 100%; margin: 0; border-collapse: collapse; }
.account-table th,
.account-table td {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.account-table tr:last-child th,
.account-table tr:last-child td { border-bottom: 0; }
.account-table th { width: 30%; color: var(--muted); font-weight: var(--weight-regular); }

.account-list { margin: 0; }
.account-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.5fr) auto;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}
.account-list-row:last-child { border-bottom: 0; }
.account-list-row h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); }
.account-list-row p { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.account-list-row dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); margin: 0; }
.account-list-row dt { color: var(--muted); font-size: var(--text-xs); }
.account-list-row dd { margin: var(--space-2) 0 0; }
.account-list-row form { margin: 0; }

/* --- the profile card -------------------------------------------- */
/* Who the account is, in one row: a letter, the name it goes by, the
   address behind it and when it was made. The letter is not a state and
   takes no colour: it is the first letter of the name beside it.

   Edit profile swaps the middle of the row for the form that changes the
   name, so the card that shows a username is the card that edits it. */
.account-ledger .profile-card {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6);
}
.profile-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--chrome);
  border-radius: var(--radius-pill);
  background: var(--raised);
  color: var(--text);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  line-height: 1;
}
/* The account's picture in the letter's place: same ring, cropped to it. */
img.profile-mark { display: block; object-fit: cover; }
.profile-id { flex: 1 1 auto; min-width: 0; }
.profile-id h2 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.profile-id p { margin: var(--space-2) 0 0; color: var(--sec); overflow-wrap: anywhere; }
.profile-id .profile-since { color: var(--muted); font-size: var(--text-sm); }
.profile-card > .btn { flex: none; gap: var(--space-3); white-space: nowrap; }
/* Editing: the name's form and the picture's, one above the other, with
   the mark level with the first of them rather than centred on both. */
.account-ledger .profile-card-edit { align-items: flex-start; }
.profile-forms { flex: 1 1 auto; min-width: 0; display: grid; gap: var(--space-6); }
.profile-form { flex: 1 1 auto; min-width: 0; }
/* The browser's own file control, dressed as the site's field and button. */
/* Held to the 44px of the field above it and the buttons beside it:
   left to itself the control is as tall as its inner button makes it. */
/* Two classes, so this outranks .account-input further down, which sets
   the padding and the font of every field. */
.account-input.account-file { padding: 5px 12px 5px 5px; line-height: 1; color: var(--sec); cursor: pointer; }
.account-file::file-selector-button {
  margin-right: var(--space-4);
  padding: 7px 12px;
  line-height: 1.2;
  border: 1px solid var(--field);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--text);
  font: inherit; font-size: var(--text-sm);
  cursor: pointer;
}
.account-file:hover::file-selector-button { border-color: var(--hover); }
.profile-form .field-label { display: block; margin-bottom: var(--space-3); }
.profile-form .field-note { margin-top: var(--space-3); }

/* --- the plans --------------------------------------------------- */
/* Two plans beside each other, each a name, a price and what it holds.
   The price is the one figure on the card, so it is the one large thing.
   Whatever a card ends with sits on its floor, so two cards of different
   heights still line their last lines up. */
.account-ledger .plan-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
}
.plan-card h2 { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-medium); }
.plan-card-price { margin: var(--space-4) 0 0; color: var(--sec); }
.plan-card-price .mono {
  margin-right: var(--space-2);
  color: var(--text);
  font-size: var(--text-verdict);
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
}
.plan-card-facts { margin: var(--space-5) 0 0; border-top: 1px solid var(--line); }
.plan-card-facts div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--line);
}
.plan-card-facts dt { color: var(--muted); }
.plan-card-facts dd { margin: 0; color: var(--text); }
.plan-card-action { margin: auto 0 0; padding-top: var(--space-6); color: var(--sec); }
.plan-card-action .btn { width: 100%; justify-content: center; }
.plan-row-price { white-space: nowrap; }
.plans-note { margin: var(--space-6) 0 0; color: var(--muted); font-size: var(--text-sm); }

.account-form { padding: var(--space-6); }

.account-control-row { display: flex; align-items: center; gap: var(--space-3); }
.account-control-row .account-input { flex: 1 1 auto; }
.account-control-row .btn { flex: none; white-space: nowrap; }
.account-control-row + .field-note { margin-top: var(--space-3); }
/* A form that has taken a row's place says what it is, and ends with its two ways out. */
.account-form + .panel-note { border-top: 1px solid var(--line); }
.account-form-title { margin: 0 0 var(--space-5); font-size: var(--text-lg); font-weight: var(--weight-medium); }
.account-form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.account-form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.account-form-columns + .field-note { margin-top: var(--space-3); }

.account-input {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field);
  border-radius: var(--radius-control);
  background: var(--raised);
  color: var(--text);
  font: inherit;
}
.account-input:hover { border-color: var(--hover); }
.account-input:focus { border-color: var(--focus); }
.account-form > .account-input { margin-bottom: var(--space-4); }
.field-note { margin: 0; color: var(--muted); font-size: var(--text-sm); }

.connection-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line);
}
.connection-row strong { display: block; font-weight: var(--weight-medium); }
.connection-row p { margin: var(--space-2) 0 0; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.connection-row > span { color: var(--sec); font-size: var(--text-sm); }
/* A row's words keep a readable width. On a phone, "Sign out everywhere" beside its sentence left
   the sentence a column four words wide; now a control that would squeeze them takes its own line. */
.connection-row { flex-wrap: wrap; }
.connection-row > div { flex: 1 1 160px; min-width: 0; }
/* A row that ends its card needs no rule under it: the card's own edge is there. */
.connection-row:last-child { border-bottom: 0; }
.connection-row > .btn { flex: none; white-space: nowrap; }
.connection-row form { flex: none; margin: 0; }
.panel-note { margin: 0; padding: var(--space-5) var(--space-6); color: var(--muted); font-size: var(--text-sm); }
/* A note of two paragraphs is one note: the space is around it, not between its sentences. */
.panel-note p { margin: 0; }
.panel-note p + p { margin-top: var(--space-3); }

.auth-surface main { min-height: calc(100vh - 360px); }
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: clamp(var(--space-6), 4vw, var(--space-8));
  min-height: 650px;
  margin: var(--space-8) 0;
}
.auth-intro {
  display: grid;
  align-content: center;
  min-width: 0;
  padding-left: 0;
}
.auth-intro h1 { max-width: 12ch; margin: 0 auto; font-size: var(--text-verdict); text-align: center; }
.auth-intro-copy { max-width: 34ch; margin: var(--space-4) auto var(--space-6); color: var(--sec); font-size: var(--text-md); text-align: center; }
.auth-product-preview {
  position: relative;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--chrome);
  border-radius: var(--radius-panel);
  background: var(--surface-panel);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  isolation: isolate;
  animation: auth-preview-arrive var(--dur-460) var(--ease) 80ms both;
}
.auth-preview-topbar,
.auth-preview-code header,
.auth-preview-study-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-preview-topbar { min-height: 44px; padding: 0 var(--space-4); border-bottom: 1px solid var(--line); background: var(--block); }
.auth-preview-brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); font-size: var(--text-xs); }
.auth-preview-brand svg { width: 14px; height: 14px; }
.auth-preview-brand strong { letter-spacing: var(--track-wordmark); }
.auth-preview-brand > span { color: var(--muted); }
.auth-preview-stages {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0 var(--space-2);
  border-bottom: 1px solid var(--line);
  background: var(--rail);
  list-style: none;
}
.auth-preview-stages::before,
.auth-preview-stages::after {
  content: "";
  position: absolute;
  right: var(--space-2);
  bottom: 0;
  left: var(--space-2);
  height: 1px;
  transform-origin: left;
}
.auth-preview-stages::before { background: var(--chrome); }
.auth-preview-stages::after {
  background: var(--accent);
  transform: scaleX(0);
  animation: auth-preview-progress 800ms var(--ease) 180ms both;
}
.auth-preview-stages li {
  position: relative;
  min-width: 0;
  padding: var(--space-4) var(--space-2) var(--space-5);
}
.auth-preview-stages span { display: block; margin-bottom: var(--space-2); color: var(--faint); font: var(--text-xs)/1 var(--mono); }
.auth-preview-stages strong { display: block; overflow: hidden; color: var(--sec); font-size: var(--text-xs); font-weight: var(--weight-regular); text-overflow: ellipsis; }
.auth-preview-stages li[aria-current="step"] span,
.auth-preview-stages li[aria-current="step"] strong { color: var(--text); }
.auth-preview-workbench { display: grid; grid-template-columns: 1fr; }
.auth-preview-workbench > section + section { margin-top: 0; padding-top: 0; border-top: 0; }
.auth-preview-result { min-width: 0; }
.auth-preview-study-head { min-height: 48px; padding: 0 var(--space-4); }
.auth-preview-study-head > span:first-child { display: inline-flex; align-items: baseline; gap: var(--space-3); min-width: 0; }
.auth-preview-study-head strong { color: var(--text); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.auth-preview-study-head small,
.auth-preview-study-head > span:last-child { color: var(--muted); font-size: var(--text-xs); }
.auth-preview-chart-frame { position: relative; padding: 0 var(--space-4) var(--space-4); }
.auth-preview-chart-meta { display: flex; justify-content: space-between; margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-xs); }
.auth-preview-chart {
  display: block;
  width: 100%;
  height: 164px;
  color: var(--accent);
  overflow: visible;
}
.auth-preview-chart-grid,
.auth-preview-chart-area,
.auth-preview-chart-base,
.auth-preview-chart-main,
.auth-preview-chart-scan { fill: none; vector-effect: non-scaling-stroke; }
.auth-preview-chart-grid { stroke: var(--line); stroke-width: 1; }
.auth-preview-chart-area {
  fill: currentColor;
  opacity: 0;
  animation: auth-preview-area-in 520ms var(--ease) 960ms both;
}
.auth-preview-chart-base { stroke: var(--faint-mark); stroke-width: 1.25; }
.auth-preview-chart-main {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: square;
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  animation: auth-preview-chart-draw 1050ms var(--ease) 520ms both;
}
.auth-preview-chart-scan {
  stroke: color-mix(in srgb, var(--text) 38%, transparent);
  stroke-width: 1;
  opacity: 0;
  transform: translateX(0);
  animation: auth-preview-scan 1200ms var(--ease) 540ms both;
}
.auth-preview-legend { display: flex; gap: var(--space-4); padding-top: var(--space-3); color: var(--muted); font-size: var(--text-xs); }
.auth-preview-legend span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  margin-right: var(--space-2);
  vertical-align: middle;
  background: var(--faint-mark);
}
.auth-preview-legend .auth-preview-legend-main { color: var(--sec); }
.auth-preview-legend .auth-preview-legend-main::before { height: 2px; background: var(--accent); }
.auth-preview-code { min-width: 0; border-top: 1px solid var(--line); background: var(--rail); }
.auth-preview-code header,
.auth-preview-result header { min-height: 36px; color: var(--muted); font-size: var(--text-xs); }
.auth-preview-code header { min-height: 34px; padding: 0 var(--space-4); color: var(--muted); font-size: var(--text-xs); }
.auth-preview-code header > span:first-child { color: var(--text); font-family: var(--mono); }
.auth-preview-code-lines { display: grid; padding: 0 0 var(--space-3); overflow: hidden; }
.auth-preview-code-lines > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 22px;
  align-items: center;
  opacity: 0;
  transform: translateX(-4px);
  animation: auth-preview-code-line var(--dur-260) var(--ease) 1120ms both;
}
.auth-preview-code-lines > span:nth-child(2) { animation-delay: 1220ms; }
.auth-preview-code-lines > span:nth-child(3) { animation-delay: 1320ms; }
.auth-preview-code-lines b { color: var(--muted); font: var(--text-xs)/1 var(--mono); text-align: center; }
.auth-preview-code-lines code { display: block; min-width: 0; overflow: hidden; color: var(--sec); font-size: var(--text-xs); text-overflow: clip; white-space: nowrap; }
.auth-preview-code-lines i { color: var(--accent); font-style: normal; }
.auth-preview-code-lines q { color: var(--cool); quotes: none; }
@keyframes auth-preview-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-preview-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes auth-preview-resolve {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auth-preview-chart-draw {
  from { stroke-dashoffset: 760; }
  to { stroke-dashoffset: 0; }
}

@keyframes auth-preview-area-in {
  from { opacity: 0; }
  to { opacity: .07; }
}

@keyframes auth-preview-scan {
  0% { opacity: 0; transform: translateX(0); }
  12% { opacity: 1; }
  88% { opacity: .55; }
  100% { opacity: 0; transform: translateX(520px); }
}

@keyframes auth-preview-code-line {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

.auth-panel {
  min-width: 0;
  border: 1px solid var(--chrome);
  border-radius: var(--radius-panel);
  background: var(--panel);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: auth-panel-arrive var(--dur-260) var(--ease) both;
}

@keyframes auth-panel-arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-form-head { padding: var(--space-7) var(--space-7) var(--space-6); text-align: center; }
.auth-form-head h2 { margin: 0 0 var(--space-3); font-size: var(--text-2xl); }
.auth-form-head > p:last-child { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.auth-panel .account-form { padding: 0 var(--space-7) var(--space-5); }
.auth-panel .account-form .btn { width: 100%; justify-content: center; margin-top: var(--space-2); }
.auth-provider-wrap { padding: 0 var(--space-7) var(--space-5); }
.auth-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.auth-provider { display: flex; width: 100%; justify-content: center; white-space: nowrap; }
.auth-provider-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text); }
.auth-provider-icon path { animation: auth-provider-resolve var(--dur-460) var(--ease) both; }
.auth-provider:nth-child(2) .auth-provider-icon path { animation-delay: var(--dur-120); }
@keyframes auth-provider-resolve {
  from { opacity: 0; }
  to { opacity: 1; }
}
.auth-divider { display: flex; align-items: center; gap: var(--space-4); margin: 0 var(--space-7) var(--space-5); color: var(--muted); font-size: var(--text-xs); }
.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.auth-help { margin: 0 var(--space-7) var(--space-7); color: var(--muted); font-size: var(--text-sm); }
.auth-panel .account-state { margin: 0; border-left: 0; border-bottom: 1px solid var(--line); }
.auth-provider-state { padding: var(--space-4) 0 0; }
.auth-provider-state p { margin-bottom: var(--space-2); font-size: var(--text-sm); }
.auth-username-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-sm);
}
.auth-username-summary strong { color: var(--text); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
.auth-step-back { display: block; width: fit-content; margin: var(--space-4) auto 0; color: var(--sec); font-size: var(--text-sm); }
.auth-step-back:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .auth-product-preview,
  .auth-panel,
  .auth-provider-icon path,
  .auth-preview-stages::after,
  .auth-preview-chart-area,
  .auth-preview-chart-scan,
  .auth-preview-code-lines > span,
  .auth-preview-chart-main { animation: none; }
  .auth-preview-code-lines > span { opacity: 1; }
  .auth-preview-chart-main { stroke-dashoffset: 0; }
  .auth-preview-chart-area { opacity: .07; }
  .auth-preview-chart-scan { display: none; }
  .auth-preview-stages::after { transform: scaleX(1); }
}

@media (min-width: 801px) and (max-width: 980px) {
  .auth-preview-stages li { padding-inline: var(--space-2); }
}

@media (max-width: 900px) {
  /* The rail becomes a row above the page. Its group labels go, since a
     row of five words needs no headings, and the entries keep their marks. */
  .account-shell { display: block; }
  .account-shell > .subnav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
  }
  .rail-label { display: none; }
  /* The console's door sits in the row with the entries: its name and
     its button side by side, in one outline. */
  .account-shell > .subnav a.rail-console {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  }
  .rail-console-open { min-height: 28px; gap: var(--space-2); }
  .account-panel-wide,
  .account-panel-narrow,
  .account-panel-half { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .auth-layout { grid-template-columns: 1fr; gap: var(--space-7); min-height: 0; }
  .auth-intro { padding-left: 0; }
  .auth-panel { width: 100%; max-width: 560px; }
}

@media (max-width: 640px) {
  .account-surface main { padding-top: var(--space-6); }
  .account-hero { align-items: start; flex-direction: column; gap: var(--space-6); }
  .account-reference { width: 100%; grid-template-columns: 1fr; gap: var(--space-4); }
  .account-form-columns,
  .account-list-row { grid-template-columns: 1fr; }
  .account-ledger .profile-card { flex-wrap: wrap; align-items: start; }
  .profile-card > .btn { flex-basis: 100%; justify-content: center; }
  .profile-form { flex-basis: 100%; }
  .account-list-row dl { grid-template-columns: 1fr; }
  .account-control-row { align-items: stretch; flex-direction: column; }
  .account-control-row .btn { justify-content: center; }
  .auth-layout { margin-top: var(--space-7); }
  .auth-form-head { padding: var(--space-7) var(--space-5) var(--space-5); }
  .auth-provider-wrap { padding: 0 var(--space-5) var(--space-5); }
  .auth-divider { margin: 0 var(--space-5) var(--space-5); }
  .auth-panel .account-form { padding: 0 var(--space-5) var(--space-5); }
  .auth-help { margin: 0 var(--space-5) var(--space-7); }
  .auth-intro-copy,
  .auth-product-preview { display: none; }
  .auth-intro h1,
  .account-hero h1 { font-size: var(--text-2xl); }
}
