@import url('design-system.css');

/* Shared application foundation. Page layouts live in onboard.css, desk.css and admin.css. */
.product-app {
  --ui-canvas:var(--mc-canvas,#f5f6f8); --ui-surface:var(--mc-surface,#fff); --ui-navy:var(--mc-navy,#11283f);
  --ui-ink:var(--mc-ink,#17263d); --ui-muted:var(--mc-muted,#526176); --ui-blue:var(--mc-blue,#2359df);
  --ui-blue-soft:#edf2ff; --ui-line:var(--mc-line,#dce2e9); --ui-radius:var(--mc-panel-radius,12px);
  --ui-shadow:none;
  --ui-font:var(--font-sans,Inter),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  margin:0; background:var(--ui-canvas); color:var(--ui-ink);
  font-family:var(--ui-font); font-size:14px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
.product-app *, .product-app *::before, .product-app *::after { box-sizing:border-box; }
body.product-app { background:var(--ui-canvas); color:var(--ui-ink); }
body.product-app::before { display:none; }
.product-app h1,.product-app h2,.product-app h3,.product-app h4 { font-family:var(--ui-font); letter-spacing:-.025em; color:var(--ui-ink); }
.product-app button,.product-app input,.product-app textarea,.product-app select { font-family:inherit; }
.product-app [hidden] { display:none!important; }
.product-app :focus-visible { outline:3px solid var(--mc-focus,#4776e4); outline-offset:3px; }
.product-app input:focus-visible,.product-app textarea:focus-visible,.product-app select:focus-visible { outline-offset:1px; }
/* A checked box is filled with the action blue: leave a 2px gap so the ring sits on the surface, not on the fill. */
.product-app input:is([type=checkbox],[type=radio]):focus-visible { outline-offset:2px; }
/* Navy workspace navigation: a light ring drawn inside the item over a navy band, so it reads at 6.7:1 on the navy rail,
   the active white item and the active tint alike, and never paints over the neighbouring item. */
.product-app .tabs button:focus-visible { outline:3px solid #8aabff; outline-offset:-3px; box-shadow:inset 0 0 0 5px var(--ui-navy,#11283f); }
.product-app .ui-icon { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.product-app .ui-eyebrow { color:var(--ui-muted); font-size:11px; font-weight:650; letter-spacing:.11em; text-transform:uppercase; }
.product-app .ui-brand img { display:block; width:174px; max-width:100%; height:auto; object-fit:contain; }
.product-app .ui-skip { position:fixed; top:12px; left:12px; z-index:1000; transform:translateY(-200%); padding:10px 16px; background:#fff; color:var(--ui-ink); border:1px solid var(--ui-line); border-radius:8px; }
.product-app .ui-skip:focus { transform:none; box-shadow:0 0 0 9px #fff; }
/* LUPE-17: shown only for keyboard focus; focus that arrives after a tap or a script never covers the page */
.product-app .ui-skip:focus:not(:focus-visible) { transform:translateY(-200%); box-shadow:none; } /* white field under the ring where the link overlaps page content */
@media(prefers-reduced-motion:reduce) { .product-app *, .product-app *::before, .product-app *::after { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }
/* Plain links on product surfaces use the action blue (5.9:1 on white) instead of the public #3b82f6 (3.7:1).
   Zero added specificity and placed before component rules, so any class or component link colour still wins. */
:where(.product-app) a:where(:not([class])) { color:var(--ui-blue,#2359df); }
:where(.product-app) a:where(:not([class])):hover { color:#1746bd; }

/* Customer connection guidance shares the workspace's existing cards and typography. */
.connection-guide { margin:20px 0 26px; }
.connection-guide-heading { max-width:680px; margin-bottom:20px; }
.connection-guide-eyebrow { margin:0 0 7px; color:#315fc7; font-size:10px; font-weight:700; letter-spacing:.13em; }
.connection-guide-heading h3 { margin:0 0 10px; color:#1d3557; font-size:24px; line-height:1.2; letter-spacing:-.025em; }
.connection-guide-heading>p:last-child { margin:0; color:#607593; font-size:13px; line-height:1.75; }
.connection-guide-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.connection-guide-card { display:flex; flex-direction:column; min-width:0; padding:20px; border:1px solid #dce6f4; border-radius:16px; background:#fff; scroll-margin-top:24px; }
.connection-guide-card>header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.connection-guide-card h4 { margin:0; color:#233c60; font-size:16px; line-height:1.3; }
.connection-guide-badge { flex:none; padding:4px 7px; border-radius:6px; background:#f0f4fc; color:#54719b; font-size:9px; line-height:1.5; }
.connection-guide-card[data-responsibility="customer"] .connection-guide-badge { color:#2856b8; background:#ebf2ff; }
.connection-guide-card[data-responsibility="complete"] .connection-guide-badge { color:#346d59; background:#edf7f1; }
.connection-guide-card .connection-guide-detail { color:#516b8c; font-size:12px; line-height:1.7; margin:12px 0 17px; }
.connection-guide-card dl { display:grid; gap:12px; margin:0 0 20px; }
.connection-guide-card dl>div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:10px; }
.connection-guide-card dt { font-size:10px; font-weight:650; line-height:1.6; color:#6b80a0; }
.connection-guide-card dd { margin:0; color:#3d587d; font-size:12px; line-height:1.65; }
.connection-guide-next { margin-top:auto; padding-top:14px; border-top:1px solid #e6edf6; }
.connection-guide-next>strong { font-size:10px; color:#536f97; text-transform:uppercase; letter-spacing:.07em; }
.connection-guide-next>p { margin:7px 0 12px; color:#284569; font-size:12px; line-height:1.65; }
.connection-guide-next .btn-pill { min-height:44px; font-size:11px; padding:10px 14px; white-space:normal; }
.connection-guide-wait { display:block; padding:9px 11px; border-radius:9px; background:#f5f7fb; color:#607695; font-size:11px; line-height:1.6; }
.connection-guide-link { background:none; border:0; padding:8px 0; min-height:44px; color:#3159b7; font:inherit; font-size:11px; text-decoration:underline; text-align:left; cursor:pointer; }
.connection-guide-management { margin:18px 0; color:#526c8e; font-size:13px; }
.connection-guide-management>summary { min-height:44px; cursor:pointer; padding:10px 0; }
.connection-guide-management .connection-plan { margin-top:8px; }
.connection-guide-instructions { padding-left:20px; font-size:13px; color:#405c80; line-height:1.8; }
.connection-guide-instructions li { margin-bottom:10px; }
.connection-guide-links { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:12px; }
.connection-guide-links a { padding:8px 0; min-height:44px; color:#3159b7; font-size:12px; }
@media(max-width:900px) { .connection-guide-grid { grid-template-columns:1fr; } }
@media(max-width:480px) { .connection-guide-card { padding:17px; } .connection-guide-heading h3 { font-size:21px; } .connection-guide-card>header { flex-wrap:wrap; } .connection-guide-card dl>div { grid-template-columns:1fr; gap:4px; } }

.connection-guide-refresh { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0 0; }
.connection-guide-refresh p { color:#6b809e; font-size:11px; line-height:1.6; margin:0; max-width:440px; }
.connection-guide-refresh .btn-pill { flex:none; min-height:44px; font-size:11px; }
@media(max-width:480px) { .connection-guide-refresh { flex-direction:column; align-items:flex-start; gap:10px; } }

/* Four services stay scannable; the full automation/permission/proof explanation is optional. */
.connection-guide-shared { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:0 0 16px; padding:15px 17px; border:1px solid #d4e2fb; border-radius:12px; background:#f4f8ff; }
.connection-guide-shared strong { color:#315a9a; font-size:11px; }
.connection-guide-shared p { margin:5px 0 0; color:#4d688e; font-size:12px; line-height:1.6; }
.connection-guide-shared .btn-pill { flex:none; min-height:44px; font-size:11px; }
.connection-guide-card { padding:17px; }
.connection-guide-card .connection-guide-detail { margin:10px 0 12px; }
.connection-guide-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; margin-top:auto; }
.connection-guide-actions .btn-pill { min-height:44px; padding:9px 12px; font-size:11px; white-space:normal; }
.connection-guide-actions .connection-guide-wait { flex:1 1 130px; padding:7px 9px; font-size:10px; }
.connection-guide-shared-note { color:#6a80a1; font-size:10px; line-height:1.5; }
.connection-guide-disclosure { display:inline-flex; align-items:center; gap:7px; border:0; background:none; color:#3e6297; padding:7px 0; min-height:44px; font:inherit; font-size:10px; cursor:pointer; text-align:left; }
.connection-guide-disclosure span { color:#6d8bb8; font-size:16px; }
.connection-guide-flow { margin-top:14px; padding-top:14px; border-top:1px solid #e6edf6; }
.connection-guide-flow>p { color:#647a98; font-size:11px; line-height:1.65; margin:0 0 14px; }
.connection-guide-flow dl { margin-bottom:0; }
@media(max-width:480px) { .connection-guide-shared { flex-direction:column; align-items:flex-start; gap:10px; } .connection-guide-card { padding:15px; } .connection-guide-card dl>div { grid-template-columns:1fr; gap:3px; } .connection-guide-actions { align-items:center; } }

/* Shared readable browser states across setup, customer work and operations. */
.product-app ::selection{background:#cbdcff;color:#142b52}
.product-app input,.product-app textarea{caret-color:var(--ui-blue)}
.product-app a{text-underline-offset:.18em}
.product-app .timestamp,.product-app time,.product-app .stat-grid{font-variant-numeric:tabular-nums}

/* Provider originals keep their colors and proportions beside readable names. */
.product-app .brand-lockup { display:inline-flex; align-items:center; gap:10px; min-width:0; vertical-align:middle; }
.product-app .brand-lockup>span:last-child { min-width:0; }
.product-app img.brand-mark { display:block; flex:none; width:24px; height:24px; max-width:none; object-fit:contain; border:0; border-radius:0; padding:0; background:transparent; }
.product-app img.brand-mark--wide { width:64px; height:24px; }
.product-app img.brand-mark[src$="angi.svg"] { width:40px; }
.product-app img.brand-mark[src$="porch.png"] { width:88px; }
.product-app .brand-lockup:has(img.brand-mark[data-brand-loaded="true"])>.brand-wordmark-label { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.product-app .brand-mark-pair { display:inline-flex; align-items:center; gap:7px; flex:none; }
.product-app .brand-mark-pair img.brand-mark { width:22px; height:22px; }
.product-app .btn-pill>img.brand-mark { width:20px; height:20px; margin:0; }
.product-app .btn-pill>img.brand-mark--wide { width:52px; height:20px; }
.product-app .btn-pill>img.brand-mark[src$="angi.svg"] { width:33px; }
.product-app .btn-pill:has(>img.brand-mark) { gap:10px; }
.product-app .btn-pill-blue:has(>img.brand-mark) { background:#fff; border-color:#c9d5e6; color:var(--ui-ink); }
.product-app .btn-pill-blue:has(>img.brand-mark):hover { background:#f3f6fb; border-color:#8fa9d4; }
.product-app .connection-picks .brand-lockup { gap:9px; }
.product-app .connection-picks img.brand-mark { width:22px; height:22px; }

.product-app img.brand-mark[hidden] { display:none!important; }

/* PRA-POLISH-09: one status badge. Same height, radius and type everywhere; tone comes from the status, never the
   primary action blue as a solid fill. Existing status classes map onto it so their markup and scripts stay as they are. */
.product-app .ui-badge,
body.product-app .st, body.product-app .desk-record-count, body.product-app .desk-account-status, body.product-app #billingStatus,
body.product-app .connector-availability, body.product-app .connection-availability, body.product-app .desk-urgency,
body.product-app .desk-request-person .tag, body.product-app .desk-request-row .tag-overdue {
  display:inline-flex; align-items:center; gap:4px; box-sizing:border-box; min-height:24px; height:auto; margin-top:0; margin-bottom:0; padding:2px 10px;
  border:1px solid #d9dfe8; border-radius:999px; background:#eef1f6; color:#3d4a60;
  font-size:12px; font-weight:600; line-height:1.3; letter-spacing:0; white-space:nowrap; vertical-align:middle;
}
body.product-app .desk-record-count { min-width:24px; justify-content:center; margin-left:7px; padding:2px 8px; }
body.product-app .st { max-width:100%; }
body.product-app .desk-account-status, body.product-app #billingStatus { white-space:normal; }
.product-app .ui-badge--info, body.product-app #billingStatus, body.product-app .desk-account-status[data-tone=info] { background:#eaf0fd; border-color:#cdd9f6; color:#1d47b8; }
.product-app .ui-badge--success, body.product-app .st.live, body.product-app .desk-account-status[data-tone=success],
body.product-app .connector-availability[data-availability=available], body.product-app .connection-availability[data-state=available] { background:#e8f6ee; border-color:#bfe3cc; color:#1d6b3e; }
.product-app .ui-badge--warning, body.product-app .desk-urgency[data-urgency=today], body.product-app .desk-account-status[data-tone=warning] { background:#fff4e0; border-color:#f1cf94; color:#7a4300; }
.product-app .ui-badge--danger, body.product-app .desk-urgency, body.product-app .desk-request-row .tag-overdue, body.product-app .desk-account-status[data-tone=danger] { background:#fdecec; border-color:#f2b8b1; color:#a11d1d; }
body.product-app .desk-urgency[data-urgency=today] { background:#fff4e0; border-color:#f1cf94; color:#7a4300; }
body.product-app .tag.brand-lockup { gap:6px; }

/* PRA-POLISH-10: every disclosure opens and closes the same way: no native triangle, one chevron on the right that
   turns when open. The chevron is positioned, so summaries keep their own layout and text. */
body.product-app details>summary { list-style:none; position:relative; padding-right:32px!important; cursor:pointer; }
body.product-app details>summary::-webkit-details-marker { display:none; }
body.product-app details>summary::marker { content:""; }
body.product-app details>summary::after, body.product-app details>summary:after {
  content:""; position:absolute; right:8px; left:auto; top:50%; bottom:auto; width:8px; height:8px; margin:0; padding:0;
  border:0; border-right:2px solid currentColor; border-bottom:2px solid currentColor; border-radius:0; background:none;
  font-size:0; line-height:0; color:var(--ui-muted,#526176); opacity:.85; transform:translateY(-70%) rotate(45deg); transition:transform .15s ease;
}
body.product-app details[open]>summary::after, body.product-app details[open]>summary:after { content:""; top:50%; transform:translateY(-25%) rotate(-135deg); }
@media(prefers-reduced-motion:reduce){ body.product-app details>summary::after { transition:none; } }

/* PRA-POLISH-12: headings that receive focus from a script (tabindex=-1) show no ring unless the owner is using the
   keyboard. desk.js and onboard.js set data-input on <html> from the last keydown or pointer press. */
html:not([data-input=keyboard]) body.product-app [tabindex="-1"]:focus { outline:none; }

/* PRA-POLISH-15: every onboarding service choice carries a mark in the same 32px neutral tile. */
.product-app .connection-picks .brand-lockup { display:inline-flex; align-items:center; gap:10px; }
.product-app .connection-picks img.brand-mark, .product-app .connection-picks .service-mark { box-sizing:border-box; flex:none; width:32px; height:32px; padding:6px; border-radius:8px; background:#f1f4f9; color:var(--ui-ink); object-fit:contain; }

/* PRA-CARLOS-11: Open 24 hours, beside the business-hours grid (desk and onboarding). */
.product-app .hours-24 { display:flex; flex-wrap:wrap; align-items:center; gap:6px 8px; margin:12px 0 4px; font-size:13px; color:var(--ui-muted); }
.product-app .hours-24-title { font-weight:600; color:var(--ui-ink); margin-right:4px; }
.product-app .hours-24 label { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:4px 10px; border:1px solid var(--ui-line); border-radius:999px; background:#fff; color:var(--ui-ink); cursor:pointer; font-size:13px; font-weight:500; }
.product-app .hours-24 label:has(input:checked) { border-color:#9db4ee; background:#eef3ff; color:#1d47b8; }
.product-app .hours-24 input { width:16px; height:16px; min-width:16px; margin:0; accent-color:var(--ui-blue); }
.product-app .hours-24 label:has(input:focus-visible) { outline:3px solid var(--mc-focus,#4776e4); outline-offset:2px; }
.product-app .hours-season-note:not([hidden]) { color:#7a4300; }

/* ===== 2026-11-18 APX-12 (a11y-perf-improve): on a phone the owner workspace shows no text under 14px. Every
   selector here sets 10 or 11px earlier in this file; this block only raises it at phone width. ===== */
@media (max-width: 640px) {
  .product-app .ui-eyebrow,
  .connection-guide-eyebrow,
  .connection-guide-card dt,
  .connection-guide-next>strong,
  .connection-guide-next .btn-pill,
  .connection-guide-wait,
  .connection-guide-link,
  .connection-guide-refresh p,
  .connection-guide-refresh .btn-pill,
  .connection-guide-shared strong,
  .connection-guide-shared .btn-pill,
  .connection-guide-actions .btn-pill,
  .connection-guide-actions .connection-guide-wait,
  .connection-guide-shared-note,
  .connection-guide-disclosure,
  .connection-guide-flow>p { font-size: 14px; }
}
