/* Rumble dashboard and signup. Built to sit beside xstep.ai: a near-black canvas, warm off-white
   type in Geist, hairline rules instead of boxes, square corners, plain sentence-case headings,
   and one electric blue for the thing to press. */
:root {
  --bg: #08090b; --bg-2: #0d0f12; --surface: #121519;
  --line: rgba(236, 236, 230, 0.1); --edge: rgba(236, 236, 230, 0.22);
  --ink: #ecece6; --text: #c6c7c3; --muted: #8f9195; --faint: #74777b;
  --accent: #001cff; --accent-deep: #2b44ff; --accent-text: #7d8cff;
  --green: #5fd08a; --red: #ff7b7b;
  /* Older names, still used below: a panel, and the page behind it. */
  --paper: var(--bg-2); --board: var(--bg);
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
/* The Left Join Studio deployment: paper white, charcoal Inter, Signal Orange. */
:root[data-brand="ljs"] {
  --bg: #FFFEF9; --bg-2: #F7F6F3; --surface: #FFFFFF;
  --line: rgba(44, 44, 44, 0.12); --edge: rgba(44, 44, 44, 0.3);
  --ink: #2C2C2C; --text: #3d3d3d; --muted: #6B6B6B; --faint: #7a7a7a;
  --accent: #E85D00; --accent-deep: #C94F00; --accent-text: #C94F00;
  --green: #3D7A4A; --red: #CC3333;
  /* Older names, still used below: a panel, and the page behind it. */
  --paper: var(--bg-2); --board: var(--bg);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
[data-brand="ljs"] .top { background: rgba(255, 254, 249, 0.9); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent); color: #fff; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
p { margin: 0 0 12px; }
.mono { font-family: var(--mono); }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.ok { color: var(--green); }
.error { color: var(--red); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* The panel everything sits in. */
.win { background: var(--paper); border: 1px solid var(--line); padding: 24px; margin: 0 0 20px; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 10px 24px; background: rgba(8, 9, 11, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top nav { gap: 4px; margin-left: 20px; }
.top nav a { padding: 6px 10px; font-size: 15px; font-weight: 400; color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--ink); box-shadow: inset 0 -1px 0 var(--accent-text); }
/* The person icon in the top right and the menu it opens. */
.profile { position: relative; }
.profile > button.icon { width: 40px; height: 40px; padding: 0; color: var(--muted); }
.profile > button.icon[aria-expanded="true"] { border-color: var(--ink); color: var(--ink); }
.profile .dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 240px; max-width: min(320px, calc(100vw - 32px)); padding: 6px; background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.profile .who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font: 12px/1.4 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.profile .who b { font: 500 15px/1.3 var(--sans); color: var(--ink); }
.profile .dropdown .h { margin: 8px 0 2px; padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.profile [role="menuitem"] { display: flex; justify-content: flex-start; background: none; border: 1px solid transparent; padding: 9px 10px; color: var(--text); font: 400 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; text-decoration: none; text-align: left; white-space: nowrap; }
.profile [role="menuitem"]:hover:not(:disabled), .profile [role="menuitem"]:focus-visible { background: var(--bg-2); color: var(--ink); border-color: transparent; }
.profile [role="menuitem"]:focus-visible { outline: none; border-color: var(--accent-text); }
.profile [role="menuitem"].danger { color: var(--red); }
.mark { font-weight: 600; font-size: 24px; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--ink); }
.mark i { font-style: normal; color: var(--accent-text); }
main { max-width: 1400px; margin: 0 auto; padding: 24px; }
h1 { font-size: 32px; line-height: 1.1; letter-spacing: -0.035em; font-weight: 500; color: var(--ink); margin: 0; overflow-wrap: anywhere; }
/* A section heading: plain words in the body face, a step up from the text. */
.h { font: 600 18px/1.3 var(--sans); letter-spacing: -0.01em; color: var(--ink); margin: 36px 0 14px; }
section > .h:first-child, .win > .h:first-child, .win > div > .h:first-child, .win > form > .h:first-child, main > .row:first-child .h, .row.between > .h { margin-top: 0; }
.row.between > .h { flex: 1; margin-bottom: 0; }
main > .row.between, section > .row.between { margin: 32px 0 12px; }
main > .row.between:first-child { margin-top: 0; }

.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row > label { flex: 1; min-width: 0; }
.grow { flex: 3 !important; }

button, input, select, textarea { font: inherit; color: inherit; border-radius: 0; }
button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: none; border: 1px solid var(--edge); padding: 10px 16px; cursor: pointer; font: 500 13px/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; transition: background 0.2s, border-color 0.2s, color 0.2s; }
button:hover:not(:disabled), a.button:hover { border-color: var(--ink); color: var(--ink); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary, a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled), a.button.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
button.big { width: 100%; padding: 17px 24px; font-size: 14px; margin: 8px 0 12px; }
button.danger { border-color: var(--red); color: var(--red); }
button.link { background: none; border: 0; padding: 4px 0; font: 400 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; white-space: normal; color: var(--muted); text-decoration: underline; text-decoration-color: var(--edge); text-underline-offset: 4px; }
button.link:hover:not(:disabled) { background: none; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

label { display: block; margin: 16px 0; font-size: 14px; font-weight: 500; color: var(--ink); }
label.check { display: flex; gap: 10px; align-items: center; font-size: 16px; font-weight: 400; }
.hint { display: block; font-size: 14px; font-weight: 400; color: var(--muted); margin: 2px 0 6px; }
p.hint { margin: 0 0 12px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; background: var(--bg); border: 1px solid var(--edge); font-size: 16px; font-weight: 400; color: var(--ink);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus, select:focus, textarea:focus { border-color: var(--accent-text); outline: 1px solid var(--accent-text); outline-offset: -1px; }
::placeholder { color: var(--faint); }
input[type="checkbox"], input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent-deep); }
input[type="range"] { width: 100%; accent-color: var(--accent-deep); }
textarea { resize: vertical; line-height: 1.5; }
/* Things you copy exactly (URLs, tokens, JSON) are in mono so 0/O and l/1 are readable. */
textarea.mono, input.mono, pre.code { font-family: var(--mono); font-size: 14px; }
textarea[aria-invalid="true"] { border-color: var(--red); }
audio { width: 100%; height: 36px; margin: 4px 0; }
.voice-matrix { display: block; width: 100%; height: 560px; border: 1px solid var(--line); margin: 8px 0 0; }

.card { border: 1px solid var(--line); background: var(--surface); padding: 16px; margin: 0 0 12px; }
.card label:first-child, .card .row:first-child label { margin-top: 0; }
.card .row > input, .card .row > select { margin-top: 0; }
.card .row > select { width: auto; }
.card > textarea { margin-top: 8px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; font-family: var(--mono); font-size: 14px; }
pre.code { background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 14px; user-select: all; }

.scroll { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:not(.plain) { cursor: pointer; }
tbody tr:not(.plain):hover, tbody tr:not(.plain):focus-visible { background: var(--surface); }
td select { width: auto !important; display: inline-block !important; padding: 4px 8px !important; font-size: 14px !important; margin: 0 !important; }
.live { color: var(--green); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 24px; margin: 0; }
.stats dt, .fields dt, .recap dt, .sheet dt { font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.stats dd, .fields dd, .recap dd { margin: 4px 0 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.stats dd { font-size: 20px; letter-spacing: -0.02em; }
.stats dd .muted { font-weight: 400; }

/* ---- agents ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 0 0 8px; }
.agent { display: block; margin: 0; color: var(--text); text-decoration: none; }
.agent { background: var(--paper); transition: background 0.2s, border-color 0.2s; }
.agent:hover, .agent:focus-visible { border-color: var(--accent-text); background: var(--surface); color: var(--text); }
.agent .name { display: block; font-size: 22px; font-weight: 500; letter-spacing: -0.025em; color: var(--ink); overflow-wrap: anywhere; }
.sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.sheet > div { min-width: 0; }
.sheet dd { margin: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- a customer's account ---- */
.account { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 40px; align-items: start; border: 1px solid var(--edge); }
.account .error { grid-column: 1 / -1; margin: 0; }
.dial { font: 500 36px/1.1 var(--sans); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; white-space: nowrap; }
.account .dial { display: block; margin-bottom: 8px; }
.account .pin { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
.account .pin p { margin: 0 0 12px; max-width: 70ch; }
.account .pin input:not([type="checkbox"]) { width: 12ch; letter-spacing: 0.2em; }
/* Paid tiers to pick from, when the installation has them: square, outlined all the way round when picked. */
.tiers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.tiers legend { grid-column: 1 / -1; padding: 0; margin: 0 0 4px; }
.tier { display: grid; gap: 4px; margin: 0; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier.on { border-color: var(--accent-text); outline: 1px solid var(--accent-text); outline-offset: -1px; }
.tier:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.tier .name { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.tier .mine { font: 500 11px/1 var(--mono); color: var(--accent-text); border: 1px solid var(--accent-text); padding: 2px 5px; }
.tier b { font: 600 24px/1.1 var(--mono); letter-spacing: -0.03em; color: var(--ink); }
.tiers + .billing { grid-column: 1 / -1; margin: 0; }
.welcome { border: 1px solid var(--accent-text); }
.welcome .dial { font-size: 24px; }

/* ---- filling in the details by talking ---- */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 20px 40px; align-items: start; border: 1px solid var(--edge); }
.setup p { margin: 0 0 16px; max-width: 60ch; }
/* The details as a form: short ones two to a row, the ones you write sentences in across both. */
.setup .details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; }
.setup .details label { margin: 0 0 16px; }
.setup .details label.wide { grid-column: 1 / -1; }
.setup .details .edited { font: 500 11px/1 var(--mono); color: var(--accent-text); }
.setup .details .count { display: block; margin-top: 4px; font: 400 12px/1 var(--mono); color: var(--muted); text-align: right; }
.setup .details .count.error { color: var(--red); }
.setup .details [aria-invalid="true"] { border-color: var(--red); }
.setup p.save { margin: 0; align-items: center; }
.setup p.refresh { align-items: center; gap: 8px 14px; }
.setup .review { border: 1px solid var(--edge); background: var(--surface); padding: 12px 14px; margin: 0 0 20px; }
.setup .review p { margin: 0 0 8px; }
.setup .review ul { list-style: none; margin: 0 0 8px; padding: 0; }
.setup .review li { margin: 0 0 6px; font-size: 14px; }
.setup .review .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.setup .review .ask li { padding: 10px 0; border-top: 1px solid var(--edge); }
.setup .review .tag { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--edge); padding: 2px 5px; }
.setup .review .tag.on { color: var(--accent-text); border-color: var(--accent-text); }
.setup .review .versions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; font-size: 13px; white-space: pre-line; }
.setup .review .versions i { display: block; font: 500 11px/1.4 var(--mono); font-style: normal; text-transform: uppercase; color: var(--faint); }
.setup .review .row { gap: 8px; }
.setup .talk { position: sticky; top: 80px; }
.setup .talk > .h:first-child { margin-top: 0; }
.setup rumble-agent { height: 520px; }
/* Trying the receptionist sits apart from the details it answers from, like the editor's Try it. */
.tryit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 20px 40px; align-items: start; border: 1px solid var(--edge); }
.tryit p { margin: 0 0 12px; max-width: 60ch; }
.tryit rumble-agent { height: 420px; }

/* ---- the agent editor ---- */
.status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; margin-top: 10px; }
.status .id { min-width: 0; }
.status .class { margin: 6px 0 0; color: var(--muted); }
.status .save { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: 340px; text-align: right; }
.status .strip { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 200px minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.menu { display: flex; flex-direction: column; gap: 2px; padding: 8px; position: sticky; top: 80px; }
.menu button { justify-content: flex-start; background: none; border: 0; padding: 9px 10px; color: var(--muted); white-space: nowrap; font: 400 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; text-align: left; }
.menu button:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.menu button.on { color: var(--ink); }
.menu button.on::before { content: ""; width: 6px; height: 6px; background: var(--accent-text); }
.pane { min-width: 0; }
.test { position: sticky; top: 80px; }
.test > .h:first-child { margin-top: 0; }
.test rumble-agent { height: min(640px, calc(100vh - 120px)); }
/* Who you are on the line: the owner, talking to the setup helper, or a caller, trying the receptionist. */
.callers { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 14px; border: 1px solid var(--edge); }
.callers button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 0; white-space: normal; text-align: left; color: var(--muted); }
.callers button + button { border-left: 1px solid var(--edge); }
.callers button:hover:not(:disabled) { background: var(--surface); }
.callers button.on { background: var(--surface); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.callers .title { font-size: 13px; }
.callers .line { font: 400 13px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--faint); }
@media (max-width: 1150px) {
  .split { grid-template-columns: minmax(0, 1fr) 380px; }
  .menu { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; position: static; margin-bottom: 0; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .test { position: static; }
  main { padding: 16px; }
  .top { padding: 10px 16px; }
  .row:not(.between) { flex-wrap: wrap; }
  .row > label { flex-basis: 100%; }
  .status { grid-template-columns: minmax(0, 1fr); }
  .status .save { align-items: stretch; max-width: none; text-align: left; }
  .cards, .account, .setup, .tryit, .setup .details { grid-template-columns: minmax(0, 1fr); }
  .setup .talk { position: static; }
  .dial { font-size: 26px; }
}

/* ---- one call ---- */
.fields > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fields > div:first-child { padding-top: 0; }
.fields > div:last-child { border-bottom: 0; padding-bottom: 0; }
.transcript { max-width: 760px; }
.transcript .say { max-width: 86%; margin: 0 0 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); }
.transcript .who { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.transcript .user { margin-left: auto; background: none; border-color: var(--edge); }
.transcript .tool { margin: -4px 0 12px; overflow-wrap: anywhere; color: var(--green); }
.transcript .tool.bad { color: var(--red); }
.transcript.seekable .say { cursor: pointer; transition: border-color 0.2s; }
.transcript.seekable .say:hover { border-color: var(--edge); }
.transcript .say.now { border-color: var(--accent-text); }
.transcript .who .at { float: right; margin-left: 12px; color: var(--faint); letter-spacing: 0; }

/* The recording: a deck like a music player's. Square, with the accent on what's playing. */
.player { max-width: 760px; padding: 18px 20px; }
.player .deck { display: flex; align-items: center; gap: 10px; }
.player button.play { width: 52px; height: 52px; padding: 0; background: var(--accent); border-color: var(--accent); color: #fff; }
.player button.play:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.player button.skip { width: 44px; height: 44px; padding: 0; font-size: 12px; }
.player .scrub { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; margin-left: 8px; }
.player .time { white-space: nowrap; color: var(--muted); min-width: 92px; text-align: right; }
.player input[type="range"] { appearance: none; -webkit-appearance: none; height: 4px; padding: 0; border: 0; background: linear-gradient(to right, var(--accent) var(--done, 0%), var(--edge) var(--done, 0%)); cursor: pointer; }
.player input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 16px; background: var(--ink); border: 0; border-radius: 0; }
.player input[type="range"]::-moz-range-thumb { width: 12px; height: 16px; background: var(--ink); border: 0; border-radius: 0; }
.player .controls { margin-top: 16px; gap: 10px; flex-wrap: wrap; }
.player .seg { display: inline-flex; }
.player .seg button { padding: 8px 12px; font-size: 12px; }
.player .seg button + button { border-left: 0; }
.player .seg button.on { background: var(--surface); color: var(--ink); border-color: var(--accent-text); }
.player .speed { min-width: 64px; padding: 8px 12px; font-size: 12px; }
.player a.button { padding: 8px 12px; font-size: 12px; }
@media (max-width: 860px) {
  .player .deck { flex-wrap: wrap; }
  .player .scrub { flex-basis: 100%; margin: 6px 0 0; }
}

/* ---- sign in ---- */
.signin { max-width: 440px; margin: 8vh auto; }
.signin .mark { font-size: 44px; }
.signin .tag { margin: 6px 0 28px; color: var(--muted); font-size: 18px; }
.signin button.primary { width: 100%; padding: 15px; margin-top: 4px; }
.signin button.link { display: flex; margin: 12px auto 0; }

/* ---- signup ---- */
.onboard { max-width: 560px; padding: 16px 16px 48px; }
.onboard > header { margin-bottom: 20px; }
.onboard .win { padding: 24px 20px; }
.onboard .win > p { font-size: 17px; }
/* On the signup and sign-in screens the label is the headline, so it reads as one. */
.onboard .h, .signin .h { font: 500 30px/1.1 var(--sans); letter-spacing: -0.035em; text-transform: none; color: var(--ink); margin-bottom: 14px; text-wrap: balance; }
.progress { list-style: none; display: flex; gap: 8px; margin: 0 0 20px; padding: 0; font-size: 14px; color: var(--faint); }
.progress li { flex: 1; padding-top: 10px; border-top: 1px solid var(--edge); }
.progress li.on { color: var(--ink); border-color: var(--accent-text); box-shadow: inset 0 1px 0 var(--accent-text); }
.progress li.done { color: var(--muted); border-color: var(--ink); }
.progress .n { display: block; font-size: 12px; letter-spacing: 0.08em; margin-bottom: 2px; }
.progress li.on .n { color: var(--accent-text); }
/* A field with its button beside it, like the website and "Read it". */
.onboard .inline { display: flex; gap: 8px; margin-top: 4px; }
.onboard .inline input { flex: 1; min-width: 0; }
.onboard .inline button { flex: none; margin: 0; }
.onboard details.more { margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.onboard details.more summary { padding: 14px 0; font-size: 16px; font-weight: 500; cursor: pointer; }
.onboard details.more[open] summary { border-bottom: 1px solid var(--line); }
.note { padding: 12px 14px; background: var(--surface); border: 1px solid var(--edge); font-size: 15px; }
.recap { display: grid; margin: 0 0 20px; border-top: 1px solid var(--line); }
.recap > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recap dd { margin: 0; text-align: right; }
/* The service terms on the last signup screen: a box of their own, so reading is optional and the button stays close. */
.terms { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; margin: 20px 0 0; padding: 4px 16px 12px; background: var(--surface); border: 1px solid var(--edge); font-size: 14px; line-height: 1.5; color: var(--muted); }
.terms:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.terms h3 { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 12px 0 4px; }
.terms h4 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 16px 0 4px; }
.terms p { margin: 0 0 8px; }
.terms ul { margin: 0 0 8px; padding-left: 20px; }
.terms li { margin: 0 0 6px; }
.terms a { color: var(--ink); }
.onboard label.agree { display: flex; gap: 12px; align-items: center; margin: 16px 0 20px; font-size: 16px; font-weight: 500; cursor: pointer; }
.onboard label.agree input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.directory p { max-width: 70ch; }
.directory table { margin: 0 0 8px; }
.directory td { padding: 6px 8px 6px 0; vertical-align: middle; }
.directory td input { margin: 0; }
.directory td.ext { width: 11ch; }
.directory td.ext input[aria-invalid="true"] { border-color: var(--red); }
.directory td:last-child { width: 1%; white-space: nowrap; }
.directory .paste { border-top: 1px solid var(--line); padding-top: 8px; }

/* ---- insights ---------------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row.tight { gap: 8px; }
.top button.icon { width: 40px; height: 40px; padding: 0; color: var(--muted); }
.top button.icon:hover { color: var(--ink); }
button.icon svg, button svg, a svg { flex: none; }
.eyebrow { font: 500 14px/1.4 var(--sans); color: var(--muted); margin: 0 0 10px; display: block; }
.segmented { display: inline-flex; border: 1px solid var(--edge); }
.segmented button { border: 0; border-right: 1px solid var(--edge); padding: 8px 12px; font-size: 12px; color: var(--muted); }
.segmented button:last-child { border-right: 0; }
.segmented button.on { background: var(--ink); color: var(--bg); }
.insights select { width: auto; margin: 0; padding: 8px 10px; font-size: 14px; }

.insights .hero { border-color: var(--edge); }
.insights .headline { font-size: clamp(22px, 3vw, 30px); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 12px; text-wrap: balance; }
.insights .headline b { color: var(--accent-text); font-weight: 600; }
.highlights { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.highlights li { display: flex; gap: 10px; align-items: baseline; }
.highlights svg { color: var(--accent-text); transform: translateY(2px); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 20px; }
.tile { background: var(--paper); border: 1px solid var(--line); padding: 18px 18px 14px; min-width: 0; }
.tile dt { display: flex; gap: 8px; align-items: center; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.tile dt svg { color: var(--muted); }
.tile dd { margin: 8px 0 4px; font: 500 34px/1.1 var(--mono); letter-spacing: -0.03em; color: var(--ink); }
.tile p { margin: 0; }
.tile.hot dd, .tile.hot dt svg { color: var(--red); }
.change { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; font: 500 12px/1.4 var(--mono); padding: 1px 6px 1px 4px; border: 1px solid var(--line); }
.change.good { color: var(--green); }
.change.bad { color: var(--red); }
.change.flat { color: var(--muted); padding-left: 6px; }

.balance .big-num { font-size: 18px; margin: 4px 0 12px; }
.balance .big-num b { font: 600 34px/1 var(--mono); color: var(--ink); letter-spacing: -0.03em; }
.meter { height: 10px; background: var(--bg); border: 1px solid var(--edge); margin: 0 0 10px; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter.low i { background: var(--red); }

.chart { position: relative; width: 100%; }
.win.flush { padding: 0; }
.categories { list-style: none; margin: 0; padding: 0; }
.categories li + li { border-top: 1px solid var(--line); }
button.category { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 48px 90px; gap: 16px; align-items: center; width: 100%; padding: 14px 18px; border: 0; text-align: left; font: 400 15px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); white-space: normal; }
button.category:hover:not(:disabled) { background: var(--bg); }
.categories li.open button.category { background: var(--bg); color: var(--ink); }
button.category .label { display: flex; gap: 10px; align-items: center; color: var(--ink); }
button.category .label svg { color: var(--accent-text); }
button.category .bar { height: 8px; background: var(--bg); }
button.category .bar i { display: block; height: 100%; background: var(--accent); min-width: 2px; }
button.category .count { text-align: right; font-size: 16px; color: var(--ink); }
button.category .was { text-align: right; }
.category-calls { list-style: none; margin: 0; padding: 0 0 8px; background: var(--bg); }
.category-calls a { display: grid; grid-template-columns: 140px 130px minmax(0, 1fr) 16px; gap: 14px; align-items: baseline; padding: 10px 18px 10px 46px; text-decoration: none; color: var(--text); }
.category-calls a:hover { background: var(--bg-2); color: var(--ink); }
.category-calls .more { padding: 10px 18px 6px 46px; }
.pad { padding: 10px 18px 14px 46px; margin: 0; background: var(--bg); }
.insights .note { display: flex; gap: 6px; align-items: center; margin-top: -8px; }

.insights .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.insights .split .win { margin: 0; }
.when > p { margin-top: 10px; }
.cap { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.key { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 11px; }
.dot { display: inline-block; width: 8px; height: 8px; }
.dot.accent { background: var(--accent); }
.dot.faint { background: var(--faint); margin-left: 6px; }
/* "It didn't know": questions the receptionist couldn't answer, each with its call and a way to teach it. */
.unanswered ul { list-style: none; margin: 0; padding: 0; }
.unanswered li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 18px; }
.unanswered li + li { border-top: 1px solid var(--line); }
.unanswered li > svg { color: var(--accent-text); align-self: start; margin-top: 3px; }
.unanswered .q { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.unanswered .question { color: var(--ink); }
.unanswered .q a { display: inline-flex; gap: 4px; align-items: center; text-decoration: none; width: fit-content; }
.unanswered .q a:hover { color: var(--ink); }
.unanswered li button { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.ask { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.ask button.link { display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }

/* Home's "this week" strip, which opens Insights. */
a.teaser { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; text-decoration: none; color: var(--text); border-color: var(--edge); }
a.teaser:hover { border-color: var(--accent-text); color: var(--text); }
a.teaser .eyebrow { margin: 0; }
a.teaser .facts { display: flex; flex-wrap: wrap; gap: 6px 24px; }
a.teaser .facts b { font: 600 20px/1 var(--mono); color: var(--ink); margin-right: 4px; }
a.teaser .go { display: inline-flex; gap: 6px; align-items: center; font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }

/* Home's Callbacks: callers waiting on the owner, one row each, checked off when called. */
ul.todo { list-style: none; margin: 0 0 20px; }
ul.todo li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-bottom: 1px solid var(--line); }
ul.todo li:last-child { border-bottom: 0; }
ul.todo li.more { padding: 10px 18px 10px 52px; }
ul.todo li > input[type="checkbox"] { margin-top: 3px; width: 20px; height: 20px; cursor: pointer; }
ul.todo .body { flex: 1; min-width: 0; }
ul.todo .line { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0 0 4px; }
ul.todo .line strong { color: var(--ink); }
ul.todo .line a.mono { font-size: 15px; color: var(--accent-text); }
ul.todo .when { margin-left: auto; }
ul.todo a.what { display: block; color: var(--text); text-decoration: none; }
ul.todo a.what:hover { color: var(--accent-text); }
ul.todo p.small { margin: 4px 0 0; }
ul.todo li.done strong, ul.todo li.done a.what { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.callbacks .row.between > .row { gap: 16px; }

/* What a call was about, in the calls table and on a call's page. */
.topic { display: inline-flex; gap: 6px; align-items: center; padding: 2px 8px; border: 1px solid var(--line); font: 500 12px/1.4 var(--sans); color: var(--text); white-space: nowrap; }
.topic svg { color: var(--muted); }
.topic.emergency { border-color: var(--red); color: var(--red); }
.topic.emergency svg { color: var(--red); }
.topic.unsorted, .topic.hang_up { color: var(--muted); }
.stats .topic { font-size: 14px; }
/* The call page's chip opens the fixed list, so the owner can fix the model's pick. */
.topic-pick { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
button.topic { cursor: pointer; letter-spacing: 0; text-transform: none; }
button.topic:hover:not(:disabled), button.topic[aria-expanded="true"] { border-color: var(--ink); }
button.topic.emergency:hover:not(:disabled) { color: var(--red); }
.topic-pick .anchor { position: relative; }
.topic-pick .fixed { font: 13px/1.4 var(--sans); color: var(--muted); }
.topic-pick .dropdown { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: flex; flex-direction: column; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.topic-pick .dropdown .h { margin: 0 0 2px; padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.topic-pick [role="menuitemradio"] { display: flex; justify-content: flex-start; gap: 8px; background: none; border: 1px solid transparent; padding: 8px 10px; color: var(--text); font: 400 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; text-align: left; }
.topic-pick [role="menuitemradio"] svg { color: var(--muted); }
.topic-pick [role="menuitemradio"]:hover, .topic-pick [role="menuitemradio"]:focus-visible { background: var(--bg-2); color: var(--ink); outline: none; }
.topic-pick [role="menuitemradio"]:focus-visible { border-color: var(--accent-text); }
.topic-pick [role="menuitemradio"][aria-checked="true"] { color: var(--ink); font-weight: 500; }
.topic-pick [role="menuitemradio"][aria-checked="true"]::after { content: ""; width: 6px; height: 6px; margin-left: auto; background: var(--accent-text); }

/* ---- suggestions ------------------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, 0.55); display: grid; place-items: start center; padding: 10vh 16px 16px; overflow-y: auto; }
.dialog { width: min(560px, 100%); margin: 0; border-color: var(--edge); background: var(--surface); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4); }
.dialog button.icon { width: 36px; height: 36px; padding: 0; border-color: transparent; color: var(--muted); }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.kinds button { gap: 8px; padding: 9px 12px; font-size: 12px; color: var(--muted); }
.kinds button.on { border-color: var(--accent-text); color: var(--ink); background: var(--bg); }
.kinds button.on svg { color: var(--accent-text); }
.dialog label { margin: 8px 0 12px; }
.thanks { display: flex; gap: 10px; align-items: flex-start; font-size: 17px; color: var(--ink); }
.thanks svg { color: var(--green); flex: none; margin-top: 3px; }
.dialog .h:not(#suggest-title) { margin: 24px 0 8px; }
.past { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.past li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.past .text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past .status { display: inline-flex; gap: 4px; align-items: center; font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.past .status.planned { color: var(--accent-text); }
.past .status.done { color: var(--green); }
.inbox { list-style: none; margin: 16px 0 0; padding: 0; }
.inbox li { margin-bottom: 12px; }
.inbox li.unread { border-color: var(--edge); }
.inbox .row svg { color: var(--accent-text); }
.inbox .text { white-space: pre-wrap; color: var(--ink); margin: 12px 0 14px; }

@media (max-width: 860px) {
  .insights .split { grid-template-columns: minmax(0, 1fr); }
  button.category { grid-template-columns: minmax(0, 1fr) 40px 70px; }
  button.category .bar { grid-column: 1 / -1; grid-row: 2; }
  .category-calls a { grid-template-columns: minmax(0, 1fr) 16px; padding-left: 18px; }
  .category-calls a > span:nth-child(-n + 2) { grid-column: 1; }
  a.teaser { grid-template-columns: minmax(0, 1fr); }
  .unanswered li { grid-template-columns: 16px minmax(0, 1fr); }
  .unanswered li button { grid-column: 2; justify-self: start; }
  .top nav { margin-left: 8px; }
  .top nav a { padding: 6px 6px; font-size: 14px; }
}
