/* Planet Harvest design tokens, v1 (2026-11-25)
 * Source of truth: the "Planet Harvest Design System" artifact, project/tokens.json.
 * Each --ph-<name> equals the system token <name>.
 * Light is the default. Dark applies with the OS dark setting unless data-theme="light" is set,
 * and always with data-theme="dark" on <html>.
 * Contrast: 88 pairs checked against WCAG 2.2 AA, 0 failures (artifact section "Color and contrast").
 */

:root {
  --ph-ground: #F4F6FA;
  --ph-surface: #FFFFFF;
  --ph-surface-sunken: #E9EDF4;
  --ph-surface-inverse: #0E1526;
  --ph-ink: #0E1526;
  --ph-ink-muted: #465166;
  --ph-ink-subtle: #5F6A80;
  --ph-ink-inverse: #F4F6FA;
  --ph-line: #D7DCE6;
  --ph-line-strong: #7A849A;
  --ph-brand: #2B3FD6;
  --ph-brand-hover: #2232B0;
  --ph-on-brand: #FFFFFF;
  --ph-brand-text: #2B3FD6;
  --ph-brand-tint: #E6E9FC;
  --ph-beacon: #F2A93B;
  --ph-beacon-mark: #C9780A;
  --ph-on-beacon: #0E1526;
  --ph-beacon-tint: #FDF1DC;
  --ph-beacon-text: #8A4B00;
  --ph-success: #0B6E85;
  --ph-success-tint: #E1F3F7;
  --ph-danger: #B42318;
  --ph-on-danger: #FFFFFF;
  --ph-danger-tint: #FCE8E6;
  --ph-warning: #8A5A00;
  --ph-warning-tint: #FFF4D6;
  --ph-focus-ring: #2B3FD6;
  --ph-shadow-1: 0 1px 2px rgba(14,21,38,0.06), 0 0 0 1px rgba(14,21,38,0.06);
  --ph-shadow-2: 0 1px 2px rgba(14,21,38,0.06), 0 8px 20px -6px rgba(43,63,214,0.16), 0 0 0 1px rgba(14,21,38,0.07);
  --ph-shadow-3: 0 2px 4px rgba(14,21,38,0.06), 0 18px 44px -10px rgba(14,21,38,0.24), 0 0 0 1px rgba(14,21,38,0.07);
  --ph-space-1: 4px;
  --ph-space-2: 8px;
  --ph-space-3: 12px;
  --ph-space-4: 16px;
  --ph-space-5: 20px;
  --ph-space-6: 24px;
  --ph-space-8: 32px;
  --ph-space-10: 40px;
  --ph-space-12: 48px;
  --ph-space-16: 64px;
  --ph-space-20: 80px;
  --ph-space-24: 96px;
  --ph-radius-xs: 4px;
  --ph-radius-sm: 6px;
  --ph-radius-md: 10px;
  --ph-radius-lg: 16px;
  --ph-radius-pill: 999px;
  --ph-control-sm: 36px;
  --ph-control-md: 44px;
  --ph-control-lg: 56px;
  --ph-content-max: 1200px;
  --ph-measure: 68ch;
  --ph-duration-instant: 80ms;
  --ph-duration-fast: 140ms;
  --ph-duration-base: 200ms;
  --ph-duration-slow: 320ms;
  --ph-ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ph-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ph-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ph-font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --ph-font-sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ph-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ph-ground: #0A0F1C;
    --ph-surface: #111829;
    --ph-surface-sunken: #070B15;
    --ph-surface-inverse: #E9EDF5;
    --ph-ink: #EDF0F7;
    --ph-ink-muted: #A8B1C4;
    --ph-ink-subtle: #8F99AE;
    --ph-ink-inverse: #0E1526;
    --ph-line: #233049;
    --ph-line-strong: #66728C;
    --ph-brand: #8B98FF;
    --ph-brand-hover: #A7B1FF;
    --ph-on-brand: #0A0F1C;
    --ph-brand-text: #A3AEFF;
    --ph-brand-tint: #1A2350;
    --ph-beacon: #F5B54A;
    --ph-beacon-mark: #F5B54A;
    --ph-on-beacon: #0E1526;
    --ph-beacon-tint: #3A2A10;
    --ph-beacon-text: #F5C26B;
    --ph-success: #5CCBE0;
    --ph-success-tint: #0B2A33;
    --ph-danger: #FF8F84;
    --ph-on-danger: #0A0F1C;
    --ph-danger-tint: #3A1512;
    --ph-warning: #F2C055;
    --ph-warning-tint: #33270B;
    --ph-focus-ring: #B8C0FF;
    --ph-shadow-1: 0 0 0 1px rgba(237,240,247,0.08), 0 1px 2px rgba(0,0,0,0.4);
    --ph-shadow-2: 0 0 0 1px rgba(237,240,247,0.10), 0 10px 28px -8px rgba(0,0,0,0.65);
    --ph-shadow-3: 0 0 0 1px rgba(237,240,247,0.12), 0 22px 52px -10px rgba(0,0,0,0.75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ph-ground: #0A0F1C;
  --ph-surface: #111829;
  --ph-surface-sunken: #070B15;
  --ph-surface-inverse: #E9EDF5;
  --ph-ink: #EDF0F7;
  --ph-ink-muted: #A8B1C4;
  --ph-ink-subtle: #8F99AE;
  --ph-ink-inverse: #0E1526;
  --ph-line: #233049;
  --ph-line-strong: #66728C;
  --ph-brand: #8B98FF;
  --ph-brand-hover: #A7B1FF;
  --ph-on-brand: #0A0F1C;
  --ph-brand-text: #A3AEFF;
  --ph-brand-tint: #1A2350;
  --ph-beacon: #F5B54A;
  --ph-beacon-mark: #F5B54A;
  --ph-on-beacon: #0E1526;
  --ph-beacon-tint: #3A2A10;
  --ph-beacon-text: #F5C26B;
  --ph-success: #5CCBE0;
  --ph-success-tint: #0B2A33;
  --ph-danger: #FF8F84;
  --ph-on-danger: #0A0F1C;
  --ph-danger-tint: #3A1512;
  --ph-warning: #F2C055;
  --ph-warning-tint: #33270B;
  --ph-focus-ring: #B8C0FF;
  --ph-shadow-1: 0 0 0 1px rgba(237,240,247,0.08), 0 1px 2px rgba(0,0,0,0.4);
  --ph-shadow-2: 0 0 0 1px rgba(237,240,247,0.10), 0 10px 28px -8px rgba(0,0,0,0.65);
  --ph-shadow-3: 0 0 0 1px rgba(237,240,247,0.12), 0 22px 52px -10px rgba(0,0,0,0.75);
  color-scheme: dark;
}

/* Type styles. Display sizes step down under 640px. */
.ph-t-display-xl { font-family: var(--ph-font-display); font-size: 56px; line-height: 60px; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.ph-t-display-lg { font-family: var(--ph-font-display); font-size: 44px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.ph-t-heading-1 { font-family: var(--ph-font-display); font-size: 36px; line-height: 42px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
.ph-t-heading-2 { font-family: var(--ph-font-display); font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.ph-t-heading-3 { font-family: var(--ph-font-sans); font-size: 20px; line-height: 28px; font-weight: 600; }
.ph-t-body-lg { font-family: var(--ph-font-sans); font-size: 18px; line-height: 28px; font-weight: 400; }
.ph-t-body { font-family: var(--ph-font-sans); font-size: 16px; line-height: 24px; font-weight: 400; }
.ph-t-body-sm { font-family: var(--ph-font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.ph-t-label { font-family: var(--ph-font-sans); font-size: 14px; line-height: 20px; font-weight: 500; }
.ph-t-button { font-family: var(--ph-font-sans); font-size: 15px; line-height: 20px; font-weight: 500; }
.ph-t-caption { font-family: var(--ph-font-sans); font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0.01em; }
.ph-t-price-lg { font-family: var(--ph-font-mono); font-size: 28px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.ph-t-price { font-family: var(--ph-font-mono); font-size: 16px; line-height: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ph-t-domain { font-family: var(--ph-font-mono); font-size: 18px; line-height: 26px; font-weight: 500; letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.ph-t-code { font-family: var(--ph-font-mono); font-size: 14px; line-height: 20px; font-weight: 400; font-variant-numeric: tabular-nums; }
.ph-t-eyebrow { font-family: var(--ph-font-mono); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .ph-t-display-xl { font-size: 40px; line-height: 44px; }
  .ph-t-display-lg { font-size: 34px; line-height: 40px; }
  .ph-t-heading-1 { font-size: 30px; line-height: 36px; }
}

/* One focus ring everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ph-focus-ring);
  outline-offset: 2px;
}

/* Honor the OS reduced-motion setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
