:root {
  --button-height: 34px;
  --control-height: var(--button-height);
  --alert-success-bg: color-mix(in srgb, var(--primary) 14%, var(--surface));
  --alert-success-fg: var(--primary);
  --alert-warning-bg: #fef3c7;
  --alert-warning-fg: #92400e;
  --alert-error-bg: color-mix(in srgb, var(--danger) 14%, var(--surface));
  --alert-error-fg: var(--danger);
}

[data-theme="dark"] {
  --alert-warning-bg: #422006;
  --alert-warning-fg: #fcd34d;
}

.hidden {
  display: none !important;
}

html {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100%;
  margin: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
.plan-name,
.price {
  font-family: var(--font-sans);
  font-weight: 700;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 6px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 4px;
  font-size: 15px;
}

.muted,
.eyebrow {
  color: var(--text-secondary);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  display: flex;
  height: 30px;
  align-items: center;
}

.brand-wordmark,
.wordmark {
  display: block;
  height: 32px;
}

.wordmark {
  width: 112px;
  object-fit: contain;
  object-position: left center;
}

.google-logo {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.google-dot {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: var(--radius-large);
  font-size: 10px;
}

.btn,
.button-link {
  display: inline-flex;
  height: var(--button-height);
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-default);
  background: var(--surface);
  padding: 0 11px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition:
    color 150ms ease-out,
    background-color 150ms ease-out,
    border-color 150ms ease-out,
    box-shadow 150ms ease-out,
    opacity 150ms ease-out,
    transform 150ms ease-out;
}

.btn:hover:not(:disabled),
.button-link:hover {
  background: var(--hover-bg);
}

.btn:active:not(:disabled),
.button-link:active {
  transform: scale(0.96);
}

.btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.btn.primary {
  border-color: transparent;
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn.primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--primary) 88%, var(--text-primary));
}

/*
 * Neutral action fill. Reads the platform --button-fill property directly with
 * the inverse surface as its label, mirroring the marketing .af-button-fill.
 * Primary blue is reserved for the Enterprise action; every other auth action
 * uses this fill.
 */
.btn.fill {
  border-color: transparent;
  background: var(--button-fill);
  color: var(--surface);
}

.btn.fill:hover:not(:disabled) {
  background: oklch(from var(--button-fill) calc(l - 0.06) c h);
}

.dark .btn.fill:hover:not(:disabled) {
  background: oklch(from var(--button-fill) calc(l + 0.06) c h);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

.btn.ghost:hover:not(:disabled) {
  background: var(--hover-bg);
}

.btn.danger {
  border-color: transparent;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
}

.btn.danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 20%, transparent);
}

.full {
  width: 100%;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.field input,
.field select,
.stack > input,
#email-step > input,
#otp-step > input {
  width: 100%;
  height: var(--control-height);
  min-height: var(--control-height);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-default);
  background: var(--input-fill);
  color: var(--text-primary);
  padding: 0 11px;
  font-size: 13px;
  transition:
    background-color 150ms ease-out,
    border-color 150ms ease-out,
    box-shadow 150ms ease-out;
}

.field input::placeholder,
.stack > input::placeholder,
#email-step > input::placeholder,
#otp-step > input::placeholder {
  color: var(--text-secondary);
}

.field input:focus-visible,
.field select:focus-visible,
.stack > input:focus-visible,
#email-step > input:focus-visible,
#otp-step > input:focus-visible {
  border-color: var(--ring);
  outline-color: var(--ring);
}

.stack {
  display: grid;
  gap: 12px;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

@media (pointer: coarse) {
  :root {
    --button-height: 44px;
  }
}
