/* ==========================================================================
   МастерБот — theme «warm» (default). ONE THEME = ONE FILE OF TOKENS.
   Every colour, font, weight, size, radius, spacing step, shadow and the focus
   ring of the site and the app pages is defined here and nowhere else.
   Components use var(--token) only (test/theme-tokens.test.js enforces it).

   A second theme copies this file, keeps every name, changes the values and
   scopes them with :root[data-theme="<name>"] — see docs/landing/README.md.
   Values are the approved warm-white design (masterbot-design/README.md, token
   table). Two values were moved for WCAG contrast; they are marked «moved».
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- grounds and surfaces ---- */
  --color-ground: #F7F5F2;          /* page background */
  --color-surface: #FFFFFF;         /* cards, inputs, white bands */
  --color-panel: #F1EDE8;           /* table head, tab strip, quiet panels */
  --color-chat-panel: #ECE7E0;      /* the chat area behind the bubbles */

  /* ---- text ---- */
  --color-ink: #201A16;             /* headings, labels, strong text, wordmark */
  --color-text: #4A423B;            /* body copy */
  --color-muted: #6B6259;           /* secondary copy, captions, footer */
  --color-faint: #74695F;           /* row numbers, tiny meta. moved from #7A7067 (4.08:1 on highlight) */

  /* ---- lines ---- */
  --color-line: #E2DCD4;            /* separators, card borders (decorative) */
  --color-line-subtle: #ECE7E0;     /* rows inside a card */
  --color-control-border: #958B81;  /* input, chip and checkbox borders. moved from #CFC7BD (1.67:1, UI needs 3:1) */

  /* ---- accent and actions ---- */
  --color-accent: #DE4A22;          /* step bars, selected border, active tab, dots — never text */
  --color-primary: #C43C16;         /* primary button, big numerals */
  --color-primary-hover: #A83210;   /* primary button hover */
  --color-primary-active: #7E2409;  /* primary button pressed */
  --color-on-primary: #FFFFFF;      /* text on the primary button */
  --color-link: #A83210;            /* links in copy */
  --color-link-hover: #7E2409;      /* link hover */
  --color-highlight: #FFE7DC;       /* highlighted row, tag, security note, selected chip */
  --color-on-highlight: #7E2409;    /* text on the highlight that is not ink (tags) */

  /* ---- status: text / background / border ---- */
  --color-success: #245C39;
  --color-success-bg: #EDF5EF;
  --color-success-border: #BCD9C6;
  --color-warning: #7A5A12;
  --color-warning-bg: #FDF0DC;
  --color-warning-border: #E8D6A6;
  --color-warning-mark: #C99A2E;    /* warning bar / dot, never text */
  --color-error: #A3220F;
  --color-error-bg: #FDECE7;
  --color-error-border: #F0B9A8;

  /* ---- dark block (price band, help contact band) ---- */
  --color-dark: #201A16;            /* the block ground */
  --color-on-dark: #FFFFFF;         /* headings and the white button on the dark block */
  --color-on-dark-text: #E6E0D8;    /* body copy on the dark block */
  --color-on-dark-muted: #D9D2CA;   /* secondary copy on the dark block */
  --color-on-dark-line: #8C8177;    /* bullets, outlines and rules on the dark block */
  --color-on-dark-accent: #F0623A;  /* accent marks on the dark block, never text */

  /* ---- chat ---- */
  --color-bubble-client: #201A16;   /* the client's message */
  --color-on-bubble-client: #FFFFFF;
  --color-bubble-agent: #FFFFFF;    /* the agent's answer */
  --color-on-bubble-agent: #201A16;

  /* ---- focus, selection, overlays ---- */
  --color-focus: #201A16;           /* focus ring on light grounds */
  --color-focus-on-dark: #FFFFFF;   /* focus ring on the dark block */
  --color-selection: rgba(222, 74, 34, 0.22);
  --color-overlay: rgba(32, 26, 22, 0.5);
  --focus-ring-width: 3px;
  --focus-ring-offset: 3px;

  /* ---- shadows ---- */
  --shadow-card: 0 18px 40px -24px rgba(32, 26, 22, 0.45);   /* the raised data card */
  --shadow-bar: 0 -10px 26px rgba(32, 26, 22, 0.1);          /* sticky action bar */

  /* ---- type ---- */
  --font-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --size-display: clamp(32px, 4.7vw, 62px);   /* landing h1 */
  --size-title: clamp(30px, 4vw, 52px);       /* help and 404 h1 */
  --size-h1: clamp(30px, 3.4vw, 46px);        /* documents and app pages h1 */
  --size-price: clamp(30px, 3.6vw, 48px);     /* the price headline */
  --size-h2: clamp(26px, 2.8vw, 36px);        /* section headings */
  --size-h2-sm: clamp(24px, 2.6vw, 32px);     /* article headings */
  --size-h3: 21px;                            /* card and step titles */
  --size-lead: 19px;                          /* lead paragraphs, small headings */
  --size-body: 17px;                          /* body copy */
  --size-ui: 16px;                            /* nav, inputs, buttons, data rows */
  --size-small: 15px;                         /* chips, notes, footer */
  --size-caption: 14px;                       /* captions, descriptor, source lines */
  --size-micro: 13px;                         /* row numbers */
  --size-numeral: 44px;                       /* big step numbers */
  --size-button-lg: 18px;                     /* main buttons */
  --leading-tight: 1.05;
  --leading-heading: 1.15;
  --leading-snug: 1.35;
  --leading-body: 1.5;
  --leading-prose: 1.55;
  --tracking-display: -0.025em;
  --tracking-heading: -0.02em;

  /* ---- radii ---- */
  --radius-card: 6px;
  --radius-control: 8px;
  --radius-button-sm: 10px;
  --radius-button: 12px;
  --radius-tag: 14px;
  --radius-pill: 22px;
  --radius-bubble: 16px;
  --radius-bubble-tail: 4px;
  --radius-round: 50%;

  /* ---- spacing and sizes ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --page-max: 1180px;                         /* content width */
  --gutter: clamp(20px, 4vw, 48px);           /* page side padding */
  --section-y: clamp(44px, 6vw, 84px);        /* vertical padding of a band */
  --bar-width: 4px;                           /* accent / step bars */
  --selected-width: 2px;                      /* selected-state border */
  --tap-min: 44px;                            /* smallest touch target */
  --control-height: 48px;                     /* inputs and small buttons */
  --button-height: 56px;                      /* main buttons */
}

@media (max-width: 760px) {
  :root {
    --size-h3: 20px;
    --size-lead: 17px;
    --size-body: 16px;
    --size-numeral: 40px;
  }
}
