/* frost.css -- the shared "aurora glass" look for the contractor app AND the homeowner page.
   Loaded LAST. It re-themes the existing tokens (so every screen and vendor component follows) and restyles the big surfaces:
   frosted-glass cards over a flowing gradient background that is tinted by each contractor's own brand colour.
   Always light (the frosted look needs light glass). Motion is time-based only: no cursor effects. Honours reduced motion.
   Text on white glass is #10202E (>12:1); the accent tokens are still derived by theme.js to pass AA on light grounds. */

@property --s1 { syntax: '<color>'; inherits: true; initial-value: #CBD3DC; }
@property --s2 { syntax: '<color>'; inherits: true; initial-value: #DDE3EA; }
@property --s3 { syntax: '<color>'; inherits: true; initial-value: #F1F4F7; }
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #FFFFFF; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #BAC6D3; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #E5EAF0; }
@property --floor { syntax: '<color>'; inherits: true; initial-value: #EEF1F5; }

:root {
  --s1: #CBD3DC; --s2: #DDE3EA; --s3: #F1F4F7; --c1: #FFFFFF; --c2: #BAC6D3; --c3: #E5EAF0; --floor: #EEF1F5;
  --glass: linear-gradient(140deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .88));
  --glass-soft: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(250, 252, 253, .78));
  --glass-edge: rgba(255, 255, 255, .88);
  --frost-ease: cubic-bezier(.2, .7, .2, 1);
  transition: --s1 1.2s ease, --s2 1.2s ease, --s3 1.2s ease, --c1 1.2s ease, --c2 1.2s ease, --c3 1.2s ease, --floor 1.2s ease;
}

/* ---------------------------------------------------------------- tokens: one light frosted theme, whatever the saved/OS theme says */
html:root[data-theme] {
  color-scheme: light;
  --bg: var(--floor);
  --surface: rgba(255, 255, 255, .74);
  --surface-2: rgba(255, 255, 255, .5);
  --border: rgba(16, 32, 46, .10);
  --border-strong: rgba(16, 32, 46, .40);
  --text: #10202E; --text-2: #3E5164; --text-3: #52687C;
  --overlay: rgba(16, 32, 46, .36);
  --logo-plate: #ffffff; --on-logo-plate: #10202E;
  --grain-opacity: 0;
  --photo-grade: saturate(1) contrast(1.02);
  --success: #1c6b3a; --success-tint: rgba(46, 139, 87, .16);
  --warning: #8a5200; --warning-tint: rgba(245, 154, 28, .22);
  --danger: #b3261e; --danger-tint: rgba(229, 72, 77, .15);
  --info: #2a56c6; --info-tint: rgba(43, 100, 190, .14);
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, .95), 0 16px 34px -24px rgba(16, 32, 46, .5), 0 2px 5px rgba(16, 32, 46, .05);
  --shadow-2: inset 0 1px 0 rgba(255, 255, 255, .95), 0 26px 50px -28px rgba(16, 32, 46, .6), 0 2px 6px rgba(16, 32, 46, .06);
  --shadow-sheet: 0 -16px 50px -20px rgba(16, 32, 46, .5);
  --accent: var(--accent-l); --accent-fill: var(--accent-fill-l); --on-accent: var(--on-accent-l); --accent-tint: var(--accent-tint-l); --focus: var(--accent-l);
  --uv-ground-set: #F3F8FB;
}
html { background: var(--floor); }
body { background: transparent; position: relative; }
.grain::after, .grain::before { display: none !important; }

/* ---------------------------------------------------------------- background */
.a-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.a-mesh { position: absolute; inset: 0; 
  background: radial-gradient(900px 640px at 6% 0%, var(--s1), transparent 62%), radial-gradient(780px 560px at 94% 2%, var(--s3), transparent 60%), radial-gradient(1000px 720px at 52% 36%, var(--s2), transparent 72%),
    linear-gradient(180deg, var(--s1) 0%, var(--s2) 34%, var(--s3) 55%, var(--floor) 86%); }
.a-orb { position: absolute; border-radius: 50%; will-change: transform; }
.a-orb.o1 { width: 560px; height: 560px; left: 8%; top: 30%; background: radial-gradient(circle, var(--c2), transparent 68%); filter: blur(60px); opacity: .55; animation: fx-float 26s ease-in-out infinite alternate; }
.a-orb.o2 { width: 460px; height: 460px; right: 4%; top: 2%; background: radial-gradient(circle, var(--c3), transparent 68%); filter: blur(64px); opacity: .5; animation: fx-float 32s ease-in-out -8s infinite alternate-reverse; }
.a-orb.o3 { width: 380px; height: 380px; left: 46%; top: 44%; background: radial-gradient(circle, var(--c1), transparent 68%); filter: blur(64px); opacity: .6; animation: fx-float 28s ease-in-out -14s infinite alternate; }
.a-aurora svg { position: absolute; left: -8%; top: -6%; width: 116%; height: 92vh; min-height: 600px; animation: fx-drift 34s ease-in-out infinite alternate; transform-origin: 50% 40%; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, transparent 100%); }
.a-aurora .a-glow { position: absolute; right: -10%; top: -14%; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .45), transparent 62%); filter: blur(10px); }
@keyframes fx-drift { from { transform: translate3d(-1.5%, 0, 0) scale(1); } to { transform: translate3d(1.5%, 1.2%, 0) scale(1.05); } }
@keyframes fx-float { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(5%, 4%, 0) scale(1.12); } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fx-sweep { 0%, 55% { transform: translateX(-130%); } 85%, 100% { transform: translateX(130%); } }

