/* Layout idea: a working tool. Quiet neutral surfaces with a slight blue bias, one deep-green accent (the Fesi AI brand colour) for actions,
   and colour reserved for lead temperature and warnings so they stand out in a long list. */
:root {
  --bg: #f1f3f8;
  --surface: #ffffff;
  --ink: #18212f;
  --muted: #5a667c;
  --line: #d6dce8;
  --accent: #0b5a41;
  --accent-ink: #ffffff;
  --in: #eef1f7;
  --out: #d8eee3;
  --hot: #a8330d; --hot-bg: #fde5da;
  --warm: #7f5400; --warm-bg: #fbedc4;
  --cold: #38546f; --cold-bg: #e0eaf4;
  --ok: #17643d; --ok-bg: #ddf2e5;
  --err: #9b1c1c; --err-bg: #fbe1e1;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #10141c; --surface: #19202e; --ink: #e7ebf4; --muted: #9ba6bc; --line: #2c364a;
    --accent: #7fd6ae; --accent-ink: #08261b; --in: #222b3e; --out: #1f4a3a;
    --hot: #ffad8c; --hot-bg: #4a2316; --warm: #f1cb6a; --warm-bg: #42340f; --cold: #a8c2dd; --cold-bg: #213449;
    --ok: #84d7a6; --ok-bg: #163927; --err: #ffb0b0; --err-bg: #4a1c1c;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
h1 { font-size: 24px; line-height: 1.2; margin: 0; text-wrap: balance; }
h2 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.top nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--ink); background: var(--bg); }
.top nav a[aria-current] { color: var(--accent); background: var(--bg); }
.signout { display: flex; align-items: center; gap: 10px; margin: 0; }
.who { color: var(--muted); font-size: 14px; }

