/* Builder landing — styled entirely from @onendone/tokens. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
}

h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw + 1rem, 4rem);
  line-height: 1.1;
  margin: 0 0 var(--space-lg);
}

.site-header {
  padding: var(--space-lg) var(--space-xl);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-mark {
  height: 1.75rem;
  width: auto;
  flex-shrink: 0;
}

.wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl);
}

.lede {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 var(--space-xl);
  color: var(--ink);
}

.cta {
  display: inline-block;
  background: var(--action);
  color: var(--on-action);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-card);
  transition:
    transform var(--motion-base) var(--ease-signature),
    box-shadow var(--motion-base) var(--ease-signature);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.back {
  color: var(--action-strong);
  font-weight: 700;
}

.site-footer {
  background: var(--panel);
  color: var(--ink);
  border-top: 1px solid var(--line);
  /* Left padding clears the fixed theme toggle in the bottom-left corner. */
  padding: var(--space-md) var(--space-xl) var(--space-md) 4.5rem;
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* ── Funnel: start form ─────────────────────────────────────────────── */
.hero.narrow {
  max-width: 36rem;
}

.start-form {
  display: grid;
  gap: var(--space-xs);
  width: 100%;
}

.start-form label {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  font-weight: 700;
}

.optional {
  font-weight: 400;
  opacity: 0.7;
  font-size: 0.875rem;
}

/* Signup consent: quiet checkbox row, not a form field. */
.start-form label.consent-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.85rem;
  opacity: 0.85;
  line-height: 1.45;
  cursor: pointer;
}
.start-form .consent-row input[type='checkbox'] {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  flex: none;
  accent-color: var(--action-strong);
}

.start-form input,
.start-form textarea,
.start-form select {
  font: inherit;
  padding: var(--space-sm);
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}

.start-form input:focus-visible,
.start-form textarea:focus-visible,
.start-form select:focus-visible {
  outline: 3px solid var(--action-strong);
  outline-offset: 2px;
}

.start-form .cta {
  margin-top: var(--space-lg);
  border: none;
  cursor: pointer;
  justify-self: start;
}

.hint {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hint a {
  color: var(--action-strong);
}

.error {
  background: var(--danger);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
}

/* ── Funnel: concept grid ───────────────────────────────────────────── */
.concepts {
  flex: 1;
  max-width: 80rem;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl);
}

.concept-grid {
  display: grid;
  /* auto-fill, not auto-fit: keep empty tracks so a card that briefly
     stands alone (siblings still rendering) holds its column width
     instead of stretching across the page. */
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.concept-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.concept-card.is-selected {
  outline: 4px solid var(--action-strong);
}

.concept-card iframe {
  width: 100%;
  height: 24rem;
  border: none;
  background: white;
}

.concept-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  color: var(--ink);
}

.concept-actions .cta {
  font-size: 1rem;
  padding: var(--space-xs) var(--space-md);
  border: none;
  cursor: pointer;
}

.concept-actions .secondary {
  color: var(--ink);
  font-size: 0.9rem;
}

.selected-badge {
  font-weight: 700;
  color: var(--success);
}

/* ── Start screen: collapsed manual details ─────────────────────────── */
.manual {
  margin-top: var(--space-xs);
}

.manual summary {
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.65;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  list-style: none;
  width: fit-content;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.manual summary::-webkit-details-marker {
  display: none;
}

.manual summary:hover,
.manual summary:focus-visible {
  opacity: 1;
}

.manual[open] summary {
  opacity: 1;
}

.manual-fields {
  display: grid;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

/* ── Concept grid: image previews ───────────────────────────────────── */
.concept-card .shot {
  display: block;
  position: relative;
  height: 24rem;
  overflow: hidden;
  background: white;
}

/* Corner magnifier — the one door to the full-size modal (2026-08-21);
 * the image itself is inert. */
.shot-zoom {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.18);
}
.shot-zoom svg { width: 1.1rem; height: 1.1rem; display: block; }
.shot-zoom:hover,
.shot-zoom:focus-visible { background: var(--panel); }

.concept-card .shot img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
  height: 100%;
}

/* Generating / loading screen */
.generating {
  align-items: center;
  text-align: center;
}

.spinner {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-lg);
  border-radius: 50%;
  border: 4px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-top-color: var(--accent);
  animation: gen-spin 0.9s linear infinite;
}

@keyframes gen-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
    border-top-color: color-mix(in srgb, var(--ink) 25%, transparent);
    border-bottom-color: var(--accent);
  }
}

.generating .error {
  color: var(--accent);
}

.concept-card .shot.pending {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: var(--space-lg);
  text-align: center;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: var(--radius-card);
  opacity: 0.8;
}

/* "Is this you?" confirm screen */
.confirm .profile-card {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  width: 100%;
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.profile-logo {
  max-width: 6rem;
  max-height: 6rem;
  object-fit: contain;
  border-radius: var(--radius-control);
  /* Fixed light backing: uploaded logos are usually drawn for light
     grounds, so the chip must not go navy in dark theme. */
  background: #f4f6f8;
  border: 1px solid var(--line);
  padding: 0.5rem;
}

.profile-body h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
}

