/* Backlit Never-Miss demo. Brand tokens match the Backlit Labs site. */
:root {
  --bg: #000;
  --ink: #f4f7ff;
  --muted: #a6aec0;
  --dim: #7f879a;
  --glow: #8fb0ff;
  --ok: #7ef0b6;
  --warn: #ffc27a;
  --bad: #ff8a9b;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018));
  --glow-soft: 0 0 0 1px rgba(143, 176, 255, .35), 0 0 22px rgba(143, 176, 255, .28);
  --radius: 22px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); }
body { margin: 0; line-height: 1.5; position: relative; overflow-x: hidden; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--glow); text-underline-offset: 2px; }
::selection { background: rgba(143, 176, 255, .35); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(143, 176, 255, .18), 0 0 24px rgba(143, 176, 255, .45); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 20; background: var(--ink); color: #000; padding: 8px 14px; border-radius: 99px; font-weight: 600; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* Ambient backlight: a soft blue bloom with a thin horizontal light, echoing the B logo bar */
.backlight { position: absolute; inset: 0 0 auto; height: min(900px, 100%); pointer-events: none; z-index: 0; overflow: hidden; }
.backlight::before {
  content: ""; position: absolute; left: 50%; top: -340px; width: 1200px; height: 760px; transform: translateX(-30%);
  background: radial-gradient(closest-side, rgba(143, 176, 255, .16), rgba(143, 176, 255, .05) 55%, transparent);
}
.backlight::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 176, 255, .55) 30%, rgba(244, 247, 255, .8) 50%, rgba(143, 176, 255, .55) 70%, transparent);
}

.shell { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 18px 28px 8px; }

