/* CraftsmanBid — the brand, and the only file allowed to name a colour or a typeface.
   From Adrian's brand book through the AG Group design system (OCP Field, BRAND_SYSTEM_FOR_OTHER_APPS.md, 2026-09-22).
   A company that buys CraftsmanBid later swaps this one file for its own (spec §8).

   The typefaces are the brand book's own, SELF-HOSTED and subsetted to Latin plus Spanish: nothing is fetched from
   Google. Declared as variable faces, or every weight renders at 400. Look B (docs/LOOK_B.md, approved 2026-10-31) drops
   Big Shoulders Display: the office is DM Sans only, at 400, 500 and 600. */
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dmsans.woff2") format("woff2-variations");
  font-weight: 100 1000; font-style: normal; font-display: swap; }
/* Look round 3 (Adrian, 2026-11-26: "the drip job font and look for everything else"): the office reads Inter, the face
   DripJobs' app uses, self-hosted like the others. The customer's page keeps the brand's faces. */
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* The brand book's palette. Brick is the action colour and only that. Brass and char make it read expensive:
     brass is for hairlines and an italic line on char, never a button; both belong on the cover, not throughout. */
  --ink: #292B1C;
  --paper: #F8F5EA;
  --cream: #F0E9C8;
  --card: #FFFDF8;
  --brick: #A8412C;
  --brass: #B89968;
  --bronze: #8C6F45;
  --char: #16170E;
  --char-soft: #1F2018;
  --on-brick: #FFFDF8;

  /* Roles, which is what every component uses. Dark mode redefines these, never the components. */
  --ground: var(--paper);
  --surface: var(--card);
  --raised: var(--cream);
  --text: var(--ink);
  --muted: #555A43;
  --line: rgba(41, 43, 28, .16);
  --line-strong: rgba(41, 43, 28, .32);
  --hover: rgba(41, 43, 28, .05);
  --action: var(--brick);
  --focus: var(--brick);
  --side-ground: var(--ink);
  --side-text: var(--cream);
  --side-muted: rgba(240, 233, 200, .58);
  --side-hover: rgba(240, 233, 200, .10);
  --side-line: rgba(240, 233, 200, .16);
  --side-line-strong: rgba(240, 233, 200, .30);
  --brass-line: rgba(184, 153, 104, .38);
  --cover-quiet: rgba(240, 233, 200, .50);
  --doc-ground: var(--card);
  --scrim: rgba(22, 23, 14, .56);
  --placeholder: #E7E0C4;
  --placeholder-line: rgba(41, 43, 28, .22);

  /* State colours are separate from the accent: good, waiting, needs attention. */
  --ok: #0F5132;
  --ok-soft: rgba(15, 81, 50, .10);
  --warn: #6B4A00;
  --warn-soft: rgba(107, 74, 0, .10);
  --bad: #7A0F3D;
  --bad-soft: rgba(122, 15, 61, .09);
  --ai: #3D4F7A;
  --ai-soft: rgba(61, 79, 122, .10);

  /* Look A (docs/GOAL_LOOK_A.md): the office screens' shaded panel and the colour of words that say something is due.
     Brick is the action colour; as text on the dark ground it reads too dark, so "due" has its own. */
  --panel: #F3EEDA;
  --due: var(--brick);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* One spacing scale. Nothing else. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --radius: 12px;
  /* The office screens' one type scale and corners (Look B). Nothing in office.css is sized any other way. Body text
     and inputs are 15 and 16 on a phone (16 stops iOS zooming into a box); a desk with a mouse reads 14 (below). */
  --t-12: 12px; --t-13: 13px; --t-14: 14px; --t-15: 15px; --t-16: 16px; --t-17: 17px; --t-count: 17px; --t-title: 20px;
  --t-body: 15px; --t-input: 16px;
  --r-chip: 6px; --r-button: 8px; --r-card: 9px; --r-column: 12px;
  --control: 34px;        /* a desk's compact control height; a phone and a touch screen keep 44px taps */
  --radius-small: 8px;
  --scrim-office: rgba(27, 36, 51, .35);   /* behind the tablet menu when it is open */
  --side: 216px;
  --page-max: 84rem;      /* the desk view's reading width; the top bar lines up with it */
}

