/* Selfmanaged — the landlord's onboarding screens: Setup, Answer Questions, the house guide, Ask Your Tenant, Assistant
   settings and Messages (Milestone 10, onboarding; docs/m10/ONBOARDING.md §6.4). OWNER: builder A4. Loaded after app.css
   (web/app.html's M10 onboarding block). Colours only as var(--…) from web/css/tokens.css (light, dark and both
   increased-contrast sets); sizes in rem or em, never under the 11px floor; nothing sideways at 320 wide or at the largest
   text size. Controls use app.css's classes (.btn, .linkish, .row), so every pressed state is app.css's own (BTN-01). */

/* A line inside a page, on the page's own gutters. */
.pad-x { padding-left: var(--pad-l); padding-right: var(--pad-r); }
.sub.pad-x { margin-top: 1rem; }

/* How ready a home is: a native progress bar (VoiceOver reads its label and value), the blue on a hairline track, rounded
   (the three-tab look), and its words beside it for sight. */
.ready { display: flex; align-items: center; gap: 12px; margin-top: 0.35rem; }
.ready progress {
  flex: 1 1 auto; min-width: 0; height: 0.5rem; -webkit-appearance: none; appearance: none; box-sizing: border-box;
  border: 0; border-radius: 4px; background: var(--hair); color: var(--navy);
}
.ready progress::-webkit-progress-bar { background: var(--hair); border-radius: 4px; }
.ready progress::-webkit-progress-value { background: var(--navy); border-radius: 4px; }
.ready progress::-moz-progress-bar { background: var(--navy); border-radius: 4px; }
/* With Increase Contrast, the wash under the blue and a hairline round it, as app.css's .progress (the Stage 1 review). */
@media (prefers-contrast: more) {
  .ready progress { background: var(--wash); outline: 1px solid var(--hair); }
  .ready progress::-webkit-progress-bar { background: var(--wash); }
}
.ready-words { flex: none; font-size: var(--fs-footnote); color: var(--muted); font-variant-numeric: tabular-nums; }
.ready-list { margin-top: 0.5rem; }
.ready-list > li + li { margin-top: 0.6rem; }

/* A row's links (Answer, Take Photo, Ask Your Tenant; Edit, Set Aside Draft): they wrap, each a 44px target. */
.row-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; margin-bottom: -8px; }
.row-sub { padding-left: calc(var(--pad-l) + 1rem); }

/* ── the house guide (views/guide.js) ─────────────────────────────────────────────────────────────────────────────── */
.guide-bar .meta { margin-top: 1rem; }
.guide-item.is-unknown .nm { color: var(--late); }
.guide-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.4rem; }
/* A pill wider than the row ("Names a trade or amount" at Largest, 390 wide) wraps between its words rather than run under the
   card's edge (the merge of final, 9 Oct 2026: the screens' sweep). */
.guide-pills .pill { white-space: normal; max-width: 100%; }
.guide-thumb { display: block; width: 4.5rem; height: 3.4rem; object-fit: cover; background: var(--wash); border: 1px solid var(--hair); border-radius: 8px; }
@media (prefers-color-scheme: dark) { .guide-thumb { filter: brightness(0.88); } }
.guide-item .rows { margin-top: 0.5rem; border-top: 1px solid var(--hair); }
.guide-item .rows .row { padding-left: 0; padding-right: 0; }
.guide-item .rows { --sep-inset: 0px; }
.item-detail[hidden] { display: none; }
.guide-print { display: none; }

/* ── Answer Questions (views/questions.js) ──────────────────────────────────────────────────────────────────────── */
.question .q-lg { margin-bottom: 0.5rem; }
.question .q-lg:focus { outline: none; }
.question .q-lg:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.question > .meta { margin-bottom: 1rem; max-width: 62ch; }
.question .actions { margin-bottom: 0.5rem; }
.consent .meta { max-width: 62ch; margin-top: 0.5rem; }
.consent-words { padding-top: 0.75rem; }
.tidy { margin-bottom: 1rem; background: var(--wash); }
.test-step .hint { max-width: 62ch; }

