/* tbrand: the AI Lab brand. Every value comes from ai-lab-tokens.css, which each page loads first (a byte-identical
   copy of sites/www-ai-lab/app/ai-lab-tokens.css); this sheet only maps the trial pages onto it, so one rule set
   serves the light and the dark theme. Light is the default; dark follows the system. The look is the site's: the
   mark and wordmark in the header, Geist, neutral cards, one blue (--brand-strong fills; text never in --brand on
   light). */

/* Links and selected states: --brand-strong on light (5.28:1 on white); on dark it is 3.2:1, so --brand (6.12:1). */
:root {
  --link: var(--brand-strong);
  --wordmark-dash: var(--brand-strong);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --link: var(--brand); --wordmark-dash: var(--mark); }
}
:root[data-theme="dark"] { --link: var(--brand); --wordmark-dash: var(--mark); }

:root {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--background); color: var(--foreground); }
a { color: var(--link); text-underline-offset: 0.16em; }
a:hover { color: var(--foreground); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--foreground); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.6rem 0.8rem; border-radius: var(--radius-md); background: var(--background); color: var(--foreground); }
.skip-link:focus { top: 0.5rem; }

/* The site's header: the mark and the "ai-lab" wordmark, a dashed grid line under it (www-ai-lab .grid-line-h). */
.site-header { position: relative; width: 100%; max-width: var(--container); min-height: 64px; margin: 0 auto; padding: 0.6rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-header::after,
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(to right, var(--grid-line) 50%, transparent 0) 0 0 / 10px 1px repeat-x; -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); pointer-events: none; }
.site-header::after { bottom: 0; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--foreground); text-decoration: none; }
.brand:hover { color: var(--foreground); }
.ai-lab-mark { display: block; flex: none; width: 1.5rem; height: 1.5rem; color: var(--mark); overflow: visible; }
.wordmark { color: var(--foreground); font-size: var(--text-lg); font-weight: 600; letter-spacing: var(--tracking-tight); }
.wordmark-dash { color: var(--wordmark-dash); }
.language-picker { display: flex; align-items: center; gap: 0.6rem; font-size: var(--text-sm); font-weight: 500; color: var(--muted-foreground); }
.language-picker select { max-width: 9rem; min-height: 44px; background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-md); padding: 0.45rem 0.7rem; color: var(--foreground); }

.page-shell { width: min(100% - 2rem, 760px); margin: 2.5rem auto 5rem; }
.signup-shell { width: min(100% - 2rem, 810px); }
.eyebrow { color: var(--muted-foreground); font-weight: 500; letter-spacing: 0.04em; font-size: var(--text-sm); margin-bottom: 0.8rem; }
h1 { font-size: clamp(var(--text-2xl), 5vw, var(--text-5xl)); font-weight: var(--font-weight-heading); line-height: 1.1; letter-spacing: var(--tracking-tight); text-wrap: balance; margin: 0; max-width: 18ch; }
h2 { font-weight: var(--font-weight-heading); }
.intro { color: var(--muted-foreground); font-size: var(--text-lg); line-height: 1.6; max-width: 62ch; margin: 1.25rem 0 2.6rem; }
.form-section, .status-card, .action-card { background: var(--card); color: var(--card-foreground); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 1.75rem; margin: 1.2rem 0; }
.section-heading { display: flex; align-items: center; gap: 0.7rem; font-size: var(--text-xl); font-weight: var(--font-weight-heading); letter-spacing: var(--tracking-tight); margin: 0 0 1.5rem; }
.step { display: inline-grid; place-items: center; background: var(--secondary); border-radius: 50%; width: 2rem; height: 2rem; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0; color: var(--secondary-foreground); }
label, legend { font-size: 0.95rem; font-weight: 600; }
input[type="text"], input[type="email"], select#plan, select#timezone, select#currency { display: block; width: 100%; background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-md); color: var(--foreground); padding: 0.75rem 0.85rem; margin: 0.5rem 0 1.4rem; min-height: 2.8rem; }
fieldset { border: 0; padding: 0; margin: 0; }
.pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.8rem; }
.pack-card { position: relative; display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.95rem; border: 1px solid var(--input); border-radius: var(--radius-lg); min-height: 4.4rem; cursor: pointer; }
.pack-card:has(input:checked) { border: 2px solid var(--link); padding: calc(0.95rem - 1px); background: var(--muted); }
.pack-card:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.pack-card.is-unavailable { color: var(--muted-foreground); background: var(--muted); border-color: var(--border); cursor: not-allowed; }
.pack-card input { margin-top: 0.14rem; accent-color: var(--brand-strong); }
.pack-card strong { display: block; font-size: 0.9rem; font-weight: 600; }
.pack-card small { display: block; margin-top: 0.25rem; font-size: 0.78rem; }
.help-text, .privacy-note { color: var(--muted-foreground); font-size: var(--text-sm); line-height: 1.5; }
.help-text { margin: 0.55rem 0 0; }
.address-fieldset { display: grid; gap: 0.7rem; margin-bottom: 1rem; }
.pack-fieldset { margin-bottom: 1.4rem; }
.choice { display: flex; align-items: center; gap: 0.65rem; font-weight: 500; }
.choice input, .legal-choice input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--brand-strong); flex: none; }
.prefix-input { display: flex; align-items: center; background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-md); overflow: hidden; margin-top: 0.5rem; }
.prefix-input:focus-within { outline: 3px solid var(--ring); outline-offset: 2px; }
.prefix-input input { border: 0; border-radius: 0; margin: 0; min-width: 0; }
.prefix-input input:focus-visible { outline: 0; }
.prefix-input span { white-space: nowrap; background: var(--muted); padding: 0.8rem; color: var(--muted-foreground); border-left: 1px solid var(--border); font-family: var(--font-mono); font-size: var(--text-sm); }
.legal-choice { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.9rem 0; }
.legal-choice label { font-weight: 500; line-height: 1.5; }
.challenge { min-height: 65px; margin-top: 1.25rem; }