.profile-desc {
  margin: 0 0 var(--space-md);
  opacity: 0.9;
}

.profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  margin: 0;
}

.profile-facts dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
}

.profile-facts dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}

.profile-social a {
  margin-right: 0.6rem;
  text-transform: capitalize;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.secondary-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 40%, transparent);
  border-radius: var(--radius-control);
  padding: 0.9rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 540px) {
  .confirm .profile-card { flex-direction: column; }
  .confirm-actions { flex-direction: column; align-items: stretch; }
}

/* Wireframe loader — the shared "website drawing itself" loading visual.
   Soft + rounded: round caps, big radii, gentle float, slow ease. */
.wf-loader {
  width: min(320px, 72vw);
  height: auto;
  margin-bottom: var(--space-lg);
  overflow: visible;
  animation: wf-float 5.5s ease-in-out infinite;
}

.wf-loader .wf {
  fill: none;
  stroke: color-mix(in srgb, var(--ink) 80%, transparent);
  stroke-width: 2.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: wf-draw 7s cubic-bezier(0.45, 0, 0.25, 1) infinite;
  /* --wf-offset staggers whole loaders so side-by-side slots never draw in
     lockstep (set per concept-card slot below). */
  animation-delay: calc(var(--wf-offset, 0s) + var(--i) * 0.22s);
}

.wf-loader .wf.thick {
  stroke-width: 5;
}

.wf-loader .wf.accent {
  stroke: var(--accent);
}

@keyframes wf-draw {
  0%   { stroke-dashoffset: 1; }   /* invisible */
  32%  { stroke-dashoffset: 0; }   /* fully drawn */
  62%  { stroke-dashoffset: 0; }   /* hold */
  88%  { stroke-dashoffset: -1; }  /* erased */
  100% { stroke-dashoffset: -1; }
}

@keyframes wf-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .wf-loader,
  .wf-loader .wf {
    animation: none;
  }
  .wf-loader .wf {
    stroke-dashoffset: 0; /* rest fully drawn */
  }
}

.loading-stage {
  font-size: 1.15rem;
  opacity: 0.9;
  min-height: 1.6em;
}

/* Full-screen lookup overlay while /start submits */
.lookup-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(3px);
}

/* Progress bar — square-edged like the rest of the platform */
.progress-track {
  width: min(420px, 80vw);
  height: 8px;
  margin: var(--space-md) auto var(--space-sm);
  border-radius: 0;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 0;
  background: var(--accent);
  transition: width 0.6s ease;
}

/* Faded reveal link for optional start-form details */
.manual > summary.reveal-link {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.55;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: var(--space-sm) 0;
}

.manual > summary.reveal-link::-webkit-details-marker { display: none; }

.manual > summary.reveal-link:hover { opacity: 0.85; }

/* Sign-up gate banner on the concepts page */
.gate-banner {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-band);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.gate-banner h2 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-heading);
}

.gate-banner p { margin: 0 0 var(--space-md); }

/* Full-size preview modal */
#preview-modal {
  border: none;
  border-radius: var(--radius-card);
  padding: 0;
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  background: var(--panel-strong);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.5);
}

#preview-modal::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(3px);
}

#preview-modal img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

/* The hidden attribute must win over the overlay's display:flex */
.lookup-overlay[hidden] { display: none; }

/* Dev-only reset control */
.dev-reset {
  margin-bottom: var(--space-md);
}

.dev-reset-btn {
  border: 1px dashed color-mix(in srgb, var(--ink) 40%, transparent);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  opacity: 0.6;
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.dev-reset-btn:hover { opacity: 1; }

/* Not-found is a step, not a failure — softer than .error */
.notice {
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

/* Category suggestion chips — tappable everywhere, 44px touch targets */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--space-sm) 0 var(--space-md);
}

.category-chips .chip {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
}

.category-chips .chip:hover {
  border-color: var(--accent);
}

.category-chips .chip.is-selected {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
  font-weight: 600;
}

/* Styled logo upload: hidden native input, pill button, live thumbnail */
.logo-upload {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.logo-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.2rem;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 45%, transparent);
  border-radius: var(--radius-control);
  font-size: 0.9rem;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.logo-preview {
  height: 56px;
  max-width: 130px;
  object-fit: contain;
  border-radius: var(--radius-control);
  padding: 0.35rem;
  /* Fixed light backing — see .profile-logo. */
  background: #f4f6f8;
  border: 1px solid var(--line);
}

/* Dev tools panel — unmistakably not a product surface */
.dev-panel {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: var(--radius-card);
  font-size: 0.85rem;
}

/* ── Credit chip + info hint (custom-feature survey offers) ── */
.credit-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0.4rem;
  position: relative;
}

.credit-chip {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.info-hint {
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  background: none;
  border: none;
  padding: 0.2rem;
  cursor: pointer;
}

.info-hint:hover {
  opacity: 1;
}

.info-hint-pop {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  max-width: 22rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-card);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hover);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ── Build backdrop: the chosen concept fades behind the progress card ── */
.build-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.build-backdrop-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.build-backdrop-scrim {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(2px);
}

