/* Cortera portal. One stylesheet, self-hosted font, no inline styles (CSP). */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff") format("woff");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5e6773;
  --secondary: #3a4555;
  --border: #d9dfe5;
  --border-strong: #bcc5cf;
  --teal: #337d8d;
  --teal-hover: #163749;
  --teal-soft: #dcf0f4;
  --primary: #e08f40;
  --primary-hover: #d5822f;
  --on-primary: #281606;
  --later-bg: #fbecd9;
  --later-border: #ebc79a;
  --later-text: #784817;
  --later-text-strong: #4f2f0f;
  --track: #e3e8ed;
  --bubble: #ecf1f4;
  --error: #9b2c2c;
  --placeholder: #6b7480;
  --on-teal: #ffffff;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1621;
    --surface: #17202d;
    --text: #e8ecf1;
    --muted: #a3adba;
    --secondary: #c3cbd6;
    --border: #2a3646;
    --border-strong: #3d4b5e;
    --teal: #6cc0cf;
    --teal-hover: #9ad6e1;
    --teal-soft: #15323a;
    --primary: #e99a4e;
    --primary-hover: #f0aa66;
    --on-primary: #281606;
    --later-bg: #3a2a17;
    --later-border: #6b4a22;
    --later-text: #f2c998;
    --later-text-strong: #f7dcb8;
    --track: #2a3646;
    --bubble: #1f2b3a;
    --error: #f08a8a;
    --placeholder: #7d8896;
    --on-teal: #0f1621;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1621;
  --surface: #17202d;
  --text: #e8ecf1;
  --muted: #a3adba;
  --secondary: #c3cbd6;
  --border: #2a3646;
  --border-strong: #3d4b5e;
  --teal: #6cc0cf;
  --teal-hover: #9ad6e1;
  --teal-soft: #15323a;
  --primary: #e99a4e;
  --primary-hover: #f0aa66;
  --on-primary: #281606;
  --later-bg: #3a2a17;
  --later-border: #6b4a22;
  --later-text: #f2c998;
  --later-text-strong: #f7dcb8;
  --track: #2a3646;
  --bubble: #1f2b3a;
  --error: #f08a8a;
  --placeholder: #7d8896;
  --on-teal: #0f1621;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, p, ol, ul { margin: 0; }

[tabindex="-1"]:focus { outline: none; }
ol, ul { padding: 0; list-style: none; }

a { color: var(--teal); }
a:hover { color: var(--teal-hover); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript { padding: 24px; }

[hidden] { display: none !important; }

/* ---------- Page frame ---------- */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}
.brand-dot { color: var(--teal); }

.app-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.app-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 16px; }
.divider { width: 1px; height: 20px; background: var(--border); }
.header-context { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }

.plain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px;
}

.saved-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.saved-indicator svg { color: var(--teal); }

/* ---------- Theme toggle ---------- */

.theme-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--secondary);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--teal-hover); background: var(--teal-soft); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: 600 15px var(--font);
  cursor: pointer;
  text-decoration: none;
}
.btn:hover:not(:disabled) { border-color: var(--teal); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary { border: 0; background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-large { min-height: 52px; padding: 0 26px; border-radius: 12px; font-size: 16px; gap: 10px; }
.btn-medium { min-height: 48px; padding: 0 24px; border-radius: 12px; font-size: 16px; }

.link-button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--teal);
  font: 500 14px var(--font);
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover:not(:disabled) { color: var(--teal-hover); }
.link-button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Banner ---------- */

#banner { position: sticky; top: 0; z-index: 20; }
.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 10px 24px;
  background: var(--later-bg);
  border-bottom: 1px solid var(--later-border);
  color: var(--later-text-strong);
  font-size: 15px;
  font-weight: 500;
}
.banner .btn { min-height: 44px; border-color: var(--later-border); color: var(--later-text); }

/* ---------- Sign-in ---------- */

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-column { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 24px; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--teal); }

