/* Look for the dashboard, the call page and the quote page.
   Neutral base colours, with the business's own colours (picked from its logo by brand.js) on top.
   Light by default; dark when the device prefers it or the theme button picks it (theme.js). */

@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('/fonts/bricolage/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations'),
         url('/fonts/bricolage/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/instrument/instrument-sans-latin-wght-normal.woff2') format('woff2-variations'),
         url('/fonts/instrument/instrument-sans-latin-wght-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/instrument/instrument-sans-latin-wght-italic.woff2') format('woff2');
}

:root {
    color-scheme: light;
    --font-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;

    --bg: #F3F5F7;
    --surface: #FFFFFF;
    --surface-2: #F7F9FA;
    --ink: #17212B;
    --ink-2: #3A4855;
    --muted: #5C6B79;
    --line: #DCE2E8;
    --line-strong: #C5CED6;
    --good: #1B7F4B;  --good-soft: #E6F4EC;
    --warn: #8A5A00;  --warn-soft: #FDF3DC;
    --bad: #B42318;   --bad-soft: #FDECEA;
    --shadow: 0 1px 2px rgba(23, 33, 43, 0.06), 0 8px 24px rgba(23, 33, 43, 0.06);

    /* Brand: replaced by brand.js with the business's colours */
    --brand: #0F766E;      --on-brand: #FFFFFF;   --brand-ink: #0F766E;  --brand-mark: #0F766E;
    --brand-soft: #E7F1F0; --brand-line: #A6CBC8;
    --brand-2: #B45309;    --on-brand-2: #FFFFFF; --brand-2-ink: #9A4708; --brand-2-soft: #F7EDE6;
    --page-tint: #EEF3F4;  --focus: #0F766E;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0F1419;
    --surface: #182029;
    --surface-2: #1E2731;
    --ink: #E8EEF3;
    --ink-2: #C4CFD8;
    --muted: #97A6B3;
    --line: #2B3642;
    --line-strong: #3A4755;
    --good: #5FD394;  --good-soft: #173326;
    --warn: #F2C76B;  --warn-soft: #3A2F14;
    --bad: #FF8A80;   --bad-soft: #3D1C1A;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);

    --brand: #14988D;      --on-brand: #FFFFFF;   --brand-ink: #5CC9BF;  --brand-mark: #3FB3A9;
    --brand-soft: #18353A; --brand-line: #1D6A66;
    --brand-2: #C2650F;    --on-brand-2: #FFFFFF; --brand-2-ink: #F0A060; --brand-2-soft: #3A2A1D;
    --page-tint: #111B20;  --focus: #5CC9BF;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: linear-gradient(var(--page-tint), var(--bg) 420px) no-repeat, var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: 40px; }
h2 { font-size: 31px; }
h3 { font-size: 19px; letter-spacing: 0; }
h4 { font-size: 16px; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
.section { display: none; }
.section.active { display: block; }
.note { color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- forms and buttons ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 6px; font-weight: 700; color: var(--ink-2); font-size: 15px; }
input, textarea, select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font: inherit;
    background: var(--surface);
    color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); outline-offset: 0; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0 10px 0 0; accent-color: var(--brand); flex: none; }
