/* #914 Journey lane 4 (P3 + P4), part of #910: the roof module's Roofs page and its core samples (assets/phone-journey-roofs.js).
   Every rule needs html[data-pj="on"] (set by assets/phone-journey.js only while phone_journey, phone_ui_nest and phone_ui_flow
   are on) and the page's own .pj-roofs box, so with the switch off nothing here applies. Nest rules: pills 999 px, every other
   edge 2 px, Archivo / Plex, 44 pt targets, one filled main button pinned at the bottom. Look: the prototype's roofsTab and
   coresHtml (records/JOURNEY-PLAN-2026-11-09/prototype/index.html). iPhone and Android differ only in the tick box (round on
   iPhone, square on Android, HANDOVER rule 12); the header is lane 1's. */
html[data-pj="on"] body #journey .pj-roofs {
  --pj-safe: max(34px, env(safe-area-inset-bottom)); --pj-side: max(18px, env(safe-area-inset-left), calc(50% - 264px));
  --pj-right: max(18px, env(safe-area-inset-right), calc(50% - 264px));
  color: var(--nest-ink); font: 400 15px/1.45 var(--nest-text);
}
html[data-pj="on"][data-nest-os="android"] body #journey .pj-roofs { --pj-safe: max(16px, env(safe-area-inset-bottom)); }
html[data-pj="on"] body #journey .pj-roofs * { box-sizing: border-box; }
html[data-pj="on"] body #journey .pj-roofs .pj-hide { display: none !important; }
html[data-pj="on"] body #journey .pj-roofs [hidden] { display: none !important; }
html[data-pj="on"] body #journey .pj-roofs-instr { margin: 4px 0 12px; color: var(--nest-soft); }
/* (the parts list's group headings are assets/phone-journey-parts.css's own: this rule's margin 0 and display face outranked them) */
html[data-pj="on"] body #journey .pj-roofs h2, html[data-pj="on"] body #journey .pj-roofs h3:not(.pj-parts-group) { margin: 0; font-family: var(--nest-disp); font-stretch: 118%; font-weight: 750; letter-spacing: -.01em; color: var(--nest-ink); }
html[data-pj="on"] body #journey .pj-roofs .pj-roof-title { font-size: 24px; line-height: 1.2; margin: 0 0 10px; overflow-wrap: anywhere; }
html[data-pj="on"] body #journey .pj-roofs .pj-sub { margin: 16px 0 4px; font: 600 15px/1.35 var(--nest-text); color: var(--nest-ink); }
html[data-pj="on"] body #journey .pj-roofs .pj-small { margin: 2px 0 6px; font-size: 13px; line-height: 1.4; color: var(--nest-muted); }
html[data-pj="on"] body #journey .pj-roofs .pj-error { margin: 4px 0 0; font-size: 13px; color: #A83232; }
html[data-pj="on"] body #journey .pj-roofs .pj-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 2px; background: var(--nest-notice); font-size: 14px; color: var(--nest-soft); }
html[data-pj="on"] body #journey .pj-roofs .pj-warn { color: #C2412D; }

/* buttons: pills (999 px), 44 pt. phone.css's branded button rule (html[data-brand="surveynest"] button:not(...), with ids in
   its :not list) outranks any class rule here, so each button's own corners are set with !important (as lane 1's tabs do) */
html[data-pj="on"] body #journey .pj-roofs .pj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; margin: 0; padding: 0 18px; border: 1px solid var(--nest-line);
  border-radius: 999px !important; background: var(--nest-card); color: var(--nest-teal); font: 600 15px/1.2 var(--nest-text); box-shadow: none; cursor: pointer; width: auto;
}
html[data-pj="on"] body #journey .pj-roofs .pj-btn-sm { padding: 0 14px; font-size: 14px; }
html[data-pj="on"] body #journey .pj-roofs .pj-btn-icon { width: 44px; padding: 0; font-size: 20px; }
html[data-pj="on"] body #journey .pj-roofs .pj-btn-pale { background: var(--nest-notice); border-color: var(--nest-notice); }
html[data-pj="on"] body #journey .pj-roofs .pj-btn-main { background: var(--nest-teal); border-color: var(--nest-teal); color: #fff; }
html[data-pj="on"] body #journey .pj-roofs .pj-danger { color: #C2412D; }
html[data-pj="on"] body #journey .pj-roofs .pj-btn:disabled { opacity: .45; cursor: default; }
html[data-pj="on"] body #journey .pj-roofs button:focus-visible, html[data-pj="on"] body #journey .pj-roofs summary:focus-visible { outline: 2px solid var(--nest-deep); outline-offset: 2px; }
html[data-pj="on"] body #journey .pj-roofs .pj-row-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-roofs-first { margin-top: 4px; }

