/* MetrIQ Volt: "Deep Sea" design tokens (chosen 2026-11-04).
   Source of truth for the phone, laptop and website mockups. Midnight navy + safety yellow.
   Dark follows the device setting; put data-theme="light" / "dark" on <html> to force one. */

:root {
  /* Surfaces and text (dark) */
  --bg: #000814;        /* page */
  --s1: #081426;        /* card */
  --s2: #0E1D35;        /* raised / input */
  --s3: #162847;        /* pressed / track */
  --line: rgba(180, 210, 255, .08);
  --ink: #F0F4FA;
  --mute: #94A3BA;
  --faint: #5A6880;

  /* Brand */
  --navy: #001D3D;
  --navy-2: #003566;
  --yellow: #FFC300;
  --acc: #FFC300;                 /* accent fills, focus rings, active marks */
  --acc-text: #FFD23F;            /* small accent text on dark */
  --acc-ink: #001D3D;             /* text on yellow */
  --acc-soft: rgba(255, 195, 0, .13);
  --grad: linear-gradient(135deg, #FFE15A 0%, #FFC300 55%, #FFAA00 100%);   /* primary buttons */
  --hero: linear-gradient(150deg, #0A4A80 0%, #003566 50%, #001D3D 100%);   /* money hero / feature panels */
  --hero-ink: #FFFFFF;
  --glow: rgba(255, 195, 0, .26);
  --lift: inset 0 1px 0 rgba(255, 255, 255, .35);                           /* top highlight on gradient fills */

  /* Wordmark: "MetrIQ" blue, "Volt" yellow, plug icon yellow */
  --wm-metriq: #4C9BE8;
  --wm-volt: #FFC300;

  /* Status colours: same meaning in every theme; always paired with a label */
  --st-quoted: #82B1FF;
  --st-progress: #F6C96A;
  --st-done: #55D9CE;
  --st-invoiced: #C5ADFF;
  --st-overdue: #FF9B9B;
  --st-paid: #77DEA3;

  /* Type */
  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Motion vocabulary (see research-app-appeal report §4) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-std: cubic-bezier(.2, .8, .2, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  --t-press: 80ms;
  --t-tab: 200ms;
  --t-page: 240ms;
  --t-sheet: 260ms;

  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* Light */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #EEF2F7; --s1: #FFFFFF; --s2: #E1E7EF; --s3: #D0D9E5; --line: rgba(0, 29, 61, .09);
    --ink: #001D3D; --mute: #4B5D75; --faint: #8593A8;
    --acc: #003566; --acc-text: #003566; --acc-soft: rgba(0, 53, 102, .09); --glow: rgba(230, 170, 0, .30);
    --wm-metriq: #003566; --wm-volt: #E8A800;
    --st-quoted: #2454B8; --st-progress: #875500; --st-done: #006C65; --st-invoiced: #6B3BB0; --st-overdue: #B42332; --st-paid: #176A3D;
    --shadow: 0 8px 24px rgba(0, 29, 61, .08);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #EEF2F7; --s1: #FFFFFF; --s2: #E1E7EF; --s3: #D0D9E5; --line: rgba(0, 29, 61, .09);
  --ink: #001D3D; --mute: #4B5D75; --faint: #8593A8;
  --acc: #003566; --acc-text: #003566; --acc-soft: rgba(0, 53, 102, .09); --glow: rgba(230, 170, 0, .30);
  --wm-metriq: #003566; --wm-volt: #E8A800;
  --st-quoted: #2454B8; --st-progress: #875500; --st-done: #006C65; --st-invoiced: #6B3BB0; --st-overdue: #B42332; --st-paid: #176A3D;
  --shadow: 0 8px 24px rgba(0, 29, 61, .08);
  color-scheme: light;
}

/* Customer documents (quote, invoice, circuit pack) are always "paper": white page, navy ink, yellow only as a thin rule */
.doc {
  --doc-paper: #FFFFFF; --doc-ink: #0B1B2E; --doc-mute: #5B6B80; --doc-line: #D9E0EA;
  --doc-navy: #001D3D; --doc-band: #F3F6FA; --doc-yellow: #FFC300;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
/* Shared type preference changes fonts only: layout widths and PDF drawing stay intact. */
:root { --text-scale:1; }
input::placeholder, textarea::placeholder { color:var(--faint) !important; color:color-mix(in srgb, var(--faint) 72%, transparent) !important; opacity:1 !important; font-weight:400 !important; }
@media (pointer:coarse), (max-width:759px) {
  html body input, html body textarea, html body select { font-size:max(16px, calc(16px * var(--text-scale))) !important; }
}
html:is([data-text-size="large"], [data-text-size="extra-large"]) body button { height:auto !important; white-space:normal; }
html[data-text-size] :is(.qc-line-name, .qc-text, .qc-job-title, .qc-client) { overflow-wrap:anywhere; }
@media print { :root { --text-scale:1 !important; } }

/* UI references only; customer paper uses its own document tokens. */
:root { --ref-ink: var(--acc-text); --ref-bg: transparent; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --ref-ink: #001D3D; --ref-bg: #FFC300; }
}
:root[data-theme="light"] { --ref-ink: #001D3D; --ref-bg: #FFC300; }