.build-overlay-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl);
  max-width: 44rem;
  margin: 0 auto;
}

.survey-loading-sub {
  opacity: 0.8;
  font-size: 1.05rem;
}

/* ── Quiz onboarding: one sliding card at a time ── */
.quiz-active > h1,
.quiz-active > .lede,
.quiz-active > .start-form {
  display: none;
}

.quiz-form {
  width: 100%;
}

.quiz-progress {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: var(--space-sm);
}

.quiz-viewport {
  position: relative;
  overflow: hidden;
  /* Height is driven by the active card (quiz.js fitViewport) so no card
   * ever clips — this is only the pre-measure fallback. */
  min-height: 14rem;
  transition: height var(--motion-base) var(--ease-standard);
}

.quiz-card {
  /* Natural content height (no bottom edge): pinning inset:0 made the
   * card match the viewport and flex-shrink crushed fixed-height children
   * (the word meter) to nothing. quiz.js sizes the viewport to fit. */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

.quiz-card.is-left {
  transform: translateX(-110%);
}

.quiz-card.is-active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* The .ready gate keeps the first card from animating in on reveal. */
.quiz-form.ready .quiz-card {
  transition: transform var(--motion-base) var(--ease-standard),
    opacity var(--motion-base) var(--ease-standard);
}

.quiz-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw + 0.5rem, 2rem);
  margin: 0;
}

.quiz-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.choice-chip-btn {
  font: inherit;
  color: inherit;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  min-height: 44px;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.choice-chip-btn:hover {
  border-color: color-mix(in srgb, var(--ink) 60%, transparent);
}

.choice-chip-btn.selected {
  /* The bold third color marks the CHOICE (2026-08-21). */
  border-color: var(--pop);
  background: color-mix(in srgb, var(--pop) 16%, transparent);
}

.quiz-other {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: var(--space-sm);
}

.quiz-nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  padding-top: var(--space-md);
}

.quiz-back {
  margin-top: var(--space-md);
}

/* Subtle text links: back + skip never compete with the primary action. */
.quiz-back-link,
.quiz-skip-link {
  font: inherit;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.65;
  background: none;
  border: none;
  padding: 0.4rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
}

.quiz-back-link:hover,
.quiz-skip-link:hover {
  opacity: 1;
}

.quiz-logo-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: var(--space-sm);
}

.quiz-logo-row .quiz-other {
  margin-top: 0;
}

.quiz-card textarea,
.quiz-card input[type='text'] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.85rem 1rem;
}

.quiz-card textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.55;
}

.quiz-card textarea:focus-visible,
.quiz-card input[type='text']:focus-visible {
  outline: none;
  border-color: var(--action-strong);
}

.quiz-meter {
  height: 0.6rem;
  margin-top: 0.5rem;
  border-radius: 0;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  overflow: hidden;
}

.quiz-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  transition: width var(--motion-base) var(--ease-standard),
    background var(--motion-base) var(--ease-standard);
}

.quiz-meter-fill.warming {
  background: #d9a53f;
}

.quiz-meter-fill.optimal {
  background: var(--action);
}

.quiz-meter-fill.over {
  background: #d9a53f;
}

/* Website → description prefill note (2026-09-01) */
.quiz-desc-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

/* Found logo on the "Is this you?" card (2026-09-20) — recognition
   beats reading an address. Contained, never dominant. */
.profile-card .profile-logo {
  display: block;
  max-height: 3.4rem;
  max-width: 11rem;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.55rem;
}

.profile-card .profile-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
}

.profile-card .profile-line {
  margin: 0.1rem 0;
  opacity: 0.85;
}

/* ── Theme picker: living preview + style rail ── */
.style-picker {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg) var(--space-xl);
  gap: var(--space-md);
  max-width: 90rem;
  width: 100%;
  margin: 0 auto;
}

.style-picker-head h1 {
  margin-bottom: var(--space-sm);
}

/* App-mode picker (2026-08-20): the preview owns the viewport; choices
   live in a fixed sidebar on the right. */
.style-picker--app {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  background: var(--surface);
}

.style-preview {
  height: 100%;
  min-height: 0;
  background: #fff;
}

.style-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

.style-rail {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel-strong);
  padding: var(--space-md);
}

.style-rail-head h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.3rem;
}

.style-rail-head .hint {
  font-size: 0.85rem;
  margin: 0 0 0.4rem;
}

