:root {
  --bg: #f3f6f4;
  --surface: #ffffff;
  --text: #13201d;
  --muted: #56635f;
  --border: #dbe3df;
  --border-strong: #7d8a85;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --accent-hover: #0a5246;
  --accent-subtle: #e3f1ed;
  --signal: #f2b632;
  --signal-ink: #2a1d00;
  --signal-subtle: #fdf5df;
  --ok: #23743a;
  --ok-bg: #e6f3ea;
  --warn: #9a4a07;
  --warn-bg: #fcefe3;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513;
    --surface: #16201d;
    --text: #e6eeeb;
    --muted: #93a39e;
    --border: #26332f;
    --border-strong: #5f716b;
    --accent: #3cc7a8;
    --accent-ink: #04201a;
    --accent-hover: #6fd9c1;
    --accent-subtle: #0f2a24;
    --signal: #f5c04a;
    --signal-ink: #261a00;
    --signal-subtle: #2a2210;
    --ok: #6bd38a;
    --ok-bg: #11281a;
    --warn: #f59e5b;
    --warn-bg: #2c1a0c;
    --danger: #f8837a;
    --danger-bg: #2e1514;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.5rem 0 .5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0; }
h3 { font-size: 1rem; margin: 0 0 .25rem; }

.nav {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.nav { position: sticky; top: 0; z-index: 20; }
.nav nav { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nav .nav-phone { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 700; }
.nav-phone-icon { flex-shrink: 0; }
.nav-phone-label { font-weight: 500; }
@media (max-width: 720px) { .nav-phone-label { display: none; } }
.nav a { text-decoration: none; color: var(--text); }
/* One shared look for every text item in the top nav, links and the Sign out button alike. */
.nav .nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  background: none; color: var(--text); font: inherit; font-weight: 500;
}
.nav .nav-link:not(.link):not(.ghost):hover { background: var(--bg); color: var(--text); }
.nav .button.small { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; margin-left: 8px; }
.nav :is(a, button):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav nav > a[aria-current="page"] { background: var(--accent-subtle); color: var(--accent); font-weight: 650; }

.nav a.button:not(.ghost) { color: var(--accent-ink); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.brand-logo { display: inline-flex; align-items: center; gap: 8px; }
.brand-dog { display: block; width: 52px; height: 52px; flex-shrink: 0; }
.brand-wordmark { display: block; width: 156px; height: auto; }
@media (prefers-color-scheme: dark) {
  .brand-wordmark { filter: brightness(0) invert(1); }
}
@media (max-width: 480px) {
  .nav { justify-content: center; }
  .nav nav { width: 100%; justify-content: center; flex-wrap: wrap; }
}

main { padding: 0 16px 48px; margin: 0 auto; }
main.narrow { max-width: 440px; }
main.wide { max-width: 940px; }
main.hero { max-width: 760px; display: grid; gap: 24px; }
/* One shared gap prevents adjacent section margins from doubling the spacing. */
main.hero > * { margin: 0; }
main.hero > .hero-intro { margin-top: 24px; }
main.hero > .hero-top .hero-phone { margin: 0; }

.site-footer {
  padding: 16px; border-top: 1px solid var(--border); background: var(--surface); text-align: center;
}
.site-footer a { display: inline-block; padding: 10px 16px; }

.lede { font-size: 1.15rem; color: var(--muted); }
/* The listening mascot introduces the call; smartphone and switchboard art explain the service. */
.hero-dog { display: block; width: 128px; height: 128px; margin: 24px 0 -8px; }
@media (max-width: 480px) {
  .hero-dog { margin-left: auto; margin-right: auto; }
}
.hero-top { display: flex; flex-direction: column; }
@media (min-width: 720px) {
  .hero-top { flex-direction: row-reverse; align-items: center; gap: 24px; }
  .hero-top .hero-dog { flex: 0 0 auto; margin: 0; }
  .hero-top .hero-phone { flex: 1 1 auto; min-width: 0; }
  .hero-top:not(:has(.hero-phone)) { flex-direction: row; }
}
.hero-phone {
  display: grid; grid-template-columns: 1fr; align-items: center; gap: 28px; margin: 24px 0; padding: 32px 36px;
  background: #fff; color: #13201d; border: 2px solid var(--signal);
  border-radius: var(--radius); text-decoration: none;
}
.hero-phone .hero-dog { width: 320px; max-width: 100%; height: auto; margin: 0; justify-self: center; }
.hero-heading-art { display: block; width: 88px; height: auto; }
.hero-intro { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hero-intro h1 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.85rem); line-height: 1.2; }
.hero-intro .lede { margin: 6px 0 0; font-size: 1rem; line-height: 1.45; }
@media (max-width: 540px) {
  .hero-intro { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 16px; align-items: start; }
  .hero-heading-art { width: 56px; }
}
.hero-phone-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hero-phone-label { font-size: 1.05rem; font-weight: 600; }
.hero-phone-number { font-size: clamp(1.4rem, 5.6vw, 3rem); line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero-phone-qr { display: none; }
.hero-phone-digits { font-size: clamp(1.25rem, 4.4vw, 2rem); font-weight: 500; line-height: 1.3; letter-spacing: .04em; overflow-wrap: anywhere; }
.hero-phone-ready { font-size: .9rem; line-height: 1.4; margin-top: 8px; max-width: 48ch; padding: 10px 14px; background: #e3f1ed; color: #13201d; border-radius: 8px; border-left: 4px solid #0f6b5c; }
.hero-phone-action { align-self: flex-end; font-size: .95rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-phone:hover { color: #13201d; border-color: var(--signal-ink); }
.hero-phone:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (min-width: 720px) {
  .hero-phone { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; padding: 24px; }
  .hero-phone-number { font-size: clamp(1.4rem, 4vw, 2.5rem); }
  .hero-phone-qr { display: block; width: fit-content; max-width: calc(100% - 76px); margin: -12px 38px 24px auto; text-align: right; }
  .hero-phone-qr summary { display: inline-block; cursor: pointer; list-style: none; }
  .hero-phone-qr summary::-webkit-details-marker { display: none; }
  .hero-phone-qr-body { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; margin: 12px 0 0 auto; text-align: center; font-size: .8rem; line-height: 1.3; }
  .hero-phone-qr img { display: block; width: 120px; height: 120px; padding: 6px; background: #fff; border-radius: 8px; }
}
@media (max-width: 480px) {
  .hero-phone { gap: 16px; padding: 20px; }
}
.hero-contact-actions { display: flex; align-items: flex-start; gap: 12px; }
.hero-contact-actions > p { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; margin: 0; }
.hero-contact-actions > .hero-phone-qr { flex: 0 0 auto; margin: 0; }
.hero-contact-actions .hero-phone-qr summary { padding: 6px 12px; font-size: .9rem; }
.line-number { font-size: 1.1rem; }
.line-number a { text-decoration: none; }
.line-number a .muted { color: var(--muted); white-space: nowrap; }
.line-number strong { background: var(--signal); color: var(--signal-ink); padding: 1px 8px; border-radius: 6px; }
.muted { color: var(--muted); }
.back-link { margin: 20px 0 8px; font-size: .95rem; }
.back-link a { display: inline-flex; align-items: center; gap: .4em; color: var(--muted); text-decoration: none; }
.back-link a:hover, .back-link a:focus-visible { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.fineprint { color: var(--muted); font-size: .85rem; margin-top: 2rem; }

.smartphone-illustration { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 24px; margin: 32px 0; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.smartphone-illustration img { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto; }
.smartphone-illustration figcaption { display: flex; flex-direction: column; gap: 10px; }
.smartphone-illustration strong { font-size: 1.25rem; line-height: 1.3; }
.smartphone-illustration span { color: var(--muted); font-size: .95rem; }
@media (max-width: 540px) {
  .smartphone-illustration { grid-template-columns: minmax(0, 1fr); gap: 16px; text-align: center; }
  .smartphone-illustration img { max-width: 220px; margin: 0 auto; }
}
.sample-call { margin-top: 2rem; }
.transcript { list-style: none; margin: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.transcript li { max-width: 85%; display: flex; flex-direction: column; gap: 2px; }
.transcript .who { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.transcript p { margin: 0; padding: 10px 14px; border-radius: 14px; line-height: 1.4; }
.transcript .line-assistant { align-self: flex-start; }
.transcript .line-assistant p { background: var(--accent-subtle); color: var(--text); border-bottom-left-radius: 4px; }
.transcript .line-caller { align-self: flex-end; align-items: flex-end; }
.transcript .line-caller p { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.sample-call .small { font-size: .85rem; margin-top: 8px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 2rem; }
.features > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.features > .features-intro { grid-column: 1 / -1; background: none; border: 0; padding: 0; }
.features > .features-intro h2 { font-size: 1.25rem; }
.features h2 { font-size: 1rem; margin: 0 0 .25rem; }
.features p { margin: 0; color: var(--muted); font-size: .95rem; }
.protect { margin-top: 2rem; }
.protect ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px 24px; }
.protect li { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--muted); }
.protect li svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.protect li strong { color: var(--text); }
.trust-intro { color: var(--muted); margin: 0 0 1rem; }
.trust-layers { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; gap: 0; }
.trust-layer { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.trust-layer + .trust-layer { margin-top: 22px; }
.trust-layer + .trust-layer::before { content: ""; position: absolute; left: 31px; top: -23px; height: 22px; border-left: 2px dashed var(--border-strong); }
.trust-layer:nth-child(2) { margin-left: 12px; }
.trust-layer:nth-child(3) { margin-left: 24px; }
.trust-layer:nth-child(4) { margin-left: 36px; }
.trust-layer:nth-child(2)::before { left: 19px; }
.trust-layer:nth-child(3)::before { left: 19px; }
.trust-layer:nth-child(4)::before { left: 19px; }
.trust-layer h3 { margin: 0 0 2px; font-size: 1rem; }
.trust-layer p { margin: 0; font-size: .92rem; color: var(--muted); }
.trust-step { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.trust-gate { background: var(--signal-subtle); border-color: var(--signal); }
.trust-gate .trust-step { background: var(--signal); color: var(--signal-ink); }
@media (max-width: 480px) {
  .trust-layer:nth-child(n+2) { margin-left: 0; }
  .trust-layer:nth-child(n+2)::before { left: 29px; }
}
.how-it-works { margin-top: 2rem; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.how-it-works-dog { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto 20px; }
@media (min-width: 720px) {
  .how-it-works { display: flex; align-items: center; gap: 28px; }
  .how-it-works-dog { flex: 0 0 220px; margin: 0; }
  .how-it-works-copy { flex: 1; min-width: 0; }
}
.how-it-works li + li { margin-top: .75rem; }
.faq { margin-top: 2rem; }
.faq details { border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 12px; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.faq details p a { color: var(--accent); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin: 16px 0;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: .5rem; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.span2 { grid-column: span 2; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  /* iOS zooms the page in when a focused field's text is smaller than 16px; keep phone-width fields at 16px. */
  input, select, textarea { font-size: 16px; }
}

label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--bg);
  /* Keep fields at least 16px so iOS does not zoom the page when they receive focus. */
  font-size: max(16px, 1rem);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

/* Keep native contact-email checkboxes beside their wrapping, clickable labels. */
.number-email-page .number-email-choice {
  flex-direction: row; align-items: flex-start; gap: .65rem;
  margin-block: .75rem; cursor: pointer;
}
.number-email-page .number-email-choice > input[type="checkbox"] {
  flex: 0 0 1.125rem; width: 1.125rem; height: 1.125rem;
  margin: .15em 0 0; padding: 0; accent-color: var(--accent);
}
.number-email-page .number-email-choice > span { min-width: 0; overflow-wrap: anywhere; }

button, .button {
  font: inherit; font-weight: 600; cursor: pointer; display: inline-block; text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px;
}
/* The button rule above would otherwise override the hidden attribute; copy buttons stay hidden until copy-text.js enables them. */
button[data-copy-target][hidden] { display: none; }
button:not(.link):not(.ghost):hover, .button:not(.ghost):hover { background: var(--accent-hover); }
a:hover { color: var(--accent-hover); }
.nav a:hover, .dash-nav a:hover, a.button:hover { color: inherit; }
a.button:not(.ghost):hover, .nav a.button:not(.ghost):hover { color: var(--accent-ink); }
button.link:hover { color: var(--accent-hover); }
button.link.danger:hover { color: var(--danger); text-decoration: underline; }
.filters button:hover:not(.active) { background: transparent; color: var(--text); }
.filters button.active:hover { background: var(--text); }

button.small, .button.small { padding: 6px 12px; font-size: .9rem; }
.button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 20px 0 32px; }
.operator-setup { display: flex; align-items: center; gap: 24px; margin: 24px 0; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.operator-setup-art { display: block; width: 160px; height: auto; flex: 0 0 160px; }
.operator-setup-copy { flex: 1; min-width: 0; }
.operator-setup-copy h2 { margin: 0 0 8px; font-size: 1.25rem; line-height: 1.3; }
.operator-setup-copy > p { margin-top: 0; }
.operator-setup .hero-actions { margin-bottom: 0; }
/* Alternate artwork placement across the illustrated cards on wider screens. */
@media (min-width: 541px) {
  .operator-setup { flex-direction: row-reverse; }
  .smartphone-illustration { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .smartphone-illustration img { grid-column: 2; grid-row: 1; }
  .smartphone-illustration figcaption { grid-column: 1; grid-row: 1; }
}
@media (max-width: 540px) {
  .operator-setup { flex-direction: column; gap: 16px; text-align: center; }
  .operator-setup-art { width: 140px; flex-basis: auto; }
  .operator-setup .hero-actions { justify-content: center; }
}
.button.hero-signup {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  min-height: 60px; padding: 16px 28px; font-size: 1.2rem; font-weight: 700;
  box-shadow: 0 6px 16px rgb(0 0 0 / .16);
}
.hero-signup:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
@media (max-width: 480px) {
  .hero-actions { justify-content: center; }
  .button.hero-signup { width: 100%; }
}
button.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
button.link.danger { color: var(--danger); }
form.inline { display: inline; }
.htmx-request button[type=submit], button.htmx-request { opacity: .6; }

table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: .95rem; }
th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
th, td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
td.right { text-align: right; }
@media (max-width: 640px) {
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  td { border: 0; padding: 2px 0; }
  td.right { text-align: left; }
}

.notice { border-radius: 8px; padding: 10px 12px; margin: 12px 0 0; }
.notice.inline { display: inline; padding: 4px 8px; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.error { background: var(--danger-bg); color: var(--danger); }
.notice.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.pill { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.danger { background: var(--danger-bg); color: var(--danger); }

details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }

/* Help: readable steps, jump links and a keypad reference without JavaScript. */
.help-topics { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0; }
.help section { scroll-margin-top: 16px; }
.help li + li { margin-top: 8px; }
.help details { border-top: 1px solid var(--border); padding-top: 12px; }
.help details p:last-child { margin-bottom: 0; }
.help-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 0; }
.help-keys > div { display: flex; align-items: baseline; gap: 12px; }
.help-keys dt { min-width: 32px; padding: 3px 8px; text-align: center; font-weight: 700; border: 1px solid var(--border-strong); border-radius: 6px; }
.help-keys dd { margin: 0; }

.passphrase { margin-top: 12px; }
.passphrase .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.passphrase form.reveal { display: flex; gap: 8px; margin-top: 8px; max-width: 420px; }
.passphrase form.reveal input { flex: 1; }
.passphrase .revealed { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--signal-subtle); color: var(--text); padding: 2px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--signal); }
.muted.small, p.small { font-size: .85rem; margin: 6px 0 0; }
.lock-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.summary { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.summary-text { white-space: pre-wrap; margin: 8px 0 0; }
.contact-import { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.contact-import h3 { margin: 0; }
.contact-import input[type=search] { margin: 10px 0; }
.import-list { list-style: none; padding: 0; margin: 8px 0 12px; max-height: 360px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.import-list li { border-bottom: 1px solid var(--border); }
.import-list li:last-child { border-bottom: 0; }
.import-list label { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; font-weight: 400; cursor: pointer; }
.import-list input[type=checkbox] { width: auto; }
/* Rows that can't be imported dim, but the reason why (.problem) stays at full contrast. */
.import-list li.dim > label > :not(.item), .import-list li.dim .item > :not(.problem) { opacity: .55; }
.import-list .muted { margin-left: 6px; font-size: .9rem; }
.contact-import .row { display: flex; align-items: center; gap: 12px; }
.share-items { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin: 0; max-height: 260px; overflow-y: auto; }
.share-items legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; padding: 4px 0; }
label.check input { width: auto; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.nowrap { white-space: nowrap; }
button.link.family-toggle { color: var(--muted, #6b7280); margin-right: 8px; }
button.link.family-toggle.on { color: var(--ok); }
.sent-shares { margin-top: 16px; }

/* Dashboard: sticky section menu */
.dash-nav {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 4px; overflow-x: auto;
  margin: 16px -16px 0; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a {
  flex: 0 0 auto; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem;
  padding: 6px 12px; border-radius: 999px;
}
.dash-nav a:hover { color: var(--text); }
.dash-nav a.active { background: var(--accent-subtle); color: var(--accent); }
.dash-group { scroll-margin-top: 64px; }

/* Lists first: add forms fold behind a button */
details.add-form { margin-top: 12px; }
details.add-form > summary {
  display: inline-block; list-style: none; cursor: pointer; font-weight: 600; font-size: .92rem;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--text);
}
details.add-form > summary::-webkit-details-marker { display: none; }
details.add-form[open] > summary { margin-bottom: 4px; }

/* Read-only summary of saved details */
dl.summary-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 8px 0 0; }
dl.summary-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.summary-update { overflow-wrap: anywhere; }
.summary-update button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
dl.summary-list dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

/* Inline edit rows */
tr.edit-row td { background: var(--bg); padding: 12px; }
tr.edit-row form.grid { margin-top: 0; }

/* Activity timeline */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.filters button {
  background: transparent; color: var(--muted); border: 1px solid var(--border-strong); padding: 5px 12px; font-size: .88rem;
}
.filters button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
ul.timeline { list-style: none; padding: 0; margin: 0; }
ul.timeline li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
ul.timeline li:last-child { border-bottom: 0; }
ul.timeline .when { min-width: 110px; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
ul.timeline .detail { flex-basis: 100%; padding-left: 120px; font-size: .92rem; }
ul.timeline details.summary-item { flex: 1; min-width: 220px; }
ul.timeline details.summary-item > summary { cursor: pointer; }
@media (max-width: 640px) {
  ul.timeline .detail { padding-left: 0; }
}

/* Coming up */
.heads-up { border-color: var(--signal); background: var(--signal-subtle); }
.heads-up h2 { margin-bottom: 8px; }
.heads-up ul { margin: 0; padding-left: 18px; }
.heads-up li { margin: 6px 0; }
.heads-up a { margin-left: 4px; font-weight: 600; }

/* Backup: import a filled-in template, download a copy */
.vault ol.steps { padding-left: 20px; margin: 4px 0 8px; }
.vault ol.steps li { margin: 2px 0; }
.vault form.reveal { display: flex; gap: 8px; margin-top: 8px; max-width: 420px; }
.vault form.reveal input { flex: 1; }
.vault h3 { margin: 14px 0 4px; }
.vault ul.skipped { padding-left: 18px; margin: 0 0 8px; }
.vault .import-list label { align-items: flex-start; }
.vault .import-list input[type=checkbox] { margin-top: 5px; }
.vault .import-list .item { display: flex; flex-direction: column; gap: 2px; }
.vault .import-list .item .line { margin-left: 0; overflow-wrap: anywhere; }
.vault .import-list .problem { color: var(--danger); }
.vault .row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }

/* Kit search: the form on the plain search page, and the hit list on both pages */
.kit-search { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.kit-search input[type=search] { flex: 1; }
.search-hits { list-style: none; padding: 0; margin: 8px 0 0; }
.search-hits li + li { border-top: 1px solid var(--border); }
.search-hits a { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 2px 14px; padding: 10px 0; text-decoration: none; color: var(--text); }
.search-hits a:hover strong, .search-hits a:focus-visible strong { color: var(--accent); text-decoration: underline; }
.search-hits strong { overflow-wrap: anywhere; }
.search-section { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: .25em; }
.search-hits .muted { grid-column: 2; font-size: .85rem; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .search-hits a { grid-template-columns: 1fr; gap: 2px; }
  .search-hits .muted { grid-column: auto; }
}
mark.search-match { background: var(--accent-subtle); color: var(--accent); font-weight: 600; border-radius: 3px; padding: 0 2px; }

/* Signed-in chat page: Messages-style conversation */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main.chat {
  --sent: #0a84ff; --sent-ink: #fff; --recv: #e9e9eb; --recv-ink: #000; --chat-bg: #fff; --bar-bg: rgba(246,246,248,.88);
  max-width: 760px; margin: 0 auto; padding: 12px 0 0;
}
@media (prefers-color-scheme: dark) {
  main.chat { --recv: #26262a; --recv-ink: #fff; --chat-bg: #000; --bar-bg: rgba(29,29,31,.88); }
}
.messages-app {
  display: flex; flex-direction: column; height: calc(100dvh - 140px); min-height: 460px;
  background: var(--chat-bg); border: 1px solid var(--border); border-radius: 22px; overflow: hidden;
}
.messages-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 14px 6px;
  background: var(--bar-bg); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--border);
}
.messages-back { justify-self: start; text-decoration: none; color: var(--sent); font-size: 1.05rem; }
.messages-back span { font-size: 1.7rem; line-height: 1; vertical-align: -2px; }
.messages-contact { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.messages-avatar { border-radius: 50%; background: var(--accent-subtle); object-fit: cover; }
.messages-name { font-size: .75rem; margin-top: 2px; }
.messages-sub { font-size: .68rem; color: var(--muted); }
.messages-reset { justify-self: end; margin: 0; }
.messages-reset button { background: none; border: 0; padding: 4px; color: var(--sent); font: inherit; font-size: .95rem; cursor: pointer; }
.messages-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; }
.messages-log { display: flex; flex-direction: column; }
.messages-note, .messages-foot { color: var(--muted); font-size: .75rem; text-align: center; margin: 0 auto 14px; max-width: 460px; }
.messages-foot { margin: 6px 14px 10px; }
.bubble-row.earlier { opacity: .7; }
.messages-divider { margin-top: 14px; }
.linklike { background: none; border: 0; padding: 0 0 0 6px; color: var(--sent); font: inherit; cursor: pointer; text-decoration: underline; }
.messages-empty { text-align: center; color: var(--muted); margin: 18px 0; }
.messages-suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.messages-suggestions button {
  background: var(--chat-bg); color: var(--sent); border: 1px solid var(--sent); border-radius: 18px;
  padding: 7px 14px; font: inherit; font-size: .9rem; cursor: pointer;
}
.messages-error { margin: 0; padding: 8px 16px; text-align: center; font-size: .85rem; color: var(--danger); background: var(--danger-bg); }
.bubble-row { display: flex; margin-top: 2px; }
.bubble-row.sent { justify-content: flex-end; }
.bubble-row.sent + .bubble-row.received, .bubble-row.received + .bubble-row.sent { margin-top: 10px; }
.bubble {
  position: relative; margin: 0; max-width: 75%; padding: 7px 14px; border-radius: 18px;
  line-height: 1.3; font-size: 1rem;
}
.sent .bubble { background: var(--sent); color: var(--sent-ink); }
.received .bubble { background: var(--recv); color: var(--recv-ink); }
.bubble.tail::before, .bubble.tail::after { content: ""; position: absolute; bottom: 0; height: 18px; }
.sent .bubble.tail::before { right: -7px; width: 20px; background: var(--sent); border-bottom-left-radius: 16px 14px; }
.sent .bubble.tail::after { right: -26px; width: 26px; background: var(--chat-bg); border-bottom-left-radius: 10px; }
.received .bubble.tail::before { left: -7px; width: 20px; background: var(--recv); border-bottom-right-radius: 16px 14px; }
.received .bubble.tail::after { left: -26px; width: 26px; background: var(--chat-bg); border-bottom-right-radius: 10px; }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: #8e8e93; animation: typing 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; } }
.composer { margin: 0; padding: 8px 12px 4px; background: var(--chat-bg); }
.composer-field {
  display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 4px 4px 4px 14px; background: var(--chat-bg);
}
.composer-field:focus-within { border-color: var(--sent); }
#chat-form textarea {
  flex: 1; margin: 0; padding: 6px 0; border: 0; outline: 0; resize: none; background: transparent;
  color: var(--text); font: inherit; line-height: 1.3; max-height: 140px; box-shadow: none;
}
#chat-send {
  flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--sent);
  color: #fff; font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer;
}
#chat-send:disabled { background: #c7c7cc; cursor: default; opacity: 1; }
@media (max-width: 600px) {
  main.chat { padding-top: 0; }
  .messages-app { border-radius: 0; border-left: 0; border-right: 0; height: calc(100dvh - 110px); }
  .bubble { max-width: 82%; }
}
.messages-reset button:hover { background: none; color: var(--sent); text-decoration: underline; }
.messages-suggestions button:hover { background: var(--sent); color: #fff; }
#chat-form textarea:focus { outline: 0; }
#chat-send:hover:not(:disabled) { background: #0071e3; }
#chat-send:disabled:hover { background: #c7c7cc; }

/* Call-flow visual and page background motif (shared by the landing page and Help). */
body { background-image: url("/brand/operator-bg-pattern.svg"); background-repeat: repeat; }
.call-flow { margin: 0; }
.call-flow-section > h2 { margin: 0 0 12px; font-size: 1.25rem; }
.call-flow-steps { list-style: none; margin: 16px 0 8px; padding: 0; display: grid; gap: 12px; counter-reset: flow; }
.call-flow-step { position: relative; display: grid; gap: 2px; padding: 14px 14px 14px 64px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); counter-increment: flow; }
.call-flow-step .call-flow-icon { position: absolute; left: 14px; top: 14px; box-sizing: content-box; padding: 8px; border-radius: 50%; background: var(--accent-subtle); color: var(--accent); }
.call-flow-step:last-child .call-flow-icon { background: var(--signal-subtle); color: var(--signal-ink); }
.call-flow-step::before { content: counter(flow); position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.call-flow-note { color: var(--muted); font-size: .875rem; }
@media (min-width: 760px) {
  .call-flow-steps { grid-template-columns: repeat(5, 1fr); gap: 20px; }
  .call-flow-step { padding: 64px 12px 14px; text-align: center; }
  .call-flow-step .call-flow-icon { left: 50%; transform: translateX(-50%); }
  .call-flow-step:not(:last-child)::after { content: "\2192"; position: absolute; right: -16px; top: 28px; color: var(--muted); }
}
@media (prefers-color-scheme: dark) { body { background-image: none; } }
