/* The TalkRoof app. One small stylesheet, mobile first.
   No inline styles anywhere, so the Content Security Policy stays default-src 'self'. */
:root {
  /* Light mode only, on every device: the browser may not darken the app (Rob, 2026-11-26). */
  color-scheme: only light;
  --copper: #E8723A;
  --ink: #1B1F24;
  --paper: #F3F0EA;
  --card: #ffffff;
  --line: #E2DDD3;
  /* A form field's edge: 3:1 or more on the card and on the paper (WCAG 1.4.11). */
  --field-edge: #857E73;
  --muted: #5F6570;
  --ok: #1F6F3A;
  --okbg: #E3F1E7;
  --warnbg: #FBEFD2;
  --warn: #8A5A00;
  --focus: #1A5FD0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--focus); }
/* Every control shows the ring, selects and text areas included (#491, WCAG 2.4.7). */
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;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 0.5rem; top: 0.5rem; position: fixed; background: var(--card); padding: 0.5rem; z-index: 5; }

header.top { background: var(--ink); color: var(--card); }
.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand { color: var(--card); font-weight: 700; text-decoration: none; letter-spacing: 0.01em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.nav a { color: var(--card); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { text-decoration: underline; }
.nav .button { color: var(--card); }
form.inline { display: inline; margin: 0; }
.link-button {
  background: none;
  border: 0;
  color: var(--card);
  font: inherit;
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

main { padding-top: 1.5rem; padding-bottom: 2.5rem; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
p { margin: 0 0 0.9rem; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1.25rem;
}
ol.steps, ul.plain { padding-left: 1.2rem; margin: 0 0 1rem; }
ol.steps li, ul.plain li { margin-bottom: 0.4rem; }

.banner-verify {
  background: var(--warnbg);
  border-left: 4px solid var(--warn);
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  margin: 0 0 1rem;
  font-weight: 600;
}
.guidance {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.75rem 0.85rem;
  margin: 0 0 1.25rem;
}
.notice {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  margin: 0 0 0.75rem;
}
.errors, .error {
  background: #FBE9E7;
  border-left: 4px solid #A32B14;
  padding: 0.6rem 0.8rem;
  margin: 0 0 1rem;
}
.errors ul { margin: 0; padding-left: 1.1rem; }
.ok-box { background: var(--okbg); border-left: 4px solid var(--ok); padding: 0.6rem 0.8rem; margin: 0 0 1rem; }
/* Board 32 section 6: the card notice under the title on a phone, on its row from 820 px. */
.title-row { display: block; }
@media (min-width: 820px) { .title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; } .title-row h1 { margin-right: auto; } .title-row .ok-box { margin: 0; } }

.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--field-edge);
  border-radius: 6px;
  font: inherit;
  background: var(--card);
  color: var(--ink);
}
.field .help { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.field .field-error { color: #A32B14; font-size: 0.9rem; margin-top: 0.25rem; }

.accept { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0 0 1.25rem; }
.accept input { margin-top: 0.25rem; width: 1.15rem; height: 1.15rem; flex: none; }

.button, button[type="submit"] {
  display: inline-block;
  background: var(--copper);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.small { padding: 0.35rem 0.7rem; font-size: 0.9rem; }
.button.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
button[type="submit"][disabled] { background: #C9C4BA; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }

.badge {
  display: inline-block;
  background: var(--copper);
  color: #ffffff;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

/* Owner and admin marking. The bar has no close control on purpose. */
.admin-badge { margin-right: 0.25rem; }
.admin-bar {
  background: var(--ink);
  border-top: 2px solid var(--copper);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
}

/* Two step login. The QR is an inline SVG built in accounts/totp.py. */
.qr { margin: 0 0 0.75rem; }
.qr svg { display: block; max-width: 100%; height: auto; }
.secret-key {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  word-break: break-all;
}
.recovery-codes {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  list-style: none;
  padding-left: 0;
}

.signature { font-weight: 600; margin-top: 1.25rem; }

.foot {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 1.25rem 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.foot .links { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0; }
.foot .banner-verify { background: none; border-left: 0; padding: 0; font-weight: 600; color: var(--ink); }

@media (min-width: 40rem) {
  h1 { font-size: 2rem; }
  main { padding-top: 2rem; }
}

/* ------------------------------------------------------------------ */
/* The TalkRoof app flow                                              */
/* ------------------------------------------------------------------ */

.card form p, form.card > p { margin: 0 0 1rem; }
.card label, form.card label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.card input[type="text"],
.card input[type="number"],
.card select,
form.card input[type="text"],
form.card input[type="number"],
form.card select {
  width: 100%;
  max-width: 22rem;
  padding: 0.6rem;
  border: 1px solid var(--field-edge);
  border-radius: 6px;
  font: inherit;
  background: var(--card);
  color: var(--ink);
}
/* Phones (#132): a select drew 43 px tall, so every form control in the app
   flow is at least a 44 px tap target. */
.card input[type="text"],
.card input[type="number"],
.card select,
form.card input[type="text"],
form.card input[type="number"],
form.card select { min-height: 44px; }
.help { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Phones (#131): links on the address and confirm screens are 44 px tap
   targets, so a thumb can hit them without zooming. */
.tap-links { display: flex; flex-wrap: wrap; column-gap: 1.25rem; }
.tap-links a, a.tap-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
/* Phones (#134): these links sit on the page background, where the copper
   tint drops --copper-text to 4.4:1. The app's deeper press shade is 6.1:1 there. */
.tap-links a { color: var(--copper-text-press); }

/* The waiting page. */
.status { font-size: 1.15rem; font-weight: 600; }

/* Footprint outlines. Built server side, drawn with presentation attributes
   only, so the Content Security Policy needs no exception. */
.outline {
  display: block;
  max-width: 100%;
  height: auto;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.candidates { display: grid; gap: 1rem; }
.candidates .outline { color: var(--muted); }

/* The squares card. The verify banner and the report data line sit inside it and
   nothing hides them. */
.squares { border-left: 4px solid var(--copper); }
.figure { margin: 0 0 0.35rem; }
.figure.big { font-size: 1.25rem; }
.figure.big strong { font-size: 1.5rem; }
.report-line { font-variant-numeric: tabular-nums; }
.ordering { border-top: 1px solid var(--line); padding-top: 0.6rem; font-size: 0.95rem; margin-bottom: 0; }
.lower-confidence { border-left: 4px solid var(--warn); background: var(--warnbg); }
/* Phones (#132): next to a figure the software could not vouch for. Never
   hidden, and there is no "verified" counterpart. */
.unverified {
  display: inline-block;
  margin-left: 0.4rem;
  background: var(--warnbg);
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 4px;
  padding: 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
}

.figures { display: grid; gap: 0.4rem; }
.figures li { line-height: 1.4; }

/* Roof line lengths. Not validated yet (17a rule 4), so every one of them
   carries the prototype flag. */
.flag {
  display: inline-block;
  background: var(--warnbg);
  color: var(--warn);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: lowercase;
}
.edges { display: grid; gap: 0.75rem; }
.custom-lines { display: grid; gap: 1rem; }
/* At 200% zoom a 320 px phone is 160 px wide. In a wider font, a long word
   such as "Underlayment," in a price label ran 15 px past it, and an auto grid
   column never shrinks below its widest box (#282). */
main.wrap { overflow-wrap: break-word; }
.custom-lines { grid-template-columns: minmax(0, 1fr); }
.custom-lines li { border-top: 1px solid var(--line); padding-top: 0.75rem; }

table.lines { width: 100%; border-collapse: collapse; margin: 0 0 1rem; background: var(--card); }
table.lines caption { text-align: left; font-weight: 600; padding: 0.5rem 0; }
table.lines th, table.lines td {
  border: 1px solid var(--line);
  padding: 0.5rem;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
table.lines tfoot th, table.lines tfoot td { font-weight: 700; }

/* The lines table fits a phone (#282). Its box scrolls on its own, so even a
   browser without container queries never scrolls the page sideways. Where the
   box is narrower than the table needs (32rem, which grows with the text), each
   line stacks: its name, then quantity, rate and amount, each beside its column
   name. The template gives the table explicit roles, so it is still read as a
   table once its cells are blocks. */
.lines-box { position: relative; overflow-x: auto; margin: 0 0 1rem; container-type: inline-size; }
.lines-box table.lines { margin: 0; }
@container (max-width: 32rem) {
  table.lines, table.lines caption, table.lines tbody, table.lines tfoot,
  table.lines tr, table.lines th, table.lines td { display: block; }
  table.lines { background: transparent; }
  table.lines thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.lines tr { background: var(--card); border: 1px solid var(--line); margin: 0 0 0.5rem; padding: 0.25rem 0; }
  table.lines th, table.lines td { border: 0; padding: 0.25rem 0.75rem; overflow-wrap: anywhere; }
  table.lines td { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; }
  table.lines td::before { content: attr(data-label); }
  table.lines tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; }
}

/* The finalize step: notice 5 per pitch group, then notice 2. Nothing here hides
   the verify line or the ordering guidance; they sit in the squares card as they
   do on the review and estimate screens. */
.pitch-group { border-top: 1px solid var(--line); padding-top: 0.9rem; margin-top: 0.9rem; }
.pitch-group:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.pitch-group h3 { margin: 0 0 0.4rem; }
.pitch-prompt { margin-bottom: 0.6rem; }
.pitch-group form.inline { margin-right: 0.75rem; }
.ack { display: flex; gap: 0.6rem; align-items: flex-start; line-height: 1.45; }
/* Phones (#133): the acknowledgment box is a 44 px tap target. */
.ack input[type="checkbox"] { width: 44px; height: 44px; margin: 0; flex: none; }
/* Phones (#134): copper text was 3.04:1 on a white card; --copper-text is 5.48:1. */
.done { color: var(--copper-text); font-weight: 600; margin: 0.35rem 0; }
button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ------------------------------------------------------------------ */
/* Look and feel refresh, 2026-10-05, for Rob Harris.                   */
/* Merged into master 2026-10-06: the header shows the TalkRoof lockup  */
/* only (no separate product mark; the product name stays as the link's */
/* hidden text), the eyebrow words come from copy.py, and the images    */
/* are in static/img/ so they load on app.talkroof.com. Brand matches   */
/* talkroof.com: white header with copper rule, TalkRoof lockup, copper */
/* buttons with dark text, warm paper background, card forms.           */
/* ------------------------------------------------------------------ */
:root { --copper-text: #B24715; --copper-text-press: #8E3911; --copper-hover: #EA7B46; --focus: #B24715; }
body { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 17px; background: radial-gradient(70% 50% at 85% 0%, rgba(232,114,58,.10), transparent 70%), var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
a { color: var(--copper-text); text-underline-offset: 3px; }
a:hover { color: var(--copper-text-press); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline-color: var(--copper); }

/* Header */
header.top { background: #fff; color: var(--ink); border-bottom: 3px solid var(--copper); box-shadow: 0 1px 0 rgba(27,31,36,.04); }
header.top .wrap { max-width: 72rem; padding-left: 1.25rem; padding-right: 1.25rem; }
.top-row { min-height: 68px; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; font-size: 0; }
.brand::before { content: ""; display: block; width: 156px; height: 31px; background: url("../img/talkroof-horizontal-standard-on-light.53fb3f0d20d5.svg") left center / contain no-repeat; }
.nav { gap: 1.25rem; }
.nav a { color: var(--ink); font-weight: 600; font-size: 1rem; }
.nav a:hover { color: var(--copper-text); text-decoration: none; }
.nav .button, .nav .button.small { color: var(--ink); background: var(--copper); border-radius: 10px; padding: .55rem 1rem; font-weight: 800; }
.nav .button:hover { background: var(--copper-hover); color: var(--ink); }
.link-button { color: var(--ink); font-weight: 600; }

/* Buttons */
.button, button[type="submit"] { color: var(--ink); border-radius: 10px; padding: .8rem 1.3rem; font-weight: 800; min-height: 48px; transition: background .15s ease; }
.button:hover, button[type="submit"]:hover { background: var(--copper-hover); }
button[type="submit"][disabled], button[type="submit"][disabled]:hover { background: #DDD7CE; color: #6E6A63; }

/* Fields */
.field label { font-size: .95rem; font-weight: 700; margin-bottom: .35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="password"] { min-height: 48px; padding: .7rem .85rem; border: 1px solid var(--field-edge); border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus { border-color: var(--copper); box-shadow: 0 0 0 4px rgba(232,114,58,.18); outline: none; }
.field .help { font-size: .88rem; }

/* Card pages: log in, create account, password and verification screens, and Why we built this */
main:has(> form[action*="/auth/"]), main:has(> .signature) {
  width: calc(100% - 2rem); max-width: 30rem; margin: 2.5rem auto 3rem; padding: 2rem 2rem 1.5rem;
  background: #fff; border: 1px solid #E8E1D6; border-radius: 22px; box-shadow: 0 30px 70px -40px rgba(27,31,36,.45);
}
main:has(> form[action*="/auth/signup"]) { max-width: 36rem; }
main:has(> .signature) { max-width: 42rem; padding: 2.5rem 2.5rem 2rem; }
main:has(> form[action*="/auth/"]) h1 { font-size: 1.9rem; letter-spacing: -.02em; margin-bottom: .35rem; }
main:has(> form[action*="/auth/"]) h1 + form { margin-top: 1.25rem; }
main:has(> form[action*="/auth/"]) .lead { color: var(--muted); font-size: 1rem; margin-bottom: 1.4rem; }
main:has(> form[action*="/auth/"]) button[type="submit"] { display: block; width: 100%; margin-top: .25rem; }
main:has(> form[action*="/auth/"]) > p { text-align: center; color: var(--muted); font-size: .95rem; margin: 1rem 0 0; }
main:has(> form[action*="/auth/"]) > p + p { margin-top: .4rem; }
main:has(> form[action*="/auth/"]) > p a { font-weight: 700; }

/* Create account: legal notice and agreement keep their full wording */
.notice { background: #FBF8F4; border: 1px solid #ECE5DB; border-radius: 12px; padding: .8rem .95rem; font-size: .92rem; color: #3D4852; line-height: 1.5; }
.accept { gap: .7rem; padding: .85rem .95rem; border: 1px solid #ECE5DB; border-radius: 12px; font-size: .92rem; line-height: 1.5; }
.accept input { accent-color: var(--copper); width: 1.25rem; height: 1.25rem; margin-top: .1rem; }
/* With large text a long word in the notice wraps instead of pushing the page sideways. */
.accept label { min-width: 0; overflow-wrap: anywhere; }

/* Why we built this */
main:has(> .signature) h1 { font-size: 2.1rem; letter-spacing: -.02em; margin-bottom: 1.1rem; }
main:has(> .signature) .eyebrow { display: block; margin: 0 0 .6rem; color: var(--copper-text); font-size: .8rem; font-weight: 800; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; }
main:has(> .signature) h1 + p { font-size: 1.35rem; font-weight: 700; color: var(--ink); }
main:has(> .signature) p { line-height: 1.7; color: #3D4852; }
.signature { display: flex; align-items: center; gap: .9rem; margin: 1.6rem 0 1.4rem; padding-top: 1.3rem; border-top: 1px solid #ECE5DB; color: var(--ink) !important; font-weight: 800; }
.signature::before { content: ""; width: 56px; height: 56px; flex: none; border-radius: 50%; background: url("../img/rob-harris-headshot-400.516df784fc93.jpg") center / cover no-repeat; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #E9DFD2; }
main:has(> .signature) .actions { margin: 0; }

/* Footer */
.foot { background: transparent; border-top: 1px solid #E5DED4; padding: 1.25rem 0 1.5rem; font-size: .88rem; text-align: center; }
.foot .wrap { max-width: 72rem; }
.foot p { margin: 0 0 .35rem; }
.foot .banner-verify { font-weight: 700; }
.foot .links { justify-content: center; gap: 1.25rem; margin-top: .5rem; }
.foot .links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot .links a:hover { color: var(--copper-text); }

@media (max-width: 40rem) {
  .brand::before { width: 128px; height: 26px; }
  .nav { width: 100%; margin-left: 0; gap: .9rem; }
  main:has(> form[action*="/auth/"]), main:has(> .signature) { margin: 1.25rem auto 2rem; padding: 1.5rem 1.25rem 1.25rem; border-radius: 18px; }
  main:has(> .signature) h1 { font-size: 1.7rem; }
}
main:has(> form[action*="/auth/"]), main:has(> .signature) { flex: 0 0 auto; }
.foot { margin-top: auto; }
main:has(> form[action*="/auth/"]) > p.lead { text-align: left; margin: 0 0 1.4rem; }
/* Button polish (Rob, 2026-10-05): text centered in every button; header button sized to the nav */
.button, button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
.nav .button, .nav .button.small { min-height: 40px; padding: 0 1rem; font-size: .95rem; }
main:has(> form[action*="/auth/"]) button[type="submit"] { display: flex; }
/* Waiting for the agreement box: a soft copper outline, not a grey slab */
button[type="submit"][disabled], button[type="submit"][disabled]:hover { background: #FFF4EC; color: #B8673E; border: 1.5px dashed #EDB896; opacity: 1; }
.lidar-source + .lidar-source { border-top: 1px solid var(--line); margin-top: 0.75rem; padding-top: 0.75rem; }
.lidar-source p, .lidar-source a, .lidar-source blockquote { overflow-wrap: anywhere; }
.lidar-source blockquote { margin: 0.5rem 0; padding-left: 0.75rem; border-left: 3px solid var(--line); }

/* ------------------------------------------------------------------ */
/* Printing (#172). On paper there is nothing to tap, so on every page the
   header and its nav, the admin bar, the estimate's price form, every button
   and link drop out. Other forms stay: on the measurements and finalize screens
   a notice sits inside the form, and a notice is never hidden.
   The clean printed estimate is only laid out on the print page (.print-sheet),
   which the server refuses until this version has its pitch confirmed and the
   acknowledgment checked, like the two PDFs. There the lines print as a real
   table on any page width: column names repeat on every page, a line never
   splits across two pages, and the total prints once, at the end. Nothing
   relies on a background color. The estimate screen prints as it looks on
   screen. Screen styles are untouched. */
@media print {
  @page { size: letter; margin: 0.5in; }
  html, body { background: #fff; color: #000; }
  body { font-size: 11pt; }
  header.top, .admin-bar, .skip, nav, form.price-form, button, .button, a.button,
  .links, .tap-links, .foot .links { display: none !important; }
  .wrap, .foot .wrap { max-width: none; padding: 0; }
  main { padding: 0; }
  .card, .notice, .banner-verify, .guidance { background: none; border-color: #999; break-inside: avoid; }
  h1, h2, caption { break-after: avoid; }
  .print-sheet .lines-box { overflow: visible; container-type: normal; }
  .print-sheet table.lines { display: table; background: none; }
  .print-sheet table.lines thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .print-sheet table.lines tbody { display: table-row-group; }
  .print-sheet table.lines tfoot { display: table-row-group; }
  .print-sheet table.lines tr { display: table-row; break-inside: avoid; }
  .print-sheet table.lines th, .print-sheet table.lines td { display: table-cell; border: 1px solid #999; }
  /* Line names wrap; quantities, rates and amounts never break mid number. */
  .print-sheet table.lines tbody th { overflow-wrap: anywhere; }
  .print-sheet table.lines td { white-space: nowrap; overflow-wrap: normal; }
  .print-sheet table.lines td::before { content: none; }
  /* The LiDAR source credit may run past a page: each source stays whole, and
     a long address wraps instead of running off the paper. */
  .print-sheet .lidar-sources { break-inside: auto; }
  .print-sheet .lidar-source { break-inside: avoid; }
  .print-sheet .lidar-sources a { color: #000; overflow-wrap: anywhere; }
  .foot { border-top: 1px solid #999; padding: 0.5rem 0 0; margin-top: 1rem; }
  /* Shown on screen only, such as the site footer on the print page (LOCK-131). */
  .screen-only { display: none !important; }
}

/* The roof outline (bidbuilder/roof_lines.py): the engine's roof lines on the
   dark roof canvas, one color and dash per kind. Brand colors are presentation
   attributes in the SVG; the colorblind-safe set (Okabe-Ito) replaces them when
   roof-lines.js adds rl-safe. */
.roof-lines { margin: 0 0 1rem; padding: 1rem; background: #0B1219; color: #ECE8E1; border-radius: 12px; }
.roof-lines h2 { color: #ECE8E1; margin: 0 0 .25rem; }
.roof-lines .rl-lead { color: #ECE8E1; margin: 0 0 .75rem; }
.rl-canvas { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.rl-legend { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .35rem; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); }
.rl-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-height: 44px; padding: 0 .5rem; background: #121C28; border-radius: 8px; }
.rl-swatch { flex: none; }
.rl-name { font-weight: 600; }
.rl-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.rl-none .rl-total, .rl-yours { color: #ECE8E1; font-weight: 400; font-style: italic; }
.rl-switch { display: flex; align-items: center; gap: .5rem; min-height: 44px; margin-top: .5rem; color: #ECE8E1; }
.rl-switch[hidden] { display: none; }
.rl-switch input { width: 22px; height: 22px; accent-color: #E8723A; }
.roof-lines.rl-safe .rl-ridge { stroke: #E69F00; }
.roof-lines.rl-safe .rl-hip { stroke: #CC79A7; }
.roof-lines.rl-safe .rl-valley { stroke: #009E73; }
.roof-lines.rl-safe .rl-rake { stroke: #56B4E9; }
.roof-lines.rl-safe .rl-eave { stroke: #F0E442; }
.roof-lines.rl-safe .rl-step { stroke: #D55E00; }
.roof-lines.rl-safe .rl-wall { stroke: #C9D3DA; }
.roof-lines.rl-safe .rl-flat { stroke: #8B97A8; }
.roof-lines.rl-safe .rl-other { stroke: #8B97A8; }

/* ------------------------------------------------------------------ */
/* The confirm step's aerial and its switch (bidbuilder/aerial.py).    */
/* No motion anywhere on the step. The credit is never hidden.         */
/* ------------------------------------------------------------------ */
.view-switch { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.75rem; }
.view-switch a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.view-switch a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 600; }
.view-switch[hidden], .view-panel[hidden], .aerial-fallback[hidden] { display: none; }
.aerial { position: relative; max-width: 640px; margin: 0 0 0.4rem; }
.aerial-canvas { display: block; width: 100%; height: auto; border-radius: 10px; background: #0B1219; }
/* The aerial credit: on the map, at its bottom edge, never covered. */
.aerial-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 0 0 10px 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #323232;
  font-size: 0.75rem;
  line-height: 1.35;
}
.aerial-credit span { margin-right: 0.4rem; }

@media (prefers-reduced-motion: reduce) {
  .aerial, .aerial *, .view-switch a { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Phones (#158): header and footer links are 44 by 44 CSS px tap targets.
   932 px is the widest phone the phone checks open (430 by 932 on its side).
   The logo art and the footer type stay under 44 px at 200% root font size
   unless the minimum is in px, so min-height and min-width are px, not rem.
   The nav's Create account link is a .button.small whose own rule is 40 px
   tall, so the second rule is specific enough to win on a phone. */
@media (max-width: 932px) {
  header.top .brand,
  header.top .nav a,
  header.top .nav .link-button,
  footer.foot .links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  header.top .nav a.button,
  header.top .nav a.button.small {
    min-width: 44px;
    min-height: 44px;
  }
}

/* The customer's delivery page (B7). At 200% text on a 320 px phone the button
   and the total must stay inside their card: side padding shrinks with the
   screen, the button takes the full width and wraps, and the total gets its own
   line. */
.wrap.delivery { padding: 0 min(1rem, 4vw); }
.delivery .card { padding: 1rem min(1rem, 4vw); }
.delivery .figure.big strong { display: block; overflow-wrap: anywhere; }
.delivery .button { display: block; text-align: center; padding: 0.7rem min(1.1rem, 4vw); overflow-wrap: anywhere; }
/* The homeowner's roof photo (LOCK-143 part (b)): full width on phones, the
   credit kept on the photo's bottom edge by .aerial-credit. Light mode only. */
.delivery .delivery-aerial { max-width: none; margin: 1rem 0; }
.delivery .delivery-aerial .aerial-canvas { background: #E9EEF2; }