.style-card {
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0.8rem 0.95rem;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.style-card:hover {
  border-color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.style-card.current {
  border-color: var(--action-strong);
  background: color-mix(in srgb, var(--action) 14%, transparent);
}

.style-card-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
}

.style-card-blurb {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.15rem;
}

.style-rail-actions {
  margin-top: auto;
  padding-top: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: sticky;
  bottom: calc(-1 * var(--space-md));
  background: var(--panel-strong);
  border-top: 1px solid var(--line);
  padding-bottom: 0.3rem;
  z-index: 2;
}

/* Tweak groups: fonts + colors under the archetype cards. */
.tweak-group {
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.tweak-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  opacity: 0.65;
  margin: 0;
}

.tweak-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tweak-opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  transition: border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.tweak-opt:hover {
  border-color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.tweak-opt.current {
  border-color: var(--action-strong);
  background: color-mix(in srgb, var(--action) 14%, transparent);
}

.tweak-opt-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tweak-opt-label {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.tweak-opt-sub {
  font-size: 0.78rem;
  opacity: 0.7;
  margin-top: 0.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tweak-swatches {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.tweak-swatch {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}

/* Point-of-no-return warning inside the style confirm modal. */
.modal-warning {
  padding: var(--space-sm) var(--space-md);
  border-left: 3px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 var(--space-md);
}

/* Sidebar takeover panels: "pick your own" fonts/colors replace the rail
   content entirely, with a close control up top. */
#rail-main,
.rail-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 100%;
}

.rail-panel[hidden],
#rail-main[hidden] {
  display: none;
}

.rail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.rail-panel-head h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0;
}

.rail-panel-close {
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
}

.rail-panel-close:hover {
  border-color: color-mix(in srgb, var(--ink) 55%, transparent);
}

/* Font browser */
.font-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.font-target {
  font: inherit;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.font-target.current {
  border-color: var(--action-strong);
  background: color-mix(in srgb, var(--action) 14%, transparent);
}

.font-target-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.font-target-family {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#font-search {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: inherit;
}

.font-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.font-cat {
  font: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
}

.font-cat.current {
  border-color: var(--action-strong);
  background: color-mix(in srgb, var(--action) 16%, transparent);
  font-weight: 700;
}

.font-results {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.font-row {
  font: inherit;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
}

.font-row:hover {
  border-color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.font-row.current {
  border-color: var(--action-strong);
  background: color-mix(in srgb, var(--action) 14%, transparent);
}

.font-row-name {
  font-size: 1.05rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-row-cat {
  font-size: 0.72rem;
  opacity: 0.65;
  flex: none;
}

/* Always-visible Done bar: sticky at the sidebar's bottom edge, panel
   content scrolls behind it. */
.rail-panel-foot {
  position: sticky;
  bottom: calc(-1 * var(--space-md));
  margin-top: auto;
  background: var(--panel-strong);
  border-top: 1px solid var(--line);
  padding: var(--space-sm) 0 0.4rem;
  z-index: 2;
}

.rail-panel-foot .cta {
  width: 100%;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  padding: var(--space-sm) var(--space-md);
}

/* Accent shortcuts in the color panel */
/* Color slots (2026-08-21): the CURRENT pick leads each group, the
 * selectable swatches sit below it; the native picker is the last tile. */
.color-group { margin-bottom: var(--space-md); }

.color-current {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.35rem 0 0.55rem;
}

.color-current-dot {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--panel) 65%, transparent);
}

.color-current-hex {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.75;
  text-transform: uppercase;
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
}

.color-preset {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 18%, transparent);
  cursor: pointer;
}

.color-preset:hover { border-color: var(--ink); }

.color-preset.is-selected,
.color-custom-tile.is-selected { border-color: var(--action); box-shadow: 0 0 0 2px color-mix(in srgb, var(--action) 45%, transparent); }

/* The custom tile — last swatch of each grid, opens OUR picker modal. */
.color-custom-tile {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent);
  cursor: pointer;
  padding: 0;
  background: conic-gradient(#c22318, #cfa85e, #17604a, #23477e, #6e3a5c, #c22318);
}
.color-custom-tile:hover { border-color: var(--ink); }

/* ── Custom color picker modal (2026-08-21): shade square + hue bar ──
 * The dialog base pads --space-xl on every side, so the width leaves a
 * generous content column; everything inside centers. */
.color-picker-modal {
  width: min(27rem, 94vw);
  text-align: center;
}

.color-picker-modal h2 { margin-bottom: var(--space-md); }

.cp-area {
  position: relative;
  height: 13rem;
  border-radius: calc(var(--radius-card) * 0.6);
  border: 1px solid var(--line);
  cursor: crosshair;
  touch-action: none;
  margin-top: var(--space-md);
}

.cp-thumb,
.cp-hue-thumb {
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 1px 4px rgb(0 0 0 / 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cp-hue {
  position: relative;
  height: 0.9rem;
  border-radius: 999px;
  margin: var(--space-md) 0;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  cursor: pointer;
  touch-action: none;
}
.cp-hue-thumb { top: 50%; }

.cp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: var(--space-lg);
}

.color-picker-modal .confirm-actions { justify-content: center; }

.cp-preview {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex: none;
}

#cp-hex {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  width: 7rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) * 0.6);
  background: var(--panel-strong);
  color: inherit;
}

/* The escape hatch reads as an aside, not a fourth option. */
.tweak-link {
  align-self: flex-start;
  font-size: 0.82rem;
  color: inherit;
  opacity: 0.65;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.tweak-link:hover {
  opacity: 1;
}

.tweak-custom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.tweak-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}

.tweak-field input[type='text'] {
  font: inherit;
  font-weight: 400;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) * 0.6);
  background: var(--panel-strong);
  color: inherit;
}

.tweak-color-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.tweak-field input[type='color'] {
  width: 3.2rem;
  height: 2rem;
  padding: 0.1rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) * 0.6);
  background: var(--panel-strong);
  cursor: pointer;
}

