/* CraftsmanBid: the shared base, the customer's documents and the sign-in cover. Every colour and typeface comes from
   tokens.css; every length from the one spacing scale.

   Look A (docs/GOAL_LOOK_A.md, 2026-09-30) moved the office screens into office.css, under .shell, and left this file
   as it was for everything a customer sees: the proposal page, the gone and plain pages, and the cover. The customer's
   documents and the cover are proven unchanged picture for picture (scripts/look_check/docs_unchanged.py).

   Three rules from the brand system decide most of what is here:
   - Ration the grandeur. Only the sign-in cover is grand.
   - A typeface is a signal. The serif means "this becomes a document a customer receives". The sans is the working tool.
   - No gradients, no card shadows, no hover lifts, no fade-in on scroll, no all-caps eyebrow labels above headings.

   The traps are handled where they would bite: font properties are always set one at a time (the shorthand with
   `inherit` is invalid and drops the whole declaration); a centred box has exactly one rule setting its margin; native
   controls are styled. */

* { box-sizing: border-box; }
html { font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--ground);
  -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55;
  font-feature-settings: "ss01" 0; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }
.num, td.num, .money { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ links */
a { color: var(--action); }
/* The office's own links (a record's name reads as the name) are office.css's, under .shell, and stop at the
   customer's document so its Preview shows it as it is. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ controls, all of them styled */
button, .btn { font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 1.2; min-height: 40px;
  padding-block: var(--s2); padding-inline: var(--s4); border-radius: var(--radius-small); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: var(--s2); text-decoration: none; white-space: nowrap; }
button:hover, .btn:hover { background: var(--hover); }
.btn.primary, button.primary { background: var(--action); border-color: var(--action); color: var(--on-brick); }
.btn.primary:hover, button.primary:hover { background: var(--action); border-color: var(--text); }
.btn.quiet, button.quiet { background: transparent; border-color: transparent; }
.btn.quiet:hover, button.quiet:hover { background: var(--hover); }
.btn.outline-action, button.outline-action { color: var(--action); border-color: var(--action); background: transparent; }
.btn.small, button.small { min-height: 32px; padding-block: var(--s1); padding-inline: var(--s3); font-size: 13px; }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.page a.btn, .page a.btn:hover { text-decoration: none; }
.page a.btn.primary { color: var(--on-brick); }

input[type=text], input[type=email], input[type=tel], input[type=search], input[type=number], input[type=date],
input[type=password], textarea, .select select {
  font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-small); min-height: 40px;
  padding-block: var(--s2); padding-inline: var(--s3); width: 100%; }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--action); width: 18px; height: 18px; margin: 0; }
/* A select keeps the operating system's arrow unless it is replaced; the arrow here is drawn from currentColor. */
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-inline-end: var(--s6); cursor: pointer; }
.select::after { content: ""; position: absolute; inset-inline-end: var(--s4); top: 50%; width: 7px; height: 7px;
  border-inline-end: 1.5px solid var(--muted); border-block-end: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select.inline { display: inline-block; }
.select.inline select { width: auto; }

.field { display: grid; gap: var(--s1); }
.field > span, .fieldlabel { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.check { display: inline-flex; gap: var(--s2); align-items: center; font-weight: 500; font-size: 14px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--s4); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding-block: var(--s3) var(--s4);
  padding-inline: var(--s4); margin: 0; min-width: 0; }
legend { font-size: 13px; font-weight: 700; padding-inline: var(--s1); }

/* Segmented choices: one of a few. */
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-small); overflow: hidden;
  background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; border-radius: 0; min-height: 36px; background: transparent; font-weight: 600; }
.seg button + button { border-inline-start: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--ground); }
/* A two-choice switch that fills its box, for labels too long to sit side by side in a narrow rail. */
.seg.full { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.full button { white-space: normal; text-align: center; }

/* Choice cards for triage: a question, its answers side by side. */
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choices label { display: inline-flex; align-items: center; gap: var(--s2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-small); padding-block: var(--s2); padding-inline: var(--s3); cursor: pointer;
  background: var(--surface); font-size: 14px; font-weight: 500; }
.choices label:has(input:checked) { border-color: var(--text); background: var(--raised); }

.stack { display: grid; gap: var(--s4); }
.stack > .divider { margin: 0; }
.row { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.space-y { margin-block: var(--s4); }
.space-top { margin-block-start: var(--s5); }
.space-bottom { margin-block-end: var(--s4); }

.notice { display: flex; gap: var(--s3); align-items: flex-start; border-radius: var(--radius); padding-block: var(--s3);
  padding-inline: var(--s4); font-size: 14px; background: var(--hover); }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }
.notice.ok { background: var(--ok-soft); }
.notice.ai { background: var(--ai-soft); }

/* ------------------------------------------------------------------ documents a customer receives: the serif */
.doc { font-family: var(--serif); color: var(--text); background: var(--doc-ground); }
.doc h1, .doc h2, .doc h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.message { font-family: var(--serif); font-size: 16px; line-height: 1.55; background: var(--doc-ground);
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); max-width: 38rem; white-space: pre-line; }
.message .from { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-block-end: var(--s3); display: block; }

