:root {
  --paper: #f6f4ef; --card: #ffffff; --ink: #1c1b19; --muted: #6b675f; --line: #e2ded5;
  --accent: #2f5d50; --accent-ink: #ffffff; --warn: #9a5b13; --bad: #a33a2b; --good: #2f7a4b;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { border-color: #c9c4b8; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 6px 8px; }
button.quiet:hover { color: var(--ink); text-decoration: underline; }
button:disabled { opacity: 0.55; cursor: default; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card); }
select { color: var(--ink); }
select option { background: var(--card); color: var(--ink); } /* the open list follows the theme too */
/* Our own arrow instead of the phone's, which stays dark on the dark card. Drawn with gradients in the theme's text colour
   (the site's security policy does not allow data: images). */
select { -webkit-appearance: none; appearance: none; padding-right: 40px; background-repeat: no-repeat; background-size: 7px 7px, 7px 7px;
  background-position: calc(100% - 21px) 50%, calc(100% - 14px) 50%;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); }
label { display: block; font-size: 0.875rem; color: var(--muted); margin-bottom: 4px; }
.error { color: var(--bad); font-size: 0.9rem; min-height: 1.3em; }

.center { max-width: 420px; margin: 9vh auto; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.brand { font-weight: 700; letter-spacing: 0.01em; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.page { max-width: 760px; margin: 32px auto; padding: 0 20px; }
.roomlist { list-style: none; padding: 0; margin: 0; }
.roomlist li + li { margin-top: 8px; }
.roomlist a { display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); color: inherit; text-decoration: none; font-weight: 600; }
.roomlist a:hover { border-color: var(--accent); }

.room { display: grid; grid-template-columns: minmax(0, 1fr) 340px; height: calc(100vh - 57px); }
.chat { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.messages { flex: 1; overflow-y: auto; padding: 20px; }
.msg { max-width: 720px; margin-bottom: 14px; }
.msg .who { font-weight: 600; font-size: 0.9rem; }
.msg .tag { font-weight: 500; font-size: 0.72rem; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px; padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
.msg .when { color: var(--muted); font-size: 0.78rem; margin-left: 6px; font-weight: 400; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.system { color: var(--muted); font-size: 0.875rem; text-align: center; max-width: none; }
.composer { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--card); }
.composer textarea { resize: none; height: 46px; }

.side { overflow-y: auto; padding: 20px; background: var(--paper); }
.agent { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.agent + .agent { margin-top: 10px; }
.agent .name { font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: #bdb8ad; }
.dot.in_room { background: var(--good); }
.dot.summoned { background: var(--warn); }
.dot.available { background: #7d9fc4; }
.dot.away { background: var(--bad); }
.status { font-size: 0.875rem; color: var(--muted); margin: 6px 0 10px; }
.copybox { display: flex; gap: 8px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px; margin: 8px 0; }
.copybox code { flex: 1; font: 0.82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.copybox button { padding: 5px 10px; font-size: 0.85rem; white-space: nowrap; }

dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  color: var(--ink); background: var(--card); }
dialog::backdrop { background: rgba(28, 27, 25, 0.45); }
.dlg { padding: 24px; }
/* The Done row stays in view at the bottom of a long dialog, with room under it so a phone's browser bar never covers it. */
.donebar { position: sticky; bottom: 0; z-index: 1; background: var(--card); padding: 12px 0 calc(20px + env(safe-area-inset-bottom));
  margin: 0 -24px; padding-left: 24px; padding-right: 24px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .dlg { padding-bottom: 8px; } .donebar { padding-bottom: calc(44px + env(safe-area-inset-bottom)); } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices button { text-align: left; padding: 12px 14px; }
.choices button .v { display: block; color: var(--muted); font-size: 0.8rem; }
.choices button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
ol.steps { padding-left: 20px; margin: 0; }
ol.steps li + li { margin-top: 14px; }
.live { border-radius: 8px; padding: 10px 12px; font-size: 0.92rem; background: var(--paper); border: 1px solid var(--line); }
.live.ok { border-color: var(--good); color: var(--good); font-weight: 600; }
.badge { font-size: 0.72rem; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); }
.note { font-size: 0.85rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }

@media (max-width: 860px) {
  .room { grid-template-columns: 1fr; height: auto; }
  .chat { border-right: 0; min-height: 60vh; }
  .side { border-top: 1px solid var(--line); }
  .choices { grid-template-columns: 1fr; }
}

/* ---------- logo ---------- */
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid currentColor; border-radius: 9px; flex: none; }
.logo > span { display: grid; place-items: center; width: 14px; height: 14px; border: 2px solid currentColor; transform: rotate(45deg); }
.logo > span > span { width: 5px; height: 5px; background: currentColor; }

/* ---------- landing page ---------- */
.landing { min-height: 100vh; color: #0e0e10;
  background:
    radial-gradient(60% 45% at 8% 22%, #ffffff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(55% 40% at 95% 18%, #ffffff 0%, rgba(255,255,255,0) 70%),
    radial-gradient(70% 50% at 50% 60%, #f1f1f3 0%, rgba(241,241,243,0) 75%),
    #f7f7f8; }
.lnav { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 22px 28px; }
.lbrand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; color: inherit; text-decoration: none; }
.lnav nav { gap: 22px; flex-wrap: nowrap; margin-left: auto; justify-content: flex-end; }
.lnav nav a { color: inherit; text-decoration: none; font-size: 0.98rem; }
.lnav nav a:hover { text-decoration: underline; }
.lnav button { border-radius: 10px; padding: 9px 18px; background: #fff; }
button.dark { background: #111113; color: #fff; border-color: #111113; font-weight: 600; }
button.dark:hover { background: #2a2a2e; border-color: #2a2a2e; }
button.big { font-size: 1.08rem; padding: 14px 40px; border-radius: 12px; }
.hero { text-align: center; padding: 48px 20px 36px; }
.eyebrow { letter-spacing: 0.42em; font-size: 0.8rem; color: #3b3b40; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); line-height: 1.0; letter-spacing: -0.045em; font-weight: 700; margin: 18px 0 20px; }
.hero h1 .fade { color: #6b6b70; }
.lead { font-size: clamp(1.05rem, 2vw, 1.35rem); color: #3b3b40; }
.cta { justify-content: center; margin-top: 28px; }
.lsec { max-width: 1040px; margin: 72px auto 0; padding: 0 20px; }
.lsec h2 { font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: 18px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stepn { width: 30px; height: 30px; border-radius: 50%; background: #111113; color: #fff; display: grid; place-items: center; font-weight: 600; margin-bottom: 10px; }
.lsec .card h3 { margin-bottom: 6px; }
.lsec details summary { cursor: pointer; font-weight: 600; }
.lsec details p { margin-top: 8px; }
.lfoot { text-align: center; padding: 56px 20px 32px; }

/* product picture */
.pv { max-width: 1240px; margin: 8px auto 0; background: #121214; color: #f2f2f3; border-radius: 26px; border: 5px solid #2b2b2f;
  box-shadow: 0 30px 60px rgba(0,0,0,0.22); overflow: hidden; width: calc(100% - 40px); }
.pv-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px; border-bottom: 1px solid #26262a; font-size: 1.1rem; }
.pv-body { display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; }
.pv-side, .pv-right { padding: 16px; }
.pv-main { padding: 16px 22px; border-left: 1px solid #26262a; border-right: 1px solid #26262a; background: #17171a; }
.pv-new { border: 1px solid #34343a; border-radius: 9px; padding: 9px 14px; font-size: 0.9rem; text-align: center; }
.pv-label { font-size: 0.66rem; letter-spacing: 0.2em; color: #a9a9b0; margin: 14px 4px 8px; }
.pv-main .pv-label { margin: 0 0 4px; }
.pv-h { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.pv-lead { margin-bottom: 10px; font-size: 0.95rem; }
.pv-t { font-weight: 600; font-size: 0.92rem; }
.pv-s { color: #a9a9b0; font-size: 0.8rem; font-weight: 400; }
.pv-x { font-size: 0.92rem; color: #e4e4e7; }
.pv-room, .pv-msg, .pv-who { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; }
.pv-room.on { background: #26262a; }
.pv-msg { border-top: 1px solid #26262a; border-radius: 0; padding: 11px 0; }
.pv-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #4a4a50; font-weight: 600; }
.pv-av.dark { background: #000; border: 1px solid #3a3a40; }
.pv-av.light { background: #e9e2da; color: #151517; }
.pv-av.shape { background: linear-gradient(135deg, #d9d9dd, #77777d); }
.pv-input { margin-top: 10px; border: 1px solid #34343a; border-radius: 10px; padding: 11px 14px; color: #8c8c93; font-size: 0.92rem; }
.pv-right { background: #121214; }

@media (max-width: 900px) {
  .pv-body { grid-template-columns: 1fr; }
  .pv-side, .pv-right { display: none; }
  .three { grid-template-columns: 1fr; }
  .lnav nav a { display: none; }
  .lnav { padding: 14px 12px; gap: 8px; }
  .lnav nav { gap: 6px; }
  .lbrand { font-size: 1.15rem; gap: 8px; }
  .lnav button { padding: 8px 10px; font-size: 0.92rem; white-space: nowrap; }
  .lnav .ltoggle { width: 36px; }
}

/* ---------- app view (dark by default, light with the toggle) ---------- */
body.appview { --paper: #0d0e13; --card: #14151b; --ink: #f3f3f5; --muted: #9b9daa; --line: #262832;
  --accent: #ff343c; --accent-ink: #ffffff; --good: #2fd08a; --warn: #f0a23b; --bad: #ff4d55; }
body.appview.light { --paper: #f4f4f6; --card: #ffffff; --ink: #121216; --muted: #666874; --line: #dedfe6;
  --accent: #e5222b; --good: #1f9d63; --warn: #b3700f; --bad: #c9303a; }
body.appview .topbar { background: var(--paper); padding: 10px 24px; }
body.appview .brand { font-size: 1.35rem; }
.tab { margin-left: 22px; padding: 6px 2px; border-bottom: 2px solid var(--ink); font-weight: 600; }
.motto { font-size: 0.62rem; letter-spacing: 0.22em; line-height: 1.5; color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; margin-left: 6px; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr) 270px; gap: 12px; padding: 12px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
/* Only the chat messages (and a long rooms list) scroll on their own; the right panel flows with the page. */
.rooms { overflow-y: auto; position: sticky; top: 12px; max-height: calc(100vh - 90px); }
button.wide { width: 100%; padding: 13px 14px; border-radius: 10px; background: transparent; }
.label { font-size: 0.68rem; letter-spacing: 0.24em; color: var(--muted); margin: 18px 4px 10px; }
.roomlink { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.roomlink:hover { background: var(--line); }
.roomlink.on { background: var(--line); box-shadow: inset 3px 0 0 #8b5cf6; }
.rname { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsub { display: block; font-size: 0.8rem; color: var(--muted); }
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: #3a3c47; color: #fff; font-weight: 600; }
.av.ai { background: #000; border: 1px solid #3a3c47; }
.av.logo-av { background: #000; color: #fff; border: 1px solid #3a3c47; }
.av.logo-av svg { width: 58%; height: 58%; display: block; }
.av.shape { background: linear-gradient(135deg, #d5d6dc, #6d6f7a); color: #14151b; }
body.appview .chat { display: flex; flex-direction: column; padding: 0; border-right: 1px solid var(--line); min-height: 0; position: sticky; top: 12px; height: calc(100vh - 90px); }
.chathead { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.chathead .label, .chat.empty .label { margin: 0 0 6px; }
.chathead h1 { font-size: 2rem; letter-spacing: -0.02em; }
.chat.empty { padding: 28px; gap: 12px; }
body.appview .messages { padding: 4px 22px; }
body.appview .msg { display: flex; gap: 14px; max-width: none; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
body.appview .msg.system { display: block; border-bottom: 0; padding: 8px 0; }
body.appview .composer { background: transparent; border-top: 1px solid var(--line); align-items: center; padding: 12px 10px; }
body.appview .composer textarea { background: transparent; border: 0; }
button.send { width: 32px; height: 32px; border-radius: 50%; padding: 0; background: #f1f1f3; color: #111; border: 0; flex: none; font-size: 1.1rem; }
body.appview .side { background: transparent; padding: 0; display: flex; flex-direction: column; gap: 12px; overflow: visible; }
.whorow { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.whorow .st { color: var(--muted); font-size: 0.8rem; white-space: nowrap; font-weight: 400; }
button.summon { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.summon:hover { filter: brightness(1.08); }
.center-text { text-align: center; }
body.appview .agent { background: var(--paper); }
body.appview .copybox, body.appview .live { background: var(--paper); }
body.appview input, body.appview textarea { background: var(--paper); }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 1fr; }
  .rooms { position: static; max-height: none; }
  body.appview .chat { position: static; height: auto; min-height: 60vh; }
  .motto { display: none; }
}

button.mic { width: 32px; height: 32px; border-radius: 50%; padding: 0; flex: none; background: transparent; display: flex; align-items: center; justify-content: center; transition: background .3s, box-shadow .3s, border-color .3s; }
button.mic .micsvg { display: block; flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; overflow: visible; }
button.mic[aria-pressed="true"] { background: rgba(255, 52, 60, 0.12); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 52, 60, 0.2); }

/* a color for each person; you are the accent red */
body.appview { --c0: #4da3ff; --c1: #3ddc84; --c2: #ffb347; --c3: #c792ea; --c4: #2dd4bf; --c5: #ff7eb6; }
body.appview.light { --c0: #1f6fd1; --c1: #1f9d55; --c2: #b3700f; --c3: #7c4dbd; --c4: #0f8f84; --c5: #c2417c; }
body.appview .msg .text, body.appview .msg .who { color: var(--pc, inherit); }
body.appview.nocolors .msg .text, body.appview.nocolors .msg .who { color: inherit; }
body.appview .msg .who .when { color: var(--muted); }

/* landing dark mode */
.ltoggle { width: 40px; padding: 8px 0 !important; font-size: 1.05rem; line-height: 1; }
body.ldark-body { background: #0d0e11; }
.landing.ldark { color: #f3f3f5; --card: #16171c; --line: #2a2b33; --ink: #f3f3f5; --muted: #a0a2ae;
  background:
    radial-gradient(60% 45% at 8% 22%, #1c1d23 0%, rgba(28,29,35,0) 70%),
    radial-gradient(55% 40% at 95% 18%, #1c1d23 0%, rgba(28,29,35,0) 70%),
    #0d0e11; }
.landing.ldark .eyebrow, .landing.ldark .lead { color: #b6b8c2; }
.landing.ldark .hero h1 .fade { color: #8b8d98; }
.landing.ldark .lnav button:not(.dark), .landing.ldark .ltoggle { background: #1b1c22; color: #f3f3f5; border-color: #33343d; }
.landing.ldark button.dark { background: #f3f3f5; color: #111113; border-color: #f3f3f5; }
.landing.ldark button.dark:hover { background: #fff; }
.landing.ldark .stepn { background: #f3f3f5; color: #111113; }
.landing.ldark .card { background: #16171c; border-color: #2a2b33; color: #f3f3f5; }
.landing.ldark .muted { color: #a0a2ae; }

.whorow .grow { display: flex; flex-direction: column; min-width: 0; }
.whorow .sub { color: var(--muted); font-size: 0.78rem; line-height: 1.25; }

input.secret { -webkit-text-security: disc; text-security: disc; }

.choices button { display: flex; align-items: center; gap: 10px; text-align: left; }
.choices .av { width: 32px; height: 32px; }
.choices .pn { display: flex; flex-direction: column; }
.agent .name .av { width: 28px; height: 28px; margin-right: 8px; }

.roomlink .dot.here { margin: 0 4px 0 auto; flex: none; width: 10px; height: 10px; background: transparent; border: 1.5px solid #4b4f5c; }
.roomlink .dot.here.on { background: #4da3ff; border-color: #4da3ff; box-shadow: 0 0 8px #4da3ff; }
body.light .roomlink .dot.here { border-color: #c4c7d0; }
body.light .roomlink .dot.here.on { border-color: #2f86e6; background: #2f86e6; box-shadow: 0 0 8px rgba(47,134,230,.7); }

button.wide { display: flex; align-items: center; justify-content: center; gap: 10px; }
.bicon { display: inline-flex; flex: none; }

.av.photo { background: #000; overflow: hidden; }
.av.photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

button.send, button.mic { width: 32px; height: 32px; min-width: 32px; box-sizing: border-box; }
button.send { display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.sendicon { display: inline-block; transform: rotate(-90deg); line-height: 1; font-size: 16px; }

button.iconbtn { width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
button.iconbtn.off { opacity: .55; }

.hidden { display: none; }
.pluswrap { position: relative; flex: none; }
button.plus { width: 32px; height: 32px; min-width: 32px; box-sizing: border-box; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.attachmenu { display: none; position: absolute; bottom: 40px; left: 0; z-index: 20; min-width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.attachmenu.open { display: block; }
.attachmenu .menuitem { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; }
.attachmenu .menuitem:hover { background: rgba(127,127,127,.15); }
.atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-img img { display: block; max-width: min(320px, 100%); max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.att-file { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; max-width: 100%; }
.att-file .bicon { display: inline-flex; }
.att-name { overflow-wrap: anywhere; }
.att-size { color: var(--muted); font-size: .8rem; }

/* Readiness: four lights per assistant under its name (joined, listening, replied, on call). */
.who { padding: 8px 0; }
.who .whorow { padding: 0; }
.ready { display: flex; flex-direction: column; gap: 3px; margin: 6px 0 0 0; }
.ready .lights { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ready .sub { color: var(--muted); font-size: 0.78rem; line-height: 1.25; }
.rd { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.rd .led { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.55; flex: none; }
.rd.on { color: var(--ink); }
.rd.on .led { opacity: 1; background: var(--good); border-color: var(--good); }
.rd.call.on .led { background: #2f86e6; border-color: #2f86e6; box-shadow: 0 0 6px rgba(47,134,230,.7); }
.warnline { color: var(--warn); }

/* Memory badge next to an assistant's name: its own claim. The word carries the state; colour only supports it. */
.namerow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.mem { font-size: 0.7rem; line-height: 1.5; border-radius: 999px; padding: 0 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; font-weight: 500; }
.mem.yes { color: var(--good); border-color: var(--good); }
.mem.no { color: var(--ink); border-color: var(--muted); }
.mem.unknown { border-style: dashed; border-color: var(--muted); }
body.appview .mem.yes { color: #4cc38a; border-color: #4cc38a; }
body.appview.light .mem.yes { color: var(--good); border-color: var(--good); }

.msg .to { color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.ver { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; }
.verrow { margin: 18px 4px 0; }
.verrow.links { margin-top: 6px; font-size: 0.72rem; line-height: 1.7; }
.verrow.links a { color: var(--muted); text-decoration: none; }
.verrow.links a:hover { color: var(--ink); text-decoration: underline; }

.acctwrap { position: relative; display: inline-flex; }
.acctbtn { border: 0; background: transparent; padding: 2px; border-radius: 50%; cursor: pointer; display: inline-flex; }
.acctbtn:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; }
.acctmenu { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.acctmenu.open { display: block; }
.acctwho { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acctname { font-weight: 600; }
.acctmail { opacity: .7; overflow-wrap: anywhere; }
.acctmenu .menuitem { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: 8px; }
.acctmenu .menuitem:hover { background: rgba(127,127,127,.15); }

.authcard { max-width: 480px; margin: 0 auto; }
.authcard h1 { font-size: 22px; margin: 0; }
.authcard h3 { margin: 0 0 4px; font-size: 14px; }
.brandline { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; }
.perm { margin: 0; padding-left: 20px; }
.perm li { margin: 3px 0; }
.okline { color: #2f8f5b; font-weight: 600; }

.appcard { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.appcard p { margin: 4px 0 0; }

/* Usage meter */
.usage { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0 0; }
.ubar .utext { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 2px; }
.utrack { display: block; height: 8px; border-radius: 4px; background: var(--line, rgba(128,128,128,.25)); overflow: hidden; }
.ufill { display: block; height: 100%; width: var(--w, 0%); border-radius: 4px; background: #2e9e5b; }
.ufill.mid { background: #d99a1c; }
.ufill.low { background: #d64545; }
.usub { color: var(--muted); font-size: 0.75rem; align-items: center; }
.usub button.quiet { padding: 0 4px; font-size: 0.75rem; }
.urow { display: grid; grid-template-columns: 1fr; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line, rgba(128,128,128,.25)); }
.urow input[type=number] { width: 5rem; }
