/* ============================================================
   WashQuote — app styles
   Premium, clean, mobile-first. Light + dark. Print stylesheet
   for the branded PDF at the bottom.
   ============================================================ */

:root {
  --bg: #eef3f9;
  --bg-grad-1: #f4f8fc;
  --bg-grad-2: #e6eef7;
  --surface: #ffffff;
  --surface-2: #f6f9fc;
  --ink: #0c1a2b;
  --ink-2: #36506b;
  --muted: #5a6b7d;
  --line: #e1e9f1;
  --line-2: #d3deea;
  --accent: #1366ff;
  --accent-press: #0f53d6;
  --accent-2: #17b6c4;
  --accent-soft: #e8f0ff;
  --good: #5b7184;
  --better: #1366ff;
  --best: #0a2540;
  --danger: #d84b4b;
  --ok: #1ba673;
  --shadow-sm: 0 1px 2px rgba(13, 38, 63, .06), 0 1px 3px rgba(13, 38, 63, .08);
  --shadow-md: 0 6px 18px rgba(13, 38, 63, .10);
  --shadow-lg: 0 18px 50px rgba(10, 37, 64, .22);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --bar-h: 96px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a121d;
    --bg-grad-1: #0c1623;
    --bg-grad-2: #08101a;
    --surface: #111d2c;
    --surface-2: #0d1825;
    --ink: #eaf1f8;
    --ink-2: #b6c6d6;
    --muted: #7e90a3;
    --line: #1d2c3d;
    --line-2: #25394e;
    --accent: #4d8bff;
    --accent-press: #6ba0ff;
    --accent-soft: #15263f;
    --good: #8aa0b3;
    --better: #4d8bff;
    --best: #cfe0f2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 8px 22px rgba(0,0,0,.5);
    --shadow-lg: 0 18px 50px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* The [hidden] attribute must always win, even over class rules that set
   an explicit display (e.g. .card-body{display:grid}, .overlay{display:flex}). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
/* No sideways scroll — the app-bar controls (brand + Pro pill + 4 icons) overflowed narrow phones.
   overflow-x: clip (not hidden) so sticky/fixed bars keep working. */
html { overflow-x: clip; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 100% -10%, var(--bg-grad-1), transparent 60%),
    radial-gradient(1000px 500px at -10% 0%, var(--bg-grad-2), transparent 55%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}

/* ---------- App bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 4px 12px rgba(19,102,255,.35);
}
.brand-mark svg { fill: #fff; }
.brand-name { font-weight: 750; letter-spacing: -.02em; font-size: 1.18rem; }
.appbar-actions { display: flex; gap: 4px; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: none; background: transparent; color: var(--ink-2);
  border-radius: 11px; cursor: pointer; font-size: 1rem;
  position: relative;
}
/* Invisible hit-area extender: every icon button (incl. the 30px pill close and
   saved-row actions) gets a >=48x48 effective touch target without moving layout. */
.icon-btn::after, .pro-pill::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: max(100%, 48px); height: max(100%, 48px);
  transform: translate(-50%, -50%); border-radius: inherit;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { display: block; }

/* ---------- Layout ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 14px 16px calc(var(--bar-h) + 28px); }
.lead { color: var(--ink-2); font-size: .98rem; margin: 6px 2px 18px; }
.block { margin: 22px 0; }
.block-title { font-size: 1.05rem; font-weight: 720; letter-spacing: -.01em; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; }
.step-dot {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 800;
}
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.optional { font-weight: 500; font-size: .8rem; }

/* ---------- Quoting-mode switch (Simple / Custom) ---------- */
.mode-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: -6px 0 16px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px;
}
.mode-btn {
  border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: .88rem;
  font-weight: 680; padding: 9px 10px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.mode-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* mode picker sheet: the two big option cards */
.mode-opt {
  display: grid; gap: 4px; width: 100%; text-align: left; font: inherit; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2);
  border-radius: var(--r-md); padding: 15px 16px; transition: border-color .15s, box-shadow .15s, transform .1s;
}
.mode-opt:hover { border-color: var(--accent); }
.mode-opt:active { transform: scale(.99); }
.mode-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode-opt-name { font-weight: 750; font-size: 1rem; }
.mode-opt-sub { font-size: .85rem; color: var(--ink-2); }