/* The cover's sign-in side is paper in both themes, so it keeps the light roles whatever the theme. */
.entryform {
  --ground: var(--paper);
  --surface: var(--card);
  --text: var(--ink);
  --muted: #555A43;
  --line: rgba(41, 43, 28, .16);
  --line-strong: rgba(41, 43, 28, .32);
  --hover: rgba(41, 43, 28, .05);
  --action: var(--brick);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--char);
    --surface: var(--char-soft);
    --raised: #2A2B20;
    --text: var(--cream);
    --muted: rgba(240, 233, 200, .66);
    --line: rgba(240, 233, 200, .15);
    --line-strong: rgba(240, 233, 200, .32);
    --hover: rgba(240, 233, 200, .06);
    --action: #B94A33;
    --focus: var(--bronze);
    --side-ground: #0F100A;
    --doc-ground: var(--char-soft);
    --placeholder: #2E2F24;
    --placeholder-line: rgba(240, 233, 200, .22);
    --ok: #7FC6A0; --ok-soft: rgba(127, 198, 160, .12);
    --warn: #E0B85A; --warn-soft: rgba(224, 184, 90, .12);
    --bad: #E58AA9; --bad-soft: rgba(229, 138, 169, .12);
    --ai: #A9B8E0; --ai-soft: rgba(169, 184, 224, .12);
  --panel: #23241B;
  --due: #E0826B;
  }
}
:root[data-theme="dark"] {
  --ground: var(--char);
  --surface: var(--char-soft);
  --raised: #2A2B20;
  --text: var(--cream);
  --muted: rgba(240, 233, 200, .66);
  --line: rgba(240, 233, 200, .15);
  --line-strong: rgba(240, 233, 200, .32);
  --hover: rgba(240, 233, 200, .06);
  --action: #B94A33;
  --focus: var(--bronze);
  --side-ground: #0F100A;
  --doc-ground: var(--char-soft);
  --placeholder: #2E2F24;
  --placeholder-line: rgba(240, 233, 200, .22);
  --ok: #7FC6A0; --ok-soft: rgba(127, 198, 160, .12);
  --warn: #E0B85A; --warn-soft: rgba(224, 184, 90, .12);
  --bad: #E58AA9; --bad-soft: rgba(229, 138, 169, .12);
  --ai: #A9B8E0; --ai-soft: rgba(169, 184, 224, .12);
  --panel: #23241B;
  --due: #E0826B;
}

/* ------------------------------------------------------------------ Look B, "Warm minimal" (docs/LOOK_B.md)
   Adrian picked it on 2026-10-31. The office screens only: everything under .shell. The customer's documents and the
   sign-in cover keep the roles above, and so does the customer's page inside the office's Preview. Rust is the one
   accent: primary buttons, links and next-step words. */