/* the roof chips */
html[data-pj="on"] body #journey .pj-roofs .pj-roofs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip { display: inline-flex; align-items: stretch; min-height: 44px; border: 1px solid var(--nest-line); border-radius: 999px; background: var(--nest-card); overflow: hidden; color: var(--nest-ink); }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip.is-on { background: var(--nest-deep); border-color: var(--nest-deep); color: #fff; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip-add { border-style: dashed; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip button { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 12px; border: 0; border-radius: 0 !important; background: none; color: inherit; font: 600 15px/1.2 var(--nest-text); box-shadow: none; cursor: pointer; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip-add button { color: var(--nest-teal); }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip .pj-rchip-x { min-width: 44px; justify-content: center; border-left: 1px solid var(--nest-line); font-size: 18px; opacity: .85; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip.is-on .pj-rchip-x { border-left-color: rgba(255, 255, 255, .35); }
html[data-pj="on"] body #journey .pj-roofs .pj-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 999px; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip.is-on .pj-dot { outline: 2px solid #fff; }

/* cards */
html[data-pj="on"] body #journey .pj-roofs .pj-card { margin: 0 0 12px; padding: 14px; border: 1px solid var(--nest-line); border-radius: 2px; background: var(--nest-card); }
html[data-pj="on"] body #journey .pj-roofs .pj-card-active { border-left: 4px solid var(--nest-signal); }
html[data-pj="on"] body #journey .pj-roofs .pj-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
html[data-pj="on"] body #journey .pj-roofs .pj-field { display: block; margin: 0 0 12px; }
html[data-pj="on"] body #journey .pj-roofs .pj-grid2 .pj-field { margin: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-field > span { display: block; margin: 0 0 4px; font: 600 14px/1.3 var(--nest-text); color: var(--nest-ink); }
html[data-pj="on"] body #journey .pj-roofs input:not([type="checkbox"]):not([type="file"]), html[data-pj="on"] body #journey .pj-roofs select, html[data-pj="on"] body #journey .pj-roofs textarea {
  display: block; width: 100%; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--nest-line); border-radius: 2px; background: var(--nest-field);
  color: var(--nest-ink); font: 400 16px/1.3 var(--nest-text); box-shadow: none;
}
html[data-pj="on"] body #journey .pj-roofs textarea { min-height: 88px; resize: vertical; }
html[data-pj="on"] body #journey .pj-roofs select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--nest-teal) 50%), linear-gradient(135deg, var(--nest-teal) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
html[data-pj="on"] body #journey .pj-roofs input:focus-visible, html[data-pj="on"] body #journey .pj-roofs select:focus-visible, html[data-pj="on"] body #journey .pj-roofs textarea:focus-visible { outline: 2px solid var(--nest-teal); outline-offset: 0; }

/* the fold */
html[data-pj="on"] body #journey .pj-roofs .pj-fold { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--nest-line); }
html[data-pj="on"] body #journey .pj-roofs .pj-fold summary { display: flex; align-items: center; min-height: 44px; color: var(--nest-teal); font-weight: 600; cursor: pointer; list-style: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-fold summary::-webkit-details-marker { display: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-fold summary::before { content: "▸"; margin-right: 8px; }
html[data-pj="on"] body #journey .pj-roofs .pj-fold[open] summary::before { content: "▾"; }

/* Elements | Core samples */
html[data-pj="on"] body #journey .pj-roofs .pj-seg { display: flex; margin: 14px 0 0; border: 1px solid var(--nest-teal); border-radius: 999px; overflow: hidden; }
html[data-pj="on"] body #journey .pj-roofs .pj-seg button { flex: 1; min-height: 44px; margin: 0; padding: 0 8px; border: 0; border-radius: 0 !important; background: none; color: var(--nest-teal); font: 600 15px/1.2 var(--nest-text); box-shadow: none; cursor: pointer; }
html[data-pj="on"] body #journey .pj-roofs .pj-seg button[aria-pressed="true"] { background: var(--nest-teal); color: #fff; }