/* ---------- Custom estimate (own line items) ---------- */
.custom-list { display: grid; gap: 9px; margin-bottom: 12px; }
.custom-empty { padding: 4px 2px 2px; }
.custom-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.custom-item-text { flex: 1; min-width: 0; }
.custom-item-name { font-weight: 660; font-size: .93rem; overflow-wrap: anywhere; }
.custom-item-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.custom-add-body { padding-top: 14px; }
.custom-lib { margin-top: 14px; }
.lib-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.lib-chip { display: inline-flex; align-items: stretch; max-width: 100%; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); overflow: hidden; }
.lib-add {
  border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 650;
  padding: 7px 4px 7px 12px; cursor: pointer; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lib-add:hover { color: var(--accent); }
.lib-del {
  border: none; background: transparent; color: var(--muted); font: inherit; font-size: .78rem;
  padding: 7px 10px 7px 6px; cursor: pointer;
}
.lib-del:hover { color: var(--danger); }

/* ---------- "Trial ended" notice ---------- */
.trial-over-pill {
  background: color-mix(in srgb, #ff8a00 9%, var(--surface));
  border-color: color-mix(in srgb, #ff8a00 38%, var(--line-2));
}
.trial-over-pill .btn.tiny { flex: 0 0 auto; white-space: nowrap; }

/* ---------- Recommended-price slider (Settings) ---------- */
.slider-field { margin-top: 4px; }
.slider-value { color: var(--accent); font-variant-numeric: tabular-nums; }
.slider-field input[type="range"] { width: 100%; accent-color: var(--accent); margin: 6px 0 2px; }
.slider-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-weight: 650; }
.slider-scale .slider-rec { color: var(--accent); }
.slider-field .btn { justify-self: start; margin-top: 4px; }

/* ---------- Cards / fields ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.collapsible .card-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; background: transparent; border: none; cursor: pointer; color: var(--ink);
  font: inherit;
}
.card-title { font-weight: 680; display: flex; align-items: center; gap: 9px; }
.chev { transition: transform .2s ease; color: var(--muted); }
.collapsible.open .chev { transform: rotate(180deg); }
.card-body { padding: 4px 16px 16px; display: grid; gap: 12px; }

.field { display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 620; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 11px 12px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 44px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Service grid ---------- */
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
@media (min-width: 560px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service {
  position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 13px 13px 12px; cursor: pointer; transition: transform .12s, border-color .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; min-height: 96px;
}
.service:active { transform: scale(.985); }
.service.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md); }
.service-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.service.selected .service-ic { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; }
.service-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.service-hit { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding-right: 22px; }
.service-name { font-weight: 700; font-size: .96rem; letter-spacing: -.01em; line-height: 1.15; }
.service-sub { font-size: .76rem; color: var(--muted); margin-top: -3px; }
.opt-hint { margin-top: 2px; }
.service .check {
  position: absolute; top: 10px; right: 10px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--accent); color: #fff; display: none; place-items: center; font-size: .7rem;
}
.service.selected .check { display: grid; }