/* The customer's proposal: the same document on its own page and inside the office preview. */
.proposal { min-height: 100vh; background: var(--ground); }
.proposal .inner { max-width: 70rem; margin-inline: auto; padding-block: var(--s6) var(--s8); padding-inline: var(--s5); }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
  padding-block-end: var(--s4); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.masthead .co { display: flex; align-items: center; gap: var(--s3); font-family: var(--serif); font-size: 19px; }
.masthead .tagline { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--muted); }
/* The document sits on the page's own ground; only its cards are raised. */
.proposal-doc, .proposal .doc { background: transparent; }
.proposal-doc .hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); align-items: center;
  margin-block: var(--s6); }
.proposal-doc .hero h1, .proposal .hero h1 { font-family: var(--serif); font-size: clamp(34px, 4.4vw, 54px); font-weight: 300;
  line-height: 1.04; letter-spacing: -.02em; margin: 0; }
.proposal-doc .for, .proposal .for { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted);
  margin-block-end: var(--s3); }
.proposal-doc .terms { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-block-start: var(--s4);
  display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; }
.housephoto { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--placeholder);
  border: 1px solid var(--placeholder-line); position: relative; max-width: 100%; margin: 0; }
.housephoto svg { width: 100%; height: 100%; display: block; }
.housephoto .credit { position: absolute; inset-inline-start: var(--s3); inset-block-end: var(--s3); font-family: var(--sans);
  font-size: 11px; color: var(--muted); background: var(--doc-ground); padding-block: var(--s1); padding-inline: var(--s2);
  border-radius: 4px; }
.proposal-doc .lead { font-family: var(--serif); font-size: 19px; line-height: 1.55; max-width: 40rem; }
.proposal-doc h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; margin-block: var(--s7) var(--s4); }
.tiercards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.tiercard { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--doc-ground); padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s3); font-family: var(--serif); }
.tiercard.picked { border-color: var(--text); outline: 2px solid var(--text); outline-offset: -2px; }
.tiercard .tname { font-family: var(--serif); font-size: 26px; font-weight: 400; margin: 0; }
.tiercard .tline { font-style: italic; color: var(--muted); font-size: 16px; }
.tiercard .tprice { font-family: var(--sans); font-size: 30px; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }
.tiercard ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); font-size: 16px; }
.tiercard li { padding-inline-start: var(--s4); position: relative; }
.tiercard li::before { content: ""; position: absolute; inset-inline-start: 0; top: .6em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--brass); }
.tiercard .pick { margin-block-start: auto; padding-block-start: var(--s2); }
.tiercard .pick button { width: 100%; }
.tiercard .recommended { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); }
.scoperow { display: flex; justify-content: space-between; gap: var(--s4); border-top: 1px solid var(--line);
  padding-block-start: var(--s4); }
.scoperow h3 { font-family: var(--serif); font-size: 21px; font-weight: 400; margin: 0; }
.scoperow p { font-size: 16px; }
.scoperow ul { margin-block: var(--s2) 0; padding-inline-start: var(--s5); font-size: 16px; display: grid; gap: var(--s1); }
.scoperow .aprice { font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.extras { display: grid; gap: var(--s3); }
.extra { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: var(--s4); align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3); background: var(--doc-ground); }
.extra .pic { aspect-ratio: 4 / 3; border-radius: var(--radius-small); background: var(--placeholder);
  border: 1px solid var(--placeholder-line); max-width: 100%; }
.extra h3 { font-family: var(--serif); font-size: 19px; font-weight: 400; margin: 0; }
.extra p { font-family: var(--serif); font-size: 15px; color: var(--muted); }
.extra .price { font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; }
.extra.added { border-color: var(--text); }
.totalbar { position: sticky; bottom: 0; background: var(--ground); border-top: 1px solid var(--line-strong);
  padding-block: var(--s4) calc(var(--s4) + env(safe-area-inset-bottom, 0px)); margin-block-start: var(--s6);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; z-index: 3; }
