:root {
  --ink: #153f36;
  --muted: #5d7068;
  --line: #cddbd3;
  --paper: #ffffff;
  --wash: #f5f7f3;
  --primary: #26735f;
  --primary-dark: #174f43;
  --primary-soft: #e8f2ed;
  --mint: #37866f;
  --mint-soft: #edf6f2;
  --coral: #d97891;
  --amber: #b67416;
  --amber-soft: #fff5e3;
  --red: #bd5261;
  --red-soft: #fff0f3;
  --shadow: 0 20px 50px rgba(21, 63, 54, 0.10);
  font-family: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--wash);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 8% 0%, rgba(40,100,82,.10), transparent 27%), radial-gradient(circle at 92% 12%, rgba(50,115,98,.08), transparent 24%), var(--wash); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(40,100,82,.28);
  outline-offset: 3px;
}

.topbar {
  height: 78px;
  padding: 0 28px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); box-shadow: 0 9px 22px rgba(35,59,53,.18); font-weight: 800; letter-spacing: -.04em; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.save-state { font-size: 12px; color: var(--muted); }
.lease-mobile-save-state { display: none; }
.save-state[data-state="warning"], .lease-mobile-save-state[data-state="warning"] { color: #8a4b12; }
.save-state[data-state="error"], .lease-mobile-save-state[data-state="error"] { color: #9b2226; }

.app-shell { display: grid; grid-template-columns: 220px minmax(520px, 1fr) 310px; min-height: calc(100vh - 78px); max-width: 1540px; margin: 0 auto; }
.sidebar { padding: 26px 20px; border-right: 1px solid var(--line); background: rgba(250,250,253,.72); }
.workspace { padding: 36px 48px 28px; background: var(--paper); }
.summary-panel { padding: 30px 24px; border-left: 1px solid var(--line); background: #f8f8fc; }
.eyebrow { display: block; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .13em; }

.dossier-card { padding: 17px; border-radius: 17px; background: linear-gradient(145deg, var(--primary-dark), #315a4e); color: white; box-shadow: 0 16px 36px rgba(35,59,53,.18); margin-bottom: 22px; position: relative; overflow: hidden; }
.dossier-card::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -35px; top: -38px; background: rgba(255,255,255,.09); }
.dossier-card .eyebrow { color: #d4e3d8; }
.dossier-card strong { display: block; margin: 8px 0 11px; font-size: 14px; }
.status-pill { background: rgba(255,255,255,.14); padding: 5px 8px; border-radius: 99px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }

.inspection-nav-toggle { display: none; }
#step-nav { display: grid; gap: 7px; }
.nav-step { width: 100%; min-height: 48px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; padding: 8px 9px; border: 0; background: transparent; border-radius: 11px; color: var(--muted); text-align: left; font-size: 12px; }
.nav-step span:first-child { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; font-size: 10px; background: white; }
.nav-step:hover { background: white; color: var(--ink); }
.nav-step.done { background: #edf8f5; color: #1f5f51; font-weight: 750; }
.nav-step.done span:first-child { background: #2f805c; border-color: #2f805c; color: white; font-size: 13px; font-weight: 900; box-shadow: 0 4px 12px rgba(47, 128, 92, .2); }
.nav-step.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 750; }
.nav-step.active span:first-child { background: var(--primary); border-color: var(--primary); color: white; }
.nav-step.done.active span:first-child { background: var(--primary); border-color: var(--primary); }
.step-tooltip { position: fixed; z-index: 1000; max-width: min(260px, calc(100vw - 20px)); padding: 9px 12px; border-radius: 10px; background: var(--primary-dark); color: white; box-shadow: 0 10px 28px rgba(35,59,53,.22); font-size: 11px; font-weight: 700; line-height: 1.35; pointer-events: none; }
.step-tooltip[hidden] { display: none; }
.privacy-note { margin-top: 24px; padding: 13px; display: flex; gap: 10px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; line-height: 1.45; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--ink); }

.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.workspace-header h1 { font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: -.045em; margin: 8px 0 8px; color: var(--primary-dark); }
.workspace-header p { margin: 0; color: var(--muted); font-size: 14px; }
.progress-block { margin: -6px 0 24px; }
.progress-copy { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.progress-copy strong { color: var(--primary); }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #edeef5; }
.progress-track span { display: block; height: 100%; width: 7%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--mint)); transition: width .28s ease; }
.step-content { min-height: 500px; animation: appear .22s ease; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.stage-lead { display: flex; gap: 13px; align-items: flex-start; margin: 0 0 20px; padding: 15px 17px; border-radius: 14px; background: linear-gradient(135deg, var(--primary-soft), #f4f8f5); color: var(--primary-dark); }
.stage-lead > span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: white; color: var(--mint); box-shadow: 0 5px 14px rgba(35,59,53,.08); font-weight: 900; }
.stage-lead strong { display: block; margin: 1px 0 4px; font-size: 13px; }
.stage-lead p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.choice-card { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 14px; position: relative; padding: 18px; min-height: 116px; border: 2px solid var(--line); border-radius: 15px; background: white; transition: border-color .16s ease, background-color .16s ease; cursor: pointer; }
.choice-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(35,59,53,.1); border-color: #9fb9aa; }
.choice-card.selected { border: 2px solid var(--primary); background: linear-gradient(145deg, var(--primary-soft), #f7f9f6); }
.choice-card input { position: absolute; opacity: 0; }
.choice-card:has(input:focus-visible) { outline: 3px solid rgba(40,100,82,.28); outline-offset: 3px; }
.choice-icon { width: 48px; height: 48px; grid-row: 1 / 3; display: grid; place-items: center; align-self: center; border-radius: 13px; background: var(--primary-soft); color: var(--primary); font-size: 17px; font-weight: 800; }
.choice-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choice-card:nth-child(2n) .choice-icon { background: var(--mint-soft); color: var(--mint); }
.choice-card.selected .choice-icon { background: var(--primary); color: white; }
.choice-card strong { display: block; align-self: end; font-size: 14px; margin-bottom: 5px; }
.choice-card small { align-self: start; color: var(--muted); line-height: 1.45; }
.selection-help { margin-top: 14px; padding: 15px 17px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid #dce0e9; border-radius: 13px; color: var(--muted); background: #f7f8fa; }
.selection-help > span { width: 23px; height: 23px; flex: 0 0 auto; display: grid; place-items: center; border: 2px solid #8792a8; border-radius: 50%; color: #637087; font-size: 11px; font-weight: 850; }
.selection-help p { margin: 1px 0 0; font-size: 11px; line-height: 1.55; }
.selection-help strong { color: var(--ink); }
.remote-signing-intro { margin-bottom: 16px; padding: 17px; display: flex; align-items: flex-start; gap: 13px; border: 1px solid #bcdcd2; border-radius: 14px; color: var(--primary-dark); background: #f1faf7; }
.remote-signing-intro > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--primary); font-size: 16px; }
.remote-signing-intro strong { display: block; margin: 1px 0 4px; font-size: 13px; }
.remote-signing-intro p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.signing-invitation-list, .signing-invitations { display: grid; gap: 10px; margin: 20px 0; }
/* The dialog stays narrow on desktop too: size cards to their container, not the viewport. */
.signing-invitation { min-width: 0; padding: 15px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f8faf8; }
.signing-invitation > div:first-child { min-width: 0; display: grid; gap: 6px; overflow-wrap: anywhere; }
.signing-invitation h3, .signing-invitation p { margin: 0; }
.signing-invitation > div:first-child > span { color: var(--primary); font-size: 8px; font-weight: 850; letter-spacing: .11em; }
.signing-invitation strong { color: var(--primary-dark); font-size: 12px; }
.signing-invitation small { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.signing-access-code { width: max-content; max-width: 100%; margin-top: 5px; padding: 6px 9px; border-radius: 8px; color: var(--primary-dark); background: #eaf4ef; font-size: 14px; font-weight: 850; letter-spacing: .12em; }
.signing-invitation label { display: grid; gap: 6px; font-size: 14px; }
.signing-invitation input { min-width: 0; width: 100%; max-width: 260px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--primary-dark); font: inherit; font-weight: 700; letter-spacing: .12em; }
.signing-invitation-actions, .signing-invitation-sharing { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.signing-invitation-actions .button { flex: 1 1 160px; min-width: 0; min-height: 44px; white-space: normal; overflow-wrap: normal; word-break: normal; text-align: center; }
.signing-invitation-actions > details { flex: 1 1 100%; min-width: 0; }
.signing-invitation-actions summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-size: 14px; overflow-wrap: normal; }
@media(max-width:620px){.signing-invitation-actions,.signing-invitation-sharing{display:grid;grid-template-columns:minmax(0,1fr)}.signing-invitation-actions .button{width:100%}}
.situation-panel { padding: 24px; border-radius: 18px; background: linear-gradient(145deg, #f8faf7, #f5f8f5); border: 1px solid var(--line); margin-bottom: 18px; }
.situation-panel h2 { color: var(--primary-dark); font-size: 23px; letter-spacing: -.025em; margin: 0 0 5px; }
.situation-panel > p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.question-block + .question-block { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 17px; }
.question-block > strong { display: block; font-size: 12px; margin-bottom: 10px; }
.segmented { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.segment { position: relative; display: block; }
.segment input { position: absolute; opacity: 0; }
.segment span { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #d9dce7; border-radius: 11px; background: white; color: var(--muted); font-size: 11px; font-weight: 700; transition: border-color .16s ease, background-color .16s ease, color .16s ease; }
.segment span::before { content: ""; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #b7bdcc; box-shadow: inset 0 0 0 3px white; background: white; flex: 0 0 auto; }
.segment input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.segment input:checked + span::before { background: var(--primary); border-color: var(--primary); }
.segment input:focus-visible + span { outline: 3px solid rgba(40,100,82,.28); outline-offset: 3px; }
.section-kicker { display: flex; align-items: center; gap: 10px; margin: 24px 0 13px; }
.section-kicker::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.section-kicker strong { font-size: 11px; color: var(--primary-dark); }
.confidence-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.confidence-item { padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.confidence-item span { display: block; width: 27px; height: 27px; border-radius: 8px; background: var(--mint-soft); color: var(--mint); display: grid; place-items: center; font-weight: 800; margin-bottom: 9px; }
.confidence-item:nth-child(2) span { background: var(--primary-soft); color: var(--primary); }
.confidence-item:nth-child(3) span { background: #fff0f4; color: var(--coral); }
.confidence-item strong { display: block; font-size: 10px; margin-bottom: 3px; }
.confidence-item small { color: var(--muted); font-size: 9px; line-height: 1.45; }

.form-section { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; background: #fff; }
.form-section h2 { font-size: 19px; letter-spacing: -.02em; color: var(--primary-dark); margin: 0 0 5px; }
.form-section > p { color: var(--muted); margin: 0 0 18px; font-size: 12px; }
.optional-section { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: clip; }
.optional-section > summary { min-height: 64px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; list-style: none; cursor: pointer; }
.optional-section > summary::-webkit-details-marker { display: none; }
.optional-section > summary::before { content: "+"; width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 900; }
.optional-section[open] > summary::before { content: "−"; }
.optional-section > summary > span { flex: 1; min-width: 0; display: grid; gap: 3px; }
.optional-section > summary strong { color: var(--primary-dark); font-size: 13px; }
.optional-section > summary small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.optional-section > summary em { flex: 0 0 auto; padding: 5px 8px; border-radius: 99px; background: #f1f2f7; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; }
.optional-section[open] > summary { border-bottom: 1px solid var(--line); background: #fbfbfe; }
.optional-section-content > .form-section { margin: 0; padding: 20px; border: 0; border-radius: 0; }
.review-grid { display: grid; gap: 10px; }
.review-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbfd; }
.review-card > div { min-width: 0; }
.review-card > div > strong { display: block; margin: 5px 0 3px; color: var(--primary-dark); font-size: 13px; overflow-wrap: anywhere; }
.review-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.review-card .button { flex: 0 0 auto; }
.owner-prefill { margin-bottom: 16px; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #ccd9d0; border-radius: 14px; background: linear-gradient(135deg, #f7f9f6, var(--primary-soft)); }
.owner-prefill > div { display: flex; align-items: center; gap: 11px; min-width: 0; }
.owner-prefill > div > span:last-child { display: grid; gap: 3px; }
.prefill-icon { width: 35px; height: 35px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: white; background: var(--primary); font-size: 16px; }
.owner-prefill strong { color: var(--primary-dark); font-size: 11px; }
.owner-prefill small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.owner-prefill .button { flex: 0 0 auto; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 15px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.works-choice { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; }
.works-choice legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 750; color: var(--ink); }
.works-choice ~ .info-box.full { grid-column: 1 / -1; }
.field label { font-size: 11px; font-weight: 750; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d9dce7; border-radius: 10px; padding: 11px 12px; background: #fcfcfe; color: var(--ink); outline: none; transition: border-color .16s ease, background-color .16s ease; }
.field input[data-value-type="number"] { appearance: textfield; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
/* Required text, selects, textareas and choice groups share one visible error state. */
.field :is(input, select, textarea)[aria-invalid="true"],
:is(fieldset, .field, .toggle-row, .question-block, .clause-card):is([aria-invalid="true"],[data-inline-invalid="true"]) {
  border-color: var(--red); background: var(--red-soft);
}
:is(fieldset, .toggle-row, .question-block, .clause-card):is([aria-invalid="true"],[data-inline-invalid="true"]),
.field:is([aria-invalid="true"],[data-inline-invalid="true"]):has(.choice-checklist, .single-choice, .segmented) { outline: 1px solid var(--red); outline-offset: 3px; }
[aria-invalid="true"] :is(select, textarea) { border-color: var(--red); }

.field-error { color: var(--red); font-size: 10px; line-height: 1.4; }
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(40,100,82,.13); background: white; }
.field :is(input,select,textarea)[aria-invalid="true"]:focus { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 3px var(--red-soft); }
.field .hint { color: var(--muted); font-size: 10px; line-height: 1.4; }
.inline-field { display: flex; gap: 8px; }
.inline-field input, .inline-field select { flex: 1; min-width: 0; }
.plain-help { margin-top: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fafafe; }
.plain-help summary { padding: 12px 14px; cursor: pointer; color: var(--primary-dark); font-size: 11px; font-weight: 750; }
.plain-help p { margin: 0; padding: 0 14px 13px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid #eeeff5; min-width: 0; }
.toggle-row.field { display: flex; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-copy { min-width: 0; }
.toggle-copy strong { display: block; font-size: 13px; }
.toggle-copy small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; margin-top: 3px; }
.toggle-control { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.toggle-state { min-width: 24px; color: var(--muted); font-size: 10px; font-weight: 800; }
.toggle-state::before { content: "Non"; }
.toggle:checked + .toggle-state { color: var(--primary); }
.toggle:checked + .toggle-state::before { content: "Oui"; }
.toggle { width: 42px; height: 24px; appearance: none; border-radius: 99px; background: #cfd3df; position: relative; transition: background-color .16s ease; flex: 0 0 auto; }
.toggle-row input.toggle { width: 42px; min-width: 42px; padding: 0; border: 0; }
.toggle-control { display: flex; flex: 0 0 auto; }
.toggle-state { display: none; }
.toggle::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: white; left: 3px; top: 3px; transition: transform .16s cubic-bezier(.23,1,.32,1); box-shadow: 0 2px 5px rgba(0,0,0,.18); }
.toggle:checked, .toggle-row input.toggle:checked { background: var(--primary); }
.toggle:checked::after { transform: translateX(18px); }
.toggle:disabled { opacity: .45; cursor: not-allowed; }
.private-areas-toggle { cursor: pointer; }
.private-areas-toggle .toggle-control { min-height: 44px; }
.private-areas-toggle .toggle-state { display: inline; }
.private-areas-toggle input.toggle { cursor: pointer; }
.private-areas-toggle input.toggle:not(:checked) { background: #cfd3df; }
.repeat-list { display: grid; gap: 12px; margin-bottom: 14px; }
.repeat-item { position: relative; display: grid; min-width: 0; padding: 16px; border-radius: 13px; background: #f8f8fc; border: 1px solid var(--line); }
.repeat-item .remove { position: absolute; top: 10px; right: 16px; z-index: 1; margin: 0; border: 1px solid #f1d9df; background: white; border-radius: 10px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--red); font-size: 18px; }
.repeat-item .form-grid { min-width: 0; }
/* Share the first label row with the removal control, keeping its 44px target clear of text and inputs. */
.repeat-item > .form-grid > .field:first-child > :is(label, .minimal-label-row),
.repeat-item > .form-grid > .field:first-child:not(.full) + .field > :is(label, .minimal-label-row) { min-height: 44px; padding-inline-end: 52px; display: flex; align-items: center; }
/* The shared theme forces info-box padding; reserve this corner without hiding its copy. */
.repeat-item > .form-grid > .info-box:first-child { padding-inline-end: 68px !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; max-width: 100%; gap: 7px; align-items: center; padding: 8px 10px; background: var(--primary-soft); color: var(--primary-dark); border-radius: 99px; font-size: 11px; overflow-wrap: anywhere; }
.chip button { width: 44px; height: 44px; margin: -10px -8px -10px 0; border: 0; border-radius: 50%; background: transparent; color: var(--primary); display: grid; place-items: center; }
.furniture-selected-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.furniture-selected-head strong { color: var(--primary-dark); font-size: 12px; }
.furniture-selected-head span { color: var(--muted); font-size: 9px; text-align: right; }
.furniture-catalog { margin-top: 20px; padding: 17px; border: 1px solid #ccd9d0; border-radius: 15px; background: linear-gradient(145deg,#f8faf7,#f5f8f5); }
.catalog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.catalog-heading h3 { margin: 5px 0 0; color: var(--primary-dark); font-size: 16px; }
.catalog-heading > span { flex: 0 0 auto; padding: 6px 9px; border-radius: 99px; background: white; color: var(--muted); font-size: 9px; }
.catalog-filters { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(180px,.8fr); gap: 10px; margin: 15px 0 12px; }
.catalog-filters label { display: grid; gap: 5px; color: var(--ink); font-size: 9px; font-weight: 750; }
.catalog-filters input, .catalog-filters select { width: 100%; min-height: 44px; border: 1px solid #d9dce7; border-radius: 10px; padding: 10px 11px; background: white; color: var(--ink); }
.catalog-results { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; max-height: 330px; overflow-y: auto; padding-right: 3px; }
.catalog-item { min-height: 54px; display: grid; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: white; color: var(--ink); text-align: left; }
.catalog-item:hover { border-color: #9fb9aa; background: var(--primary-soft); }
.catalog-item strong { font-size: 10px; line-height: 1.3; }
.catalog-item small { color: var(--muted); font-size: 8px; line-height: 1.3; }
.catalog-empty { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.custom-furniture { margin-top: 14px; }
.upload-zone { border: 1px dashed #9fb9aa; background: #f8faf7; border-radius: 14px; padding: 24px; text-align: center; }
.upload-zone p { font-size: 11px; color: var(--muted); }
.upload-zone input[type="file"] { display: block; width: 100%; max-width: 100%; margin: 12px auto 0; color: var(--muted); }
.upload-zone input[type="file"]::file-selector-button { min-height:44px; margin-right:10px; padding:9px 13px; border:1px solid var(--line); border-radius:9px; color:var(--primary-dark); background:var(--primary-soft); font:inherit; font-weight:750; cursor:pointer; }
.upload-zone input[type="file"]:hover::file-selector-button { border-color:var(--primary); background:#e4eddf; }
.upload-zone input[type="file"]:focus-visible { outline:3px solid rgba(61,119,100,.25); outline-offset:2px; }
.signature-preview { max-width: 240px; max-height: 90px; display: block; margin: 15px auto; object-fit: contain; }
.signature-preview[src=""] { display: none; }
.initials-preview { max-width: 120px; max-height: 64px; }
.asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.asset-missing { display: inline-block; margin-top: 12px; padding: 6px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--muted); font-size: 10px; }
.owner-assets-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.owner-assets-summary > span { min-width: 0; min-height: 92px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfbfd; display: grid; place-items: center; gap: 8px; font-size: 10px; }
.owner-assets-summary img { display: block; max-width: 100%; max-height: 64px; object-fit: contain; }
.signature-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.final-choice-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 16px 0; }
.final-choice-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcf9; }
.final-choice-card > strong { color: var(--primary-dark); font-size: 15px; line-height: 1.35; }
.final-choice-card > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.final-choice-card > .button { width: 100%; margin-top: auto; white-space: normal; }
.final-choice-card > small { color: var(--muted); line-height: 1.45; }
.final-choice-card > .button:disabled { opacity: .65; cursor: not-allowed; }
.final-choice-disclosure { display: block; }
.final-choice-disclosure > summary { width: 100%; color: var(--primary-dark); font-size: 15px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.final-choice-disclosure > summary::marker { color: var(--primary-dark); }
.final-choice-disclosure[open] { grid-column: span 1; }
.final-remote-options { width: 100%; display: grid; gap: 12px; padding-top: 8px; }
.final-remote-options > strong { font-size: 13px; }
.final-remote-options > small { color: var(--muted); line-height: 1.45; }
.final-remote-options .caution-actions { display: grid; gap: 8px; width: 100%; }
.final-remote-options .caution-actions .button { width: 100%; white-space: normal; text-align: left; }
.final-signing-adjust { margin-top: 4px; width: 100%; }
.final-signing-adjust > summary, .inspection-more-actions > summary { cursor: pointer; color: var(--primary-dark); font-size: 13px; }
.inspection-final-actions { margin-top: 18px; }
.inspection-final-actions > h3 { margin: 0; font-size: 17px; }
.inspection-more-actions { margin: 12px 0; }
.inspection-more-actions > .button { margin: 10px 8px 0 0; }
.signature-choice-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fbfcf9; }
.signature-choice-card h3 { margin: 9px 0; color: var(--primary-dark); font-size: 17px; line-height: 1.3; }
.signature-choice-card > p:not(.legal-caption) { min-height: 66px; margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.signature-choice-card > .button { margin-top: 12px; }
.owner-asset-actions > span { align-content: start; }
.owner-asset-actions > span.approved { border-color: #8bcfc8; background: var(--mint-soft); }
.owner-asset-actions .button { width: 100%; margin-top: 3px; }
.final-document-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.final-document-actions .button { width: 100%; min-height: 48px; }
.annex-guidance { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 16px; padding: 14px 16px; border: 1px solid #dfe4ec; border-radius: 12px; background: #f8fafc; color: var(--muted); }
.annex-guidance > span { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #aab4c6; border-radius: 50%; color: #66738b; font-size: 11px; font-weight: 850; }
.annex-guidance p { margin: 0; font-size: 11px; line-height: 1.55; }
.annex-guidance strong { color: var(--ink); }
.annex-drop-zone { min-height: 190px; padding: 28px 18px; border: 2px dashed #9fb9aa; border-radius: 16px; background: linear-gradient(180deg, #f8faf7, #f2f6f2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; transition: border-color .16s, background-color .16s, transform .16s; }
.annex-drop-zone:hover, .annex-drop-zone:focus-visible, .annex-drop-zone.dragging { border-color: var(--mint); background: var(--mint-soft); outline: 0; }
.annex-drop-zone.dragging { transform: scale(1.005); }
.annex-drop-zone > strong { color: var(--primary-dark); font-size: 15px; }
.annex-drop-zone > small { color: var(--muted); font-size: 10px; }
.annex-drop-zone .button { margin-top: 7px; cursor: pointer; }
.annex-drop-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--primary); color: white; font-size: 20px; box-shadow: 0 8px 18px rgba(35,59,53,.18); }
.annex-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.annex-summary strong { color: var(--primary-dark); font-size: 12px; }
.annex-summary span { color: var(--muted); font-size: 10px; text-align: right; }
.annex-empty { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfbfd; display: grid; gap: 4px; text-align: center; }
.annex-empty strong { color: var(--ink); font-size: 12px; }
.annex-empty span { color: var(--muted); font-size: 10px; }
.annex-file-list { display: grid; gap: 10px; }
.annex-file-item { min-width: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr) 44px; align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.annex-file-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 850; }
.annex-file-copy { min-width: 0; display: grid; gap: 5px; }
.annex-file-copy > strong { overflow-wrap: anywhere; font-size: 12px; }
.annex-file-copy > small { color: #24796f; font-size: 9px; }
.annex-file-copy label { display: grid; grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 10px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.annex-file-copy select { min-width: 0; width: 100%; min-height: 46px; padding: 9px 34px 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafafe; color: var(--ink); font-size: 16px; }
.annex-delete { width: 44px; height: 44px; border: 1px solid #f1d9df; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 19px; }
.annex-download { width:44px; height:44px; border:1px solid var(--line); border-radius:10px; background:var(--primary-soft); color:var(--primary); font-size:18px; font-weight:800; }
.annex-property-source { display:flex; justify-content:space-between; gap:12px; margin:0 0 10px; padding:11px 13px; border-radius:10px; background:var(--mint-soft); color:#1d6f68; font-size:10px; }
.annex-property-source strong { font-size:11px; }
.annex-file-inherited { margin-bottom:14px; border-color:#add7cd; background:#fbfffd; }
.annex-file-copy > span { color:var(--muted); font-size:10px; line-height:1.4; }
.annex-pending { min-width:0; margin-top:14px; padding:14px; border:1px solid #b5c8a6; border-radius:13px; background:#f3f8ef; }
.annex-pending > strong { display:block; margin-bottom:10px; color:var(--primary-dark); font-size:12px; }
.annex-file-pending { grid-template-columns:48px minmax(0,1fr); }
.annex-file-pending .annex-file-copy > small { color:var(--muted); }
.annex-pending-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:12px; }
.pdf-attachment-choices { margin:0 0 18px; padding:16px; border:1px solid #b9d2c4; border-radius:14px; background:#f8faf8; }
.pdf-attachment-choices legend { padding:0 7px; color:var(--primary-dark); font-size:13px; font-weight:850; }
.pdf-attachment-choices > p { margin:0 0 12px; color:var(--muted); font-size:10px; line-height:1.55; }
.pdf-attachment-choice-list { display:grid; gap:7px; }
.pdf-attachment-choice { min-height:52px; display:grid; grid-template-columns:20px minmax(0,1fr); align-items:start; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:white; cursor:pointer; }
.pdf-attachment-choice input { width:18px; height:18px; margin:2px 0 0; accent-color:var(--primary); }
.pdf-attachment-choice span { min-width:0; display:grid; gap:3px; }
.pdf-attachment-choice strong { color:var(--ink); font-size:11px; }
.pdf-attachment-choice small { overflow-wrap:anywhere; color:#24796f; font-size:9px; line-height:1.4; }
.pdf-attachment-choice.unavailable { opacity:.58; background:#f4f5f4; cursor:not-allowed; }
.pdf-attachment-choice.unavailable small { color:var(--muted); }
.pdf-attachment-more { margin-top:10px; }
.pdf-attachment-more > summary { min-height:44px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:var(--primary-dark); background:white; cursor:pointer; }
.pdf-attachment-more > summary strong { font-size:12px; }
.pdf-attachment-more > summary span { color:var(--muted); font-size:10px; text-align:right; }
.pdf-attachment-more > summary::after { content:"⌄"; color:var(--primary-dark); font-size:18px; line-height:1; }
.pdf-attachment-more[open] > summary::after { transform:rotate(180deg); }
.pdf-attachment-more > .pdf-attachment-choice-list { margin-top:7px; }
.pdf-attachment-selection-summary { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); font-size:10px; }
.pdf-attachment-selection-summary strong { color:var(--primary-dark); }
.pdf-attachment-selection-summary a { color:var(--primary); font-weight:750; }
.annex-package-actions { margin-top: 14px; }
.annex-package-actions .button { width: auto; max-width: 100%; min-height: 44px; padding: 9px 14px; font-size: 14px; }
.annex-package-actions small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.consent-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px; margin: 14px 0; border: 1px solid #9fb9aa; border-radius: 12px; background: #f8faf7; cursor: pointer; }
.consent-card.disabled { opacity: .55; cursor: not-allowed; }
.consent-card input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--primary); flex: 0 0 auto; }
.consent-card span { display: grid; gap: 4px; }
.consent-card small { color: var(--muted); line-height: 1.45; }
.signing-recap { display: grid; gap: 8px; margin: 16px 0; }
.signing-recap div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 11px; }
.signing-recap span { color: var(--muted); }

.info-box, .warning-box, .error-box, .success-box { padding: 13px 15px; border-radius: 12px; font-size: 11px; line-height: 1.55; margin-bottom: 14px; }
.info-box { background: var(--primary-soft); color: var(--primary-dark); }
.warning-box { background: var(--amber-soft); color: #714e0e; }
.error-box { background: var(--red-soft); color: #7d2929; }
.error-box.validation-clickable { cursor: pointer; }
.success-box { background: var(--mint-soft); color: #1d6f68; }
.info-box ul, .warning-box ul, .error-box ul { margin: 6px 0 0; padding-left: 18px; }
.validation-list { display: grid; gap: 8px; list-style: none; padding-left: 0 !important; }
.validation-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.validation-click-target { cursor: pointer; border-radius: 8px; transition: background-color .16s; }
.validation-list .validation-click-target:hover { background: rgba(167, 54, 66, .06); }
.validation-phase-row.validation-click-target:hover { background: #fff7f7; }
.validation-list button { flex: 0 0 auto; padding: 3px 7px; border: 1px solid currentColor; border-radius: 7px; background: transparent; color: inherit; font-size: 9px; font-weight: 800; }

.wizard-footer { border-top: 1px solid var(--line); padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wizard-footer span { color: var(--muted); font-size: 10px; text-align: center; }
#next-button[hidden] { display: none !important; }
.button { min-height: 42px; border: 0; border-radius: 11px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: inherit; text-align: center; text-decoration: none; line-height: 1.2; vertical-align: middle; font-size: 11px; font-weight: 750; touch-action: manipulation; transition: transform .16s, box-shadow .16s, background-color .16s, border-color .16s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button.primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; box-shadow: 0 9px 22px rgba(35,59,53,.18); }
.button.dark { background: var(--primary-dark); color: white; }
.button.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.soft { background: var(--primary-soft); color: var(--primary-dark); }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.full { width: 100%; }
.button:disabled, .button[aria-busy="true"] { opacity: .52; cursor: not-allowed; transform: none; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button-row .button { flex: 0 1 auto; }
.property-conflict-list { display: grid; gap: 10px; padding: 0; margin: 18px 0; list-style: none; }
.property-conflict-list li { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.property-conflict-list strong, .property-conflict-list span { display: block; }
.property-conflict-list span { color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }

.summary-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.icon-button { border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: white; color: var(--primary); }
.document-preview { background: white; border-radius: 12px; min-height: 365px; padding: 26px 23px; box-shadow: 0 16px 38px rgba(35,59,53,.1); border: 1px solid #e7e8ef; font-family: Georgia, serif; position: relative; overflow: hidden; }
.document-preview::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 55px; background: linear-gradient(transparent, white); }
.document-preview h3 { font-size: 14px; text-align: center; margin: 0 0 5px; }
.document-preview .preview-kind { display: block; text-align: center; color: var(--primary); font: 700 8px Inter, sans-serif; letter-spacing: .08em; margin-bottom: 20px; }
.preview-section { margin: 13px 0; }
.preview-section strong { font-size: 9px; text-transform: uppercase; border-bottom: 1px solid #e0e2ea; display: block; padding-bottom: 4px; }
.preview-section p { font-size: 8px; line-height: 1.5; margin: 6px 0; color: var(--muted); }
.preview-line { height: 4px; border-radius: 3px; background: #e9eaf0; margin: 5px 0; }
.preview-line.short { width: 60%; }
.total-card { margin: 16px 0; padding: 15px; border-radius: 12px; background: linear-gradient(135deg, var(--primary-dark), #315a4e); color: white; display: grid; grid-template-columns: 1fr auto; align-items: end; }
.total-card span { font-size: 10px; color: #d4e3d8; }
.total-card strong { font-size: 20px; grid-row: span 2; }
.total-card small { font-size: 9px; color: #d4e3d8; }
.summary-actions { display: grid; gap: 9px; }
.legal-caption { font-size: 9px; color: var(--muted); line-height: 1.5; margin: 14px 2px 0; }

.clause-list { display: grid; gap: 12px; margin-top: 14px; }
.clause-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.clause-card.selected { border-color: #8bcfc8; background: var(--mint-soft); }
.clause-card.automatic-clause { border-color: #b8d3c8; background: #f4f9f6; }
.clause-card.disabled { opacity: .68; background: #f7f7fa; }
.clause-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.clause-card-head > span { min-width: 0; display: grid; gap: 5px; }
.clause-card-head em { width: max-content; max-width: 100%; padding: 4px 7px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 8px; font-style: normal; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.clause-card-head strong { color: var(--primary-dark); font-size: 13px; }
.clause-card > p { margin: 9px 0 4px; color: var(--ink); font-size: 11px; line-height: 1.5; }
.clause-card > small { display: block; color: var(--muted); font-size: 9px; line-height: 1.45; }
.clause-switch { flex: 0 0 auto; display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.clause-switch input { width: 22px; height: 22px; accent-color: var(--primary); }
.clause-switch span { color: var(--muted); font-size: 8px; font-weight: 800; }
.clause-lock { flex: 0 0 auto; padding: 6px 9px; border-radius: 99px; background: #dcece5; color: var(--primary-dark); font-size: 9px; font-weight: 850; white-space: nowrap; }
.clause-details { margin-top: 13px; padding-top: 13px; border-top: 1px solid rgba(47,111,98,.18); }
.clause-source { margin-top: 10px; font-size: 9px; }
.clause-source summary { color: var(--muted); cursor: pointer; }
.clause-source a { display: inline-block; margin-top: 6px; color: var(--primary); overflow-wrap: anywhere; }
.clause-catalog { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.clause-catalog > summary { color: var(--primary-dark); cursor: pointer; font-size: 11px; font-weight: 800; }
.prohibited-list { display: grid; gap: 9px; }
.prohibited-list article { padding: 12px; border: 1px solid #f0d9dc; border-radius: 11px; background: #fffafa; }
.prohibited-list strong { color: #7d2929; font-size: 11px; }
.prohibited-list p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.prohibited-list a { color: #7d2929; font-size: 9px; }
.scope-list { margin: 0; padding: 18px 22px 18px 38px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.scope-list li + li { margin-top: 6px; }

dialog { border: 0; padding: 0; background: transparent; max-width: min(680px, calc(100vw - 30px)); width: 100%; }
dialog::backdrop { background: rgba(32,63,53,.58); backdrop-filter: blur(3px); }
.modal-card { background: white; border-radius: 18px; padding: 28px; box-shadow: var(--shadow); position: relative; max-height: 85vh; overflow: auto; }
.modal-card h2 { color: var(--primary-dark); font-size: 26px; letter-spacing: -.025em; margin: 0 0 10px; padding-right: 48px; }
.modal-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-close { position: absolute; right: 16px; top: 14px; border: 0; background: var(--primary-soft); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-size: 20px; color: var(--muted); }

/* Lease PDF review keeps its controls outside the scrolling pages. */
#modal.inspection-pdf-review { max-height:calc(100dvh - 24px); overflow:hidden; }
#modal.inspection-pdf-review .modal-card { box-sizing:border-box; max-height:calc(100dvh - 24px); overflow:hidden; }
#modal.inspection-pdf-review #modal-content { display:flex; flex-direction:column; gap:12px; max-height:calc(100dvh - 80px); min-height:0; }
#modal.inspection-pdf-review #modal-content > :not([data-review-pages]) { flex-shrink:0; margin:0; }
#modal.inspection-pdf-review [data-review-pages] { min-height:0; overflow:auto; overscroll-behavior:contain; }
#modal.inspection-pdf-review .button-row { flex-wrap:wrap; }
#modal.inspection-pdf-review .button { white-space:normal; max-width:100%; }
@media(max-width:480px) {
  #modal.inspection-pdf-review .modal-card { padding:18px; }
  #modal.inspection-pdf-review #modal-content { max-height:calc(100dvh - 60px); }
  #modal.inspection-pdf-review h2 { font-size:21px; }
}
@media(max-height:640px) {
  #modal.inspection-pdf-review .modal-card { overflow:auto; }
  #modal.inspection-pdf-review #modal-content { display:block; max-height:none; }
  #modal.inspection-pdf-review #modal-content > * + * { margin-top:12px; }
  #modal.inspection-pdf-review [data-review-pages] { height:160px; min-height:160px; }
}

.recipient-list { display: grid; gap: 8px; margin: 16px 0; }
.recipient { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; justify-content: space-between; font-size: 11px; }
.recipient > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.caution-actions { display: grid; gap: 9px; }
.home-confirmation-actions { display: grid; gap: 9px; margin-top: 20px; }
.home-confirmation-actions[hidden] { display: none; }
.hash { font-family: ui-monospace, monospace; word-break: break-all; background: #f5f5f9; padding: 10px; border-radius: 8px; font-size: 9px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 210px 1fr; }
  .summary-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 280px 1fr; gap: 20px; border-left: 0; border-top: 1px solid var(--line); }
  .summary-panel .summary-heading, .summary-panel .legal-caption { grid-column: 1 / -1; }
  .document-preview { grid-row: span 3; }
}
@media (max-width: 780px) {
  .topbar { padding: 0 16px; }
  .save-state { display: none; }
  .lease-mobile-save-state { display: block; margin: 0 0 16px; font-size: 13px; color: var(--muted); }
  .app-shell { display: block; }
  .sidebar { padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .dossier-card, .privacy-note { display: none; }
  #step-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .nav-step { min-width: 0; width: 100%; min-height: 80px; padding: 10px 6px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 8px; text-align: center; font-size: 12px; line-height: 1.35; color: var(--muted); }
  .nav-step span:first-child { flex-shrink: 0; width: 28px; height: 28px; font-size: 12px; }
  .nav-step span:last-child { display: block; white-space: normal; }
  .workspace { padding: 26px 18px; }
  .workspace-header { display: block; }
  .workspace-header .button { margin-top: 14px; }
  .card-grid, .form-grid { grid-template-columns: 1fr; }
  .furniture-selected-head, .catalog-heading { align-items: flex-start; flex-direction: column; }
  .furniture-selected-head span { text-align: left; }
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-results { grid-template-columns: 1fr 1fr; max-height: 360px; }
  .owner-prefill { align-items: stretch; flex-direction: column; }
  .owner-prefill .button { width: 100%; white-space: normal; }
  .segmented, .confidence-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .summary-panel { display: block; padding: 24px 18px; }
  .document-preview { min-height: 300px; }
  .wizard-footer { position: sticky; bottom: 0; z-index: 8; margin: 0 -18px -28px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
  .wizard-footer span { display: none; }
  .button { min-height: 44px; }
  .upload-zone { padding: 18px 14px; }
  .asset-grid, .owner-assets-summary, .final-document-actions, .signature-choice-grid { grid-template-columns: 1fr; }
  .signature-choice-card > p:not(.legal-caption) { min-height: 0; }
  .annex-summary { align-items: flex-start; flex-direction: column; }
  .annex-summary span { text-align: left; }
  .annex-file-item { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 12px; gap: 9px; }
  .annex-file-pending { grid-template-columns: 44px minmax(0, 1fr); }
  .annex-file-icon { width: 44px; height: 44px; }
  .annex-file-copy label { grid-template-columns: 1fr; gap: 5px; }
  .toggle-row { align-items: flex-start; }
  .toggle-control, .toggle-row > .toggle { margin-top: 2px; }
  .review-card { align-items: flex-start; }
  .clause-card-head { display: grid; }
  .clause-switch { grid-auto-flow: column; justify-content: start; align-items: center; }
}

@media (max-width: 480px) {
  .brand small { display: none; }
  .top-actions { gap: 6px; }
  .top-actions a[href="/dashboard.html"], .top-actions a[href="/etat-des-lieux.html"], .top-actions a[href^="/rediger-un-bail.html"], #home-button, #inspection-pdf-top { display: none; }
  .top-actions .button { padding-inline: 8px; font-size: 10px; white-space: nowrap; }
  .button-row { display: grid; grid-template-columns: 1fr; }
  .button-row .button { width: 100%; }
  .catalog-results { grid-template-columns: 1fr; }
  .optional-section > summary { align-items: flex-start; flex-wrap: wrap; }
  .optional-section > summary > span { flex-basis: calc(100% - 46px); }
  .optional-section > summary em { margin-left: 38px; }
  .review-card { display: grid; }
  .review-card .button { width: 100%; }
  .validation-list li { display: grid; }
  .validation-list button { justify-self: start; min-height: 44px; }
}

@media (max-width: 360px) {
  .brand { gap: 9px; }
  .brand small { display: none; }
  .top-actions { gap: 8px; }
  .topbar .button { padding-inline: 11px; }
  .workspace { padding-inline: 14px; }
  .summary-panel { padding-inline: 14px; }
  .form-section { padding: 16px; }
  .wizard-footer { margin-inline: -14px; padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.address-autocomplete { position: relative; }
.address-suggestions {
  position: absolute;
  z-index: 40;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  overflow: auto;
  max-height: 280px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(35, 59, 53, .16);
}
.address-suggestions button {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.address-suggestions button:hover,
.address-suggestions button.active { background: var(--primary-soft); }
.address-suggestions strong { font-size: 12px; line-height: 1.35; }
.address-suggestions small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.address-empty { padding: 11px 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.address-status {
  display: block;
  min-height: 0;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.address-status:empty { display: none; }

.choice-field { min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.choice-field legend { padding: 0; font-size: 13px; font-weight: 750; }
.choice-field > .hint { margin: 6px 0 10px; }
.choice-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.choice-field .checklist-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.choice-field .checklist-option:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.choice-field .checklist-option:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice-field .checklist-option:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.choice-field .checklist-option input { appearance: auto; flex: 0 0 18px; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--primary); box-shadow: none; }
.choice-details { margin-top: 10px; }
.choice-details summary { padding: 10px 0; color: var(--primary-dark); font-size: 12px; font-weight: 650; cursor: pointer; }
.choice-details label { display: block; margin: 3px 0 7px; }
.choice-details textarea { min-height: 76px; }
@media (max-width: 440px) { .choice-checklist { grid-template-columns: 1fr; } }

/* Shared choice controls: one visual language in the lease and inspection. */
.choice-field .checklist-option { font-size: 13px; }
.choice-field[disabled] .checklist-option { cursor: not-allowed; opacity: .65; }
.single-choice-detail { margin-top: 12px; }
.single-choice-detail label { display: block; margin-bottom: 7px; }
.single-choice-detail textarea { min-height: 76px; }
.single-choice-detail[hidden] { display: none; }
.choice-details summary { min-height: 44px; display: list-item; align-content: center; }
.access-quick-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.access-quick-choices .button { min-height: 44px; white-space: normal; text-align: left; }
.profile-merge-actions { display: grid; gap: 10px; margin-top: 22px; }
.profile-merge-actions button { min-height: 46px; white-space: normal; }
.profile-merge-actions .text-button { border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.profile-merge-actions .text-button:hover { background: var(--primary-soft); color: var(--primary-dark); }
.inline-optional-action { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 18px; margin-top: 16px; }
.inline-optional-copy { display: grid; gap: 5px; min-width: min(100%, 280px); }
.inline-optional-copy strong, .inline-optional-copy small { display: block; }
.inline-optional-copy small { color: var(--muted); line-height: 1.45; }
@media (max-width: 440px) {
  .single-choice .choice-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-quick-choices { display: grid; grid-template-columns: 1fr; }
  .access-quick-choices .button { justify-content: flex-start; }
  .inline-optional-action { display: grid; grid-template-columns: 1fr; }
}
.saved-property-picker { padding: 18px; margin: 0 0 24px; border: 1px solid #b9cfc2; border-radius: 14px; background: #edf3ee; }
.saved-property-picker label { display: block; margin-bottom: 9px; font-weight: 750; color: #203f35; }
.saved-property-picker select { width: 100%; min-height: 46px; background: white; }
.saved-property-picker p { margin: 9px 0 0; font-size: 14px; line-height: 1.5; }

/* Keep native selection and keyboard support, with one shared field design. */
:is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 46px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='m5 7.5 5 5 5-5' stroke='%23526735' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 15px center;
  background-repeat: no-repeat;
  background-size: 20px;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: normal;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
:is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]) option {
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
}
:is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]):hover:not(:disabled) { border-color: #5c806f; }
:is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: 0 0 0 4px rgb(40 100 82 / 10%); }
:is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]):disabled { background-color: #f4f3f7; color: #777184; cursor: not-allowed; opacity: 1; }
@media (forced-colors: active) {
  :is(.field, .profile-field, .saved-property-picker, .catalog-filters, .inline-field) select:not([multiple]) { appearance: auto; background-image: none; }
}
@media (max-width: 480px) {
  #step-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-step { min-height: 76px; }
}
/* Wizard rerenders restore their own visual anchor; avoid a second browser adjustment. */
html:has(#step-content), html:has(#inspection-content) { overflow-anchor: none; }
