/* ===========================================================================
   Deal Vetting design tokens - v1.1 (concept A, "Recorder's Office")
   Canonical source: docs/design/DEAL-VETTING-DESIGN-STANDARD-v1.0.md, with the
   palette, type scale and contrast pairs from the concept A notes
   (boardroom/reports/2026-09-27-deal-vetting-uiux-audit/concepts/a-light).

   The ONLY place a --dv-* token may be born. The intake plugin declares this
   stylesheet as a hard dependency and defines no tokens of its own.

   Identity: warm paper ground, white document sheets, near-black ink, one
   pen-blue action colour, one violet stamp-ink evidence colour. No teal, no
   gold, no serif, and monospace only for IDs and parcel numbers.

   21 colour tokens. Every one has a counterpart in the @media print block;
   set-equality between the two blocks is asserted by scripts/token-lint.py.

   Alpha is never a colour mechanism: every fill is opaque, so contrast is
   computable without knowing the parent. Ratios are WCAG 2.x.
   =========================================================================== */

/* Public Sans, variable weight 100-900, self-hosted. Latin first; the
   latin-ext file loads only when a page uses one of its characters. */
@font-face {
	font-family: "Public Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Public Sans";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("assets/fonts/public-sans-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	color-scheme: light;

	/* ---- surfaces --------------------------------------------------------- */
	--dv-canvas:           #f3f1ec;  /* page ground (warm paper)                */
	--dv-surface:          #ffffff;  /* document sheet, header, footer, fields  */
	--dv-surface-raised:   #f7f6f2;  /* table head, quiet panels                */
	--dv-surface-field:    #ffffff;  /* form control fill                       */
	--dv-surface-evidence: #f7f6f2;  /* letterhead band, document foot          */

	/* ---- ink -------------------------------------------------------------- */
	--dv-ink:    #15181e;  /* body, every figure.     17.78 on sheet, 15.75 on canvas */
	--dv-ink-2:  #3b414b;  /* secondary prose, help.  10.28 on sheet,  9.10 on canvas */
	--dv-ink-3:  #575e69;  /* meta, provenance.        6.54 on sheet,  5.80 on canvas */

	/* ---- boundaries ------------------------------------------------------- */
	--dv-rule:      #737985;  /* every boundary a user must perceive. 3.80 min */
	--dv-rule-hair: #dad7cf;  /* decorative rules INSIDE an already-bounded box */

	/* ---- semantic hues. one meaning each. -------------------------------- */
	--dv-action:        #1d47b0;  /* interaction only. 8.14 on sheet, 7.07 min   */
	--dv-action-hi:     #163889;  /* hover and pressed. 10.71 on sheet           */
	--dv-on-action:     #ffffff;  /* text on an action fill. 8.14                */
	--dv-action-fill:   #eaeffb;  /* ghost hover, active suggestion ground       */
	--dv-evidence:      #5b2c87;  /* evidence tier stamps only. 9.74 on sheet    */
	--dv-evidence-fill: #f4eff9;  /* T3 stamp ground                             */
	--dv-alarm:         #a3191f;  /* hard failure and validation error only      */
	--dv-alarm-fill:    #fcedec;  /* error notice ground                         */
	--dv-route:         #34506e;  /* human handoff (manual review) only          */
	/* --dv-ok (confirmed delivery) retired 2026-10-03 with the delivery panel; step 8 re-adds it with a real delivery surface. */
	--dv-focus:         #1d47b0;  /* focus ring. 7.07 min against any surface    */

	/* ---- families. no external requests, ever. ---------------------------
	   Public Sans is self-hosted (assets/fonts, SIL OFL 1.1, fontsource 5.3.0
	   variable build, @font-face at the top of this file). The system stack
	   behind it renders while the file loads. */
	--dv-sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--dv-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; /* IDs and parcel numbers only */

	/* ---- type scale. nine steps. no tenth. -------------------------------- */
	--dv-t-micro: 0.8125rem;  /* 13px  never task-critical                   */
	--dv-t-meta:  0.875rem;   /* 14px  labels, provenance, stamps            */
	--dv-t-fine:  0.9375rem;  /* 15px  help text, table cells, status        */
	--dv-t-body:  1rem;       /* 16px  body, inputs, buttons, legal lines    */
	--dv-t-lede:  1.125rem;   /* 18px  lede, section intros                  */
	--dv-t-h3:    1.25rem;    /* 20px  section heads                         */
	--dv-t-fig:   1.625rem;   /* 26px  key figures                           */
	--dv-t-h2:    1.875rem;   /* 30px  page section titles                   */
	--dv-t-h1:    clamp( 1.875rem, 1.1rem + 2.6vw, 2.75rem );  /* 30 to 44px */

	--dv-lh-tight: 1.15;
	--dv-lh-snug:  1.3;
	--dv-lh-body:  1.55;

	/* ---- spacing scale. nine steps. -------------------------------------- */
	--dv-s1: 0.25rem;
	--dv-s2: 0.5rem;
	--dv-s3: 0.75rem;
	--dv-s4: 1rem;
	--dv-s5: 1.5rem;
	--dv-s6: 2rem;
	--dv-s7: 3rem;
	--dv-s8: 4rem;
	--dv-s9: 6rem;

	/* ---- geometry --------------------------------------------------------- */
	--dv-r-doc:     0;    /* every document surface keeps square corners      */
	--dv-r-control: 4px;  /* input, select, button, stamp, chip               */
	--dv-target:    2.75rem;  /* 44px minimum hit target                      */

	--dv-maxw:          76rem;
	--dv-doc-maxw:      56rem;
	--dv-measure-prose: 64ch;
	--dv-measure-legal: 78ch;
	--dv-measure-help:  52ch;

	/* Tabular figures are a product requirement, not a preference: a snapshot
	   that shows a parcel ID must never let a reader confuse 0 and O. */
	font-variant-numeric: tabular-nums lining-nums slashed-zero;
}

/* ===========================================================================
   PAPER. The identical 21 colour keys.
   A token added above and forgotten here is a red build, not a design review.
   =========================================================================== */
@media print {
	:root {
		--dv-canvas:           #ffffff;
		--dv-surface:          #ffffff;
		--dv-surface-raised:   #ffffff;
		--dv-surface-field:    #ffffff;
		--dv-surface-evidence: #ffffff;

		--dv-ink:    #000000;
		--dv-ink-2:  #222222;
		--dv-ink-3:  #444444;

		--dv-rule:      #666666;
		--dv-rule-hair: #bbbbbb;

		--dv-action:        #1d47b0;
		--dv-action-hi:     #163889;
		--dv-on-action:     #ffffff;
		--dv-action-fill:   #ffffff;
		--dv-evidence:      #5b2c87;
		--dv-evidence-fill: #ffffff;
		--dv-alarm:         #a3191f;
		--dv-alarm-fill:    #ffffff;
		--dv-route:         #34506e;
		--dv-focus:         #000000;
	}

	@page         { size: letter; margin: 0.6in; }
	@page dv-wide { size: letter landscape; margin: 0.5in; }
}