.totalbar .t { font-family: var(--sans); display: grid; }
.totalbar .t span { font-size: 13px; color: var(--muted); }
.totalbar .t b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.proposal-doc .fine { font-family: var(--sans); font-size: 13px; color: var(--muted); max-width: 48rem; margin-block-start: var(--s6); }
.proposal-doc .signed { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--s6); display: grid;
  gap: var(--s3); max-width: 40rem; margin-block-end: var(--s6); background: var(--doc-ground); }
.proposal-doc .signed .sig { font-family: var(--serif); font-style: italic; font-size: 30px; border-bottom: 1px solid var(--line-strong);
  padding-block-end: var(--s2); }
.proposal-doc .signed h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; margin: 0; }
.proposal-doc .signed p { font-size: 17px; }

/* The signature sheet. */
.sheetwrap { position: fixed; inset: 0; background: var(--scrim); z-index: 30; display: grid; place-items: center;
  padding-inline: var(--s4); }
.sheet { background: var(--ground); border-radius: var(--radius); width: min(34rem, 100%); max-height: 92vh; overflow-y: auto;
  padding: var(--s5); display: grid; gap: var(--s4); border: 1px solid var(--line-strong); }
.sheet h2 { font-family: var(--serif); font-size: 26px; font-weight: 400; margin: 0; }
.sheet .seg, .sheet > button.quiet { justify-self: start; }
.sheet .field > span, .sheet .check { font-family: var(--sans); }
.sigpad { width: 100%; height: 150px; border: 1px solid var(--line-strong); border-radius: var(--radius-small);
  background: var(--doc-ground); touch-action: none; cursor: crosshair; display: block; }
.sigtyped { font-family: var(--serif); font-style: italic; font-size: 28px; }

