/* Vivid Land Survey — "Survey tape": white, deep navy ink, a yellow tape for whatever is being measured. */

/* Fonts are self-hosted (SIL Open Font License, fonts/OFL.txt). Plex Sans is one variable file for every weight. */
@font-face { font-family: 'IBM Plex Sans'; font-weight: 100 700; font-style: normal; font-display: swap; src: url('fonts/IBMPlexSans-var.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/IBMPlexMono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/IBMPlexMono-600.woff2') format('woff2'); }

:root {
  --bg: #FFFFFF; --ink: #16213A; --muted: #6B7385; --line: #E3E6EE; --field: #F3F5F9;
  --tape: #F5B800; --tape-light: #FFF8E1; --ok: #2E9E6A; --warn: #B4541A; --bad: #B42318;
  --ok-wash: #E6F5ED; --bad-wash: #FDECEA; --info-wash: #E8EEFB; --info: #2F4FA3;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --r: 14px; --tap: 48px;
  --shadow: 0 1px 2px rgba(22, 33, 58, .05), 0 10px 28px -16px rgba(22, 33, 58, .22);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; touch-action: manipulation; }
/* Nothing may scroll sideways, without making html or body a scroll container (overflow-x: hidden on
   body broke momentum scrolling and the sticky top bar in iOS WebKit). Browsers without clip ignore it. */
html, body { overflow-x: clip; }
body.has-live .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--sans); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.3rem; line-height: 1.2; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }
h3 { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 10px; }
.mono, .hero, .hero2, .stepper b, .live b, .edge input.n { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-weight: 500; }
.eyebrow { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* focus: every control shows where it is */
:focus { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible, .btn:focus-visible, .box:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--tape);
}

/* layout: one column; a 640px column from 641px; drawing + panel side by side from 960px */
.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
@media (min-width: 960px) { .wrap { max-width: 1040px; } }

