/* Role Call: the same calm, warm system as FDE AI, in light and dark, with a touch of the brand's yellow-to-coral. */

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --surface-3: #e8e4db;
  --ink: #1d1c1a;
  --ink-2: #57544e;
  --ink-3: #8a867e;
  --line: #e3dfd6;
  --line-strong: #d3cec3;
  /* Brand: the circles mark runs from warm yellow to coral. Used sparingly. */
  --brand-a: #ffd266;
  --brand-b: #fe5d41;
  --brand-grad: linear-gradient(120deg, var(--brand-a), var(--brand-b));
  /* Primary actions are ink. Coral is kept for the brand touches and links only. */
  --primary: #1d1c1a;
  --primary-hover: #36332f;
  --primary-ink: #ffffff;
  --accent: #b43e26;
  --accent-hover: #93311d;
  --accent-soft: #fbe9e3;
  --accent-soft-ink: #8a2e1c;
  --focus: color-mix(in srgb, #1d1c1a 45%, transparent);
  --danger: #c0412e;
  --danger-hover: #a53625;
  --ok: #2f7d4f;
  --ok-soft: #e4f1e8;
  --warn: #a8701a;
  --warn-soft: #f7ecd8;
  --shadow: 0 1px 2px rgb(28 25 20 / 6%), 0 8px 24px -12px rgb(28 25 20 / 18%);
  --shadow-lift: 0 2px 4px rgb(28 25 20 / 6%), 0 18px 40px -18px rgb(28 25 20 / 28%);
  --radius: 16px;
  --radius-sm: 10px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --avatar-l: 88%;
  --avatar-c: 0.07;
  --avatar-ink-l: 34%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --surface: #1a1b1d;
    --surface-2: #222326;
    --surface-3: #2b2c30;
    --ink: #edebe7;
    --ink-2: #b4b0a9;
    --ink-3: #85817a;
    --line: #2c2d31;
    --line-strong: #3a3b40;
    --primary: #edebe7;
    --primary-hover: #ffffff;
    --primary-ink: #111213;
    --accent: #ff8a6b;
    --accent-hover: #ffa488;
    --accent-soft: #3a221b;
    --accent-soft-ink: #ffc9b8;
    --focus: color-mix(in srgb, #edebe7 55%, transparent);
    --danger: #e0664f;
    --danger-hover: #ea7f6b;
    --ok: #5cbf86;
    --ok-soft: #1c2c23;
    --warn: #e3a94b;
    --warn-soft: #33291a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 30%), 0 18px 40px -18px rgb(0 0 0 / 70%);
    --avatar-l: 36%;
    --avatar-c: 0.06;
    --avatar-ink-l: 88%;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 48px; }
.wrap.narrow { max-width: 760px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-mark { display: block; width: 28px; height: 28px; flex: none; }
.brand-mark.large { width: 64px; height: 64px; margin: 0 auto; }
.brand-name { font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
.grad {
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

.nav {
  display: flex; gap: 2px; padding: 3px; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
}
.nav button {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer;
  color: var(--ink-2); font-size: 14px; font-weight: 560;
}
.nav button:hover { color: var(--ink); }
.nav button[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.nav-icon { display: grid; place-items: center; }
.nav-icon svg { width: 16px; height: 16px; }

.me { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; min-width: 0; }
.me-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; flex: none;
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 11px; cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 560; font-size: 14px; transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn.wide { width: 100%; height: 44px; }
.btn.round { width: 56px; height: 56px; padding: 0; border-radius: 50%; }
.btn.round svg { width: 22px; height: 22px; }
.btn.icon-only { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.toggled { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- sign-in ---------- */

.view-login {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(60vmax 60vmax at 0% 0%, color-mix(in srgb, var(--brand-a) 16%, transparent), transparent 60%),
    radial-gradient(60vmax 60vmax at 100% 100%, color-mix(in srgb, var(--brand-b) 12%, transparent), transparent 60%),
    var(--bg);
}
.login-card {
  position: relative; overflow: hidden;
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 40px 32px 28px; box-shadow: var(--shadow-lift); text-align: center;
  animation: rise .5s cubic-bezier(.2,.7,.2,1) both;
}
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand-grad); }
.login-card h1 { font-weight: 750; font-size: 34px; letter-spacing: -0.03em; margin-top: 18px; line-height: 1.1; }
.login-card form { text-align: left; display: grid; gap: 8px; margin-top: 26px; }
#code-field:not([hidden]) { display: grid; gap: 8px; }
.login-card label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.login-card input {
  height: 44px; border-radius: 11px; border: 1px solid var(--line-strong); background: var(--bg);
  padding: 0 14px; font: inherit; color: var(--ink); margin-bottom: 8px; width: 100%;
}
.login-card input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.login-note { color: var(--ink-3); font-size: 12.5px; margin-top: 18px; text-wrap: balance; }

/* ---------- people ---------- */

.eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.page-title { font-family: var(--serif); font-size: clamp(30px, 5vw, 44px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-top: 6px; }
.page-head { display: grid; gap: 4px; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.page-head .lede { color: var(--ink-2); max-width: 68ch; margin-top: 6px; text-wrap: balance; }

.progress {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding: 8px 14px;
  width: fit-content; max-width: 100%; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
.progress strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; margin-bottom: 24px;
  border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--ink); font-size: 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}
.notice code { font-family: var(--mono); font-size: 12.5px; background: color-mix(in srgb, var(--surface) 70%, transparent); padding: 1px 6px; border-radius: 6px; }

.task { margin-bottom: 40px; }
.section-head { display: grid; gap: 2px; margin-bottom: 16px; }
.section-head h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-2); font-size: 14.5px; max-width: 72ch; }

/* Four across on a desktop, so a task of four sits in one row. */
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 0 rgb(0 0 0 / 2%); transition: box-shadow .2s, transform .2s, border-color .2s;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) both;
}
/* Only where there's a real pointer: on a phone a tap leaves :hover stuck and the card stays lifted. */
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--line-strong); }
}
.card.done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
/* A card's four parts (who, what you know, the buttons, the quick check) share their rows with the
   cards beside it, so each part starts on the same line whatever the length of a title or a note. */