/* Mobile: preview on top, the sidebar becomes the lower half. */
@media (max-width: 820px) {
  .style-picker--app {
    grid-template-columns: 1fr;
    grid-template-rows: 48vh minmax(0, 1fr);
  }
  .style-rail {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .style-rail-actions {
    position: sticky;
    bottom: 0;
    background: var(--panel-strong);
    padding-bottom: 0.4rem;
  }
}

/* Slide-in dev drawer: fixed bottom-right, only the tab peeks out when
 * closed. The whole strip (tab + panel) rides one transform so the tab
 * stays attached to the panel edge as it moves. */
.dev-drawer {
  --dev-tab-w: 2.4rem;
  position: fixed;
  right: 0;
  bottom: 1rem;
  z-index: 40; /* under the lookup overlay (50) */
  display: flex;
  align-items: flex-end;
  transform: translateX(calc(100% - var(--dev-tab-w)));
}

.dev-drawer.ready {
  transition: transform var(--motion-base) var(--ease-standard);
}

.dev-drawer.open {
  transform: translateX(0);
}

.dev-drawer-tab {
  writing-mode: vertical-rl;
  width: var(--dev-tab-w);
  padding: 0.8rem 0;
  border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-right: none;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  background: var(--panel-strong);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.dev-drawer .dev-panel {
  margin: 0;
  width: min(21rem, calc(100vw - var(--dev-tab-w) - 0.5rem));
  max-height: min(70vh, 30rem);
  overflow-y: auto;
  border-radius: var(--radius-card) 0 var(--radius-card) var(--radius-card);
  background: var(--panel-strong);
  box-shadow: var(--shadow-hover);
}

.dev-panel-title {
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  opacity: 0.75;
}

.dev-check {
  display: block;
  margin: 0.35rem 0;
  cursor: pointer;
}

.dev-selects {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

.dev-selects select {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  border-radius: var(--radius-control);
  padding: 0.45rem 0.6rem;
}

/* Generations-left indicator */
.generations-left {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: var(--radius-control);
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: var(--space-md);
}

.concepts-footer {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

/* Sign-up gate modal */
.signup-modal {
  border: none;
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  max-width: 30rem;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.5);
}

.signup-modal::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(3px);
}

.signup-modal h2 {
  font-family: var(--font-heading);
  margin: 0 0 var(--space-sm);
}

.membership-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg);
  line-height: 2;
}

/* Edit-details modal shares the sign-up panel look */
.form-modal {
  border: none;
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  width: min(92vw, 34rem);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.5);
}

.form-modal::backdrop {
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(3px);
}

.form-modal h2 {
  font-family: var(--font-heading);
  margin: 0 0 var(--space-md);
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  opacity: 0.7;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: inherit;
}

.linklike:hover { opacity: 1; }

.manual summary[hidden] { display: none; }

/* ── Plans page ──────────────────────────────────────────────────────────── */
.plans-hero {
  max-width: 72rem;
  align-items: center;
  text-align: center;
}

/* Billing-cycle segmented control (reworked 2026-09-01): the recessed
   track + one filled pill makes the selected state unambiguous — the old
   accent wash on the unselected Annual button read as a second selection.
   The savings chip floats OUTSIDE the button states so it reads as promo,
   not state. */
.cycle-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: var(--space-xl);
}

.cycle-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: 0.7;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard);
}

.cycle-btn:hover { opacity: 1; }

.cycle-btn.is-selected {
  background: var(--action);
  color: var(--on-action);
  opacity: 1;
  font-weight: 600;
}

.cycle-note {
  position: absolute;
  top: -0.85rem;
  right: -1.1rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: var(--space-lg);
  width: 100%;
  align-items: stretch;
  text-align: left;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
}

.plan-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.plan-promo {
  position: absolute;
  top: -0.8rem;
  left: var(--space-xl);
  background: color-mix(in srgb, var(--accent) 78%, #000);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-control);
}

.plan-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0;
}

.plan-tagline {
  margin: 0;
  opacity: 0.85;
  min-height: 2.6em;
}

.plan-price {
  font-family: var(--font-heading);
}

.price-was {
  text-decoration: line-through;
  opacity: 0.55;
  margin-right: 0.5rem;
  font-size: 1.25rem;
}

.price-now {
  font-size: 2.25rem;
  font-weight: 700;
}

.price-unit {
  font-size: 1rem;
  opacity: 0.75;
}

