/* Desket design tokens — "Simple", phone-first, in the Desket brand (navy, coral, pale blue)
   White pages and header, navy text, one coral button per screen, pale blue only for answer panels and
   price-list thumbnails, a tab bar on phones, body text 17 px, two font families (Outfit and Inter), no shadows.
   Brand colours from the Desket brand manual (May 2022), under decisions D-B1 to D-B9 (confirmed 27 Oct 2026),
   D-B10 to D-B16 (confirmed 28 Oct 2026, desket-web PR #2) and D-B17 to D-B20 (confirmed 28 Oct 2026 when the
   owner merged the simple redesign, desket-web PR #3). Coral buttons (D-B15) and the darker evidence colours
   (D-B16) stay. The navy-2, navy-3, navy-soft, coral-soft and coral-on-navy colours are kept for share images only.
   The site copies this file to src/styles/tokens.css in desket-web; change this file first, then copy it there.
   Components never use raw hex; they use these variables (or the Tailwind theme generated from them). */

:root {
  /* Surfaces and text */
  --dk-paper: #FFFFFF;          /* page */
  --dk-paper-2: #F3F6FB;        /* table headers, the footer */
  --dk-mist: #F5F8FC;           /* input wells */
  --dk-line: #D3DCE9;           /* rules, borders */
  --dk-line-2: #E4EAF3;         /* hairlines inside cards */
  --dk-ink: #0A0B0B;            /* body text (brand black) */
  --dk-ink-2: #4B5A6E;          /* secondary text, captions, n/window lines */
  --dk-ink-3: #7A8699;          /* placeholders, disabled */

  /* Brand: navy, coral, pale blue (brand manual, May 2022) */
  --dk-navy: #14304E;           /* logo, headings, links */
  --dk-navy-deep: #0E2238;      /* pressed */
  --dk-navy-2: #24466F;         /* share images and icons only */
  --dk-navy-3: #5C7697;         /* share-image confetti */
  --dk-navy-soft: #B9CBE6;      /* secondary text on navy share images (7.3:1) */
  --dk-coral: #E16146;          /* logo swoosh, the active tab mark, the buyer's-own-price dot, text of 24 px and over */
  --dk-coral-deep: #C2462D;     /* primary buttons (white text 4.99:1, D-B15), small coral text on paper */
  --dk-coral-soft: #F3B4A5;     /* share-image confetti */
  --dk-coral-on-navy: #F08A74;  /* coral text on navy share images (5.5:1) */
  --dk-sky: #DDE7F6;            /* pale blue: price band fill, selected toggles */
  --dk-sky-2: #EBF1FA;          /* lighter pale blue: answer panels, drawing thumbnails */
  --dk-action: #14304E;         /* links, secondary buttons, active tab, focus */
  --dk-action-deep: #0E2238;    /* pressed */
  --dk-action-bg: #DDE7F6;      /* selected rows, info panels */
  --dk-on-action: #FFFFFF;      /* text on navy */
  --dk-cta: #C2462D;            /* one primary button per view */
  --dk-cta-deep: #A93A23;       /* pressed */
  --dk-on-cta: #FFFFFF;
  --dk-head: #14304E;           /* headings */
  --dk-accent-text: #C2462D;    /* small coral text on paper */

  /* Drawings: Desket's own generic furniture (D-B11); never behind a number */
  --dk-wood: #C89B6D;
  --dk-wood-2: #A97C50;
  --dk-foam: #F2E6C4;
  --dk-dw-1: #2E5280;           /* upholstery, shutters */
  --dk-dw-2: #14304E;           /* frames, structure */
  --dk-dw-3: #7D93B2;           /* details, lofts */
  --dk-dw-accent: #E16146;      /* one coral object per drawing */
  --dk-dw-light: #FFFFFF;       /* pillows, paper */
  --dk-dw-pane: #EBF1FA;        /* backsplash, plan floor */
  --dk-dw-shadow: rgb(20 48 78 / 0.13);

  /* Evidence labels — colour + shape + text, never colour alone (D-B8, D-B16) */
  --dk-ev-checked: #187435;     /* Document-checked, Independently measured/tested, Seller-confirmed (outline) */
  --dk-ev-checked-bg: #E7F5EC;
  --dk-ev-stated: #8A6100;      /* Seller-stated, Owner-reported */
  --dk-ev-stated-bg: #FFF4D6;
  --dk-ev-missing: #62666F;     /* Not disclosed, Stale, Insufficient evidence */
  --dk-ev-missing-bg: #EEEFF1;
  --dk-flag: #B42318;           /* red flag, payment risk, material risk */
  --dk-flag-bg: #FBEAE7;

  /* Percentile band colouring (rate index), light tints only */
  --dk-pct-low: #E7F5EC;        /* at or under p25 */
  --dk-pct-mid: #FFF9E6;        /* p25–p75 */
  --dk-pct-high: #FBEAE7;       /* over p75 */

  /* Type */
  --dk-font-ui: "Inter", "Noto Sans", "Noto Sans Malayalam", system-ui, sans-serif;   /* text and numbers (tabular digits) */
  --dk-font-head: "Outfit", "Noto Sans Malayalam", system-ui, sans-serif;  /* headings; web stand-in for Product Sans (D-B5) */
  --dk-font-ml: "Noto Sans Malayalam", "Inter", system-ui, sans-serif;
  --dk-text-h1: 32px;           /* page title, Outfit 700; the home headline is larger */
  --dk-text-h1-wide: 44px;
  --dk-text-h2: 24px;           /* section, 700 */
  --dk-text-h3: 19px;           /* sub-section, 600 */
  --dk-text-body: 17px;
  --dk-text-small: 15px;        /* captions, n/window lines */
  --dk-text-amount: 20px;       /* ₹ and mm, tabular digits, 600 */
  --dk-text-min: 14px;          /* chips and tab labels; nothing smaller */
  --dk-leading: 1.6;
  --dk-leading-ml: 1.65;        /* Malayalam needs more */

  /* Space (8-step) */
  --dk-s1: 4px; --dk-s2: 8px; --dk-s3: 12px; --dk-s4: 16px; --dk-s5: 24px; --dk-s6: 32px; --dk-s7: 48px; --dk-s8: 64px;
  --dk-gutter: 16px;
  --dk-measure: 68ch;           /* max line length for prose */
  --dk-container: 1160px;

  /* Shape and depth (D-B12, D-B20) */
  --dk-radius: 12px;            /* inputs, thumbnails */
  --dk-radius-card: 16px;       /* panels */
  --dk-radius-lg: 20px;         /* result panels */
  --dk-radius-chip: 999px;      /* chips and buttons */
  --dk-border: 1px;
  --dk-border-strong: 2px;      /* flagged rows, selected cards */

  /* Size */
  --dk-tap: 48px;
  --dk-row: 44px;               /* table rows */
  --dk-topbar: 60px;
  --dk-tabbar: 64px;            /* the tab bar on phones (D-B18) */

  /* Motion */
  --dk-fast: 150ms;
  --dk-sheet: 240ms;
  --dk-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Focus */
  --dk-focus: 3px solid var(--dk-action);
  --dk-focus-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dk-fast: 0ms; --dk-sheet: 0ms; }
}

