/* ══════════════════════════════════════════════════════════════════════════
   GENERATED FILE — DO NOT EDIT.

   Copied verbatim from apps/fe/index.html, between the SHARED-DESIGN-SYSTEM
   markers, by scripts/sync-design-system.mjs.

   To change a token or a primitive, edit apps/fe/index.html and re-run, from
   apps/public:
       pnpm sync:design

   Editing THIS file instead forks Dynamo's design system, and CI will fail the
   next build (check:design) rather than let that ship.

   ⚠️ Do NOT add responsive rules here. They would be overwritten on the next
   sync, and they belong to one app: the authoring app is pinned to
   <meta viewport width=1280> and must not start reflowing by accident.
   App-specific CSS lives in that app's own src/styles/.

   Target: apps/public/public/design-system.css
   ══════════════════════════════════════════════════════════════════════════ */

/* ─── Design tokens ───────────────────────────────────────────────── */
  :root {
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    /* Light theme (default) */
    --bg: #f8fafc;            /* slate-50 */
    --bg-deep: #f1f5f9;       /* slate-100 */
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-raised: #ffffff;
    --surface-inset: #f1f5f9;
    --border: #e2e8f0;        /* slate-200 */
    --border-strong: #cbd5e1; /* slate-300 */
    --border-faint: #eef2f6;
    --text: #0f172a;          /* slate-900 */
    --text-strong: #020617;   /* slate-950 */
    --text-muted: #64748b;    /* slate-500 */
    --text-faint: #74829a;    /* slate-450 (custom) — bumped from slate-400 to clear 3:1 UI contrast */
    --text-on-accent: #ffffff;

    --accent: #3b82f6;        /* blue-500 */
    --accent-hover: #2563eb;  /* blue-600 */
    --accent-bg: #eff6ff;     /* blue-50 */
    --accent-border: #bfdbfe; /* blue-200 */
    --accent-text: #1d4ed8;   /* blue-700 */

    --success: #10b981;       /* emerald-500 */
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning: #f59e0b;       /* amber-500 */
    --warning-bg: #fffbeb;
    --warning-text: #b45309;
    --error: #f43f5e;         /* rose-500 */
    --error-bg: #fff1f2;
    --error-text: #be123c;
    --ai: #6366f1;            /* indigo-500 for AI accent */
    --ai-bg: #eef2ff;
    --ai-text: #4338ca;

    --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-lg: 0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
    --shadow-xl: 0 12px 32px rgba(15,23,42,0.12), 0 4px 8px rgba(15,23,42,0.06);

    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;

    /* Density */
    --density: 1;
    --row-h: calc(32px * var(--density));
    --pad: calc(12px * var(--density));
    --gap: calc(8px * var(--density));
  }

  .dark {
    --bg: #020617;            /* slate-950 */
    --bg-deep: #0f172a;
    --surface: #0f172a;       /* slate-900 */
    --surface-2: #1e293b;     /* slate-800 */
    --surface-raised: #1e293b;
    --surface-inset: #0f172a;
    --border: #1e293b;        /* slate-800 */
    --border-strong: #334155; /* slate-700 */
    --border-faint: #172033;
    --text: #f1f5f9;          /* slate-100 */
    --text-strong: #f8fafc;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --text-on-accent: #ffffff;

    --accent: #60a5fa;        /* blue-400 in dark */
    --accent-hover: #3b82f6;
    --accent-bg: #172554;     /* blue-950 */
    --accent-border: #1e3a8a;
    --accent-text: #93c5fd;

    --success-bg: #022c22;
    --success-text: #6ee7b7;
    --warning-bg: #271404;
    --warning-text: #fbbf24;
    --error-bg: #2d0612;
    --error-text: #fda4af;
    --ai-bg: #1e1b4b;
    --ai-text: #a5b4fc;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.6);
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; }
  body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
  }
  button { font-family: inherit; }
  input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid var(--bg); }
  ::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

  /* ─── Reusable utilities ──────────────────────────────────────────── */
  .focusable:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
  .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Button base */
  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 13px; font-weight: 500;
    cursor: default;
    transition: background 150ms, border-color 150ms, color 150ms;
    white-space: nowrap;
  }
  /* ── A DISABLED CONTROL MUST NOT LIGHT UP ON HOVER ────────────────────────
     Omar, 2026-08-19, on the Reviewer's greyed Save button: *"remove also the roll
     over chnage status as it seems that once the Reviewer roll over the chnage of
     the status button could lead to believe that is clickable"*. He is right, and
     `disabled` alone did not do it: `.btn:disabled` sets only `opacity`, so the
     four hover rules below still repainted the background and border of a button
     that cannot be pressed. A control that responds to the pointer is claiming it
     is pressable — the same lie as a button that does nothing
     (`feedback_no_false_affordance_toggles`, `feedback_honest_gates_over_standins`).

     Fixed with `:not(:disabled)` on every hover rule rather than by resetting the
     appearance afterwards: the resting background differs per variant (surface,
     accent, transparent), so one reset rule could not restore all four correctly.
     All four gain the same specificity, so `.btn.primary` still beats `.btn`.

     ★ NOT `pointer-events: none`, which is the tidier-looking fix and would have
     silently removed the `title` tooltip that explains WHY the button is disabled
     — i.e. it would have undone the fix from PR #159 in the same stroke
     (`feedback_a_fix_can_trade_one_loss_for_a_worse_one`,
     `feedback_a_greyed_control_is_not_a_missing_capability`). The tooltip needs the
     element to receive pointer events; hover COLOUR is what had to go, not hover.

     This is a stylesheet change, so it reaches all 34 disabled buttons and 3
     disabled fields in the app, not just Save. Guarded by
     `fe-disabled-controls.test.ts`, which derives which classes need the exclusion
     from the JSX rather than from a list here. */
  .btn:not(:disabled):hover { background: var(--surface-inset); border-color: var(--text-faint); }
  .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
  .btn.primary:not(:disabled):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn.ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
  .btn.ghost:not(:disabled):hover { background: var(--surface-inset); color: var(--text); }
  .btn.danger { color: var(--error-text); border-color: var(--border-strong); }
  .btn.danger:not(:disabled):hover { background: var(--error-bg); border-color: var(--error); }
  .btn.sm { height: 26px; padding: 0 9px; font-size: 12px; gap: 4px; }
  .btn.lg { height: 36px; padding: 0 16px; font-size: 14px; }
  .btn:disabled { opacity: 0.5; }

  /* Field base */
  .field {
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    font-size: 13px;
    outline: none;
    transition: border-color 150ms, box-shadow 150ms;
  }
  .field:not(:disabled):hover { border-color: var(--text-faint); }
  .field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
  textarea.field { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; }

  /* Slider — tokenised range input. Track fills to --pct with the accent;
     reused anywhere a 0–100 value is set (pass mark, opacity, etc.). Set
     `style={{ '--pct': value + '%' }}` on the element to drive the fill. */
  input[type="range"].slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 16px; margin: 0; padding: 0;
    background: transparent; cursor: default;
  }
  input[type="range"].slider::-webkit-slider-runnable-track {
    height: 5px; border-radius: 999px;
    background: linear-gradient(to right,
      var(--accent) 0 var(--pct, 0%), var(--border-strong) var(--pct, 0%) 100%);
  }
  input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; margin-top: -4.5px;
    border-radius: 50%; background: var(--surface);
    border: 2px solid var(--accent); box-shadow: var(--shadow-sm);
    transition: box-shadow 120ms;
  }
  input[type="range"].slider::-moz-range-track {
    height: 5px; border-radius: 999px; background: var(--border-strong);
  }
  input[type="range"].slider::-moz-range-progress {
    height: 5px; border-radius: 999px; background: var(--accent);
  }
  input[type="range"].slider::-moz-range-thumb {
    width: 14px; height: 14px; border: 2px solid var(--accent);
    background: var(--surface); border-radius: 50%; box-shadow: var(--shadow-sm);
  }
  input[type="range"].slider:focus { outline: none; }
  input[type="range"].slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-bg); }
  input[type="range"].slider:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent-bg); }
  input[type="range"].slider:disabled { opacity: 0.45; }
  input[type="range"].slider:disabled::-webkit-slider-runnable-track {
    background: linear-gradient(to right,
      var(--border-strong) 0 var(--pct, 0%), var(--border) var(--pct, 0%) 100%);
  }

  /* Elegant <select> — strip native chrome, render a soft chevron in slate-500. */
  .select-elegant {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: default;
  }
  .dark .select-elegant {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  }

  /* Pills */
  .pill {
    display: inline-flex; align-items: center; gap: 4px;
    height: 20px; padding: 0 7px;
    border-radius: 4px;
    font-size: 11px; font-weight: 500;
    background: var(--surface-inset);
    color: var(--text-muted);
    border: 1px solid var(--border);
    line-height: 1;
  }
  .pill.accepted { background: var(--success-bg); color: var(--success-text); border-color: transparent; }
  .pill.proposed { background: var(--accent-bg); color: var(--accent-text); border-color: transparent; }
  .pill.issues   { background: var(--warning-bg); color: var(--warning-text); border-color: transparent; }
  .pill.error    { background: var(--error-bg); color: var(--error-text); border-color: transparent; }
  .pill.pending  { background: var(--surface-inset); color: var(--text-muted); }
  .pill.ai       { background: var(--ai-bg); color: var(--ai-text); border-color: transparent; }
  .pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 6px; }

  .chip {
    display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 11px; font-weight: 500;
    background: var(--surface-inset);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
  }

  /* Cards */
  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }

  /* Kbd */
  @keyframes spin { to { transform: rotate(360deg); } }
  .spin { animation: spin 1.2s linear infinite; transform-origin: 50% 50%; }
  @keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
  .shimmer {
    background: linear-gradient(90deg, var(--surface-inset) 0%, var(--border) 50%, var(--surface-inset) 100%);
    background-size: 200% 100%; animation: shimmer 1.8s ease-in-out infinite;
  }
  @keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  .slide-in { animation: slideInRight 200ms ease-out; }