.plan-meta {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* "Everything in <tier>, plus:" inheritance line (2026-09-01) */
.plan-includes {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.75;
}

.perks-more {
  opacity: 0.65;
  font-style: italic;
}

.plan-features {
  list-style: none;
  /* Top-aligned column (2026-09-01): the old stretched grid spread short
     lists apart and squeezed/clipped long ones. Items keep their natural
     height; leftover space sits below, CTA stays pinned via flex: 1. */
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.plan-features li {
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.45;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Build-wait verify nudge (2026-09-08). */
.verify-note { margin-top: 0.9rem; }
.verify-resend {
  border: 0; padding: 0; background: transparent; cursor: pointer;
  font: inherit; color: var(--action-strong);
  text-decoration: underline; text-underline-offset: 3px;
}
.verify-resend:disabled { opacity: 0.5; cursor: default; }

.plan-choose {
  text-align: center;
  font-size: 1.05rem;
  /* "Choose Business" must stay one line on desktop (owner call
     2026-09-08) — the generous .cta side padding gives way instead. */
  white-space: nowrap;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
  /* Tall feature lists scroll the button away — pin it to the viewport
     bottom while its card is in view (2026-08-23). The card fill behind
     it keeps list items from showing through. */
  position: sticky;
  bottom: 0.75rem;
  margin-top: auto;
  box-shadow: 0 -0.75rem 0 0.75rem var(--panel), 0 6px 18px rgb(0 0 0 / 0.14);
}

.plan-footnote {
  margin-top: var(--space-xl);
  max-width: 44rem;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

.plan-picked {
  margin: 0 0 var(--space-lg);
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* Invite/discount code on the signup form (2026-09-03). */
.optional-tag {
  font-size: 0.68em;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: 0.4rem;
}
.invite-hint {
  color: var(--pop-strong);
  opacity: 1;
}

.plan-picked a {
  color: var(--action-strong);
  margin-left: 0.35rem;
}

/* ── Selection continue banner & build page ─────────────────────────────── */
.continue-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--radius-band);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.continue-banner p {
  margin: 0;
}

.build-preview {
  max-width: 100%;
  border-radius: var(--radius-card);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--line);
}

/* ── Signup pages: centered on the page (2026-08-21) ─────────────────────
 * The main element is the full viewport row, flex-centered both ways; the
 * form is its own constrained column so nothing can push it off-center.
 * Fields stay left-aligned inside the centered column for readability. */
.hero.signup-hero {
  max-width: none;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.signup-hero .start-form {
  width: min(34rem, 100%);
  text-align: left;
}
/* Inputs fill their grid tracks — their intrinsic default width was
 * forcing the 2fr/1fr/1fr address row wider than the column. */
.signup-hero .start-form input,
.signup-hero .start-form select,
.signup-hero .start-form textarea {
  width: 100%;
  min-width: 0;
}
.signup-hero .field-row > div { min-width: 0; }
.signup-hero .start-form .cta { justify-self: center; }
.signup-hero .confirm-actions { justify-content: center; }

/* ── Address row on signup details ──────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
  width: 100%;
}

.field-row label {
  display: block;
}

.optional {
  font-weight: 400;
  opacity: 0.6;
  font-size: 0.85em;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.inline-form { display: inline-flex; align-items: stretch; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* Feel switcher beside "Generate more concepts" */
.feel-select {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.feel-select:focus-visible { outline: 3px solid var(--action-strong); outline-offset: 2px; }

/* DEV ONLY: wildcard concept flag (rendered only when NODE_ENV=development) */
.concept-card { position: relative; }
.dev-flag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  color: var(--action-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-control);
  opacity: 0.92;
  pointer-events: none;
}

/* ── In-place concept loading ───────────────────────────────────────────── */
.concept-card.loading-slot {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px dashed color-mix(in srgb, var(--ink) 30%, transparent);
}

.slot-loader {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
}

.slot-loader .wf-loader {
  width: min(220px, 70%);
}

.slot-caption {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.75;
  color: var(--ink);
}

/* Per-slot progress (inside loader cards and rendering shots) */
.slot-progress {
  width: min(220px, 70%);
  height: 5px;
  border-radius: 0;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
  overflow: hidden;
}

.slot-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 0;
  background: var(--accent);
  transition: width 0.9s ease;
}

.shot.pending .slot-loader {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

/* Remaining-generations count inside the Generate more button */
.cta-count {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--pop-strong);
  margin-top: 0.15rem;
}

/* Any button carrying .cta renders like the anchor version — the default
   UA button border was leaking through outside form contexts. */
button.cta {
  border: none;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-heading);
  font-weight: 700;
}

button.secondary-btn {
  cursor: pointer;
}


/* De-sync side-by-side loader cards: NEGATIVE delays drop each slot into a
   different phase of the draw loop and float immediately — variance from the
   first frame, with no slot sitting blank waiting for its turn. */
.concept-card:nth-child(3n + 1) .wf-loader { --wf-offset: 0s; }
.concept-card:nth-child(3n + 2) .wf-loader { --wf-offset: -2.3s; animation-delay: -1.8s; }
.concept-card:nth-child(3n) .wf-loader { --wf-offset: -4.7s; animation-delay: -3.7s; }

/* From-scratch note between the grid and the footer buttons */
.render-note {
  margin: var(--space-md) 0 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Low-affordance note under the concept grid (2026-09-01): quiet
 * expectation-setting, deliberately less present than the cards. */
.concept-note {
  margin: var(--space-sm) 0 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.55;
}

/* ── Discovery survey (build page) ──────────────────────────────────────── */
.build-page #survey-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.question-field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: var(--space-md);
}

.q-help {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.7;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choice-chip {
  cursor: pointer;
}

.choice-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-chip span {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-control);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent);
  font-size: 0.95rem;
  transition: background var(--motion-fast, 0.15s) ease;
}

.choice-chip input:checked + span {
  background: var(--action);
  border-color: var(--action);
  color: var(--on-action);
  font-weight: 600;
}

.choice-chip input:focus-visible + span {
  outline: 3px solid var(--action-strong);
  outline-offset: 2px;
}

.survey-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.survey-actions .cta {
  margin-top: 0;
}

/* DEV ONLY: per-concept pipeline time in the card footer */
.dev-time {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.55;
  white-space: nowrap;
}

/* Submit-button loading state (form-controls.js adds .is-loading on POST). */
button.is-loading { position: relative; color: transparent !important; pointer-events: none; }
button.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 1.05em; height: 1.05em; border-radius: 50%;
  /* Spin in the button's own text color (the label is hidden, so
     currentColor won't do): ink on panel-toned buttons, on-action on
     action fills — light-over-dark in the light theme, and both flip
     correctly in dark. */
  border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-top-color: color-mix(in srgb, var(--ink) 85%, transparent);
  animation: ond-spin 0.7s linear infinite;
}
.cta.is-loading::after, button.cta.is-loading::after {
  border-color: color-mix(in srgb, var(--on-action) 35%, transparent);
  border-top-color: var(--on-action);
}
@keyframes ond-spin { to { transform: rotate(360deg); } }