/* ------------------------------------------------------------------ the cover: the one grand surface */
.entry { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.plate { display: flex; flex-direction: column; justify-content: center; gap: var(--s5); background: var(--char);
  color: var(--cream); padding-block: var(--s8); padding-inline: clamp(var(--s6), 7vw, var(--s8)); }
.plate h1 { font-family: var(--serif); font-size: clamp(44px, 5.4vw, 72px); font-weight: 300; line-height: 1;
  letter-spacing: -.02em; margin: 0; }
.plate .line { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.4; color: var(--brass); padding-block-start: var(--s5); border-top: 1px solid var(--brass-line);
  max-width: 19ch; }
.plate .by { font-size: 13px; color: var(--cover-quiet); letter-spacing: .02em; }
.entryform { display: grid; place-items: center; background: var(--paper); color: var(--ink); padding: var(--s6); }
.entryinner { width: min(23rem, 100%); display: grid; gap: var(--s4); }
.entryinner h2 { font-family: var(--sans); font-size: 26px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.entryinner .btn.primary { width: 100%; }
.entryinner .field input { background: var(--card); color: var(--ink); }
.entry a:focus-visible, .entry button:focus-visible, .entry input:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
@media (prefers-reduced-motion: no-preference) {
  /* One orchestrated moment, here, and nowhere else. */
  .plate > * { animation: rise .7s cubic-bezier(.2, .7, .3, 1) backwards; }
  .plate > :nth-child(2) { animation-delay: .07s; }
  .plate > :nth-child(3) { animation-delay: .14s; }
  .plate > :nth-child(4) { animation-delay: .21s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}

ul.plain { margin-block: var(--s1) 0; padding-inline-start: var(--s5); font-size: 14px; display: grid; gap: var(--s1); }

/* ------------------------------------------------------------------ drawn things: the mark, the stand-in house, charts */
/* On a page the mark follows the theme (ink on paper, cream on char); in the ink sidebar and on the cover it is cream. */
.mark .mk-bg { fill: var(--text); }
.mark .mk-fg { fill: var(--ground); }
.mark .mk-frame { fill: none; stroke: var(--brass); stroke-width: 2; }
.mark .mk-lines { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.mark .mk-stroke { fill: none; stroke: var(--brick); stroke-width: 2.8; stroke-linecap: round; }
.mark.on-dark .mk-bg { fill: var(--cream); }
.mark.on-dark .mk-fg { fill: var(--ink); }
.mark.on-dark .mk-lines { stroke: var(--cream); }

/* ------------------------------------------------------------------ a customer's phone */
@media (max-width: 860px) {
  .proposal-doc .hero, .lp .hero, .previewpane .proposal-doc .hero { grid-template-columns: minmax(0, 1fr); }
  .scoperow { flex-direction: column; gap: var(--s2); }
  .proposal .inner, .lp .inner { padding-inline: var(--s4); }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .plate { padding-block: var(--s7); padding-inline: var(--s5); min-height: 44vh; }
  .extra { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .extra .actions { grid-column: 1 / -1; }
  /* Tiers on a customer's phone: swipe between them, the next one peeking in. */
  .tiercards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto;
    scroll-snap-type: x mandatory; padding-block-end: var(--s2); }
  .tiercard { scroll-snap-align: start; }
  .sheetwrap { align-items: end; padding-inline: 0; }
}

/* ------------------------------------------------------------------ from the real app's first additions (real.css) */
[hidden] { display: none !important; }
.inline { display: inline; margin: 0; }
.formerror { color: var(--bad); font-weight: 600; font-size: 14px; }

/* Segmented choices that are links or labels, not buttons. */
.seg .segbtn { display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; padding-block: var(--s2);
  padding-inline: var(--s3); font-size: 13px; font-weight: 600; color: inherit; text-decoration: none; cursor: pointer; }
.seg .segbtn + .segbtn { border-inline-start: 1px solid var(--line-strong); }
.seg .segbtn[aria-pressed="true"], .seg .segbtn:has(input:checked) { background: var(--text); color: var(--ground); }
.seg .segbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.page .seg a.segbtn:hover { text-decoration: none; }

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) input { color-scheme: dark; } }
:root[data-theme="dark"] input { color-scheme: dark; }

/* ------------------------------------------------------------------ the customer's page */
.ocplogo { display: block; height: 28px; width: auto; }
.masthead .langswitch { margin-inline-start: auto; }
.masthead .co { padding-block: var(--s1); padding-inline: var(--s1); border-radius: var(--radius-small); }
.proposal-doc .hero.nophoto { grid-template-columns: minmax(0, 1fr); }
.housephoto.real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tiercard { cursor: pointer; }
.tiercard .pick { display: flex; gap: var(--s2); align-items: center; font-family: var(--sans); font-weight: 600; font-size: 14px;
  padding-block: var(--s2); padding-inline: var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius-small);
  justify-content: center; }
.tiercard.picked .pick { background: var(--action); border-color: var(--action); color: var(--on-brick); }
.tiercard .pick input { accent-color: var(--on-brick); }
.extra { grid-template-columns: minmax(0, 1fr) auto; }
/* What the price includes: colours and each surface's sheen, stated on every proposal. */
.included { display: grid; gap: var(--s2); margin-block-start: var(--s6); }
.included .sheens { display: grid; gap: var(--s1); }
/* The customer packet after the proposal: how we work, the promise, the Q&A, the spec sheets. */
.packet { display: grid; gap: var(--s2); margin-block-start: var(--s6); }
.packet h3 { margin: var(--s3) 0 0; }
.packet .qa { margin: 0; }
.packet .qa dt { font-weight: 600; margin-block-start: var(--s4); }
.packet .qa dd { margin: var(--s1) 0 0; }
.specsheet { margin-block-start: var(--s3); }
.specrows li { display: grid; gap: var(--s1); padding-block: var(--s3); border-top: 1px solid var(--line); }
.specrows .specarea { color: var(--muted); }
.specrows p { margin: 0; }
.extra .addx { font-family: var(--sans); font-weight: 600; font-size: 14px; padding-block: var(--s1); padding-inline: var(--s3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-small); cursor: pointer; }
.extra.added .addx { background: var(--text); border-color: var(--text); color: var(--ground); }
.signform { display: block; }
.totalbar .row { gap: var(--s2); }
.sheet .seg { justify-self: start; }
/* Signing is ink on paper in either theme, so the saved signature reads the same everywhere. */
.sigpad { background: var(--paper); }
.sigpad.needs-ink { outline: 3px solid var(--bad); outline-offset: 2px; }
.proposal-doc[data-mode="preview"] .totalbar { position: static; }

/* A dark page keeps OCP's logo legible: the wordmark sits on a paper plate. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .masthead .co { background: var(--paper); } }
:root[data-theme="dark"] .masthead .co { background: var(--paper); }
@media (max-width: 860px) {
  .masthead { gap: var(--s2); }
  .masthead .tagline { order: 3; flex-basis: 100%; }
  .ocplogo { height: 22px; }
}
