/* The Opal app on the test environment. Opal's own look: white ground, black ink and neutral gray. */
:root {
  --ink: #191919;
  --text: #323232;
  --soft: #515151;
  --muted: #707070;
  --line: #e8e8e8;
  --line-2: #e2e2e2;
  --subtle: #f6f6f6;
  --subtle-2: #f8f8f8;
  --panel: #fbfbfb;
  --blue: #565656;
  --blue-deep: #404040;
  --blue-soft: #f6f6f6;
  --blue-line: #dbdbdb;
  --blue-wash: #f8f8f8;
  --green: #1f7a4d;
  --green-wash: #e8f5ee;
  --amber: #8a5300;
  --amber-wash: #f5f5f5;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #ffffff; color: var(--ink); font-family: var(--font);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
.noscript { padding: 24px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
.spin { animation: spin .9s linear infinite; transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { .pulse, .spin, .dots b { animation: none; } }

/* ---- shell ----------------------------------------------------------------------------------- */

/* The keyboard never covers the composer: Chrome on Android shrinks the page for it, and where a browser lays it over
   the page instead, the app takes the height that stays visible (--app-height, from opal.js). */
.opal { height: 100vh; height: 100dvh; height: var(--app-height, 100dvh); display: flex; flex-direction: column;
  overflow: hidden; }

.top { height: 68px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: #ffffff; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand-word { font-size: 27px; font-weight: 600; letter-spacing: -1.4px; line-height: 1; }
.top-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #e7e7e7; background: #ffffff; font-size: 13px; font-weight: 500; color: var(--blue);
  white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill.quiet { color: var(--muted); }
.who { position: relative; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; background: #f2f2f2; color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; padding: 0; }
.who-name { display: flex; flex-direction: column; gap: 1px; font-size: 14px; font-weight: 500; }
.who-name small { font-size: 12px; font-weight: 400; color: var(--muted); }
.menu { position: absolute; right: 0; top: 46px; z-index: 5; background: #ffffff; border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: 0 10px 30px rgba(38, 38, 38, .12); padding: 6px; min-width: 200px; }
.menu button, .menu a { width: 100%; text-align: left; min-height: 44px; padding: 0 12px; border: 0; background: none;
  border-radius: 10px; font-size: 14px; }
.menu a { box-sizing: border-box; display: flex; align-items: center; color: inherit; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--subtle); }

.context { display: none; }

.body { flex: 1; min-height: 0; display: flex; }

/* ---- the left column: patients and what Opal is on --------------------------------------------- */

.side { flex: 0 0 272px; min-width: 0; border-right: 1px solid var(--line); padding: 22px 14px; display: flex;
  flex-direction: column; gap: 28px; overflow-y: auto; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.side .label { padding: 0 10px 6px; }
.group { display: flex; flex-direction: column; gap: 6px; }
.patient { display: flex; gap: 12px; align-items: flex-start; padding: 12px 10px; border-radius: 12px; }
.patient.focus { background: var(--blue-soft); }
.patient .tag { flex: none; width: 22px; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 1px;
  font-variant-numeric: tabular-nums; }
.patient.focus .tag { color: var(--blue); }
.patient .who-block { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.patient .name { font-size: 15px; font-weight: 500; }
.patient.focus .name { font-weight: 600; }
.patient .note { font-size: 13px; color: var(--muted); }
.patient .badge { font-size: 12px; font-weight: 600; color: var(--blue); font-variant-numeric: tabular-nums; margin-top: 3px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 10px; }
.task .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--blue); }
.task.done .dot { background: var(--green); }
.task.quiet .dot { background: var(--muted); }
.task .what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.task .what b { font-size: 14px; font-weight: 500; }
.task .what span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nothing { font-size: 13px; line-height: 1.55; color: var(--muted); padding: 0 10px; }

/* ---- the middle: Opal and the thread --------------------------------------------------------- */

.talk { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.hero { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 40px; overflow-y: auto; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px; max-width: 840px;
  width: 100%; }
.orb { border: 0; background: none; padding: 0; margin: 0; display: flex; flex-direction: column; align-items: center;
  color: #696969; }
.orb canvas { width: 280px; height: 280px; }
.orb span { font-size: 13px; font-weight: 500; padding: 10px 4px; border-bottom: 1px solid #e5e5e5; margin-top: -18px; }
.hello { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hello h1 { margin: 0; font-size: 58px; line-height: 1.02; font-weight: 590; letter-spacing: -.055em; text-wrap: balance; }
.hello h1 em { font-style: normal; color: var(--blue); }
.hello p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 430px; }

/* The install banner, laid out as Safari's own app banner: close, the icon, the name and one line, then Install. */
.install { flex: none; display: flex; align-items: center; gap: 12px; margin: 14px auto 0; width: calc(100% - 80px);
  max-width: 700px; padding: 12px 12px 12px 8px; border: 1px solid var(--line-2); border-radius: 18px;
  background: #ffffff; box-shadow: 0 3px 18px rgba(38, 38, 38, .06); }
.install-mark { width: 40px; height: 40px; flex: none; border-radius: 11px; background: #0a0a0a; display: flex;
  align-items: center; justify-content: center; }
.install-mark svg { width: 22px; height: 22px; }
.install-mark circle { fill: #ffffff; }
.install-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-words b { font-size: 14px; font-weight: 600; }
.install-words span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.install-go { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ink); color: #ffffff;
  font-size: 14px; font-weight: 600; flex: none; }
.install-later { width: 28px; height: 28px; flex: none; padding: 0; margin-right: -4px; border: 0; border-radius: 50%;
  background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.install-later svg { width: 16px; height: 16px; }

.thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 30px 40px 14px; }
.thread-inner { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.day { align-self: center; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--subtle);
  padding: 6px 12px; border-radius: 999px; }

.msg-you { align-self: flex-end; max-width: 78%; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.msg-you .by { font-size: 12px; font-weight: 500; color: var(--muted); }
.msg-you p { margin: 0; background: var(--subtle); color: #434343; padding: 13px 18px; border-radius: 20px 20px 6px 20px;
  font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.msg-you.partial p { color: var(--muted); }
.msg-you .sends { font-size: 12px; line-height: 1.4; color: var(--muted); text-align: right; }
.msg-status { display: flex; justify-content: flex-end; font-size: 12px; font-weight: 500; color: var(--muted); }
.msg-status > span { display: inline-flex; align-items: center; gap: 5px; }
.msg-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.msg-status .status-working, .msg-status .status-sending { color: var(--blue); }
.msg-status .status-failed { color: var(--amber); }
.msg-status .tick { display: inline-flex; color: var(--blue); }
.msg-status .tick svg { width: 13px; height: 13px; }
.msg-opal { max-width: 92%; display: flex; flex-direction: column; gap: 7px; }
.msg-opal .by { font-size: 13px; font-weight: 600; color: var(--blue); }
.msg-opal p { margin: 0; font-size: 19px; line-height: 1.5; letter-spacing: -.012em; color: var(--ink); overflow-wrap: anywhere; }
.msg-opal .cut { font-size: 12px; color: var(--muted); }
.msg-opal.thinking p { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots b { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); animation: dot 1.2s ease-in-out infinite; }
.dots b:nth-child(2) { animation-delay: .15s; }
.dots b:nth-child(3) { animation-delay: .3s; }

/* The guard's decision on each call Opal's agent made: one quiet line each, close to the message it answers. */
.msg-decision { display: flex; align-items: flex-start; gap: 8px; max-width: 92%; margin-top: -10px; font-size: 13px;
  line-height: 1.45; color: var(--soft); }
.msg-decision .icon { display: flex; flex: none; padding-top: 1px; }
.msg-decision svg { width: 16px; height: 16px; }
.msg-decision.deny { color: var(--muted); }
.msg-decision + .msg-decision { margin-top: -16px; }

.card { border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column;
  gap: 16px; background: #ffffff; box-shadow: 0 3px 18px rgba(38, 38, 38, .05); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-title { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card-title b { font-size: 17px; font-weight: 600; }
.clock { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--blue); }
.clock.stopped { color: var(--ink); }
.clock .time { font-family: var(--mono); font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; }
.clock .state { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.clock .state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.box { background: var(--subtle-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.box span { font-size: 12px; color: var(--muted); }
.box b { font-size: 14px; font-weight: 600; color: var(--soft); }
.box.ok b { color: var(--green); }
.lines { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid #f0f0f0; padding-top: 14px; }
.line { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.45; }
.line .at { color: var(--muted); font-variant-numeric: tabular-nums; }
.line .text { color: var(--text); overflow-wrap: anywhere; }
.line.struck .text { color: var(--muted); text-decoration: line-through; }

.approval { border: 1px solid var(--blue-line); background: var(--blue-wash); border-radius: 18px; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px; }
.approval .label { color: var(--blue); }
.approval h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.approval p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.approval p.wait { font-size: 14px; font-weight: 500; color: var(--blue-deep); }
.confirm.answered { background: #ffffff; border-color: var(--line); }
.confirm.answered .label { color: var(--muted); }
.draft { background: #ffffff; border: 1px solid #e7e7e7; border-radius: 12px; padding: 14px 16px; display: flex;
  flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 2px; }
.primary { height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--blue); color: #ffffff;
  font-size: 15px; font-weight: 600; }
.primary:disabled { background: #b1b1b1; }
a.primary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.secondary { height: 46px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 14px; background: #ffffff;
  font-size: 15px; font-weight: 500; }
.approved { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--green); }
.approved.quiet { color: var(--muted); }
.approved svg { width: 18px; height: 18px; }

/* What Opal wrote for a clinician: a document or an email draft she opens and copies. */
.doc { border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column;
  gap: 10px; background: #ffffff; box-shadow: 0 3px 18px rgba(38, 38, 38, .05); }
.doc h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.doc p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--soft); overflow-wrap: anywhere; }
.doc .to { font-size: 14px; color: var(--muted); }
.doc-text { white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere;
  max-height: 4.65em; overflow: hidden; }
.doc-text.open { max-height: none; }
.doc.sent .label { color: var(--green); }

/* A nurse call from the test unit: the call system's own words in ink, with one black button that accepts it. */
.call-card { border: 1px solid var(--line-2); border-radius: 18px; padding: 18px 20px; display: flex;
  flex-direction: column; gap: 10px; background: #ffffff; max-width: 540px; }
.call-card.waiting { border: 1.5px solid #000000; }
.call-card .label { color: #000000; }
.call-card h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: #000000;
  overflow-wrap: anywhere; }
.call-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--soft); overflow-wrap: anywhere; }
.call-card .comment, .call-card .update { font-size: 15px; color: #000000; }
.call-card .hint { color: var(--muted); }
.call-card .via { font-size: 12px; color: var(--muted); }
.call-card .approved { color: #000000; }
.call-go { min-height: 46px; height: auto; padding: 12px 17px; border: 0; border-radius: 11px; background: #000000; color: #ffffff;
  font-size: 13px; line-height: 1.4; font-weight: 500; }
.call-go:hover:not(:disabled) { background: #333333; }
.call-go:disabled { background: #8c8c8c; }


.guard-line { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--subtle-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: #434343; max-width: 540px; }
.guard-line svg { width: 20px; height: 20px; flex: none; }

/* Which path answered: Opal Claw behind the guard, or the set phrases. */
.foot { align-self: center; display: flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 0 2px;
  font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; }
.foot span:first-child { display: flex; flex: none; }
.foot svg { width: 14px; height: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 8px 40px 0; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #ffffff;
  font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip:hover { border-color: #d3d3d3; }

.composer { flex: none; margin: 0; padding: 14px 40px 26px; }
.composer-box { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px;
  border: 1px solid var(--line-2); border-radius: 20px; background: #ffffff; box-shadow: 0 3px 18px rgba(38, 38, 38, .05); }
.composer-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(86, 86, 86, .12); }
.talk-btn { width: 52px; height: 52px; flex: none; border: 0; padding: 0; background: var(--blue-soft); border-radius: 15px;
  display: flex; align-items: center; justify-content: center; }
.talk-btn.on { background: #eaeaea; }
.talk-btn canvas { width: 46px; height: 46px; }
.field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.voice { font-size: 12px; font-weight: 500; color: var(--blue); }
.voice.quiet { color: var(--muted); }
.field input { width: 100%; border: 0; padding: 4px 0; margin: 0; font: inherit; font-size: 16px; background: transparent;
  color: var(--ink); outline: none; }
.send { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: #f0f0f0; color: #a9a9a9;
  display: flex; align-items: center; justify-content: center; }
.send.ready { background: var(--ink); color: #ffffff; }
.send svg { width: 19px; height: 19px; }

.notice { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 10; max-width: min(520px, calc(100vw - 32px));
  background: var(--ink); color: #ffffff; font-size: 14px; line-height: 1.45; padding: 12px 16px; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(38, 38, 38, .2); }

/* ---- the right: Opal's computer -------------------------------------------------------------- */

.computer { flex: 0 1 470px; min-width: 0; border-left: 1px solid var(--line); background: var(--panel); padding: 24px;
  display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.computer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.computer-head .title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.computer-head svg { width: 20px; height: 20px; }
.status { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.working, .status.waiting { color: var(--blue); }
.status.done { color: var(--green); }
.computer > p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.screen { position: relative; width: 100%; max-width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line-2);
  border-radius: 12px; background: #ffffff; overflow: hidden; box-shadow: 0 8px 28px rgba(38, 38, 38, .07); }
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.screen-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; background: #ffffff; }
.screen-empty b { font-size: 14px; color: var(--soft); font-weight: 600; }
.screen-bar { position: absolute; left: 0; right: 0; top: 0; height: 8.5%; background: #f3f3f3; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 5px; padding: 0 9px; }
.screen-bar i { width: 6px; height: 6px; border-radius: 50%; background: #d7d7d7; }
.now { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.now b { font-size: 14px; font-weight: 500; }
.now span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.steps li.done { color: var(--ink); }
.steps li.active { color: var(--blue); }
.steps svg { width: 18px; height: 18px; flex: none; }
.guard-note { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-radius: 12px; background: #ffffff;
  border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: #434343; }
.guard-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.msg-computer { display: none; }
.computer-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column;
  gap: 12px; background: var(--panel); }
/* On a phone the card in the conversation keeps to Opal's screen and the step it is on, so the whole card fits above
   the suggestions. The side panel on a wider screen lists every step. */
.computer-card .computer-stack { gap: 12px; }
.computer-card .steps { display: none; }
.computer-card .guard-note { padding: 10px 12px; font-size: 12px; line-height: 1.45; }

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

.signin { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.signin form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.signin h1 { margin: 0; font-size: 40px; line-height: 1.05; font-weight: 590; letter-spacing: -.05em; }
.signin p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.signin label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--soft); }
.signin input { height: 48px; border: 1px solid var(--line-2); border-radius: 14px; padding: 0 14px; font: inherit; font-size: 16px; }
.signin input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(86, 86, 86, .12); }
.signin .error { color: #a3261c; font-size: 14px; min-height: 20px; }
.signin .signup-link a { color: var(--blue); text-decoration: none; font-weight: 500; }

/* ---- a page that is not built yet, such as Connected accounts before the vault is here ------------- */

.soon { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 14px; padding: 24px max(24px, env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom))
  max(24px, env(safe-area-inset-left)); }
.soon h1 { margin: 0; font-size: 34px; line-height: 1.08; font-weight: 590; letter-spacing: -.045em; }
.soon p { margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---- smaller screens --------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .side { display: none; }
  .computer { flex-basis: 380px; }
}

/* A phone, from 360 to 412 pixels wide: the thread fills the screen and the composer sits above the keyboard and the
   gesture bar, with voice one tap away beside it. */
@media (max-width: 760px) {
  .top { height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right))
    0 max(16px, env(safe-area-inset-left)); }
  .brand svg { width: 21px; height: 21px; }
  .brand-word { font-size: 23px; letter-spacing: -1.2px; }
  .top-right { gap: 8px; }
  .pill { display: none; }
  .who-name { display: none; }
  .avatar { width: 34px; height: 34px; font-size: 12px; }
  .menu { top: 42px; }
  .context { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px;
    padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line);
    background: #ffffff; font-size: 13px; }
  .context .focus { font-weight: 600; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .context .badge { flex: none; font-weight: 600; color: var(--blue); font-variant-numeric: tabular-nums; }
  .computer { display: none; }
  .msg-computer { display: block; }
  .install { width: auto; margin: 10px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    padding: 10px 12px 10px 6px; gap: 10px; }
  .install-mark { width: 38px; height: 38px; border-radius: 10px; }
  .install-words span { font-size: 12.5px; line-height: 1.35; }
  .hero { padding: 12px max(24px, env(safe-area-inset-left)); }
  .hero-inner { flex-direction: column; gap: 0; text-align: center; }
  .orb canvas { width: 150px; height: 150px; }
  .orb span { margin-top: -6px; padding: 8px 4px; }
  .hello { flex: none; align-items: center; gap: 10px; margin-top: 18px; }
  .hello h1 { font-size: 34px; line-height: 1.05; letter-spacing: -.05em; }
  .hello p { font-size: 15px; line-height: 1.55; max-width: 290px; }
  .thread { padding: 14px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
  .thread-inner { gap: 16px; }
  .msg-you { max-width: 86%; gap: 5px; }
  .msg-you p { font-size: 15px; padding: 10px 14px; border-radius: 19px 19px 6px 19px; }
  .msg-opal { max-width: 100%; gap: 5px; }
  .msg-opal p { font-size: 17px; line-height: 1.45; }
  .msg-decision { max-width: 100%; margin-top: -8px; font-size: 12.5px; }
  .msg-decision + .msg-decision { margin-top: -12px; }
  .card, .approval { padding: 16px; gap: 12px; border-radius: 16px; }
  .card-title b { font-size: 15px; }
  .clock .time { font-size: 26px; }
  .line { grid-template-columns: 58px minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .box { padding: 10px 12px; }
  .box b { font-size: 13px; }
  .approval h3 { font-size: 17px; }
  .approval p { font-size: 14px; }
  .actions .primary, .actions .secondary { flex: 1 1 auto; }
  /* The suggestions scroll sideways in one row, so the thread keeps its height. */
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; gap: 8px;
    padding: 8px max(12px, env(safe-area-inset-right)) 2px max(12px, env(safe-area-inset-left)); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 40px; padding: 0 15px; font-size: 14px; }
  .composer { padding: 8px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left)); }
  .composer-box { gap: 8px; padding: 5px; border-radius: 24px; }
  .talk-btn { width: 44px; height: 44px; border-radius: 50%; }
  .talk-btn canvas { width: 38px; height: 38px; }
  .voice.quiet { display: none; }
  .field input { padding: 8px 2px; }
  .send { width: 40px; height: 40px; }
  .notice { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

.computer-stack { display: flex; flex-direction: column; gap: 16px; }

/* A clinician's own Opal shows her thread only, never the hospital's demo patients or its computer. */
.opal.clinician .side, .opal.clinician .computer, .opal.clinician .context { display: none; }

/* Opal's conversation styling. Appended to the existing app stylesheet.
   Layout only: message content, approvals, guard decisions and account behavior stay in the app. */
:root {
  --ink: #1c1c1c;
  --text: #333333;
  --soft: #545454;
  --muted: #6a6a6a;
  --line: #e7e7e7;
  --line-2: #dbdbdb;
  --subtle: #f2f2f2;
  --subtle-2: #f7f7f7;
  --panel: #f5f5f5;
  --blue: #373737;
  --blue-deep: #2f2f2f;
  --blue-soft: #efefef;
  --blue-line: #dbdbdb;
  --blue-wash: #f8f8f8;
  --green: #4d4d4d;
  --green-wash: #f0f0f0;
}

.hero .orb > canvas { display: none; }
.field textarea { display: block; width: 100%; min-height: 32px; max-height: 132px; resize: none; border: 0; padding: 5px 0; margin: 0; font: inherit; font-size: 16px; line-height: 22px; background: transparent; color: var(--ink); outline: none; }
.field textarea:focus-visible { outline: none; }
.field textarea::placeholder { color: #747474; }
.suggestions { flex: none; max-width: 740px; width: 100%; margin: 0 auto; padding: 8px 28px 0; font-size: 12px; color: var(--muted); }
.suggestions summary { cursor: pointer; width: max-content; min-height: 32px; padding: 8px 2px; }
.suggestions .chips { padding: 4px 0; margin: 0; justify-content: flex-start; }
.computer-head-actions { display: flex; gap: 9px; align-items: center; }
.computer-close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #686868; }
.computer-close:hover { background: #ededed; }
.computer-close svg { width: 18px; height: 18px; }
.empty-computer-mark { display: flex; margin-bottom: 8px; }
.empty-computer-mark svg { width: 30px; height: 30px; }

html, body { background: #f5f5f5; }
body { padding: 24px; overflow: hidden; }
.opal {
  width: min(1160px, 100%);
  height: calc(var(--app-height, 100dvh) - 48px);
  margin: 0 auto;
  border: 1px solid #e1e1e1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 40px #34343405;
}
.opal.computer-open { width: min(1440px, 100%); }
.top {
  height: 82px;
  padding: 0 28px;
  gap: 18px;
  background: #fff;
}
.brand { gap: 10px; }
.brand svg { width: 29px; height: 29px; }
.brand-word { font-size: 25px; font-weight: 550; letter-spacing: -1.15px; }
.top-right { gap: 17px; }
.pill { border-color: var(--line); color: var(--soft); font-size: 12px; padding: 0 13px; }
.pill.quiet { color: var(--muted); }
.pill.quiet, .voice.quiet { display: none; }
.pill .dot { width: 6px; height: 6px; }
.avatar {
  width: 44px;
  height: 44px;
  border: 1px solid #dfdfdf;
  background: #f2f2f2;
  color: #4f4f4f;
  font-weight: 500;
}
.who-name { font-size: 13px; gap: 3px; }
.who-name small { font-size: 11px; color: var(--muted); }
.menu { top: 52px; border-radius: 15px; box-shadow: 0 12px 35px #34343412; }
.menu button, .menu a { min-height: 44px; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid #747474;
  outline-offset: 3px;
}

.body { min-height: 0; }
.side { flex-basis: 220px; padding: 24px 12px; gap: 27px; background: #fafafa; }
.side .label { font-size: 10px; letter-spacing: .1em; padding-bottom: 9px; }
.patient { padding: 11px 10px; gap: 9px; border-radius: 11px; }
.patient.focus { background: #efefef; }
.patient .tag { width: 19px; font-size: 12px; }
.patient .name { font-size: 14px; }
.patient .note { font-size: 12px; line-height: 1.4; }
.patient .badge { font-size: 11px; line-height: 1.45; }
.task { gap: 9px; padding: 9px 10px; }
.task .what b { font-size: 13px; line-height: 1.4; }
.task .what span { font-size: 12px; line-height: 1.4; }
.nothing { font-size: 12px; line-height: 1.6; }
.task .dot { width: 6px; height: 6px; }

.talk { min-width: 0; min-height: 0; background: #fff; }
.opal.clinician .body { justify-content: center; }
.opal.clinician .talk { flex: 1 1 auto; width: 100%; max-width: 760px; }
.hero { padding: 30px 28px 42px; }
.hero-inner { max-width: 500px; flex-direction: column; flex-wrap: nowrap; gap: 23px; text-align: center; }
.hero .orb { color: var(--muted); }
.hero .orb canvas { width: 88px; height: 88px; filter: grayscale(1); }
.hero .orb span { margin-top: 0; font-size: 12px; padding: 8px 5px; border-bottom-color: #dfdfdf; }
.hero-mark { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid #e8e8e8; border-radius: 23px; background: #f6f6f6; }
.hero-mark svg, .hero-mark img { width: 44px; height: 44px; }
.hello { flex: none; align-items: center; width: 100%; gap: 12px; }
.hello h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 43px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -1.6px;
}
.hello h1 em { color: inherit; }
.hello p { max-width: 390px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.install { width: calc(100% - 56px); margin-top: 18px; border-radius: 16px; box-shadow: none; }
.install-go, .install-later { min-height: 44px; }
.install-later { width: 44px; }

.thread { padding: 28px 30px 22px; scrollbar-width: thin; scrollbar-color: #d1d1d1 transparent; }
.thread-inner { max-width: 680px; gap: 23px; }
.day { font-size: 11px; font-weight: 400; background: transparent; padding: 4px 10px; }
.msg-you { max-width: 82%; gap: 7px; }
.msg-you .by { font-size: 11px; font-weight: 400; }
.msg-you p {
  padding: 13px 17px;
  border-radius: 19px 19px 5px 19px;
  background: #232323;
  color: #fff;
  font-size: 15px;
  line-height: 1.55;
}
.msg-you.partial p { color: #e5e5e5; }
.msg-you .sends, .msg-status { font-size: 11px; line-height: 1.45; }
.msg-opal { max-width: 92%; align-items: flex-start; gap: 7px; }
.msg-opal .by { font-size: 11px; color: #636363; font-weight: 500; padding-left: 2px; }
.msg-opal p {
  padding: 13px 17px;
  border-radius: 19px 19px 19px 5px;
  background: #f2f2f2;
  color: #353535;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}
.msg-opal .cut { font-size: 11px; }
.msg-opal.thinking p { padding: 12px 16px; font-size: 14px; }
.dots b { width: 4px; height: 4px; }
.msg-decision { max-width: 96%; font-size: 12px; line-height: 1.55; color: var(--soft); gap: 7px; }
.msg-decision.deny { color: #686868; }
.msg-decision svg { width: 15px; height: 15px; }

.card, .approval, .doc, .call-card {
  border-color: #e0e0e0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 15px #30303004;
  padding: 20px;
}
.card-title b, .doc h3, .call-card h3 { font-size: 16px; font-weight: 550; line-height: 1.4; }
.label { font-size: 10px; letter-spacing: .09em; color: var(--muted); }
.clock .time { font-size: 27px; font-weight: 500; }
.clock .state { font-size: 11px; }
.boxes { gap: 9px; }
.box { border-radius: 10px; background: #f7f7f7; padding: 12px; }
.box span { font-size: 11px; }
.box b { font-size: 13px; line-height: 1.45; font-weight: 500; }
.lines { border-color: var(--line); padding-top: 13px; gap: 9px; }
.line { font-size: 13px; line-height: 1.5; grid-template-columns: 58px minmax(0, 1fr); }
.approval { gap: 13px; background: #fafafa; }
.approval .label { color: #606060; }
.approval h3 { font-size: 17px; font-weight: 550; line-height: 1.4; }
.approval p { font-size: 14px; line-height: 1.65; color: var(--soft); }
.approval p.wait { font-size: 13px; color: #525252; }
.draft { border-color: #e0e0e0; border-radius: 11px; background: #fff; padding: 15px; font-size: 14px; line-height: 1.65; }
.actions { gap: 9px; padding-top: 3px; }
.primary { min-height: 44px; height: auto; padding: 12px 17px; border-radius: 11px; background: #303030; color: #fff; font-size: 13px; font-weight: 500; }
.primary:hover:not(:disabled) { background: #464646; }
.primary:disabled { background: #7a7a7a; color: #fff; }
.secondary { min-height: 44px; height: auto; padding: 11px 15px; border-radius: 11px; border-color: #d7d7d7; font-size: 13px; font-weight: 400; }
.secondary:hover { background: #f2f2f2; }
.approved { font-size: 13px; line-height: 1.5; }
.doc { gap: 11px; }
.doc p, .doc-text, .call-card p { font-size: 14px; line-height: 1.65; }
.doc .to { font-size: 12px; line-height: 1.5; }
.doc-text { max-height: 4.95em; }
.doc-text.open { max-height: none; }
.guard-line { padding: 12px 14px; background: #f8f8f8; border-color: #e0e0e0; font-size: 13px; line-height: 1.55; }
.foot { font-size: 11px; line-height: 1.6; padding: 5px 0; color: #686868; }
.chips { gap: 8px; max-width: 740px; margin: 0 auto; padding: 7px 28px 0; }
.chip { min-height: 44px; padding: 10px 15px; border-color: #e0e0e0; font-size: 12px; font-weight: 400; }
.chip:hover { border-color: #bfbfbf; background: #f9f9f9; }

.composer { padding: 15px 28px 22px; }
.composer-box {
  max-width: 700px;
  padding: 7px;
  gap: 10px;
  border: 1px solid #d7d7d7;
  border-radius: 23px;
  background: #fbfbfb;
  box-shadow: 0 4px 16px #30303004;
}
.composer-box:focus-within { border-color: #a0a0a0; box-shadow: 0 3px 15px #30303009; }
.talk-btn { width: 44px; height: 44px; border-radius: 50%; background: #f0f0f0; }
.talk-btn.on { background: #e4e4e4; }
.talk-btn canvas { width: 38px; height: 38px; filter: grayscale(1); }
.field { gap: 2px; }
.voice { font-size: 11px; color: #606060; line-height: 1.35; }
.voice.quiet { color: var(--muted); }
.field input { min-height: 30px; padding: 4px 0; font-size: 16px; line-height: 1.4; }
.field input::placeholder { color: #747474; }
.send { width: 44px; height: 44px; background: #e8e8e8; color: #808080; }
.send.ready { background: #2e2e2e; color: #fff; }
.send.ready:hover { background: #474747; }
.notice { bottom: 126px; background: #2f2f2f; box-shadow: 0 10px 30px #30303020; border-radius: 13px; }

.computer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 11px;
  background: #fff;
  color: #5e5e5e;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
.computer-toggle svg { width: 17px; height: 17px; }
.computer-toggle:hover, .computer-toggle[aria-expanded="true"], .computer-toggle[aria-pressed="true"] { background: #f1f1f1; color: #3b3b3b; border-color: #d2d2d2; }
.view-switch { display: none; }
.opal:not(.computer-open) .computer { display: none; }
.opal.computer-open .body { justify-content: initial; }
.opal.computer-open .talk { max-width: none; width: auto; flex: 1 1 55%; min-width: 0; }
.opal.computer-open .computer,
.opal.clinician.computer-open .computer {
  display: flex;
  flex: 0 1 45%;
  min-width: 0;
  max-width: 680px;
  padding: 24px;
  gap: 18px;
  border-left: 1px solid #e0e0e0;
  background: #f6f6f6;
}
.computer-head { gap: 12px; align-items: flex-start; }
.computer-head .title { font-size: 14px; font-weight: 500; gap: 8px; line-height: 1.4; }
.computer-head svg { width: 18px; height: 18px; }
.status { font-size: 11px; line-height: 1.5; gap: 6px; }
.status i { width: 6px; height: 6px; }
.computer > p { font-size: 13px; line-height: 1.65; color: var(--muted); }
.computer-stack { gap: 17px; }
.screen { border-color: #d4d4d4; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px #3030300c; }
.screen img { object-fit: contain; object-position: top center; background: #fff; }
.screen-bar { background: #f0f0f0; border-color: #e0e0e0; }
.screen-bar i { background: #c3c3c3; }
.screen-empty { font-size: 12px; line-height: 1.55; color: var(--muted); padding: 22px; }
.screen-empty b { font-size: 14px; font-weight: 500; color: #535353; }
.now { align-items: flex-start; gap: 13px; }
.now b { font-size: 13px; line-height: 1.55; font-weight: 500; overflow-wrap: anywhere; }
.now span { font-size: 11px; line-height: 1.7; }
.steps { gap: 12px; }
.steps li { font-size: 13px; line-height: 1.5; align-items: flex-start; gap: 9px; }
.steps svg { width: 17px; height: 17px; margin-top: 1px; }
.steps .active svg, .steps li.active svg { stroke: currentColor; }
.guard-note { padding: 13px 14px; border-color: #dedede; border-radius: 11px; background: #fff; color: #616161; font-size: 12px; line-height: 1.65; }
.guard-note svg { width: 17px; height: 17px; }
.opal.clinician .side, .opal.clinician .context, .opal.clinician .msg-computer { display: none; }

.signin h1, .soon h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -1.1px; }
.signin input { border-color: #d9d9d9; }
.signin input:focus { border-color: #a0a0a0; box-shadow: 0 0 0 3px #e6e6e655; }

@media (min-width: 1440px) {
  body { padding: 34px; }
  .opal { height: calc(var(--app-height, 100dvh) - 68px); max-height: 1040px; }
  .top { height: 90px; padding-left: 32px; padding-right: 32px; }
  .computer { padding: 28px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .top { padding-left: 22px; padding-right: 22px; }
  .top-right { gap: 12px; }
  .who-name { display: none; }
  .opal.computer-open .computer, .opal.clinician.computer-open .computer { padding: 20px; }
  .thread { padding-left: 24px; padding-right: 24px; }
  .composer { padding-left: 22px; padding-right: 22px; }
  .chips { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 760px) {
  html, body { background: #fff; }
  body { padding: 0; }
  .opal { width: 100%; height: var(--app-height, 100dvh); margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .top {
    height: calc(72px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
    gap: 12px;
  }
  .brand { gap: 9px; }
  .brand svg { width: 27px; height: 27px; }
  .brand-word { font-size: 24px; }
  .top-right { gap: 10px; }
  .avatar { width: 44px; height: 44px; font-size: 12px; }
  .menu { top: 52px; }
  .computer-toggle { display: none; }
  .view-switch {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 54px;
    padding: 4px 18px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  .view-switch .chat-view, .view-switch .computer-view {
    min-height: 44px;
    min-width: 120px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #676767;
    font-size: 12px;
    font-weight: 400;
  }
  .view-switch button svg { width: 16px; height: 16px; }
  .view-switch button[aria-pressed="true"], .view-switch button[aria-selected="true"] { border-color: #e2e2e2; background: #f2f2f2; color: #3b3b3b; }
  .context { min-height: 40px; padding-left: 18px; padding-right: 18px; font-size: 12px; background: #fbfbfb; }
  .context .badge { font-size: 11px; }
  .hero { padding: 22px 24px 28px; }
  .hero-inner { gap: 20px; }
  .hero .orb canvas { width: 76px; height: 76px; }
  .hero .orb span { font-size: 11px; padding: 7px 5px; }
  .hero-mark { width: 69px; height: 69px; border-radius: 22px; }
  .hero-mark svg, .hero-mark img { width: 40px; height: 40px; }
  .hello { margin-top: 0; gap: 11px; }
  .hello h1 { font-size: 39px; line-height: 1.13; letter-spacing: -1.4px; }
  .hello p { max-width: 315px; font-size: 15px; line-height: 1.65; }
  .install { width: auto; margin: 10px 14px 0; padding: 7px; gap: 8px; }
  .install-go { padding: 0 13px; font-size: 13px; }
  .install-later { width: 44px; height: 44px; }
  .install-words span { font-size: 12px; }
  .thread { padding: 23px max(20px, env(safe-area-inset-right)) 18px max(20px, env(safe-area-inset-left)); }
  .thread-inner { gap: 21px; }
  .msg-you { max-width: 87%; }
  .msg-you p { font-size: 15px; line-height: 1.55; padding: 12px 15px; }
  .msg-opal { max-width: 94%; }
  .msg-opal p { font-size: 15px; line-height: 1.6; padding: 12px 15px; }
  .msg-decision { max-width: 100%; font-size: 12px; }
  .card, .approval, .doc, .call-card { padding: 17px; border-radius: 16px; }
  .approval h3, .doc h3, .call-card h3 { font-size: 16px; }
  .approval p, .doc p, .doc-text, .call-card p { font-size: 14px; }
  .actions { gap: 8px; }
  .actions .primary, .actions .secondary { min-height: 44px; }
  .chips { width: 100%; max-width: none; margin: 0; padding: 7px 14px 2px; gap: 8px; }
  .chip { min-height: 44px; font-size: 12px; padding: 10px 14px; }
  .composer { padding: 9px max(13px, env(safe-area-inset-right)) max(13px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); }
  .composer-box { border-radius: 24px; padding: 6px; gap: 7px; }
  .talk-btn, .send { width: 44px; height: 44px; }
  .talk-btn canvas { width: 37px; height: 37px; }
  .field input { min-height: 38px; padding: 8px 2px; font-size: 16px; }
  .voice { font-size: 10px; }
  .notice { bottom: calc(105px + env(safe-area-inset-bottom)); }
  .opal .body { min-height: 0; }
  .opal:not(.mobile-computer) .computer,
  .opal.clinician.computer-open:not(.mobile-computer) .computer { display: none; }
  .opal.mobile-computer .talk { display: none; }
  .opal.mobile-computer .computer,
  .opal.clinician.mobile-computer .computer {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    border-left: 0;
    padding: 22px 18px;
    gap: 17px;
    background: #f7f7f7;
  }
  .computer-head .title { font-size: 14px; }
  .computer > p { font-size: 13px; }
  .computer-stack { gap: 16px; }
  .screen { border-radius: 11px; }
  .screen-empty { font-size: 12px; }
  .steps li { font-size: 13px; line-height: 1.55; }
  .guard-note { font-size: 12px; line-height: 1.6; }
  .msg-computer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition: none; }
}

/* Conversation reliability and keyboard access. */
.msg-you p, .msg-opal p { white-space: pre-wrap; }
.thread-inner > [tabindex="-1"]:focus-visible { outline: 2px solid #676767; outline-offset: 5px; border-radius: 14px; }
.failed-message-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 12px; line-height: 1.4; color: #676767; }
.retry-message { min-height: 44px; padding: 9px 13px; border: 1px solid #d3d3d3; border-radius: 10px; background: #fff; color: #333333; font: inherit; font-weight: 500; }
.retry-message:hover:not(:disabled) { background: #f2f2f2; border-color: #b7b7b7; }
.retry-message:disabled { color: #717171; background: #f6f6f6; }
.connection-note { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 7px 20px; border-bottom: 1px solid #dfdfdf; background: #f4f4f4; color: #515151; font-size: 12px; line-height: 1.5; }
.connection-note button { min-height: 44px; padding: 8px 12px; border: 1px solid #cbcbcb; border-radius: 9px; background: #fff; color: #515151; font-size: 12px; white-space: nowrap; }
.connection-note button:hover { background: #f9f9f9; }
.message-limit { display: block; max-width: 700px; margin: 7px auto 0; padding: 0 6px; text-align: right; font-size: 10px; line-height: 1.4; color: #686868; }
.message-limit.over-limit { color: #575757; font-weight: 500; }
.suggestions summary { min-height: 44px; padding-top: 12px; padding-bottom: 12px; line-height: 20px; }
@media (max-width: 760px) {
  .connection-note { justify-content: space-between; gap: 10px; padding-left: 18px; padding-right: 18px; }
  .message-limit { font-size: 10px; margin-top: 6px; }
}

.own-computer-screen img { object-fit: contain; object-position: top center; }
.own-computer-words { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.own-computer-site { align-self: flex-start; max-width: 100%; padding: 6px 9px; border: 1px solid #dddddd; border-radius: 7px; background: #fff; font-size: 11px; line-height: 1.4; color: #5d5d5d; overflow-wrap: anywhere; }
.own-computer-handoff { align-self: flex-start; max-width: 100%; text-align: center; line-height: 1.4; }

/* Activity and Computer share the right side; each view keeps the current chat in place. */
.activity-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px;
  border: 1px solid #e1e1e1; border-radius: 9px; background: #fff; color: #666; font: inherit; font-size: 12px; }
.activity-toggle:hover, .activity-toggle[aria-expanded="true"] { background: #f1f1f1; color: #333; }
.opal.activity-open { width: min(1440px, 100%); }
.opal.activity-open .body { justify-content: initial; }
.opal.activity-open .talk { flex: 1 1 56%; max-width: none; width: auto; min-width: 0; }
.opal .body > .opal-activity { flex: 0 1 44%; max-width: 680px; min-width: 310px; border-left: 1px solid #e3e3e3; }
.opal .activity-header { padding: 25px 24px 20px; gap: 12px; flex-wrap: wrap; }
.opal .activity-header h1 { font-size: 30px; }
.opal .activity-tabs { padding: 0 24px; gap: 22px; }
.opal .activity-body { padding: 24px; }
.opal .activity-header .activity-eyebrow { display: none; }
@media (max-width: 1030px) and (min-width: 761px) {
  .top-right { gap: 6px; }
  .activity-toggle, .computer-toggle { padding: 8px; font-size: 11px; }
}
@media (max-width: 760px) {
  .activity-toggle { display: none; }
  .view-switch .chat-view, .view-switch .computer-view, .view-switch .activity-view {
    min-width: 0; flex: 1; min-height: 44px; padding: 10px 14px; border: 1px solid transparent;
    border-radius: 9px; background: transparent; color: #676767; font: inherit; font-size: 12px;
  }
  .view-switch button[aria-pressed="true"] { border-color: #e2e2e2; background: #f2f2f2; color: #3b3b3b; }
  .opal.mobile-activity .talk, .opal.mobile-activity .computer { display: none; }
  .opal .body > .opal-activity { min-width: 0; }
  .opal.mobile-activity .body > .opal-activity { flex: 1 1 auto; width: 100%; max-width: none; border: 0; }
  .opal .activity-header { padding: 24px 20px 18px; }
  .opal .activity-tabs { padding: 0 20px; }
  .opal .activity-body { padding: 22px 20px 36px; }
}

.unsent-dialog { width:min(540px,calc(100vw - 40px)); padding:28px; border:1px solid #ddd; border-radius:20px; color:#171717; background:#fff; font:inherit; }
.unsent-dialog::backdrop { background:#0005; }
.unsent-dialog section { padding:18px 0; border-bottom:1px solid #eee; }
.unsent-dialog textarea { box-sizing:border-box; width:100%; margin:10px 0; padding:12px; border:1px solid #ddd; border-radius:12px; font:inherit; color:inherit; background:#fafafa; }
.unsent-dialog button { margin:8px 10px 0 0; padding:8px 14px; border:1px solid #ddd; border-radius:20px; color:inherit; background:#fff; font:inherit; }

/* Tester contexts use the same plain account controls as the rest of Opal. */
.test-contexts { padding: 6px 0; border-bottom: 1px solid var(--line, #e8e8e8); }
.test-contexts button[aria-pressed="true"] { font-weight: 600; }
.test-contexts button:disabled { color: #919191; cursor: default; }
.test-program { margin: 16px 24px; padding: 20px; border: 1px solid #e8e8e8; border-radius: 16px; background: #fff; font-size: 14px; line-height: 1.5; }
.test-program[hidden] { display: none; }
.test-program h2 { margin: 0 0 10px; font-size: 20px; font-weight: 500; }
.test-program p { margin: 8px 0; }
.test-program-consent { display: flex; align-items: start; gap: 10px; margin: 16px 0; }
.test-program-consent input { margin-top: 4px; accent-color: #171717; }
.test-program-links { color: #737373; font-size: 13px; }
.test-program-error { color: #b42318; }
.test-program button.primary { margin-top: 8px; }

/* Accepted testing stays a small context control; the consent form remains separate. */
.test-program.compact { margin: 8px 24px 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.test-context-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; min-height: 36px; }
.test-context-current { min-height: 34px; padding: 6px 12px; border: 1px solid #e5e5e5; border-radius: 18px;
  background: #fff; color: #666; font: inherit; font-size: 12px; cursor: pointer; }
.test-context-current:hover { background: #f6f6f6; color: #222; }
.test-context-current:focus-visible { outline: 2px solid #777; outline-offset: 3px; }
.test-context-bar a { color: #666; font-size: 12px; text-underline-offset: 3px; }
.test-context-reason { max-width: 230px; margin: 5px 12px 9px; color: #777; font-size: 11px; line-height: 1.5; }
@media (max-width: 760px) { .test-program.compact { margin: 5px 20px 0; } }