/* Plan feature info toggle (domain premium disclaimer) */
.feature-info {
  display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem;
  margin-left: 0.35rem; border-radius: 50%; vertical-align: text-bottom;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  background: transparent; color: inherit; opacity: 0.7; cursor: pointer;
  font: italic 700 0.68rem/1 Georgia, serif;
}
.feature-info:hover, .feature-info[aria-expanded="true"] { opacity: 1; border-color: var(--accent); color: var(--accent); }
/* True popover (2026-09-01): overlays the card instead of extending the
   list — an open disclaimer must never push features out of view. */
.feature-info-pop {
  position: absolute; left: 0; top: calc(100% + 0.4rem); z-index: 30;
  display: block; width: min(19rem, 78vw); padding: 0.65rem 0.8rem;
  font-size: 0.8rem; line-height: 1.5;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.18);
}
.feature-info-pop[hidden] { display: none; }
/* Rich-text notes (plan_features.note, 2026-09-04) */
.feature-info-pop p { margin: 0 0 0.5em; }
.feature-info-pop p:last-child { margin-bottom: 0; }

/* Signed-in chip: fixed top-right, quiet, with the exit always visible */
.session-chip {
  position: fixed; top: 0.8rem; right: 0.9rem; z-index: 120;
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.3rem 0.75rem; border-radius: var(--radius-control); font-size: 0.78rem;
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}
.session-chip-label { opacity: 0.7; }
.session-chip-btn {
  background: none; border: none; cursor: pointer; font: inherit;
  color: var(--action-strong); text-decoration: underline; padding: 0;
}

/* Free-build nudge: fixed bottom-right card for unpaid members — payment
 * moved to publish time (2026-08-20), this keeps the ask visible without
 * blocking anything. */
.unpaid-toast {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 130;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.18);
  backdrop-filter: blur(6px);
}
.unpaid-toast-title { margin: 0 0 0.25rem; font-weight: 700; font-size: 0.9rem; }
.unpaid-toast-text { margin: 0 0 0.6rem; font-size: 0.8rem; line-height: 1.45; opacity: 0.85; }
.unpaid-toast-btn {
  display: inline-block; padding: 0.4rem 0.85rem; border-radius: var(--radius-control);
  background: var(--action); color: var(--on-action);
  font-size: 0.82rem; font-weight: 700; text-decoration: none;
}
.unpaid-toast-btn:hover { filter: brightness(1.05); }

/* ── Theme toggle: fixed bottom-left, explicit light/dark override ────── */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 45; /* under the lookup overlay (50), over page content */
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 0;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: box-shadow var(--motion-fast) var(--ease-standard);
}

.theme-toggle:hover {
  box-shadow: var(--shadow-hover);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--action-strong);
  outline-offset: 2px;
}

/* ── Start-page header: the living owl mark, centered ─────────────────── */
.start-header {
  display: flex;
  justify-content: center;
  padding: 2.2rem 1rem 0;
}

.start-header .owl {
  /* Brand navy in light mode (the mark's dark blue), light ink in dark. */
  color: #152438;
}

:root[data-theme='dark'] .start-header .owl {
  color: var(--ink);
}

/* Root page variant: owl + wordmark stacked (the brand's front door). */
.start-header-brand {
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

/* ── Legal pages (terms, privacy) ─────────────────────────────────────── */
.legal {
  max-width: 46rem;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl);
  line-height: 1.65;
}

.legal h1 { margin-bottom: var(--space-xs); }

.legal-meta {
  font-size: 0.9rem;
  opacity: 0.7;
  margin: 0 0 var(--space-xl);
}