/* The site's ButtonLink: --brand-strong with white text (5.28:1) in both themes, and the outline variant. */
.primary-button, .secondary-button { border: 0; border-radius: var(--radius-md); padding: 0.75rem 1.5rem; font-weight: 500; min-height: 2.9rem; }
.primary-button { color: #ffffff; background: var(--brand-strong); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25); width: 100%; margin-top: 0.5rem; }
.primary-button:hover:enabled { box-shadow: 0 1px 2px rgb(0 0 0 / 0.1), 0 3px 5px color-mix(in srgb, var(--brand) 50%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.25); }
.secondary-button { color: var(--foreground); background: var(--card); box-shadow: 0 0 0 1px var(--input), 0 1px 2px rgb(0 0 0 / 0.05); }
.secondary-button:hover:enabled { background: var(--muted); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .primary-button, .secondary-button { transition: box-shadow 200ms, background-color 200ms; }
}
.notice { background: var(--muted); color: var(--foreground); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 0.85rem 1rem; line-height: 1.5; }
.error-message { background: var(--muted); color: var(--foreground); border-left: 4px solid var(--destructive); border-radius: var(--radius-sm); padding: 0.85rem 1rem; margin: 1rem 0; line-height: 1.5; }
.privacy-note { margin-top: 0.85rem; }
.site-footer { position: relative; margin-top: auto; padding: 1.5rem; text-align: center; font-size: var(--text-sm); color: var(--muted-foreground); }
.site-footer::before { top: 0; }
.message-shell { padding-top: 5vh; }
.message-shell h1 { max-width: none; }
.message-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: var(--radius-xl); background: var(--secondary); color: var(--link); font-size: 1.6rem; margin-bottom: 1.8rem; }
.text-link { font-weight: 500; }
.status-shell h1 { max-width: none; margin-bottom: 1.6rem; }
.state-pill { display: inline-block; padding: 0.45rem 0.7rem; border-radius: var(--radius-pill); background: var(--secondary); color: var(--secondary-foreground); font-size: var(--text-sm); font-weight: 500; }
.details-list { margin: 1.4rem 0 0; }
.details-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-top: 1px solid var(--border); padding: 0.9rem 0; }
.details-list dt { color: var(--muted-foreground); }
.details-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 600; }
/* tstatus: the trial's steps, a check for each one done. */
.trial-steps { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.trial-steps li { position: relative; padding: 0.35rem 0 0.85rem 2.4rem; color: var(--muted-foreground); }
.trial-steps li::before { content: ""; position: absolute; left: 0; top: 0.2rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--input); background: var(--card); font-size: 0.85rem; font-weight: 800; color: var(--card); box-sizing: border-box; }
.trial-steps li:not(:last-child)::after { content: ""; position: absolute; left: calc(0.8rem - 1px); top: 1.9rem; bottom: -0.1rem; width: 2px; background: var(--border); }
.trial-steps li[data-state="done"] { color: var(--foreground); }
.trial-steps li[data-state="done"]::before { content: "✓"; background: var(--positive); border-color: var(--positive); }
.trial-steps li[data-state="done"]:not(:last-child)::after { background: var(--positive); }
.trial-steps li[data-state="current"] { color: var(--foreground); }
.trial-steps li[data-state="current"]::before { border-color: var(--link); box-shadow: inset 0 0 0 4px var(--card); background: var(--link); }
.trial-steps strong { display: block; font-weight: 600; line-height: 1.5; }
.trial-steps p { margin: 0.2rem 0 0; color: var(--muted-foreground); font-size: 0.92rem; line-height: 1.5; }
.trial-steps li:not([data-state="current"]) p { display: none; }
.ready-panel { margin-top: 0.4rem; }
.ready-panel .primary-button { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ready-panel .primary-button:hover { color: #ffffff; }
.action-card h2 { font-size: var(--text-xl); letter-spacing: var(--tracking-tight); margin: 0 0 0.75rem; }
.action-card p { color: var(--muted-foreground); line-height: 1.5; }
.action-card select { max-width: 100%; }
.action-card .primary-button { width: auto; }

/* twiz: the wizard, one step at a time. */
textarea { display: block; width: 100%; font: inherit; background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-md); color: var(--foreground); padding: 0.75rem 0.85rem; margin: 0.5rem 0 0; resize: vertical; }
textarea:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--muted-foreground); opacity: 1; }
.section-heading:focus { outline: none; }
.wizard-progress { color: var(--muted-foreground); font-size: var(--text-sm); font-weight: 500; margin: 1rem 0 -0.4rem; min-height: 1.2em; }
.intro-list { margin: 0 0 1.4rem; padding-left: 1.2rem; line-height: 1.6; color: var(--card-foreground); }
.intro-list li + li { margin-top: 0.6rem; }
.choice-list { display: grid; gap: 0.6rem; }
.choice-card { padding: 0.85rem 0.95rem; border: 1px solid var(--input); border-radius: var(--radius-lg); min-height: 2.9rem; cursor: pointer; }
.choice-card:has(input:checked) { border: 2px solid var(--link); padding: calc(0.85rem - 1px) calc(0.95rem - 1px); background: var(--muted); }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
#business-types { margin: 0 0 1.4rem; }
.step-actions { display: flex; gap: 0.7rem; margin-top: 1.5rem; }
.step-actions .primary-button { flex: 1; width: auto; margin-top: 0; }
.step-actions .secondary-button { flex: none; }
.ai-picks { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.7rem; }
.ai-pick { border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius-md); padding: 0.85rem 1rem; }
.ai-pick p { margin: 0.35rem 0; line-height: 1.5; }
.ai-pick small { color: var(--muted-foreground); line-height: 1.45; }
.module-list { display: grid; gap: 0.65rem; margin-top: 0.8rem; }
.module-card { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.95rem; border: 1px solid var(--input); border-radius: var(--radius-lg); cursor: pointer; font-weight: 500; }
.module-card:has(input:checked) { border: 2px solid var(--link); padding: calc(0.95rem - 1px); background: var(--muted); }
.module-card:has(input:disabled) { cursor: default; }
.module-card:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.module-card input { width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; accent-color: var(--brand-strong); flex: none; }
.module-copy { display: grid; gap: 0.3rem; min-width: 0; line-height: 1.45; }
.module-copy strong { font-size: 0.95rem; font-weight: 600; }
.module-copy small { color: var(--muted-foreground); font-size: 0.8rem; }
.module-why { color: var(--foreground); font-style: normal; font-size: 0.9rem; }
.module-does { font-size: 0.9rem; }
.module-price { font-weight: 600; }
.badge { display: inline-block; margin-left: 0.3rem; padding: 0.1rem 0.45rem; border-radius: var(--radius-pill); background: var(--secondary); color: var(--secondary-foreground); font-size: var(--text-xs); font-weight: 600; vertical-align: middle; }
#step-contact > .step-actions { margin-top: 0.5rem; }

@media (max-width: 580px) {
  .page-shell { margin: 1.5rem auto 3rem; }
  .form-section, .status-card, .action-card { padding: 1.15rem; }
  .pack-grid { grid-template-columns: 1fr; }
  .details-list div { display: block; }
  .details-list dd { text-align: left; margin-top: 0.2rem; }
  .language-picker span { display: none; }
}

@media (forced-colors: active) {
  .ai-lab-mark { color: CanvasText; }
  .primary-button, .secondary-button { border: 1px solid ButtonText; }
}
