/* CondSnap: looks like an inspection report, built for a phone held in one hand. */
:root {
  --ink: #1C2621; --paper: #FFFFFF; --surface: #F3F5F2; --rule: #D5DAD5; --muted: #5B6660;
  --safe: #0F6E8C; --safe-dark: #0B5169; --hazard: #FFB703; --amber: #D98E04; --danger: #B4232C;
  --radius: 4px; --max: 1040px; --font: 'Barlow', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--paper); }
a { color: var(--safe-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1rem; max-width: 68ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.site-header { border-bottom: 3px solid var(--ink); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 60px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: .45rem; }
.brand .mark { width: 22px; height: 22px; background: var(--safe); border-radius: 3px; display: inline-block; position: relative; }
.brand .mark::after { content: ''; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border: 2.5px solid #fff; border-radius: 50%; }
nav.main { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--ink); text-decoration: none; font-weight: 500; padding: .35rem 0; }
nav.main a:hover { text-decoration: underline; }
main { padding: 2rem 0 4rem; }
.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; padding: 1.5rem 0; }
.site-footer .wrap { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Buttons & form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 1rem var(--font); padding: .7rem 1.1rem; border-radius: var(--radius);
  border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--safe); border-color: var(--safe); color: #fff; }
.btn.primary:hover { background: var(--safe-dark); border-color: var(--safe-dark); }
.btn.quiet { border-color: var(--rule); font-weight: 500; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.block { width: 100%; }
label { display: block; font-weight: 600; margin: .9rem 0 .3rem; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], textarea, select { width: 100%; font: 400 1rem var(--font); padding: .6rem .7rem; border: 1.5px solid var(--rule);
  border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 44px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--hazard); outline-offset: 1px; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; font-weight: 400; margin: 0; border-bottom: 1px solid var(--rule); }
.check input { width: 20px; height: 20px; margin: .15rem 0 0; flex: none; accent-color: var(--safe); }
.hint { color: var(--muted); font-size: .9rem; margin: .25rem 0 0; }
.notice { border-left: 4px solid var(--hazard); background: #FFF8DC; padding: .75rem 1rem; margin: 1rem 0; }
.notice.ok { border-color: var(--safe); background: #EAF5EE; }
.notice.bad { border-color: var(--danger); background: #FBEBEC; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2.wide-left { grid-template-columns: 3fr 2fr; } }

/* Landing */
.hero { padding: 2.5rem 0 1rem; }
.hero .lede { font-size: 1.2rem; max-width: 56ch; color: var(--ink); }
.proof { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.proof li { padding-left: 1.1rem; position: relative; }
.proof li::before { content: ''; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; background: var(--safe); border-radius: 50%; }
.generator { border: 2px solid var(--ink); border-top-width: 8px; padding: 1.25rem; background: var(--paper); }
.generator h2 { margin-top: 0; }
.sample { border: 1.5px solid var(--rule); background: var(--surface); padding: 1.25rem; font-size: .92rem; }
.sample .doc-head { border-bottom: 2px solid var(--ink); padding-bottom: .5rem; margin-bottom: .75rem; display: flex; justify-content: space-between; gap: 1rem; }
.sample .doc-head > div:last-child { white-space: nowrap; }
.sample table { font-size: .85rem; }
.how { margin: 3rem 0; }
.how ol { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .how ol { grid-template-columns: repeat(3, 1fr); } }
.how li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: .75rem; }
.how li::before { content: counter(step); font-family: var(--display); font-weight: 700; font-size: 1.6rem; display: block; }
.plans { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { border: 1.5px solid var(--rule); padding: 1.25rem; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--safe); }
.plan .price { font-family: var(--display); font-size: 2.2rem; font-weight: 700; line-height: 1; margin: .25rem 0; }
.plan .price small { font-family: var(--font); font-size: .95rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.1rem; margin: .5rem 0 1rem; flex: 1; }
.plan li { margin: .25rem 0; }
.faq dt { font-weight: 600; margin-top: 1rem; }
.faq dd { margin: .25rem 0 0; color: var(--ink); max-width: 68ch; }

/* App */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: .75rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.list th { font-weight: 600; font-size: .9rem; color: var(--muted); }
table.list a.title { font-weight: 600; color: var(--ink); }
.status { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .5rem; border-radius: 3px; border: 1.5px solid currentColor; }
.status.draft { color: var(--amber); } .status.issued { color: var(--safe); } .status.approved { color: var(--safe); } .status.rejected { color: var(--danger); } .status.submitted { color: var(--muted); }
.empty { border: 1.5px dashed var(--rule); padding: 2rem; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; position: sticky; top: 0; background: var(--paper); padding: .75rem 0; border-bottom: 1px solid var(--rule); z-index: 5; }
.toolbar .spacer { flex: 1; }
.editor section { margin: 1.5rem 0; }
.editor .step { border: 1.5px solid var(--rule); border-left: 6px solid var(--ink); padding: .75rem 1rem 1rem; margin: .75rem 0; }
.editor .step .num { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.editor .step .head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.editor .fields { display: grid; gap: .75rem; }
@media (min-width: 760px) { .editor .fields { grid-template-columns: 1fr 1fr; } .editor .fields .full { grid-column: 1 / -1; } }
.risk select { font-weight: 600; }
.sigs img { height: 48px; border: 1px solid var(--rule); background: #fff; }
.share { border: 2px solid var(--safe); padding: 1rem; margin: 1rem 0; display: grid; gap: .75rem; }
@media (min-width: 700px) { .share { grid-template-columns: 1fr auto; align-items: center; } }
.share code { font-size: .95rem; word-break: break-all; }
.qr { width: 132px; height: 132px; image-rendering: pixelated; border: 6px solid #fff; }
.paywall { border: 2px solid var(--ink); border-top: 8px solid var(--hazard); padding: 1.25rem; margin: 1rem 0; }
.paywall .row { margin-top: .75rem; }

/* Sign-on */
.sign-summary { border: 1.5px solid var(--rule); padding: 1rem; margin: 1rem 0; }
.sign-summary ol { padding-left: 1.2rem; }
.sign-summary li { margin: .4rem 0; }
.sign-summary li ul { padding-left: 1rem; color: var(--muted); font-size: .95rem; }
canvas.pad { width: 100%; height: 180px; border: 2px dashed var(--ink); border-radius: var(--radius); background: #fff; touch-action: none; display: block; }
.ack { display: flex; gap: .6rem; align-items: flex-start; margin: 1rem 0; font-weight: 500; }
.ack input { width: 22px; height: 22px; flex: none; accent-color: var(--safe); margin-top: .1rem; }

/* Auth */
.auth { max-width: 420px; }
input.code { font: 700 2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .4em; text-align: center; }

/* Print / PDF page */
body.print { font-size: 11pt; background: #fff; }
.doc { max-width: 190mm; margin: 0 auto; padding: 8mm 0; position: relative; }
.doc-head { border-bottom: 3px solid var(--ink); padding-bottom: 4mm; margin-bottom: 4mm; display: grid; grid-template-columns: 1fr auto; gap: 4mm; }
.doc-head h1 { font-size: 20pt; margin: 0; }
.doc-head .kind { font-family: var(--display); font-weight: 700; font-size: 11pt; color: var(--muted); }
.doc-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1mm 6mm; font-size: 10pt; margin: 0 0 4mm; }
.doc-meta div { display: grid; grid-template-columns: 38mm 1fr; gap: 2mm; }
.doc-meta div span { color: var(--muted); }
.doc h2 { font-size: 13pt; border-bottom: 1.5px solid var(--ink); padding-bottom: 1mm; margin: 5mm 0 2mm; }
.doc ul { margin: 0; padding-left: 5mm; }
.doc li { margin: .5mm 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 9.5pt; page-break-inside: auto; }
.doc th, .doc td { border: 1px solid var(--ink); padding: 1.5mm 2mm; vertical-align: top; text-align: left; }
.doc th { background: var(--surface); font-weight: 600; }
.doc tr { page-break-inside: avoid; }
.doc td.n { width: 6mm; font-family: var(--display); font-weight: 700; text-align: center; }
.doc .r { font-weight: 700; white-space: nowrap; }
.r.Low { color: var(--safe); } .r.Medium { color: #7A6400; } .r.High { color: var(--amber); } .r.Extreme { color: var(--danger); }
.doc .legend { font-size: 9pt; color: var(--muted); margin: 2mm 0 0; }
.doc table.sign td { height: 11mm; }
.doc .sign img { height: 10mm; }
.doc-foot { margin-top: 6mm; font-size: 8.5pt; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 2mm; }
.watermark { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 10; }
.watermark span { font-family: var(--display); font-weight: 700; font-size: 64pt; color: rgba(180, 35, 44, .14); transform: rotate(-28deg); border: 6pt solid rgba(180, 35, 44, .14); padding: 4mm 10mm; }
@page { size: A4; margin: 12mm; }
@media print { body.print { font-size: 10.5pt; } .doc { max-width: none; padding: 0; } .no-print { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { margin-top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* CondSnap additions */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: .75rem; }
@media (min-width: 600px) { .grid-3 { grid-template-columns: 2fr 1fr 1fr; } }
input[type=number], input[type=date] { width: 100%; font: 400 1rem var(--font); padding: .6rem .7rem; border: 1.5px solid var(--rule); border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 44px; }
td.y { color: var(--safe); font-weight: 600; } td.n { color: var(--danger); font-weight: 700; }
.btn.small { min-height: 36px; padding: .4rem .8rem; font-size: .9rem; }
.room { border: 1.5px solid var(--rule); border-left: 6px solid var(--ink); margin: .75rem 0; }
.room > .head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1rem; cursor: pointer; background: var(--surface); }
.room > .head h3 { margin: 0; }
.room .count { color: var(--muted); font-size: .9rem; }
.item { display: grid; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--rule); }
@media (min-width: 760px) { .item { grid-template-columns: 1fr 2fr; } }
.item .name { font-weight: 600; }
.item .entry { font-size: .9rem; color: var(--muted); margin-top: .2rem; }
.toggles { display: flex; gap: .4rem; flex-wrap: wrap; }
.tg { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .4rem .8rem; border: 2px solid var(--rule); border-radius: 22px; background: #fff; font: 600 .95rem var(--font); cursor: pointer; color: var(--muted); }
.tg.on-y { border-color: var(--safe); color: var(--safe); background: #E6F1F5; }
.tg.on-n { border-color: var(--danger); color: var(--danger); background: #FBEBEC; }
.tg:focus-visible { outline: 3px solid var(--hazard); }
.item textarea { min-height: 44px; }
.thumbs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .4rem 0; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
.thumbs .ph { position: relative; }
.thumbs .ph button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--danger); color: #fff; font-weight: 700; cursor: pointer; line-height: 1; }
.item .acts { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.item .acts input[type=file] { display: none; }
.flag { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .5rem; border-radius: 3px; border: 1.5px solid currentColor; margin-left: .3rem; }
.flag.y { color: var(--safe); } .flag.n { color: var(--danger); }
.t-room { border-top: 2px solid var(--ink); margin-top: 1.5rem; padding-top: .5rem; }
.t-item { padding: .6rem 0; border-bottom: 1px solid var(--rule); }
.t-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: center; }
.t-item p { margin: .3rem 0; }
.cmt { background: var(--surface); border-left: 3px solid var(--safe); padding: .4rem .6rem; margin: .3rem 0; font-size: .95rem; }
.modal { position: fixed; inset: 0; background: rgba(28,38,33,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-body { background: #fff; padding: 1.25rem; max-width: 560px; width: 100%; border-top: 8px solid var(--safe); }
/* Print additions */
.doc .cover { page-break-after: always; }
.doc .cover h1 { font-size: 26pt; margin: 2mm 0; }
.doc .cover .addr { font-size: 16pt; font-weight: 600; margin-bottom: 6mm; }
.doc h2.room { page-break-after: avoid; margin-top: 6mm; }
.doc table.items td.c { width: 16mm; text-align: center; }
.doc table.items td.item { width: 36mm; font-weight: 600; }
.doc table.items td.notes { min-width: 40mm; }
.doc .thumbs img { width: 28mm; height: 28mm; }
.doc .cmt { font-size: 9pt; }
.room.collapsed .item { display: none; }
