.auth-actions { display: flex; gap: 8px; align-items: center; }
.auth-actions .nav-login { border: 1px solid var(--line); color: var(--ink); }
.account-shell {
  min-height: calc(100vh - 64px); display: grid; grid-template-columns: 1.1fr .9fr;
  gap: 70px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 70px 28px;
}
.account-copy h1 { font-size: clamp(46px, 7vw, 78px); margin-bottom: 24px; }
/* screen() focuses this heading on every swap. :focus-visible, not :focus, so
   the ring appears for someone driving with the keyboard and not for a mouse
   click that happens to land on the heading. */
.account-copy h1:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: 4px; }
.account-copy > p { font-size: 19px; color: var(--ink-soft); max-width: 610px; }
.account-points { display: grid; gap: 12px; margin-top: 34px; color: var(--ink-soft); }
.account-points span::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 12px; }
.account-card { box-shadow: var(--shadow-lg); padding: 34px; display: grid; gap: 20px; }
.account-card h2 { font-size: 27px; }
.account-card label { display: grid; gap: 7px; }
.path-picker { display: grid; gap: 12px; }
.path-picker button {
  display: grid; gap: 3px; padding: 18px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer;
}
.path-picker button:hover, .path-picker button:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.path-picker b { font-size: 17px; }
.path-picker span, .credential-note, .enrollment-note { color: var(--ink-faint); font-size: 13px; }
.enrollment-note { color: #b42318; }
.auth-switch { color: var(--ink-faint); font-size: 13.5px; text-align: center; }
.auth-switch button, .back-link {
  border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer;
}
.back-link { justify-self: start; color: var(--ink-soft); }
.account-card > .btn { text-align: center; }

.signup-next { color: var(--ink-faint); font-size: 13px; }

/* Tutor builder */
.onboard-card { gap: 16px; }
.onboard-progress { display: flex; gap: 6px; }
.onboard-progress i { flex: 1; height: 4px; border-radius: 999px; background: var(--line); transition: background .3s; }
.onboard-progress i.on { background: var(--accent); }
.onboard-hint { color: var(--ink-faint); font-size: 13.5px; margin-top: -10px; }
.onboard-subhead { display: block; margin-top: 6px; }
.account-card .onboard-write { gap: 7px; }
.onboard-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.onboard-nav .btn { flex: 1; text-align: center; }
.onboard-skip { border: 0; background: none; font: inherit; cursor: pointer; }

[data-account-key] { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 13px; }

.choice-grid { display: grid; gap: 10px; }
.choice-grid.row { grid-template-columns: repeat(3, 1fr); }
.choice-grid.pair { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice-grid.pair .choice-card { padding: 12px 32px 12px 14px; }
.choice-grid.pair .choice-card::after { top: 10px; right: 12px; }
/* An odd-length list would leave a hole in the last row; widen the orphan. */
.choice-grid.pair .choice-card:last-child:nth-child(odd) { grid-column: span 2; }
.account-card .choice-card {
  position: relative; gap: 3px; padding: 14px 40px 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.choice-grid.row .choice-card { padding: 12px 26px 12px 13px; }
.choice-grid.row .choice-card::after { top: 9px; right: 10px; font-size: 13px; }
.choice-card input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice-card b { font-size: 15px; }
.choice-card span { color: var(--ink-faint); font-size: 12.5px; line-height: 1.4; }
.choice-card:hover { border-color: var(--accent); }
.choice-card:has(:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-card:has(:checked)::after {
  content: "✓"; position: absolute; top: 12px; right: 15px; color: var(--accent); font-weight: 800;
}
.choice-card:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The card fill is the only "selected" cue, so without :has() the input has to
   show its own state instead of staying invisible under the label. */
@supports not selector(:has(*)) {
  /* Scoped to .account-card so it outweighs the base padding shorthand, and
     inset is reset before top/left rather than after, or it cancels them. */
  .account-card .choice-card { padding-left: 44px; }
  .choice-card input { inset: auto; top: 15px; left: 16px; width: 16px; height: 16px; opacity: 1; }
  .choice-grid.pair .choice-card, .choice-grid.row .choice-card { padding-left: 38px; }
}

/* Generation animation */
.build-card { gap: 16px; }
.build-orb { position: relative; width: 96px; height: 96px; justify-self: center; margin: 8px 0; }
.build-orb i {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  border-right-color: transparent; border-bottom-color: transparent;
  animation: orb-spin 1.6s linear infinite;
}
.build-orb i:nth-child(2) {
  inset: 15px; border-color: var(--accent-bright);
  border-left-color: transparent; border-top-color: transparent;
  animation-duration: 2.6s; animation-direction: reverse;
}
.build-orb i:nth-child(3) {
  inset: 32px; border-color: var(--ink);
  border-right-color: transparent; border-top-color: transparent;
  animation-duration: 1.1s;
}
@keyframes orb-spin { to { transform: rotate(360deg); } }
.build-status { text-align: center; min-height: 24px; color: var(--ink-soft); font-weight: 600; font-size: 14px; }
/* Items are appended one at a time by auth.js, so each animates on arrival and
   the card grows with them. The ready screen keeps the finished list still. */
.build-traits { list-style: none; display: grid; gap: 8px; }
.build-traits li {
  padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-warm); font-size: 14px;
  animation: trait-in .45s ease-out;
}
.build-traits.settled li { animation: none; }
@keyframes trait-in {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .build-orb i, .choice-card, .build-traits li { animation: none; transition: none; }
}
@media (max-width: 860px) {
  .account-shell { grid-template-columns: 1fr; gap: 40px; }
  /* Stacked, the copy column would push the form a full screen down on every
     step. The card is the task on each of these screens; the copy is context.
     This is visual order only — DOM and focus order stay copy-then-card, so a
     sighted keyboard user on a phone tabs to the card after the heading that
     sits below it. Accepted: not scrolling a screen of copy on all four steps
     is worth more than that, and screen readers follow DOM order either way. */
  .account-shell > .card { order: -1; }
}
@media (max-width: 560px) {
  .account-shell { padding: 28px 16px; }
  .account-card { padding: 24px 20px; }
  .account-copy h1 { font-size: 34px; }
  .choice-grid.row, .choice-grid.pair { grid-template-columns: 1fr; }
  /* One column has no orphan to widen, and spanning 2 would invent a column. */
  .choice-grid.pair .choice-card:last-child:nth-child(odd) { grid-column: auto; }
}