/* Working hours: each day, worked or not, then its times. */
.hours .hours-day { border-bottom: 1px solid var(--hair); padding: 0.35rem 0; }
.hours .hours-day .field { margin-bottom: 0; }
.hours-times { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0.25rem 0 0.5rem; }
.hours-times[hidden] { display: none; }
.hours-times input { width: auto; min-width: 7.5rem; min-height: 44px; padding: 0.4rem 10px; font-size: max(16px, var(--fs-body));
  font-weight: var(--w-regular); border: 1.5px solid var(--field); border-radius: 12px; background: var(--white); color: var(--ink); }
.hours-times span { color: var(--muted); font-size: var(--fs-subhead); }
.hours > .hint { margin-top: 0.5rem; }

/* Ask Your Tenant: each item with the question the tenant is asked, under its name. */
.ask-item label, .field.check label .ask-q { display: block; }
.ask-q { font-weight: var(--w-regular); margin-top: 2px; }

/* ── Messages (views/messages.js) ───────────────────────────────────────────────────────────────────────────────── */
.thread { list-style: none; margin: 0; padding: 0 var(--pad-r) 0 var(--pad-l); }
.msg { padding: 0.9rem 0; border-bottom: 1px solid var(--hair); }
.msg-head { font-size: var(--fs-footnote); color: var(--muted); }
.msg-head b { color: var(--ink); font-weight: var(--w-semibold); }
.msg-actions { margin-top: 0.5rem; }
.msg-body { margin-top: 0.35rem; font-size: var(--fs-body); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 62ch; }
.msg-assistant .msg-body, .msg-landlord .msg-body { padding: 0.6rem 12px; background: var(--white); border-radius: 14px; }
/* A message marked sensitive: a red rule down its leading edge (a rule, not a shadow: the look has none). */
.msg.is-sensitive { border-left: 3px solid var(--late); padding-left: 9px; }
.handoff, .draft { margin-top: 0.75rem; padding: 0.75rem 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.handoff.is-seen { background: none; }
.handoff .meta + .meta { margin-top: 0.35rem; }
.draft .msg-body { background: none; padding: 0; }

/* WhatsApp (views/whatsapp.js; docs/WHATSAPP.md §5): a tenant's photos inline, a message that didn't send ruled in red as a sensitive one is,
   and STOP said in the thread's own line. Colours are the tokens'. */
.wa-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0.35rem; }
.wa-photo { display: block; max-width: 100%; }
.wa-photo img { display: block; max-width: 100%; max-height: 14rem; width: auto; height: auto; background: var(--wash); border: 1px solid var(--hair); border-radius: 12px; }
@media (prefers-color-scheme: dark) { .wa-photo img { filter: brightness(0.88); } }
.msg.is-failed { border-left: 3px solid var(--late); padding-left: 9px; }
.msg-body.wa-event { margin-top: 0; padding: 0; background: none; font-weight: var(--w-semibold); color: var(--muted); }

/* Printing the house guide: the published version only (the editor, its forms and buttons stay off paper; app.css's own
   print rules make it black on white). Codes and private items are never in it. */
@media print {
  .guide-page .guide-editor, .guide-page .group, .guide-page .guide-bar, .guide-page .notice { display: none !important; }
  .guide-print { display: block; padding: 0; }
  .guide-print h2 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 0.3rem; }
  .guide-print h3 { font-family: var(--serif); font-size: 1.1rem; margin: 1.1rem 0 0.4rem; border-bottom: 1px solid var(--print-rule); }
  .guide-print dl { display: grid; grid-template-columns: minmax(8rem, 30%) 1fr; gap: 0.35rem 1rem; }
  .guide-print dt { font-weight: var(--w-semibold); }
  .guide-print dd { white-space: pre-wrap; }
  .guide-print dt, .guide-print dd { break-inside: avoid; page-break-inside: avoid; }
}