/* ---------------------------------------------------------------- glass surfaces */
.card, .aside-card, .cp-sheet, .inv, .tile, .list-row, .empty, .block, .cp-banner {
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-1);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
}
.card, .aside-card, .inv, .tile { border-radius: 22px; }
.cp-sheet { border-radius: 30px; }
.list-row { border-radius: 18px; }
.empty { border-radius: 22px; border-style: solid; }
.block { padding: var(--space-5); border-radius: 28px; gap: var(--space-4); }
/* glass inside glass stays light (no second heavy blur) */
.block .card, .block .list-row, .block .empty, .block .tile, .cp-sheet .inv, .cp-sheet .tile, .card .card, .card .list-row {
  background: var(--glass-soft); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 10px 24px -20px rgba(16, 32, 46, .45);
}
a.list-row:hover { border-color: rgba(255, 255, 255, 1); background: linear-gradient(140deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .8)); }
.chip, .chip-new { backdrop-filter: blur(6px); }
.note, .bubble--them { background: rgba(255, 255, 255, .6); }
.bubble--me { background: var(--accent-tint); }
.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .35) 25%, rgba(255, 255, 255, .62) 37%, rgba(255, 255, 255, .35) 63%); background-size: 400% 100%; animation: fx-shimmer 1.4s ease infinite; }
@keyframes fx-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* inputs, selects and buttons */
.inputGroup input, .inputGroup textarea, .inputGroup select { background: rgba(255, 255, 255, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 14px; }
.inputGroup input:focus, .inputGroup textarea:focus, .inputGroup select:focus { background: rgba(255, 255, 255, .95); }
.btn--primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent-fill) 88%, white), var(--accent-fill)); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--accent-fill) 80%, black), inset 0 1px 0 rgba(255, 255, 255, .35); }
.uv-outline { background: rgba(255, 255, 255, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.icon-btn:hover { background: rgba(255, 255, 255, .5); }

/* ---------------------------------------------------------------- contractor app chrome */
.demo-strip { background: rgba(16, 32, 46, .78); color: #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body[data-shell="auth"] .demo-strip { background: rgba(16, 32, 46, .78); color: #fff; }
.topbar { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.topbar .topbar__brand, .topbar .icon-btn { color: var(--text); }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, .7); }
.topbar .icon-btn .badge { background: var(--accent-fill); color: var(--on-accent); }
.sidebar { background: rgba(255, 255, 255, .62); border-right: 1px solid rgba(255, 255, 255, .9); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); }
.sidebar__brand { color: var(--text); }
.sidebar__link { color: var(--text-2); }
.sidebar__link:hover { background: rgba(255, 255, 255, .85); color: var(--text); }
.sidebar__link[aria-current="page"] { background: #fff; color: var(--text); box-shadow: 0 8px 20px -12px rgba(16, 32, 46, .35), inset 0 0 0 1px rgba(16, 32, 46, .06); }
.sidebar__link .badge { background: var(--accent-fill); color: var(--on-accent); }
.sidebar__foot .sidebar__link { color: var(--text-2); }

/* page headings sit on the gradient: big, light, white */
.page-head { color: var(--text); }
.page-head .page-title { font-size: clamp(2.3rem, 1.2rem + 3.6vw, 3.9rem); font-weight: 300; letter-spacing: -0.035em; line-height: 1.04; color: var(--text); }
.page-head .eyebrow, .page-head .page-head__sub, .page-head .muted, .page-head p { color: var(--text-2); }
.page-head__back { color: var(--text-2); }
.page-head__back:hover { color: var(--text); }
.page-head .btn--ghost { color: var(--text); }
.block__title { letter-spacing: var(--tracking-heading); }

/* bottom nav (phones): frosted pill, white active pill */
.pill-nav { --pill-bg: transparent; --pill-text: var(--text-2); --base: #fff; --hover-text: var(--text); }
.pill-nav-items { background: rgba(255, 255, 255, .72); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 22px 44px -22px rgba(16, 32, 46, .6), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 1px rgba(255, 255, 255, .75); }
.pill.is-active { background: #fff; color: var(--text); box-shadow: 0 8px 18px -10px rgba(16, 32, 46, .55); }
.pill.is-active .hover-circle { background: #fff; }
.fab { background: linear-gradient(160deg, color-mix(in srgb, var(--accent-fill) 85%, white), var(--accent-fill)); box-shadow: 0 18px 34px -14px color-mix(in srgb, var(--accent-fill) 85%, black), inset 0 1px 0 rgba(255, 255, 255, .4); }

/* sheets (native <dialog>): frosted glass over a blurred page */
dialog.sheet { background: linear-gradient(160deg, rgba(255, 255, 255, .84), rgba(240, 248, 252, .68)); border: 1px solid rgba(255, 255, 255, .85); backdrop-filter: blur(36px) saturate(1.7); -webkit-backdrop-filter: blur(36px) saturate(1.7); box-shadow: var(--shadow-sheet), inset 0 1px 0 rgba(255, 255, 255, .95); }
dialog.sheet::backdrop, dialog.lightbox::backdrop { background: radial-gradient(900px 600px at 80% 20%, rgba(255, 255, 255, .16), transparent 70%), rgba(16, 32, 46, .34); backdrop-filter: blur(9px) saturate(1.2); -webkit-backdrop-filter: blur(9px) saturate(1.2); }
.sheet__footer { background: rgba(255, 255, 255, .5); border-top-color: rgba(255, 255, 255, .8); }
.sheet__bar { background: transparent; }

/* sign-in / join / account: the hero sits on the gradient, the form is a glass card */
.auth { background: transparent; }
.auth__hero { color: var(--text); }
.auth__hero .hero__field { opacity: 0; }
.auth__headline { color: var(--text); font-weight: 300; }
.auth__sub { color: var(--text-2); }
.auth__panel { margin-block: var(--space-6); padding: var(--space-8) var(--space-6); border-radius: 30px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-2); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); }
.auth__demo { background: rgba(255, 255, 255, .4); }
@media (min-width: 64rem) { .auth__panel { margin: auto var(--space-8); } }

/* ---------------------------------------------------------------- homeowner page */
.cp { background: transparent; }
.cp-header .cp-brand, .cp-header .cp-brand__name { color: var(--text); }
.cp-call { background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .95); color: var(--text); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.cp-call:hover { background: #fff; }
.hero__field { opacity: 0; }
.hero__eyebrow, .hero__now { color: var(--text); }
.hero__updated { color: var(--text-2); }
.hero__stage .flap-overlay { background: var(--floor); }
.hero__stage .split-flap-text { --split-flap-tile-color: #10202E; --split-flap-text-color: #fff; }
.tile { border-radius: 20px; }
.tiles .tile { background: var(--glass); }
.cp-banner { border-radius: 20px; background: linear-gradient(140deg, rgba(255, 255, 255, .92), rgba(255, 236, 232, .8)); border-color: rgba(255, 255, 255, .95); }
.cp-sheet { padding: var(--space-6) var(--space-5); }
.cp-sheet .rail__node { background: rgba(255, 255, 255, .9); }
.photo-tile { box-shadow: 0 14px 28px -18px rgba(16, 32, 46, .6); }
.cp-footer, footer.cp-footer { color: var(--text-2); }

/* ---------------------------------------------------------------- motion (time-based only) */
#view > *, #main > section, #main > .cp-sheet, .cp-aside .aside-card { animation: fx-rise .7s var(--frost-ease) both; }
#view > *:nth-child(2), #main > *:nth-child(2) { animation-delay: .07s; } #view > *:nth-child(3), #main > *:nth-child(3) { animation-delay: .14s; }
#view > *:nth-child(4), #main > *:nth-child(4) { animation-delay: .21s; } #view > *:nth-child(5), #main > *:nth-child(5) { animation-delay: .28s; }
#view > *:nth-child(n+6), #main > *:nth-child(n+6) { animation-delay: .35s; }
.aside-card { position: relative; overflow: hidden; }
.aside-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .6) 50%, transparent 62%); transform: translateX(-130%); animation: fx-sweep 9s ease-in-out 2s infinite; pointer-events: none; }
dialog.sheet[open] { animation: fx-sheet .42s cubic-bezier(.16, .84, .24, 1) both; }
@keyframes fx-sheet { from { opacity: 0; transform: translateY(34px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 63.99rem) {
  .block { padding: var(--space-4); border-radius: 24px; }
  .auth__panel { margin: var(--space-4) var(--space-4) var(--space-8); width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


/* ---------------------------------------------------------------- Settings: short tabs, one group at a time, solid white surfaces */
.set-tabs { display: flex; gap: var(--space-1); padding: 5px; margin-bottom: var(--space-5); border-radius: 999px; background: rgba(255, 255, 255, .8); border: 1px solid #fff; box-shadow: var(--shadow-1); overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--space-2); z-index: 5; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.set-tabs::-webkit-scrollbar { display: none; }
.set-tab { flex: 1 0 auto; min-height: 44px; padding: 0 var(--space-5); border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-weight: var(--fw-semibold); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.set-tab:hover { color: var(--text); background: rgba(255, 255, 255, .9); }
.set-tab[aria-selected="true"] { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent-fill) 85%, black); }
.set-panel { display: grid; gap: var(--space-5); outline: none; }
.set-panel .block, .set-panel .card { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.set-panel .block .card { box-shadow: none; border-color: rgba(16, 32, 46, .08); }
@media (max-width: 63.99rem) { .set-tab { padding: 0 var(--space-4); } }

/* invoice look preview (Settings) */
.ivp { display: grid; gap: var(--space-2); }
.ivp__card { padding: var(--space-5); border-radius: 22px; background: linear-gradient(160deg, #fff, #F3F6FA); border: 1px solid rgba(16, 32, 46, .1); display: grid; gap: var(--space-3); max-width: 26rem; box-shadow: var(--shadow-1); }
.ivp__top { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-2); }
.ivp__note { margin: 0; color: var(--text); }
.ivp__amt { margin: 0; font-size: 2.4rem; font-weight: 600; letter-spacing: -.03em; }
.ivp__btn { display: grid; place-items: center; min-height: 52px; border-radius: 16px; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.ivp__pay, .ivp__terms { margin: 0; font-size: var(--fs-sm); color: var(--text-2); white-space: pre-line; }
.ivp__terms { font-size: var(--fs-xs); color: var(--text-3); padding-top: var(--space-2); border-top: 1px solid rgba(16, 32, 46, .08); }

/* install nudge (phones, until installed or dismissed) */
.install-nudge { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h, 64px) + 24px + env(safe-area-inset-bottom)); z-index: 40; display: flex; align-items: stretch; border-radius: 20px; background: #14161E; color: #fff; box-shadow: 0 22px 44px -16px rgba(0, 0, 0, .55); overflow: hidden; }
.install-nudge a { flex: 1; display: grid; gap: 2px; padding: 14px 16px; color: inherit; text-decoration: none; }
.install-nudge span { font-size: var(--fs-sm); opacity: .8; }
.install-nudge button { width: 48px; border: 0; background: transparent; color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (min-width: 64rem) { .install-nudge { display: none; } }

/* install guide: on the home (sign-in) page, #/install and Settings */
.ig { display: grid; gap: var(--space-3); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid rgba(16, 32, 46, .1); }
.ig h2 { margin: 0; font-size: var(--fs-lg); }
.ig__lead, .ig__done { margin: 0; color: var(--text-2); }
.ig__done { color: var(--success); font-weight: var(--fw-semibold); }
.ig__warn { margin: 0; padding: 10px 14px; border-radius: 14px; background: #FFF6E5; color: #6B4A00; font-size: var(--fs-sm); }
.ig__steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.ig__steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: start; }
.ig__steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; }
.ig__steps strong { font-weight: var(--fw-semibold); }
.ig__steps span { color: var(--text-2); font-size: var(--fs-sm); }
.ig__other { margin: 0; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ig__other button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(16, 32, 46, .12); background: rgba(255, 255, 255, .7); font: inherit; font-size: var(--fs-sm); cursor: pointer; color: var(--text-2); }
.ig--compact .ig__lead { font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- app-style sign-in */
.si { min-height: 100dvh; width: min(100% - 40px, 26rem); margin-inline: auto; display: grid; align-content: center; gap: 28px; padding-block: 32px; }
.si__brand { display: grid; justify-items: center; gap: 18px; }
.si__tile { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: linear-gradient(160deg, #1B3A5E, #0F2A47); box-shadow: 0 24px 44px -20px rgba(15, 42, 71, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.si__mark { width: 52px; height: 52px; }
.si__title { margin: 0; font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem); font-weight: 300; letter-spacing: -0.03em; text-align: center; }
.si__card { padding: 22px; border-radius: 30px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-2); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5); }
.si .auth__form { display: grid; gap: var(--space-3); }
.si .auth__demo { margin-bottom: var(--space-4); }
.si > * { animation: fx-rise .7s var(--frost-ease) both; }
.si > *:nth-child(2) { animation-delay: .1s; }
html.is-splash .si > * { animation-delay: 1.85s; }
html.is-splash .si > *:nth-child(2) { animation-delay: 1.95s; }

/* ---------------------------------------------------------------- launch splash */
.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 22px; background: radial-gradient(700px 500px at 50% 35%, #1D4068, #0F2A47 60%, #0A1D33); transition: transform .75s cubic-bezier(.7, 0, .2, 1); will-change: transform; }
.splash.is-leaving { transform: translateY(-100%); }
.splash__mark { width: 112px; height: 112px; overflow: visible; }
.sp-line { stroke-dasharray: 24; stroke-dashoffset: 24; animation: sp-draw .6s .35s cubic-bezier(.3, .7, .2, 1) forwards; }
.sp-line--b { stroke-dasharray: 12; stroke-dashoffset: 12; animation-delay: .8s; animation-duration: .4s; }
.sp-node { transform-box: fill-box; transform-origin: center; opacity: 0; animation: sp-pop .5s cubic-bezier(.3, 1.6, .5, 1) forwards; }
.sp-node--l { animation-delay: .1s; } .sp-node--c { animation-delay: .75s; } .sp-node--r { animation-delay: 1.1s; }
.splash__word { margin: 0; color: #fff; font-size: 1.6rem; font-weight: 500; letter-spacing: .02em; opacity: 0; animation: sp-word .7s 1s ease forwards; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes sp-word { from { opacity: 0; transform: translateY(8px); letter-spacing: .12em; } to { opacity: 1; transform: none; letter-spacing: .02em; } }

/* ---------------------------------------------------------------- first-run tour */
.tour { position: fixed; inset: 0; z-index: 10000; animation: tour-in .3s ease both; }
.tour.is-out { opacity: 0; transition: opacity .25s; pointer-events: none; }
.tour__spot { position: fixed; border-radius: 18px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 100vmax rgba(8, 18, 32, .74); transition: left .4s var(--frost-ease), top .4s var(--frost-ease), width .4s var(--frost-ease), height .4s var(--frost-ease); }
.tour__spot.is-on { outline: 2px solid rgba(255, 255, 255, .95); outline-offset: 0; }
.tour__spot.is-on::after { content: ''; position: absolute; inset: -5px; border-radius: 22px; border: 2px solid #6FA8FF; animation: tour-pulse 1.7s ease-out infinite; }
.tour__card { position: fixed; padding: 20px; border-radius: 26px; background: #fff; color: var(--text); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .6); display: grid; gap: 10px; }
.tour__card.is-in { animation: tour-card .4s var(--frost-ease) both; }
.tour__dots { display: flex; gap: 5px; flex-wrap: wrap; }
.tour__dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(16, 32, 46, .15); transition: all .3s; }
.tour__dots span.seen { background: rgba(47, 95, 143, .5); }
.tour__dots span.on { width: 18px; background: var(--accent-fill); }
.tour__title { margin: 4px 0 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; }
.tour__body { margin: 0; color: var(--text-2); line-height: 1.45; }
.tour__actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tour__sp { flex: 1; }
.tour__actions button { min-height: 44px; border-radius: 999px; padding: 0 18px; font: inherit; font-weight: 600; cursor: pointer; border: 0; }
.tour__skip { background: transparent; color: var(--text-3); padding: 0 6px !important; }
.tour__back { background: rgba(16, 32, 46, .07); color: var(--text); }
.tour__next { background: var(--accent-fill); color: var(--on-accent); box-shadow: 0 10px 20px -12px var(--accent-fill); }
.tour__actions button:focus-visible, .tour__task:focus-visible { outline: 3px solid #6FA8FF; outline-offset: 2px; }
.tour__extra { display: grid; gap: 8px; }
.tour__extra:empty { display: none; }
.tour__task { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 16px; border: 1px solid rgba(16, 32, 46, .1); background: #F4F7FA; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.tour__task b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font-size: .85rem; }
@keyframes tour-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tour-card { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes tour-pulse { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(1.18); opacity: 0; } }
.install-nudge { display: none !important; }   /* the sign-in is meant to feel like an app: no banners */
.si .auth__demo .btn, .si .auth__demo .uv-outline, .si .auth__demo button { white-space: normal; line-height: 1.2; padding-block: 10px; }

/* demo company picker */
.si__pick { margin: 0 0 var(--space-3); font-size: var(--fs-md); font-weight: var(--fw-semibold); text-align: center; color: var(--text-2); }
.si .auth__demo { display: grid; gap: var(--space-3); margin: 0; }
.si__co { display: grid; gap: 2px; width: 100%; min-height: 72px; padding: 14px 18px; border-radius: 20px; border: 1px solid rgba(16, 32, 46, .1); background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--text); box-shadow: var(--shadow-1); transition: transform .2s, box-shadow .2s; }
.si__co:hover { transform: translateY(-2px); }
.si__co:focus-visible { outline: 3px solid #6FA8FF; outline-offset: 2px; }
.si__co-name { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.si__co-who { color: var(--text-2); font-size: var(--fs-sm); }
.demo-strip button + button { margin-left: var(--space-3); }

/* ---------------------------------------------------------------- video */
.vtile { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-md, 14px); overflow: hidden; background: #0F2A47; cursor: pointer; aspect-ratio: 4 / 3; }
.vtile__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vtile__img--blank { background: linear-gradient(160deg, #1B3A5E, #0F2A47); }
.vtile__play, .update-tile__play, .photo-tile__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(15, 42, 71, .72); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); pointer-events: none; }
.vtile__play svg, .update-tile__play svg, .photo-tile__play svg { margin-left: 3px; }
.vtile__time, .update-tile__dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 42, 71, .8); color: #fff; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; pointer-events: none; }
.update-tile__play { width: 44px; height: 44px; }
.update-tile__img { position: relative; }
.vtile:focus-visible { outline: 3px solid #6FA8FF; outline-offset: 3px; }
.update__add { flex-wrap: wrap; }
.vplayer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(8, 18, 32, .94); color: #fff; }
.vplayer::backdrop { background: rgba(8, 18, 32, .94); }
.vplayer__inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.vplayer__close { justify-self: end; color: #fff; }
.vplayer__video { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #000; border-radius: 12px; }
.vplayer__cap { margin: 0; text-align: center; color: rgba(255, 255, 255, .85); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- Today: personal, frosted */
.tdy-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-6); align-items: end; padding: var(--space-6) 0 var(--space-6); }
.tdy-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--space-3); padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .72); border: 1px solid #fff; box-shadow: var(--shadow-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tdy-hero__eyebrow svg { color: var(--accent); }
.tdy-hero__hi { margin: 0; font-size: clamp(2.5rem, 1.2rem + 5.6vw, 4.8rem); font-weight: 300; letter-spacing: -0.045em; line-height: 1.02; color: var(--text); }
.tdy-hero__name { font-weight: 600; background: linear-gradient(120deg, var(--text) 10%, var(--accent) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tdy-hero__sub { margin: var(--space-3) 0 0; font-size: var(--fs-lg); color: var(--text-2); max-width: 36ch; }
.tdy-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.tdy-hero__brand { display: grid; justify-items: center; gap: 10px; padding: 18px 22px; border-radius: 28px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-2); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); max-width: 12rem; }
.tdy-hero__brand img { max-width: 7rem; max-height: 3.4rem; object-fit: contain; }
.tdy-hero__mono { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-fill); color: var(--on-accent); font-size: 1.5rem; font-weight: 600; box-shadow: 0 14px 26px -14px var(--accent-fill); }
.tdy-hero__org { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-align: center; color: var(--text-2); }

.tdy-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); }
.tdy-stat { --tc: var(--accent); --tb: var(--accent-tint); position: relative; display: grid; gap: 2px; padding: var(--space-5); border-radius: 26px; color: var(--text); text-decoration: none; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-1); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); overflow: hidden; transition: transform .25s var(--frost-ease), box-shadow .25s; }
.tdy-stat::after { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--tc); opacity: .85; }
.tdy-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tdy-stat:focus-visible { outline: 3px solid var(--tc); outline-offset: 3px; }
.tdy-stat--red { --tc: #C62828; --tb: #FDECEA; } .tdy-stat--green { --tc: #1c6b3a; --tb: #E4F3E9; } .tdy-stat--amber { --tc: #B26A00; --tb: #FFF1D6; } .tdy-stat--grey { --tc: #52687C; --tb: #EAEFF4; }
.tdy-stat__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--tb); color: var(--tc); margin-bottom: var(--space-2); }
.tdy-stat__label { font-size: var(--fs-sm); color: var(--text-2); font-weight: var(--fw-semibold); }
.tdy-stat__num { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.tdy-stat--red .tdy-stat__num { color: #A31F1F; }
.tdy-stat__note { font-size: var(--fs-sm); color: var(--text-3); }
.tdy-stat--red .tdy-stat__note { color: #A31F1F; font-weight: var(--fw-semibold); }

.tdy-block { margin-bottom: var(--space-6); }
.tdy-count { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font-weight: 600; font-size: var(--fs-sm); box-shadow: 0 8px 16px -8px var(--accent-fill); }
.tdy-link { color: var(--accent); font-weight: var(--fw-semibold); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.tdy-needs, .tdy-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.tdy-jobs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--space-4); }
.tdy-needs li, .tdy-jobs li { margin: 0; }

.tdy-row { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-4); padding: 14px 16px; border-radius: 22px; background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .95); box-shadow: inset 0 1px 0 #fff, 0 12px 26px -22px rgba(16, 32, 46, .6); color: var(--text); text-decoration: none; transition: transform .2s var(--frost-ease), box-shadow .2s; }
a.tdy-row:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 18px 32px -20px rgba(16, 32, 46, .55); }
a.tdy-row:focus-visible, .tdy-row a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tdy-row--late { background: linear-gradient(100deg, #FFF4F2, rgba(255, 255, 255, .9) 55%); border-color: #F6C9C4; }
.tdy-row__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; flex: none; }
.tdy-row__ic--blue { background: var(--accent-tint); color: var(--accent); } .tdy-row__ic--red { background: #FDECEA; color: #C62828; } .tdy-row__ic--amber { background: #FFF1D6; color: #8a5200; } .tdy-row__ic--grey { background: #EAEFF4; color: #3E5164; }
.tdy-row__main { display: grid; gap: 2px; min-width: 0; }
.tdy-row__title { font-weight: var(--fw-semibold); font-size: var(--fs-md); overflow-wrap: anywhere; }
.tdy-row__sub { font-size: var(--fs-sm); color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tdy-row__sub.is-late { color: #A31F1F; font-weight: var(--fw-semibold); }
.tdy-row__go { color: var(--text-3); }
.tdy-pill { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.tdy-pill--blue { background: var(--accent-fill); color: var(--on-accent); } .tdy-pill--red { background: #C62828; color: #fff; } .tdy-pill--grey { background: #E3E9F0; color: #3E5164; }
.tdy-row--follow { grid-template-columns: auto minmax(0, 1fr) auto; }
.tdy-row__ctl { display: flex; align-items: center; gap: var(--space-3); }

.tdy-clear { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5); border-radius: 22px; background: linear-gradient(120deg, #EAF6EE, rgba(255, 255, 255, .85)); border: 1px solid #cfe8d8; }
.tdy-clear__ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #1c6b3a; color: #fff; flex: none; box-shadow: 0 12px 22px -12px #1c6b3a; }
.tdy-clear strong { font-size: var(--fs-md); } .tdy-clear p { margin: 2px 0 0; color: var(--text-2); font-size: var(--fs-sm); }

.tdy-job { position: relative; height: 100%; border-radius: 26px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-1); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); overflow: hidden; transition: transform .25s var(--frost-ease), box-shadow .25s; }
.tdy-job:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tdy-job::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%); transform: translateX(-130%); animation: fx-sweep 11s ease-in-out 3s infinite; pointer-events: none; }
.tdy-job__main { display: grid; gap: 6px; padding: 20px 20px 74px; color: var(--text); text-decoration: none; height: 100%; align-content: start; }
.tdy-job__main:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 26px; }
.tdy-job__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.tdy-job__stage { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--accent-tint); color: var(--accent); font-size: var(--fs-xs); font-weight: 700; }
.tdy-job__pct { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.tdy-job__name { margin: 6px 0 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.tdy-job__client { color: var(--text-2); font-size: var(--fs-sm); }
.tdy-job__bar { display: block; height: 8px; margin-top: 10px; border-radius: 999px; background: rgba(16, 32, 46, .1); overflow: hidden; }
.tdy-job__bar span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent-fill) 70%, white), var(--accent-fill)); }
.tdy-job__meta { font-size: var(--fs-xs); color: var(--text-3); }
.tdy-job__cam { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 12px 22px -12px var(--accent-fill); transition: transform .2s; }
.tdy-job__cam:hover { transform: translateY(-2px); } .tdy-job__cam:active { transform: scale(.96); } .tdy-job__cam:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 63.99rem) { .tdy-hero__brand { display: none; } .tdy-hero { grid-template-columns: 1fr; padding-top: var(--space-3); } }
@media (max-width: 36rem) {
  .tdy-stats { gap: var(--space-2); }
  .tdy-stat { padding: 14px 12px; border-radius: 20px; }
  .tdy-stat__ic, .tdy-stat__note { display: none; }
  .tdy-stat__label { font-size: var(--fs-xs); }
  .tdy-stat__num { font-size: 1.6rem; }
  .tdy-hero__sub { font-size: var(--fs-md); }
  .tdy-hero__actions .btn, .tdy-hero__actions .uv-outline { flex: 1 1 10rem; justify-content: center; }
  .tdy-row { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px 14px; gap: 12px; }
  .tdy-row__go { display: none; }
  .tdy-row__ic { width: 42px; height: 42px; border-radius: 14px; }
  .tdy-row--follow { grid-template-columns: auto minmax(0, 1fr); }
  .tdy-row--follow .tdy-row__ctl { grid-column: 1 / -1; justify-content: space-between; padding-top: 4px; }
}

/* Today, phone refinements */
@media (max-width: 63.99rem) {
  .topbar { background: linear-gradient(180deg, rgba(238, 241, 245, .94), rgba(238, 241, 245, .8)); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid rgba(255, 255, 255, .8); }
}
@media (max-width: 36rem) {
  .tdy-hero__actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--space-2); }
  .tdy-hero__actions .btn, .tdy-hero__actions .uv-outline { white-space: nowrap; padding-inline: var(--space-3); justify-content: center; min-width: 0; }
  .tdy-row { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; }
  .tdy-row > .tdy-pill { grid-column: 2; justify-self: start; }
}

/* "A new version is ready" bar */
.upd-bar { position: fixed; z-index: 9000; left: 50%; translate: -50% 0; bottom: calc(var(--bottom-nav-h, 64px) + 24px + env(safe-area-inset-bottom)); width: min(calc(100% - 24px), 28rem); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 22px; background: rgba(15, 42, 71, .94); color: #fff; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: upd-in .5s var(--frost-ease) both; }
.upd-bar__ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(111, 168, 255, .25); color: #9CC4FF; flex: none; }
.upd-bar__txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.upd-bar__txt span { font-size: var(--fs-sm); opacity: .8; }
.upd-bar__go { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; color: #0F2A47; font: inherit; font-weight: 700; cursor: pointer; }
.upd-bar__x { width: 32px; height: 40px; border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-size: 1.4rem; cursor: pointer; }
.upd-bar button:focus-visible { outline: 3px solid #6FA8FF; outline-offset: 2px; }
@keyframes upd-in { from { opacity: 0; translate: -50% 18px; } to { opacity: 1; translate: -50% 0; } }
@media (min-width: 64rem) { .upd-bar { bottom: 24px; left: auto; right: 24px; translate: 0 0; animation-name: upd-in-d; } }
@keyframes upd-in-d { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

/* Long text must never stretch the page wider than the phone (it makes the browser zoom out and nothing fits) */
html, body { max-width: 100%; overflow-x: clip; }
#view, .today, .tdy-hero, .tdy-hero__text, .tdy-block, .tdy-needs li, .tdy-jobs li { min-width: 0; max-width: 100%; }
.tdy-hero__hi, .tdy-hero__sub, .tdy-hero__name, .tdy-job__name, .tdy-job__client, .tdy-row__title, .tdy-row__sub, .tdy-stat__label, .page-title { overflow-wrap: anywhere; word-break: break-word; }
.tdy-hero__hi { font-size: clamp(2.2rem, 1rem + 6vw, 4.8rem); }
.tdy-hero__addname { display: inline-flex; margin-top: var(--space-2); min-height: 36px; align-items: center; color: var(--accent); font-weight: var(--fw-semibold); font-size: var(--fs-sm); text-decoration: none; }
.tdy-hero__addname:hover { text-decoration: underline; }
.tdy-row__main, .tdy-job__main { min-width: 0; }
.set-dl, .set-dl > div, .set-dl dt, .set-dl dd { min-width: 0; max-width: 100%; }
.set-dl dd, .set-dl dt, .card dd, .list-row__sub, .list-row__title { overflow-wrap: anywhere; word-break: break-word; }
.set-dl { grid-template-columns: minmax(0, 1fr); }

/* notifications: homeowner card, contractor ask + settings */
.cp-notify, .tdy-ask { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--space-5); padding: 14px 14px 14px 16px; border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-1); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); }
.cp-notify[hidden], .tdy-ask[hidden] { display: none; }
.cp-notify__ic, .tdy-ask__ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; flex: none; background: var(--accent-tint); color: var(--accent); }
.cp-notify--on .cp-notify__ic { background: #E4F3E9; color: #1c6b3a; }
.cp-notify__txt, .tdy-ask__txt { display: grid; gap: 2px; flex: 1; min-width: 0; line-height: 1.3; }
.cp-notify__txt span, .tdy-ask__txt span { color: var(--text-2); font-size: var(--fs-sm); }
.cp-notify__go { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; flex: none; box-shadow: 0 10px 20px -12px var(--accent-fill); }
.cp-notify__link { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--text-2); font: inherit; text-decoration: underline; cursor: pointer; flex: none; }
.cp-notify__x { width: 36px; height: 44px; border: 0; background: transparent; color: var(--text-3); font-size: 1.5rem; cursor: pointer; flex: none; }
.cp-notify button:focus-visible, .tdy-ask button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tdy-ask__btns { display: flex; gap: 8px; flex: none; }
.set-pushon { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: #1c6b3a; font-weight: var(--fw-semibold); }
@media (max-width: 36rem) {
  .cp-notify, .tdy-ask { flex-wrap: wrap; }
  .cp-notify__txt, .tdy-ask__txt { flex-basis: calc(100% - 56px); }
  .cp-notify__go { flex: 1 1 100%; }
  .tdy-ask__btns { flex: 1 1 100%; } .tdy-ask__btns .btn { flex: 1; justify-content: center; }
  .cp-notify__x { position: absolute; right: 8px; top: 6px; }
  .cp-notify { position: relative; }
}

/* ---------- password show/hide eye (kit.js field) ---------- */
.inputGroup:has(.pw-eye) { position: relative; }
.inputGroup input.has-eye { padding-right: 3rem; }
.pw-eye { position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-2); border-radius: 999px; cursor: pointer; z-index: 2; }
.pw-eye:hover { color: var(--text); }
.pw-eye:focus-visible { outline: 2px solid var(--accent, #3b82f6); outline-offset: -2px; }

/* ---------- Face ID / fingerprint lock (js/app/biometric.js) ---------- */
.bio-lock { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 1rem; background: rgba(238, 241, 247, 0.72); -webkit-backdrop-filter: blur(26px) saturate(1.4); backdrop-filter: blur(26px) saturate(1.4); }
.bio-lock__card { width: min(22rem, 100%); text-align: center; padding: 2rem 1.5rem; border-radius: 1.5rem; background: rgba(255, 255, 255, 0.85); box-shadow: 0 20px 60px rgba(20, 30, 60, 0.18); display: grid; gap: 0.75rem; }
.bio-lock__icon { margin: 0 auto; width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: grid; place-items: center; background: #14233f; color: #fff; }
.bio-lock__title { font-size: 1.35rem; margin: 0.25rem 0 0; }
.bio-lock__sub, .bio-lock__msg { margin: 0; color: var(--text-2, #55607a); font-size: 0.95rem; }
.bio-lock__msg:empty { display: none; }
.bio-lock__alt { background: none; border: 0; color: var(--text-2, #55607a); text-decoration: underline; padding: 0.75rem; min-height: 44px; cursor: pointer; font: inherit; }

/* ============================================================ Job page v2 (phone-first) ============================================================ */
.job2 { display: grid; gap: var(--space-4, 1rem); }
.job2 > * { min-width: 0; }
.jb-eyebrow { margin: 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2, #5b6785); font-weight: 600; }

/* client strip */
.jb-client { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0.9rem; border-radius: 1.1rem; background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.85); box-shadow: 0 6px 22px rgba(20,35,63,0.07); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.jb-client__who { display: grid; min-width: 0; }
.jb-client__name { font-weight: 650; font-size: 1.02rem; }
.jb-client__acts { display: flex; gap: 0.5rem; flex: none; }
.jb-round { display: grid; justify-items: center; gap: 0.2rem; font-size: 0.7rem; font-weight: 600; color: var(--text-2, #5b6785); text-decoration: none; min-width: 3rem; }
.jb-round svg { width: 2.75rem; height: 2.75rem; padding: 0.7rem; border-radius: 50%; background: #14233f; color: #fff; box-sizing: border-box; }
.jb-round:active svg { transform: scale(0.94); }
.jb-noclient { margin: 0; }

/* where it's at */
.jb-status { display: grid; gap: 0.85rem; padding: 1.1rem; }
.jb-status__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.jb-now { margin: 0.1rem 0 0.15rem; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.jb-pct { font-size: 1.4rem; font-weight: 700; color: #14233f; flex: none; }
.jb-more { border-top: 1px solid rgba(20,35,63,0.08); padding-top: 0.6rem; }
.jb-more summary { cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--text-2, #5b6785); min-height: 2.5rem; display: flex; align-items: center; list-style: none; }
.jb-more summary::-webkit-details-marker { display: none; }
.jb-more summary::after { content: '▾'; margin-left: 0.4rem; transition: transform .2s; }
.jb-more[open] summary::after { transform: rotate(180deg); }
.jb-steps { list-style: none; margin: 0.25rem 0 0.5rem; padding: 0; display: grid; gap: 0.15rem; }
.jb-step { display: flex; align-items: center; gap: 0.7rem; min-height: 2.4rem; color: var(--text-2, #5b6785); }
.jb-step__dot { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 2px solid rgba(20,35,63,0.25); display: grid; place-items: center; flex: none; }
.jb-step--done .jb-step__dot { background: #14233f; border-color: #14233f; color: #fff; }
.jb-step--current { color: #14233f; font-weight: 700; }
.jb-step--current .jb-step__dot { border-color: #3b6fd8; box-shadow: 0 0 0 4px rgba(59,111,216,0.18); }

/* actions */
.jb-actions { display: grid; gap: 0.6rem; }
.jb-actions__2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

/* tabs */
.jb-tabs { padding: 0.35rem 0; }
.jb-tabs > * { width: 100%; }
.jb-tabs [role="radiogroup"], .jb-tabs .seg { display: grid; grid-template-columns: repeat(4, 1fr); }
.jb-panel { min-width: 0; padding-bottom: 5.5rem; }

/* updates */
.jb-feed { display: grid; gap: 1.1rem; }
.jb-day__h { margin: 0 0 0.5rem; }
.jb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.jb-update { border-radius: 1.1rem; background: rgba(255,255,255,0.72); border: 1px solid rgba(255,255,255,0.85); overflow: hidden; box-shadow: 0 6px 22px rgba(20,35,63,0.06); }
.jb-update--photo img, .jb-update--photo .vtile { display: block; width: 100%; max-height: 22rem; object-fit: cover; }
.jb-update__meta { padding: 0.6rem 0.85rem 0.8rem; display: grid; gap: 0.15rem; }
.jb-update__cap { margin: 0; font-weight: 550; }
.jb-update--stage { display: flex; gap: 0.7rem; align-items: center; padding: 0.8rem 0.9rem; }
.jb-update__tick { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center; background: #14233f; color: #fff; flex: none; }

/* messages */
.jb-msgs { display: grid; gap: 1rem; }
.jb-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.jb-empty { text-align: center; padding: 1.25rem 0.5rem; }
.jb-bubble { max-width: 86%; padding: 0.65rem 0.85rem; border-radius: 1.1rem; display: grid; gap: 0.2rem; overflow-wrap: anywhere; }
.jb-bubble p { margin: 0; }
.jb-bubble--them { justify-self: start; background: rgba(255,255,255,0.85); border: 1px solid rgba(20,35,63,0.08); border-bottom-left-radius: 0.35rem; }
.jb-bubble--me { justify-self: end; background: #14233f; color: #fff; border-bottom-right-radius: 0.35rem; }
.jb-bubble--private { background: #fff6dd; color: #4a3a05; border: 1px dashed #d9b84a; }
.jb-bubble__tag { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.jb-bubble__meta { font-size: 0.72rem; opacity: 0.7; }
.jb-composer { display: grid; gap: 0.6rem; padding: 0.9rem; border-radius: 1.2rem; background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 6px 22px rgba(20,35,63,0.07); }

/* payments (schedule.js) */
.sched { display: grid; gap: 0.9rem; padding: 1.1rem; }
.sched-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sched-total-amt { margin: 0.1rem 0 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.sched-opt { display: grid; gap: 0.35rem; border-top: 1px solid rgba(20,35,63,0.08); padding-top: 0.8rem; }
.sched-row { display: grid; gap: 0.5rem; }
.jb-head { display: grid; gap: 0.25rem; }
.jb-head__bar { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; }
.jb-title { margin: 0; font-size: 1.65rem; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.jb-addr { margin: 0.2rem 0 0; display: inline-flex; align-items: center; gap: 0.4rem; color: #2d5fc4; font-weight: 550; font-size: 0.95rem; text-decoration: none; min-height: 2.5rem; max-width: 100%; }
.jb-addr span { overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(45,95,196,0.35); }
.jb-addr svg:last-child { flex: none; opacity: 0.6; }
.jb-head .btn--icon, .jb-head button[aria-label="More for this job"] { min-width: 2.75rem; min-height: 2.75rem; padding: 0; border-radius: 50%; }

/* ---- background: no hard edge. The swirl is wider than the screen and fades out sideways as well as downward. ---- */
.a-aurora svg {
  left: -18%; width: 136%;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.a-aurora .a-glow { right: -25%; }

/* composer: one compact row. Lock icon = private note; paper plane = send. */
.jb-composer { gap: 0.4rem; padding: 0.6rem; }
.jb-composer__row { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 0.5rem; }
.jb-composer__field { min-width: 0; }
.jb-composer__field .field { margin: 0; }
.jb-composer__field .inputGroup { margin: 0; }
.jb-composer__field textarea { min-height: 3rem !important; }
.jb-lock, .jb-send { width: 2.9rem; height: 2.9rem; min-width: 2.9rem; padding: 0 !important; border-radius: 50% !important; display: grid; place-items: center; flex: none; }
.jb-lock { border: 1px solid rgba(20,35,63,0.18); background: rgba(255,255,255,0.8); color: #5b6785; cursor: pointer; }
.jb-lock.is-on { background: #fff1c2; border-color: #d9b84a; color: #6a4f00; }
.jb-composer--private { background: #fff9e6; border-color: #ecd788; }
.jb-composer__hint { margin: 0 0.25rem; display: flex; align-items: center; gap: 0.3rem; color: #6a4f00; }

/* ============================================================ Schedule (visits) ============================================================ */
.jb-sched { display: grid; gap: 1rem; }
.jb-sched-empty { text-align: center; padding: 1.5rem 1rem; display: grid; gap: 0.4rem; justify-items: center; border-radius: 1.2rem; background: rgba(255,255,255,0.6); border: 1px dashed rgba(20,35,63,0.18); }
.jb-sched-empty h3 { margin: 0; font-size: 1.1rem; }
.jb-sched-empty p { margin: 0; max-width: 28ch; }
.jb-sched-empty__ic { width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center; background: #14233f; color: #fff; }

.vc { list-style: none; display: grid; grid-template-columns: 6.6rem 1fr; gap: 0.2rem 0.9rem; padding: 0.9rem; border-radius: 1.1rem; background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.9); box-shadow: 0 6px 22px rgba(20,35,63,0.07); position: relative; }
.vc::before { content: ''; position: absolute; left: 0; top: 0.9rem; bottom: 0.9rem; width: 4px; border-radius: 0 4px 4px 0; background: #3b6fd8; }
.vc--clash::before { background: #d64545; }
.vc--done::before { background: #2f9e6b; }
.vc--cancelled { opacity: 0.55; }
.vc--cancelled::before { background: #9aa3b8; }
.vc__time { display: grid; align-content: start; gap: 0.1rem; padding-left: 0.4rem; min-width: 0; }
.vc__day { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--text-2, #5b6785); }
.vc__day.is-today { color: #2d5fc4; }
.vc__range { font-weight: 700; font-size: 0.95rem; line-height: 1.25; color: #14233f; }
.vc__body { display: grid; gap: 0.2rem; min-width: 0; align-content: start; }
.vc__job { margin: 0; font-weight: 700; color: #2d5fc4; font-size: 0.9rem; }
.vc__title { margin: 0; font-weight: 650; }
.vc__meta { margin: 0; display: flex; gap: 0.4rem; align-items: flex-start; font-size: 0.88rem; color: var(--text-2, #5b6785); overflow-wrap: anywhere; }
.vc__meta svg { flex: none; margin-top: 0.15rem; }
.vc__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.15rem; }
.vc__tag { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 650; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgba(20,35,63,0.07); color: #44506b; }
.vc__tag--bad { background: #fde4e4; color: #a12626; }
.vc__tag--ok { background: #dff3e8; color: #1d6b45; }
.vc__tags:empty { display: none; }
.vc__acts { grid-column: 1 / -1; display: flex; gap: 0.25rem; justify-content: flex-end; border-top: 1px solid rgba(20,35,63,0.07); margin-top: 0.4rem; padding-top: 0.3rem; }

/* visit sheet */
.vs-times { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.vs-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: -0.2rem; }
.vs-chip { border: 1px solid rgba(20,35,63,0.18); background: rgba(255,255,255,0.8); border-radius: 999px; padding: 0.45rem 0.85rem; font: inherit; font-size: 0.85rem; font-weight: 600; color: #14233f; min-height: 2.5rem; cursor: pointer; }
.vs-chip:active { background: #14233f; color: #fff; }
.vs-repeat { display: grid; gap: 0.5rem; padding: 0.8rem; border-radius: 1rem; background: rgba(20,35,63,0.045); }
.vs-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.vs-day { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(20,35,63,0.2); background: #fff; font: inherit; font-weight: 700; color: #44506b; min-height: 2.5rem; cursor: pointer; }
.vs-day.is-on { background: #14233f; border-color: #14233f; color: #fff; }
.vs-warn { padding: 0.8rem 0.9rem; border-radius: 1rem; background: #fff1ef; border: 1px solid #f1b9b3; color: #7a1f1f; display: grid; gap: 0.35rem; }
.vs-warn ul { margin: 0; padding-left: 1.1rem; }
.vs-warn p { margin: 0; }
.vs-warn__h { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; }

/* calendar screen */
.cal { display: grid; gap: 0.9rem; }
.cal-nav { display: grid; grid-template-columns: 2.75rem 1fr 2.75rem; align-items: center; gap: 0.5rem; }
.cal-nav__b { min-width: 2.75rem; min-height: 2.75rem; padding: 0 !important; border-radius: 50% !important; }
.cal-nav__t { display: grid; justify-items: center; gap: 0.1rem; text-align: center; }
.cal-today { background: none; border: 0; color: #2d5fc4; font: inherit; font-weight: 650; font-size: 0.85rem; min-height: 2rem; cursor: pointer; }
.cal-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.3rem; }
.cal-day { display: grid; justify-items: center; gap: 0.15rem; padding: 0.5rem 0 0.4rem; border-radius: 1rem; border: 1px solid transparent; background: rgba(255,255,255,0.55); font: inherit; color: #14233f; cursor: pointer; min-height: 4.2rem; }
.cal-day__wd { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2, #5b6785); font-weight: 650; }
.cal-day__n { font-size: 1.15rem; font-weight: 700; }
.cal-day.is-today .cal-day__n { color: #2d5fc4; }
.cal-day.is-sel { background: #14233f; color: #fff; box-shadow: 0 8px 20px rgba(20,35,63,0.25); }
.cal-day.is-sel .cal-day__wd { color: rgba(255,255,255,0.7); }
.cal-day.is-sel.is-today .cal-day__n { color: #fff; }
.cal-day__dots { display: flex; gap: 3px; min-height: 6px; }
.cal-day__dots i { width: 6px; height: 6px; border-radius: 50%; background: #3b6fd8; }
.cal-day__dots.is-bad i { background: #e25555; }
.cal-day.is-sel .cal-day__dots i { background: #8fb2ff; }
.cal-day.is-sel .cal-day__dots.is-bad i { background: #ff9a9a; }
.cal-warn { border-radius: 1rem; background: #fff1ef; border: 1px solid #f1b9b3; color: #7a1f1f; padding: 0.2rem 0.9rem; }
.cal-warn summary { display: flex; align-items: center; gap: 0.5rem; min-height: 2.9rem; font-weight: 700; cursor: pointer; list-style: none; }
.cal-warn summary::-webkit-details-marker { display: none; }
.cal-warn ul { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.3rem; }
.cal-warn__go { text-align: left; background: rgba(255,255,255,0.7); border: 0; border-radius: 0.8rem; padding: 0.55rem 0.7rem; font: inherit; font-size: 0.88rem; color: #5a1818; width: 100%; cursor: pointer; }
.cal-h { margin: 0.2rem 0 0; font-size: 1.2rem; letter-spacing: -0.01em; }
.cal-later { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.tdy-visits .jb-list { margin-top: 0.2rem; }

/* ---- homeowner page: next visit ---- */
.cp-visit { display: grid; gap: 0.75rem; }
.cp-visit__next { border-radius: 1.4rem; padding: 1.25rem 1.2rem; color: #fff; background: linear-gradient(150deg, #14233f 0%, #20396a 100%); box-shadow: 0 14px 34px rgba(20,35,63,0.28); display: grid; gap: 0.6rem; }
.cp-visit__eyebrow { margin: 0; display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700; color: #9db8f2; }
.cp-visit__when { margin: 0; font-size: 1.55rem; line-height: 1.15; letter-spacing: -0.02em; }
.cp-visit__times { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.2rem; padding: 0.8rem 0.9rem; border-radius: 1rem; background: rgba(255,255,255,0.1); }
.cp-visit__times > div { display: grid; gap: 0.1rem; min-width: 0; }
.cp-visit__times strong { font-size: 1.35rem; letter-spacing: -0.01em; }
.cp-visit__lab { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #b7c8ee; font-weight: 600; }
.cp-visit__arrow { color: #8fb2ff; flex: none; }
.cp-visit__what { margin: 0.1rem 0 0; font-weight: 650; font-size: 1.02rem; }
.cp-visit__line { margin: 0; display: flex; gap: 0.5rem; align-items: flex-start; color: #d4def5; font-size: 0.95rem; overflow-wrap: anywhere; }
.cp-visit__line svg { flex: none; margin-top: 0.2rem; color: #8fb2ff; }
.cp-visit__more { list-style: none; margin: 0; padding: 0.3rem 0.9rem; border-radius: 1.1rem; background: rgba(255,255,255,0.78); border: 1px solid rgba(255,255,255,0.9); display: grid; }
.cp-visit__more li { display: flex; flex-wrap: wrap; gap: 0.15rem 0.7rem; align-items: baseline; padding: 0.65rem 0; border-bottom: 1px solid rgba(20,35,63,0.07); }
.cp-visit__more li:last-child { border-bottom: 0; }
.cp-visit__d { font-weight: 700; min-width: 5.5rem; }
.cp-visit__t { color: var(--text-2, #5b6785); font-size: 0.9rem; flex-basis: 100%; }

/* jobs list */
.jl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.jl-card { display: grid; gap: 0.45rem; padding: 1rem 1.05rem; text-decoration: none; color: inherit; }
.jl-card:active { transform: scale(0.99); }
.jl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.jl-name { margin: 0; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.jl-pct { font-weight: 700; color: #14233f; flex: none; }
.jl-chips { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.jl-next { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: #2d5fc4; padding-top: 0.35rem; margin-top: 0.1rem; border-top: 1px solid rgba(20,35,63,0.07); }
.jl-next.is-none { color: var(--text-2, #5b6785); font-weight: 500; }
.jl-search { width: 100%; box-sizing: border-box; min-height: 2.9rem; padding: 0 1rem; border-radius: 999px; border: 1px solid rgba(20,35,63,0.14); background: rgba(255,255,255,0.8); font: inherit; margin: 0.2rem 0 0.8rem; }
.jl-search[hidden] { display: none; }

/* ============================================================ Phone-safe sheets ============================================================
   1) the page behind a sheet never scrolls or rubber-bands; only the sheet's own body scrolls (and only up and down)
   2) nothing inside a sheet can be wider than the screen (date/time boxes are the usual culprit on iPhone)
   3) forms in "stacked" sheets show a plain label ABOVE each box instead of a floating label sitting on the border */
html.has-sheet, html.has-sheet body { overflow: hidden !important; overscroll-behavior: none; }
dialog.sheet { overflow: hidden; max-width: 100vw; touch-action: pan-y; }
.sheet__body { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; min-width: 0; }
.sheet__body > *, .sheet__body .field, .sheet__body .inputGroup, .vs-times > * { min-width: 0; max-width: 100%; }
.sheet__body input, .sheet__body select, .sheet__body textarea { max-width: 100%; box-sizing: border-box; font-size: 16px; }   /* 16px stops iOS zooming the page when a box is tapped */
.sheet__body input[type="date"], .sheet__body input[type="time"] { width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; }

dialog.sheet--stacked .field { margin: 0; }
dialog.sheet--stacked .field .inputGroup { display: flex; flex-direction: column; margin: 0; }
dialog.sheet--stacked .inputGroup label,
dialog.sheet--stacked .inputGroup input[type="date"] ~ label,
dialog.sheet--stacked .inputGroup :is(select, textarea) ~ label {
  position: static !important; order: -1; transform: none !important; translate: none !important; margin: 0 0 0.4rem !important; padding: 0 !important; max-width: none !important;
  background: none !important; color: #44506b !important; font-size: 0.86rem !important; font-weight: 650 !important; line-height: 1.2; pointer-events: auto; opacity: 1 !important;
}
dialog.sheet--stacked .inputGroup :is(input, select, textarea) { width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem; border: 1.5px solid rgba(20,35,63,0.2); border-radius: 0.9rem; background: rgba(255,255,255,0.9); color: #14233f; box-shadow: none; }
dialog.sheet--stacked .inputGroup :is(input, select, textarea):focus { border-color: #3b6fd8; outline: 0; box-shadow: 0 0 0 3px rgba(59,111,216,0.18); }
dialog.sheet--stacked .inputGroup textarea { min-height: 5rem; }
dialog.sheet--stacked .field-msg { margin: 0.3rem 0 0; font-size: 0.8rem; }
dialog.sheet--stacked .sheet__body { gap: 0.9rem; padding-bottom: 1rem; }
dialog.sheet--stacked .vs-times { gap: 0.7rem; }
dialog.sheet--stacked .sheet__body > .stack, dialog.sheet--stacked .vs { display: grid; gap: 1.05rem; }
dialog.sheet--stacked .vs-chips { margin-top: -0.35rem; }
dialog.sheet--stacked .vs-repeat { gap: 0.75rem; }
dialog.sheet--stacked .vs-warn { margin-top: 0.2rem; }

/* job menu */
.jb-menu { display: grid; gap: 0.4rem; }
.jb-menu__row { display: flex; align-items: center; gap: 0.8rem; width: 100%; min-height: 3.25rem; padding: 0 1rem; border-radius: 1rem; border: 1px solid rgba(20,35,63,0.1); background: rgba(255,255,255,0.8); color: #14233f; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.jb-menu__row:active { background: rgba(20,35,63,0.07); }
.jb-menu__row--danger { color: #b02a2a; border-color: rgba(176,42,42,0.25); margin-top: 0.4rem; }

/* ---- ways to pay: contractor settings ---- */
.pm { display: grid; gap: 0.5rem; padding: 0.6rem 0; border-top: 1px solid rgba(20,35,63,0.08); }
.pm:first-of-type { border-top: 0; }
.pm__hint { margin: -0.2rem 0 0 2.2rem; }
.pm__fields { display: grid; gap: 0.75rem; margin: 0.25rem 0 0.4rem 0.2rem; padding: 0.85rem; border-radius: 1rem; background: rgba(20,35,63,0.045); }
.pm__fields[hidden] { display: none; }

/* ---- ways to pay: homeowner invoice ---- */
.wtp { display: grid; gap: 0.6rem; margin-top: 0.9rem; text-align: left; }
.wtp__h { margin: 0; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--text-2, #5b6785); }
.wtp__copy { border: 1px solid rgba(20,35,63,0.18); background: #fff; border-radius: 999px; padding: 0.35rem 0.8rem; font: inherit; font-size: 0.8rem; font-weight: 650; color: #2d5fc4; min-height: 2.25rem; cursor: pointer; }

/* ---- ways to pay (simple version): one soft card, plain rows ---- */
.wtp__list { border-radius: 1rem; background: rgba(255,255,255,0.7); border: 1px solid rgba(20,35,63,0.08); padding: 0 0.95rem; }
.wtp__item { display: grid; grid-template-columns: 4.2rem 1fr; gap: 0.6rem; align-items: start; padding: 0.8rem 0; border-top: 1px solid rgba(20,35,63,0.08); }
.wtp__item:first-child { border-top: 0; }
.wtp__name { font-weight: 700; font-size: 0.9rem; color: #14233f; padding-top: 0.15rem; }
.wtp__body { display: grid; gap: 0.5rem; min-width: 0; }
.wtp__line { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.wtp__val { display: grid; font-weight: 600; color: #14233f; overflow-wrap: anywhere; min-width: 0; }
.wtp__val small { font-weight: 500; font-size: 0.72rem; color: var(--text-2, #5b6785); }

/* ---- invoice style picker (Settings -> Invoices) ---- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--space-3); }
.tpl { display: grid; gap: 0.25rem; text-align: left; padding: 0.6rem; border-radius: 16px; border: 2px solid rgba(16,32,46,.1); background: rgba(255,255,255,.7); font: inherit; color: inherit; cursor: pointer; min-height: 44px; }
.tpl.is-on { border-color: var(--accent-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-fill) 22%, transparent); }
.tpl:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
.tpl__name { font-weight: 650; }
.tpl__blurb { font-size: var(--fs-xs); color: var(--text-2); }
.tpl__art { position: relative; display: block; height: 5.2rem; border-radius: 10px; background: #fff; border: 1px solid rgba(16,32,46,.1); overflow: hidden; }
.tpl__art i, .tpl__art b, .tpl__art u, .tpl__art s { position: absolute; display: block; text-decoration: none; }
.tpl__art i { left: 10%; top: 14%; width: 34%; height: 7%; background: #9aa5b4; border-radius: 2px; }
.tpl__art b { left: 10%; top: 34%; width: 56%; height: 16%; background: #14233f; border-radius: 3px; }
.tpl__art u { left: 10%; top: 62%; width: 80%; height: 14%; background: var(--accent-fill); border-radius: 6px; }
.tpl__art s { left: 10%; top: 84%; width: 60%; height: 5%; background: #d5dbe3; border-radius: 2px; }
.tpl--classic .tpl__art { background: #fffdf8; border-radius: 4px; }
.tpl--classic .tpl__art i { height: 3px; width: 80%; top: 24%; background: #14233f; }
.tpl--classic .tpl__art b { background: #5b6785; height: 10%; width: 40%; }
.tpl--classic .tpl__art u { border-radius: 2px; }
.tpl--bold .tpl__art i { left: 0; top: 0; width: 100%; height: 48%; background: var(--accent-fill); border-radius: 0; }
.tpl--bold .tpl__art b { background: #fff; top: 22%; }
.tpl--bold .tpl__art u { background: #14233f; }
.tpl--minimal .tpl__art { border-radius: 0; border-color: transparent; border-top: 2px solid #14233f; background: transparent; }
.tpl--minimal .tpl__art b { background: #14233f; height: 8%; }
.tpl--minimal .tpl__art u { border-radius: 0; background: #14233f; }
.ivp__from { margin: 0; font-weight: 600; }
.ivp__card--classic { border-radius: 8px; background: #fffdf8; font-family: Georgia, 'Times New Roman', serif; }
.ivp__card--classic .ivp__from { padding-bottom: var(--space-2); border-bottom: 2px solid #14233f; font-size: 1.15rem; }
.ivp__card--classic .ivp__btn { border-radius: 6px; }
.ivp__card--bold { padding: 0 0 var(--space-5); overflow: hidden; }
.ivp__card--bold > * { margin-inline: var(--space-5); }
.ivp__card--bold .ivp__from, .ivp__card--bold .ivp__top, .ivp__card--bold .ivp__amt { margin-inline: 0; padding-inline: var(--space-5); background: var(--accent-fill); color: var(--on-accent); }
.ivp__card--bold .ivp__from { padding-top: var(--space-5); }
.ivp__card--bold .ivp__amt { padding-bottom: var(--space-4); }
.ivp__card--bold .ivp__btn { background: #14233f; color: #fff; }
.ivp__card--minimal { border-radius: 0; background: transparent; box-shadow: none; border: 0; border-top: 2px solid #14233f; padding-inline: 0; }
.ivp__card--minimal .ivp__from { text-transform: uppercase; letter-spacing: .14em; font-size: var(--fs-xs); }
.ivp__card--minimal .ivp__amt { font-weight: 300; }
.ivp__card--minimal .ivp__btn { border-radius: 0; background: #14233f; color: #fff; }

/* ---- live invoice preview (real client card, not clickable) ---- */
.inv-live-wrap { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.inv-live { max-width: 26rem; pointer-events: none; user-select: none; border-radius: 24px; padding: var(--space-3); background: color-mix(in srgb, var(--accent-fill) 7%, #eef1f6); }
.inv-live .payhero { margin: 0; }
.inv-live .payhero__btn::after { animation: none; }

/* ---- invoice editor: the invoice itself, filled in place (template first) ---- */
.look-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--space-3); }
.look-pill { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(16,32,46,.15); background: rgba(255,255,255,.75); font: inherit; color: inherit; cursor: pointer; }
.look-pill.is-on { background: var(--accent-fill); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.look-pill:focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 2px; }
.doc-wrap { max-width: 40rem; }
.doc-edit { max-width: 40rem; padding-bottom: var(--space-6); }
.doc-edit__body { display: grid; gap: var(--space-5); margin-top: var(--space-3); padding-top: var(--space-4); border-top: 1px solid rgba(16,32,46,.1); text-align: left; font-family: var(--font-body, system-ui, sans-serif); }
.doc-edit__row { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.doc-edit__sec { display: grid; gap: var(--space-2); }
.doc-edit__h { margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); font-weight: 700; }
.doc-edit .mny-line { padding: var(--space-3); border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid rgba(16,32,46,.08); }
.choose { display: grid; gap: var(--space-3); }
.choose__h { margin: 0; font-size: var(--fs-xl, 1.4rem); }
.choose__row { display: flex; gap: var(--space-4); overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--space-2) 2px var(--space-4); -webkit-overflow-scrolling: touch; }
.choose__item { flex: 0 0 min(86vw, 23rem); scroll-snap-align: center; display: grid; gap: var(--space-2); align-content: start; }
.choose__card { pointer-events: none; max-height: 21rem; overflow: hidden; border-radius: 24px; padding: var(--space-3); background: color-mix(in srgb, var(--accent-fill) 7%, #eef1f6); -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.choose__card .payhero { margin: 0; }
.choose__card .payhero__btn::after { animation: none; }
.choose__btn { width: 100%; }