.shell {
  /* The approved look (oversight's canvas; Adrian, November 28: "This looks good. Let's rework the design off this"):
     DripJobs' layout and its face, DM Sans, in OCP's colours: ink text, a cool grey page under white cards, a white grouped
     side menu with brick for the page you are on; brick stays the one accent. bid/pictures/look-pass/oversight-approved. */
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ground: #F3F4F6;
  --surface: #FFFFFF;
  --raised: #F7F8FA;
  --column: #E9ECF0;
  --panel: #F5F6F8;
  --text: #1B2433;
  --muted: #4A5361;
  --line: #E3E6EA;
  --line-strong: #CFD5DC;
  --hover: rgba(27, 36, 51, .05);
  --action: #A8402B;
  --on-brick: #FFFFFF;
  --focus: #A8402B;
  --due: #8F3320;
  --side-ground: #FFFFFF;
  --side-text: #1B2433;
  --side-strong: #FFFFFF;
  --side-current: #A8402B;
  --side-muted: #5B6472;
  --side-hover: rgba(27, 36, 51, .05);
  --side-line: #E3E6EA;
  --side-line-strong: #CFD5DC;
  --brass-line: #E3E6EA;
  --shadow-card: none;
  /* The six stage colours (soft ground, readable text): brass, bronze, slate, brick, sage, grey. */
  --st-brass: #F4E6C3; --st-brass-text: #5C4308;
  --st-bronze: #EADBC8; --st-bronze-text: #553A17;
  --st-slate: #DBE5F1; --st-slate-text: #1F3F6B;
  --st-brick: #F6DCD6; --st-brick-text: #7D2A18;
  --st-sage: #DBE8DC; --st-sage-text: #1F5130;
  --st-grey: #E4E7EB; --st-grey-text: #3A4250;
  --call: #E3F1E6; --call-line: #BCD9C3; --call-text: #1F5C33;
  --map: #E2EBF6; --map-line: #BFD0E6; --map-text: #234A7A;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shell {
    --st-brass: rgba(224, 184, 90, .16); --st-brass-text: #E0B85A;
    --st-bronze: rgba(201, 168, 125, .16); --st-bronze-text: #D4B48C;
    --st-slate: rgba(169, 184, 224, .16); --st-slate-text: #A9B8E0;
    --st-brick: rgba(229, 147, 123, .16); --st-brick-text: #E5937B;
    --st-sage: rgba(127, 198, 160, .16); --st-sage-text: #7FC6A0;
    --st-grey: rgba(236, 233, 224, .10); --st-grey-text: #C9C5B8;
    --call: rgba(127, 198, 160, .14); --call-line: rgba(127, 198, 160, .30); --call-text: #7FC6A0;
    --map: rgba(169, 184, 224, .14); --map-line: rgba(169, 184, 224, .30); --map-text: #A9B8E0;
    --ground: #161814;
    --surface: #23261F;
    --raised: #2C2F28;
    --column: #1D1F1A;
    --panel: #2C2F28;
    --text: #ECE9E0;
    --muted: #A9AB9F;
    --line: rgba(236, 233, 224, .10);
    --line-strong: rgba(236, 233, 224, .22);
    --hover: rgba(236, 233, 224, .05);
    --action: #A9472F;
    --on-brick: #FFFFFF;
    --focus: #E5937B;
    --due: #E5937B;
    --side-ground: #10120E;
    --side-text: #C9C5B8;
    --side-strong: #FFFFFF;
    --side-current: rgba(255, 255, 255, .08);
    --side-muted: #9E9B90;
    --side-hover: rgba(255, 255, 255, .05);
    --side-line: rgba(255, 255, 255, .08);
    --side-line-strong: rgba(255, 255, 255, .18);
    --brass-line: rgba(255, 255, 255, .08);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] .shell {
    --st-brass: rgba(224, 184, 90, .16); --st-brass-text: #E0B85A;
    --st-bronze: rgba(201, 168, 125, .16); --st-bronze-text: #D4B48C;
    --st-slate: rgba(169, 184, 224, .16); --st-slate-text: #A9B8E0;
    --st-brick: rgba(229, 147, 123, .16); --st-brick-text: #E5937B;
    --st-sage: rgba(127, 198, 160, .16); --st-sage-text: #7FC6A0;
    --st-grey: rgba(236, 233, 224, .10); --st-grey-text: #C9C5B8;
    --call: rgba(127, 198, 160, .14); --call-line: rgba(127, 198, 160, .30); --call-text: #7FC6A0;
    --map: rgba(169, 184, 224, .14); --map-line: rgba(169, 184, 224, .30); --map-text: #A9B8E0;
  --ground: #161814;
  --surface: #23261F;
  --raised: #2C2F28;
  --column: #1D1F1A;
  --panel: #2C2F28;
  --text: #ECE9E0;
  --muted: #A9AB9F;
  --line: rgba(236, 233, 224, .10);
  --line-strong: rgba(236, 233, 224, .22);
  --hover: rgba(236, 233, 224, .05);
  --action: #A9472F;
  --on-brick: #FFFFFF;
  --focus: #E5937B;
  --due: #E5937B;
  --side-ground: #10120E;
  --side-text: #C9C5B8;
  --side-strong: #FFFFFF;
  --side-current: rgba(255, 255, 255, .08);
  --side-muted: #9E9B90;
  --side-hover: rgba(255, 255, 255, .05);
  --side-line: rgba(255, 255, 255, .08);
  --side-line-strong: rgba(255, 255, 255, .18);
  --brass-line: rgba(255, 255, 255, .08);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35);
}
/* Customer view (div.shell.customer-view) is what the customer reads on the estimator's phone: it keeps Look B's light
   values and DM Sans, not the staff look round 3 (Codex on 4312). The dark blocks above are unchanged and still win. */
