/* powerbuild.ing design tokens: bridge onto the jameslcowan system (/platform.css) */
/* Every legacy semantic var re-points at a --theme-* slot from /platform.css, so the
   site follows system light/dark plus the html[data-theme] override automatically:
   this file defines NO theme blocks of its own. Brand identity is the crimson
   accent ramp below. Fonts are the jameslcowan SF system stacks. */

:root {
  /* Brand accent ramp (#ef4444 at the 500 slot) overriding the platform scale */
  --accent-50: #fef2f2;
  --accent-100: #fee2e2;
  --accent-200: #fecaca;
  --accent-300: #fca5a5;
  --accent-400: #f87171;
  --accent-500: #ef4444;
  --accent-600: #c81e1e;
  --accent-700: #a31515;
  --accent-800: #7f1d1d;
  --accent-900: #591313;
  --accent-950: #380c0c;

  /* Brand-derived theme slots the platform hard-codes to the jameslcowan blue */
  --theme-focus-ring: color-mix(in srgb, var(--accent-500) 42%, transparent);
  --light-border-accent: var(--accent-500);
  --dark-border-accent: var(--accent-400);

  /* Legacy brand names -> accent slots */
  --pl-plate: var(--accent-500);
  --pl-plate-dim: var(--accent-600);

  /* Legacy surface names -> jameslcowan palette */
  --pl-chalk: var(--light-bg);
  --pl-iron: var(--dark-bg);
  --pl-steel: var(--dark-bg-subtle);
  --pl-rack: var(--dark-bg-elevated);
  --pl-rack-up: var(--dark-bg-raised);

  /* Semantic bridge -> --theme-* (theme switching handled by /platform.css) */
  --bg: var(--theme-bg);
  --bg-elevated: var(--theme-bg-elevated);
  --panel: var(--theme-bg-elevated);
  --panel2: var(--theme-bg-subtle);
  --text: var(--theme-color);
  --text-strong: var(--theme-color);
  --muted: var(--theme-color-dim);
  --border: var(--theme-border);
  --border2: var(--theme-border-strong);
  --ghost-border: var(--theme-border-strong);

  --accent: var(--accent-500);
  --accent-muted: color-mix(in srgb, var(--accent-500) 16%, transparent);
  --danger: #dc2626;
  --success: #16a34a;
  --focus-ring: var(--theme-focus-ring);

  --shadow: 0 4px 24px var(--theme-shadow-md);
  --shadow-lg: 0 14px 40px var(--theme-shadow-lg);

  --sb-track: var(--theme-bg);
  --sb-thumb: var(--theme-bg-soft);
  --sb-thumb-hover: var(--theme-bg-strong);

  /* jameslcowan fonts (SF system stacks from /platform.css); zero webfonts.
     --font-display comes straight from the platform; the old fallback slots
     resolve to the same stacks so the fonts-loaded gate is moot. */
  --font-display: "Share Tech", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif; /* brand display face (headings), body stays SF */
  --sans: var(--font-body);
  --mono: var(--font-mono);
  --font-wordmark: "Share Tech", var(--font-display); /* wordmark identity face (logo only) */
  --font-display-fallback: var(--font-display);
  --font-sans-fallback: var(--font-body);

  --topbar-h: 52px;
  --weekbar-h: auto;
}

/* Forced theme keeps native UI (form controls, scrollbars) in step */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* Mobile touch hygiene. Keep pinch zoom, drop the browser double-tap-to-zoom
   gesture and its 300ms click delay, and remove the grey/blue tap-highlight flash.
   A 16px input floor on mobile stops iOS Safari zooming the page on field focus. */
html {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a, button, input, textarea, select, label, summary,
[role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 800px) {
  input, textarea, select { font-size: max(16px, 1em); }
}