main { max-width: 1180px; margin: 0 auto; padding: 20px 20px 48px; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; }
.page-head p { margin: 0; }
.crumb { margin: 0; font-size: 14px; color: var(--muted); }
.phone { font-size: 15px; font-weight: 400; margin-left: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

/* buttons and forms */
.btn { font: inherit; font-weight: 500; cursor: pointer; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.quiet { padding: 4px 9px; font-size: 14px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
label { font-weight: 500; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.stack input, .stack select { width: 100%; }
.stack .btn { align-self: flex-start; margin-top: 6px; }
.stack label { margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 15px; }
.check input { width: auto; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

/* messages to the user */
.flash { padding: 9px 13px; border-radius: 8px; margin: 0; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; margin: 0; }
.hint { margin: 0; padding: 10px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* stage tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 7px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
.count { font-size: 12.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }

/* tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.off td { color: var(--muted); }
td.actions { display: flex; flex-wrap: wrap; gap: 6px; }
td form { margin: 0; }

/* pills */
.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.pill.hot { color: var(--hot); background: var(--hot-bg); }
.pill.warm { color: var(--warm); background: var(--warm-bg); }
.pill.cold { color: var(--cold); background: var(--cold-bg); }
.pill.stage { color: var(--ink); border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.pill.warn { color: var(--err); background: var(--err-bg); }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.panel.narrow { max-width: 520px; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 820px) { .split, .two { grid-template-columns: 1fr; } }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0; overflow-wrap: anywhere; }
ul.plain { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.plain li { overflow-wrap: anywhere; }
ul.plain li.due { color: var(--err); }
ul.plain li.done { color: var(--muted); text-decoration: line-through; }
ul.plain .row { margin: 0; justify-content: space-between; }
ul.notes li { border-left: 3px solid var(--line); padding-left: 10px; white-space: pre-wrap; }
ol.steps { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
code { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
code.secret { background: var(--bg); padding: 2px 8px; border-radius: 6px; letter-spacing: 0.06em; font-weight: 600; }

/* conversation */
.chat { padding: 0; display: flex; flex-direction: column; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; }
.panel-head form { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; }
.messages { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: 620px; overflow-y: auto; }
.msg { display: flex; flex-direction: column; max-width: 82%; }
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.in .bubble { background: var(--in); border-bottom-left-radius: 3px; }
.msg.out .bubble { background: var(--out); border-bottom-right-radius: 3px; }
.meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.reply { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); margin: 0; }

/* sign-in pages */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; margin: 0; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; gap: 14px; }

/* two-step setup, one-time secrets, onboarding */
.qr { display: block; margin: 8px 0; border-radius: 8px; max-width: 100%; height: auto; }
.codes-panel { border-color: var(--warm); background: var(--warm-bg); color: var(--ink); }
ul.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
ul.codes code { font-size: 16px; font-weight: 600; letter-spacing: 0.04em; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
ol.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
ol.checklist li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
ol.checklist li > div { flex: 1; min-width: 220px; }
ol.checklist li p { margin: 0; }
.top.admin { border-bottom: 3px solid var(--accent); }
main > h2 { margin: 6px 0 0; }

.chat-note { align-self: center; margin: 0; font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 2px 12px; }

/* listing photos */
ul.photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
ul.photos li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
ul.photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--bg); }
ul.photos form { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; margin: 0; }

/* brand, footer and the public home page */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.wordmark img { display: block; border-radius: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 20px 28px; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 980px; margin: 0 auto; padding: 18px 20px; }
.home-top .wordmark { font-size: 28px; gap: 12px; }
.home-top .wordmark img { width: 48px; height: 48px; border-radius: 12px; }
.home-top .btn { font-weight: 700; font-size: 16px; padding: 10px 20px; }
.home-main { max-width: 980px; gap: 40px; padding-top: 24px; }
.hero { display: flex; flex-direction: column; gap: 14px; padding: 24px 0 8px; }
.hero h1 { font-size: clamp(38px, 7vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.03; }
.eyebrow { margin: 0; color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.lede { font-size: 18px; max-width: 62ch; color: var(--muted); margin: 0; }
.home-main h2 { font-size: 22px; margin: 0 0 14px; }
.home-main section > p { max-width: 68ch; }
ul.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
ul.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
ul.features h3 { margin: 0 0 6px; font-size: 16px; }
ul.features p { margin: 0; color: var(--muted); }

/* ---- home page: dark green hero with a floating 3D phone. Motion is CSS only (the site runs no scripts). ---- */
body.home { overflow-x: hidden; }
.hero-band { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 10% 0%, #12704f 0%, #0b4634 42%, #052018 100%); }
.hero-band .home-top, .hero-band .hero { position: relative; z-index: 1; }
.hero-band .wordmark { color: #fff; }
.hero-band .wordmark img { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.hero-band .btn.primary { background: #fff; color: #0b4634; border-color: #fff; }
.btn.gold { background: #f5b82e; color: #1f1602; border-color: #f5b82e; font-weight: 700; box-shadow: 0 10px 24px rgba(245, 184, 46, 0.35); }
.btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.45); font-weight: 600; }
.hero-band .hero .btn { padding: 12px 20px; font-size: 16px; border-radius: 10px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hero-band .hero .btn:hover { transform: translateY(-2px); }
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.glow.g1 { width: 420px; height: 420px; background: #1fae7a; top: -140px; right: 8%; animation: drift 14s ease-in-out infinite alternate; }
.glow.g2 { width: 320px; height: 320px; background: #f5b82e; opacity: 0.22; bottom: -160px; left: 30%; animation: drift 18s ease-in-out infinite alternate-reverse; }
.hero { max-width: 1100px; margin: 0 auto; padding: 36px 20px 84px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; flex-direction: initial; }
.home-top { max-width: 1100px; }
.hero-text { display: flex; flex-direction: column; gap: 16px; animation: rise 0.8s ease both; }
.hero-band .eyebrow { color: #f5b82e; }
.hero-band .lede { color: #cfe5dc; }
.now { margin: 0; align-self: flex-start; padding: 6px 14px; border-radius: 999px; font-size: 14px; color: #e6f3ed; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22); }
.now b { color: #f5b82e; }
.hero h1 { font-size: clamp(40px, 6.2vw, 68px); }

.mk-stage { position: relative; margin: 0; justify-self: center; perspective: 1400px; animation: rise 1s 0.15s ease both; }
.mk-phone { width: 300px; border-radius: 38px; border: 10px solid #07140f; background: #eef3f0; color: #18212f; overflow: hidden; transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(9deg) rotateZ(2deg);
  box-shadow: 28px 40px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  animation: float 7s ease-in-out infinite; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; background: #0b5a41; color: #fff; }
.phone-head img { border-radius: 50%; }
.phone-head strong { display: block; font-size: 15px; line-height: 1.2; }
.phone-head span { font-size: 12px; opacity: 0.8; }
.phone-chat { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 40px; min-height: 380px; }
.mk-b { margin: 0; max-width: 86%; padding: 8px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); align-self: flex-start; border-bottom-left-radius: 4px; transform-origin: left bottom; }
.mk-b.me { align-self: flex-end; background: #cdebdc; border-radius: 14px; border-bottom-right-radius: 4px; transform-origin: right bottom; }
.m1 { animation: show1 16s ease infinite; } .m2 { animation: show2 16s ease infinite; } .m3 { animation: show3 16s ease infinite; } .m4 { animation: show4 16s ease infinite; }
.typing { position: absolute; left: 12px; bottom: 10px; margin: 0; display: flex; gap: 4px; padding: 9px 11px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); animation: typing 16s linear infinite; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #7a8a83; animation: blink 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
.mk-chip { position: absolute; margin: 0; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.96); color: #18212f; font-size: 13px; line-height: 1.35; white-space: nowrap;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); border-left: 4px solid #f5b82e; }
.mk-chip b { font-size: 13.5px; }
.mk-chip span { color: #5a667c; }
.mk-chip.c1 { top: 1.5%; right: -120px; animation: chip1 16s ease infinite, bob 5s ease-in-out infinite; }
.mk-chip.c2 { bottom: 4%; left: -96px; border-left-color: #1fae7a; animation: chip2 16s ease infinite, bob 6s 0.8s ease-in-out infinite; }

.home-main { padding-top: 48px; }
ul.features { perspective: 1200px; }
ul.features li { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; transform-style: preserve-3d; animation: rise 0.7s ease both; }
ul.features li:nth-child(2) { animation-delay: 0.08s; } ul.features li:nth-child(3) { animation-delay: 0.16s; }
ul.features li:nth-child(4) { animation-delay: 0.24s; } ul.features li:nth-child(5) { animation-delay: 0.32s; } ul.features li:nth-child(6) { animation-delay: 0.4s; }
ul.features li:hover { transform: translateY(-6px) rotateX(5deg); border-color: var(--accent); box-shadow: 0 22px 40px rgba(6, 42, 31, 0.18); }
ul.features h3::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 3px; background: linear-gradient(135deg, #1fae7a, #f5b82e); transform: rotate(45deg); }
@supports (animation-timeline: view()) {
  ul.features li, .home-main section > h2, ol.steps li { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; animation-delay: 0s; }
}

@keyframes reveal { from { opacity: 0.3; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.15); } }
@keyframes float { 0%, 100% { transform: rotateY(-20deg) rotateX(9deg) rotateZ(2deg) translateY(0); } 50% { transform: rotateY(-14deg) rotateX(6deg) rotateZ(1deg) translateY(-14px); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes blink { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@keyframes show1 { 0%, 3% { opacity: 0; transform: scale(0.6); } 6%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes show2 { 0%, 22% { opacity: 0; transform: scale(0.6); } 25%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes show3 { 0%, 40% { opacity: 0; transform: scale(0.6); } 43%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes show4 { 0%, 60% { opacity: 0; transform: scale(0.6); } 63%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes typing { 0%, 9% { opacity: 0; } 11%, 21% { opacity: 1; } 23%, 48% { opacity: 0; } 50%, 59% { opacity: 1; } 61%, 100% { opacity: 0; } }
@keyframes chip1 { 0%, 44% { opacity: 0; scale: 0.8; } 48%, 94% { opacity: 1; scale: 1; } 98%, 100% { opacity: 0; scale: 1; } }
@keyframes chip2 { 0%, 64% { opacity: 0; scale: 0.8; } 68%, 94% { opacity: 1; scale: 1; } 98%, 100% { opacity: 0; scale: 1; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 56px; }
  .mk-phone { width: 270px; }
  .mk-stage { margin-top: 34px; }
  .mk-chip.c1 { top: -30px; right: -36px; } .mk-chip.c2 { left: -36px; }
}
@media (max-width: 420px) { .mk-chip.c1 { right: -8px; } .mk-chip.c2 { left: -8px; } .home-top .wordmark { font-size: 22px; } }
/* People who ask their device for less motion get a still page with everything visible. */
@media (prefers-reduced-motion: reduce) {
  .hero-band *, ul.features li, .home-main section > h2, ol.steps li { animation: none !important; transition: none !important; }
  .typing { display: none; }
}

/* legal pages, small print and the delete button */
.doc-top .wordmark { font-size: 22px; }
.doc { max-width: 760px; gap: 10px; padding-top: 8px; }
.doc h1 { font-size: 34px; }
.doc h2 { font-size: 19px; margin: 22px 0 4px; scroll-margin-top: 16px; }
.doc h3 { font-size: 16px; margin: 10px 0 2px; }
.doc ul, .doc ol { margin: 0 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.small { font-size: 13px; }
.foot a { color: inherit; }
.btn.danger { color: var(--err); border-color: var(--err); background: var(--surface); }
.btn.danger:hover { background: var(--err-bg); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }

/* results page */
ul.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
ul.tiles li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
ul.tiles strong { font-size: 32px; line-height: 1.1; color: var(--accent); }
ul.tiles span { font-weight: 600; }
ul.tiles small { color: var(--muted); font-size: 13px; }

/* usage bars on the plan panel */
.meter { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.meter p { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.meter progress { width: 100%; height: 10px; accent-color: var(--accent); }

/* share card with QR code, and printing it */
.share-card { text-align: center; align-items: center; display: flex; flex-direction: column; gap: 6px; }
.share-card .qr { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
ul.plain { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
@media print {
  header.top, footer.foot, .no-print, .flash { display: none !important; }
  body { background: #fff; }
  .two { display: block; }
  .share-card { border: 2px solid #000; max-width: 420px; margin: 40px auto; padding: 28px; }
  .share-card .qr { width: 320px; height: 320px; border: 0; }
}

/* ---- pilot form, setup note, company page ---- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.setup-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid #f5b82e; border-radius: 8px; background: var(--surface); }
form.inline { display: flex; gap: 6px; align-items: center; }
.company-hero { position: relative; max-width: 980px; margin: 0 auto; padding: 36px 20px 72px; }
.company-hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; margin: 8px 0 16px; max-width: 18ch; }
.company-hero .lede { max-width: 62ch; }
ul.products { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
ul.products li { display: flex; flex-direction: column; gap: 8px; }
ul.products li p { margin: 0; }
ul.products h3::before { display: none; }
.chat-log { border-left: 3px solid var(--line); padding-left: 12px; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.chat-log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
details { padding: 6px 0; border-top: 1px solid var(--line); }
details summary { cursor: pointer; }

/* ---- practice chat (test chat in the CRM, demo on the website) ---- */
.tc-log { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 60vh; overflow-y: auto; }
.tc-b { margin: 0; padding: 8px 12px; border-radius: 14px; max-width: 82%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.tc-me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.tc-ai { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.tc-photo img { display: block; max-width: 220px; max-height: 220px; border-radius: 8px; margin-bottom: 4px; }
.tc-alert { margin: 0; align-self: center; max-width: 92%; padding: 6px 12px; border-radius: 8px; border: 1px dashed #f5b82e; font-size: 0.9em; overflow-wrap: anywhere; }
.tc-form { display: flex; gap: 8px; margin-top: 10px; }
.tc-form input[type=text] { flex: 1; min-width: 0; }
.doc ul.tc-try { padding: 0; }
.tc-try li { margin: 0; }
.tc-try button { text-align: left; }
.company-band .btn { white-space: nowrap; }
.tc-try { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.tc-try button { font: inherit; }
.inline-form { display: inline; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ---- listing tips and what's new ---- */
ul.hints { margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.88em; color: var(--warm); }
ul.hints { display: flex; flex-wrap: wrap; gap: 2px 12px; }
ul.hints li { margin: 0; padding-left: 12px; position: relative; white-space: nowrap; }
ul.hints li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: #f5b82e; }
.news { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); }
.news { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.news details { flex: 1 1 260px; border: 0; padding: 0; }
.news summary { padding: 4px 0; }
.news ul { margin: 6px 0 0; padding-left: 18px; }
.news li { margin: 4px 0; }

/* ---- phones ---- */
@media (max-width: 760px) {
  /* Header: business name and sign-out on one line, the menu below it in compact rows. */
  header.top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; padding: 8px 12px; }
  header.top nav { grid-column: 1 / -1; grid-row: 2; gap: 2px; }
  header.top nav a { padding: 7px 9px; font-size: 14.5px; }
  header.top .who { font-size: 13px; }
  main { padding-left: 12px; padding-right: 12px; }
  /* Tables become one card per row, each value with its column name, so nothing is cut off sideways. */
  table.cards thead { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: auto; }
  table.cards tr { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { padding: 3px 0; border: 0; white-space: normal; }
  table.cards td:empty { display: none; }
  table.cards td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 0.85em; font-weight: 600; }
  table.cards td.actions, table.cards td form { margin-top: 4px; }
  .filters { flex-wrap: wrap; }
  .page-head { flex-direction: column; align-items: stretch; }
  .tc-b { max-width: 92%; }
  .tc-log { max-height: none; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
ul.trace { list-style: none; margin: 6px 0; padding: 0; }
ul.trace li { padding: 4px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
ul.trace .num { color: var(--muted); margin-right: 8px; white-space: nowrap; }

/* One message template on the admin WhatsApp page, laid out for copying into Meta. */
.template { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.template h3 { margin: 0 0 6px; font-size: 1rem; }
.template dl { margin: 0; }
.template textarea { min-height: 4.5em; }

/* Who a lead belongs to, on the lead's page. */
.assign { margin: 0 0 14px; align-items: center; }
.assign label { font-weight: 600; }

/* Labels on a lead. */
.pill.label { background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-weight: 500; }

/* The fees block on the Settings page. */
.fees { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 4px 0; display: grid; gap: 6px; }
.fees legend { font-weight: 600; padding: 0 4px; }
