/* Layout: one narrow column, big type and big buttons, one task per screen (job -> check -> PDF). */
:root {
  --bg: #f4f6fb; --card: #ffffff; --fg: #0e1726; --muted: #566175; --line: #e2e7ef; --field-line: #7d8aa0;
  --accent: #1d4ed8; --accent-fg: #ffffff; --accent-ink: #1d4ed8; --accent-soft: #e9effe; --field: #f4f6fb;
  --warn-bg: #fef3c7; --warn-fg: #6b4300; --err-bg: #fdecec; --err-fg: #b42318; --ok: #15803d; --ok-bg: #dcfce7; --ok-fg: #14532d;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 20px rgba(16, 24, 40, .06); --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
  --hero: linear-gradient(135deg, #0b1f44 0%, #173a8a 55%, #1d4ed8 100%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a111e; --card: #121b2d; --fg: #eef2f8; --muted: #a5b0c4; --line: #243049; --field-line: #63728e;
    --accent: #7aa7ff; --accent-fg: #071226; --accent-ink: #a9c4ff; --accent-soft: #1a2b4f; --field: #0a111e;
    --warn-bg: #3a2e0b; --warn-fg: #fcd34d; --err-bg: #3b1414; --err-fg: #fca5a5; --ok: #4ade80; --ok-bg: #123524; --ok-fg: #86efac;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a111e; --card: #121b2d; --fg: #eef2f8; --muted: #a5b0c4; --line: #243049; --field-line: #63728e;
  --accent: #7aa7ff; --accent-fg: #071226; --accent-ink: #a9c4ff; --accent-soft: #1a2b4f; --field: #0a111e;
  --warn-bg: #3a2e0b; --warn-fg: #fcd34d; --err-bg: #3b1414; --err-fg: #fca5a5; --ok: #4ade80; --ok-bg: #123524; --ok-fg: #86efac;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); color-scheme: dark;
}
* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--fg); font: 18px/1.5 var(--font);
  padding-block: 0 32px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 640px; margin: 0 auto; }