/* the roof image and the core pictures */
html[data-pj="on"] body #journey .pj-roofs .pj-crop { position: relative; overflow: hidden; border: 1px solid var(--nest-line); border-radius: 2px; background: #cfd6d2; touch-action: none; user-select: none; -webkit-user-select: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop .pj-crop-sizer { display: block; width: 100%; height: auto; visibility: hidden; aspect-ratio: auto; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop > img:not(.pj-crop-sizer) { position: absolute; max-width: none; height: auto; pointer-events: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-own > img { position: static; display: block; width: 100%; height: auto; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-own { touch-action: auto; }
/* the "tap here" frame sits above the picture (the picture is positioned, so an outline would be drawn under it) */
html[data-pj="on"] body #journey .pj-roofs .pj-crop.is-placing::after { content: ""; position: absolute; inset: 0; z-index: 3; border: 3px solid var(--nest-signal); border-radius: 2px; pointer-events: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-roof-details { margin-top: 14px; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-tag { position: absolute; left: 8px; top: 8px; padding: 4px 10px; border-radius: 2px; color: #fff; font: 700 14px/1.2 var(--nest-text); background: var(--nest-deep); pointer-events: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-tag-end { left: auto; top: auto; right: 8px; bottom: 8px; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-label { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 3px solid #fff; border-radius: 999px; background: #2F6FB5; pointer-events: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-pin { position: absolute; transform: translate(-50%, -50%); min-width: 34px; padding: 4px 6px; border: 2px solid #fff; border-radius: 999px; background: var(--nest-deep); color: #fff; font: 700 13px/1 var(--nest-text); text-align: center; pointer-events: none; }

/* core samples */
html[data-pj="on"] body #journey .pj-roofs .pj-core-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
html[data-pj="on"] body #journey .pj-roofs .pj-core-head h3 { flex: 1; min-width: 0; font-size: 20px; }
html[data-pj="on"] body #journey .pj-roofs .pj-drop-row { display: flex; gap: 8px; margin: 6px 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-drop { flex: 1; min-height: 52px; margin: 0; border: 1.5px dashed var(--nest-line); border-radius: 2px !important; background: none; color: var(--nest-teal); font: 600 15px/1.2 var(--nest-text); box-shadow: none; cursor: pointer; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer { margin: 6px 0; padding: 8px; border: 1px solid var(--nest-line); border-radius: 2px; background: var(--nest-field); }
html[data-pj="on"] body #journey .pj-roofs .pj-layer.is-suggested { border-style: dashed; background: transparent; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer.is-suggested select, html[data-pj="on"] body #journey .pj-roofs .pj-layer.is-suggested input:not([type="checkbox"]) { background: var(--nest-mist); color: var(--nest-muted); }
html[data-pj="on"] body #journey .pj-roofs .pj-suggested { display: block; margin: 0; font: 500 11px/1 var(--nest-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--nest-muted); }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-head { display: flex; align-items: center; gap: 6px; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-head select { flex: 1; min-width: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-name { flex: 1; min-width: 0; font-weight: 600; }
html[data-pj="on"] body #journey .pj-roofs .pj-swatch { flex: none; align-self: stretch; width: 10px; min-height: 44px; border-radius: 2px; }
html[data-pj="on"] body #journey .pj-roofs .pj-ib { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--nest-line); border-radius: 999px !important; background: var(--nest-card); color: var(--nest-ink); font: 400 17px/1 var(--nest-text); box-shadow: none; cursor: pointer; }
html[data-pj="on"] body #journey .pj-roofs .pj-ib:disabled { opacity: .35; cursor: default; }
html[data-pj="on"] body #journey .pj-roofs .pj-use { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; font-weight: 600; color: var(--nest-teal); cursor: pointer; }
html[data-pj="on"] body #journey .pj-roofs .pj-use input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--nest-teal); border-radius: 999px; background: var(--nest-field); }
html[data-pj="on"][data-nest-os="android"] body #journey .pj-roofs .pj-use input { border-radius: 2px; }
html[data-pj="on"] body #journey .pj-roofs .pj-use input:checked { background: var(--nest-teal); box-shadow: inset 0 0 0 4px var(--nest-field); }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 6px; margin-top: 6px; }
html[data-pj="on"] body #journey .pj-roofs .pj-unit { position: relative; display: block; }
html[data-pj="on"] body #journey .pj-roofs .pj-unit input:not([type="checkbox"]):not([type="file"]) { padding-right: 40px; text-align: right; }
html[data-pj="on"] body #journey .pj-roofs .pj-unit i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--nest-muted); pointer-events: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-total { flex: 1 1 160px; margin: 0; }

