/* Apple HIG, light: clarity, deference, depth. Calm canvas, one accent, readable type. */
:root {
  color-scheme: light;

  --canvas: #f5f5f7;
  --canvas-deep: #ebebf0;

  --label: #1d1d1f;
  --label-secondary: #3a3a3c;
  --label-tertiary: #6e6e73;
  --label-quaternary: rgba(60, 60, 67, 0.32);

  --fill: rgba(120, 120, 128, 0.16);
  --fill-secondary: rgba(120, 120, 128, 0.1);
  --fill-tertiary: rgba(120, 120, 128, 0.08);

  --glass: rgba(255, 255, 255, 0.82);
  --glass-thick: rgba(255, 255, 255, 0.96);
  --glass-stroke: rgba(0, 0, 0, 0.08);
  --separator: rgba(60, 60, 67, 0.14);

  --surface: #ffffff;
  --field: #f2f2f7;
  --group: rgba(120, 120, 128, 0.08);
  --hover: rgba(0, 0, 0, 0.05);
  --sticky: rgba(255, 255, 255, 0.92);
  --scrim: rgba(29, 29, 31, 0.32);

  --accent: #0c6e66;
  --accent-bright: #084e49;
  --accent-ink: #ffffff;
  --accent-deep: #e5f4f2;

  --gold: #e4c27a;
  --gold-ink: #3d2e10;
  --destructive: #c41e16;

  --ok-bg: #e7f6ef;
  --ok-ink: #0d5c38;
  --warn-bg: #fff6e4;
  --warn-ink: #7a4e00;
  --hard-bg: #fdecea;
  --hard-ink: #8f1d18;

  --shadow-1: 0 1px 1px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-node: 0 8px 18px rgba(12, 80, 74, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.75);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --text-title1: 1.75rem;
  --text-title2: 1.375rem;
  --text-title3: 1.25rem;
  --text-headline: 1.0625rem;
  --text-body: 1.0625rem;
  --text-callout: 1rem;
  --text-subhead: 0.9375rem;
  --text-footnote: 0.8125rem;
  --text-caption: 0.75rem;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.22, 1.12, 0.36, 1);
  --dur-fast: 200ms;
  --dur: 280ms;
  --dur-sheet: 320ms;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 980px;

  --persona-w: 304px;
  --stage-w: 188px;
  --stick-top: 78px;
  --grid-pad-top: 86px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--label);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.35;
  letter-spacing: -0.011em;
  background-color: var(--canvas);
  background-image: url("../assets/stipple.svg");
  background-attachment: fixed;
  background-size: 144px 144px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }

button { cursor: pointer; }

button:disabled { cursor: not-allowed; opacity: 0.38; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: #d3efe9; color: #08332f; }

::placeholder { color: var(--label-tertiary); }

@media (max-width: 800px) {
  :root {
    --persona-w: 236px;
    --stage-w: 164px;
    --stick-top: 0px;
    --grid-pad-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 1ms;
    --dur: 160ms;
    --dur-sheet: 160ms;
    --ease: linear;
    --spring: linear;
  }
}

@media (prefers-contrast: more) {
  :root {
    --label-secondary: #1d1d1f;
    --label-tertiary: #3a3a3c;
    --separator: rgba(0, 0, 0, 0.36);
    --glass-stroke: rgba(0, 0, 0, 0.4);
    --accent: #08564f;
  }
}
