/* d4 project header v3.1 (design: artisan-project-header-v3-20261106,
 * HANDOFF.md + v3.1/HANDOFF.md).
 * The contractor project desk's dark hero, its sheets and the compact bar.
 * Earth tokens from the live app (contractor_family.css); the app's own font.
 * Every selector starts at .ph-wrap so .artisan-workspace's element rules
 * (h1, button) don't override it. Motion only when allowed. */
.ph-wrap, .glance {
  --ph-night: #1c1917; --ph-on-night: #fafaf9; --ph-on-night-2: #d6d3d1;
  --ph-clay-soft: #f6e7da; --ph-call: #174d38; --ph-danger: #9f1d1d; --ph-rule: #d6d3d1; --ph-line: #e7e5e4; --ph-muted: #57534e;
  font-family: var(--artisan-font, Sora, ui-sans-serif, system-ui, sans-serif);
}
.ph-wrap { margin: -1rem -1rem 0; }
.ph-wrap .ph-hero { position: relative; isolation: isolate; color: var(--ph-on-night); background: var(--ph-night); }
.ph-wrap .ph-hero :focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.ph-wrap .ph-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.ph-wrap .ph-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: 1; }
.ph-wrap .ph-tex { position: absolute; inset: 0; background: #3b2f27 url("/assets/project-header-topo-34b58a2d.svg") center / cover no-repeat; }
.ph-wrap .ph-scrim { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(28,25,23,.42) 0, rgba(28,25,23,.12) 48px, rgba(28,25,23,.4) 88px, rgba(28,25,23,.9) 108px, #1c1917 124px); }
.ph-wrap .ph-no-cover .ph-scrim { background: linear-gradient(180deg, rgba(28,25,23,.1) 0, rgba(28,25,23,.45) 90px, rgba(28,25,23,.92) 110px, #1c1917 130px); }

/* v3.1 phone grid: top / id / photos / pill (one column) */
.ph-wrap .ph-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "id" "photos" "pill"; padding: 8px 16px 16px; }
.ph-wrap .ph-top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.ph-wrap .ph-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; background: rgba(28,25,23,.72); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
.ph-wrap .ph-stage { margin: 0; padding: 4px 10px; line-height: 1.3; border-radius: 999px; background: rgba(28,25,23,.86); color: var(--ph-on-night-2); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.ph-wrap .ph-id { grid-area: id; display: flex; flex-direction: column; min-width: 0; margin-top: 6px; }
.ph-wrap .ph-status-row { position: relative; z-index: 2; align-self: flex-start; }
.ph-wrap .ph-photos { grid-area: photos; position: relative; min-width: 0; margin-top: 10px; }
.ph-wrap .ph-pill-area { grid-area: pill; min-width: 0; }

/* status: badge + Change (split button) */
.ph-wrap .ph-split { display: inline-flex; align-items: stretch; border-radius: 999px; background: rgba(28,25,23,.86); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ph-wrap .ph-badge { display: inline-flex; align-items: center; gap: 7px; margin: 4px; padding: 0 12px; min-height: 36px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.ph-wrap .ph-bdot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ph-wrap .ph-badge-clay { background: var(--ph-clay-soft); color: #7a3412; }
.ph-wrap .ph-badge-moss { background: #dfe8dc; color: #24391f; }
.ph-wrap .ph-badge-stone { background: #e7e5e4; color: #44403c; }
.ph-wrap .ph-badge-plain { background: #fafaf9; color: var(--ph-night); }
.ph-wrap .ph-split-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 0 999px 999px 0; background: none; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }

/* names, address, people */
.ph-wrap .ph-kicker { margin: 10px 0 0; font-size: 15px; color: var(--ph-on-night-2); }
.ph-wrap .ph-role { color: #a8a29e; }
.ph-wrap .ph-primary { margin-left: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fdba74; }
.ph-wrap .ph-sep { color: #78716c; }
.ph-wrap .ph-hero .ph-name { margin: 2px 0 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.035em; color: var(--ph-on-night); text-wrap: balance; overflow-wrap: anywhere; }
.ph-wrap .ph-edit { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; min-height: 44px; padding: 0 6px; border-radius: 999px; background: none; color: var(--ph-on-night-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.ph-wrap .ph-edit:hover { color: #fff; }
.ph-wrap .ph-addr-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; margin-top: 4px; }
.ph-wrap .ph-addr-row > div { flex-wrap: nowrap; }
.ph-wrap .ph-addr { display: inline-flex; flex: 0 1 auto; align-items: center; gap: 6px; min-width: 0; min-height: 44px; font-size: 15px; color: var(--ph-on-night); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 4px; }
.ph-wrap .ph-addr > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-wrap .ph-dir { display: inline-flex; flex: none; align-items: center; min-height: 44px; margin-left: auto; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ph-on-night); text-decoration: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.ph-wrap .ph-people { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.ph-wrap .ph-last { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--ph-on-night-2); }
.ph-wrap .ph-last-warn { color: #fcd34d; font-weight: 600; }
.ph-wrap .ph-id > [data-contact-chips], .ph-wrap .ph-id > div:not([class]) { color: var(--ph-night); }
/* The caller-identity "Name typed in, Nov 7" line sits straight on the night
   header; its stone-500 was 3.0:1 there (d5 browser proof, contrast audit). */
.ph-wrap .ph-id > [data-name-source] { color: var(--ph-on-night-2); }

/* contact pill */
.ph-wrap .ph-pill-wrap { display: flex; flex-direction: column; margin-top: 6px; }
.ph-wrap .ph-pill { position: relative; display: grid; gap: 3px; padding: 3px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.ph-wrap .ph-pill-1 { grid-template-columns: 1fr; }
.ph-wrap .ph-pill-2 { grid-template-columns: 1.25fr 1.3fr; }
.ph-wrap .ph-pill-3 { grid-template-columns: 1.25fr 1fr 1.3fr; }
/* "No mobile number" needs the room: one line from 768, at most two at 390 */
.ph-wrap .ph-pill-3:has(.ph-seg-none) { grid-template-columns: 1fr 1.5fr 1.25fr; }
.ph-wrap .ph-seg { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--ph-night); font-size: 15px; font-weight: 700; white-space: nowrap; text-decoration: none; cursor: pointer; list-style: none; }
.ph-wrap .ph-seg::-webkit-details-marker { display: none; }
.ph-wrap .ph-seg + .ph-seg::before { content: ""; position: absolute; left: -2px; top: 12px; bottom: 12px; width: 1px; background: var(--ph-rule); }
.ph-wrap .ph-call { display: flex; min-width: 0; }
.ph-wrap .ph-call > summary { flex: 1; }
.ph-wrap .ph-seg-call { background: var(--ph-call); color: #fff; }
.ph-wrap .ph-seg-live { background: #e3efe6; color: #123c2b; }
.ph-wrap .ph-seg-off { background: #e7e5e4; color: var(--ph-muted); cursor: not-allowed; }
/* "No mobile number": says why in words, wraps rather than clip at 390 */
.ph-wrap .ph-seg-none { padding: 0 8px; white-space: normal; line-height: 1.1; text-align: left; }
.ph-wrap.ph-wrap .ph-seg-none { font-size: 13px; font-weight: 600; }
.ph-wrap :is(.ph-seg-call, .ph-seg-live, .ph-seg-off, .ph-call) + .ph-seg::before { display: none; }
.ph-wrap .ph-call-sheet { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; width: min(20rem, calc(100vw - 2rem)); padding: 16px; border-radius: 12px; background: #fff; color: var(--ph-night); text-align: left; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.ph-wrap .ph-call-reason { margin: 6px 0 0; font-size: 13px; color: var(--ph-on-night-2); }
.ph-wrap .ph-closed { margin: 14px 0 0; font-size: 15px; color: var(--ph-on-night-2); }

/* Polaroid list. Phone: a swipe row of 98px prints, Add photo first and
 * "All N" last, bled to the edges; it scrolls sideways without moving the
 * page. From 768 the same <li>s become a fan (media queries below). */
.ph-wrap .ph-pl-list { display: flex; gap: 10px; margin: 0 -16px; padding: 6px 16px 4px; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.ph-wrap .ph-pl-list::-webkit-scrollbar { display: none; }
.ph-wrap .ph-pp { position: relative; flex: none; width: 98px; scroll-snap-align: start; }
.ph-wrap .ph-pol { display: flex; flex-direction: column; width: 100%; height: 118px; padding: 5px 5px 0; background: #fff; color: #292524; border: 1px solid var(--ph-rule); box-shadow: 0 3px 8px rgba(0,0,0,.35); text-decoration: none; -webkit-touch-callout: none; user-select: none; }
.ph-wrap .ph-pp:nth-child(odd) .ph-pol { transform: rotate(-1.6deg); }
.ph-wrap .ph-pp:nth-child(even) .ph-pol { transform: rotate(1.4deg); }
.ph-wrap .ph-pol img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #e7e5e4; }
.ph-wrap .ph-pol-cap { display: block; padding: 5px 1px 0; font-size: 12px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-wrap .ph-pol-up { cursor: pointer; }
.ph-wrap .ph-pol-blank { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px dashed #a8a29e; background: #fafaf9; color: #8a4420; }
.ph-wrap .ph-pol-up .ph-pol-cap { font-weight: 700; color: var(--ph-night); }
.ph-wrap .ph-pol-up:focus-within { outline: 3px solid #fbbf24; outline-offset: 3px; }
.ph-wrap .ph-count { position: absolute; right: -4px; top: -6px; z-index: 6; display: grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--ph-night); color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.ph-wrap .ph-pp .ph-pol-all { align-items: flex-start; justify-content: flex-end; gap: 2px; padding: 10px; background: rgba(255,255,255,.08); color: var(--ph-on-night); border: 1.5px solid rgba(255,255,255,.3); box-shadow: none; transform: none; }
.ph-wrap .ph-all-n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.ph-wrap .ph-all-w { font-size: 13px; font-weight: 600; }
/* no photos yet: one wide "Add photo" tile, not a lonely card */
.ph-wrap .ph-pl-none .ph-pp { width: 100%; }
.ph-wrap .ph-pl-none .ph-pp .ph-pol-up { flex-direction: row; align-items: center; gap: 12px; height: 64px; padding: 6px 14px 6px 6px; transform: none; }
.ph-wrap .ph-pl-none .ph-pol-blank { width: 52px; height: 52px; }
.ph-wrap .ph-pl-none .ph-pol-cap { padding: 0; font-size: 15px; }
.ph-wrap .ph-cover-menu { position: absolute; z-index: 8; left: 0; top: 136px; width: 220px; padding: 6px; border-radius: 12px; background: #fff; color: var(--ph-night); box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.ph-wrap .ph-cover-menu[hidden] { display: none; }
.ph-wrap .ph-cm-cap { margin: 0; padding: 6px 10px 4px; font-size: 13px; color: var(--ph-muted); }
.ph-wrap .ph-cm-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ph-night); font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.ph-wrap .ph-cm-i:hover { background: #f5f5f4; }
.ph-wrap .ph-upload-note { position: absolute; left: 0; bottom: -18px; margin: 0; font-size: 12px; color: var(--ph-on-night-2); }
.ph-wrap .ph-upload-note:empty { display: none; }

/* compact bar: fixed under the app bar, overlays the page (nothing moves) */
.ph-wrap .ph-bar { position: fixed; left: 0; right: 0; top: 56px; z-index: 30; color: var(--ph-on-night); background: var(--ph-night); box-shadow: 0 2px 10px rgba(0,0,0,.25); transform: translateY(-120%); visibility: hidden; }
.ph-wrap .ph-bar[data-shown="true"] { transform: none; visibility: visible; }
@media (prefers-reduced-motion: no-preference) { .ph-wrap .ph-bar { transition: transform .18s cubic-bezier(.16,1,.3,1), visibility .18s; } }
.ph-wrap .ph-bar-in { display: flex; align-items: center; gap: 10px; height: 64px; max-width: 80rem; margin: 0 auto; padding: 0 12px; }
.ph-wrap .ph-bar-thumb { position: relative; flex: none; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: #3b2f27; }
.ph-wrap .ph-bar-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-wrap .ph-bar-text { flex: 1; min-width: 0; }
.ph-wrap .ph-bar-name { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-wrap .ph-badge-sm { display: inline-flex; min-height: 22px; margin: 2px 0 0; padding: 0 8px; gap: 5px; font-size: 12px; }
.ph-wrap .ph-badge-sm .ph-bdot { width: 6px; height: 6px; }
.ph-wrap .ph-pill-compact { flex: none; grid-auto-flow: column; grid-auto-columns: auto; }
.ph-wrap .ph-pill-compact .ph-seg { min-height: 44px; padding: 0 14px; font-size: 14px; }
body:has(.ph-bar[data-shown="true"]) [data-project-desk-tabs] { top: 120px; }

/* sheets: a bottom sheet on the phone; the status menu anchors under the
 * badge from 834px; Lost / Cancel / Check back / Property dock right. */
:is(.ph-wrap, .glance) .ph-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 88dvh; margin: 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); overflow: auto; border: 0; border-radius: 18px 18px 0 0; background: #fff; color: var(--ph-night); box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
:is(.ph-wrap, .glance) .ph-sheet::backdrop { background: rgba(28,25,23,.5); }
:is(.ph-wrap, .glance) .ph-sheet-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 6px; }
:is(.ph-wrap, .glance) .ph-sheet h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.03em; }
:is(.ph-wrap, .glance) .ph-sheet-now { order: 3; flex-basis: 100%; margin: 0; font-size: 14px; color: var(--ph-muted); }
:is(.ph-wrap, .glance) .ph-sheet-x { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; background: none; color: var(--ph-muted); cursor: pointer; }
.ph-wrap .ph-menu { display: flex; flex-direction: column; padding-top: 4px; }
.ph-wrap .ph-menu hr { margin: 6px 0; border: 0; border-top: 1px solid var(--ph-line); }
.ph-wrap .ph-mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ph-night); font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.ph-wrap .ph-mi:hover { background: #f5f5f4; }
.ph-wrap .ph-mi-note { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ph-muted); }
.ph-wrap .ph-mi-quiet { color: var(--ph-muted); font-weight: 500; }
.ph-wrap .ph-mi-danger { color: var(--ph-danger); }
:is(.ph-wrap, .glance) .ph-fact { margin: 4px 0 12px; padding: 10px 12px; border-radius: 10px; background: #fef3c7; font-size: 15px; color: #44403c; }
:is(.ph-wrap, .glance) .ph-reasons { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
:is(.ph-wrap, .glance) .ph-reasons legend { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
:is(.ph-wrap, .glance) .ph-rad { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--ph-rule); font-size: 15px; font-weight: 600; cursor: pointer; }
:is(.ph-wrap, .glance) .ph-rad input { width: 20px; height: 20px; accent-color: var(--ph-night); }
.ph-wrap .ph-rad:has(:checked) { box-shadow: inset 0 0 0 2px var(--ph-night); }
:is(.ph-wrap, .glance) .ph-note { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 700; }
:is(.ph-wrap, .glance) .ph-note input { min-height: 46px; padding: 0 12px; border: 1px solid #a8a29e; border-radius: 10px; font-size: 16px; font-weight: 400; }
.ph-wrap .ph-sheet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
:is(.ph-wrap, .glance) .ph-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border: 0; border-radius: 999px; font-size: 15px; font-weight: 700; cursor: pointer; }
:is(.ph-wrap, .glance) .ph-btn-dark { background: var(--ph-night); color: #fff; }
:is(.ph-wrap, .glance) .ph-btn-line { background: #fff; color: var(--ph-night); box-shadow: inset 0 0 0 1px #a8a29e; }
:is(.ph-wrap, .glance) .ph-btn-danger { background: var(--ph-danger); color: #fff; }

@media (min-width: 640px) {
  .ph-wrap { margin: -1rem -1.5rem 0; }
  .ph-wrap .ph-bar { top: 64px; }
  body:has(.ph-bar[data-shown="true"]) [data-project-desk-tabs] { top: 128px; }
  .ph-wrap .ph-pl-list { margin: 0 -24px; padding: 6px 24px 4px; scroll-padding: 0 24px; }
  .ph-wrap .ph-in { padding: 8px 24px 16px; }
}

/* 768+: two columns (55 / 45). Identity and pill sit at the bottom of the
 * hero; the fan sits beside them. The fan box is one card tall and its
 * height is fixed per size, so 0, 1 or 14 photos never move the identity
 * column (v3.1 fix, Dave iPad 834). --k 0 is the newest print. */
@media (min-width: 768px) {
  .ph-wrap { margin: 0; }
  .ph-wrap .ph-hero { min-height: 500px; border-radius: 16px; overflow: clip; }
  .ph-wrap .ph-scrim { background: linear-gradient(90deg, rgba(28,25,23,.96) 0, rgba(28,25,23,.94) 50%, rgba(28,25,23,.55) 66%, rgba(28,25,23,.22) 100%), linear-gradient(180deg, rgba(28,25,23,.5) 0, rgba(28,25,23,0) 90px); }
  .ph-wrap .ph-no-cover .ph-scrim { background: linear-gradient(90deg, rgba(28,25,23,.9) 0, rgba(28,25,23,.86) 52%, rgba(28,25,23,.2) 80%, rgba(28,25,23,0) 100%); }
  .ph-wrap .ph-in { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); grid-template-areas: "top top" "id photos" "pill photos"; grid-template-rows: auto 1fr auto; column-gap: 20px; min-height: 500px; padding: 14px 24px 26px; }
  .ph-wrap .ph-id { align-self: end; margin-top: 14px; }
  .ph-wrap .ph-pill-area { align-self: end; }
  .ph-wrap .ph-pill-wrap { margin-top: 18px; }
  /* the newest print sits against the column's right edge (12px in, room
     for its count badge), so the fan never spills out of the 45% column */
  .ph-wrap .ph-photos { --pw: 190px; --top: 12px; --fh: 250px; --x0: calc(100% - var(--pw) - 12px); --dx: 14px; --r0: 4deg; --dr: 5deg; align-self: end; margin: 0; }
  .ph-wrap .ph-hero .ph-name { font-size: 36px; }
  .ph-wrap .ph-dir { margin-left: 8px; }
  .ph-wrap .ph-pill { max-width: 440px; }
  .ph-wrap .ph-pill-compact { max-width: none; }

  .ph-wrap .ph-pl-list { display: block; position: relative; height: var(--fh); margin: 0; padding: 0; overflow: visible; scroll-snap-type: none; }
  .ph-wrap .ph-pp { position: absolute; top: var(--top); width: var(--pw); transform-origin: 50% 90%; }
  .ph-wrap .ph-pp:nth-child(odd) .ph-pol, .ph-wrap .ph-pp:nth-child(even) .ph-pol { transform: none; }
  .ph-wrap .ph-pp .ph-pol { height: auto; padding: 8px 8px 0; box-shadow: 0 6px 16px rgba(0,0,0,.42); }
  .ph-wrap .ph-pp .ph-pol-cap { padding: 8px 2px 9px; font-size: 13px; }
  .ph-wrap .ph-pp-p { left: calc(var(--x0) - var(--k) * var(--dx)); z-index: calc(6 - var(--k) * 2); transform: rotate(calc(var(--r0) - var(--k) * var(--dr))); }
  .ph-wrap .ph-pp-p:nth-child(n+5), .ph-wrap .ph-pp-all { display: none; }
  .ph-wrap .ph-pp-p:not([style*="--k:0"]) .ph-pol-cap { visibility: hidden; }
  /* "Add photo": the same card size on the prints' top line, left of the
     fan, above the older prints and under the newest. */
  .ph-wrap .ph-pp-add { left: 0; z-index: 5; transform: rotate(-4deg); }
  .ph-wrap .ph-pl-none .ph-pp { width: var(--pw); }
  .ph-wrap .ph-pl-none .ph-pp-add { left: calc(50% - var(--pw) / 2); transform: rotate(-2deg); }
  .ph-wrap .ph-pl-none .ph-pp .ph-pol-up { flex-direction: column; align-items: stretch; gap: 0; height: auto; padding: 8px 8px 0; }
  .ph-wrap .ph-pl-none .ph-pol-blank { width: auto; height: auto; }
  .ph-wrap .ph-pl-none .ph-pol-cap { padding: 8px 2px 9px; font-size: 15px; }
  .ph-wrap .ph-count { right: -6px; top: -8px; height: 28px; min-width: 34px; font-size: 14px; }
  .ph-wrap .ph-cover-menu { top: auto; bottom: 100%; left: auto; right: 0; }
  @media (prefers-reduced-motion: no-preference) {
    .ph-wrap .ph-pp-p, .ph-wrap .ph-pp-add { transition: transform .22s cubic-bezier(.16,1,.3,1); }
    .ph-wrap .ph-pl-list:hover .ph-pp-p, .ph-wrap .ph-pl-list:focus-within .ph-pp-p { transform: rotate(calc(var(--r0) - var(--k) * var(--dr) * 1.35)) translateX(calc(var(--k) * -6px)); }
  }

  :is(.ph-wrap, .glance) .ph-sheet-side { inset: 0 0 0 auto; width: 420px; height: 100dvh; max-height: none; padding: 16px 22px; border-radius: 18px 0 0 18px; }
}
@media (min-width: 834px) {
  .ph-wrap .ph-sheet-menu { inset: var(--menu-top, 300px) auto auto var(--menu-left, 24px); width: 340px; max-height: calc(100dvh - var(--menu-top, 300px) - 16px); padding: 8px 8px 10px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
  .ph-wrap .ph-sheet-menu::backdrop { background: rgba(28,25,23,.15); }
}
/* iPad landscape 1024-1279: wide hero, identity left, fan in a 520px column */
@media (min-width: 1024px) {
  .ph-wrap .ph-hero { min-height: 430px; }
  .ph-wrap .ph-in { grid-template-columns: minmax(0, 1fr) 520px; column-gap: 32px; min-height: 430px; padding: 16px 32px 30px; }
  .ph-wrap .ph-scrim { background: linear-gradient(90deg, rgba(28,25,23,.97) 0, rgba(28,25,23,.94) 42%, rgba(28,25,23,.5) 58%, rgba(28,25,23,.16) 80%, rgba(28,25,23,.08) 100%), linear-gradient(180deg, rgba(28,25,23,.45) 0, rgba(28,25,23,0) 90px); }
  .ph-wrap .ph-no-cover .ph-scrim { background: linear-gradient(90deg, rgba(28,25,23,.86) 0, rgba(28,25,23,.8) 45%, rgba(28,25,23,.12) 75%, rgba(28,25,23,0) 100%); }
  .ph-wrap .ph-photos { --pw: 210px; --fh: 270px; --x0: 310px; --dx: 40px; }
  .ph-wrap .ph-hero .ph-name { font-size: 40px; }
  .ph-wrap .ph-bar-in { padding: 0 32px; }
  .ph-wrap .ph-bar-text { display: flex; align-items: center; gap: 12px; }
  .ph-wrap .ph-badge-sm { margin: 0; }
  body:has(.ph-bar[data-shown="true"]) [data-project-desk-tabs] { top: auto; }
}
/* desktop 1280+: bigger fan in a 580px column; "Add photo" a smaller print
   in front at the lower left (unchanged by the iPad fix). */
@media (min-width: 1280px) {
  .ph-wrap .ph-hero { min-height: 450px; }
  .ph-wrap .ph-in { grid-template-columns: minmax(0, 1fr) 580px; min-height: 450px; padding: 18px 40px 32px; }
  .ph-wrap .ph-photos { --pw: 232px; --fh: 316px; --x0: 330px; --dx: 82px; --r0: 5deg; --dr: 7deg; align-self: center; }
  .ph-wrap .ph-pp-p { top: calc(8px + var(--k) * 6px); }
  .ph-wrap .ph-pp-add { width: 172px; top: 96px; z-index: 7; transform: rotate(-6deg); }
  .ph-wrap .ph-pl-none .ph-pp-add { width: var(--pw); top: var(--top); }
  .ph-wrap .ph-hero .ph-name { font-size: 42px; }
}

/* ---------------------------------------------------------------------
   At a glance (top of Overview): Next (dark, the lead card), Estimate,
   Property. Cards stack on a phone; one row from 768 (_glance grid).
   --------------------------------------------------------------------- */
.glance .g { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--ph-line); border-radius: 10px; background: #fff; color: var(--ph-night); }
.glance [data-applet="next_action"] > turbo-frame, .glance [data-applet="next_action"] .g { height: 100%; }
.glance .g-head { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.glance.glance.glance .g-k { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--ph-muted); }
.glance .g-n { margin-left: auto; font-size: 13px; color: var(--ph-on-night-2); font-variant-numeric: tabular-nums; }
.glance .g-go { margin-left: auto; color: var(--ph-muted); }
.glance .g-next { border: 0; background: var(--ph-night); color: #fff; }
.glance.glance.glance .g-next .g-k { color: #fdba74; }
.glance .g-title { margin: 0; font-size: 21px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; color: inherit; text-wrap: balance; }
.glance .g-sub { margin: 2px 0 0; font-size: 14px; color: var(--ph-on-night-2); }
.glance .g-next-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.glance .g-next-act { display: flex; flex-direction: column; gap: 6px; }
/* the task or lead action folds into the card as its button(s) */
.glance .g-next-act [data-next-action-key] :is(a, button, input[type=submit]):not(.bg-red-700) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: var(--ph-night); font-size: 15px; font-weight: 700; text-decoration: none; }
.glance .g-next-task { border-radius: 10px; background: #fff; color: var(--ph-night); overflow: hidden; }
.glance .g-link { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.glance .g-link::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.glance .g-link:focus-visible { outline: none; }
.glance .g-link:focus-visible::after { outline: 3px solid #b45309; outline-offset: 2px; }
.glance :is(.g-money, .g-prop):hover { border-color: #a8a29e; }
.glance .gchip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.glance .gchip-draft, .glance .gchip-sent { background: #fef3c7; color: #78350f; }
.glance .gchip-won { background: #dfe8dc; color: #24391f; }
.glance .g-big { font-size: 27px; font-weight: 700; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: lining-nums proportional-nums; }
.glance .g-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: #92400e; }
.glance .g-cells { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 4px 12px; width: 100%; margin: 4px 0 0; }
.glance .g-cell { display: flex; flex-direction: column; }
.glance .g-dt { font-size: 12px; font-weight: 600; color: var(--ph-muted); }
.glance .g-dd { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.glance .g-cell-left .g-dd { color: #8a4420; }
.glance .g-none { margin: 2px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.glance .g-btn-line { position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--ph-night); font-size: 15px; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px #a8a29e; }
.glance .g-prop-line { display: inline-flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.glance .g-prop-owner_match svg { color: #3f5a3b; }
.glance :is(.g-prop-possible_family, .g-prop-not_owner, .g-prop-company) svg { color: #92400e; }
.glance .g-place { font-size: 14px; color: var(--ph-muted); }
@media (min-width: 768px) {
  .glance .g-next .g-next-act { margin-top: auto; }
  .glance .g-cells { grid-template-columns: 1fr; gap: 2px; }
  .glance .g-cell { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; }
}
@media (min-width: 1024px) {
  .glance .g-next-body { flex: none; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }
  .glance .g-next-act { flex: none; align-items: flex-end; }
}
@media (min-width: 1280px) {
  .glance .g { padding: 14px 18px 16px; }
  .glance .g-title { font-size: 22px; }
}

/* .artisan-workspace :is(button,input[type=submit]) sets 12px bold at (0,2,1);
 * the header's own controls keep their sizes. */
.ph-wrap.ph-wrap .ph-split-btn { font-size: 14px; font-weight: 600; }
.ph-wrap.ph-wrap .ph-edit { font-size: 13px; font-weight: 600; }
.ph-wrap.ph-wrap .ph-seg { font-size: 15px; font-weight: 700; }
.ph-wrap.ph-wrap .ph-pill-compact .ph-seg { font-size: 14px; }
.ph-wrap.ph-wrap .ph-cm-i { font-size: 15px; font-weight: 600; }
.ph-wrap.ph-wrap .ph-mi { font-size: 16px; font-weight: 600; }
.ph-wrap.ph-wrap .ph-mi-quiet { font-weight: 500; }
:is(.ph-wrap, .glance):is(.ph-wrap, .glance) .ph-btn { font-size: 15px; font-weight: 700; }
.glance.glance .g-link, .glance.glance .g-next-act [data-next-action-key] :is(a, button, input[type=submit]):not(.bg-red-700) { font-size: 15px; font-weight: 700; }
.glance.glance .g-link { font-weight: inherit; }
.ph-wrap:is(.ph-wrap, .glance) .ph-rad { font-size: 15px; font-weight: 600; }
.ph-wrap:is(.ph-wrap, .glance) .ph-note label { font-size: 14px; font-weight: 700; }