/* Dark mode: opt-in only ([data-theme="dark"]); not auto in v1 */
:root[data-theme="dark"] {
  --dk-paper: #0B1626;          /* deep navy */
  --dk-paper-2: #12223A;
  --dk-mist: #10203A;
  --dk-line: #24364F;
  --dk-line-2: #1C2E47;
  --dk-ink: #ECEFF4;
  --dk-ink-2: #A9B4C4;
  --dk-ink-3: #7F8BA0;
  --dk-sky: #16294A;
  --dk-sky-2: #12223A;
  --dk-action: #DDE7F6;         /* pale blue actions with navy text */
  --dk-action-deep: #C5D4EC;
  --dk-action-bg: #16294A;
  --dk-on-action: #14304E;
  --dk-head: #DDE7F6;
  --dk-accent-text: #F08A74;    /* coral lifted for dark backgrounds */
  --dk-ev-checked: #5CC27E;
  --dk-ev-checked-bg: #0F2A18;
  --dk-ev-stated: #E0B44A;
  --dk-ev-stated-bg: #2B2208;
  --dk-ev-missing: #A3A8B0;
  --dk-ev-missing-bg: #20232A;
  --dk-flag: #F2877B;
  --dk-flag-bg: #2E120E;
  --dk-pct-low: #0F2A18; --dk-pct-mid: #2B2208; --dk-pct-high: #2E120E;
}

/* Base */
html { background: var(--dk-paper); color: var(--dk-ink); font-family: var(--dk-font-ui); line-height: var(--dk-leading); }
body { margin: 0; font-size: var(--dk-text-body); -webkit-text-size-adjust: 100%; }
:lang(ml) { font-family: var(--dk-font-ml); line-height: var(--dk-leading-ml); }
.amount, .measure, .num { font-variant-numeric: tabular-nums; }
code { font-family: ui-monospace, monospace; }
h1, h2, h3 { font-family: var(--dk-font-head); color: var(--dk-head); }
h1 { font-size: var(--dk-text-h1); font-weight: 700; }
@media (min-width: 900px) { h1 { font-size: var(--dk-text-h1-wide); } }
h2 { font-size: var(--dk-text-h2); font-weight: 700; }
h3 { font-size: var(--dk-text-h3); font-weight: 600; }
a { color: var(--dk-action); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, a, [role="button"] { touch-action: manipulation; }
:focus-visible { outline: var(--dk-focus); outline-offset: var(--dk-focus-offset); }

/* Evidence chip pattern (shape + text + colour) */
.ev { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 9px; border-radius: var(--dk-radius-chip); font-size: var(--dk-text-min); font-weight: 600; border: 1px solid currentColor; }
.ev--checked { color: var(--dk-ev-checked); background: var(--dk-ev-checked-bg); }   /* icon: shield-check */
.ev--stated  { color: var(--dk-ev-stated);  background: var(--dk-ev-stated-bg); }    /* icon: quote marks */
.ev--missing { color: var(--dk-ev-missing); background: var(--dk-ev-missing-bg); border-style: dashed; }   /* icon: dashed circle */
.ev--flag    { color: var(--dk-flag);       background: var(--dk-flag-bg); }         /* icon: triangle */

/* Every number that is an aggregate sits in a figure with a caption stating n, window, source class */
figure.stat { margin: 0; padding: var(--dk-s4) var(--dk-s5); }
figure.stat figcaption { color: var(--dk-ink-2); font-size: var(--dk-text-small); margin-top: var(--dk-s2); }