input[type="color"] { width: 52px; height: 40px; padding: 2px; cursor: pointer; }
button, a.button {
    font: inherit;
    font-weight: 700;
    background: var(--brand);
    color: var(--on-brand);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 11px 18px;
    cursor: pointer;
    line-height: 1.2;
}
button:hover { filter: brightness(1.07); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: default; }
button.plain { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
button.plain:hover { background: var(--surface-2); filter: none; }
button.danger { background: var(--bad); color: #fff; }
:root[data-theme="dark"] button.danger { color: #2a0d0b; }
button.small { padding: 7px 12px; font-size: 14px; }
button.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row .form-group { flex: 1; min-width: 200px; }
.check { display: flex; align-items: center; font-weight: 400; color: var(--ink); }

.error, .success, .warning { padding: 12px 14px; border-radius: 8px; margin: 12px 0; }
.error { color: var(--bad); background: var(--bad-soft); }
.success { color: var(--good); background: var(--good-soft); }
.warning { color: var(--warn); background: var(--warn-soft); }
#message { position: fixed; right: 20px; bottom: 20px; max-width: 400px; z-index: 60; }
#message > div { box-shadow: var(--shadow); margin: 0; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 14px; color: var(--muted); font-weight: 700; }
td.amount, th.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 20px; }
.panel > h3:first-child { margin-top: 0; }

/* ---------- light / dark button ---------- */
.theme-toggle {
    position: fixed; top: 11px; right: 14px; z-index: 45;
    width: 42px; height: 42px; padding: 0; border-radius: 50%;
    font-size: 19px; line-height: 40px; text-align: center;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.theme-toggle:hover { background: var(--surface-2); filter: none; }

/* Logos sit on white in dark mode, so dark or see-through logos stay visible */
:root[data-theme="dark"] .brand-mark img, :root[data-theme="dark"] .drawer-head img, :root[data-theme="dark"] .logo-frame img {
    background: #fff; padding: 3px; border-radius: 6px;
}

/* ---------- app shell: top bar and menu ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 70px 0 20px; }
.menu-button {
    width: 42px; height: 42px; padding: 0; flex: none; font-size: 22px; line-height: 40px;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
}
.menu-button:hover { background: var(--surface-2); filter: none; }
.brand-mark { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark img { height: 38px; width: auto; max-width: 120px; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .page { margin-left: auto; color: var(--muted); font-size: 15px; white-space: nowrap; }
@media (max-width: 560px) { .topbar .page { display: none; } }
.initials {
    flex: none; display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--brand); color: var(--on-brand);
    font-family: var(--font-display); font-weight: 700; font-size: 16px;
}

.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 18, 0.45); z-index: 50; }
.drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: 300px; z-index: 51;
    background: var(--surface); border-right: 1px solid var(--line);
    padding: 22px 16px; overflow-y: auto;
    transform: translateX(-105%); transition: transform 0.2s ease;
}
.drawer.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0, 0, 0, 0.2); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 0 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drawer-head img { height: 40px; max-width: 90px; object-fit: contain; }
.drawer-head h2 { font-size: 19px; margin: 0; }
.drawer .who { color: var(--muted); font-size: 13px; word-break: break-all; }
.drawer nav .group { font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 12px 4px; }
.drawer nav button {
    display: flex; align-items: center; gap: 12px; width: 100%;
    text-align: left; background: none; color: var(--ink); font-weight: 400;
    padding: 10px 12px; border-radius: 8px;
}
.drawer nav button:hover { background: var(--surface-2); filter: none; }
.drawer nav button.current { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.drawer nav .icon { width: 22px; text-align: center; }

.container { max-width: 1180px; margin: 0 auto; padding: 32px 24px 80px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.page-head h2 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }

/* ---------- sign in and setup ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.split-brand { background: var(--brand); color: var(--on-brand); padding: 64px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.split-brand .product { font-family: var(--font-display); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 12px; }
.split-brand .product span { opacity: 0.9; }
.product-mark { flex: none; display: block; }
.split-brand h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -0.02em; max-width: 13ch; margin: 0 0 20px; }
.split-brand p { font-size: 18px; max-width: 40ch; opacity: 0.92; margin: 0; }
.split-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--surface); }
.split-form .inner { width: 100%; max-width: 380px; }
.split-form h2 { font-size: 31px; }
.split-form .alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
@media (max-width: 820px) {
    .split { grid-template-columns: 1fr; min-height: 0; }
    .split-brand { padding: 36px 24px; }
    .split-brand h1 { font-size: 34px; }
}
.setup-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.setup-wrap > p { color: var(--ink-2); }
.logo-picker { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-frame {
    width: 120px; height: 120px; border-radius: 14px; border: 1px dashed var(--line-strong);
    display: grid; place-items: center; background: var(--surface-2); overflow: hidden; color: var(--muted); font-size: 13px; text-align: center; padding: 8px;
}
.logo-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { display: flex; gap: 22px; flex-wrap: wrap; margin: 10px 0 4px; }
.swatch { display: flex; align-items: center; gap: 10px; margin: 0; }
.swatch span { font-size: 15px; color: var(--ink-2); font-weight: 400; }

/* ---------- home: calls ---------- */
.summary { font-size: 18px; color: var(--ink-2); margin: 6px 0 0; max-width: 64ch; }
.summary strong { color: var(--ink); font-family: var(--font-display); font-weight: 700; }
.call-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.call-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.call-item:hover, .call-item:focus-visible { background: var(--surface); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-family: var(--font-display); font-weight: 700; }
.call-item .who { font-weight: 700; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.call-item .what { color: var(--ink-2); margin: 2px 0 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; }
.call-item .price { font-family: var(--font-display); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.live { background: var(--good-soft); color: var(--good); border-color: transparent; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); }

/* ---------- one call ---------- */
.call-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.call-grid aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 900px) {
    .call-grid { grid-template-columns: 1fr; }
    .call-grid aside { position: static; order: -1; }
}
.box { border-radius: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); }
.box h4 { margin: 0 0 6px; }
.box.wanted { background: var(--brand-2-soft); border-color: transparent; border-left: 4px solid var(--brand-2); }
.box p:last-child { margin-bottom: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); margin: 4px 0 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l-wanted { background: var(--brand-2); }
.legend .l-quote { background: var(--brand-mark); }
audio { width: 100%; margin: 6px 0; }

.transcript { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 82%; padding: 11px 15px; border-radius: 16px; line-height: 1.45; }
.bubble.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.caller { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; }
.bubble .when { display: block; font-size: 12px; opacity: 0.72; margin-top: 4px; }
.bubble.hl-wanted { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand-2); }
.bubble.hl-quote { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--brand-mark); }
.bubble .tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-bottom: 5px; }
.bubble .tag.wanted { background: var(--brand-2); color: var(--on-brand-2); }
.bubble .tag.quote { background: var(--brand); color: var(--on-brand); }
.transcript.only-highlights .bubble:not(.hl-wanted):not(.hl-quote):not(.hl-human):not(.hl-ticket) { display: none; }