/* expanded options inside a selected service */
.service-opts { display: none; flex-direction: column; gap: 8px; margin-top: 4px; }
.service.selected .service-opts { display: flex; }
.opt-row { display: flex; flex-wrap: wrap; gap: 5px; }
.opt-row .opt-label { width: 100%; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2);
  border-radius: 999px; padding: 5px 10px; font-size: .8rem; font-weight: 650; cursor: pointer;
  transition: all .12s;
}
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Segmented ---------- */
.seg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0; flex-wrap: wrap; }
.seg-label { font-size: .9rem; font-weight: 640; color: var(--ink-2); }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented button {
  border: none; background: transparent; color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 640;
  padding: 7px 13px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.segmented button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* ---------- Add-ons ---------- */
.addon-list { display: grid; gap: 9px; }
.addon {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.addon.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.addon input { position: absolute; opacity: 0; pointer-events: none; }
.addon .tick {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center;
  color: #fff; flex: 0 0 auto; transition: all .15s;
}
.addon.on .tick { background: var(--accent); border-color: var(--accent); }
.addon.on .tick svg { opacity: 1; }
.addon .tick svg { width: 13px; height: 13px; opacity: 0; stroke: #fff; stroke-width: 3; fill: none; }
.addon-text { flex: 1; }
.addon-name { font-weight: 660; font-size: .92rem; }
.addon-price { font-weight: 750; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- Extras (collapsible card + Pro menu) ---------- */
.extras-card { margin: 22px 0; }
.card-head .head-right { display: flex; align-items: center; gap: 10px; }
.extras-summary { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.extras-summary.has { color: var(--accent); }
.extras-none { padding: 8px 2px 2px; }
.extras-customize { width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-style: dashed; }
.extras-customize .gear { width: 16px; height: 16px; flex: 0 0 auto; }
.pro-chip {
  font-size: .6rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; color: #2a1d00;
  background: linear-gradient(135deg, #ffb800, #ff8a00);
}
.extras-manage { display: grid; gap: 9px; }
.extras-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.extras-row.on { border-color: var(--accent); }
.extras-row input { position: absolute; opacity: 0; pointer-events: none; }
.extras-row-text { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.extras-row-name { font-weight: 640; font-size: .92rem; }
.extras-row-price { font-weight: 750; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.extras-row.on .switch { background: var(--accent); }
.extras-row.on .switch::after { transform: translateX(18px); }
/* These rows hide the real checkbox/control, so show the focus ring on the
   visible row when its input is keyboard-focused (WCAG 2.4.7). */
.extras-row:focus-within, .addon:focus-within, .maint-card:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Maintenance card ---------- */
.maint-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm); cursor: pointer; position: relative; overflow: hidden;
}
.maint-card.on { border-color: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 16%, transparent), var(--shadow-md); }
.maint-card input { position: absolute; opacity: 0; pointer-events: none; }
.maint-body { display: grid; gap: 5px; flex: 1; }
.maint-title { font-weight: 740; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.maint-sub { font-size: .86rem; color: var(--ink-2); }
.maint-options { margin-top: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; gap: 11px; }
.maint-options .seg-row { margin: 0; }
.maint-options .segmented { flex-wrap: wrap; }
.maint-figure { font-size: .95rem; font-weight: 800; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.badge {
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2);
  padding: 3px 8px; border-radius: 999px;
}
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; flex: 0 0 auto; transition: background .18s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .18s; }
.maint-card.on .switch { background: var(--accent-2); }
.maint-card.on .switch::after { transform: translateX(18px); }

/* ---------- Tiers ---------- */
.tiers-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .tiers-grid { grid-template-columns: repeat(3, 1fr); } }
.tier {
  position: relative; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: 16px 15px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .12s, border-color .15s, box-shadow .15s;
}
.tier:active { transform: scale(.99); }
.tier.rec { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md); }
.tier-top { display: flex; align-items: center; justify-content: space-between; }
.tier-name { font-weight: 760; letter-spacing: -.01em; }
.tier-tag { font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; display: none; }
.tier.rec .tier-tag { display: inline-block; }
.tier-price { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.tier-per { font-size: .76rem; color: var(--muted); }
/* quiet upsell math on Better/Best: "+$40 vs Good" */
.tier-delta { font-size: .78rem; font-weight: 620; color: var(--muted); margin: -1px 0 3px; font-variant-numeric: tabular-nums; }
.tier-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.tier-list li { font-size: .82rem; color: var(--ink-2); display: flex; gap: 7px; align-items: flex-start; }
.tier-list li svg { width: 13px; height: 13px; margin-top: 3px; flex: 0 0 auto; stroke: var(--ok); fill: none; stroke-width: 3; }
/* explicit "tap to recommend" affordance on the not-yet-chosen cards */
.tier-cta {
  display: inline-flex; align-items: center; margin-top: 12px;
  font-size: .74rem; font-weight: 720; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 12px;
  transition: border-color .15s, color .15s;
}
.tier:hover .tier-cta { border-color: var(--accent); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { font: inherit; font-weight: 680; border-radius: 999px; padding: 11px 18px; cursor: pointer; border: 1.5px solid transparent; transition: transform .1s, box-shadow .15s, background .15s, color .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff; box-shadow: 0 6px 16px rgba(19,102,255,.32); }
.btn.primary:hover { box-shadow: 0 8px 22px rgba(19,102,255,.4); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.tiny { padding: 6px 12px; font-size: .8rem; }
.btn.small { padding: 9px 14px; font-size: .88rem; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- Sticky action bar ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -10px 30px rgba(10, 37, 64, .16);
}
.actionbar-price { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.ab-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.ab-amount { font-size: 2.05rem; font-weight: 850; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ab-sub { font-size: .82rem; font-weight: 560; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actionbar-buttons { display: flex; gap: 8px; flex: 0 0 auto; }
/* keep the Good/Best range from clipping on narrow phones */
@media (max-width: 400px) {
  .actionbar { gap: 8px; padding-left: 13px; padding-right: 13px; }
  .actionbar .btn { padding: 10px 13px; font-size: .9rem; }
  .ab-amount { font-size: 1.85rem; }
  .ab-sub { font-size: .78rem; }
}
/* App bar must fit narrow phones — brand + Pro/trial pill + 4 icons was ~450px wide and pushed
   the Settings button off-screen (sideways scroll). Compact it so everything fits <=360px. */
@media (max-width: 460px) {
  .appbar { padding-left: 10px; padding-right: 10px; }
  .brand { gap: 7px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 10px; }
  .brand-name { font-size: 1.02rem; }
  .appbar-actions { gap: 0; min-width: 0; }
  .appbar-actions .icon-btn { width: 32px; height: 32px; }
  .appbar-actions .icon-btn svg { width: 20px; height: 20px; }
  .appbar-actions .pro-pill { padding: 5px 8px; font-size: .7rem; gap: 3px; }
  /* Bottom action bar: keep price + Materials + Quote within the screen. */
  .actionbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .actionbar-buttons { gap: 6px; }
  .actionbar .btn { padding: 9px 12px; font-size: .88rem; }
  /* Card headers: let the right-side summary shrink/ellipsis so it never spills past the card edge. */
  .card-head { min-width: 0; }
  .card-head > :first-child { min-width: 0; }
  .card-head .head-right { min-width: 0; }
  .card-head .head-right [class$="-summary"] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Overlay / sheets / modals ---------- */
body.modal-open { overflow: hidden; }
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(8,18,30,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.overlay[hidden] { display: none; }
.overlay.full { align-items: stretch; background: var(--bg); }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg);
  animation: sheetUp .26s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 600px) { .overlay { align-items: center; } .sheet { border-radius: 22px; } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: 16px 18px; overflow: auto; display: grid; gap: 13px; }
.sheet-foot { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.divider { height: 1px; background: var(--line); margin: 6px 0; }
.sub-h { margin: 0; font-size: .95rem; }
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-preview { width: 54px; height: 54px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); padding: 4px; }

/* saved list */
.saved-list { display: grid; gap: 10px; }
.saved-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.saved-main { flex: 1; min-width: 0; }
.saved-name { font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-meta { font-size: .78rem; color: var(--muted); }
.saved-amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.saved-actions { display: flex; gap: 4px; }
/* saved-quote pipeline (status tracking) */
.saved-pipeline { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 6px; }
/* Text stays high-contrast (--ink-2, passes AA in light & dark); the status hue
   is carried by the tinted background + border, not by the text colour. */
.saved-pipeline .pl { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.saved-pipeline .pl.sent { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); }
.saved-pipeline .pl.won { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line-2)); }
.saved-pipeline .pl.lost { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line-2)); }
.st-chip {
  margin-top: 6px; font: inherit; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; cursor: pointer; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.st-chip.sent { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 38%, var(--line-2)); }
.st-chip.won { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 38%, var(--line-2)); }
.st-chip.lost { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 38%, var(--line-2)); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* materials */
.mat-group { margin-bottom: 14px; }
.mat-group h4 { margin: 0 0 6px; font-size: .92rem; }
.mat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.mat-list li { font-size: .88rem; color: var(--ink-2); padding-left: 18px; position: relative; }
.mat-list li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.mat-warn { font-size: .82rem; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); padding: 10px 12px; border-radius: var(--r-sm); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 20px); transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============================================================
   QUOTE DOCUMENT (preview + print)
   ============================================================ */
.preview-shell { display: flex; flex-direction: column; width: 100%; height: 100%; }
.preview-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top)) 14px 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.preview-toolbar .spacer { flex: 1; }

/* Quiet "add your business name" nudge shown above the preview (screen only) */
.pv-warn { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; padding: 9px 8px 9px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); font-size: .84rem; color: var(--ink-2); }
.pv-warn-text { flex: 1; }
.pv-warn .btn.small { flex: none; white-space: nowrap; }
.pv-warn .icon-btn { flex: none; }
.preview-scroll { flex: 1; overflow: auto; padding: 18px 14px 50px; display: flex; justify-content: center; align-items: flex-start; }

.quote-doc {
  width: 100%; max-width: 760px; background: #fff; color: #11202f; border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 34px 34px 30px; font-size: 14px; line-height: 1.5;
}
.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid #eef2f6; padding-bottom: 18px; }
.q-biz { display: flex; gap: 13px; align-items: flex-start; }
.q-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; }
.q-biz-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; color: #0a2540; }
.q-biz-meta { font-size: .8rem; color: #5b6b7f; margin-top: 2px; }
.q-doc-meta { text-align: right; }
.q-doc-title { font-size: 1.4rem; font-weight: 800; color: #0a2540; letter-spacing: .02em; }
.q-doc-row { font-size: .8rem; color: #5b6b7f; }
.q-doc-row strong { color: #11202f; }

.q-billto { margin: 18px 0 8px; }
.q-section-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #8a99a8; margin-bottom: 4px; }
.q-billto-name { font-weight: 700; font-size: 1rem; }
.q-billto-meta { font-size: .84rem; color: #5b6b7f; }

.q-scope { margin: 18px 0; }
.q-scope table { width: 100%; border-collapse: collapse; }
.q-scope th, .q-scope td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eef2f6; font-size: .88rem; }
.q-scope th { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #8a99a8; }
.q-scope td.num, .q-scope th.num { text-align: right; font-variant-numeric: tabular-nums; }

.q-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 6px; }
.q-tier { border: 1.5px solid #e6ecf2; border-radius: 12px; padding: 14px 13px; }
.q-tier.rec { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.q-tier-name { font-weight: 800; font-size: .95rem; color: #0a2540; display: flex; justify-content: space-between; align-items: center; }
.q-tier-rec { font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--accent); color: #fff; padding: 2px 7px; border-radius: 999px; }
.q-tier-price { font-size: 1.5rem; font-weight: 850; color: #0a2540; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.q-tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.q-tier li { font-size: .76rem; color: #44586c; padding-left: 15px; position: relative; }
.q-tier li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

.q-maint { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #f0fbfc, #eaf3ff); border: 1px solid #d7eef1; }
.q-maint-title { font-weight: 800; color: #0a7d88; font-size: .95rem; }
.q-maint-body { font-size: .84rem; color: #3e5566; margin-top: 3px; }

.q-totals { margin: 16px 0; margin-left: auto; width: 280px; max-width: 100%; }
.q-totals .row { display: flex; justify-content: space-between; font-size: .88rem; padding: 5px 0; color: #44586c; }
.q-totals .row.grand { border-top: 2px solid #eef2f6; margin-top: 5px; padding-top: 10px; font-size: 1.15rem; font-weight: 850; color: #0a2540; }
.q-totals .num { font-variant-numeric: tabular-nums; }

.q-notes { margin: 14px 0; font-size: .85rem; color: #44586c; }
.q-terms { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef2f6; font-size: .76rem; color: #7a8a99; }
.q-sign { display: flex; gap: 30px; margin-top: 26px; }
.q-sign .line { flex: 1; border-top: 1.5px solid #11202f; padding-top: 5px; font-size: .72rem; color: #7a8a99; }
.q-foot { margin-top: 22px; text-align: center; font-size: .72rem; color: #aab6c2; }
/* free-tier attribution line on the printed/shared quote */
.q-madewith { margin-top: 6px; text-align: center; font-size: .66rem; letter-spacing: .04em; color: #b8c2cc; }

@media (max-width: 540px) {
  .quote-doc { padding: 22px 18px; }
  .q-head { flex-direction: column; }
  .q-doc-meta { text-align: left; }
  .q-tiers { grid-template-columns: 1fr; }
  .q-totals { width: 100%; }
}

/* ============================================================
   PRINT — only the quote document, clean Letter/A4
   ============================================================ */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .appbar, .actionbar, .no-print, .toast, #builder, .ad-banner { display: none !important; }
  .overlay { position: static; background: #fff; }
  .overlay[hidden] { display: none !important; }
  .overlay.full { position: static; background: #fff; }
  .preview-scroll { overflow: visible; padding: 0; display: block; }
  .quote-doc { box-shadow: none; border-radius: 0; max-width: 100%; padding: 0; font-size: 11.5px; }
  .q-tiers { grid-template-columns: repeat(3, 1fr); }
  .q-maint { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* keep tier cards, the totals block and the signature lines on one page */
  .q-tier, .q-totals, .q-sign { break-inside: avoid; page-break-inside: avoid; }
  .tier, .service, .btn { box-shadow: none !important; }
}

/* ============================================================
   VISUAL POLISH LAYER
   Tasteful, professional micro-interactions and depth. Built for
   serious business users — subtle, quick, never noisy. Loaded last
   so it refines the base styles. All of it is disabled under
   prefers-reduced-motion (rule at the very bottom).
   ============================================================ */

/* keyboard focus ring */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.service-hit:focus-visible { outline: none; }

/* a hair of inset depth on cards (very subtle) */
.card, .service, .addon, .maint-card, .tier { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.04); }
.brand-mark { box-shadow: 0 5px 16px rgba(19,102,255,.42), inset 0 1px 0 rgba(255,255,255,.45); }

/* appbar: faint accent hairline instead of a flat border */
.appbar { border-bottom: 1px solid transparent; }
.appbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 38%, var(--line)), transparent); }

/* one-time entrance (quick, gentle, staggered) */
@keyframes wq-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
body.wq-ready .wrap > * { animation: wq-rise .42s cubic-bezier(.2,.7,.2,1) both; }
body.wq-ready .wrap > *:nth-child(1) { animation-delay: 0s; }
body.wq-ready .wrap > *:nth-child(2) { animation-delay: .04s; }
body.wq-ready .wrap > *:nth-child(3) { animation-delay: .08s; }
body.wq-ready .wrap > *:nth-child(4) { animation-delay: .12s; }
body.wq-ready .wrap > *:nth-child(5) { animation-delay: .16s; }
body.wq-ready .wrap > *:nth-child(6) { animation-delay: .20s; }
body.wq-ready .wrap > *:nth-child(n+7) { animation-delay: .24s; }

/* service tiles: smoother select, subtle tint, popping check */
.service { transition: transform .16s cubic-bezier(.2,.7,.2,1), border-color .2s ease, box-shadow .25s ease; }
.service:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.service.selected { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.service .check { transform: scale(0) rotate(-12deg); transition: transform .24s cubic-bezier(.34,1.56,.5,1); }
.service.selected .check { transform: scale(1) rotate(0); }
.service-ic { transition: transform .2s ease, background .2s ease, color .2s ease; }
.service.selected .service-ic { transform: translateY(-1px); }
.chip { transition: transform .12s, background .15s, border-color .15s, color .15s; }
.chip.active { box-shadow: 0 2px 8px rgba(19,102,255,.28); }

/* segmented sliding thumb */
.segmented { position: relative; }
.seg-thumb { position: absolute; z-index: 0; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.06);
  transition: left .28s cubic-bezier(.4,1.04,.35,1), width .28s cubic-bezier(.4,1.04,.35,1), top .2s ease, height .2s ease; }
.segmented button { position: relative; z-index: 1; transition: color .2s ease; }
.segmented button.active { background: transparent; box-shadow: none; color: var(--accent); }

/* action bar: top accent + price pulse */
.actionbar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 50%, transparent), transparent); }
@keyframes wq-pulse { 0% { transform: scale(1); } 38% { transform: scale(1.06); } 100% { transform: scale(1); } }
.ab-amount { display: inline-block; transform-origin: left center; transition: color .2s ease; }
.ab-amount.pulse { animation: wq-pulse .3s cubic-bezier(.3,.8,.3,1); }

/* primary button: quick sheen on hover */
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-130%); transition: transform .6s ease; }
.btn.primary:hover::after { transform: translateX(130%); }

/* tier cards: lift on hover, accent strip on the recommended one */
.tier { transition: transform .18s cubic-bezier(.2,.7,.2,1), border-color .2s ease, box-shadow .25s ease; }
.tier:hover { transform: translateY(-2px); }
.tier.rec { overflow: hidden; }
.tier.rec::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* maintenance card: faint glow when enabled */
.maint-card { overflow: hidden; }
.maint-card.on::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%); }

/* QUOTE DOC — quiet, neutral top rule (no app branding on customer documents) */
.quote-doc { position: relative; overflow: hidden; }
.quote-doc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: #0a2540;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.q-tier { position: relative; }
.q-tier.rec { overflow: hidden; }
.q-tier.rec::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.q-doc-title { letter-spacing: .06em; }

/* tabular figures wherever money is shown */
.ab-amount, .tier-price, .q-tier-price, .addon-price, .saved-amount, .q-totals .num, .maint-figure {
  font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }

/* exact-area input inside a service tile — the primary way a job is priced */
.exact-row { align-items: center; }
.exact-input { width: 96px; font: inherit; padding: 7px 9px; border: 1px solid var(--line-2);
  border-radius: 9px; background: var(--surface-2); color: var(--ink); }
.exact-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* the main area field reads bigger and bolder than the quick-pick chips */
.exact-input.primary { width: 128px; padding: 9px 11px; font-size: 1.02rem; font-weight: 650;
  font-variant-numeric: tabular-nums; border-width: 1.5px; }
.unit-label { font-size: .78rem; color: var(--muted); font-weight: 650; }
/* quick-pick is a helper below the area field — de-emphasise its label */
.quick-row .opt-label { font-size: .66rem; opacity: .8; }
.service.has-exact .exact-input.primary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* area field revealed under an area-priced add-on */
.addon-area { display: flex; align-items: center; gap: 8px; margin: -2px 2px 2px; padding-left: 2px; }
.addon-area.hidden { display: none; }
.addon-area .opt-label { font-size: .7rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; }

/* price-list editor */
.price-group { border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px; margin: 10px 0; background: var(--surface); }
.price-grp-title { font-weight: 720; font-size: .96rem; margin-bottom: 9px; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pk-field { display: flex; flex-direction: column; gap: 3px; }
.pk-field.wide { margin-top: 9px; }
.pk-lab { font-size: .72rem; font-weight: 680; color: var(--muted); }
.pk-input { width: 100%; font: inherit; padding: 8px 9px; border: 1px solid var(--line-2);
  border-radius: 9px; background: var(--surface-2); color: var(--ink); }
.pk-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.price-adv { margin-top: 6px; }
.price-adv summary { cursor: pointer; font-weight: 680; padding: 9px 2px; color: var(--accent); }
.price-group-sub { margin: 10px 0; }
.pk-sublab { font-size: .8rem; font-weight: 680; color: var(--ink-2); margin-bottom: 5px; }

/* market-average banner + buttons */
.mkt-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 13px; margin: 8px 0 4px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid var(--line-2); }
.mkt-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto;
  border-radius: 9px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.mkt-ic svg { display: block; }
.mkt-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.mkt-title { font-weight: 720; font-size: .9rem; }
.mkt-date { font-size: .74rem; color: var(--muted); }
.price-grp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.price-grp-head .price-grp-title { margin-bottom: 0; }
.mkt-btn { font: inherit; font-size: .76rem; font-weight: 680; color: var(--accent-press); white-space: nowrap;
  background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; padding: 5px 11px; cursor: pointer; transition: border-color .15s, transform .1s; }
.mkt-btn:hover { border-color: var(--accent); }
.mkt-btn:active { transform: scale(.96); }

/* premium pill: quiet outline, consistent with the segmented controls */
.pro-pill { display: inline-flex; align-items: center; gap: 6px; position: relative;
  font: inherit; font-size: .8rem; font-weight: 720; letter-spacing: .01em; cursor: pointer;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 7px 13px; transition: border-color .15s, color .15s; }
.pro-pill:hover { border-color: var(--accent); color: var(--accent); }
.pro-pill:active { transform: scale(.95); }
.pro-pill svg { flex: 0 0 auto; }
/* subscribed: same quiet shape, accent-tinted */
.pro-pill.is-pro { color: var(--accent); background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
/* quiet countdown pill while the usage trial is running */
.pro-pill.is-trial { color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2);
  font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pro-word { background: linear-gradient(135deg, #ffb800, #ff8a00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-benefits { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 7px; }
.pro-benefits li { font-size: .9rem; color: var(--ink-2); padding-left: 24px; position: relative; }
.pro-benefits li::before { content: "✦"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.plan { position: relative; border: 1.5px solid var(--line-2); border-radius: var(--r-md); padding: 14px 13px; background: var(--surface); text-align: center; }
.plan.single { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); margin: 6px 0 10px; }
.plan-name { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.plan-price { font-size: 1.8rem; font-weight: 850; letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.plan-note { font-size: .76rem; color: var(--muted); }
/* Pro plan picker: monthly vs yearly (two selectable cards) */
.plan-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0 10px; }
.plan-opt { position: relative; display: grid; gap: 3px; text-align: center; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  padding: 15px 12px 12px; cursor: pointer; transition: transform .1s, border-color .15s, box-shadow .15s; }
.plan-opt:hover { border-color: var(--accent); }
.plan-opt:active { transform: scale(.98); }
.plan-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-opt-name { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.plan-opt-price { font-size: 1.12rem; font-weight: 850; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.plan-opt-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--accent-press)); color: #fff;
  font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.plan-opt:not(.is-rec) .plan-opt-badge { display: none; }
/* Dark mode: --accent is lighter, so white-on-gradient drops below AA on the
   small bold badge — pin a darker blue gradient (white ≈ 6:1). */
@media (prefers-color-scheme: dark) {
  .plan-opt-badge { background: linear-gradient(135deg, #2455c4, #16409e); }
}
.pro-note { font-size: .82rem; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; }

/* trial-ended choice sheet: the two option cards */
.choice { border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); padding: 13px 14px; margin: 10px 0; }
.choice.pro { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-name { font-weight: 750; font-size: .95rem; margin-bottom: 7px; }
.choice-name #tePrice { font-variant-numeric: tabular-nums; }
.choice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.choice-list li { font-size: .85rem; color: var(--ink-2); padding-left: 18px; position: relative; }
.choice-list li::before { content: "·"; position: absolute; left: 6px; color: var(--muted); font-weight: 800; }
.choice .muted.small { margin-top: 9px; }

/* Pro promo banner (free tier only) — first-party house promo above the action bar */
.ad-banner { position: fixed; left: 0; right: 0; bottom: var(--bar-h); z-index: 23;
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 9px 14px; border: none; border-top: 1px solid var(--line-2);
  background: var(--surface-2); box-shadow: 0 -4px 16px rgba(10,37,64,.10); }
.ad-body { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.ad-headline { font-size: .9rem; font-weight: 750; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-sub { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-cta { flex: 0 0 auto; font-size: .82rem; font-weight: 750; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-press)); border-radius: 999px; padding: 8px 14px; }
body.has-ads .wrap { padding-bottom: calc(var(--bar-h) + 28px + 60px); }

/* language switcher */
.lang-block { margin-top: 26px; }
.lang-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lang-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .85rem; font-weight: 650;
  color: var(--ink-2); background: var(--surface); border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: 8px 13px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.lang-chip:hover { border-color: var(--accent); }
.lang-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-pick { display: inline-flex; align-items: center; gap: 8px; }
#langModal .lang-row { margin-top: 0; }
#langModal .lang-chip { padding: 10px 14px; }

/* pricing survey */
.survey-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.survey-preview { margin-top: 6px; padding: 11px 13px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-press); font-weight: 750; font-size: .9rem; font-variant-numeric: tabular-nums; }

/* ---------- Pipeline snapshot (builder strip + follow-up nudge) ---------- */
.pipeline-wrap { display: grid; gap: 8px; margin: -6px 0 16px; }
.stats-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: inherit; font-size: .88rem; font-weight: 640; text-align: left; cursor: pointer;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 11px 14px; box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums; transition: border-color .15s, color .15s;
}
.stats-strip:hover { border-color: var(--accent); color: var(--ink); }
.stats-strip .stats-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-strip .chev-r, .setup-step .chev-r {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.nudge-chip {
  justify-self: start; display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: .8rem; font-weight: 680; cursor: pointer;
  color: var(--accent-press); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line-2));
  border-radius: 999px; padding: 7px 13px; transition: border-color .15s;
  font-variant-numeric: tabular-nums;
}
.nudge-chip:hover { border-color: var(--accent); }

/* ---------- First-run: sample pill + setup checklist ---------- */
.sample-pill {
  display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; padding: 5px 6px 5px 14px;
  font-size: .84rem; font-weight: 640; color: var(--ink-2);
  background: color-mix(in srgb, var(--accent-2) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--line-2)); border-radius: 999px;
}
.sample-pill > span { flex: 1; min-width: 0; }
.sample-pill .icon-btn { width: 30px; height: 30px; flex: 0 0 auto; font-size: .85rem; }
.setup-card { margin: 0 0 16px; padding: 6px 8px 8px; }
.setup-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 8px 8px 4px;
}
.setup-step {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font: inherit; font-size: .92rem; font-weight: 640; text-align: left; cursor: pointer;
  color: var(--ink); background: transparent; border: none; border-radius: var(--r-sm);
  padding: 10px 8px; transition: background .15s;
}
.setup-step:hover { background: var(--surface-2); }
.setup-step .step-dot { flex: 0 0 auto; }
.setup-step .setup-step-label { flex: 1; min-width: 0; }
.setup-step.done { cursor: default; color: var(--muted); text-decoration: line-through; }
.setup-step.done .step-dot { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.setup-step.done .chev-r { visibility: hidden; }

/* ---------- Saved modal: search + filter chips + won pulse ---------- */
.saved-tools { display: grid; gap: 10px; }
.saved-search {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.saved-search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); background: var(--surface); }
.saved-pipeline button.pl { font-family: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.saved-pipeline button.pl:hover { border-color: var(--accent); }
.saved-pipeline .pl.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); }
.st-chip.pulse { animation: wq-pulse .35s cubic-bezier(.3,.8,.3,1); }

/* ---------- Quote-status picker sheet ---------- */
.status-options { display: grid; gap: 9px; }
.status-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  font: inherit; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink);
  padding: 13px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1.5px solid var(--line-2);
  transition: border-color .15s, box-shadow .15s;
}
.status-opt.sent { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 32%, var(--line-2)); }
.status-opt.won { background: color-mix(in srgb, var(--ok) 11%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 32%, var(--line-2)); }
.status-opt.lost { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 32%, var(--line-2)); }
.status-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status-opt svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.status-opt.active svg { opacity: 1; }

/* ---------- Reusable confirm sheet ---------- */
.confirm-msg { margin: 0; font-size: .92rem; color: var(--ink-2); }
.btn.danger-solid { background: var(--danger); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(216,75,75,.3); }
.btn.danger-solid:hover { box-shadow: 0 8px 22px rgba(216,75,75,.38); }

/* reduced motion — must stay last; disables every animation/transition above */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