/* Sample banner */
.banner {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0 auto;
  padding: 7px 16px; border-radius: 99px; border: 1px solid rgba(255, 194, 122, .38);
  background: rgba(255, 194, 122, .08); color: var(--warn);
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: center;
  box-shadow: 0 0 24px rgba(255, 194, 122, .12);
}
.banner-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 10px var(--warn); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0 22px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { flex: none; width: 72px; height: 72px; margin: -10px -6px -10px -12px; overflow: visible; filter: drop-shadow(0 0 14px rgba(143, 176, 255, .45)); }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 8px var(--glow), 0 0 2px #fff; }
.eyebrow .sep { color: var(--dim); }
h1 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin-top: 4px; text-shadow: 0 0 24px rgba(143, 176, 255, .55), 0 0 60px rgba(143, 176, 255, .25); }
h1 .sample { color: var(--muted); font-weight: 500; text-shadow: none; }
h2 { font-size: 1.3rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
h3 { font-size: .72rem; font-family: var(--mono); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; }
.sample-tag { font-style: normal; font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; color: var(--warn); border: 1px solid rgba(255, 194, 122, .35); border-radius: 99px; padding: 1px 6px; vertical-align: 1px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  border: 1px solid transparent; border-radius: 99px; padding: 10px 22px; cursor: pointer;
  font-weight: 600; font-size: .95rem; letter-spacing: -.005em; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, opacity .2s;
}
.btn.primary { background: var(--ink); color: #05060a; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 0 26px rgba(143, 176, 255, .45), 0 0 60px rgba(143, 176, 255, .18); }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 0 34px rgba(143, 176, 255, .65), 0 0 80px rgba(143, 176, 255, .25); }
.btn.ghost { background: rgba(255, 255, 255, .02); border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: rgba(143, 176, 255, .55); background: rgba(143, 176, 255, .06); }
.btn.small { min-height: 38px; padding: 7px 16px; font-size: .86rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.primary:disabled { background: rgba(255, 255, 255, .06); color: var(--muted); border-color: var(--line-2); opacity: 1; }

/* Tabs: a glass segmented control */
.tabs {
  display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 0 0 22px; padding: 5px;
  border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .025);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.tabs [role=tab] {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 18px; border: 1px solid transparent; border-radius: 99px;
  background: none; color: var(--muted); font-weight: 550; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: color .2s, background .25s var(--ease), border-color .25s, box-shadow .25s;
}
.tabs [role=tab]:hover { color: var(--ink); }
.tab-n { font-family: var(--mono); font-size: .66rem; color: var(--dim); letter-spacing: .06em; transition: color .2s; }
.tabs [aria-selected=true] {
  color: var(--ink); background: rgba(143, 176, 255, .1); border-color: rgba(143, 176, 255, .38);
  box-shadow: 0 0 20px rgba(143, 176, 255, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tabs [aria-selected=true] .tab-n { color: var(--glow); }

/* Sub-tabs: only shown when the two panes of a view would otherwise stack */
.subtabs {
  display: none; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02);
}
.subtabs [role=tab] {
  min-height: 40px; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: none; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: .88rem; transition: color .2s, background .25s var(--ease), border-color .25s;
}
.subtabs [role=tab]:hover { color: var(--ink); }
.subtabs [aria-selected=true] { color: var(--ink); background: rgba(143, 176, 255, .1); border-color: rgba(143, 176, 255, .38); box-shadow: 0 0 16px rgba(143, 176, 255, .18); }

main { padding-bottom: 28px; }
main > [role=tabpanel]:not([hidden]) { animation: panel-in .45s var(--ease); }

/* Glass panels */
.glass {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 80px -40px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* Form fields */
.field { display: grid; gap: 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); min-width: 0; }
.field input, .field select, .composer input {
  width: 100%; min-width: 0; min-height: 42px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(0, 0, 0, .5); color: var(--ink); font-family: var(--sans); font-size: .92rem; letter-spacing: 0; text-transform: none;
  transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.field select option { background: #0b0d12; color: var(--ink); }
.field input::placeholder, .composer input::placeholder { color: var(--dim); }
.field input:hover, .field select:hover { border-color: rgba(143, 176, 255, .4); }

/* ---------------- Inbox ---------------- */
.inbox { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.list-pane { overflow: hidden; display: flex; flex-direction: column; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.count { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 12px 18px 4px; }
.contacts { flex: 1 1 0; min-height: 560px; -webkit-mask-image: linear-gradient(#000 calc(100% - 40px), transparent); mask-image: linear-gradient(#000 calc(100% - 40px), transparent); list-style: none; margin: 0; padding: 6px 6px 30px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.row {
  display: grid; gap: 6px; width: 100%; text-align: left; background: none; border: 1px solid transparent; border-radius: 14px; padding: 12px; cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.row:hover { background: rgba(255, 255, 255, .035); }
.row.active { background: rgba(143, 176, 255, .08); border-color: rgba(143, 176, 255, .35); box-shadow: 0 0 22px rgba(143, 176, 255, .12); }
.row-top, .row-mid { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-top { justify-content: space-between; }
.name { font-weight: 600; letter-spacing: -.01em; }
.when, .visit { font-size: .76rem; color: var(--dim); }
.when { font-family: var(--mono); font-size: .68rem; white-space: nowrap; }
.preview { font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 16px; }

.chan { font-size: .68rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.ch-call { color: #b8ccff; border-color: rgba(143, 176, 255, .35); }
.ch-sms { color: var(--ok); border-color: rgba(126, 240, 182, .3); }
.ch-web { color: #d4c2ff; border-color: rgba(212, 194, 255, .3); }
.ch-facebook { color: #9fc3ff; border-color: rgba(159, 195, 255, .3); }
.ch-instagram { color: #ffb3d1; border-color: rgba(255, 179, 209, .3); }
.ch-google { color: var(--warn); border-color: rgba(255, 194, 122, .3); }

.score { display: inline-grid; place-items: center; min-width: 30px; font-family: var(--mono); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 7px; }
.score.hot { background: rgba(255, 138, 155, .12); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 138, 155, .3); }
.score.warm { background: rgba(255, 194, 122, .1); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255, 194, 122, .28); }
.score.cold { background: rgba(255, 255, 255, .05); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }

.flags { display: flex; flex-wrap: wrap; gap: 5px; }
.flag { font-size: .66rem; font-family: var(--mono); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--dim); }
.flag.on { color: var(--ok); border-color: rgba(126, 240, 182, .28); background: rgba(126, 240, 182, .06); }
.flag.stop { color: #1a0509; background: var(--bad); border-color: transparent; font-weight: 700; }

.detail-pane { display: grid; align-content: start; padding: 22px; min-height: 340px; min-width: 0; }
.detail-pane.empty { align-content: center; }
.detail-pane > .btn { justify-self: start; }
.detail-pane:focus { outline: none; }
.placeholder { display: grid; justify-items: center; gap: 16px; padding: 40px 0; text-align: center; color: var(--muted); }
.ph-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-list li { font-size: .84rem; color: var(--dim); padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255, 255, 255, .02); }
.detail-head { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.detail-head h2 { font-size: 1.5rem; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.facts dt, .strip-facts dt { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.facts dd { margin: 2px 0 0; font-weight: 600; text-transform: capitalize; }

/* Inbox thread */
.thread { position: relative; list-style: none; margin: 0; padding: 18px 4px 18px 0; display: grid; gap: 12px; max-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.thread:focus-visible { outline-offset: 2px; border-radius: 12px; }
.msg { display: grid; max-width: 78%; gap: 4px; }
.msg.in { justify-self: start; }
.msg.out { justify-self: end; justify-items: end; }
.bubble { padding: 10px 14px; border-radius: 20px; background: #1b1e26; color: var(--ink); text-align: left; overflow-wrap: anywhere; line-height: 1.4; }
.msg.in .bubble { border-bottom-left-radius: 6px; }
.msg.out .bubble, .sms.out .bubble {
  background: linear-gradient(180deg, #b4c8ff, #87a6f7); color: #060812;
  box-shadow: 0 0 22px rgba(143, 176, 255, .25);
}
.msg.out .bubble { border-bottom-right-radius: 6px; }
.msg.out .bubble a, .sms.out .bubble a { color: #0b1a52; }
.meta { font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; color: var(--dim); }
.sys { justify-self: center; text-align: center; font-size: .82rem; display: grid; gap: 2px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--muted); }
.sys.k-missed_call, .sys.k-no_show { color: var(--bad); border-color: rgba(255, 138, 155, .25); }
.sys.k-booking, .sys.k-showed { color: var(--ok); border-color: rgba(126, 240, 182, .25); }
.sys.k-textback_skipped { color: var(--warn); border-color: rgba(255, 194, 122, .28); }
.sys .meta { color: inherit; opacity: .8; }

.composer { display: flex; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); margin-bottom: 14px; }
.composer input { flex: 1; border-radius: 99px; padding-left: 18px; }

/* Tags, appointment */
.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; color: #c9d7ff; background: rgba(143, 176, 255, .1); border: 1px solid rgba(143, 176, 255, .3); white-space: nowrap; }
.appt {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 14px;
  border: 1px solid rgba(143, 176, 255, .3); border-radius: 14px; background: rgba(143, 176, 255, .06);
  box-shadow: inset 3px 0 0 var(--glow), 0 0 26px rgba(143, 176, 255, .1);
}
.appt-when { font-size: .95rem; }
.appt-what { grid-column: 1; font-size: .84rem; color: var(--muted); }
.appt-status { display: inline-block; font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); }
.appt .appt-status { grid-column: 2; grid-row: 1 / span 2; }
.appt-status.s-booked { color: #c9d7ff; border-color: rgba(143, 176, 255, .45); background: rgba(143, 176, 255, .1); }
.appt-status.s-confirmed { color: var(--warn); border-color: rgba(255, 194, 122, .45); background: rgba(255, 194, 122, .08); }
.appt-status.s-showed { color: var(--ok); border-color: rgba(126, 240, 182, .45); background: rgba(126, 240, 182, .08); box-shadow: 0 0 16px rgba(126, 240, 182, .2); }

/* ---------------- Phone mockup ---------------- */
.stage { position: relative; display: grid; justify-items: center; padding: 10px 0 18px; isolation: isolate; }
.stage::before { /* bloom behind the phone */
  content: ""; position: absolute; z-index: -1; left: 50%; top: 46%; width: min(560px, 100vw); height: 620px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(143, 176, 255, .22), rgba(143, 176, 255, .06) 60%, transparent);
}
.stage::after { /* the light bar, like the B */
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 46%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(143, 176, 255, .55) 15%, #f4f7ff 50%, rgba(143, 176, 255, .55) 85%, transparent);
  box-shadow: 0 0 14px 2px rgba(143, 176, 255, .6), 0 0 40px 6px rgba(143, 176, 255, .25);
}
@media (min-width: 981px) {
  .stage::after { left: -90px; right: -90px; }
  .sim .stage::after { left: -160px; right: 0; }
}
.device {
  position: relative; width: min(340px, 100%); height: 680px; padding: 12px; border-radius: 56px;
  background: linear-gradient(160deg, #2a2d35, #0d0e12 30%, #07080a 70%, #24272e);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 7px #050506,
    0 0 0 8px rgba(255, 255, 255, .1), 0 40px 90px -20px rgba(0, 0, 0, .9), 0 0 70px rgba(143, 176, 255, .22);
  display: grid; grid-template-rows: 50px auto minmax(0, 1fr) auto;
}
.device::before { /* screen */
  content: ""; position: absolute; inset: 12px; border-radius: 44px; background: radial-gradient(120% 60% at 50% 0%, #0e1220, #050608 60%); z-index: 0;
}
.device > * { position: relative; z-index: 1; }
.island { position: absolute; z-index: 3; top: 23px; left: 50%; width: 104px; height: 30px; transform: translateX(-50%); border-radius: 20px; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .04); }
.island::after { content: ""; position: absolute; right: 12px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #26304a, #06070a 70%); }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 0 34px; font-size: .86rem; font-weight: 650; letter-spacing: -.01em; }
.sb-time { font-variant-numeric: tabular-nums; }
.sb-icons { display: flex; gap: 5px; align-items: center; color: var(--ink); fill: currentColor; }
.device-head { display: grid; justify-items: center; gap: 4px; padding: 8px 14px 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); text-align: center; background: rgba(10, 12, 18, .6); }
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 650; font-size: .9rem; color: #0a0d18;
  background: linear-gradient(160deg, #dfe7ff, #8fa6e6);
}
.avatar.ghost { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-2); }
.avatar.missed { background: rgba(255, 255, 255, .08); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.who { display: grid; line-height: 1.25; }
.who strong { font-size: .86rem; font-weight: 600; }
.who > span { font-size: .7rem; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.device-body { overflow-y: auto; overflow-x: hidden; padding: 4px 14px 10px; scrollbar-width: none; overscroll-behavior: contain; }
.device-body::-webkit-scrollbar { display: none; }
.device-foot { display: flex; align-items: center; padding: 8px 16px 22px; position: relative; }
.device-foot::after { content: ""; position: absolute; bottom: 8px; left: 50%; width: 120px; height: 4px; border-radius: 4px; transform: translateX(-50%); background: rgba(255, 255, 255, .55); }
.fake-input { flex: 1; padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .14); color: var(--dim); font-size: .8rem; }

.sms-list { list-style: none; margin: 0; padding: 6px 0 0; display: grid; gap: 6px; }
.sms { display: grid; max-width: 82%; gap: 3px; }
.sms.in { justify-self: start; }
.sms.out { justify-self: end; justify-items: end; }
.sms .bubble { font-size: .84rem; padding: 8px 12px; border-radius: 18px; }
.sms.in .bubble { border-bottom-left-radius: 5px; background: #20232c; }
.sms.out .bubble { border-bottom-right-radius: 5px; }
.sms .meta { font-size: .56rem; padding: 0 6px; }
.stamp { justify-self: center; margin: 10px 0 2px; font-size: .66rem; color: var(--dim); }
.stamp strong { color: var(--muted); font-weight: 600; }
.sysline {
  justify-self: center; display: grid; justify-items: center; gap: 1px; max-width: 92%; margin: 4px 0; padding: 7px 12px; text-align: center;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-size: .72rem; color: var(--muted);
}
.sys-label { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }
.sysline.k-missed_call { color: var(--bad); border-color: rgba(255, 138, 155, .3); background: rgba(255, 138, 155, .05); }
.sysline.k-booking, .sysline.k-showed { color: var(--ok); border-color: rgba(126, 240, 182, .3); background: rgba(126, 240, 182, .05); }
.sysline.k-textback_skipped { color: var(--warn); border-color: rgba(255, 194, 122, .3); }
.sysline.k-next { color: #c9d7ff; border-color: rgba(143, 176, 255, .3); background: rgba(143, 176, 255, .05); }
.typing { justify-self: start; display: flex; gap: 4px; padding: 11px 13px; border-radius: 18px; border-bottom-left-radius: 5px; background: #20232c; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.1s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
.phone-empty { display: grid; justify-items: center; align-content: center; gap: 18px; height: 100%; min-height: 220px; padding: 0 22px; text-align: center; color: var(--dim); font-size: .84rem; }
.pulse-ring { display: grid; place-items: center; color: var(--glow); width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(143, 176, 255, .5); box-shadow: 0 0 22px rgba(143, 176, 255, .35), inset 0 0 14px rgba(143, 176, 255, .25); animation: breathe 2.6s infinite ease-in-out; }
.toast {
  position: absolute; z-index: 4; top: 60px; left: 22px; right: 22px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 18px; background: #20232c; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6); font-size: .74rem; line-height: 1.3; color: var(--muted);
  opacity: 0; transform: translateY(-14px) scale(.96); pointer-events: none;
}
.toast strong { color: var(--ink); }
.toast-ico { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(160deg, #ffb3bf, #e5566e); box-shadow: 0 0 14px rgba(255, 138, 155, .4); }
.toast-now { align-self: start; font-size: .64rem; color: var(--dim); }
.toast.show { animation: toast 2.8s var(--ease) forwards; }

/* First frame: missed-call notification and call log, shown before anything runs */
.phone-preview { display: flex; flex-direction: column; gap: 10px; min-height: 100%; padding-top: 4px; }
.phone-preview .stamp { align-self: center; }
.phone-preview .sysline { align-self: center; margin: 2px 0 0; }
.phone-preview .pv-hint { margin-top: auto; }
.phone-preview .stamp { margin-top: 6px; }
.notif {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 18px;
  background: #20232c; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
  font-size: .74rem; line-height: 1.3; color: var(--muted); animation: rise .5s var(--ease) both;
}
.notif strong { color: var(--ink); }
.pv-h { margin-top: 6px; font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.recents { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .07); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.recents li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; }
.rc-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--bad); background: rgba(255, 138, 155, .1); box-shadow: inset 0 0 0 1px rgba(255, 138, 155, .3); }
.rc-ico svg { width: 16px; height: 16px; }
.rc-who { display: grid; line-height: 1.3; min-width: 0; }
.rc-who strong { font-size: .84rem; color: var(--bad); font-weight: 600; }
.rc-who span { font-size: .66rem; color: var(--dim); overflow-wrap: anywhere; }
.rc-t { align-self: start; font-family: var(--mono); font-size: .6rem; color: var(--dim); white-space: nowrap; }
.pv-hint {
  padding: 10px 12px; border-radius: 14px; border: 1px dashed rgba(143, 176, 255, .35);
  background: rgba(143, 176, 255, .05); color: var(--muted); font-size: .76rem; line-height: 1.4; text-align: center;
}

/* ---------------- Missed call ---------------- */
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 28px; align-items: center; }
.sim-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; align-self: stretch; }
.rules-wrap { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.rules-wrap summary { width: fit-content; cursor: pointer; list-style: none; border-radius: 6px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.rules-wrap summary::-webkit-details-marker { display: none; }
.rules-wrap summary::after { content: " +"; }
.rules-wrap[open] summary::after { content: " -"; }
.rules-wrap summary:hover { color: var(--ink); }
.rules { list-style: none; margin: 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rules li { display: grid; gap: 6px; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.rules .mono-n { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; }
.sim-card h2 { font-size: 1.6rem; }
.sim-card .btn { align-self: flex-start; }
.steps { list-style: none; margin: 4px 0 0; padding: 0 0 0 18px; display: grid; gap: 12px; border-left: 1px solid var(--line-2); }
.steps:empty { display: none; }
.steps li { position: relative; font-size: .9rem; color: var(--muted); animation: rise .45s var(--ease) both; }
.steps li::before { content: ""; position: absolute; left: -23px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.steps li strong { font-family: var(--mono); font-size: .74rem; font-weight: 600; color: var(--ink); margin-right: 6px; }
.steps li.ok::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.steps li.warn { color: var(--warn); }
.steps li.todo { color: var(--dim); animation: none; }
.steps li.todo::before { background: #050506; border: 1px solid rgba(143, 176, 255, .5); box-shadow: none; }
.steps li.warn::before { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

/* ---------------- Report ---------------- */
.report { padding: 30px; }
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.report-head h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); margin: 8px 0 4px; letter-spacing: -.035em; }
.hero-stat { display: grid; justify-items: end; text-align: right; }
.hero-stat .lbl { max-width: 220px; }
.num { font-size: 2.2rem; font-weight: 650; line-height: 1.05; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.num.big { font-size: clamp(3.2rem, 2.4rem + 3vw, 4.8rem); color: var(--ink); text-shadow: 0 0 30px rgba(143, 176, 255, .7), 0 0 80px rgba(143, 176, 255, .35); }
.lbl { font-size: .84rem; color: var(--muted); }
.tiles { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tiles li {
  position: relative; display: grid; grid-template-rows: 1fr auto; gap: 10px; padding: 16px 18px 18px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .02);
  animation: rise .5s var(--ease) both;
}
.tiles li:nth-child(2) { animation-delay: .04s; } .tiles li:nth-child(3) { animation-delay: .08s; }
.tiles li:nth-child(4) { animation-delay: .12s; } .tiles li:nth-child(5) { animation-delay: .16s; } .tiles li:nth-child(6) { animation-delay: .2s; }
.tiles li:nth-child(7) { animation-delay: .24s; } .tiles li:nth-child(8) { animation-delay: .28s; } .tiles li:nth-child(9) { animation-delay: .32s; }
.tiles .lbl { display: flex; gap: 8px; align-items: baseline; font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mono-n { color: var(--glow); }
.meter { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--w) * 100%); background: linear-gradient(90deg, rgba(143, 176, 255, .2), var(--glow)); box-shadow: 0 0 12px var(--glow); transform-origin: left; animation: grow .9s var(--ease) both .2s; }
.report-copy { display: grid; gap: 14px; max-width: 780px; }
.summary { font-size: 1.08rem; line-height: 1.65; color: #d7dcea; }
.tip { padding: 12px 16px; border-radius: 14px; color: var(--ok); background: rgba(126, 240, 182, .06); border: 1px solid rgba(126, 240, 182, .25); }

/* ---------------- Full flow ---------------- */
.flow-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; padding: 26px 28px; margin-bottom: 22px; }
.flow-intro { display: grid; gap: 8px; max-width: 640px; }
.flow-intro h2 { font-size: 1.6rem; }
.flow-controls { display: flex; flex-wrap: wrap; gap: 10px; align-self: end; justify-content: flex-end; }
.rail-wrap, .strip-facts { grid-column: 1 / -1; }
.rail-wrap { position: relative; padding-top: 6px; }
.rail { position: absolute; top: 20px; left: calc(100% / 14); right: calc(100% / 14); height: 2px; background: rgba(255, 255, 255, .1); border-radius: 2px; }
.rail-fill { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, rgba(143, 176, 255, .4), #f4f7ff); box-shadow: 0 0 12px 1px rgba(143, 176, 255, .8); transition: width .8s var(--ease); }
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; }
.strip li { display: grid; justify-items: center; gap: 8px; text-align: center; color: var(--dim); font-size: .76rem; }
.node {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-family: var(--mono); font-size: .7rem;
  background: #050506; border: 1px solid var(--line-2); color: var(--dim); transition: all .4s var(--ease);
}
.strip li.done { color: var(--muted); }
.strip li.done .node { background: #0b1022; border-color: rgba(143, 176, 255, .6); color: var(--glow); box-shadow: 0 0 12px rgba(143, 176, 255, .35); }
.strip li.current { color: var(--ink); }
.strip li.current .node { background: var(--ink); color: #05060a; border-color: #fff; box-shadow: 0 0 0 4px rgba(143, 176, 255, .18), 0 0 22px rgba(143, 176, 255, .9); animation: node-pop .6s var(--ease); }
.strip li.next .node { border-color: rgba(143, 176, 255, .5); color: var(--ink); animation: breathe 2.4s infinite ease-in-out; }
.rail-now { display: none; margin-top: 10px; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--glow); text-align: center; }
.strip-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0, 0, 0, .35); }
.strip-facts dd { margin: 4px 0 0; font-weight: 550; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pop { animation: pop .55s var(--ease) both; }

.flow { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.flow .stage { align-content: center; }
.flow-side { display: flex; flex-direction: column; gap: 16px; padding: 26px; min-width: 0; }
/* The steps spread over the full card height, so the timeline lines up with the phone */
.flow-side .timeline { flex: 1; align-content: space-between; }
.flow-side .btn { align-self: flex-start; }
#flow-appt:empty { display: none; }
#flow-appt .appt { animation: rise .5s var(--ease) both; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding-bottom: 16px; }
.timeline li::before { /* connector */
  content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 1px; background: var(--line-2);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: linear-gradient(rgba(143, 176, 255, .7), rgba(143, 176, 255, .25)); box-shadow: 0 0 8px rgba(143, 176, 255, .5); }
.tl-node {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--mono); font-size: .7rem;
  border: 1px solid var(--line-2); color: var(--dim); background: #050506;
}
.tl-body { display: grid; gap: 6px; padding-top: 4px; min-width: 0; }
.tl-title { font-size: .95rem; font-weight: 600; color: var(--dim); }
.tl-n { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; margin-right: 6px; color: var(--dim); font-weight: 500; }
.tl-more summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; width: fit-content; border-radius: 6px; }
.tl-more summary::-webkit-details-marker { display: none; }
.tl-show { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.tl-show::after { content: " +"; }
.tl-more[open] .tl-show::after { content: " -"; }
.tl-more summary:hover .tl-show { color: var(--ink); }
.tl-more[open] > .tl-entry { margin-top: 6px; }
.tl-more .tl-entry time { display: none; }
.tl-more .tl-entry + .tl-entry time { display: block; }
.timeline li.done:not(.current) { padding-bottom: 12px; }
.tl-entry { display: grid; gap: 2px; font-size: .88rem; color: var(--muted); }
.tl-desc { font-size: .86rem; line-height: 1.45; color: var(--dim); }
.timeline li.next .tl-desc { color: var(--muted); }
.timeline time { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; color: var(--glow); }
.delta { font-family: var(--mono); font-size: .66rem; color: var(--ok); letter-spacing: .02em; }
.timeline li.done .tl-node { color: var(--glow); border-color: rgba(143, 176, 255, .55); background: #0b1022; }
.timeline li.done .tl-title { color: var(--ink); }
.timeline li.current .tl-body {
  margin: -6px 0 0 -6px; padding: 10px 14px 12px; border-radius: 14px; border: 1px solid rgba(143, 176, 255, .35);
  background: linear-gradient(90deg, rgba(143, 176, 255, .1), rgba(143, 176, 255, .02)); box-shadow: 0 0 30px rgba(143, 176, 255, .14);
  animation: light-up .9s var(--ease) both;
}
.timeline li.current .tl-node { background: var(--ink); color: #05060a; border-color: #fff; box-shadow: 0 0 0 4px rgba(143, 176, 255, .18), 0 0 22px rgba(143, 176, 255, .9); animation: node-pop .6s var(--ease); }
.timeline li.current .tl-entry { animation: rise .5s var(--ease) both .15s; }
.timeline li.next .tl-node { border-color: rgba(143, 176, 255, .5); color: var(--ink); animation: breathe 2.4s infinite ease-in-out; }
.timeline li.next .tl-title { color: var(--muted); }
.timeline li.warn .tl-node { color: #1a0f00; background: var(--warn); border-color: var(--warn); box-shadow: 0 0 18px rgba(255, 194, 122, .6); animation: none; }
.timeline li.warn .tl-body { color: var(--warn); border-color: rgba(255, 194, 122, .4); background: rgba(255, 194, 122, .06); box-shadow: none; }

.foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 12px; text-align: center; font-size: .82rem; color: var(--dim); padding: 18px 0 22px; border-top: 1px solid var(--line); }

/* ---------------- Motion ---------------- */
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 60% { transform: scale(1.08); box-shadow: 0 0 22px rgba(143, 176, 255, .7); } 100% { opacity: 1; transform: none; } }
@keyframes node-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: none; } }
@keyframes light-up { 0% { opacity: .4; box-shadow: 0 0 0 rgba(143, 176, 255, 0); } 40% { opacity: 1; box-shadow: 0 0 48px rgba(143, 176, 255, .45); } 100% { box-shadow: 0 0 30px rgba(143, 176, 255, .14); } }
@keyframes breathe { 50% { box-shadow: 0 0 18px rgba(143, 176, 255, .55); border-color: rgba(143, 176, 255, .9); } }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes msg-out { from { opacity: 0; transform: translateX(14px) scale(.94); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-14px) scale(.96); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px) scale(.98); } }

.sms.in, .sysline, .stamp, .typing { animation: msg-in .4s var(--ease) both; transform-origin: bottom left; }
.sms.out { animation: msg-out .45s var(--ease) both; transform-origin: bottom right; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .toast.show { opacity: 1; transform: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .sim { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  #view-flow .subtabs { display: grid; }
  #view-flow[data-sub=phone] .flow-side, #view-flow[data-sub=timeline] .flow .stage { display: none; }
  .flow-head { grid-template-columns: minmax(0, 1fr); }
  .flow-controls { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .inbox { grid-template-columns: minmax(0, 1fr); }
  #view-inbox .subtabs { display: grid; }
  #view-inbox[data-sub=list] .detail-pane, #view-inbox[data-sub=detail] .list-pane { display: none; }
  .contacts { flex: none; min-height: 0; max-height: 560px; }
  .thread { max-height: 420px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg { max-width: 90%; }
}
@media (max-width: 600px) {
  .shell { padding: 14px 16px 4px; }
  .banner { font-size: .62rem; letter-spacing: .08em; padding: 6px 12px; }
  .top { padding: 20px 0 16px; align-items: flex-start; }
  .logo { width: 48px; height: 48px; }
  .eyebrow { font-size: .62rem; letter-spacing: .12em; }
  .top .eyebrow .sep, .eb-extra { display: none; }
  .top { align-items: center; }
  h1 { font-size: 1.3rem; }
  h1 .sample { display: block; font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; color: var(--warn); margin-top: 3px; }
  #reset { min-height: 36px; padding: 6px 14px; font-size: .82rem; }
  .tabs { width: 100%; gap: 2px; padding: 4px; }
  .tabs [role=tab] { flex: 1 1 0; min-width: 0; justify-content: center; padding: 8px 2px; font-size: .78rem; letter-spacing: -.01em; }
  .tab-n { display: none; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; }
  .field select { padding-left: 12px; }
  .detail-pane, .sim-card, .flow-side, .report, .flow-head { padding: 20px 18px; }
  .flow-controls .btn { flex: 1 1 auto; }
  .flow-controls #flow-next { flex-basis: 100%; }
  .strip .stage-name { display: none; }
  .rail { top: 20px; }
  .rail-now { display: block; }
  .strip-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; padding: 14px; }
  .strip-facts > div:first-child { grid-column: 1 / -1; }
  .strip-facts > div:nth-child(3) { grid-column: 1 / -1; order: 5; }
  .strip-facts > div:only-child { grid-column: 1 / -1; }
  .tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .report-head { align-items: flex-start; }
  .hero-stat { justify-items: start; text-align: left; }
  .tiles li { padding: 14px; }
  .num { font-size: 1.8rem; }
  .stage { padding-top: 4px; }
  .sim-card .btn { align-self: stretch; }
  .rules { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rules li { grid-template-columns: 28px 1fr; }
}
/* Phones: keep every tab under about 1,400 px tall */
@media (max-width: 600px) {
  .top { padding: 14px 0 12px; }
  .tabs { margin-bottom: 12px; }
  main { padding-bottom: 14px; }
  .foot { padding: 12px 0 14px; font-size: .76rem; }
  .subtabs { margin-bottom: 10px; }

  /* Inbox */
  .detail-pane { min-height: 0; padding: 16px; }
  .detail-head { gap: 8px; padding-bottom: 12px; }
  .detail-head h2 { font-size: 1.25rem; }
  .thread { padding: 12px 4px 12px 0; gap: 10px; }
  .composer { padding-top: 12px; margin-bottom: 10px; }
  .contacts { max-height: 600px; }
  .row { padding: 10px; gap: 5px; }

  /* Missed call */
  .sim { gap: 12px; }
  .sim-card { gap: 12px; padding: 18px 16px; }
  .sim-card > .eyebrow { display: none; }
  .sim-card h2 { font-size: 1.25rem; }
  .sim-card .muted { font-size: .88rem; line-height: 1.45; }
  .steps { gap: 8px; margin: 0; }
  .steps li { font-size: .82rem; line-height: 1.4; }
  .rules-wrap { padding-top: 12px; }
  .device { height: 560px; border-radius: 50px; }
  .device::before { border-radius: 40px; }
  .sim .stage { padding: 0 0 8px; }
  .phone-preview { gap: 8px; }
  .phone-preview .sysline { display: none; }

  /* Report */
  .report { padding: 18px 16px; }
  .report-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 12px; padding-bottom: 14px; }
  .report-head > div:first-child { display: contents; }
  .report-head .eyebrow { grid-column: 1 / -1; }
  .report-head .hero-stat { grid-column: 2; grid-row: 2 / span 2; }
  .report-head h2 { font-size: 1.5rem; margin: 6px 0 2px; }
  .report-head .muted { font-size: .78rem; }
  .hero-stat { justify-items: end; text-align: right; flex: none; }
  .hero-stat .lbl { max-width: 110px; font-size: .72rem; line-height: 1.3; }
  .num.big { font-size: 3rem; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
  .tiles li { padding: 10px 10px 12px; gap: 6px; }
  .tiles li:last-child:nth-child(odd) { grid-column: auto; }
  .tiles .lbl { font-size: .56rem; letter-spacing: .08em; line-height: 1.3; }
  .tiles .lbl .mono-n { display: none; }
  .num { font-size: 1.5rem; }
  .report-copy { gap: 10px; }
  .report-copy h3 { margin-bottom: 0; }
  .summary { font-size: .92rem; line-height: 1.55; }
  .tip { font-size: .88rem; padding: 10px 12px; }

  /* Full flow */
  .flow-head { gap: 12px; padding: 16px; margin-bottom: 12px; }
  .flow-intro { gap: 4px; }
  .flow-intro .eyebrow, .flow-intro .muted { display: none; }
  .flow-intro h2 { font-size: 1.2rem; }
  .flow-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .flow-controls #flow-next { grid-column: 1 / -1; }
  .flow-controls .btn { min-height: 42px; padding: 8px 12px; }
  .rail-now { margin-top: 6px; }
  .strip-facts { padding: 12px; gap: 10px 14px; }
  #view-flow[data-sub=phone] .strip-facts { display: none; }
  #view-flow[data-sub=timeline] .flow-side #flow-appt { display: none; }
  .flow .stage { padding: 0 0 6px; }
  .flow-side { padding: 16px; gap: 12px; }
  .flow-side > .eyebrow { display: none; }
  .timeline li { gap: 12px; padding-bottom: 12px; }
  .timeline li.done:not(.current) { padding-bottom: 8px; }
  .tl-body { gap: 3px; }
  .tl-title { font-size: .9rem; }
  .tl-entry, .tl-desc { font-size: .82rem; line-height: 1.4; }
  .timeline li.todo .tl-desc { display: none; }
  /* Finished steps fold to one line: title and a Details toggle. The time shows when opened. */
  .timeline li.done:not(.current) .tl-body { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 8px; }
  .timeline li.done:not(.current) .tl-more { display: contents; }
  .timeline li.done:not(.current) .tl-more > summary { grid-column: 2; grid-row: 1; }
  .timeline li.done:not(.current) .tl-more > .tl-entry { grid-column: 1 / -1; }
  .tl-more summary time { display: none; }
  .tl-more .tl-entry time { display: block; }
  .stage::before { height: 520px; }
}
@media (max-width: 380px) {
  .tabs [role=tab] { font-size: .72rem; }
}