@supports (grid-template-rows: subgrid) {
  .card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 14px; }
}
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.card-head .who { min-width: 0; padding-top: 3px; }
.card-head .name { font-weight: 640; font-size: 16px; letter-spacing: -0.005em; }
.card-head .role { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; margin-top: 2px; }
.card-head .company { color: var(--ink-3); font-size: 13.5px; line-height: 1.35; }
.card .note {
  flex: 1; color: var(--ink-2); font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border-left: 3px solid color-mix(in srgb, var(--brand-b) 55%, transparent);
}
.card .note .label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 650; margin-bottom: 2px; }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.card-foot .hint { color: var(--ink-3); font-size: 13px; }
.card-foot .btn.fill { flex: 1; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.avatar {
  --h: 180;
  position: relative; overflow: hidden;
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: oklch(var(--avatar-l) var(--avatar-c) var(--h));
  color: oklch(var(--avatar-ink-l) calc(var(--avatar-c) * 1.6) var(--h));
  font-weight: 650; font-size: 15px; letter-spacing: .02em; user-select: none;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-head .avatar { width: 64px; height: 64px; font-size: 21px; }
.avatar.large { width: 64px; height: 64px; font-size: 21px; }
.avatar.xl { width: 128px; height: 128px; font-size: 40px; font-family: var(--serif); font-weight: 600; }

/* ---------- conversation ---------- */

.back {
  border: 0; background: none; color: var(--ink-2); cursor: pointer; padding: 6px 0; margin-bottom: 16px;
  font-size: 14px; display: inline-flex; gap: 6px;
}
.back:hover { color: var(--ink); }

/* A call: just the person, the status and the controls. */
.phone {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 48px 24px 36px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lift);
  min-height: min(620px, calc(100vh - 170px)); justify-content: center;
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--brand-a) 12%, transparent), transparent 70%),
    var(--surface-2);
}
.call-after { display: grid; gap: 10px; justify-items: center; margin-top: 22px; max-width: 44ch; }
.call-outcome { font-weight: 600; }
.call-next { color: var(--ink-2); font-size: 14px; }
.call-next:empty { display: none; }
.after-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }

.orb { --level: 0; position: relative; width: 200px; height: 200px; display: grid; place-items: center; margin-bottom: 18px; }
.orb .avatar { position: relative; z-index: 2; box-shadow: 0 10px 30px -10px rgb(0 0 0 / 35%); }
.orb .ring {
  position: absolute; inset: 36px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand-b) 55%, transparent);
  opacity: 0; transition: opacity .3s, border-color .3s;
}
.orb .r1 { transform: scale(calc(1.08 + var(--level) * 0.28)); }
.orb .r2 { transform: scale(calc(1.18 + var(--level) * 0.55)); border-width: 1px; border-color: color-mix(in srgb, var(--brand-a) 70%, transparent); }
.orb[data-mode="speaking"] .ring { opacity: 1; }
.orb[data-mode="listening"] .ring { opacity: .55; border-color: color-mix(in srgb, var(--ink-3) 45%, transparent); }
.orb[data-mode="connecting"] .r1 { opacity: 1; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1.05); opacity: .2; } 50% { transform: scale(1.25); opacity: .9; } }

.call-name { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.call-role { color: var(--ink-2); font-size: 14px; }
.call-status { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; font-weight: 560; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.dot.live { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.dot.busy { background: var(--warn); animation: blink 1s infinite; }
.dot.off { background: var(--ink-3); }
@keyframes blink { 50% { opacity: .35; } }
.call-timer { font-family: var(--mono); font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.call-timer.low { color: var(--warn); font-weight: 600; }
.call-controls { display: flex; gap: 14px; margin-top: 22px; align-items: center; }
.call-controls:empty { display: none; }
.call-controls .caption { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 6px; }
.call-controls .ctl { display: flex; flex-direction: column; align-items: center; }

/* A chat: a messaging window. */
.chat {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-lift); min-height: min(640px, calc(100vh - 120px));
}
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.chat-head .icon-btn { font-size: 18px; }
.chat-who { flex: 1; min-width: 0; }
.chat-who .name { font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-status { font-size: 12.5px; color: var(--ink-3); }
.chat-closed {
  display: grid; gap: 10px; justify-items: center; text-align: center; padding: 16px;
  border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
}

.transcript {
  list-style: none; margin: 0; padding: 22px; display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto; flex: 1; min-height: 260px; max-height: calc(100vh - 260px);
}
.transcript .empty { margin: auto; color: var(--ink-3); text-align: center; max-width: 38ch; font-size: 14px; }
.msg { display: flex; flex-direction: column; max-width: min(78%, 62ch); animation: rise .25s ease both; }
.msg .bubble { padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.agent { align-self: flex-start; }
.msg.agent .bubble { background: var(--surface-2); border-top-left-radius: 6px; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.user .bubble { background: var(--primary); color: var(--primary-ink); border-top-right-radius: 6px; }
.msg.system { align-self: center; max-width: 100%; }
.msg.system .bubble { background: transparent; color: var(--ink-3); font-size: 13px; padding: 4px 8px; text-align: center; }
.msg-note { color: var(--warn); font-size: 12px; font-weight: 600; margin-top: 4px; }
.msg-cut { color: var(--ink-3); font-style: italic; font-size: .92em; }
.msg.streaming .bubble::after {
  content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px;
  background: currentColor; opacity: .5; animation: blink .9s steps(2) infinite;
}

.composer { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 160px; padding: 9px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; line-height: 1.45;
}
.composer textarea:focus { outline: 2px solid var(--focus); border-color: transparent; }

/* ---------- the quick check ---------- */

.check {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lift);
  padding: 28px; animation: rise .4s cubic-bezier(.2,.7,.2,1) both;
}
.check-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.check-head > div { flex: 1; min-width: 0; }
.check-name { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
.check-role { color: var(--ink-2); font-size: 14px; }
.check-score {
  flex: none; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; padding: 12px 16px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.check-score.full { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.question { border: 0; padding: 20px 0 4px; margin: 0; min-width: 0; }
.question + .question { border-top: 1px solid var(--line); }
.question legend { font-weight: 640; font-size: 16px; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.question legend + * { clear: both; }
.q-number { color: var(--ink-3); font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }
.option {
  display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; margin-bottom: 8px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); transition: background .12s, border-color .12s;
}
.option:hover { background: var(--surface-2); }
.option input { margin: 3px 0 0; accent-color: var(--primary); flex: none; width: 16px; height: 16px; }
.option:has(input:checked) { border-color: var(--ink); background: var(--surface-2); }
.option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.option.marked { cursor: default; }
.option.marked:hover { background: var(--surface); }
.option.right { border-color: color-mix(in srgb, var(--ok) 60%, transparent); background: var(--ok-soft); }
.option.right:hover { background: var(--ok-soft); }
.option.wrong { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: var(--accent-soft); }
.option.wrong:hover { background: var(--accent-soft); }
.option .tag { margin-left: auto; flex: none; font-size: 12px; font-weight: 650; white-space: nowrap; }
.option.right .tag { color: var(--ok); }
.option.wrong .tag { color: var(--danger); }
.why { margin: 4px 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 14px; }
.why strong { color: var(--ink); font-weight: 640; }
.check-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 12px; }
.check-actions .hint { color: var(--ink-3); font-size: 13.5px; }

/* ---------- feedback on the conversation ---------- */

.feedback { display: grid; gap: 12px; padding: 14px 0 20px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.feedback-verdict {
  font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em;
  text-wrap: balance;
}
.feedback-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.feedback-list { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.feedback-list h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; margin-bottom: 6px; }
.feedback-list.good h3 { color: var(--ok); }
.feedback-list.bad h3 { color: var(--danger); }
.feedback-list ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.feedback-next { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.feedback-next strong { color: var(--ink); font-weight: 640; }
.feedback-wait { color: var(--ink-3); font-size: 14px; }

/* ---------- the role guide ---------- */

/* Shown when the guide is opened over a call or a chat: it stays in view while they read. */
.return-bar {
  position: sticky; top: 68px; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 12px 10px 16px; margin-bottom: 20px; border-radius: 12px; font-size: 14px; font-weight: 560;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lift);
}

.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.role-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  animation: rise .4s cubic-bezier(.2,.7,.2,1) both;
}
.role-card h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.md p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; }
.md p:last-child { margin-bottom: 0; }
.md strong { color: var(--ink); font-weight: 640; }
.md ul { margin: 0 0 10px; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.page-head .md p { font-size: 15px; max-width: 68ch; }

/* ---------- toast ---------- */

/* Centred with auto margins, not a transform, so it can use the full width less the gutters. */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: 24px; margin-inline: auto; width: fit-content; z-index: 50;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px;
  box-shadow: var(--shadow-lift); max-width: 560px;
  animation: rise .25s ease both;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .wrap { padding: 20px 16px 40px; }
  .topbar-inner { padding: 10px 16px; gap: 10px; }
  .brand-name { display: none; }
  .me-name { display: none; }
  .cast-grid, .roles-grid { grid-template-columns: minmax(0, 1fr); }
  .phone { padding: 32px 16px 28px; min-height: calc(100dvh - 150px); }
  .chat { border-radius: 16px; min-height: calc(100dvh - 110px); }
  .transcript { padding: 16px; max-height: calc(100dvh - 240px); }
  .msg { max-width: 88%; }
  .check { padding: 20px 16px; border-radius: 16px; }
  .check-head { flex-wrap: wrap; }
}