.legal h2 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: var(--space-xl) 0 var(--space-xs);
}

.legal section p, .legal section ul { margin: 0 0 var(--space-sm); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.45rem; }
.legal a { color: var(--action-strong); }

.site-footer a { color: var(--action-strong); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: underline; }

/* Landing "Log in" link — quiet, top-right (mirrors the session chip). */
.login-link {
  position: fixed;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 120;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  color: var(--action-strong);
  text-decoration: none;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 85%, transparent);
  backdrop-filter: blur(4px);
}
.login-link:hover, .login-link:focus-visible { text-decoration: underline; }

/* ── Corner brand (start page): Owline lockup, top left, the link back
   to the marketing site ─────────────────────────────────────────────── */
.corner-brand {
  position: fixed;
  top: 1rem;
  left: 1.1rem;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.corner-brand .logo-mark { height: 1.35rem; width: auto; }
.corner-brand:hover, .corner-brand:focus-visible { opacity: 0.7; }

/* ── Root-domain marketing landing ────────────────────────────────────── */
.hero.marketing {
  max-width: 52rem;
  align-items: center;
  text-align: center;
}

.marketing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  text-align: left;
}

.marketing-features .feature {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: var(--space-lg);
}

.marketing-features h2 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0 0 var(--space-xs);
}

.marketing-features p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.85;
}

/* ── SMS consent walkthrough: figures + sample-message bubble ──────────── */
.legal-figure {
  margin: var(--space-md) 0 var(--space-lg);
  padding: 0;
}

.legal-figure img {
  display: block;
  width: 100%;
  max-width: 34rem;
  border: 1px solid var(--line);
  background: #fff;
}

.legal-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
  font-style: italic;
}

.legal-sms-example {
  margin: var(--space-sm) 0 var(--space-md);
}

.legal-sms-bubble {
  display: inline-block;
  max-width: 26rem;
  background: var(--action);
  color: var(--on-action);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  border-radius: 1.1rem 1.1rem 1.1rem 0.2rem;
}

/* Online store badge / absence note on the funnel plan step (2026-08-21) */
.plan-store-badge {
  display: inline-block;
  margin: 0.1rem 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pop-strong);
  border: 1px solid color-mix(in srgb, var(--pop) 45%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.plan-store-note {
  margin: 0.1rem 0 0.3rem;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* ── quiz style question (2026-08-30): multi-select broad chips +
   searchable detailed styles ── */
.quiz-style-hint { font-size: 0.85rem; opacity: 0.6; margin: -0.4rem 0 0.8rem; }
.quiz-style-search { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.quiz-style-search input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.92rem; padding: 0.6rem 0.8rem;
  border: 1px solid rgba(22, 32, 44, 0.25); border-radius: 8px; background: #fff;
}
.quiz-style-add {
  font: inherit; font-size: 0.85rem; padding: 0 1rem; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(22, 32, 44, 0.25); background: #fff; min-height: 44px;
}
.quiz-style-add:hover { border-color: currentColor; }
.quiz-style-picked { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.quiz-style-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem;
  padding: 0.25rem 0.35rem 0.25rem 0.65rem; border-radius: 999px;
  background: rgba(22, 32, 44, 0.08); border: 1px solid rgba(22, 32, 44, 0.15);
}
.quiz-style-chip button {
  border: 0; background: none; font: inherit; cursor: pointer; opacity: 0.55;
  min-width: 26px; min-height: 26px; border-radius: 50%;
}
.quiz-style-chip button:hover { opacity: 1; background: rgba(22, 32, 44, 0.1); }

/* ══ Framework skin (2026-09-02) ═══════════════════════════════════════
   The funnel wears the marketing site's language: Fraunces display
   headlines, slanted small-caps primary actions, no hover lift/glow.
   Appended last so the overrides win by cascade. */
h1 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0;
}
.cta,
button.cta {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  clip-path: var(--slant);
  padding-left: calc(var(--space-xl) + 14px);
}
/* Hover (2026-09-03): ONLY the background grows, and only to the LEFT —
   the background is a ::before layer whose left edge slides out. */
.cta,
button.cta {
  position: relative; z-index: 0;
  background: transparent; clip-path: none;
}
.cta::before,
button.cta::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--action);
  clip-path: var(--slant);
  /* Hover fills the slant notch INWARD (2026-09-08): growing past the
     button's box clipped inside overflow containers and exposed odd
     backgrounds — the fill now never leaves the box. */
  transition: clip-path 180ms ease;
}
.cta:hover,
.cta:focus-visible {
  transform: none;
  box-shadow: none;
}
.cta:hover::before,
.cta:focus-visible::before { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
@media (prefers-reduced-motion: reduce) {
  .cta::before, button.cta::before { transition: none; }
}
/* Small/inline ctas keep their tighter padding but clear the slant. */
.concept-actions .cta,
.rail-panel-foot .cta,
.survey-actions .cta {
  padding-left: calc(var(--space-lg) + 14px);
}
button.secondary-btn,
.secondary-btn {
  font-family: var(--font-heading);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
}