h1 {
  font-size: 36px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.lead { font-size: 16px; line-height: 1.55; color: var(--muted); }
.lead strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.small-note { font-size: 14px; line-height: 1.5; color: var(--muted); }

.form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.form-card label { font-size: 14px; font-weight: 600; }
.form-card input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font: 400 16px var(--font);
  color: var(--text);
  background: var(--surface);
  width: 100%;
}
.form-card input::placeholder, .composer textarea::placeholder { color: var(--placeholder); }
.form-card .code-input {
  height: 56px;
  padding: 0 8px 0 calc(8px + 0.35em);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-align: center;
}
.form-card .btn-primary { min-height: 48px; font-size: 16px; }
.form-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; }
.form-card input[aria-invalid="true"] { border-color: var(--error); }
.field-error { min-height: 0; color: var(--error); font-size: 14px; font-weight: 500; }
.field-error:empty { display: none; }
.field-status { color: var(--secondary); font-size: 14px; }
.field-status:empty { display: none; }

.site-footer {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Content pages (welcome, complete, paused, transcript) ---------- */

.content-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.content-main h1 { font-size: 42px; line-height: 1.1; }
.page-lead { font-size: 18px; line-height: 1.55; color: var(--muted); }
.stack-12 { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.card h2 { font-size: 16px; font-weight: 700; }

.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; gap: 16px; padding: 20px 22px; }
.info-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.info-icon-later { background: var(--later-bg); color: var(--later-text); }
.info-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.info-body h2 { font-size: 17px; }
.info-body p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.info-body strong { color: var(--text, inherit); font-weight: 600; }
.plain-list { padding-left: 20px; list-style: disc; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.5; color: var(--muted); }

.callout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--teal-soft);
}
.callout p:first-child { font-size: 15px; line-height: 1.55; font-weight: 600; }
.callout p:last-child { font-size: 14px; line-height: 1.5; color: var(--secondary); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* Timeline */
.timeline li { display: flex; gap: 18px; }
.timeline-rail { display: flex; flex-direction: column; align-items: center; }
.timeline-marker {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline-marker.is-done { border: 0; background: var(--teal); color: var(--on-teal); }
.timeline-marker.is-current { border: 3px solid var(--teal); }
.timeline-marker.is-current::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
}
.timeline-line { flex: 1; width: 2px; min-height: 24px; background: var(--border); }
.timeline-line.is-done { background: var(--teal); }
.timeline-body { padding: 4px 0 26px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.timeline li:last-child .timeline-body { padding-bottom: 0; }
.timeline-body h2 { font-size: 17px; font-weight: 700; color: var(--secondary); }
.timeline-body.is-active h2 { color: var(--text); }
.timeline-body p { font-size: 15px; line-height: 1.55; color: var(--muted); }

.include-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.include-card ul { padding-left: 20px; list-style: disc; display: flex; flex-direction: column; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--secondary); }

.conversation-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px;
}
.conversation-card .info-body { flex: 1 1 320px; }
.conversation-card h2 { font-size: 16px; color: var(--text); }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Paused / expired / centred pages */
.center-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.center-column {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.center-column h1 { font-size: 40px; }
.center-column .lead { font-size: 17px; line-height: 1.6; }
.big-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.left-off { width: 100%; padding: 18px 22px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.left-off .caps { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.left-off .phase-now { font-size: 16px; font-weight: 600; }
.left-off .detail { font-size: 14px; color: var(--muted); }
.saved-text { color: var(--later-text); font-weight: 600; }
.center-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.meter { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter-fill { height: 100%; background: var(--teal); transition: width 0.3s ease; }

/* ---------- Interview ---------- */

.interview-main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-start;
}
.conversation { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.convo {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
}

.msg-ai { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.msg-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
}
.msg-label-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--teal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-text { font-size: 18px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-you {
  align-self: flex-end;
  max-width: 560px;
  background: var(--bubble);
  border-radius: 14px 14px 4px 14px;
  padding: 14px 18px;
}
.msg-you p { font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

.msg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.btn-later {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--later-border);
  background: var(--later-bg);
  color: var(--later-text);
  font: 600 14px var(--font);
}
.btn-later:hover:not(:disabled) { border-color: var(--later-text); }
.msg-hint { font-size: 14px; color: var(--muted); }

.quick-replies { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.btn-chip {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: 500 15px/1.3 var(--font);
  text-align: left;
  cursor: pointer;
}
.btn-chip:hover:not(:disabled) { border-color: var(--teal); }
.btn-chip:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.quick-replies .msg-hint { flex-basis: 100%; }

.typing { display: flex; align-items: center; gap: 5px; height: 28px; }
.typing-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); animation: typing 1.2s infinite ease-in-out; }
.typing-dot:nth-child(3) { animation-delay: 0.15s; }
.typing-dot:nth-child(4) { animation-delay: 0.3s; }
@keyframes typing { 0%, 80%, 100% { opacity: 0.35; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .typing-dot { animation: none; opacity: 0.7; }
  .meter-fill { transition: none; }
}

.convo > * { scroll-margin-top: 72px; scroll-margin-bottom: 220px; }

.composer-slot { position: sticky; bottom: 16px; z-index: 5; }
.composer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px 18px;
}
.composer:focus-within { outline: 3px solid var(--teal); outline-offset: 2px; }
.composer label { font-size: 14px; font-weight: 600; }
.composer textarea {
  resize: vertical;
  min-height: 72px;
  max-height: 40vh;
  border: 0;
  outline: none;
  font: 400 16px/1.5 var(--font);
  color: var(--text);
  background: transparent;
  padding: 0;
  width: 100%;
}
.composer textarea:disabled { opacity: 0.6; }
.composer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.composer-hint { font-size: 13px; color: var(--muted); }
.composer .btn-primary { min-height: 44px; padding: 0 22px; }
.send-icon { display: none; }
.composer-done { padding: 14px 18px; flex-direction: row; justify-content: flex-end; }
.composer-break { padding: 14px 18px; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* Side panel */
.panel-toggle { display: none; }
.panel { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 18px; }
.panel-card { padding: 22px; }
.panel-card h2 { margin-bottom: 4px; }
.panel-card .sub { margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.phase-list { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.phase { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.phase-marker {
  flex: none;
  margin-top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phase.is-current { font-weight: 600; color: var(--text); }
.phase.is-current .phase-marker { border-color: var(--teal); background: var(--teal); }
.phase.is-done { color: var(--secondary); }
.phase.is-done .phase-marker { border-color: var(--teal); background: var(--teal); color: var(--on-teal); }
.phase-marker svg { width: 8px; height: 8px; }

.parked-list { display: flex; flex-direction: column; gap: 10px; }
.parked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  border-radius: 12px;
  background: var(--later-bg);
}
.parked-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.parked-title { font-size: 14px; font-weight: 600; color: var(--later-text-strong); overflow-wrap: anywhere; }
.parked-who { font-size: 13px; color: var(--later-text); overflow-wrap: anywhere; }
.parked-item .btn {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  border-color: var(--later-border);
  color: var(--later-text);
  font-size: 13px;
}
.empty-note { font-size: 14px; color: var(--muted); }
.break-note { padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* Transcript view */
.transcript-list { display: flex; flex-direction: column; gap: 0; padding: 8px 24px; }
.t-msg { padding: 18px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.t-msg:last-child { border-bottom: 0; }
.t-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; color: var(--muted); }
.t-who { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal); }
.t-msg.is-you .t-who { color: var(--secondary); }
.t-text { font-size: 16px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }

/* Desktop interview: the window itself does not scroll. The header and the progress panel stay in place; only the
   conversation scrolls, inside its card, with the answer box always visible below it. */
@media (min-width: 941px) {
  body:has(.page-interview) { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body:has(.page-interview) #app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-interview { flex: 1; min-height: 0; }
  .page-interview .interview-main { min-height: 0; flex-wrap: nowrap; align-items: stretch; padding-bottom: 24px; }
  .page-interview .conversation { min-height: 0; }
  .page-interview .convo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .page-interview .convo > * { scroll-margin-top: 24px; scroll-margin-bottom: 24px; }
  .page-interview .composer-slot { position: static; flex: none; }
  .page-interview .panel { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------- Phones and small tablets ---------- */

@media (max-width: 940px) {
  .interview-main { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 16px 16px 0; }
  .conversation { flex: 1 0 auto; gap: 0; }
  .convo { flex: 1; justify-content: flex-end; background: none; border: 0; border-radius: 0; padding: 4px 0 20px; gap: 16px; }

  .composer-slot { margin: 0 -16px; bottom: 0; }
  .composer {
    border-radius: 0;
    border-width: 1px 0 0;
    border-color: var(--border);
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }
  .composer label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .composer-field { flex: 1; min-width: 0; display: flex; }
  .composer textarea {
    resize: none;
    min-height: 56px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.4;
  }
  .composer textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
  .composer:focus-within { outline: 0; }
  .composer-bar { flex: none; }
  .composer-hint, .send-label { display: none; }
  .send-icon { display: inline-flex; }
  .composer .btn-primary { width: 48px; height: 48px; padding: 0; border-radius: 12px; }
  .composer-done { justify-content: stretch; }
  .composer-break { flex-direction: column; align-items: stretch; }
  .composer-break .btn { width: 100%; }
  .composer-done .btn-primary { width: 100%; padding: 0 22px; }

  /* The progress bar stays at the top of the screen while the conversation scrolls. */
  .panel-toggle {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 8px 16px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    font: 500 14px var(--font);
    color: var(--text);
    text-align: left;
    cursor: pointer;
  }
  .panel-toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .panel-toggle .meter { height: 4px; }
  .panel-toggle svg { color: var(--muted); flex: none; }
  .panel-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .panel-toggle .saved-text { font-weight: 600; }

  .panel { display: none; max-width: none; order: -1; padding-bottom: 16px; }
  .panel.is-open { display: flex; }

  .msg-text { font-size: 17px; line-height: 1.55; }
  .msg-you { max-width: 85%; padding: 12px 14px; }
  .msg-you p { font-size: 15px; line-height: 1.5; }
  .msg-label { font-size: 12px; }
  .msg-label-icon { display: none; }
}

@media (max-width: 600px) {
  .app-header-inner { padding: 10px 16px; min-height: 0; flex-wrap: nowrap; }
  .header-left { flex: 1; }
  .app-header-inner > .link-button, .app-header-inner > .header-right { flex: none; }
  .header-right { gap: 8px; }
  .brand { font-size: 18px; }
  .hide-phone { display: none; }
  .plain-header { padding: 18px 16px; }
  .auth-main { padding: 16px; align-items: flex-start; }
  .site-footer { padding: 16px 16px 24px; }
  h1 { font-size: 30px; }
  .form-card { padding: 20px; }
  .content-main { padding: 32px 16px; gap: 24px; }
  .content-main h1 { font-size: 34px; }
  .page-lead { font-size: 17px; }
  .info-item { padding: 16px; gap: 14px; }
  .center-column h1 { font-size: 34px; }
  .center-main { padding: 24px 16px; }
  .transcript-list { padding: 4px 16px; }
  .conversation-card { padding: 18px; }
  .cta-row .btn { width: 100%; }
  .banner { padding: 10px 16px; }
}

/* Written questions about the released report */
.questions-card { flex-direction: column; align-items: stretch; }
.qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.qa-item { border-top: 1px solid var(--border); padding-top: 12px; }
.qa-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.qa-answer { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--teal); background: var(--bg); border-radius: 6px; }
.question-form { display: grid; gap: 8px; width: 100%; }
.question-form textarea {
  resize: vertical;
  min-height: 110px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 10px 12px;
  font: 400 16px/1.5 var(--font);
  color: var(--text);
  background: transparent;
}
.question-form textarea:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