/* top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; margin: 0 -16px 14px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--tape); opacity: .9; }
.bar .back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -8px; font-size: 2rem; line-height: 1; color: var(--ink); border-radius: 12px; text-decoration: none; }
.bar .back:active { background: var(--field); }
.ttl { flex: 1; min-width: 0; }
.ttl h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* connection / sync state: a dot and a word */
.sync, .pill { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.sync::before, .pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.sync.on::before, .pill.on::before { background: var(--ok); }
.sync.busy::before { background: var(--tape); animation: pulse 1s ease-in-out infinite; }
.sync.off::before, .pill.off::before { background: var(--warn); }
.sync.err::before { background: var(--bad); }
.sync.off, .pill.off { color: var(--warn); }
.sync.err { color: var(--bad); }
.sync.wait::before { background: var(--tape); }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

/* the sync line on the projects screen: state on the left, Sync now on the right */
.syncbar { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0 0 14px; padding: 4px 4px 4px 14px; background: var(--field); border-radius: 12px; }
.syncbar .sync { flex: 1; min-width: 0; font-size: .86rem; white-space: normal; color: var(--ink); }
.syncbar .sync.off { color: var(--warn); } .syncbar .sync.err { color: var(--bad); }
/* plot search on the Projects screen: the box, and our own × in place of the browser's */
.searchbar { position: relative; margin: 0 0 14px; }
.searchbar input { padding-right: 52px; }
.searchbar input::-webkit-search-cancel-button, .searchbar input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.searchbar .qx { position: absolute; top: 0; right: 0; bottom: 0; width: 48px; min-height: var(--tap); padding: 0; font: 400 1.5rem/1 var(--sans); color: var(--muted); background: transparent; border-color: transparent; }
.searchbar .qx[hidden], #start[hidden] { display: none; }
/* `hidden` always hides, whatever display a class gives (#addrow is .stack: grid; #choose is .row2: flex). */
[hidden] { display: none !important; }
.syncbar button, .syncbar .btn { flex: none; min-height: 44px; padding: 8px 14px; font-size: .9rem; color: var(--ink); background: #fff; border-color: var(--line); }

/* top-bar menu */
.menu { position: relative; flex: none; }
.menu > summary { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; list-style: none; cursor: pointer; border-radius: 12px; font-size: 1.4rem; line-height: 1; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:active, .menu[open] > summary { background: var(--field); }
.menu .pop { position: absolute; right: -8px; top: 50px; z-index: 30; width: min(280px, calc(100vw - 32px)); padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px -12px rgba(22, 33, 58, .35); }
.menu .who { margin: 4px 10px 8px; font-size: .82rem; color: var(--muted); }
.menu .who b { display: block; font-size: .95rem; color: var(--ink); }
.menu .pop button { width: 100%; justify-content: flex-start; min-height: 46px; padding: 10px; font-weight: 500; color: var(--ink); background: transparent; border-color: transparent; }
.menu .pop button.danger { color: var(--bad); }
.menu .pop .hint { margin: 0 10px 8px; font-size: .78rem; }
.menu .pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
@media (hover: hover) { .menu .pop button:hover:not(:disabled) { background: var(--field); } }

/* project cards and plot rows */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.item .s .mono { color: var(--ink); font-size: .84rem; }
.item .side-chips { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.ro { padding: 12px 14px; background: var(--field); border-radius: 12px; min-height: var(--tap); }

/* sign-in */
.brand { display: flex; align-items: center; gap: 12px; margin: 48px 0 28px; }
.brand .logo { display: block; flex: none; width: 56px; height: 56px; }
.brand .t1 { font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.brand .t2 { font-size: .82rem; color: var(--muted); }
.signin button.block { margin-top: 20px; }
.signin .hint { margin-top: 16px; }

/* cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.grid { display: block; }
.side { margin-top: 0; }
@media (min-width: 960px) {
  .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .side { position: sticky; top: 84px; }
  .live { display: none !important; }
  body.has-live .wrap { padding-bottom: 48px; }
}

/* forms */
label { display: block; margin: 14px 0 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
label:first-child, h2 + label { margin-top: 0; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 12px 14px; font: inherit; color: var(--ink); background: var(--field); border: 1.5px solid transparent; border-radius: 12px; appearance: none; -webkit-appearance: none; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%236B7385' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { background-color: var(--tape-light); border-color: var(--tape); }
input[readonly], input[readonly]:focus { color: var(--muted); background-color: var(--field); border-color: transparent; }
::placeholder { color: #9AA1B3; }
.cols2, .cols3, .cols4, .cols1 { display: grid; gap: 12px; }
.cols2 { grid-template-columns: 1fr 1fr; } .cols1 { grid-template-columns: 1fr; }
.cols3 { grid-template-columns: repeat(3, 1fr); }
.cols4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 400px) { .cols4 { grid-template-columns: 1fr 1fr; } .cols3 { grid-template-columns: 1fr 1fr; } }

/* buttons: navy is the main action, tape yellow is the call to measure, ghost is the quiet one */
button, .btn { min-height: var(--tap); padding: 12px 18px; font: 600 1rem/1.2 var(--sans); color: #fff; background: var(--ink); border: 1.5px solid var(--ink); border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; user-select: none; -webkit-user-select: none; transition: transform .06s, background .15s; }
button:active, .btn:active { transform: scale(.98); }
button.ghost, .btn.ghost { color: var(--ink); background: var(--field); border-color: var(--field); }
button.tape, .btn.tape { color: var(--ink); background: var(--tape); border-color: var(--tape); }
button.danger { color: var(--bad); background: #fff; border-color: #EBC4BF; }
button.block, .btn.block { width: 100%; }
.btn.block { display: flex; margin-top: 12px; }
.stack .btn.block { margin-top: 0; }
button.linkish { display: inline; min-height: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; text-decoration: underline; text-decoration-color: var(--tape); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.row2 { display: flex; gap: 10px; margin-top: 12px; }
.row2 > * { flex: 1; min-width: 0; }
input + button.block, textarea + button.block { margin-top: 18px; }
button:disabled { opacity: .4; cursor: not-allowed; transform: none; }
button.sm { min-height: 44px; padding: 8px 14px; }
button.icon { width: 48px; min-width: 48px; padding: 0; font-size: 1.05rem; }
.stack { display: grid; gap: 10px; margin-top: 12px; } .stack.tight { margin: 0 0 14px; }
/* Save or share: two buttons a row on a phone; a label that is long for its half wraps, never overflows. */
.exports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.exports button { min-width: 0; padding: 10px 8px; font-size: .92rem; text-align: center; white-space: normal; overflow-wrap: anywhere; }
#exportcard .hint { margin: 10px 0 0; }
#exportcard .hint:empty { display: none; }
@media (hover: hover) {
  button:hover:not(:disabled), .btn:hover { background: #24325A; }
  button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--line); }
  button.tape:hover:not(:disabled), .btn.tape:hover { background: #FFC81F; }
  a.item:hover { border-color: #C9CEDB; }
}

/* segmented control + stepper */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--field); border-radius: 14px; gap: 4px; }
.seg button { color: var(--muted); background: transparent; border: 0; min-height: 46px; border-radius: 10px; }
.seg button.on { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(22, 33, 58, .18); }
.stepper { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stepper button { width: var(--tap); padding: 0; font-size: 1.5rem; }
.stepper b { font-size: 1.6rem; font-weight: 600; min-width: 1.5em; text-align: center; }
.stepper .hint { flex: 1 1 150px; margin: 0; }

/* lists */
.list { margin-bottom: 14px; }
a.item { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px 16px; margin-bottom: 10px; color: inherit; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
a.item:active { background: var(--field); }
.item .main { flex: 1; min-width: 0; }
.item .t { font-weight: 600; font-size: 1.05rem; }
.item .s { font-size: .84rem; color: var(--muted); }
.kitta { font-size: .78rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.chev { color: #B3B9C8; font-size: 1.6rem; }
.empty { text-align: center; color: var(--muted); padding: 30px 12px; }
.hint { font-size: .86rem; color: var(--muted); margin: 6px 0 12px; }
.hint.center { text-align: center; margin: 8px 0 12px; }
.muted { color: var(--muted); font-size: .85rem; }
.dot, .okdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--tape); }
.okdot { background: var(--ok); }

/* chips */
.chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: 4px 11px; border-radius: 99px; white-space: nowrap; background: var(--field); color: var(--muted); }
.chip.draft { background: var(--field); color: var(--muted); }
.chip.measured { background: var(--info-wash); color: var(--info); }
.chip.attention { background: var(--bad-wash); color: var(--bad); }
.chip.verified { background: var(--ok-wash); color: #1F7A50; }
.chip.rem { background: var(--tape-light); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--tape); }
.chip.wait { background: var(--tape-light); color: var(--ink); }
.chip.locked { background: var(--field); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* notices */
.banner { margin: 0 0 14px; padding: 12px 14px; font-size: .9rem; background: var(--tape-light); border-left: 4px solid var(--tape); border-radius: 0 12px 12px 0; }
.banner.bad { background: var(--bad-wash); border-left-color: var(--bad); color: var(--bad); }
.banner.ok { background: var(--ok-wash); border-left-color: var(--ok); }
.banner.view { background: var(--field); border-left-color: var(--ink); }
.banner.warn { background: #FBEFE6; border-left-color: var(--warn); color: #7A3810; }
.banner p { margin: 0 0 8px; }
.banner .muted { font-size: .82rem; }
a.banner.remb { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
a.banner.remb span:first-child { flex: 1; min-width: 0; }
a.banner.remb .chev { font-size: 1.6rem; color: var(--ink); }
.banner > :last-child { margin-bottom: 0; }

/* Install app: a slim card under the sync line, a link on sign-in, and the iPhone steps sheet */
.install { margin: 0 0 14px; padding: 12px 14px; font-size: .9rem; background: var(--tape-light); border: 1px solid var(--ink); border-radius: 12px; }
.install p { margin: 0 0 10px; }
.install-act { display: flex; flex-wrap: wrap; gap: 8px; }
.install-act button { min-height: 44px; padding: 8px 14px; font-size: .9rem; }
.install-act button.ghost { background: transparent; border-color: transparent; }
.install-link { margin: 4px 0 0; }
.install-link button.linkish { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-align: left; }
.inst-back { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; background: rgba(22, 33, 58, .4); }
.inst-sheet { width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(22, 33, 58, .18); animation: rise .2s ease-out; }
@media (min-width: 641px) { .inst-back { align-items: center; } .inst-sheet { border-radius: var(--r); } }
.inst-top { display: flex; align-items: flex-start; gap: 8px; }
.inst-top h2 { flex: 1; min-width: 0; margin: 10px 0 12px; }
.inst-x { flex: none; width: 44px; min-width: 44px; min-height: 44px; padding: 0; color: var(--ink); background: transparent; border-color: transparent; margin-right: -8px; }
.inst-steps { margin: 0 0 6px; padding: 0; list-style: none; counter-reset: inst; }
.inst-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); counter-increment: inst; }
.inst-steps li:last-child { border-bottom: 1px solid var(--line); }
.inst-steps li > span:last-child { flex: 1; min-width: 0; }
.inst-steps li > span:last-child::before { content: counter(inst) ". "; font-weight: 600; }
.inst-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--info); background: var(--field); }
.inst-sheet .hint { margin: 10px 0 14px; }
@media (hover: hover) { .install-act button.ghost:hover:not(:disabled), .inst-x:hover:not(:disabled) { background: var(--field); } .install-link button.linkish:hover { background: none; } }

/* collapsible sections */
details.fold { padding: 0; }
details.fold > summary { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 14px 18px; list-style: none; cursor: pointer; font-weight: 600; font-size: 1.08rem; border-radius: var(--r); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "›"; margin-left: auto; font-size: 1.5rem; color: #B3B9C8; transition: transform .15s; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold > summary .peek { margin-left: auto; font: 400 .82rem var(--sans); color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold > summary .peek + * { margin-left: 0; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; margin-bottom: 14px; }
details.fold > *:not(summary) { margin-left: 18px; margin-right: 18px; }
details.fold > *:last-child { margin-bottom: 18px; }
details.fold > select, details.fold > input, details.fold > textarea, details.fold > table { width: calc(100% - 36px); }
details.fold > button.block { width: calc(100% - 36px); margin-top: 14px; }

/* measurements */
.edge { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 4px 8px; margin-bottom: 14px; }
.edge .nm { font-weight: 700; font-size: 1.1rem; }
.edge .in { display: flex; align-items: center; gap: 5px; min-width: 0; }
.edge input.n { flex: 1; min-width: 0; padding-left: 6px; padding-right: 6px; text-align: center; font-size: 1.1rem; font-weight: 500; }
.edge input.wide { text-align: left; }
.edge .u { color: var(--muted); font-size: .85rem; width: 1.2em; }
.edge .chk { grid-column: 2; font-size: .8rem; color: var(--muted); }
.chk.ok { color: var(--ok); } .chk.bad { color: var(--bad); font-weight: 600; }
.adddiag { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; margin-top: 8px; }
.adddiag span { color: var(--muted); }

/* feet / inches boxes: read-only displays the pad types into; the one being typed in is outlined in tape */
.boxes { display: flex; gap: 10px; }
.box { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 5px 12px; background: var(--field); border: 1.5px solid transparent; border-radius: var(--r); color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.box.on { background: var(--tape-light); border-color: var(--tape); }
.box .v { min-width: 0; overflow: hidden; white-space: nowrap; font: 600 1.6rem/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.box .v:empty::before { content: attr(data-ph); color: #B3B9C8; }
/* just selected: a light dashed outline says the next key replaces the value (not a text-selection
   tint: ⌫ removes one character, not all of it); after that a caret (no blink) */
.box.on.fresh .v { outline: 1.5px dashed var(--tape); outline-offset: 1px; border-radius: 4px; }
.box.on:not(.fresh) .v::after { content: ""; display: inline-block; width: 2px; height: .95em; margin-left: 2px; vertical-align: -.12em; background: var(--ink); }
.box .u { flex: none; font-size: .68rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.box .u .short { display: none; }
.box.long .u .long { display: none; }
.box.long .u .short { display: inline; }

/* result */
.rhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rhead h2 { margin: 0; }
.hero { font-size: 2.1rem; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.hero small, .hero2 small { font: 500 .9rem var(--sans); color: var(--muted); letter-spacing: 0; }
.hero2 { font-size: 1.35rem; font-weight: 600; color: var(--ink); margin: 2px 0 12px; }
table.t { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 4px 0 8px; }
table.t td, table.t th { padding: 9px 2px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t td:last-child, table.t th:last-child { text-align: right; }
.okt { color: var(--ok); } .warnt { color: var(--warn); }
ul.msg { margin: 8px 0 14px; padding-left: 20px; font-size: .9rem; }
ul.msg li { margin-bottom: 4px; } ul.msg li.e { color: var(--bad); } ul.msg li.w { color: var(--warn); }
.flash { margin: 10px 0 0; padding: 12px 14px; font-size: .9rem; color: var(--bad); background: var(--bad-wash); border-left: 4px solid var(--bad); border-radius: 0 12px 12px 0; }
/* a passing check line (.chk.ok, .ms-chk.ok) is only green text; a boxed "done" notice is .oknote */
.oknote { margin: 10px 0 0; padding: 12px 14px; font-size: .9rem; font-weight: 600; color: #1F7A50; background: var(--ok-wash); border-left: 4px solid var(--ok); border-radius: 0 12px 12px 0; }
.sketch { cursor: zoom-in; }
.sketch svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.saved { margin: -4px 4px 14px; text-align: right; font-size: .78rem; color: var(--muted); }

/* bottom sheet: the panel you type measurements into (a sticky card beside the drawing from 960px) */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; max-width: 640px; margin: 0 auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(22, 33, 58, .10); animation: rise .2s ease-out; }
.sheet::before { content: ""; display: block; width: 36px; height: 4px; margin: 0 auto 12px; border-radius: 2px; background: var(--line); }
.sheet .side-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em; margin: 2px 0 12px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 960px) {
  .sheet { position: sticky; top: 84px; max-width: none; margin: 0; border: 1px solid var(--line); border-radius: var(--r); padding-bottom: 18px; box-shadow: var(--shadow); animation: none; }
  .sheet::before { display: none; }
}

/* tap-a-side measuring: sides picker, drawing, sheet */
.ms [hidden] { display: none !important; }
.ms-q { font-size: 1.15rem; margin: 2px 0 14px; }
.ms-shapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
button.ms-shape { flex-direction: column; gap: 2px; min-height: 104px; padding: 10px 4px 8px; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r); }
.ms-shape svg { display: block; }
.ms-shape b { font: 600 1.25rem/1.1 var(--mono); }
.ms-shape span { font: 500 .75rem/1.2 var(--sans); color: var(--muted); }
button.ms-shape.on { background: var(--tape-light); border-color: var(--tape); box-shadow: inset 0 0 0 1px var(--tape); }
.ms-morebtn { margin-top: 10px; }
.ms-morebtn.on { background: var(--tape-light); border-color: var(--tape); }
.ms-step { margin-top: 12px; }
.ms-pick > button.block[data-act="draw"] { margin-top: 4px; }
.ms-cancel { margin-top: 10px; }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.ms-draw { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 6px 4px 2px; }
.ms-draw svg { display: block; width: 100%; height: auto; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.ms-draw .hit { cursor: pointer; }
.ms-draw .hit:focus { outline: none; box-shadow: none; }
.ms-draw .hit:focus-visible { outline: none; box-shadow: none; stroke: var(--tape); stroke-opacity: .55; }
.ms-cap { font-size: .8rem; color: var(--muted); margin: 9px 4px 12px; }
.ms-cap b { color: var(--ink); }
.ms-cap .mono { color: var(--ink); font-size: .9rem; }
/* the sheet: a one-line header, the boxes, the pad */
.ms-sheet { touch-action: manipulation; }
.ms-sheet::before { display: none; }
.ms-top { display: flex; align-items: center; gap: 8px; min-height: 28px; margin: 0 0 6px; }
.ms-title { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.ms-title .eyebrow { white-space: nowrap; }
.sheet .ms-title .side-name { display: inline-block; margin: 0; font-size: 1.2rem; white-space: nowrap; }
.ms-sofar { flex: 0 1 auto; min-width: 0; text-align: right; font-size: .78rem; line-height: 1.1; }
.ms-sofar .eyebrow { margin-right: 2px; }
.ms-area { font: 600 .78rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.ms-area span { white-space: nowrap; }
.ms-area .rapd { display: block; font-weight: 500; color: var(--muted); }   /* sq ft, then R-A-P-D under it */
.ms-sheet .ms-x { flex: none; width: 44px; min-width: 44px; min-height: 44px; margin: -7px -10px -7px 0; background: transparent; border-color: transparent; }
.ms-chk { margin: 6px 2px 0; font-size: .8rem; line-height: 1.3; color: var(--muted); }
.ms-chk:empty { display: none; }
.ms-chk.ok { color: var(--ok); } .ms-chk.bad { color: var(--bad); font-weight: 600; }
/* the number pad: 4 × 4, the last row's Next spans two */
.pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.pad button { min-width: 0; min-height: 48px; padding: 0 4px; color: var(--ink); background: var(--field); border-color: var(--field); border-radius: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: manipulation; -webkit-touch-callout: none; }
.pad .num { font: 600 1.45rem/1 var(--mono); }
.pad .fn { font: 600 .95rem/1.1 var(--sans); }
.pad [data-key="back"] { font-size: 1.3rem; touch-action: none; }
.pad .next { grid-column: span 2; color: #fff; background: var(--ink); border-color: var(--ink); font: 600 1rem/1.1 var(--sans); }
.ms-sheet.adding .boxes, .ms-sheet.adding .ms-chk, .ms-sheet.adding .ms-note, .ms-sheet.adding .pad { display: none; }
.ms-note { margin: 6px 0 2px; }
.ms-note-in { width: 100%; font-size: 16px; }   /* 16px: iOS does not zoom the page on focus */
.ms-note-in[hidden], .ms-note [hidden] { display: none; }
.ms-capnote { color: var(--muted); font-size: .85rem; }
.ms-add { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.ms-add:empty { display: none; }
.ms-add .hint { flex: 1 1 100%; margin: 0; }
.ms-add .ms-msg { flex: 1 1 100%; }
.ms-add .ms-msg .flash { margin: 0; }
.ms-corners { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-corners button { width: 44px; min-width: 44px; min-height: 44px; padding: 0; font-weight: 700; }
.ms-corners button.on { color: var(--ink); background: var(--tape); border-color: var(--tape); }
/* under the drawing while the sheet is open: remove this check, add one across */
.ms-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ms-tools button { font-size: .9rem; padding: 8px 12px; white-space: nowrap; }
@media (hover: hover) {
  button.ms-shape:hover:not(:disabled) { background: var(--field); }
  button.ms-shape.on:hover:not(:disabled), .ms-morebtn.on:hover:not(:disabled) { background: var(--tape-light); }
  .ms-corners button.on:hover:not(:disabled) { background: #FFC81F; }
  .pad button:hover:not(:disabled) { background: var(--line); }
  .pad .next:hover:not(:disabled) { background: #24314F; }
}
@media (min-width: 960px) {
  /* drawing above the panel in one column: keep the panel in flow so it never slides over the drawing */
  .ms .ms-sheet { position: relative; top: auto; margin-top: 14px; }
}
@media (max-width: 959px) {
  /* the sheet covers the bottom of the page: make room so everything can still scroll above it */
  body:has(.ms.open) .wrap { padding-bottom: calc(var(--ms-sheet, 340px) + 24px); }
  body:has(.ms.open) .live { display: none; }
  /* svh: the height with the browser toolbars shown, so the sheet always fits and does not change size
     while a scroll hides or shows the toolbars (100vh is too tall on iOS; dvh changes mid-scroll) */
  .ms-sheet { max-height: calc(100vh - 72px); max-height: calc(100svh - 72px); overflow-y: auto; overscroll-behavior: contain; }
  /* a compact sheet (header, boxes, pad: about 45% of a 375×667 phone) so the drawing keeps the rest */
  .ms-sheet { padding-top: 6px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
}
/* small phones (iPhone SE): keys shrink, never below 44px */
@media (max-width: 359px), (max-height: 600px) {
  .pad { gap: 4px; }
  .pad button { min-height: 44px; }
  .pad .fn { font-size: .88rem; }
  .ms-sheet { padding-left: 12px; padding-right: 12px; }
  .ms-top { gap: 6px; }
  /* 6 digits and a point fit: a smaller value and the short unit (ft, in, m) */
  .box { gap: 4px; padding-left: 10px; padding-right: 10px; }
  .box .v { font-size: 1.4rem; }
  .box .u { letter-spacing: .04em; }
  .box .u .long { display: none; }
  .box .u .short { display: inline; }
  .ms-top .eyebrow { letter-spacing: .03em; }
  .sheet .ms-title .side-name { font-size: 1.05rem; }
}

/* the area under someone else's drawing */
.arealine { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 4px 2px 0; }
.arealine .big { font-size: 1.5rem; font-weight: 600; }
.arealine .big small { font: 500 .8rem var(--sans); color: var(--muted); }
.arealine .r { font-size: .95rem; color: var(--muted); }

/* history: one row per measurement, newest first; the one on screen is outlined in tape */
.hist { display: grid; gap: 8px; }
button.hrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; width: 100%; min-height: 56px; padding: 10px 12px; text-align: left; font: 400 .9rem/1.35 var(--sans); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px; }
button.hrow.on { background: var(--tape-light); border-color: var(--tape); }
.hrow .hk { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--field); font-size: .85rem; font-weight: 600; }
.hrow.on .hk { background: var(--tape); }
.hrow .hm { min-width: 0; }
.hrow .h1 { display: block; font-weight: 600; }
.hrow .h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; font-size: .8rem; color: var(--muted); }
.hrow .ha { font-size: .88rem; font-weight: 600; white-space: nowrap; }
.hrow .ha small { font: 500 .72rem var(--sans); color: var(--muted); }
.hist + button.block { margin-top: 12px; }
@media (hover: hover) { button.hrow:hover:not(:disabled) { background: var(--field); } button.hrow.on:hover:not(:disabled) { background: var(--tape-light); } }

/* remarks: rows on the plot, the overlay, the lengths that differ, the note */
.card a.item.rrow { box-shadow: none; min-height: 60px; padding: 12px 14px; }
.card a.item.rrow:last-child { margin-bottom: 0; }
.ov svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 2px 0; font-size: .82rem; color: var(--muted); }
.legend .key { display: inline-block; width: 18px; border-top: 3px solid var(--ink); }
.legend .key.tape { margin-left: 12px; border-top: 3px dashed var(--tape); }
table.cmp td.d { color: var(--warn); font-weight: 600; }
table.cmp td:not(:first-child), table.cmp th:not(:first-child) { text-align: right; }
table.cmp th { font-size: .78rem; font-weight: 600; color: var(--muted); }
.rnote { margin: 12px 0 0; padding: 10px 12px; font-size: .92rem; background: var(--tape-light); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bsd { font-weight: 500; color: var(--ink); margin-left: 4px; font-family: var(--mono); }

/* live result bar (phones) */
.live { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 18px; box-shadow: 0 12px 30px -8px rgba(22, 33, 58, .5); cursor: pointer; }
body.has-live .live { display: flex; }
.live b { font-size: 1.15rem; font-weight: 600; }
.live .r { margin-left: 12px; color: var(--tape); font-family: var(--mono); }
.live .muted { color: #B9C0D2; }

/* a new version is ready (update.js): above the measuring sheet and the live result bar */
.upd { position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 616px; margin: 0 auto; padding: 8px 8px 8px 16px; background: var(--ink); color: #fff; font-weight: 500; border-radius: 18px; box-shadow: 0 12px 30px -8px rgba(22, 33, 58, .5); }
.upd[hidden] { display: none; }
/* room below the page for the bar (the open measuring pad keeps its own room, and the bar goes up) */
body:not(:has(.ms.open)):has(> .upd:not([hidden])) .wrap { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
body.has-live .upd { bottom: calc(80px + env(safe-area-inset-bottom)); }
body.has-live:not(:has(.ms.open)):has(> .upd:not([hidden])) .wrap { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
/* the measuring pad is open: the bar moves to the top so it never covers a key */
body:has(.ms-sheet:not([hidden])) .upd { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }

/* the app has moved (moved.js, old address only): a bar across the top, above the update bar; the
   page and the sticky top bar start below it (--moved-h, its measured height) */
.moved { position: fixed; top: 0; left: 0; right: 0; z-index: 55; padding: calc(8px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 10px calc(16px + env(safe-area-inset-left)); background: var(--ink); color: #fff; font-size: .85rem; line-height: 1.35; box-shadow: 0 8px 24px -10px rgba(22, 33, 58, .5); }
.moved[hidden] { display: none; }
.moved::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tape); }
.moved p { max-width: 608px; margin: 0 auto; }
.moved-h b { font-weight: 600; color: var(--tape); overflow-wrap: anywhere; }
.moved-t { font-size: .8rem; color: #D5DAE6; }
.moved-a { display: flex; gap: 8px; max-width: 608px; margin: 8px auto 2px; }
.moved-a button { flex: 1 1 0; min-width: 0; font-size: .9rem; white-space: nowrap; }
.moved-a button.ghost { color: #fff; background: transparent; border-color: rgba(255, 255, 255, .45); }
@media (hover: hover) { .moved-a button.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); } }
body:has(> .moved:not([hidden])):not(:has(.ms-sheet:not([hidden]))) { padding-top: var(--moved-h, 0px); }
body:has(> .moved:not([hidden])):not(:has(.ms-sheet:not([hidden]))) .bar { top: var(--moved-h, 0px); padding-top: 10px; }
html:has(> body > .moved:not([hidden])) { scroll-padding-top: calc(76px + var(--moved-h, 0px)); }
/* the measuring pad is open: the bar steps aside so it never covers the pad */
body:has(.ms-sheet:not([hidden])) .moved { display: none; }
/* nothing unsent: "Opening the new address…" while it asks, in place of the first screen */
.moving { max-width: 608px; margin: calc(24px + env(safe-area-inset-top)) auto 0; padding: 18px; text-align: center; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.moving[hidden] { display: none; }
.moving p { margin: 0; }
body:has(> .moving:not([hidden])) #app { display: none; }
@media (max-width: 640px) { .moving { margin-left: 16px; margin-right: 16px; } }
.hint.ver { text-align: center; margin: 24px 0 8px; font-family: var(--mono); font-size: .76rem; }

/* enlarged sketch */
.zoom { position: fixed; inset: 0; z-index: 60; background: #fff; display: flex; flex-direction: column; }
.zoom[hidden] { display: none; }
.zoom .close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; z-index: 2; width: 48px; padding: 0; background: #fff; color: var(--ink); border-color: var(--line); }
.zbody { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; display: grid; place-items: center; }
.zbody svg { width: 100%; min-width: 760px; height: auto; }

/* walking the corners with GPS (walk.js): a full-screen view over the page */
button.ms-walkbtn { margin: 0 0 14px; background: var(--tape-light); border-color: var(--tape); }
html.walk-open, html.walk-open body { overflow: hidden; }
.walk { position: fixed; inset: 0; z-index: 80; display: flex; background: #fff; color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(10px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
.walk:focus { outline: none; box-shadow: none; }
.walk [hidden] { display: none !important; }
.walk-in { display: flex; flex-direction: column; width: 100%; max-width: 640px; min-height: 100%; margin: 0 auto; }
.walk-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 0 10px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.walk-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--tape); opacity: .9; }
.walk-top h2 { flex: 1; font-size: 1.25rem; }
button.walk-x { margin-right: -6px; font-size: 1.2rem; }
.walk-main { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.walk-map { flex: 1 1 auto; display: flex; min-height: 200px; background: var(--field); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.walk-map svg { display: block; flex: 1; width: 100%; height: 100%; min-height: 200px; }
.walk-status { margin: 12px 2px 0; min-height: 1.5em; font-size: .95rem; font-weight: 500; }
.walk-status .okdot { width: 10px; height: 10px; }
.walk-msg .flash { margin: 8px 0 0; }
.walk-pin { min-height: 60px; margin-top: 12px; font-size: 1.1rem; }
.walk-pin:disabled { opacity: .55; }
.walk-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; margin-top: 10px; }
.walk-row button { min-height: 56px; }
.walk .hint { margin: 12px 2px 0; }
.walk-err { margin-top: 8px; }
.walk-err .flash { margin: 0 0 16px; font-size: 1rem; }
.walk-err button { min-height: 56px; }

/* the signature pad (sigpad.js): My details and sign-up */
.sigbox { position: relative; height: 180px; background: #fff; border: 1.5px dashed var(--line); border-radius: 12px; overflow: hidden; touch-action: none; }
.sigbox:focus-within, .sigbox:active { border-color: var(--tape); }
.sigbox canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.sigbox img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; pointer-events: none; z-index: 1; }
.sigline { position: absolute; left: 20px; right: 20px; bottom: 44px; border-bottom: 2px solid var(--tape); pointer-events: none; }
.sigact { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.sigact .hint { margin: 0; }
.me #memsg { margin-top: 12px; }
.me #mesave { margin-top: 18px; }
.me .sync { display: flex; margin: 12px 0 0; }
label .opt { font-weight: 400; }

/* the account screens (sign-up, confirm, forgot, reset): the sign-in look, with a way back */
.signin .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 0; }
.signin .links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.account .acc-head { display: flex; align-items: center; gap: 8px; margin: calc(20px + env(safe-area-inset-top)) 0 18px; padding-bottom: 12px; border-bottom: 3px solid var(--tape); }
.account .acc-head .back { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; font-size: 2rem; line-height: 1; color: var(--ink); border-radius: 12px; text-decoration: none; }
.account .acc-head .back:active { background: var(--field); }
.account .acc-head h1 { font-size: 1.3rem; }
.account .btn.block { margin-top: 14px; }
.account #su-msg, .account #fp-msg, .account #rp-msg { margin-top: 12px; }
/* the bots' box: in the form, off the screen, out of the tab order (never display:none, which some bots skip) */
.trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* a tick box with its words beside it (the terms; the Members picker) */
label.check { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0 0; font-size: .9rem; font-weight: 400; color: var(--ink); cursor: pointer; }
label.check input { flex: none; width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--ink); }
label.check span { flex: 1; min-width: 0; padding-top: 1px; }
label.check small { display: block; font-size: .8rem; color: var(--muted); }

/* Team (an outside firm's owner): people and invites, with their buttons */
.item.person, .item.invite { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.item .acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.item.person .t .chip { vertical-align: 2px; margin-left: 4px; }
/* Members on a project: the picker under the list */
.mpick { margin-top: 12px; }
.picks { margin: 0; padding: 0; border: 0; }
.picks legend { padding: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.picks label.check { margin-top: 12px; }

/* motion: off when asked */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* print: A4 report */
.print-only { display: none; }
@page { size: A4; margin: 14mm; }
@media print {
  /* Screen-only spacing must not reach the paper: body.has-live and body:has(.ms.open) give .wrap a
     bottom padding (room for the live bar / the sheet) that out-specifies a plain .wrap rule and
     pushed a blank second page. Everything here is !important so no screen rule can win. */
  html, body { background: #fff; height: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  body { font-size: 11pt; color: #000; }
  .wrap { max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; }
  .bar, .grid, .live, .upd, .moved, .moving, .zoom, .walk, .sheet, .ms-sheet, .menu, .banner, .install, .inst-back, .wrap > :not(.print-only), body > :not(.wrap) { display: none !important; }
  .print-only { display: block !important; }
  .report { break-after: avoid; page-break-after: avoid; }
  .report > :last-child { margin-bottom: 0 !important; }
  .print-only h1 { font-size: 1.4rem; margin-bottom: 4px; }
  .print-only svg { width: 100%; height: auto; }
  .print-only table, .print-only svg, .print-only .card { break-inside: avoid; }
  /* the report: one A4 page for a normal 4-8 sided plot */
  .report { font-size: 9pt; line-height: 1.25; }
  .report .rp-head { border-bottom: 2pt solid var(--tape); padding-bottom: 1.5mm; margin-bottom: 1.5mm; }
  .report .rp-head h1 { font-size: 14pt; margin: 0; }
  .report .rp-head p { margin: .8mm 0 0; color: #444; }
  .report .rp-head .rp-which { color: #000; font-weight: 600; }
  .report table.t { font-size: 8.5pt; line-height: 1.25; margin: 1mm 0 1.5mm; }
  .report table.t td, .report table.t th { padding: .7mm 1mm; border-top: .5pt solid #ccc; }
  .report .rp-facts td:first-child { width: 55mm; color: #444; text-align: left; }
  .report .rp-facts td:last-child { text-align: left; }
  .report .mono { font-family: var(--mono); font-weight: 500; }
  .report .rp-draw svg { display: block; width: 100%; height: 88mm; max-height: 88mm; margin: 1mm 0; }
  .report .rp-lens.two { display: flex; gap: 5mm; align-items: flex-start; }
  .report .rp-lens.two table.t { flex: 1 1 0; min-width: 0; }
  .report .rp-notes { margin: 1mm 0 0; font-size: 8.5pt; }
  .report .rp-notes h2 { margin: 0 0 .5mm; font-size: 9pt; }
  .report .rp-notes ul { margin: 0; padding-left: 4mm; }
  .report .rp-foot { margin: 1mm 0 0; font-size: 8pt; color: #444; }
  /* the Surveyor block: who measured, and their signature */
  .report .rp-sign { margin: 2mm 0 0; padding-top: 1.5mm; border-top: .5pt solid #999; break-inside: avoid; }
  .report .rp-sign h2 { margin: 0 0 .5mm; font-size: 9pt; }
  .report .rp-sign-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 6mm; }
  .report .rp-who { line-height: 1.35; }
  .report .rp-who b { font-size: 10pt; }
  .report .rp-k { display: inline-block; min-width: 15mm; color: #444; }
  .report .rp-sig { flex: none; width: 60mm; text-align: center; border-bottom: .5pt solid #000; padding-bottom: .5mm; }
  .report .rp-sig img { display: block; width: 60mm; height: 16mm; object-fit: contain; margin: 0 auto; }
  .report .rp-nosig { display: block; padding: 5mm 0 .5mm; color: #666; font-style: italic; }
  .card { box-shadow: none; border-color: #999; }
}