.shell.customer-view {
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ground: #FBFAF7;
  --surface: #FFFFFF;
  --raised: #F3F1EA;
  --column: #F3F1EA;
  --panel: #F3F1EA;
  --text: #1F2420;
  --muted: #6B6F66;
  --line: #E3DFD4;
  --line-strong: #CBC6B8;
  --hover: rgba(31, 36, 32, .04);
}
/* The customer's page inside Preview is the customer's, not the office's: it keeps the roles at the top of this file. */
.shell .proposal-doc {
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ground: var(--paper); --surface: var(--card); --raised: var(--cream); --text: var(--ink); --muted: #555A43;
  --line: rgba(41, 43, 28, .16); --line-strong: rgba(41, 43, 28, .32); --hover: rgba(41, 43, 28, .05);
  --action: var(--brick); --on-brick: #FFFDF8; --focus: var(--brick); --panel: #F3EEDA; --due: var(--brick);
  --doc-ground: var(--card); color-scheme: light; background: var(--ground); color: var(--text);
}
/* The customer's proposal is ALWAYS LIGHT (Adrian, November 22): a homeowner's phone in dark mode, or an office
   screen set to dark, never shows it dark. Inside Preview it keeps the light roles just above in every theme; the
   customer's own page (body.customer) takes the light roles of :root over any dark block, and light form controls. */
body.customer {
  color-scheme: light;
  --ground: var(--paper);
  --surface: var(--card);
  --raised: var(--cream);
  --text: var(--ink);
  --muted: #555A43;
  --line: rgba(41, 43, 28, .16);
  --line-strong: rgba(41, 43, 28, .32);
  --hover: rgba(41, 43, 28, .05);
  --action: var(--brick);
  --focus: var(--brick);
  --side-ground: var(--ink);
  --doc-ground: var(--card);
  --placeholder: #E7E0C4;
  --placeholder-line: rgba(41, 43, 28, .22);
  --ok: #0F5132;
  --ok-soft: rgba(15, 81, 50, .10);
  --warn: #6B4A00;
  --warn-soft: rgba(107, 74, 0, .10);
  --bad: #7A0F3D;
  --bad-soft: rgba(122, 15, 61, .09);
  --ai: #3D4F7A;
  --ai-soft: rgba(61, 79, 122, .10);
  --panel: #F3EEDA;
  --due: var(--brick);
}
/* The page edges (html paints the ground) follow it. document.html marks a customer page's <html> with a class, so a
   browser without :has gets light edges too (Codex on 4342). */
:root.customer-page {
  color-scheme: light;
  --ground: var(--paper);
  --surface: var(--card);
  --raised: var(--cream);
  --text: var(--ink);
  --muted: #555A43;
  --line: rgba(41, 43, 28, .16);
  --line-strong: rgba(41, 43, 28, .32);
  --hover: rgba(41, 43, 28, .05);
  --action: var(--brick);
  --focus: var(--brick);
  --side-ground: var(--ink);
  --doc-ground: var(--card);
  --placeholder: #E7E0C4;
  --placeholder-line: rgba(41, 43, 28, .22);
  --ok: #0F5132;
  --ok-soft: rgba(15, 81, 50, .10);
  --warn: #6B4A00;
  --warn-soft: rgba(107, 74, 0, .10);
  --bad: #7A0F3D;
  --bad-soft: rgba(122, 15, 61, .09);
  --ai: #3D4F7A;
  --ai-soft: rgba(61, 79, 122, .10);
  --panel: #F3EEDA;
  --due: var(--brick);
}
/* Its boxes too (app.css gives inputs the dark scheme in dark mode; this is more specific). */
:root body.customer input, :root body.customer textarea, :root body.customer select,
:root .shell .proposal-doc input, :root .shell .proposal-doc textarea, :root .shell .proposal-doc select { color-scheme: light; }
/* app.css backs the logo with paper in dark mode only; on the always light proposal it stays as in light. */
:root body.customer .masthead .co, :root .shell .proposal-doc .masthead .co { background: none; }

/* A desk with a mouse (861px and wider, a fine pointer) reads 14px and gets compact controls; a phone or a touch screen
   never does (tests/test_look_b.py). */
@media (min-width: 861px) and (pointer: fine) {
  :root { --t-body: 14px; --t-input: 14px; }
}
