/* OwnersFirm public demo (ownersfirm.com/crm-demo). Loads after keys/styles.css.
   Only what the public demo adds: the OwnersFirm tag and its Book a call button, the drawn
   street map, the finished inspections, the Copilot's moved-card mark and the report sheet.
   The OwnersFirm pieces use the site's own ink, paper and brass (assets/css/site.css). */
:root {
  --of-ink: #0B0906; --of-paper: #F5F1EA; --of-brass: #B68B40; --of-brass-hi: #D4AF6A;
  --of-dim: rgba(245,241,234,.74); --of-hair: rgba(245,241,234,.16);
  --of-serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
}

/* ---------- whose demo this is, and the next step ---------- */
.of-tag { font-family: Inter, system-ui, -apple-system, sans-serif; color: var(--of-dim); }
.of-tag p { margin: 0; font-size: 12px; line-height: 1.45; }
.of-tag b { font-family: var(--of-serif); font-weight: 600; font-size: 16.5px; letter-spacing: -.01em; color: var(--of-paper); }
.of-tag b i { font-style: normal; color: var(--of-brass-hi); }
.of-book { display: inline-flex; align-items: center; justify-content: center; position: relative; min-height: 40px; padding: 0 18px; border-radius: 999px;
  background: linear-gradient(180deg, var(--of-brass-hi), var(--of-brass)); color: #171108; font: 600 13.5px/1 Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(182,139,64,.26); transition: transform .2s ease, box-shadow .2s ease; }
.of-book:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(212,175,106,.4); }
.of-book:focus-visible { outline: 2px solid var(--of-paper); outline-offset: 3px; }
.of-book::after { content: ''; position: absolute; inset: -4px 0; } /* a full 44px to tap */

/* in the sidebar, where Sign out used to sit */
.of-tag-side { margin: 8px 0 0; padding: 10px 12px 11px; border: 1px solid var(--of-hair); border-radius: 12px; background: var(--of-ink); }
.of-tag-side p span { display: block; margin-top: 1px; }
.of-tag-side .of-book { width: 100%; margin-top: 9px; min-height: 38px; }
.of-tag-side .of-book::after { inset: -3px 0; }
/* short windows (a small laptop, or the demo inside the homepage dialog): give the menu the room */
@media (min-width: 821px) and (max-height: 700px) {
  .sidebar { padding-top: 14px; padding-bottom: 12px; }
  .sidebar .brand { padding-bottom: 12px; }
  .sidebar .nav a { padding-top: 8px; padding-bottom: 8px; }
  .side-foot { padding-top: 8px; }
}

/* on a phone the sidebar is a drawer, so the tag rides above the app's own bar */
.of-tag-top { display: none; }
@media (max-width: 820px) {
  .of-tag-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto;
    padding: calc(7px + env(safe-area-inset-top)) 12px 7px 14px; background: var(--of-ink); border-bottom: 1px solid var(--of-hair); }
  .of-tag-top p { font-size: 11.5px; line-height: 1.3; min-width: 0; }
  .of-tag-top p b { font-size: 15.5px; }
  .of-tag-top p span { display: block; }
  .of-tag-top .of-book { min-height: 36px; padding: 0 15px; font-size: 13px; box-shadow: none; }
  .mobile-topbar { padding-top: 10px; } /* the tag above already clears the notch */
}
@media (min-width: 520px) and (max-width: 820px) { .of-tag-top p span { display: inline; } }
@media (max-width: 820px) {
  .of-framed .of-tag-top { padding: 5px 10px 5px 14px; }
  .of-framed .of-tag-top p { font-size: 11px; line-height: 1.25; }
  .of-framed .of-tag-top p b { font-size: 14.5px; }
  .of-framed .of-tag-top .of-book { min-height: 32px; padding: 0 14px; font-size: 12.5px; }
  .of-framed .of-tag-top .of-book::after { inset: -6px 0; }
}
@media (prefers-reduced-motion: reduce) { .of-book { transition: none; } .of-book:hover { transform: none; } }

