/*
 * AWH Design System
 *
 * This file is the shared visual contract for Web, Desktop and future mobile
 * surfaces. Components may adapt layout per platform, but they must consume
 * these semantic tokens instead of introducing a second product palette.
 */
:root {
  color-scheme: light;
  --awh-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --awh-canvas: #f7f8fb;
  --awh-rail: #ffffff;
  --awh-surface: #ffffff;
  --awh-surface-raised: #f2f4f7;
  --awh-surface-soft: #e9edf3;
  --awh-line: #d9dee7;
  --awh-line-soft: rgba(20, 32, 51, .08);
  --awh-text: #172033;
  --awh-muted: #667085;
  --awh-accent: #e96f19;
  --awh-accent-strong: #d95c0b;
  --awh-accent-ink: #ffffff;
  --awh-accent-soft: rgba(233, 111, 25, .10);
  --awh-success: #16855b;
  --awh-warning: #a9690d;
  --awh-danger: #c43d3d;
  --awh-radius-sm: 10px;
  --awh-radius-md: 14px;
  --awh-radius-lg: 20px;
  --awh-radius-xl: 26px;
  --awh-shadow-panel: 0 18px 48px rgba(0, 0, 0, .18);
  --awh-shadow-float: 0 24px 70px rgba(0, 0, 0, .3);
  --awh-space-1: 4px;
  --awh-space-2: 8px;
  --awh-space-3: 12px;
  --awh-space-4: 16px;
  --awh-space-5: 20px;
  --awh-space-6: 24px;
  --awh-space-7: 32px;
  --awh-space-8: 40px;
  --awh-touch-target: 44px;
  --awh-content-wide: 1180px;
  --awh-motion-fast: 140ms;
  --awh-motion-standard: 220ms;
  --awh-ease: cubic-bezier(.2, .8, .2, 1);

  /* Compatibility aliases for existing canonical component CSS. */
  --canvas: var(--awh-canvas);
  --bg: var(--awh-canvas);
  --rail: var(--awh-rail);
  --surface: var(--awh-surface);
  --panel: var(--awh-surface);
  --surface-raised: var(--awh-surface-raised);
  --panel-2: var(--awh-surface-raised);
  --panel2: var(--awh-surface-raised);
  --surface-soft: var(--awh-surface-soft);
  --panel-3: var(--awh-surface-soft);
  --line: var(--awh-line);
  --line-soft: var(--awh-line-soft);
  --text: var(--awh-text);
  --muted: var(--awh-muted);
  --accent: var(--awh-accent);
  --accent-strong: var(--awh-accent-strong);
  --accent-ink: var(--awh-accent-ink);
  --accent-soft: var(--awh-accent-soft);
  --good: var(--awh-success);
  --warn: var(--awh-warning);
  --danger: var(--awh-danger);
  --bad: var(--awh-danger);
  --radius: var(--awh-radius-lg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { font-family: var(--awh-font-sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, textarea, select):not(:disabled) {
  transition: color var(--awh-motion-fast) var(--awh-ease), background-color var(--awh-motion-fast) var(--awh-ease), border-color var(--awh-motion-fast) var(--awh-ease), box-shadow var(--awh-motion-fast) var(--awh-ease), transform var(--awh-motion-fast) var(--awh-ease);
}
:where(button, [role="button"]):not(:disabled):active { transform: translateY(1px); }
:where(button, a, input, textarea, select):focus-visible {
  outline: 2px solid var(--awh-accent-strong);
  outline-offset: 2px;
}

.awh-back-link {
  display: inline-flex;
  min-height: var(--awh-touch-target);
  align-items: center;
  gap: var(--awh-space-2);
  border: 1px solid var(--awh-line-soft);
  border-radius: var(--awh-radius-md);
  padding: 8px 12px;
  color: var(--awh-text);
  background: rgba(255, 255, 255, .035);
  text-decoration: none;
  white-space: nowrap;
}
.awh-back-link:hover { border-color: rgba(255, 138, 54, .32); background: var(--awh-accent-soft); }

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