@media (min-width: 720px) { .wrap { max-width: 720px; } }
@media (min-width: 960px) { .wrap.wide { max-width: 1040px; } }
/* Review screen. Phone: one column, with Total + button pinned to the bottom. Wide: main column plus a sticky side panel. */
.review { display: flex; flex-direction: column; }
.rv-main, .rv-side { display: contents; }
.rv-bar { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: flex; align-items: center; gap: 14px; padding: 10px 12px; margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgba(10, 20, 35, .18); }
.rv-bar .btn { margin-top: 0; flex: 1 1 auto; width: auto; }
.rv-total { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.rv-total span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rv-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
body.typing .rv-bar { position: static; box-shadow: none; }
@media (min-width: 960px) {
  .review { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 24px; align-items: start; }
  .rv-main { display: block; }
  .rv-side { display: block; position: sticky; top: 16px; }
  .rv-side .rv-bar { position: static; display: block; padding: 0; background: none; border: 0; box-shadow: none; margin-top: 0; }
  .rv-side .rv-total { display: none; }
  .rv-side .rv-bar .btn { width: 100%; margin-top: 12px; }
  .rv-side .totals { margin-bottom: 0; }
}
details.card > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.grid2 label { white-space: nowrap; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-weight: 800; font-size: 22px; }
header.top h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.gear { background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); font: inherit; font-weight: 600; font-size: 16px; min-height: 48px; padding: 0 16px; cursor: pointer; }
.steps { display: flex; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.steps li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 600; padding: 8px 4px; border-radius: 10px; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; background: var(--line); color: var(--fg); }
.steps li.on { color: var(--fg); border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.steps li.on b { background: var(--accent); color: var(--accent-fg); }
.steps li.past b { background: var(--ok); color: var(--accent-fg); }
.note { padding: 12px 14px 12px 44px; border-radius: 12px; margin: 0 0 14px; font-size: 17px; position: relative; }
.note::before { position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.note.err { background: var(--err-bg); color: var(--err-fg); }
.note.err::before { content: "!"; background: var(--err-fg); color: var(--err-bg); }
.note.info { background: var(--warn-bg); color: var(--warn-fg); }
.note.info::before { content: "i"; background: var(--warn-fg); color: var(--warn-bg); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(20, 30, 45, .06); }
h2 { font-size: 22px; margin: 0 0 8px; line-height: 1.25; }
h3 { font-size: 15px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--fg); background: var(--field);
  border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 54px;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 58px; margin-top: 12px;
  font: inherit; font-weight: 700; font-size: 19px; border-radius: 14px; cursor: pointer;
  background: var(--accent); color: var(--accent-fg); border: 2px solid var(--accent);
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.busy::before { content: ""; width: 20px; height: 20px; margin-right: 10px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::before { animation: none; } .btn { transition: none; } }
.btn.alt { background: transparent; color: var(--accent); }
.btn.small { display: inline-flex; width: auto; min-height: 48px; padding: 0 16px; font-size: 17px; margin-top: 8px; }
.btn:disabled { opacity: .55; cursor: progress; }
.hint { color: var(--muted); font-size: 16px; margin: 6px 0 0; }
.req::after { content: " *"; color: var(--err-fg); }
.legend { color: var(--muted); font-size: 15px; margin: 10px 0 0; }
.grid3 .ferr { font-size: 14px; padding: 6px 8px; }
.empty { color: var(--muted); margin: 0; padding: 4px 0 6px; }
.ok-badge { width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: var(--accent-fg); display: grid; place-items: center; font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.amt, .totals, .big-total { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; }
.item { border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item > summary { list-style: none; display: grid; grid-template-columns: 1fr auto 14px; grid-template-areas: "nm cost chev" "meta cost chev"; gap: 0 12px; align-items: center; min-height: 64px; padding: 8px 0; cursor: pointer; }
.item > summary::-webkit-details-marker { display: none; }
.item .nm { grid-area: nm; font-weight: 600; overflow-wrap: anywhere; }
.item .meta { grid-area: meta; color: var(--muted); font-size: 15px; }
.item .meta .tag { margin: 0 0 0 8px; font-size: 13px; }
.item .cost { grid-area: cost; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.item .chev { grid-area: chev; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; justify-self: center; }
.item[open] .chev { transform: rotate(225deg); }
.item .body { padding: 0 0 14px; }
.btn.hot { background: var(--accent); color: var(--accent-fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { min-height: 46px; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 0 16px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.chip:active { background: var(--field); }
input[type="checkbox"] { width: 26px; height: 26px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--accent); }
.checkrow { display: flex; align-items: center; gap: 12px; font-weight: 600; margin-top: 18px; }
.ferr { color: var(--err-fg); background: var(--err-bg); font-weight: 700; font-size: 16px; margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err-fg); }
.line { padding: 14px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; padding-top: 0; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 4px; }
.grid3 > * { min-width: 0; }
.grid3 label { margin-top: 8px; font-size: 15px; }
.amt { font-weight: 800; text-align: right; align-self: end; padding-bottom: 14px; }
.del { background: none; border: 0; color: var(--err-fg); text-decoration: underline; font: inherit; font-size: 16px; min-height: 44px; padding: 0; cursor: pointer; }
.tag { display: inline-block; font-size: 14px; background: var(--warn-bg); color: var(--warn-fg); border-radius: 6px; padding: 1px 8px; margin: 6px 0 0; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals .grand { font-size: 24px; font-weight: 800; border-top: 3px solid var(--accent); margin-top: 8px; padding-top: 10px; }
.logo-preview { max-width: 220px; max-height: 90px; display: block; margin: 8px 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.big-total { font-size: 40px; font-weight: 800; margin: 0; }
pre.qt { white-space: pre-wrap; font: 14px/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--field); border-radius: 10px; padding: 12px; max-height: 300px; overflow: auto; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row .btn.small { flex: 1 1 160px; }
/* standalone-page basics (the Claude artifact frame used to supply these) */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a.btn { text-decoration: none; }
.checkrow.small { font-size: 16px; margin-top: 12px; }
/* administrator page */
.admin-wrap { max-width: 760px; margin: 0 auto; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); color: var(--muted); }
.badge.ok { background: var(--ok); color: var(--accent-fg); border-color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-bg); }
.badge.off { background: var(--err-bg); color: var(--err-fg); border-color: var(--err-bg); }
.u-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.u-email { font-weight: 700; overflow-wrap: anywhere; }
.u-meta { color: var(--muted); font-size: 15px; margin: 6px 0 0; }
.u-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.u-actions .btn { flex: 1 1 140px; margin-top: 0; min-height: 48px; font-size: 16px; }
.btn.danger { background: var(--err-fg); border-color: var(--err-fg); color: var(--err-bg); }
.linkbox { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; word-break: break-all; background: var(--field); border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; }
ul.feed { list-style: none; margin: 0; padding: 0; font-size: 15px; }
ul.feed li { padding: 6px 0; border-top: 1px solid var(--line); color: var(--muted); overflow-wrap: anywhere; }
ul.feed li:first-child { border-top: 0; }
a.gear { display: inline-flex; align-items: center; text-decoration: none; }
.linklike { display: block; width: 100%; margin-top: 8px; min-height: 48px; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; text-align: center; }

/* home, saved quotes, customers */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; min-height: 92px; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; font: inherit; cursor: pointer; box-shadow: 0 1px 2px rgba(20, 30, 45, .06); }
.tile:last-child { grid-column: 1 / -1; min-height: 72px; }
.tile strong { font-size: 19px; }
.tile span { color: var(--muted); font-size: 15px; }
.owed { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--accent); }
.rowcard { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px; min-height: 68px; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; font: inherit; cursor: pointer; }
.rc-main, .rc-side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc-main strong { overflow-wrap: anywhere; }
.rc-side { align-items: flex-end; flex: none; }
.rc-sub { color: var(--muted); font-size: 14px; }
.chip.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.totals .dep { color: var(--muted); font-size: 16px; }
input[type="search"] { -webkit-appearance: none; appearance: none; }

/* ---- polish: icon buttons, undo message, first-screen hero, install card ---- */
.withicon { display: flex; gap: 8px; align-items: center; }
.withicon > input, .withicon > textarea { flex: 1 1 auto; min-width: 0; }
.withicon.top { align-items: flex-start; }
.iconbtn { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: transparent; color: var(--muted); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.iconbtn:hover, .iconbtn:focus-visible { color: var(--err-fg); border-color: var(--err-fg); background: var(--err-bg); }
.iconbtn:active { transform: translateY(1px); }
.calcline { display: flex; align-items: center; gap: 12px; }
.calcline input { flex: none; width: 120px; }
.calc { color: var(--muted); font-variant-numeric: tabular-nums; }
.line.withicon { border-top: 0; padding: 4px 0 8px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 16px; justify-content: space-between; width: min(560px, calc(100vw - 32px)); padding: 12px 12px 12px 18px; border-radius: 14px; background: var(--fg); color: var(--bg); box-shadow: 0 8px 28px rgba(10, 20, 35, .35); font-weight: 600; }
.toast[hidden] { display: none; }
.toast-btn { flex: none; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 800; cursor: pointer; }

.hero { background: linear-gradient(140deg, #1F3A5F 0%, #2c5a93 100%); color: #fff; border-radius: 20px; padding: 24px 22px 22px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(31, 58, 95, .28); }
.hero-mark { width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, .16); display: grid; place-items: center; font-weight: 800; font-size: 26px; }
.hero-title { margin: 14px 0 8px; font-size: 27px; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.hero-sub { margin: 0 0 16px; opacity: .93; }
.hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hero-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.hero-list svg { flex: none; margin-top: 2px; color: #8fd3a8; }

.install h3 { margin-bottom: 6px; }
.install p { margin: 0 0 6px; }
.steps-list { margin: 8px 0 4px; padding-left: 22px; }
.steps-list li { margin: 6px 0; }

/* ---- the customer's online quote page (/q) */
.q-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.q-row:first-of-type { border-top: 0; }
.q-d { overflow-wrap: anywhere; font-weight: 600; }
.q-d small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }
.q-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-line { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-variant-numeric: tabular-nums; }
.q-line.strong { font-weight: 800; font-size: 20px; border-top: 2px solid var(--line); margin-top: 4px; padding-top: 10px; }
.q-pre { white-space: pre-line; margin: 0; overflow-wrap: anywhere; }
.q-list { margin: 6px 0 0; padding-left: 22px; } .q-list li { margin: 6px 0; overflow-wrap: anywhere; }
.q-foot { text-align: center; margin-top: 18px; }
.q-answer .checkrow { align-items: flex-start; }
.ok-badge.off { background: var(--muted); }
@media print { .q-answer, .top, .q-foot, .btn, .quiet, .legal-links, #note { display: none !important; } .card { box-shadow: none; break-inside: avoid; } }

/* ---- privacy / terms / accessibility pages, and the links to them */
.legal h1 { font-size: 28px; margin: 0 0 4px; }
.legal article h2 { font-size: 20px; margin: 26px 0 8px; }
.legal article p, .legal article li { line-height: 1.6; }
.legal article ul { padding-left: 22px; }
.legal a { color: var(--accent); }
.brand-name { font-size: 20px; font-weight: 800; margin: 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 16px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 8px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.legal-table th { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 640px) {            /* tables become stacked cards on a phone, so nothing scrolls sideways */
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr { border-top: 2px solid var(--line); padding: 6px 0; }
  .legal-table td { border: 0; padding: 4px 0; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
}
mark.unset { background: var(--err-bg); color: var(--err-fg); font-weight: 700; padding: 0 4px; border-radius: 4px; }
.legal-links { text-align: center; margin: 22px 0 8px; font-size: 16px; color: var(--muted); }
.legal-links a { color: var(--muted); display: inline-block; padding: 12px 6px; min-height: 48px; }


/* =====================================================================================================
   Design layer (2026 refresh). Same class names as before; this section sets the look.
   Principles: calm surfaces, one strong blue for actions, soft tinted buttons for everything secondary,
   big readable type, 48px+ touch targets, and nothing that moves unless it helps.
   ===================================================================================================== */
body { font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; padding-bottom: 28px; }
body.has-nav { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
a { color: var(--accent-ink); text-underline-offset: 3px; }
::placeholder { color: var(--muted); opacity: .75; }
::selection { background: var(--accent-soft); }

/* header */
header.top { border-bottom: 0; padding: 16px 2px 10px; margin-bottom: 10px; }
.mark { width: 40px; height: 40px; border-radius: 12px; background: var(--hero); color: #fff; font-size: 22px; box-shadow: 0 4px 12px rgba(23, 58, 138, .35); }
header.top h1, .brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.gear { background: var(--accent-soft); border: 0; color: var(--accent-ink); border-radius: 999px; font-weight: 700; padding: 0 18px; }

/* surfaces and type */
.card { border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; box-shadow: var(--shadow); }
h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 10px; }
h3 { font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.hint { font-size: 16px; line-height: 1.45; }
label { font-size: 16px; }
#app > * { animation: rise .2s ease-out both; }
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #app > * { animation: none; } .tab-ic, .chev { transition: none !important; } }

/* fields */
input, textarea, select { background: var(--card); border: 1.5px solid var(--field-line); border-radius: 14px; min-height: 56px; transition: border-color .12s; }
input:hover, textarea:hover, select:hover { border-color: var(--accent); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type="checkbox"] { border-radius: 6px; }

/* buttons: one filled blue per screen, soft tints for the rest */
.btn { min-height: 58px; border-radius: 16px; border: 0; font-size: 18px; letter-spacing: -.005em; gap: 8px; box-shadow: 0 6px 16px rgba(29, 78, 216, .22); }
.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn.alt { background: var(--accent-soft); color: var(--accent-ink); box-shadow: none; }
.btn.small { min-height: 48px; }
.btn.danger { background: var(--err-fg); color: var(--err-bg); box-shadow: none; }
.linklike { color: var(--accent-ink); }
.chip { background: var(--card); border: 1.5px solid var(--field-line); min-height: 46px; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.iconbtn { border: 0; background: var(--field); border-radius: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { box-shadow: none; } }

/* status pills */
.badge { font-size: 13px; padding: 3px 10px; border: 0; background: var(--field); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge.off { background: var(--err-bg); color: var(--err-fg); }
.note { border-radius: 16px; }
.ok-badge { width: 52px; height: 52px; font-size: 28px; box-shadow: 0 6px 16px rgba(21, 128, 61, .3); }

/* progress: three slim bars with a label under each */
.steps { gap: 8px; margin: 4px 0 18px; }
.steps li { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 12px 0 0; background: none; border: 0; border-radius: 0; border-top: 4px solid var(--line); font-size: 15px; }
.steps li.on { border-color: var(--accent); box-shadow: none; color: var(--fg); }
.steps li.past { border-color: var(--ok); }
.steps b { width: 24px; height: 24px; }

/* the bar along the bottom */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; max-width: 600px; margin: 0 auto;
  padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(16, 24, 40, .06); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 4px 0; background: none; border: 0; border-radius: 14px;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background-color .15s; }
.tab-lb { white-space: nowrap; }
.tab[aria-current="page"] { color: var(--accent-ink); }
.tab[aria-current="page"] .tab-ic { background: var(--accent-soft); }
.tab-new .tab-ic { background: var(--accent); color: var(--accent-fg); box-shadow: 0 4px 12px rgba(29, 78, 216, .3); }
.tab-new[aria-current="page"] .tab-ic { background: var(--accent); }
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
@media (min-width: 720px) { .tabbar { bottom: 16px; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 6px 10px; max-width: 520px; } }
body.has-nav .rv-bar { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
body.has-nav .toast { bottom: calc(168px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 960px) { body.has-nav .toast { bottom: 104px; } }

/* home */
.home-hero { background: var(--hero); color: #fff; border-radius: 24px; padding: 22px 20px 18px; margin-bottom: 14px; box-shadow: 0 14px 34px rgba(23, 58, 138, .32); }
.hh-hello { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #d6e2ff; }
.hh-big { margin: 0 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.home-hero .owed { margin: 0 0 16px; color: #fff; font-size: 36px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-hero .owed small { display: block; margin-top: 6px; font-size: 16px; font-weight: 600; letter-spacing: 0; color: #d6e2ff; }
.btn.hero-btn { background: #fff; color: #0b1f44; margin-top: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.home-hero .hint { color: #d6e2ff; margin-top: 12px; text-align: center; min-height: 1em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 6px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 84px; padding: 14px; text-align: left; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); font: inherit; cursor: pointer; }
.stat strong { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat:active, .rowcard:active { transform: translateY(1px); }
.sec { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 8px; }
.sec h3 { margin: 0; }
.seeall { display: inline-flex; align-items: center; gap: 2px; min-height: 48px; padding: 0 4px 0 12px; background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }

/* lists of quotes and customers */
.rowcard { gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; min-height: 72px; box-shadow: var(--shadow); justify-content: flex-start; }
.rowcard .rc-main { flex: 1 1 auto; }
.rc-av { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
.av-0 { background: #dbe6ff; color: #1e3a8a; } .av-1 { background: #dcfce7; color: #14532d; } .av-2 { background: #fef3c7; color: #6b4300; }
.av-3 { background: #fce7f3; color: #9d174d; } .av-4 { background: #ede9fe; color: #4c1d95; } .av-5 { background: #ccfbf1; color: #115e59; }
.rc-side strong { font-variant-numeric: tabular-nums; }
.cust-top { display: flex; gap: 12px; align-items: flex-start; }
.cust-top .u-meta { margin-top: 2px; }

/* first screen, sign-up and offers */
.hero { background: var(--hero); border-radius: 24px; box-shadow: 0 14px 34px rgba(23, 58, 138, .32); }
.hero-sub { color: #e3ebff; opacity: 1; }
.hero-list svg { color: #86efac; }
.card.offer { border: 2px solid var(--ok); }
.card.offer .badge { margin-bottom: 10px; }

/* quote review, totals, sending */
.totals .grand { border-top: 2px solid var(--fg); }
.big-total { font-size: 44px; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0; }
.rv-bar { border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.item > summary { min-height: 66px; }
.tag { border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.legal-links { margin-top: 26px; }
.q-row { border-color: var(--line); }
.rc-ref { display: none; }
@media (min-width: 520px) { .rc-ref { display: inline; } }
.quiet { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 8px; background: none; border: 0; border-radius: 14px; color: var(--muted); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.quiet.danger { color: var(--err-fg); }
.quiet:hover { background: var(--field); }
.u-actions .quiet { flex: 1 1 100%; margin-top: 0; }
.hero-mark { display: none; }
.hero-title { margin-top: 2px; }
.u-top { flex-wrap: wrap; }
.u-top h2 { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 360px) { .tab { font-size: 11.5px; letter-spacing: -.01em; } .tab-ic { width: 46px; } .stat { padding: 12px 10px; } .stat span { font-size: 13px; } }

/* ---- the document on screen, and the Look / Send switch */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--accent-soft); border-radius: 16px; }
.seg button { min-height: 52px; border: 0; border-radius: 12px; background: none; color: var(--accent-ink); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.pp-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 0 0 8px; }
.pp-tools .chip { min-width: 52px; padding: 0 14px; }
.paper { --pp: 1; background: #fff; color: #0e1726; border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 20px; font-size: calc(16px * var(--pp)); line-height: 1.45; box-shadow: var(--shadow); border-top: 4px solid #1d4ed8; overflow-wrap: anywhere; }
.paper .pp-muted { color: #566175; font-size: .9em; }
.pp-head { display: grid; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #dfe5ee; }
.pp-from, .pp-title { display: flex; flex-direction: column; gap: 1px; }
.pp-from strong { font-size: 1.2em; color: #0f2754; }
.pp-logo { max-width: 150px; max-height: 60px; margin-bottom: 6px; object-fit: contain; align-self: flex-start; }
.pp-title strong { font-size: 1.5em; letter-spacing: .12em; color: #0f2754; margin-bottom: 2px; }
.pp-who { display: grid; gap: 12px; padding: 14px 0 4px; }
.pp-who > div:first-child { display: flex; flex-direction: column; }
.pp-cap { display: block; font-size: .72em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #566175; margin-bottom: 2px; }
.pp-total, .pp-paid { display: flex; flex-direction: column; gap: 2px; background: #f0f4fa; border-radius: 12px; padding: 12px 14px; }
.pp-total strong, .pp-paid strong { font-size: 1.9em; line-height: 1.1; color: #0f2754; font-variant-numeric: tabular-nums; }
.pp-paid { margin: 14px 0 6px; }
.pp-badge { align-self: flex-start; margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: #dcfce7; color: #14532d; font-weight: 700; font-size: .9em; }
.pp-badge.warn { background: #fef3c7; color: #6b4300; }
.pp-sec { margin-top: 18px; }
.pp-sec h4 { margin: 0 0 6px; font-size: .75em; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #0f2754; }
.pp-text { margin: 0; white-space: pre-line; }
.pp-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #e6ebf3; }
.pp-d { font-weight: 600; } .pp-d small { display: block; font-weight: 400; color: #566175; font-size: .88em; }
.pp-amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pp-sum { font-weight: 800; border-top: 2px solid #cfd8e6; }
.pp-sums { margin-top: 14px; }
.pp-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: #566175; font-variant-numeric: tabular-nums; }
.pp-grand { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: #0f2754; color: #fff; font-size: 1.15em; font-weight: 800; }
.pp-list { margin: 6px 0 0; padding-left: 22px; } .pp-list li { margin: 5px 0; }
@media (min-width: 560px) { .pp-head, .pp-who { grid-template-columns: 1fr auto; } .pp-title { text-align: right; } .pp-total { min-width: 200px; } }
@media (prefers-color-scheme: dark) { .paper { border-color: #2d3a52; } }

/* ---- free trial: make it obvious what is left and how to keep going */
.trial-banner { border: 2px solid var(--accent); }
.trial-banner h3 { color: var(--accent-ink); }
.trial-banner p { margin: 6px 0; }