/* ---------- the stat tiles: the counts, then the money ----------
   app.js draws them as two groups. Each group stays whole and fills its row, so a narrower window
   gets the four counts over the three money tiles, never one tile alone on a second row. */
.stat .l-s { display: none; }
@media (min-width: 821px) {
  #stats { gap: 10px; }
  #stats .stat-g { display: flex; flex: 1 1 auto; gap: 10px; }
  #stats .stat { flex: 1 1 auto; padding-left: 16px; padding-right: 16px; }
}
/* phone: the three money tiles side by side, with short labels, in place of the sideways strip
   that kept them off screen. The counts are on the stage chips right under them. */
@media (max-width: 820px) {
  #stats { display: block; overflow: visible; padding-bottom: 0; margin-bottom: 12px; }
  #stats .stat-g.counts { display: none; }
  #stats .stat-g.money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #stats .stat { min-width: 0; padding: 10px 10px 9px; }
  #stats .stat .n { font-size: clamp(15px, 5vw, 22px); line-height: 1.25; white-space: nowrap; }
  #stats .stat .l { font-size: 9.5px; letter-spacing: .08em; }
  #stats .stat .l-w, #stats .stat-i { display: none; }
  #stats .stat .l-s { display: inline; }
}

/* 320px phones: the two dropdowns on a job card share the row instead of pushing past its edge */
@media (max-width: 820px) { .card select { min-width: 0; } }

/* ownersfirm.com switches the camera off for every page, so the warehouse label scanner could only fail here */
#invScan { display: none; }

/* keyboard focus the copied app never drew */
.nav a:focus-visible, .bnav:focus-visible, .btn:focus-visible, .cop-chip:focus-visible, .card:focus-visible, .schip:focus-visible, .pill:focus-visible,
.cv-log-btn:focus-visible, .cv-del-pin:focus-visible, .ib-alt:focus-visible, .cc-go:focus-visible, .cc-no:focus-visible, .cop-x:focus-visible, .mt-btn:focus-visible {
  outline: 2px solid var(--slate); outline-offset: 2px; }
.sidebar .nav a:focus-visible { outline-color: var(--brass); }

/* ---------- closed panels stay out of sight and out of the Tab order ----------
   (the shared stylesheet parks them just off screen, where their shadow still shows as a
   dark band down the right edge and their buttons still take keyboard focus) */