/* the one pinned main action and the toast */
html[data-pj="on"] body #journey .pj-roofs .pj-roofs-bar {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; padding: 10px var(--pj-right) var(--pj-safe) var(--pj-side);
  background: linear-gradient(rgba(234, 238, 236, 0), var(--nest-mist) 30%); pointer-events: none;
}
html[data-pj="on"] body #journey .pj-roofs .pj-roofs-bar .pj-btn-main { pointer-events: auto; display: flex; width: 100%; height: 52px; min-height: 52px; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-pj="on"] body #journey .pj-roofs .pj-roofs-toast {
  position: fixed; z-index: 30; left: 50%; bottom: calc(var(--pj-safe) + 70px); transform: translateX(-50%); max-width: min(400px, calc(100vw - 32px)); margin: 0;
  padding: 12px 16px; border-radius: 2px; background: var(--nest-deep); color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); pointer-events: none;
}

html[data-pj="on"] body #journey .pj-roofs .pj-layer-component { display: flex; gap: 6px; margin-top: 6px; align-items: stretch; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-component select { flex: 1; min-width: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-ib { min-width: 44px !important; min-height: 44px !important; max-width: 44px; max-height: 44px; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-field { display: flex; min-width: 0; flex-direction: column; gap: 4px; font-size: 12px; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-field input { width: 100%; min-width: 0; box-sizing: border-box; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-foot .pj-total { flex: none; }

html[data-pj="on"] body #journey .pj-roofs .pj-layer-choice { flex: 1; position: relative; min-width: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-choice-text { display: block; min-height: 44px; box-sizing: border-box; padding: 10px 30px 10px 10px; border: 1px solid var(--nest-line); background: var(--nest-card); overflow-wrap: anywhere; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-choice-text::after { content: '▾'; position: absolute; right: 10px; top: 10px; color: var(--nest-teal); }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-choice select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-choice:focus-within { outline: 2px solid var(--nest-teal); }

html[data-pj="on"] body #journey .pj-roofs .pj-roof-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
html[data-pj="on"] body #journey .pj-roofs .pj-roof-title-row .pj-roof-title { margin: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-roof-priority { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
html[data-pj="on"] body #journey .pj-roofs .pj-crop-label { box-sizing: border-box; width: 18px; height: 18px; margin: -9px 0 0 -9px; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip .pj-rchip-x { position: relative; color: transparent; font-size: 0; }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip-x::before, html[data-pj="on"] body #journey .pj-roofs .pj-rchip-x::after { content: ''; position: absolute; width: 14px; height: 2px; background: currentColor; color: var(--nest-ink); transform: rotate(45deg); }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip-x::after { transform: rotate(-45deg); }
html[data-pj="on"] body #journey .pj-roofs .pj-rchip.is-on .pj-rchip-x::before, html[data-pj="on"] body #journey .pj-roofs .pj-rchip.is-on .pj-rchip-x::after { color: white; }

html[data-pj-part="open"] body #journey .pj-roofs .pj-roofs-bar { display: none; }
html[data-pj="on"] body #journey .pj-roofs .pj-layer-fields { align-items: end; }

html[data-pj="on"] body #journey .pj-roofs .pj-layer-field textarea[data-layer="material"] { box-sizing: border-box; min-height: 44px; overflow: hidden; resize: none; overflow-wrap: anywhere; }

/* #975 P3a: numbered item pins on the roof picture, in their priority colours, and their legend (phone_item_pins only) */
html[data-pj="on"] body #journey .pj-roofs .pj-item-pin { position: absolute; z-index: 2; box-sizing: border-box; min-width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--nest-text); box-shadow: 0 1px 3px rgba(0,0,0,.4); pointer-events: none; }
html[data-pj="on"] body #journey .pj-item-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; font: 500 13px/1.3 var(--nest-text); color: var(--nest-muted, #5d6763); }
html[data-pj="on"] body #journey .pj-item-key { display: inline-flex; align-items: center; gap: 5px; }
html[data-pj="on"] body #journey .pj-item-key > i { display: inline-block; width: 12px; height: 12px; border-radius: 999px; border: 1px solid rgba(0,0,0,.15); }
html[data-pj="on"] body #journey .pj-item-count { flex-basis: 100%; font-weight: 700; color: var(--nest-ink, #1d2422); }

/* F11: "Tap a part of Roof N to rate it." belongs to the list; it goes while a part's sheet is open and returns when it closes */
html[data-pj-part="open"] body .pj-roofs-instr { display: none; }