/* ---------- the quote ticket ---------- */
.ticket { --cut: var(--bg); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.ticket-head { background: var(--brand); color: var(--on-brand); padding: 14px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ticket-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.ticket-sub { font-size: 14px; opacity: 0.9; }
.ticket-no { font-family: var(--font-display); font-weight: 600; font-size: 15px; opacity: 0.95; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket-body { padding: 10px 18px 6px; }
.ticket-line { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.ticket-what { display: flex; flex-direction: column; min-width: 0; }
.ticket-name { font-weight: 700; }
.ticket-qty, .ticket-note { font-size: 14px; color: var(--muted); }
.ticket-leader { flex: 1; min-width: 20px; border-bottom: 2px dotted var(--line-strong); transform: translateY(-5px); }
.ticket-amount { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticket-empty { color: var(--muted); margin: 8px 0; }
.ticket-extra { font-size: 14px; color: var(--ink-2); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin: 6px 0 4px; }
.ticket-tear {
    height: 22px; position: relative;
    background:
        radial-gradient(circle at 0 50%, var(--cut) 10px, transparent 11px) left center / 22px 22px no-repeat,
        radial-gradient(circle at 100% 50%, var(--cut) 10px, transparent 11px) right center / 22px 22px no-repeat;
}
.ticket-tear::after { content: ''; position: absolute; left: 18px; right: 18px; top: 50%; border-top: 2px dashed var(--line-strong); }
.ticket-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 18px 16px; }
.ticket-total-label { color: var(--ink-2); font-weight: 700; }
.ticket-total-amount { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ticket-valid { margin: -8px 18px 14px; font-size: 13px; color: var(--muted); }
.panel .ticket { --cut: var(--surface); }

/* ---------- services ---------- */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.service-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.service-card.off .service-photo, .service-card.off h3 { opacity: 0.55; }
.service-photo { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-size: 14px; position: relative; }
.service-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-photo .count { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.65); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 13px; }
.service-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.service-body h3 { margin: 0; }
.service-price { font-family: var(--font-display); font-weight: 700; color: var(--brand-ink); }
.service-desc { color: var(--ink-2); font-size: 15px; margin: 0; }
.service-body .actions { margin-top: auto; padding-top: 10px; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.photo-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); margin: 0; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile button { position: absolute; top: 6px; right: 6px; padding: 3px 10px; font-size: 13px; border-radius: 999px; background: rgba(0, 0, 0, 0.7); color: #fff; }
.upload-button { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--on-brand); background: var(--brand); border-radius: 8px; padding: 10px 16px; margin: 0; font-size: 16px; }
.upload-button:hover { filter: brightness(1.07); }
.upload-button input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.upload-button:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.upload-button.plain { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); }

/* ---------- taxes ---------- */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 12px 0 24px; }
.figures div { padding: 18px 16px; }
.figures div + div { border-left: 1px solid var(--line); }
.figures strong { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figures span { color: var(--muted); }
@media (max-width: 640px) { .figures { grid-template-columns: 1fr; } .figures div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- public pages: call page and quote ---------- */
.public-band { background: var(--brand); color: var(--on-brand); }
.public-band .inner { max-width: 1040px; margin: 0 auto; padding: 22px 70px 22px 24px; display: flex; align-items: center; gap: 16px; }
.logo-chip { background: #fff; border-radius: 12px; padding: 6px; display: grid; place-items: center; height: 60px; min-width: 60px; flex: none; }
.logo-chip img { max-height: 48px; max-width: 140px; object-fit: contain; }
.public-band h1 { font-size: 28px; margin: 0; }
.public-band .contact { opacity: 0.92; font-size: 15px; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.public-main { max-width: 1040px; margin: 0 auto; padding: 28px 24px 80px; }

.consent { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-bottom: 32px; }
.consent h2 { font-size: 27px; }
.consent p { max-width: 62ch; color: var(--ink-2); }
.consent .actions button { min-width: 180px; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; color: var(--ink); font-weight: 400; }
button.offer:hover { border-color: var(--brand); filter: none; }
.offer .service-photo { aspect-ratio: 16 / 10; }
.offer-body { padding: 12px 14px 14px; }
.offer-body strong { display: block; font-family: var(--font-display); font-size: 17px; }
.offer-price { color: var(--brand-ink); font-weight: 700; }
.offer-desc { font-size: 14px; color: var(--muted); display: block; }
.offer.picked { border-color: var(--brand-mark); box-shadow: 0 0 0 2px var(--brand-mark); }

.call-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 820px) { .call-layout { grid-template-columns: 1fr; } }
.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; height: 440px; overflow-y: auto; }
.chat .bubble.ai { background: var(--surface-2); }
.composer { display: flex; gap: 8px; margin-top: 10px; }
.composer input { flex: 1; }
.mic { width: 50px; padding: 0; font-size: 21px; flex: none; }
.mic.listening { background: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px var(--bad-soft); } }
.status-line { min-height: 22px; font-size: 14px; color: var(--muted); margin: 6px 0; }
.quote-panel { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.picks h3 { margin: 32px 0 6px; }
.picks > p { color: var(--muted); }

.quote-doc .public-main { max-width: 720px; }
.quote-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; color: var(--ink-2); margin-bottom: 18px; }

@media print {
    :root, :root[data-theme="dark"] {
        color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #222; --muted: #444; --line: #bbb; --line-strong: #999;
    }
    body { background: #fff; }
    .ticket { box-shadow: none; }
    .no-print, .theme-toggle { display: none !important; }
    .public-band, .ticket-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- tickets: callers waiting for a person ---------- */
.support-card { background: var(--surface); border: 2px solid var(--brand-mark); border-radius: 14px; padding: 16px 18px; }
.support-card p { margin: 6px 0 8px; color: var(--ink-2); }
.support-label { font-weight: 700; color: var(--brand-ink); font-size: 14px; }
.support-number { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.support-card.big { padding: 22px 24px; }
.support-card.big .support-number { font-size: 52px; }
.support-card.big p { font-size: 18px; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; counter-reset: step; }
.steps li { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.steps li strong { display: block; color: var(--ink-2); }
.steps li span { font-size: 14px; }
.steps li.done { border-color: transparent; background: var(--brand-soft); }
.steps li.current { border: 2px solid var(--brand-mark); background: var(--surface); }
.steps li.current strong { color: var(--brand-ink); }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.waiting { margin-bottom: 30px; }
.waiting h3 { display: flex; align-items: center; gap: 10px; }
.waiting-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.waiting-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.waiting-card.in_progress { border-left-color: var(--brand-mark); }
.waiting-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.waiting-card .num { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.waiting-card .reason { color: var(--ink-2); margin: 0; }
.waiting-card .actions { margin-top: 4px; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--brand-2); color: var(--on-brand-2); font-size: 14px; font-family: var(--font-body); }
.bubble.hl-human { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink-2); }
.bubble.hl-ticket { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink-2); }
.bubble .tag.human, .bubble .tag.ticket { background: var(--ink); color: var(--surface); }
.legend .l-human { background: var(--ink-2); }
.badge.ticket { background: var(--brand-2-soft); color: var(--brand-2-ink); border-color: transparent; }

/* ---------- forgot password ---------- */
button.link-button { background: none; border: 0; color: var(--brand-ink); padding: 10px 0 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button.link-button:hover { filter: none; color: var(--ink); }
.recover-steps { list-style: none; padding: 0; margin: 4px 0 20px; display: flex; gap: 6px; counter-reset: rstep; font-size: 14px; }
.recover-steps li { flex: 1; padding: 6px 8px 7px; border-top: 3px solid var(--line); color: var(--muted); counter-increment: rstep; }
.recover-steps li::before { content: counter(rstep) ". "; }
.recover-steps li.current { border-top-color: var(--brand-mark); color: var(--ink); font-weight: 700; }
.recover-steps li.done { border-top-color: var(--brand-line); color: var(--ink-2); }
.recover-steps li.skipped { text-decoration: line-through; }
.recover-sent { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; color: var(--ink); margin: 0 0 16px; }

/* ---------- account and phone line ---------- */
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border: 1px dashed var(--brand-line); border-radius: 12px; padding: 12px 16px; margin-bottom: 22px; background: var(--surface); }
.nudge p { margin: 0; max-width: 62ch; }
.form-group.align-end { display: flex; align-items: flex-end; flex: 0 0 auto; min-width: 0; }
.status-list { list-style: none; padding: 0; margin: 0; }
.status-list li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.status-list li:first-child { border-top: 0; padding-top: 0; }
.status-list p { margin: 2px 0 0; color: var(--muted); }
.status-list .dot { flex: 0 0 12px; height: 12px; border-radius: 50%; margin-top: 6px; background: var(--line-strong); }
.status-list .good .dot { background: var(--good); }
.status-list .bad .dot { background: var(--bad); }
.status-list .warn .dot { background: var(--warn); }
.status-list .off .dot { background: transparent; border: 2px solid var(--line-strong); }
.text-log { list-style: none; padding: 0; margin: 0; }
.text-log li { padding: 10px 0; border-top: 1px solid var(--line); }
.text-log li:first-child { border-top: 0; padding-top: 0; }
.text-log .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.text-log p { margin: 4px 0 0; overflow-wrap: anywhere; }
.text-log .failed p.why { color: var(--bad); font-size: 14px; }
.text-log .empty-row { color: var(--muted); }
.setup-guide summary { cursor: pointer; list-style-position: outside; }
.setup-guide summary h3 { display: inline; margin: 0; }
.setup-guide ol { padding-left: 22px; }
.setup-guide li { margin: 6px 0; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.92em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; }
.badge.channel.phone { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.badge.channel.sms { background: var(--brand-2-soft); color: var(--brand-2-ink); border-color: transparent; }

/* ---------- pick.html: services to tap during a phone call ---------- */
.pick-status { border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); }
.pick-status.live { border: 2px solid var(--brand-mark); }
.pick-status.error { border-color: var(--bad); color: var(--bad); }
.public-main section + section { margin-top: 28px; }
.offer-action { display: block; margin-top: 8px; font-weight: 700; color: var(--brand-ink); font-size: 14px; }
.offer.picked .offer-action { color: var(--ink-2); }
.offer.picked .offer-action::before { content: "✓ "; }
.pick-quote { margin-top: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.pick-quote h2 { margin-top: 0; }
.pick-quote ul { list-style: none; padding: 0; margin: 0; }
.pick-quote li, .pick-total { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.pick-total { border-bottom: 0; font-size: 19px; }

/* ---------- service photo slideshow (slideshow.js) ---------- */
.slideshow { position: relative; margin: 0 0 22px; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.slideshow .slides { position: relative; aspect-ratio: 16 / 9; max-height: 340px; width: 100%; background: var(--surface-2); }
.slideshow .slide { position: absolute; inset: 0; padding: 0; border: 0; border-radius: 0; background: none; opacity: 0; transition: opacity 0.6s ease; cursor: pointer; }
.slideshow .slide.on { opacity: 1; z-index: 1; }
.slideshow .slide:hover { filter: none; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slideshow .slide-arrow { position: absolute; top: calc(50% - 46px); z-index: 2; width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 28px; line-height: 1;
    background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; }
.slideshow .slide-arrow.prev { left: 10px; }
.slideshow .slide-arrow.next { right: 10px; }
.slideshow .slide-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 3px solid var(--brand-mark); }
.slideshow .slide-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.slideshow .slide-caption strong { font-family: var(--font-display); font-size: 19px; }
.slideshow .slide-caption span { color: var(--brand-ink); font-weight: 700; }
.slideshow .slide-caption .slide-hint { color: var(--muted); font-weight: 400; font-size: 14px; }
.slideshow .slide-tools { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex: 0 0 auto; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .slideshow .slide { transition: none; } }

/* ---------- tax state ---------- */
.state-picker { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.state-picker .form-group { flex: 1; min-width: 220px; margin-bottom: 0; }
#locateNote { margin: 6px 0 16px; }
.state-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 18px;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.state-card strong { margin-right: 8px; }
.state-card span { color: var(--muted); }
.state-card.unchecked { border: 2px solid var(--warn); background: var(--warn-soft); }
.state-card.unchecked span { color: var(--warn); font-weight: 600; }
.state-notes { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.state-notes li { margin: 4px 0; }

/* ---------- security page ---------- */
.level { display: inline-block; font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 999px; }
.level.normal { background: var(--good-soft); color: var(--good); }
.level.elevated { background: var(--warn-soft); color: var(--warn); }
.level.high { background: var(--bad-soft); color: var(--bad); }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.sec-list li:first-child { border-top: 0; padding-top: 0; }
.sec-list li span { color: var(--muted); }
.sec-list.mono li, .mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 14px; overflow-wrap: anywhere; }
.sec-list .empty-row, .sec-events .empty-row { color: var(--muted); font-family: var(--font-body); }
.sec-events { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.sec-events li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.sec-events li:first-child { border-top: 0; }
.sec-events .when { display: block; color: var(--muted); font-size: 13px; }
.sec-events .detail { color: var(--ink-2); }

/* ---------- plans ---------- */
.product-choice { display: grid; gap: 10px; }
.product-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.product-option:has(input:checked) { border: 2px solid var(--brand-mark); padding: 13px 15px; }
.product-option input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.product-option > span { display: flex; flex-direction: column; gap: 2px; }
.product-option > span > span { color: var(--muted); }
.product-option em { font-style: normal; font-weight: 700; color: var(--brand-ink); font-size: 15px; }
.locked { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 20px;
    border-radius: 12px; border: 2px solid var(--warn); background: var(--warn-soft); }
.locked p { margin: 0; max-width: 64ch; }
#tax-section.is-locked > :not(.page-head):not(#taxLocked) { display: none; }
#tax-section.is-locked #editTaxBtn { display: none; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.on { border: 2px solid var(--brand-mark); padding: 17px 19px; }
.plan-card h3 { margin: 0; }
.plan-card p { margin: 0; }
.plan-card .actions { margin-top: auto; padding-top: 10px; }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.plan-price strong { font-family: var(--font-display); font-size: 26px; }
.plan-status { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.plan-status.active { background: var(--good-soft); color: var(--good); }
.plan-status.trial { background: var(--brand-soft); color: var(--brand-ink); }
.plan-status.requested, .plan-status.trial_over { background: var(--warn-soft); color: var(--warn); }
.bill { list-style: none; margin: 0; padding: 0; }
.bill li { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.bill li:first-child { border-top: 0; }
.bill li.total { border-top: 2px solid var(--ink); font-size: 18px; }
.table-wrap { overflow-x: auto; }
table.customers { width: 100%; border-collapse: collapse; }
table.customers th, table.customers td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.customers th { border-top: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
table.customers .num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mini-actions button { padding: 4px 10px; font-size: 13px; }

/* ---------- parts and labor ---------- */
fieldset.cost-box { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 16px 6px; margin: 0 0 16px; }
fieldset.cost-box legend { padding: 0 6px; font-weight: 600; color: var(--ink-2); }
.cost-line { margin: 0 0 10px; color: var(--muted); }
.cost-line strong { color: var(--ink); }
.cost-line .loss, .service-margin.loss, .profit-line.loss { color: var(--bad); }
.service-margin { font-size: 14px; color: var(--good); margin-top: 2px; }
.profit-line { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--good-soft); color: var(--good); font-weight: 600; }
.ticket-split { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* AI tools page */
.tool-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.tool-head h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.tool-head select { width: auto; padding: 4px 8px; font-size: 13px; }
.tool-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.tool-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.tool-row.on { border-color: var(--brand); background: var(--brand-soft); }
.tool-row .note { grid-column: 1 / -1; margin: 0; }
.tool-row label.check { margin: 0; }
.tool-kind { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tool-kind.changes { color: var(--warn); font-weight: 600; }
.note.warn { color: var(--warn); }
.tool-uses { margin-top: 10px; }
.tool-uses summary { cursor: pointer; font-weight: 600; }
.tool-uses .note { display: block; overflow-wrap: anywhere; }
@media (max-width: 640px) { .tool-row { grid-template-columns: 1fr; } .tool-kind { white-space: normal; } }

/* Tax lines on the quote ticket */
.ticket-subline { display: flex; justify-content: space-between; gap: 12px; padding: 4px 18px; font-size: 14px; color: var(--muted); }
.ticket-subline .ticket-amount { font-variant-numeric: tabular-nums; }

/* Country, tax and rules */
.inline-pick { display: flex; gap: 8px; align-items: center; }
.inline-pick select { flex: 1; min-width: 0; }
.inline-pick button { white-space: nowrap; }
.tax-rate { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.checklist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.checklist li { border-top: 1px solid var(--line); padding-top: 10px; display: grid; grid-template-columns: 9.5rem 1fr; gap: 2px 12px; }
.checklist li:first-child { border-top: 0; padding-top: 0; }
.checklist .level { grid-row: span 2; align-self: start; justify-self: start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.checklist .level.required { background: var(--warn-soft); color: var(--warn); }
.checklist .level.recommended { background: var(--brand-soft); color: var(--brand-ink); }
.checklist .level.done { background: var(--good-soft); color: var(--good); }
.checklist p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) { .inline-pick { flex-wrap: wrap; } }

.ticket-total { flex-wrap: wrap; }
.ticket-total-label { white-space: nowrap; }
@media (max-width: 640px) { .checklist li { grid-template-columns: 1fr; } .checklist .level { grid-row: auto; } }

/* Follow-up after the job (customer page) */
a.button { display: inline-block; text-decoration: none; margin: 6px 10px 6px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rate-panel { max-width: 560px; }
.rate-panel h2 { margin: 0 0 4px; }
.stars { border: 0; padding: 0; margin: 18px 0 4px; display: flex; gap: 6px; }
.stars legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stars label { position: relative; cursor: pointer; line-height: 1; }
.stars input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stars .star { font-size: 44px; color: var(--line-strong); transition: color 0.12s, transform 0.12s; display: block; }
.stars label.on .star { color: #E8A317; }
.stars label:hover .star { transform: scale(1.08); }
.stars input:focus-visible + .star { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.star-word { font-weight: 700; min-height: 1.4em; margin: 0 0 12px; }
.quote-recap { margin-top: 18px; max-width: 560px; }
.quote-recap summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .stars .star { transition: none; } .stars label:hover .star { transform: none; } }

/* Follow-ups (owner) */
.follow-box .stars-line { font-size: 22px; letter-spacing: 2px; color: #E8A317; }
.follow-box .stars-line .off { color: var(--line-strong); }
.rating-bars { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; max-width: 360px; }
.rating-bars li { display: grid; grid-template-columns: 3.2em 1fr 2.5em; gap: 8px; align-items: center; font-size: 14px; }
.rating-bars .bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rating-bars .bar i { display: block; height: 100%; background: #E8A317; }
.follow-list { list-style: none; padding: 0; margin: 0; }
.follow-list li { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.follow-list li:first-child { border-top: 0; }
.follow-list .who { min-width: 0; flex: 1 1 260px; }
.follow-list .who p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.follow-list .who blockquote { margin: 6px 0 0; padding-left: 10px; border-left: 3px solid var(--line-strong); font-size: 14px; }
.follow-box blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line-strong); font-size: 14px; }
.follow-box input[type=date] { width: auto; padding: 5px 8px; font-size: 14px; }

/* Look and greeting (owner) */
.look-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.look-preview { position: sticky; top: 76px; padding: 14px; }
.look-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.look-preview-head h3 { margin: 0; }
/* The preview is drawn at a real screen width and scaled to fit, so desktop layouts show as they will */
.frame-modes { display: flex; gap: 6px; margin-bottom: 8px; }
.frame-modes button[aria-pressed="true"] { border-color: var(--brand-mark); box-shadow: 0 0 0 2px var(--brand-mark); }
.frame-box { position: relative; height: 680px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
#lookFrame { position: absolute; top: 0; left: 0; border: 0; background: var(--surface); transform-origin: 0 0; }
.look-choices { display: grid; gap: 12px; margin-top: 14px; }
.look-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; grid-template-columns: 72px 1fr; gap: 4px 14px; }
.look-card.current { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.look-swatch { grid-row: span 4; border-radius: 10px; display: grid; place-items: center; font-size: 30px; height: 72px; border: 1px solid var(--line); }
.look-card h4 { margin: 0; font-size: 17px; }
.look-card p { margin: 0; font-size: 14px; color: var(--muted); }
.look-card .look-line { color: var(--ink-2); font-style: italic; }
.look-card .mini-actions { margin-top: 6px; }
.look-chips { display: flex; gap: 4px; margin-top: 2px; }
.look-chips i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-block; }
@media (max-width: 960px) { .look-grid { grid-template-columns: 1fr; } .look-preview { position: static; } .frame-box { height: 560px; } }
.look-card > :not(.look-swatch) { grid-column: 2; }
.look-card .look-swatch { grid-column: 1; grid-row: 1 / span 5; }

/* Moving swatch strip on the look cards: the look's colours sliding past under "Aa" */
.look-swatch { position: relative; overflow: hidden; align-content: start; padding-top: 10px; }
.look-swatch::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
    background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3), var(--s1), var(--s2)); background-size: 300% 100%; animation: swatchSlide 6s linear infinite; }
@keyframes swatchSlide { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .look-swatch::after { animation: none; } }

/* Reviewing the AI's calls */
.review-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; }
.review-strip p { margin: 0; }
.review-problems { display: grid; gap: 4px; margin: 10px 0 8px; }
.review-problems .check { margin: 0; font-size: 14px; }
.review-box textarea { width: 100%; margin-bottom: 8px; }
.badge.review.good { background: var(--good-soft); color: var(--good); }
.badge.review.needs-work { background: var(--bad-soft); color: var(--bad); }
.badge.unreviewed { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }

/* Deleting and restoring an account */
.danger-zone { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.danger-zone details summary { cursor: pointer; font-weight: 600; color: var(--bad); margin: 4px 0 10px; }
button.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.restore-box { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.restore-box p { margin: 0 0 10px; }
#ownerGreet .greet { margin-bottom: 18px; }

.bg-chips { display: flex; gap: 6px; align-items: center; margin: -4px 0 10px; }
.bg-chips i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); display: inline-block; }

/* ---------- login page: pages about the AI receptionist ---------- */
.split-brand { justify-content: flex-start; gap: 28px; padding: 48px 56px; }
.split-brand .tour-headline h1 { font-size: clamp(32px, 3.4vw, 44px); margin: 0; max-width: 16ch; }
.tour { position: relative; max-width: 520px; margin: auto 0; }
/* every page sits in the same cell, so the panel keeps the height of the tallest page and nothing jumps */
.tour-slides { display: grid; }
.tour-slide { grid-area: 1 / 1; }
.tour-slide[hidden] { display: block; visibility: hidden; }
.tour-slide.from-right { opacity: 0; transform: translateX(28px); }
.tour-slide.from-left { opacity: 0; transform: translateX(-28px); }
.tour-slide.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.tour-slide h2 { font-family: var(--font-display); font-size: clamp(22px, 2.1vw, 28px); line-height: 1.15; margin: 20px 0 8px; color: var(--on-brand); }
.split-brand .tour-slide p { font-size: 17px; line-height: 1.5; max-width: 44ch; }
.tour-visual { min-height: 170px; display: flex; align-items: flex-end; }

/* the little pictures: real-looking cards in the app's own colours */
.mini-call, .mini-ticket, .mini-look, .mini-private { background: var(--surface); color: var(--ink); border-radius: 16px; padding: 16px; width: 100%; max-width: 440px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.mini-call { display: grid; gap: 8px; position: relative; }
.mini-ring { position: absolute; top: -14px; right: -10px; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-2, #B45309); color: #fff; display: grid; place-items: center; font-size: 20px; animation: ring 1.4s ease-in-out infinite; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.mini-bubble { padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; max-width: 85%; }
.mini-bubble.ai { background: var(--surface-2); border: 1px solid var(--line); justify-self: start; }
.mini-bubble.caller { background: var(--brand); color: var(--on-brand); justify-self: end; }
.mini-alert { font-size: 13px; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 7px 10px; justify-self: start; }
.mini-stars { color: #E8A317; font-size: 24px; letter-spacing: 3px; justify-self: center; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.mini-row.sub { padding-top: 0; color: var(--muted); font-size: 13px; }
.mini-row.total { border-top: 1px dashed var(--line-strong); margin-top: 6px; padding-top: 10px; font-size: 17px; }
.mini-row b { font-variant-numeric: tabular-nums; }
.mini-look { overflow: hidden; position: relative; }
.mini-sky { position: absolute; inset: 0; background: linear-gradient(135deg, #F49A6C, #F2A0B4 50%, #B8A3E6); opacity: .35; }
.mini-sky i { position: absolute; border-radius: 50%; filter: blur(18px); width: 120px; height: 120px; background: var(--brand); opacity: .5; animation: drift1 9s ease-in-out infinite alternate; }
.mini-sky i:nth-child(2) { right: 0; top: 10px; background: var(--brand-2, #B45309); animation-duration: 11s; }
.mini-sky i:nth-child(3) { left: 40%; bottom: -40px; animation-duration: 13s; }
.mini-greet { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.mini-sub { position: relative; color: var(--ink-2); margin-top: 4px; }
.mini-private { display: flex; gap: 14px; align-items: center; }
.mini-lock { font-size: 34px; }
.mini-private ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }

/* dots with a filling bar for the page that is showing */
.tour-nav { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tour-dot { width: 28px; height: 6px; padding: 0; border-radius: 3px; border: 0; background: color-mix(in srgb, var(--on-brand) 30%, transparent); overflow: hidden; cursor: pointer; }
.tour-dot span { display: block; height: 100%; width: 0; background: var(--on-brand); }
.tour-dot[aria-current="true"] span { width: 100%; }
.tour-dot.run span { width: 0; animation: tourFill 7s linear forwards; }
.tour.paused .tour-dot[aria-current="true"] span { width: 100%; animation: none; }
@keyframes tourFill { to { width: 100%; } }
.tour-dot:focus-visible, .tour-pause:focus-visible { outline: 3px solid var(--on-brand); outline-offset: 3px; }
.tour-pause { margin-left: 6px; background: transparent; border: 1px solid color-mix(in srgb, var(--on-brand) 45%, transparent); color: var(--on-brand); font-size: 13px; padding: 3px 10px; border-radius: 999px; min-height: 0; }
@media (prefers-reduced-motion: reduce) {
    .tour-slide.in, .mini-ring, .mini-sky i { transition: none; animation: none; }
}
@media (max-width: 820px) {
    /* phones: the login form first, the pages after it */
    .split-form { order: -1; }
    .split-brand { min-height: 0; }
    .tour-visual { min-height: 0; }
    .split-brand { padding: 36px 24px; }
    .tour { margin: 0; }
}
/* the empty app area under the login page would show as a grey strip on phones */
body:has(#auth-section.active) main.container { display: none; }

/* ---------- going live: join requests, card payments, US texting, legal pages ---------- */
.optional { font-weight: 400; color: var(--muted); }
.join-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.join-box textarea { width: 100%; resize: vertical; }
.legal-foot { font-size: 13px; color: var(--muted); margin-top: 18px; }
.legal-foot a { color: inherit; }
.plan-card-pay { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.card-status { font-weight: 650; margin: 0 0 4px; }
.card-status.warn { color: var(--warn); }
.status-line.good { color: var(--good, #1A7F4B); font-weight: 600; }
.status-line.bad { color: var(--bad, #B42318); font-weight: 600; }
.status-line.wait { color: var(--warn); font-weight: 600; }
.texting-form > summary, .texting-details > summary { cursor: pointer; font-weight: 600; color: var(--brand-ink, var(--brand)); margin: 6px 0; }
.texting-form[open] > summary { margin-bottom: 12px; }
.texting-details pre { white-space: pre-wrap; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0 0; user-select: all; }
.inline-form { align-items: flex-end; gap: 12px; }
.inline-form button { margin-bottom: 16px; }
.text-consent { font-size: 13px; margin-top: 14px; }
.legal-page { background: var(--paper, var(--bg)); }
.legal { max-width: 720px; margin: 0 auto; padding: 48px 24px 80px; line-height: 1.6; }
.legal h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 40px); line-height: 1.1; margin: 8px 0 6px; }
.legal h2 { font-family: var(--font-display); font-size: 21px; margin: 34px 0 8px; }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal-product a { font-family: var(--font-display); font-weight: 700; color: var(--brand-ink, var(--brand)); text-decoration: none; }
.legal-updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }

/* ---------- Look page: who chose the look, and the layout tiles ---------- */
.ai-pick { border-color: var(--brand-line); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.ai-pick p:first-of-type { font-weight: 600; margin: 0 0 4px; }
.layout-pick { border: 0; padding: 0; margin: 4px 0 14px; }
.layout-pick legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.layout-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.layout-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 600; min-height: 44px; }
.layout-tile:hover { border-color: var(--brand); filter: none; }
.layout-tile[aria-pressed="true"] { border-color: var(--brand-mark); box-shadow: 0 0 0 2px var(--brand-mark); }
/* the little drawings: parts placed in a 64 x 44 box */
.lt { position: relative; width: 64px; height: 44px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lt i { position: absolute; background: var(--line-strong); border-radius: 1.5px; }
.lt i:first-child { background: var(--brand); }
.lt-classic i:nth-child(1) { left: 0; top: 0; width: 100%; height: 8px; }
.lt-classic i:nth-child(2) { left: 6px; top: 12px; width: 52px; height: 11px; }
.lt-classic i:nth-child(3) { left: 6px; top: 27px; width: 15px; height: 12px; }
.lt-classic i:nth-child(4) { left: 24px; top: 27px; width: 15px; height: 12px; }
.lt-classic i:nth-child(5) { left: 42px; top: 27px; width: 16px; height: 12px; }
.lt-showcase i:nth-child(1) { left: 0; top: 0; width: 100%; height: 8px; }
.lt-showcase i:nth-child(2) { left: 4px; top: 12px; width: 20px; height: 16px; }
.lt-showcase i:nth-child(3) { left: 27px; top: 12px; width: 20px; height: 16px; }
.lt-showcase i:nth-child(4) { left: 50px; top: 12px; width: 20px; height: 16px; }
.lt-showcase i:nth-child(5) { left: 14px; top: 32px; width: 36px; height: 8px; }
.lt-showcase i:nth-child(6) { display: none; }
.lt-split i:nth-child(1) { left: 0; top: 0; width: 100%; height: 8px; }
.lt-split i:nth-child(2) { left: 5px; top: 12px; width: 28px; height: 27px; }
.lt-split i:nth-child(3) { left: 37px; top: 12px; width: 22px; height: 6px; }
.lt-split i:nth-child(4) { left: 37px; top: 21px; width: 22px; height: 6px; }
.lt-split i:nth-child(5) { left: 37px; top: 30px; width: 22px; height: 6px; }
.lt-split i:nth-child(6) { display: none; }
.lt-sidebar i:nth-child(1) { left: 0; top: 0; width: 16px; height: 100%; }
.lt-sidebar i:nth-child(2) { left: 21px; top: 6px; width: 38px; height: 10px; }
.lt-sidebar i:nth-child(3) { left: 21px; top: 20px; width: 11px; height: 10px; }
.lt-sidebar i:nth-child(4) { left: 35px; top: 20px; width: 11px; height: 10px; }
.lt-sidebar i:nth-child(5) { left: 49px; top: 20px; width: 10px; height: 10px; }
.lt-centered i:nth-child(1) { left: 0; top: 0; width: 100%; height: 8px; }
.lt-centered i:nth-child(2) { left: 18px; top: 12px; width: 28px; height: 10px; }
.lt-centered i:nth-child(3) { left: 18px; top: 26px; width: 28px; height: 3px; }
.lt-centered i:nth-child(4) { left: 18px; top: 32px; width: 28px; height: 3px; }
.lt-centered i:nth-child(5) { left: 18px; top: 38px; width: 28px; height: 3px; }
.lt-rail i:nth-child(1) { left: 0; top: 0; width: 100%; height: 8px; }
.lt-rail i:nth-child(2) { left: 4px; top: 12px; width: 16px; height: 12px; }
.lt-rail i:nth-child(3) { left: 23px; top: 12px; width: 16px; height: 12px; }
.lt-rail i:nth-child(4) { left: 4px; top: 27px; width: 16px; height: 12px; }
.lt-rail i:nth-child(5) { left: 23px; top: 27px; width: 16px; height: 12px; }
.lt-rail i:nth-child(6) { left: 44px; top: 12px; width: 16px; height: 27px; background: var(--brand-line); }
.lt-rail i:nth-child(7) { display: none; }