.drawer:not(.open), .cop-panel:not(.open) { box-shadow: none; visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
@media (max-width: 820px) { .sidebar:not(.open) { visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; } }

/* ---------- the door-knock map, drawn in the page ---------- */
/* phone: the address box takes the whole first row, so Go never slides under the counts */
@media (max-width: 820px) {
  .cv-search { flex: 1 1 100%; min-width: 0; }
  .cv-search input { min-width: 0; }
  .cv-stats { flex: 1 1 auto; }
}
#cvMap.sm { position: relative; overflow: hidden; background: #F2EEE5; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#cvMap.sm.sm-drag { cursor: grabbing; }
#cvMap.sm:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
.sm-world { position: absolute; left: 0; top: 0; width: 2000px; height: 1300px; transform-origin: 0 0; --inv: 1; }
.sm-world svg { display: block; }
.sm-land { fill: #F2EEE5; }
.sm-wood { fill: #D5E1C8; stroke: #D5E1C8; stroke-width: 26; stroke-linejoin: round; }
.sm-park { fill: #DDE8D0; stroke: #DDE8D0; stroke-width: 22; stroke-linejoin: round; }
.sm-tree { fill: #C2D5B1; }
.sm-water { fill: #C8DCE8; }
.sm-creek { fill: none; stroke: #C8DCE8; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.sm-case { fill: none; stroke: #D8D0BF; stroke-linecap: round; stroke-linejoin: round; }
.sm-road { fill: none; stroke: #FFFFFF; stroke-linecap: round; stroke-linejoin: round; }
.sm-case.art { stroke: #E0CA8C; }
.sm-road.art { stroke: #F8E8B8; }
.sm-bulb-case { fill: #D8D0BF; }
.sm-bulb { fill: #FFFFFF; }
.sm-h path { fill: #E3DACA; stroke: #CEC4B0; stroke-width: 1; transition: fill .15s ease; }
.sm-h path.on { fill: var(--brass); stroke: var(--navy); stroke-width: 1.4; }
.sm-lbl { font: 600 9px Inter, system-ui, sans-serif; fill: #8A8375; letter-spacing: .04em; text-anchor: middle; pointer-events: none; }
.sm-lbl.art { font-size: 11px; fill: #94793A; }
.sm-area { font: italic 500 13px 'Playfair Display', Georgia, serif; fill: #6F8A5C; text-anchor: middle; pointer-events: none; }
.sm-pins { position: absolute; inset: 0; pointer-events: none; }
.sm-pin { position: absolute; left: 0; top: 0; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 2.5px solid #fff; cursor: pointer; pointer-events: auto;
  box-shadow: 0 1px 5px rgba(13,13,26,.5); transform-origin: 0 0; transform: translate(var(--x), var(--y)) scale(var(--inv)) translate(-50%, -50%); }
.sm-pin::after { content: ''; position: absolute; inset: -13px; border-radius: 50%; }
.sm-pin:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.sm-me { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #2b6cff; border: 3px solid #fff; box-shadow: 0 1px 6px rgba(13,13,26,.45); transform-origin: 0 0; pointer-events: none; z-index: 2; }
.sm-me i { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #2b6cff; opacity: 0; }
.sm-me.knock i { animation: smKnock 1.4s ease-out 1; }
@keyframes smKnock { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(3.2); opacity: 0; } }
.sm-pop { position: absolute; left: 0; top: 0; z-index: 5; width: max-content; max-width: min(290px, 76vw); background: #fff; border-radius: 12px; padding: 13px 14px 12px; cursor: default;
  box-shadow: 0 12px 36px rgba(13,13,26,.3); transform-origin: 0 0; transform: translate(var(--x), var(--y)) scale(var(--inv)) translate(-50%, calc(-100% - 12px)); -webkit-user-select: text; user-select: text; }
.sm-pop::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); box-shadow: 4px 4px 8px rgba(13,13,26,.08); }
.sm-pop-x { position: absolute; top: 2px; right: 2px; width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; border-radius: 8px; z-index: 1; }
.sm-pop-x:hover { color: var(--ink); }
.sm-pop-x:focus-visible { outline: 2px solid var(--slate); }
.sm-pop .cv-pop-addr { padding-right: 26px; }
.sm-pop .cv-log-btn { padding: 8px 10px; }
.cv-pop-note { font-size: 13px; color: var(--ink); margin: 2px 0 6px; line-height: 1.45; }
.sm-ctl { position: absolute; left: 12px; top: 12px; z-index: 6; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(13,13,26,.22); }
.sm-ctl button { width: 40px; height: 40px; border: 0; background: #fff; color: var(--navy); font-size: 22px; line-height: 1; font-weight: 500; }
.sm-ctl button + button { border-top: 1px solid var(--line); }
.sm-ctl button:hover { background: var(--cream); }
.sm-ctl button:focus-visible { outline: 2px solid var(--slate); outline-offset: -2px; }
.sm-note { position: absolute; left: 10px; bottom: 8px; z-index: 4; font-size: 11px; color: #6E6858; background: rgba(251,250,247,.86); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.cv-locate { z-index: 6; }
@media (max-width: 820px) { #cvMap.sm { height: 58vh; min-height: 340px; } .sm-note { max-width: calc(100% - 84px); } }
@media (prefers-reduced-motion: reduce) { .sm-me.knock i { animation: none; } .sm-h path { transition: none; } }

/* ---------- glasses inbox: finished inspections ---------- */
.ib-vid.ib-still { position: relative; }
.ib-vid.ib-still img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ib-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(13,13,26,.78); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; }
#inspWrap { scroll-margin-top: 84px; }

/* ---------- Copilot moved a job: mark the card and the money tile ---------- */
.card.of-moved { outline: 2px solid var(--brass); outline-offset: 2px; animation: ofMoved 1.6s ease-out 2; }
@keyframes ofMoved { 0% { box-shadow: 0 0 0 0 rgba(201,166,69,.55); } 70% { box-shadow: 0 0 0 14px rgba(201,166,69,0); } 100% { box-shadow: 0 0 0 0 rgba(201,166,69,0); } }
.stat.of-bump { animation: ofBump 1.3s ease-out 2; }
@keyframes ofBump { 0% { transform: scale(1); } 22% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .card.of-moved, .stat.of-bump { animation: none; } }

/* ---------- the adjuster report, as a sheet ---------- */
.rpt-bg { z-index: 95; padding: 18px; overflow: auto; place-items: start center; }
.rpt { width: min(760px, 100%); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(13,13,26,.4); }
.rpt-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 1; }
.rpt-bar .rpt-grow { flex: 1; }
.rpt-bar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.rpt-page { padding: 30px 34px 26px; color: var(--ink); font-size: 13.5px; line-height: 1.55; }
.rpt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--navy); }
.rpt-co { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 22px; color: var(--navy); }
.rpt-kind { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rpt-mark { width: 44px; height: 44px; border: 2px solid var(--brass); border-radius: 10px; display: grid; place-items: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 20px; color: var(--navy); flex: 0 0 auto; }
.rpt-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 16px 0 6px; }
.rpt-meta span { display: block; font-size: 11.5px; color: var(--muted); }
.rpt-meta b { font-weight: 600; }
.rpt-page h3 { font-size: 16px; color: var(--navy); margin: 20px 0 8px; }
.rpt-page p { margin: 0 0 8px; }
.rpt-page ul { margin: 0; padding-left: 18px; }
.rpt-find { display: flex; flex-direction: column; gap: 8px; }
.rpt-f { display: flex; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }
.rpt-f i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 6px; }
.rpt-f p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.rpt-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rpt-shots figure { margin: 0; }
.rpt-shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--cream); }
.rpt-shots figcaption { font-size: 12px; color: var(--muted); margin-top: 5px; }
.rpt-est { width: 100%; border-collapse: collapse; font-size: 13px; }
.rpt-est td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.rpt-est td:nth-child(2) { color: var(--muted); white-space: nowrap; padding: 7px 14px; }
.rpt-est td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.rpt-est tfoot td { border-bottom: 0; font-weight: 700; color: var(--navy); padding-top: 10px; }
.rpt-fine { font-size: 11.5px; color: var(--muted); margin-top: 12px; }
@media (max-width: 820px) {
  .rpt-bg { padding: 0; }
  .rpt { border-radius: 0; min-height: 100dvh; }
  .rpt-bar { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
  .rpt-bar > b { display: none; } /* the sheet below carries the heading; the bar keeps both buttons on one line */
  .rpt-bar .rpt-grow { order: 1; }
  .rpt-bar #rptClose { order: 2; }
  .rpt-page { padding: 22px 18px 28px; }
  .rpt-meta { grid-template-columns: 1fr; }
}
@media print {
  body > *:not(.rpt-bg) { display: none !important; }
  html, body { height: auto; background: #fff; }
  .rpt-bg { position: static; display: block !important; padding: 0; background: #fff; }
  .rpt { box-shadow: none; width: 100%; border-radius: 0; }
  .rpt-bar { display: none; }
}

/* the Copy button sits under an answer, not at the end of its last line */
.cop-msg .cop-copy { display: block; }

/* the Copilot's "see it" button under a finished order */
.cop-see { display: flex; width: max-content; max-width: 100%; align-items: center; min-height: 40px; margin-top: 10px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--navy); color: #fff; font: 600 13px Inter, system-ui, sans-serif; }
.cop-see:hover { background: var(--navy-3); }
.cop-see:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; }
