:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --text: #172027;
  --muted: #66727d;
  --line: #d8e0e2;
  --line-strong: #bcc8cb;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b42318;
  --green: #15803d;
  --ink-soft: #25323a;
  --shadow: 0 14px 36px rgba(23, 32, 39, 0.08);
  --radius: 8px;
  --kokoro-dark-blue: #213754;
  --kokoro-vivid-azure: #108995;
  --kokoro-purple-blue: #827dc5;
  --kokoro-vivid-crimson: #f07388;
  --kokoro-aqua-blue: #0cc0df;
  --kokoro-gradient: linear-gradient(90deg, #e894ff, #ff6a92);
  --kokoro-surface: #ffffff;
  --kokoro-soft-bg: #f7fbfc;
  --kokoro-text: #213754;
  --kokoro-muted: rgba(33, 55, 84, 0.68);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  overflow-wrap: anywhere;
}

.is-hidden {
  display: none !important;
}

.app-booting #authScreen,
.app-booting #appShell {
  visibility: hidden;
}

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

.auth-screen {
  display: grid;
  grid-template-columns: minmax(320px, 520px);
  grid-auto-rows: max-content;
  gap: 0;
  align-content: center;
  align-items: stretch;
  justify-content: center;
  justify-items: stretch;
  min-height: 100vh;
  padding: clamp(10px, 2vw, 24px);
  overflow-y: auto;
  background:
    linear-gradient(135deg, rgba(247, 251, 252, 0.96) 0%, rgba(235, 249, 252, 0.94) 48%, rgba(255, 245, 249, 0.98) 100%);
  color: var(--kokoro-text);
  position: relative;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: -24% auto auto -12%;
  width: min(58vw, 760px);
  aspect-ratio: 1;
  border: 42px solid rgba(12, 192, 223, 0.13);
  border-right-color: rgba(240, 115, 136, 0.13);
  border-bottom-color: rgba(130, 125, 197, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.auth-screen::after {
  content: "";
  position: absolute;
  right: -16%;
  bottom: -28%;
  width: min(60vw, 820px);
  aspect-ratio: 1;
  border: 64px solid rgba(16, 137, 149, 0.1);
  border-top-color: rgba(232, 148, 255, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.auth-panel,
.panel,
.empty-state,
.action-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.auth-hero,
.auth-panel-v3 {
  position: relative;
  z-index: 1;
  width: 100%;
  justify-self: stretch;
}

.auth-hero {
  min-height: min(292px, 38vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  justify-items: center;
  gap: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(16, 137, 149, 0.18);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 253, 254, 0.92)),
    radial-gradient(circle at 78% 16%, rgba(12, 192, 223, 0.19), transparent 34%),
    radial-gradient(circle at 22% 80%, rgba(240, 115, 136, 0.15), transparent 28%);
  box-shadow: 0 28px 80px rgba(33, 55, 84, 0.12);
  padding: clamp(18px, 2.6vw, 30px) clamp(24px, 3vw, 38px) clamp(12px, 1.6vw, 18px);
  overflow: hidden;
}

.auth-lens-ring {
  position: absolute;
  right: -120px;
  top: 54px;
  width: 360px;
  aspect-ratio: 1;
  border: 28px solid rgba(12, 192, 223, 0.13);
  border-left-color: rgba(240, 115, 136, 0.14);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: center;
  min-width: 0;
  transform: translateY(8px);
}

.auth-logo-mark-tile {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 1px solid rgba(16, 137, 149, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 40px rgba(33, 55, 84, 0.1);
  overflow: hidden;
}

.auth-logo-mark {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.auth-logo-mark-cocoro {
  transform: translateY(-2px);
}

.auth-wordmark {
  display: block;
  width: min(320px, 62vw);
  height: 64px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 18px rgba(240, 115, 136, 0.1));
}

.auth-mascot-card {
  display: grid;
  align-self: center;
  justify-self: center;
  width: min(190px, 52%);
  padding: 0;
}

.auth-mascot {
  display: block;
  justify-self: center;
  width: 100%;
  max-height: min(180px, 21vh);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 28px 34px rgba(33, 55, 84, 0.18));
}

.auth-panel-v3 {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: auto;
  margin-top: -1px;
  border: 1px solid rgba(16, 137, 149, 0.22);
  border-top: 0;
  border-radius: 0 0 30px 30px;
  background: #5e97ff;
  box-shadow: 0 28px 80px rgba(33, 55, 84, 0.13);
  padding: clamp(24px, 3.1vw, 32px) clamp(28px, 3.8vw, 42px);
  backdrop-filter: blur(10px);
  color: #fff;
}

.auth-panel-v3 .auth-language {
  justify-content: center;
  margin: 2px 0 0;
}

.auth-onboarding-copy {
  display: grid;
  gap: 10px;
}

.auth-onboarding-copy h1 {
  max-width: 320px;
  color: #fff;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.3rem, 2.8vw, 1.82rem);
  font-weight: 900;
  line-height: 1.16;
}

.auth-onboarding-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.96rem;
  font-weight: 750;
}

.auth-form-brand {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.auth-form-wordmark {
  display: block;
  width: min(190px, 70vw);
  height: 46px;
  object-fit: contain;
  object-position: left center;
}

.auth-form-brand p,
.auth-form-heading p {
  margin: 0;
  color: var(--kokoro-muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.45;
}

.auth-form-heading h2 {
  color: #fff;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
}

.auth-language {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 26px;
}

.brand-row,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-brand {
  flex: 0 0 auto;
  justify-content: center;
  width: calc(100% + 36px);
  min-height: 0;
  margin: -22px -18px 0;
  border: 0;
  border-radius: 0;
  background: #7671bf;
  box-shadow: none;
  padding: 5px 0;
  overflow: hidden;
  line-height: 0;
}

.sidebar-brand-banner {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
}

.sidebar-brand-mark {
  display: none;
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: center;
}

.app-shell.is-sidebar-collapsed .sidebar {
  gap: 14px;
  z-index: 12;
  overflow: visible;
  padding: 18px 10px;
}

.app-shell.is-sidebar-collapsed .sidebar-brand {
  width: calc(100% + 20px);
  min-height: 76px;
  margin: -18px -10px 0;
  padding: 8px 0;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-banner {
  display: none;
}

.app-shell.is-sidebar-collapsed .sidebar-brand-mark {
  display: block;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink-soft);
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.12;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.auth-form label {
  position: relative;
  gap: 6px;
  color: #fff;
  font-size: 0.84rem;
}

.auth-form label > span:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-form input {
  min-height: 44px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: var(--kokoro-dark-blue);
  padding: 13px 18px;
}

.auth-form input::placeholder {
  color: rgba(33, 55, 84, 0.58);
  opacity: 1;
}

.auth-form input:focus {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.26);
}

.auth-form .button-row {
  justify-content: stretch;
}

.auth-form .primary-button {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(33, 55, 84, 0.12);
  color: #1a79d8;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
}

.auth-form .primary-button:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.auth-disclaimer {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.42;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.text-button,
.nav-button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 800;
}

.primary-button {
  background: var(--kokoro-vivid-crimson);
  color: #fff;
}

.primary-button:hover {
  background: #df5f75;
}

.secondary-button {
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
}

.secondary-button:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.text-button {
  justify-self: start;
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
}

.sidebar-control-box,
.language-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.reset-session-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  text-transform: none;
}

.reset-session-button:hover,
.reset-session-button:focus-visible {
  color: var(--kokoro-vivid-azure);
  outline: none;
}

.language-box span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.language-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  padding: 3px;
}

.auth-language .language-toggle {
  width: min(100%, 246px);
  min-width: 0;
  border-color: rgba(16, 137, 149, 0.24);
  border-radius: 999px;
  background: rgba(247, 251, 252, 0.92);
  padding: 4px;
}

.language-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.language-toggle button.is-active {
  background: #5e97ff;
  color: #fff;
}

.auth-language .language-toggle button {
  min-height: 40px;
  border-radius: 999px;
  color: var(--kokoro-muted);
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
}

.auth-language .language-toggle button.is-active {
  background: var(--kokoro-dark-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(33, 55, 84, 0.16);
}

.auth-panel-v3 .auth-language .language-toggle {
  border-color: rgba(255, 255, 255, 0.72);
  background: transparent;
  width: min(100%, 224px);
}

.auth-panel-v3 .auth-language .language-toggle button {
  min-height: 34px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-panel-v3 .auth-language .language-toggle button.is-active {
  background: #fff;
  color: var(--kokoro-vivid-azure);
  box-shadow: 0 10px 22px rgba(33, 55, 84, 0.12);
}

.language-toggle button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: -3px;
}

.sidebar-language-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(94, 151, 255, 0.1);
  color: var(--blue);
  padding: 8px 12px;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-language-button:hover,
.sidebar-language-button:focus-visible {
  background: rgba(94, 151, 255, 0.18);
  color: var(--blue);
  outline: none;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 0.83rem;
  font-weight: 700;
}

.form-error:empty {
  display: none;
}

.status-strip {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: var(--radius);
  background: #f8fbfa;
}

.status-strip span,
.metric-stack span,
.session-box span,
.topbar-status span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-strip strong {
  font-size: 1.2rem;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-stack div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(216, 224, 226, 0.9);
  padding-bottom: 12px;
}

.metric-stack strong {
  font-size: 1.15rem;
}

.app-shell {
  display: grid;
  position: relative;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 100vh;
  overflow-x: clip;
  background: #fff;
  isolation: isolate;
  transition: grid-template-columns .18s ease;
}

.app-shell.is-sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

.app-shell::before,
.app-shell::after {
  display: none;
}

.sidebar {
  display: flex;
  position: sticky;
  z-index: 1;
  align-self: start;
  top: 0;
  height: 100dvh;
  max-height: 100dvh;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-right: 1px solid rgba(33, 55, 84, 0.08);
  background: #fff;
  box-shadow: 14px 0 42px rgba(33, 55, 84, 0.14);
  padding: 22px 18px;
  backdrop-filter: none;
  transition: padding .18s ease, gap .18s ease, box-shadow .18s ease;
}

.sidebar-collapse-button {
  display: inline-grid;
  position: absolute;
  top: 116px;
  right: 10px;
  z-index: 3;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(33, 55, 84, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(33, 55, 84, 0.12);
  color: var(--kokoro-dark-blue);
  padding: 0;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-collapse-button:hover,
.sidebar-collapse-button:focus-visible {
  background: rgba(94, 151, 255, 0.16);
  color: var(--blue);
  outline: none;
}

.sidebar-collapse-icon {
  width: 10px;
  height: 10px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.app-shell.is-sidebar-collapsed .sidebar-collapse-icon {
  transform: rotate(225deg);
}

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-brand .sidebar-brand-text {
  margin: 0;
  color: #fff;
  font-size: 1.72rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-shadow: 0 10px 24px rgba(33, 55, 84, 0.22);
}

.nav-list {
  display: grid;
  gap: 2px;
}

.nav-module {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nav-module-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  min-height: 64px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: var(--kokoro-dark-blue);
  padding: 2px 8px;
  cursor: pointer;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.nav-module-toggle .nav-button-main {
  flex: 1 1 auto;
}

.nav-module-toggle:hover,
.nav-module-toggle:focus-visible {
  border-color: transparent;
  background: rgba(94, 151, 255, 0.16);
  color: var(--blue);
  outline: none;
}

.nav-module.is-current .nav-module-toggle {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

.nav-module.is-current .nav-module-toggle:hover,
.nav-module.is-current .nav-module-toggle:focus-visible {
  background: rgba(94, 151, 255, 0.16);
  color: var(--blue);
}

.nav-module[data-nav-module="loneliness"] .nav-module-toggle:hover,
.nav-module[data-nav-module="loneliness"] .nav-module-toggle:focus-visible {
  border-color: transparent;
  background: rgba(240, 115, 136, 0.16);
  color: var(--kokoro-vivid-crimson);
}

.nav-module[data-nav-module="loneliness"].is-current .nav-module-toggle {
  border-color: transparent;
  background: transparent;
  color: var(--kokoro-vivid-crimson);
}

.nav-module[data-nav-module="loneliness"].is-current .nav-module-toggle:hover,
.nav-module[data-nav-module="loneliness"].is-current .nav-module-toggle:focus-visible {
  background: rgba(240, 115, 136, 0.16);
  color: var(--kokoro-vivid-crimson);
}

.nav-module-chevron {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.nav-module-toggle[aria-expanded="true"] .nav-module-chevron {
  transform: rotate(225deg);
}

.nav-module-panel {
  display: grid;
  gap: 2px;
  padding-left: 22px;
}

.nav-module-panel[hidden] {
  display: none;
}

.nav-module-placeholder {
  margin: 4px 0 2px;
  border: 1px dashed rgba(94, 151, 255, 0.34);
  border-radius: 14px;
  background: rgba(94, 151, 255, 0.07);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--kokoro-dark-blue);
  padding: 2px 8px;
  text-align: left;
  white-space: normal;
  box-shadow: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease, color .16s ease;
}

.nav-button-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}

.nav-icon-wrap {
  display: grid;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-icon {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.nav-lens-icon {
  width: 38px;
  height: 38px;
}

.nav-research-icon {
  width: 42px;
  height: 42px;
}

.nav-button-main span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 850;
  line-height: 1.18;
}

.nav-button:hover,
.nav-button.is-active {
  background: rgba(94, 151, 255, 0.1);
  color: var(--kokoro-vivid-azure);
  box-shadow: none;
  transform: none;
}

.nav-button.is-active {
  background: rgba(94, 151, 255, 0.13);
  color: var(--kokoro-vivid-azure);
  box-shadow: none;
}

.nav-list > .nav-button:hover,
.nav-list > .nav-button:focus-visible {
  background: rgba(21, 128, 61, 0.14);
  color: var(--green);
}

.nav-list > .nav-button.is-active {
  background: transparent;
  color: var(--green);
}

.nav-list > .nav-button.is-active:hover,
.nav-list > .nav-button.is-active:focus-visible {
  background: rgba(21, 128, 61, 0.14);
  color: var(--green);
}

.nav-button:active {
  background: rgba(94, 151, 255, 0.2);
  transform: scale(0.99);
}

.nav-button:focus-visible {
  outline: none;
  background: rgba(94, 151, 255, 0.13);
  box-shadow: none;
}

.nav-button.is-active .nav-icon-wrap {
  background: transparent;
  box-shadow: none;
}

.app-shell.is-sidebar-collapsed .nav-list {
  justify-items: center;
  gap: 8px;
}

.app-shell.is-sidebar-collapsed .nav-module {
  width: 100%;
  justify-items: center;
}

.app-shell.is-sidebar-collapsed .nav-module-toggle,
.app-shell.is-sidebar-collapsed .nav-button {
  position: relative;
  justify-content: center;
  width: 64px;
  height: 64px;
  min-height: 64px;
  max-height: 64px;
  border-radius: 20px;
  padding: 0;
}

.app-shell.is-sidebar-collapsed .nav-button-main {
  justify-content: center;
  gap: 0;
}

.app-shell.is-sidebar-collapsed .nav-icon-wrap {
  width: 58px;
  height: 58px;
}

.app-shell.is-sidebar-collapsed .nav-icon {
  width: 52px;
  height: 52px;
}

.app-shell.is-sidebar-collapsed .nav-lens-icon {
  width: 36px;
  height: 36px;
}

.app-shell.is-sidebar-collapsed .nav-research-icon {
  width: 40px;
  height: 40px;
}

.app-shell.is-sidebar-collapsed .nav-module-panel {
  width: 100%;
  justify-items: center;
  gap: 8px;
  padding-left: 0;
}

.app-shell.is-sidebar-collapsed .nav-module-chevron,
.app-shell.is-sidebar-collapsed .nav-module-placeholder {
  display: none;
}

.app-shell.is-sidebar-collapsed .nav-button-main > span:not(.nav-icon-wrap) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.app-shell.is-sidebar-collapsed .nav-module-toggle[data-nav-tooltip]::before,
.app-shell.is-sidebar-collapsed .nav-button[data-nav-tooltip]::before,
.app-shell.is-sidebar-collapsed .sidebar-language-button[data-nav-tooltip]::before {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  z-index: 40;
  box-sizing: border-box;
  width: max-content;
  min-width: 92px;
  max-width: min(260px, calc(100vw - 132px));
  border: 1px solid rgba(33, 55, 84, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(33, 55, 84, 0.16);
  color: var(--kokoro-dark-blue);
  padding: 8px 10px;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(4px, -50%);
  transition: opacity .14s ease, transform .14s ease;
  white-space: normal;
  overflow-wrap: break-word;
  content: attr(data-nav-tooltip);
}

.app-shell.is-sidebar-collapsed .nav-module-toggle[data-nav-tooltip]:hover::before,
.app-shell.is-sidebar-collapsed .nav-module-toggle[data-nav-tooltip]:focus-visible::before,
.app-shell.is-sidebar-collapsed .nav-button[data-nav-tooltip]:hover::before,
.app-shell.is-sidebar-collapsed .nav-button[data-nav-tooltip]:focus-visible::before,
.app-shell.is-sidebar-collapsed .sidebar-language-button[data-nav-tooltip]:hover::before,
.app-shell.is-sidebar-collapsed .sidebar-language-button[data-nav-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translate(0, -50%);
}

.app-shell.is-sidebar-collapsed .nav-button.is-step-complete::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  font-size: 0.68rem;
}

.app-shell.is-sidebar-collapsed .sidebar-language-button {
  display: inline-flex;
  position: relative;
  align-self: center;
  width: auto;
  min-width: 72px;
  min-height: 44px;
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 0.72rem;
}

.app-shell.is-sidebar-collapsed .sidebar-control-box,
.app-shell.is-sidebar-collapsed .language-box,
.app-shell.is-sidebar-collapsed .session-area {
  display: none;
}

.nav-button:disabled,
.journey-step:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.nav-button:disabled:hover,
.journey-step:disabled:hover,
.primary-button:disabled:hover,
.secondary-button:disabled:hover {
  background: transparent;
  box-shadow: none;
}

.session-area {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.session-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.session-box strong {
  overflow-wrap: anywhere;
}

.app-version-note {
  max-width: none;
  margin: 0;
  color: var(--muted);
  padding: 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.workspace {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 28px;
  background: transparent;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.topbar-title {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.workspace-location-chip {
  display: none;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 8px;
  border: 1px solid rgba(33, 55, 84, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(33, 55, 84, 0.06);
  color: var(--kokoro-dark-blue);
  padding: 6px 12px;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.2;
}

.workspace-location-chip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.workspace-location-chip span::after {
  color: rgba(33, 55, 84, 0.28);
  content: "/";
}

.workspace-location-chip strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--kokoro-dark-blue);
}

.topbar.is-home {
  justify-content: flex-end;
  margin-bottom: 5px;
}

.topbar.is-home .topbar-title {
  display: none;
}

.topbar-status {
  display: grid;
  justify-items: end;
  gap: 10px;
  max-width: 520px;
  text-align: right;
}

.topbar-safety-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 340px;
  min-height: 0;
  border: 1px solid rgba(33, 55, 84, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(33, 55, 84, 0.06);
  padding: 8px 16px;
  overflow: visible;
  color: var(--muted);
  text-align: center;
}

.topbar-safety-card span {
  display: block;
  color: var(--muted);
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.12;
  text-transform: none;
  white-space: pre-line;
}

.workspace-guide {
  display: none;
  position: fixed;
  left: 10px;
  bottom: 14px;
  z-index: 55;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-height: 72px;
  pointer-events: auto;
}

.app-shell.is-sidebar-collapsed .workspace-guide {
  display: flex;
}

.workspace-guide:focus-visible {
  outline: 3px solid rgba(94, 151, 255, 0.24);
  outline-offset: 4px;
  border-radius: 999px;
}

.workspace-guide img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 14px 24px rgba(33, 55, 84, 0.16));
}

.workspace-guide-bubble {
  display: grid;
  position: absolute;
  bottom: 8px;
  left: 72px;
  gap: 2px;
  max-width: 260px;
  border: 1px solid rgba(184, 132, 94, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 32px rgba(33, 55, 84, 0.12);
  padding: 10px 12px;
  color: var(--kokoro-dark-blue);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity .16s ease, transform .16s ease;
}

.workspace-guide:hover .workspace-guide-bubble,
.workspace-guide:focus-visible .workspace-guide-bubble {
  opacity: 1;
  transform: translateX(0);
}

.workspace-guide-bubble span,
.workspace-guide-bubble small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: none;
}

.workspace-guide-bubble strong {
  color: var(--kokoro-dark-blue);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.18;
}

.banner-preview {
  --banner-progress: 0deg;
  --banner-gauge-color: #5e97ff;
  --banner-gauge-ring: rgba(94, 151, 255, 0.34);
  --banner-gauge-track: rgba(94, 151, 255, 0.16);
  display: block;
  position: fixed;
  top: 112px;
  right: 28px;
  z-index: 60;
  width: 116px;
  min-width: 0;
  margin-top: 0;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}

.banner-preview[hidden] {
  display: none;
}

.banner-preview::before {
  content: "";
  position: absolute;
  top: 0;
  right: 100%;
  width: 16px;
  height: 116px;
}

.banner-mascot-trigger {
  display: grid;
  position: relative;
  z-index: 2;
  place-items: center;
  width: 116px;
  height: 116px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 14px 22px rgba(33, 55, 84, 0.18));
  pointer-events: auto;
}

.banner-mascot-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.banner-mascot-trigger:focus-visible,
.banner-thought-bubble:focus-visible {
  outline: 3px solid rgba(16, 137, 149, 0.42);
  outline-offset: 2px;
}

.banner-ready-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.28);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72);
  transition: opacity 160ms ease, transform 160ms ease;
  visibility: hidden;
}

.banner-preview.has-estimate-ready .banner-ready-badge {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
}

@keyframes mascot-ready-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  18% { transform: translateX(-3px) rotate(-3deg); }
  36% { transform: translateX(3px) rotate(3deg); }
  54% { transform: translateX(-2px) rotate(-2deg); }
  72% { transform: translateX(2px) rotate(2deg); }
}

.banner-preview.has-estimate-ready .banner-mascot-trigger {
  animation: mascot-ready-shake 520ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .banner-preview.has-estimate-ready .banner-mascot-trigger {
    animation: none;
  }
}

.banner-thought-bubble {
  position: absolute;
  top: 16px;
  right: calc(100% + 14px);
  width: max-content;
  max-width: min(270px, calc(100vw - 178px));
  margin: 0;
  border: 2px solid rgba(94, 151, 255, 0.34);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(33, 55, 84, 0.12);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.38;
  opacity: 1;
  padding: 12px 16px;
  pointer-events: auto;
  text-align: left;
  text-transform: none;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: visible;
  white-space: normal;
}

.banner-preview.has-estimate-ready .banner-thought-bubble {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.banner-thought-bubble strong,
.banner-thought-bubble small {
  display: block;
  text-transform: none;
}

.banner-thought-bubble strong {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 950;
  line-height: 1.25;
}

.banner-thought-bubble .banner-inline-required {
  color: var(--red);
  display: inline;
  text-transform: none;
  font-weight: 950;
}

.banner-thought-bubble small {
  margin-top: 3px;
  color: var(--muted);
  text-transform: none;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}

.banner-preview .banner-thought-bubble .banner-thought-subtext,
.banner-preview .banner-thought-bubble .banner-thought-subtext *,
.banner-preview .banner-thought-bubble .banner-thought-subtext-part,
.banner-preview .banner-thought-bubble .banner-inline-required {
  letter-spacing: 0;
  text-transform: none !important;
}

.banner-thought-bubble::after {
  content: "";
  position: absolute;
  top: 32px;
  right: -9px;
  width: 16px;
  height: 16px;
  border-top: 2px solid rgba(94, 151, 255, 0.34);
  border-right: 2px solid rgba(94, 151, 255, 0.34);
  background: #fff;
  transform: rotate(45deg);
}

.banner-preview:not(.has-estimate-ready):hover .banner-thought-bubble,
.banner-preview:not(.has-estimate-ready):focus-within .banner-thought-bubble {
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}

.banner-preview.is-card-open .banner-thought-bubble {
  opacity: 0;
  transform: translateY(8px);
  visibility: hidden;
}

.banner-preview-card {
  position: absolute;
  top: 0;
  right: calc(100% + 14px);
  width: min(380px, calc(100vw - 178px));
  min-width: 320px;
  overflow: hidden;
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: rgba(244, 248, 255, 0.98);
  box-shadow: 0 18px 40px rgba(23, 32, 39, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
}

.banner-preview:not(.has-estimate-ready):hover .banner-preview-card,
.banner-preview:not(.has-estimate-ready):focus-within .banner-preview-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.banner-preview.is-card-open .banner-preview-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.banner-decision-main {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.banner-probability-gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--banner-gauge-color) var(--banner-progress), var(--banner-gauge-track) 0);
  box-shadow: inset 0 0 0 2px var(--banner-gauge-ring);
}

.banner-probability-gauge strong {
  color: var(--banner-gauge-color);
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.banner-preview.is-threshold-low {
  --banner-gauge-color: var(--red);
  --banner-gauge-ring: rgba(185, 28, 28, 0.3);
  --banner-gauge-track: rgba(185, 28, 28, 0.12);
}

.banner-preview.is-threshold-high {
  --banner-gauge-color: var(--green);
  --banner-gauge-ring: rgba(21, 128, 61, 0.3);
  --banner-gauge-track: rgba(21, 128, 61, 0.13);
}

.metric-value-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.banner-decision-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.banner-decision-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.banner-decision-copy p,
.banner-preview small,
.banner-path,
.banner-goal,
.banner-decision-result p,
.banner-threshold-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.banner-path,
.banner-goal {
  display: none;
  margin: 0;
  padding: 0 18px 8px;
}

.banner-path {
  color: #5e97ff;
  font-weight: 900;
}

.banner-goal {
  color: var(--ink);
  font-weight: 900;
}

.banner-decision-result {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(94, 151, 255, 0.24);
  padding: 8px 14px;
}

.banner-decision-result strong {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.banner-preview.is-positive .banner-decision-result strong {
  color: var(--green);
}

.banner-preview.is-concern .banner-decision-result strong {
  color: var(--red);
}

.banner-decision-result p {
  display: none;
}

.banner-decision-result.is-pending {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
}

.banner-decision-result.is-pending p {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
}

.banner-threshold-note {
  margin: 0;
  border-top: 1px solid rgba(94, 151, 255, 0.24);
  background: rgba(94, 151, 255, 0.1);
  padding: 8px 14px;
}

.banner-preview small {
  display: block;
  padding: 0 18px 12px;
}

.banner-preview small[hidden] {
  display: none;
}

.banner-thought-bubble small {
  padding: 0;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.home-panel {
  display: grid;
  gap: clamp(18px, 2.2vw, 30px);
  max-width: 1180px;
}

.home-review-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(94, 151, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(94, 151, 255, 0.08), rgba(255, 255, 255, 0.96) 52%, rgba(240, 115, 136, 0.05));
  box-shadow: 0 12px 28px rgba(33, 55, 84, 0.07);
  padding: clamp(24px, 2.8vw, 34px) clamp(16px, 2vw, 22px) clamp(18px, 2.2vw, 26px);
}

#homeView.is-loneliness-lens .home-review-card {
  border-color: rgba(240, 115, 136, 0.42);
  background:
    linear-gradient(135deg, rgba(240, 115, 136, 0.08), rgba(255, 255, 255, 0.96) 52%, rgba(240, 115, 136, 0.04));
}

.home-review-mascot {
  width: clamp(78px, 8vw, 106px);
  height: clamp(78px, 8vw, 106px);
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(240, 115, 136, 0.16));
}

.home-review-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.home-review-copy {
  display: grid;
  gap: 6px;
}

.home-review-copy h3,
.home-review-copy h4,
.home-review-copy p {
  margin: 0;
}

.home-review-copy h3 {
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.home-review-copy h4 {
  color: var(--text);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  font-weight: 950;
  line-height: 1.2;
}

.home-review-copy p {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.home-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-lens-toggle {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 4px;
  border: 1px solid rgba(94, 151, 255, 0.24);
  border-radius: 999px;
  background: rgba(94, 151, 255, 0.08);
  padding: 4px;
}

.home-lens-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
}

.home-lens-toggle button.is-active {
  background: #5e97ff;
  color: #fff;
}

.home-lens-toggle button:focus-visible {
  outline: 3px solid rgba(94, 151, 255, 0.24);
  outline-offset: 2px;
}

#homeView.is-loneliness-lens .home-lens-toggle {
  border-color: rgba(240, 115, 136, 0.32);
  background: rgba(240, 115, 136, 0.08);
}

#homeView.is-loneliness-lens .home-lens-toggle button.is-active {
  background: var(--kokoro-vivid-crimson);
}

#homeView.is-loneliness-lens .home-lens-toggle button:focus-visible {
  outline-color: rgba(240, 115, 136, 0.26);
}

.home-start-assessment-button {
  background: #5e97ff;
  min-height: 40px;
  border-radius: 10px;
  padding-inline: 18px;
}

.home-start-assessment-button[hidden] {
  display: none;
}

.home-start-assessment-button:hover {
  background: #4f87ee;
}

#homeView.is-loneliness-lens .home-start-assessment-button {
  background: var(--kokoro-vivid-crimson);
}

#homeView.is-loneliness-lens .home-start-assessment-button:hover {
  background: #df5f75;
}

.journey-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-block: 4px 0;
}

.journey-map[hidden] {
  display: none;
}

.journey-step {
  display: grid;
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  min-height: 118px;
  border: 2px solid rgba(94, 151, 255, 0.74);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  padding: 16px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.journey-step:hover,
.journey-step:focus-visible {
  border-color: #5e97ff;
  box-shadow: 0 14px 30px rgba(94, 151, 255, 0.14);
  outline: none;
}

.journey-step:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
}

#homeView.is-loneliness-lens .journey-step:hover,
#homeView.is-loneliness-lens .journey-step:focus-visible {
  border-color: var(--kokoro-vivid-crimson);
  box-shadow: 0 14px 30px rgba(240, 115, 136, 0.14);
}

#homeView.is-loneliness-lens .journey-step {
  border-color: rgba(240, 115, 136, 0.76);
}

#homeView.is-loneliness-lens .journey-step:focus-visible {
  box-shadow: 0 0 0 3px rgba(240, 115, 136, 0.18);
}

.nav-button.is-step-complete::after,
.primary-button.is-step-complete::after,
.secondary-button.is-step-complete::after,
.journey-step.is-step-complete::after {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  content: "✓";
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1;
}

.primary-button.is-step-complete,
.secondary-button.is-step-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.journey-step.is-step-complete::after {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.12);
}

.journey-step-primary .journey-step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(94, 151, 255, 0.12);
  color: #5e97ff;
  font-size: 0.9rem;
  font-weight: 950;
}

#homeView.is-loneliness-lens .journey-step-primary .journey-step-number {
  background: rgba(240, 115, 136, 0.12);
  color: var(--kokoro-vivid-crimson);
}

.journey-step-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.journey-step-copy strong {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.journey-step-copy em {
  color: var(--kokoro-muted);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.journey-step.is-inactive {
  opacity: 0.62;
}

.journey-step.is-unavailable {
  cursor: not-allowed;
}

.journey-step.is-unavailable:hover {
  background: #fff;
  box-shadow: none;
}

.home-start-assessment-button.is-placeholder {
  cursor: not-allowed;
  opacity: 0.58;
}

.home-start-assessment-button.is-placeholder:hover {
  transform: none;
}

.journey-connector {
  position: relative;
  align-self: center;
  height: 2px;
  min-height: 0;
  background: rgba(94, 151, 255, 0.22);
}

.journey-connector::before,
.journey-connector::after {
  display: none;
}

#homeView.is-loneliness-lens .journey-connector {
  background: rgba(240, 115, 136, 0.24);
}

.home-loneliness-handoff {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  border: 2px solid rgba(130, 125, 197, 0.62);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(130, 125, 197, 0.1), rgba(255, 255, 255, 0.98) 58%, rgba(130, 125, 197, 0.06));
  box-shadow: 0 14px 30px rgba(65, 58, 132, 0.08);
  padding: clamp(20px, 2.4vw, 30px);
}

.home-loneliness-handoff[hidden] {
  display: none;
}

.home-loneliness-mascot {
  width: clamp(70px, 7.25vw, 96px);
  height: clamp(70px, 7.25vw, 96px);
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(130, 125, 197, 0.16));
}

.home-loneliness-handoff-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.home-loneliness-handoff-copy h2,
.home-loneliness-handoff-copy h3,
.home-loneliness-handoff-copy p {
  margin: 0;
}

.home-loneliness-handoff-copy h2,
.home-loneliness-handoff-copy h3 {
  color: var(--text);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  font-weight: 950;
  line-height: 1.2;
}

.home-loneliness-handoff-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.55;
}

.home-loneliness-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--kokoro-purple-blue);
  color: #fff;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.2;
  text-decoration: none;
}

.home-loneliness-link:hover,
.home-loneliness-link:focus-visible {
  background: #706bb8;
  color: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(130, 125, 197, 0.24);
}

.home-loneliness-url {
  color: var(--kokoro-muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home-loneliness-wait-note {
  max-width: 760px;
  width: fit-content;
  color: #625c91;
  background: rgba(130, 125, 197, 0.12);
  border: 1px solid rgba(130, 125, 197, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.45;
}

.loneliness-page-panel {
  display: grid;
  gap: 18px;
  max-width: 1180px;
}

.loneliness-page-handoff {
  min-height: 220px;
}

.home-sidequest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 720px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
}

.home-sidequest[hidden] {
  display: none;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  color: #5e97ff;
  padding: 2px 0;
  font-size: inherit;
  font-weight: 950;
  line-height: inherit;
}

.home-text-link:hover,
.home-text-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.home-text-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
  border-radius: 6px;
}

.home-text-link.is-placeholder {
  cursor: not-allowed;
  opacity: 0.58;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.about-research-page {
  display: grid;
  gap: clamp(22px, 2.6vw, 36px);
  max-width: 1180px;
  color: var(--kokoro-text);
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  border: 1px solid rgba(94, 151, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(94, 151, 255, 0.09), rgba(255, 255, 255, 0.98) 56%, rgba(130, 125, 197, 0.08));
  box-shadow: 0 18px 38px rgba(33, 55, 84, 0.07);
  padding: clamp(24px, 3.4vw, 42px);
}

.about-hero-copy,
.about-section,
.about-section-heading {
  display: grid;
}

.about-hero-copy {
  gap: 10px;
}

.about-hero h2,
.about-section-heading h3,
.about-card h4,
.about-flow-step h4,
.about-safety-card h3,
.about-ack-card h4 {
  margin: 0;
  color: var(--text);
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.16;
}

.about-hero h2 {
  font-size: clamp(1.85rem, 3.4vw, 3.2rem);
}

.about-hero p,
.about-section-heading p,
.about-card p,
.about-flow-step p,
.about-safety-card p,
.about-ack-card li {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
}

.about-hero .eyebrow,
.about-section-heading .eyebrow,
.about-safety-card .eyebrow {
  color: var(--kokoro-vivid-azure);
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-hero-subtitle {
  max-width: 760px;
  color: var(--kokoro-dark-blue) !important;
  font-size: clamp(1rem, 1.6vw, 1.25rem) !important;
  font-weight: 800 !important;
}

.about-hero-visual {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 150px;
}

.about-hero-visual img {
  display: block;
  width: clamp(86px, 10vw, 132px);
  height: clamp(86px, 10vw, 132px);
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(240, 115, 136, 0.18));
}

.about-section {
  gap: 16px;
}

.about-section-heading {
  gap: 6px;
  max-width: 880px;
}

.about-section-heading h3,
.about-safety-card h3 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.about-card-grid,
.about-stat-grid,
.about-ack-grid,
.about-team-grid,
.about-pill-grid,
.about-flow {
  display: grid;
  gap: 14px;
}

.about-card-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-card-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.about-card,
.about-flow-step,
.about-stat-card,
.about-ack-card,
.about-team-grid div {
  border: 1px solid rgba(94, 151, 255, 0.15);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(33, 55, 84, 0.06);
}

.about-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.about-card h4,
.about-flow-step h4,
.about-ack-card h4 {
  font-size: 1.02rem;
}

.about-card-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(94, 151, 255, 0.12);
  color: #5e97ff;
  font-size: 0.78rem;
  font-weight: 950;
}

.about-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-flow-step {
  display: grid;
  position: relative;
  gap: 9px;
  padding: 18px;
}

.about-flow-step > span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 137, 149, 0.1);
  color: var(--kokoro-vivid-azure);
  font-size: 0.78rem;
  font-weight: 950;
}

.about-methodology-section {
  border: 1px solid rgba(16, 137, 149, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(16, 137, 149, 0.07), rgba(255, 255, 255, 0.98) 46%, rgba(33, 55, 84, 0.04));
  padding: clamp(18px, 2.4vw, 28px);
}

.about-methodology-graphic {
  display: grid;
  gap: 16px;
}

.about-methodology-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.about-methodology-stages span {
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 10px 22px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%, 20px 50%);
  color: #fff;
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
}

.about-methodology-stages span:first-child {
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 50%, calc(100% - 26px) 100%, 0 100%);
}

.about-methodology-stages span:nth-child(1) {
  background: #0b9a91;
}

.about-methodology-stages span:nth-child(2) {
  background: #087f88;
}

.about-methodology-stages span:nth-child(3) {
  background: #256b78;
}

.about-methodology-stages span:nth-child(4) {
  background: #2f4654;
}

.about-methodology-panels {
  display: grid;
  grid-template-columns: 0.95fr 1.18fr 1.18fr 0.95fr;
  gap: 12px;
  align-items: stretch;
}

.about-methodology-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 188px;
  border: 1px solid rgba(94, 151, 255, 0.14);
  border-radius: 16px;
  background: rgba(246, 248, 251, 0.92);
  padding: 16px;
}

.about-methodology-panel h4,
.about-methodology-panel p,
.about-methodology-panel ul {
  margin: 0;
}

.about-methodology-panel h4 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.22;
}

.about-methodology-panel p,
.about-methodology-panel li {
  color: var(--kokoro-muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.about-methodology-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  color: var(--kokoro-vivid-azure);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(33, 55, 84, 0.08);
}

.about-methodology-panel-data .about-methodology-icon {
  color: #5e97ff;
}

.about-methodology-panel-explain .about-methodology-icon {
  color: #bc4bb2;
}

.about-methodology-panel-interpret .about-methodology-icon {
  color: #f47c3c;
}

.about-methodology-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-methodology-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 10px;
  color: #fff;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.15;
}

.about-methodology-tags span:nth-child(1) {
  background: #7cc4be;
}

.about-methodology-tags span:nth-child(2) {
  background: #8a9aa4;
}

.about-methodology-tags span:nth-child(3) {
  background: #f4a57e;
}

.about-methodology-tags span:nth-child(4) {
  background: #e6abe1;
}

.about-methodology-tags span:nth-child(5) {
  background: #a77bc4;
}

.about-methodology-tags span:nth-child(6) {
  background: #dc746e;
}

.about-methodology-lens {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--kokoro-dark-blue) !important;
  padding: 5px 9px;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  line-height: 1.1 !important;
}

.about-methodology-panel-predict p:not(.about-methodology-lens) {
  color: var(--text);
  font-weight: 850;
}

.about-methodology-panel-explain ul {
  display: grid;
  gap: 7px;
  padding-left: 18px;
}

.about-methodology-panel-explain li::marker {
  color: var(--kokoro-vivid-azure);
}

.about-methodology-panel-interpret {
  border-color: rgba(244, 124, 60, 0.16);
  background: rgba(248, 248, 249, 0.95);
}

.about-methodology-panel-interpret h4 {
  color: #f47c3c;
}

.about-methodology-panel-interpret p {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
}

.about-model-section {
  border: 1px solid rgba(130, 125, 197, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(130, 125, 197, 0.08), rgba(255, 255, 255, 0.98));
  padding: clamp(18px, 2.4vw, 28px);
}

.about-pill-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.about-pill-grid span {
  display: grid;
  min-height: 48px;
  place-items: center;
  border: 1px solid rgba(94, 151, 255, 0.16);
  border-radius: 14px;
  background: #fff;
  color: var(--kokoro-dark-blue);
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.about-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-stat-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.about-stat-card strong {
  color: var(--kokoro-vivid-azure);
  font-family: Poppins, "DM Sans", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  font-weight: 950;
  line-height: 1;
}

.about-stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.3;
}

.about-small-note {
  margin: -2px 0 0;
  border-radius: 12px;
  background: rgba(94, 151, 255, 0.08);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.45;
}

.about-feature-card {
  min-height: 132px;
  border-color: rgba(16, 137, 149, 0.18);
}

.about-safety-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(21, 128, 61, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(21, 128, 61, 0.09), rgba(255, 255, 255, 0.96));
  box-shadow: 0 14px 30px rgba(21, 128, 61, 0.06);
  padding: clamp(18px, 2.4vw, 28px);
}

.about-safety-card .eyebrow,
.about-safety-card h3 {
  color: var(--green);
}

.about-ack-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-ack-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
}

.about-ack-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.about-ack-card li::marker {
  color: var(--kokoro-vivid-azure);
}

.about-team-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.about-team-grid div {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.about-team-grid strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.2;
}

.about-team-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.query-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 16px;
}

.panel,
.empty-state,
.action-bar {
  padding: 18px;
}

.panel-wide,
.action-bar {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading.compact {
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}

.form-grid.four-col {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.assessment-subsection {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fbfcfc;
  padding: 14px;
}

.assessment-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.assessment-subsection-heading h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.assessment-subsection .assessment-meta-grid,
.assessment-subsection .phq-timeline {
  margin-bottom: 0;
}

.phq-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 18px;
  align-items: stretch;
}

.patient-meta-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.profile-field-main {
  grid-column: span 2;
}

.profile-field-compact {
  grid-column: span 1;
  width: 100%;
}

.profile-field-age {
  grid-column: 3 / span 1;
  max-width: 140px;
}

.profile-field-sex {
  grid-column: 3 / span 1;
  grid-row: 2;
  max-width: 220px;
}

.assessment-notes-field {
  grid-column: span 2;
}

.patient-meta-grid .assessment-notes-field {
  grid-column: 1 / span 2;
  grid-row: 2;
}

.required-label::after {
  color: var(--red);
  content: " *";
  font-weight: 950;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.segmented label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  min-width: 92px;
  padding: 9px 12px;
  text-align: center;
}

.segmented input:checked + span {
  background: var(--ink-soft);
  color: #fff;
}

.slider-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 10px;
}

.slider-field {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px 14px;
  overflow: visible;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field[data-tooltip]::before {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  width: min(520px, 100%);
  max-width: calc(100vw - 48px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.5;
  opacity: 0;
  padding: 11px 13px;
  pointer-events: none;
  text-align: left;
  transform: translateY(5px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.slider-field-tooltip {
  position: fixed;
  z-index: 9999;
  width: max-content;
  max-width: min(420px, calc(100vw - 24px));
  border: 1px solid rgba(219, 168, 42, 0.62);
  border-radius: 10px;
  background: #fff8d7;
  box-shadow: 0 14px 34px rgba(31, 42, 51, 0.18);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.55;
  padding: 11px 13px;
  pointer-events: none;
  white-space: normal;
}

.slider-field-tooltip[hidden] {
  display: none;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field[data-tooltip]:hover,
#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field[data-tooltip]:focus-within {
  z-index: 20;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field[data-tooltip]:hover::before,
#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field[data-tooltip]:focus-within::before {
  opacity: 1;
  transform: translateY(0);
}

.slider-label-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.slider-label-text {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 900;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
}

.slider-help-button {
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 2px solid rgba(94, 151, 255, 0.5);
  border-radius: 999px;
  background: #fff;
  color: #5e97ff;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  user-select: none;
}

.slider-help-button:hover,
.slider-help-button:focus-visible {
  border-color: #5e97ff;
  background: #fff8d7;
  box-shadow: 0 0 0 4px rgba(255, 248, 215, 0.8);
  outline: none;
}

.info-dot {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  overflow: visible;
  outline: none;
}

.info-dot::after {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 0;
  z-index: 20;
  width: min(330px, 72vw);
  max-width: 330px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--ink-soft);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  text-align: left;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.calculation-tooltip::after {
  left: auto;
  right: 0;
  width: min(460px, 82vw);
  max-width: 460px;
  white-space: pre-line;
}

.info-dot:hover,
.info-dot:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.info-dot:hover::after,
.info-dot:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.slider-field output {
  justify-self: start;
  min-height: 1.1em;
  min-width: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0;
  text-align: left;
  white-space: normal;
}

.slider-field.is-unset input[type="range"] {
  opacity: 0.58;
}

.slider-field input {
  width: 100%;
  min-height: 28px;
  margin-top: 4px;
  padding: 0;
  accent-color: var(--primary);
}

.slider-ticks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}

.slider-ticks span {
  overflow-wrap: anywhere;
}

.slider-ticks span:nth-child(2) {
  text-align: center;
}

.slider-ticks span:nth-child(3) {
  text-align: right;
}

.scale-legend {
  padding-block: 12px;
}

.scale-legend summary {
  color: var(--primary-dark);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.scale-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.scale-legend-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.scale-legend-grid strong {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.76rem;
}

.scale-legend-grid em {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.treatment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.future-comparison-panel {
  display: grid;
  gap: 14px;
}

.treatment-workspace-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.future-comparison-panel > .panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.future-comparison-panel > .panel-heading h3 {
  overflow-wrap: anywhere;
}

.future-comparison-panel .screen-note {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.future-comparison-header,
.future-comparison-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) minmax(112px, 0.8fr) minmax(150px, 1fr) minmax(72px, 0.35fr);
  gap: 12px;
  align-items: center;
}

.future-comparison-header {
  padding: 0 14px;
}

.future-comparison-header span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.future-comparison-header span:first-child {
  grid-column: 2;
}

.future-comparison-list {
  display: grid;
  gap: 18px;
}

.future-comparison-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.future-feature-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.future-feature-name > span:first-child {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.future-comparison-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.future-column-label {
  display: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.future-comparison-cell strong,
.future-comparison-cell output {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.future-slider-cell input {
  width: 100%;
  min-height: 24px;
  padding: 0;
  accent-color: var(--primary);
}

.delta-cell strong {
  justify-self: start;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 5px 10px;
  font-size: 0.95rem;
}

.delta-cell small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.treatment-workspace-panel {
  align-content: start;
}

.treatment-scenario-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 16px;
}

.treatment-scenario-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.treatment-scenario-heading h4 {
  margin: 0;
  color: #0d3b34;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.25;
}

.treatment-scenario-heading span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.2;
  text-transform: uppercase;
}

.treatment-scenario-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.treatment-scenario-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.treatment-scenario-grid span,
.treatment-metric span,
.treatment-review-direction span,
.treatment-interactions > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.metric-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.metric-help {
  position: relative;
  display: inline-grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: none;
}

.metric-help::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  display: none;
  width: max-content;
  max-width: min(260px, calc(100vw - 48px));
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  content: attr(data-tooltip);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  padding: 7px 9px;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  z-index: 30;
}

.metric-help:hover::after,
.metric-help:focus::after {
  display: block;
}

.treatment-scenario-grid strong {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.scenario-microcopy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
}

.treatment-model-context {
  border-left: 4px solid rgba(15, 118, 110, 0.3);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px 12px;
}

.treatment-feature-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: visible;
  padding: 12px;
}

.treatment-feature-section-priority {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(185, 28, 28, 0.025);
}

.treatment-feature-section-strengths {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.035);
}

.treatment-feature-section-other {
  border-color: rgba(104, 116, 128, 0.22);
  background: rgba(238, 243, 241, 0.44);
}

.treatment-section-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  overflow: visible;
}

.treatment-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: 0 1px 0 rgba(23, 32, 39, 0.05);
  padding: 12px 14px;
  text-align: left;
}

.treatment-feature-section-priority .treatment-section-toggle {
  border-left-color: var(--red);
}

.treatment-feature-section-strengths .treatment-section-toggle {
  border-left-color: var(--primary);
}

.treatment-feature-section-other .treatment-section-toggle {
  border-left-color: var(--muted);
}

.treatment-section-heading {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.treatment-section-heading strong {
  color: var(--ink-soft);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.treatment-section-heading small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.treatment-section-toggle b {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.accordion-note-wrap {
  position: relative;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.accordion-note-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #ffd84d;
  box-shadow: 0 8px 18px rgba(133, 103, 10, 0.18);
  color: #17324d;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.accordion-note-button:hover,
.accordion-note-button:focus-visible {
  background: #ffe171;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.28), 0 8px 18px rgba(133, 103, 10, 0.18);
  outline: 0;
}

.accordion-note-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  display: grid;
  width: min(370px, calc(100vw - 40px));
  gap: 10px;
  border: 1px solid rgba(191, 149, 16, 0.3);
  border-radius: 14px;
  background: #fff8d8;
  box-shadow: 0 18px 36px rgba(23, 32, 39, 0.16);
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.5;
  opacity: 0;
  padding: 14px 15px;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  visibility: hidden;
}

.accordion-note-popover::before {
  position: absolute;
  top: -7px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(191, 149, 16, 0.3);
  border-left: 1px solid rgba(191, 149, 16, 0.3);
  background: #fff8d8;
  content: "";
  transform: rotate(45deg);
}

.accordion-note-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.accordion-note-footer {
  display: block;
  border-top: 1px solid rgba(191, 149, 16, 0.28);
  color: #6d6240;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.45;
  padding-top: 9px;
}

.treatment-section-toggle:hover,
.treatment-section-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12), 0 1px 0 rgba(23, 32, 39, 0.05);
}

.treatment-feature-section.is-open .treatment-section-toggle {
  background: #fbfdfc;
}

.treatment-feature-card-list {
  display: grid;
  gap: 0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.treatment-section-empty {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--muted);
  padding: 12px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.treatment-feature-card-list[hidden],
.treatment-feature-section:not(.is-open) .treatment-feature-card-list {
  display: none;
}

.treatment-feature-card {
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) minmax(330px, max-content);
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px;
}

.treatment-feature-card + .treatment-feature-card {
  border-top: 1px solid rgba(94, 151, 255, 0.14);
}

.treatment-feature-card.is-caution-related {
  background: rgba(255, 250, 242, 0.72);
}

.treatment-card-target,
.treatment-card-actions {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.treatment-card-main {
  display: contents;
}

.treatment-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  grid-column: 1;
  grid-row: 1;
  gap: 10px;
  min-width: 0;
}

.treatment-card-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.treatment-card-title > span:first-child {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.treatment-card-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.treatment-card-metrics {
  display: grid;
  grid-column: 1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.treatment-card-target {
  grid-column: 2;
  grid-row: 2;
}

.treatment-card-actions {
  grid-column: 3;
  grid-row: 2;
  grid-template-columns: minmax(74px, max-content) minmax(180px, max-content);
  column-gap: 16px;
  justify-content: end;
}

.treatment-card-actions .contribution-pill {
  max-width: none;
}

.treatment-feature-card > .triggered-condition {
  grid-column: 1 / -1;
}

.treatment-current-status {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
}

.treatment-current-status span {
  color: var(--muted);
  font-weight: 900;
}

.treatment-current-status strong {
  color: var(--text);
  font-weight: 950;
}

.treatment-metric,
.treatment-review-direction,
.treatment-interactions {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.treatment-card-metrics .treatment-metric {
  grid-template-rows: minmax(32px, auto) 34px;
}

.treatment-card-metrics .treatment-metric > span,
.treatment-card-metrics .treatment-metric > .metric-label-with-help {
  align-self: end;
}

.treatment-card-metrics .treatment-metric > strong {
  align-self: center;
}

.treatment-card-metrics .treatment-metric > strong:not(.contribution-pill):not(.delta-pill) {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.treatment-metric strong,
.treatment-review-direction strong,
.treatment-target-slider output {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.treatment-metric small,
.treatment-muted,
.triggered-condition,
.treatment-interaction-item span,
.treatment-interaction-item small {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.contribution-pill,
.delta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  justify-self: start;
  min-height: 32px;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 6px 11px;
  line-height: 1;
  text-align: center;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.treatment-metric strong.contribution-pill,
.treatment-metric strong.delta-pill {
  align-self: center;
  line-height: 1;
  overflow-wrap: normal;
  word-break: keep-all;
}

.contribution-pill.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.contribution-pill.is-positive {
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
}

.contribution-pill.is-unavailable {
  color: var(--muted);
}

.delta-pill.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.delta-pill.is-positive {
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
}

.treatment-interaction-list {
  display: grid;
  gap: 6px;
}

.treatment-feature-card > .treatment-interactions {
  grid-column: 1 / -1;
}

.treatment-interaction-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 14px;
}

.treatment-interaction-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.treatment-interaction-item strong {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.treatment-interaction-item b {
  flex: 0 0 auto;
  font-size: 0.72rem;
  line-height: 1.2;
}

.treatment-target-slider {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.treatment-target-slider input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 24px;
  padding: 0;
  accent-color: var(--primary);
}

.treatment-veto-badge {
  position: relative;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: var(--amber);
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.treatment-veto-badge > template {
  display: none;
}

.triggered-condition {
  border-left: 3px solid rgba(180, 83, 9, 0.35);
  padding-left: 8px;
}

.triggered-condition strong {
  color: var(--ink-soft);
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.treatment-link-card {
  min-height: 92px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
  padding: 18px 32px;
}

.treatment-link-card .screen-note {
  max-width: 620px;
  margin: 4px 0 0;
}

.treatment-link-card .button-row {
  margin-left: auto;
  justify-content: flex-end;
}

.treatment-summary-pane {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.decision-output-card {
  --decision-progress: 0deg;
  --decision-gauge-color: var(--primary);
  --decision-gauge-ring: rgba(15, 118, 110, 0.28);
  --decision-gauge-track: rgba(15, 118, 110, 0.14);
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.25);
  border-radius: 8px;
  background: #fbfdfc;
}

.decision-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.decision-output-header h4 {
  margin: 0;
  color: #0d3b34;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.2;
}

.decision-output-header span {
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

.decision-output-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 16px;
}

.decision-scenario-metrics {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
}

.decision-scenario-metrics div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.decision-scenario-metrics span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.decision-scenario-metrics strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  text-align: right;
}

.decision-scenario-metrics div:last-child strong {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 6px 9px;
}

.decision-scenario-metrics div:last-child strong.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.decision-scenario-metrics div:last-child strong.is-positive {
  background: rgba(21, 128, 61, 0.1);
  color: var(--green);
}

.decision-probability-gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--decision-gauge-color) var(--decision-progress), var(--decision-gauge-track) 0);
  box-shadow: inset 0 0 0 1px var(--decision-gauge-ring);
}

.decision-probability-gauge span {
  position: relative;
  z-index: 1;
  color: var(--decision-gauge-color);
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.decision-output-card.is-threshold-low {
  --decision-gauge-color: var(--red);
  --decision-gauge-ring: rgba(185, 28, 28, 0.3);
  --decision-gauge-track: rgba(185, 28, 28, 0.12);
}

.decision-output-card.is-threshold-high {
  --decision-gauge-color: var(--green);
  --decision-gauge-ring: rgba(21, 128, 61, 0.3);
  --decision-gauge-track: rgba(21, 128, 61, 0.13);
}

.decision-probability-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.decision-probability-copy h5,
.decision-output-result h5 {
  margin: 0;
  color: #0d3b34;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.decision-probability-copy p,
.decision-output-result p,
.decision-threshold-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.decision-output-result {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.decision-output-card.is-positive .decision-output-result h5 {
  color: var(--green);
}

.decision-output-card.is-concern .decision-output-result h5 {
  color: var(--red);
}

.decision-threshold-note {
  background: rgba(238, 243, 241, 0.62);
  padding: 12px 16px;
}

.decision-output-card > .screen-note,
.decision-output-card > .form-error {
  margin: 0;
  padding: 0 16px 12px;
}

.summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.summary-list div {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.summary-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.summary-list dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-list dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.treatment-summary-pane .screen-note {
  margin: 0;
}

.treatment-report-button {
  margin: 0;
}

.treatment-reset-button {
  margin: 0;
}

.treatment-report-action-card {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0;
}

.treatment-report-action-card .button-row {
  margin-left: auto;
  justify-content: flex-end;
}

.treatment-report-action-card .primary-button {
  width: auto;
}

.treatment-report-action-card .secondary-button {
  width: auto;
}

.session-report-panel {
  display: grid;
  gap: 16px;
}

.report-safety-note {
  display: grid;
  gap: 6px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.report-safety-note strong {
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.report-safety-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.report-accordion-list {
  display: grid;
  gap: 10px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.report-probability-card,
.report-phq-history-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 8px;
  background: #fbfcfc;
}

.report-probability-card {
  --report-progress: 0deg;
  display: grid;
}

.report-probability-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid rgba(15, 118, 110, 0.22);
}

.report-probability-metric {
  --report-gauge-color: #5e97ff;
  --report-gauge-ring: rgba(94, 151, 255, 0.34);
  --report-gauge-track: rgba(94, 151, 255, 0.16);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 24px 28px;
}

.report-probability-metric.is-threshold-low {
  --report-gauge-color: var(--red);
  --report-gauge-ring: rgba(185, 28, 28, 0.3);
  --report-gauge-track: rgba(185, 28, 28, 0.12);
}

.report-probability-metric.is-threshold-high {
  --report-gauge-color: var(--green);
  --report-gauge-ring: rgba(21, 128, 61, 0.3);
  --report-gauge-track: rgba(21, 128, 61, 0.13);
}

.report-probability-metric + .report-probability-metric {
  border-left: 1px solid rgba(15, 118, 110, 0.18);
}

.report-probability-main {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid rgba(15, 118, 110, 0.22);
  padding: 28px;
}

.report-probability-gauge {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 50%, transparent 51%),
    conic-gradient(var(--primary) 0 var(--report-progress), rgba(15, 118, 110, 0.14) var(--report-progress) 360deg);
  box-shadow: inset 0 0 0 16px rgba(15, 118, 110, 0.08);
}

.report-probability-gauge span {
  color: var(--primary-dark);
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.report-probability-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.report-probability-copy h4,
.report-probability-result h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 950;
  line-height: 1.18;
}

.report-probability-copy p,
.report-probability-result p,
.report-threshold-note {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.55;
}

.report-scenario-change {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.report-scenario-change.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.report-scenario-change.is-positive {
  background: rgba(15, 118, 110, 0.1);
  color: var(--primary-dark);
}

.report-probability-result {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid rgba(15, 118, 110, 0.22);
  padding: 24px 28px;
}

.report-probability-card.is-positive .report-probability-result h4 {
  color: var(--green);
}

.report-probability-card.is-concern .report-probability-result h4 {
  color: var(--red);
}

.report-threshold-note {
  background: rgba(15, 118, 110, 0.04);
  padding: 20px 28px;
}

.report-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 92px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  padding: 18px 32px;
}

.report-bottom-actions .secondary-button {
  width: auto;
}

.report-phq-history-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.report-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.report-card-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.25;
}

.report-info-dot {
  flex: 0 0 auto;
}

.report-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.report-accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 14px 16px;
  text-align: left;
}

.report-accordion-button span {
  min-width: 0;
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.report-accordion-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.report-veto-indicator {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.report-veto-indicator[hidden] {
  display: none;
}

.report-accordion-button::after {
  flex: 0 0 auto;
  color: var(--primary-dark);
  content: "+";
  font-size: 1.15rem;
  font-weight: 950;
}

.report-accordion-button.is-open::after {
  content: "-";
}

.report-accordion-body {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.report-accordion-body[hidden] {
  display: none;
}

.report-phq-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.report-phq-flow article,
.report-delta-row,
.report-gate-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.report-phq-flow article,
.report-phq-flow article {
  display: grid;
  gap: 4px;
}

.report-phq-flow .report-phq-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #5e97ff;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1;
}

.report-phq-flow span:not(.report-phq-arrow),
.report-delta-row span,
.report-definition-list dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.report-phq-flow strong,
.report-definition-list dd {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.report-definition-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.report-definition-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-definition-list dd {
  margin: 0;
}

.report-gate-card {
  display: grid;
  gap: 12px;
}

.report-global-veto-note {
  margin: 0;
  border-left: 4px solid rgba(185, 28, 28, 0.28);
  border-radius: 8px;
  background: rgba(185, 28, 28, 0.06);
  color: var(--ink-soft);
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.45;
}

.report-gate-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.report-gate-heading > strong,
.report-check-list > strong,
.report-interpretation > strong,
.report-delta-row > strong {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.report-check-list {
  display: grid;
  gap: 6px;
}

.report-check-list ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.report-check-list li,
.report-interpretation p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.report-interpretation {
  display: grid;
  gap: 6px;
}

.report-interpretation p {
  margin: 0;
}

.report-veto-family-note {
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.06);
  padding: 9px 10px;
}

.report-delta-list {
  display: grid;
  gap: 8px;
}

.report-marked-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.report-marked-list h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 950;
}

.report-marked-list div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.report-marked-list span {
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  padding: 5px 8px;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.2;
}

.report-delta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.15fr) max-content max-content;
  gap: 8px;
  align-items: center;
}

.report-delta-row b {
  justify-self: start;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 4px 8px;
  font-size: 0.76rem;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-contributors {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.summary-contributors h4,
.summary-contributor-group h5 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.summary-contributor-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.summary-contributor-group h5 {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-contributor-list {
  display: grid;
  gap: 6px;
}

.summary-contributor-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 8px;
}

.summary-contributor-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.summary-contributor-row strong,
.summary-contributor-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-contributor-row strong {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.3;
}

.summary-contributor-row span,
.summary-empty-row {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.summary-contributor-row b {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--primary-dark);
  padding: 3px 7px;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-contributor-row.is-negative b {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

.summary-empty-row {
  margin: 0;
}

.summary-caution-checks {
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.summary-caution-checks h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.summary-caution-list {
  display: grid;
  gap: 8px;
}

.summary-caution-row {
  display: grid;
  position: relative;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 9px;
}

.summary-caution-row > template {
  display: none;
}

.summary-caution-row:hover,
.summary-caution-row:focus {
  border-color: rgba(15, 118, 110, 0.36);
  outline: 0;
}

.summary-caution-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.summary-caution-main strong {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.summary-status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef4f3;
  color: var(--muted);
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.summary-caution-row.is-triggered {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fffaf2;
}

.summary-caution-row.is-triggered .summary-status-pill {
  background: rgba(240, 115, 136, 0.18);
  color: #c9233f;
  box-shadow: 0 0 0 1px rgba(240, 115, 136, 0.2);
}

.report-gate-card .summary-status-pill {
  background: rgba(240, 115, 136, 0.18);
  color: #c9233f;
  box-shadow: 0 0 0 1px rgba(240, 115, 136, 0.2);
}

.summary-caution-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.summary-caution-row p span {
  color: var(--ink-soft);
  font-weight: 900;
}

.clinical-gate-popover {
  position: fixed;
  width: min(520px, calc(100vw - 32px));
  max-height: min(390px, calc(100vh - 32px));
  overflow-y: auto;
  border: 1px solid rgba(94, 151, 255, 0.36);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.22);
  color: var(--text);
  padding: 16px;
  pointer-events: none;
  z-index: 5000;
}

.clinical-gate-popover[hidden] {
  display: none;
}

.gate-popover-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.gate-popover-meta {
  display: grid;
  gap: 7px;
  margin: 0;
}

.gate-popover-meta div {
  display: grid;
  grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.gate-popover-meta dt,
.gate-popover-section strong {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1.35;
}

.gate-popover-meta dd {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 900;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gate-popover-section {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.gate-popover-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.1rem;
}

.gate-popover-section li,
.gate-popover-section p {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.future-comparison-panel > .full-calculation-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.full-calculation-panel {
  display: grid;
  gap: 14px;
}

.full-calculation-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.full-calculation-heading > div {
  min-width: 0;
}

.full-calculation-heading .screen-note {
  margin-bottom: 0;
}

.full-calculation-content {
  display: grid;
  gap: 12px;
}

.full-calculation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.full-calculation-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.full-calculation-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow-x: auto;
}

.full-calculation-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.55fr) minmax(280px, 1.65fr) minmax(280px, 1.35fr) minmax(190px, 0.95fr);
  min-width: 840px;
  border-bottom: 1px solid var(--line);
}

.full-calculation-row:last-child {
  border-bottom: 0;
}

.full-calculation-row > span,
.full-calculation-row > strong {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.full-calculation-row > span:last-child,
.full-calculation-row > strong:last-child {
  border-right: 0;
}

.full-calculation-row > strong {
  font-weight: 900;
}

.full-calculation-header > span {
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.full-calculation-row.is-baseline {
  background: rgba(15, 118, 110, 0.06);
}

.full-calculation-total-row {
  background: rgba(94, 151, 255, 0.12);
}

.full-calculation-total-row > span,
.full-calculation-total-row > strong {
  font-weight: 950;
}

.full-calculation-total-probability {
  color: var(--blue);
}

.full-calculation-addition {
  font-weight: 900;
}

.full-calculation-addition.is-negative {
  color: var(--red);
}

.full-calculation-addition.is-positive {
  color: var(--green);
}

#treatmentView .panel,
#treatmentView .treatment-workspace-panel,
#treatmentView .treatment-summary-pane,
#reportView .panel,
#reportView .session-report-panel {
  border: 2px solid #5e97ff;
  border-radius: 20px;
}

#treatmentView .future-comparison-row,
#treatmentView .treatment-scenario-card,
#treatmentView .treatment-scenario-grid div,
#treatmentView .treatment-feature-section,
#treatmentView .treatment-section-toggle,
#treatmentView .treatment-section-empty,
#treatmentView .treatment-feature-card,
#treatmentView .treatment-interaction-item,
#treatmentView .decision-output-card,
#treatmentView .summary-caution-row,
#reportView .report-safety-note,
#reportView .report-probability-card,
#reportView .report-phq-history-card,
#reportView .report-accordion,
#reportView .report-phq-flow article,
#reportView .report-delta-row,
#reportView .report-gate-card,
#reportView .report-marked-list span,
#reportView .full-calculation-meta span,
#reportView .full-calculation-table {
  border: 2px solid #5e97ff;
  border-radius: 20px;
}

#treatmentView .future-comparison-row,
#treatmentView .treatment-scenario-card,
#treatmentView .treatment-feature-card,
#reportView .report-probability-card,
#reportView .report-phq-history-card,
#reportView .report-accordion,
#reportView .full-calculation-table {
  background: #fff;
}

#treatmentView .decision-output-card {
  border: 0;
  background: #fff;
}

#treatmentView .treatment-feature-section,
#treatmentView .treatment-scenario-grid div,
#treatmentView .treatment-section-toggle,
#treatmentView .summary-caution-row,
#reportView .report-safety-note,
#reportView .report-phq-flow article,
#reportView .report-delta-row,
#reportView .report-gate-card {
  background: rgba(94, 151, 255, 0.08);
}

#treatmentView .treatment-feature-section-priority,
#treatmentView .treatment-feature-section-strengths,
#treatmentView .treatment-feature-section-other,
#treatmentView .treatment-feature-card.is-caution-related {
  border-color: #5e97ff;
  background: rgba(94, 151, 255, 0.06);
}

#treatmentView .treatment-model-context,
#reportView .report-threshold-note,
#reportView .report-veto-family-note,
#reportView .full-calculation-row.is-baseline,
#reportView .report-global-veto-note {
  background: rgba(94, 151, 255, 0.08);
}

#treatmentView .treatment-model-context,
#reportView .report-global-veto-note {
  border-left-color: #5e97ff;
  border-radius: 20px;
}

#reportView .full-calculation-content {
  gap: 10px;
}

#reportView .full-calculation-heading {
  display: none;
}

#reportView .full-calculation-meta {
  gap: 8px;
}

#reportView .full-calculation-meta span {
  border: 0;
  border-radius: 999px;
  background: rgba(94, 151, 255, 0.28);
  color: var(--ink);
  padding: 6px 12px;
}

#reportView .full-calculation-table {
  border: 0;
  border-radius: 0;
  background: transparent;
}

#reportView .full-calculation-row {
  border-bottom: 1px solid rgba(94, 151, 255, 0.24);
}

#reportView .full-calculation-row > span,
#reportView .full-calculation-row > strong {
  border-right: 1px solid rgba(94, 151, 255, 0.18);
  padding: 9px 10px;
}

#reportView .full-calculation-row > span:last-child,
#reportView .full-calculation-row > strong:last-child {
  border-right: 0;
}

#reportView .full-calculation-header > span {
  background: rgba(94, 151, 255, 0.28);
  color: var(--ink);
  font-weight: 950;
}

#reportView .full-calculation-header > span:first-child {
  border-top-left-radius: 14px;
}

#reportView .full-calculation-header > span:last-child {
  border-top-right-radius: 14px;
}

#reportView .full-calculation-row:not(.full-calculation-header) {
  background: #fff;
}

#reportView .full-calculation-row.is-baseline {
  background: rgba(94, 151, 255, 0.08);
}

#reportView .full-calculation-row.full-calculation-total-row {
  background: rgba(94, 151, 255, 0.14);
}

#treatmentView .treatment-section-toggle {
  border-left-color: #5e97ff;
}

#treatmentView .treatment-section-toggle b,
#treatmentView .delta-cell strong,
#reportView .report-delta-row b,
#reportView .report-marked-list span {
  background: rgba(94, 151, 255, 0.14);
  color: #5e97ff;
  border-radius: 20px;
}

#treatmentView .treatment-feature-section-priority {
  border-color: rgba(240, 115, 136, 0.76);
  background: rgba(240, 115, 136, 0.12);
}

#treatmentView .treatment-feature-section-priority .treatment-section-toggle {
  border-color: rgba(240, 115, 136, 0.76);
  background: transparent;
}

#treatmentView .treatment-feature-section-priority .treatment-section-toggle b {
  background: var(--kokoro-vivid-crimson);
  color: #fff;
  box-shadow: none;
}

#treatmentView .treatment-feature-section-priority .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-priority .treatment-section-toggle:focus-visible {
  box-shadow: none;
}

#treatmentView .treatment-feature-section-strengths {
  border-color: #22c55eb5;
  background: rgba(34, 197, 94, 0.18);
}

#treatmentView .treatment-feature-section-strengths .treatment-section-toggle {
  border-color: #22c55eb5;
  background: transparent;
}

#treatmentView .treatment-feature-section-strengths .treatment-section-toggle b {
  background: #22c55eb5;
  color: #fff;
}

#treatmentView .treatment-feature-section-strengths .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-strengths .treatment-section-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

#treatmentView .treatment-feature-section-other {
  border-color: #5e97ffb5;
  background: rgba(94, 151, 255, 0.18);
}

#treatmentView .treatment-feature-section-other .treatment-section-toggle {
  border-color: #5e97ffb5;
  background: transparent;
}

#treatmentView .treatment-feature-section-other .treatment-section-toggle b {
  background: #5e97ff;
  color: #fff;
}

#treatmentView .treatment-feature-section-other .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-other .treatment-section-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
}

#treatmentView .treatment-feature-section-priority .treatment-section-toggle,
#treatmentView .treatment-feature-section-strengths .treatment-section-toggle,
#treatmentView .treatment-feature-section-other .treatment-section-toggle {
  border: 0;
  box-shadow: none;
  outline: 0;
}

#treatmentView .treatment-feature-section-strengths .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-strengths .treatment-section-toggle:focus-visible,
#treatmentView .treatment-feature-section-other .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-other .treatment-section-toggle:focus-visible {
  box-shadow: none;
  outline: 0;
}

#treatmentView .treatment-feature-section-priority.has-triggered-veto {
  border-color: rgba(240, 115, 136, 0.76);
  box-shadow: none;
  outline: 0;
}

#treatmentView .treatment-feature-section-priority.has-triggered-veto .treatment-section-toggle {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

#treatmentView .treatment-feature-section-priority.has-triggered-veto .treatment-section-toggle b {
  background: var(--kokoro-vivid-crimson);
  color: #fff;
  box-shadow: none;
}

#treatmentView .treatment-feature-section-priority.has-triggered-veto .treatment-section-toggle:hover,
#treatmentView .treatment-feature-section-priority.has-triggered-veto .treatment-section-toggle:focus-visible {
  box-shadow: none;
  outline: 0;
}

#treatmentView .treatment-feature-section-other.has-triggered-veto {
  border-color: #5e97ffb5;
  background: rgba(94, 151, 255, 0.18);
}

#treatmentView .treatment-feature-section-other.has-triggered-veto .treatment-section-toggle {
  background: transparent;
}

#treatmentView .treatment-feature-section-other.has-triggered-veto .treatment-section-toggle b {
  background: #5e97ff;
  color: #fff;
}

#treatmentView .treatment-feature-section-priority .treatment-feature-card,
#treatmentView .treatment-feature-section-strengths .treatment-feature-card,
#treatmentView .treatment-feature-section-other .treatment-feature-card {
  border: 0;
}

#treatmentView .treatment-feature-section-priority .treatment-section-empty,
#treatmentView .treatment-feature-section-strengths .treatment-section-empty,
#treatmentView .treatment-feature-section-other .treatment-section-empty {
  border: 0;
}

#treatmentView .treatment-feature-card.is-caution-related {
  background: rgba(255, 250, 242, 0.72);
}

#treatmentView .treatment-feature-card-list {
  border-radius: 20px;
  background: #fff;
  overflow: visible;
}

#treatmentView .treatment-feature-card .info-dot::after {
  z-index: 120;
}

#treatmentView .treatment-feature-card .info-dot:hover::after,
#treatmentView .treatment-feature-card .info-dot:focus::after {
  opacity: 1;
  transform: translateY(0);
}

#treatmentView .treatment-feature-card {
  border: 0;
  border-radius: 0;
  background: transparent;
}

#treatmentView .treatment-feature-card + .treatment-feature-card {
  border-top: 1px solid rgba(94, 151, 255, 0.14);
}

#treatmentView .decision-scenario-metrics div:last-child strong {
  background: rgba(94, 151, 255, 0.14);
  color: #5e97ff;
  border-radius: 20px;
}

#treatmentView .decision-scenario-metrics div:last-child strong.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

#treatmentView .decision-scenario-metrics div:last-child strong.is-positive {
  background: rgba(21, 128, 61, 0.1);
  color: var(--green);
}

#reportView .report-delta-row {
  border: 0;
  box-shadow: none;
}

#reportView .report-delta-row .report-delta-contribution.is-negative {
  background: rgba(185, 28, 28, 0.08);
  color: var(--red);
}

#reportView .report-delta-row .report-delta-contribution.is-positive {
  background: rgba(21, 128, 61, 0.1);
  color: var(--green);
}

#reportView .report-delta-row .report-delta-contribution.is-unavailable {
  background: rgba(94, 151, 255, 0.08);
  color: var(--muted);
}

#treatmentView .treatment-target-slider input,
#treatmentView .future-slider-cell input {
  accent-color: #5e97ff;
}

#treatmentView .metric-help,
#reportView .report-info-dot {
  border-color: rgba(94, 151, 255, 0.48);
  color: #5e97ff;
}

#treatmentView .metric-help:hover,
#treatmentView .metric-help:focus,
#reportView .report-info-dot:hover,
#reportView .report-info-dot:focus {
  border-color: #5e97ff;
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
}

#treatmentView .decision-output-header,
#treatmentView .decision-output-main,
#treatmentView .decision-scenario-metrics,
#treatmentView .decision-threshold-note,
#treatmentView .summary-caution-checks,
#treatmentView .summary-caution-row,
#reportView .report-probability-comparison,
#reportView .report-probability-main,
#reportView .report-probability-metric + .report-probability-metric,
#reportView .report-probability-result,
#reportView .report-accordion-body,
#reportView .full-calculation-row,
#reportView .full-calculation-row > span,
#reportView .full-calculation-row > strong {
  border-color: rgba(94, 151, 255, 0.22);
}

#treatmentView .decision-output-header,
#treatmentView .decision-output-main,
#treatmentView .decision-scenario-metrics,
#treatmentView .decision-threshold-note,
#treatmentView .summary-caution-checks,
#treatmentView .summary-caution-row {
  border: 0;
}

#treatmentView .decision-output-card .decision-output-header,
#treatmentView .decision-output-card .decision-output-main,
#treatmentView .decision-output-card .decision-scenario-metrics,
#treatmentView .decision-output-card .decision-output-result,
#treatmentView .decision-output-card .decision-threshold-note {
  border: 0;
}

#treatmentView .decision-output-card .decision-threshold-note {
  margin: 0 16px 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(72, 199, 116, 0.24);
}

#reportView .report-accordion.has-triggered-veto {
  border-color: #f07388b5;
  background: rgba(240, 115, 136, 0.16);
}

#reportView .report-accordion.has-triggered-veto .report-accordion-button {
  background: rgba(240, 115, 136, 0.14);
}

#reportView .report-accordion.has-triggered-veto .report-accordion-button::after {
  color: #c9233f;
}

#reportView .report-accordion.has-triggered-veto .report-gate-heading > strong {
  color: #c9233f;
}

#reportView .report-accordion.has-triggered-veto .report-accordion-body,
#reportView .report-accordion.has-triggered-veto .report-gate-card,
#reportView .report-accordion.has-triggered-veto .report-global-veto-note,
#reportView .report-accordion.has-triggered-veto .report-veto-family-note {
  border: 0;
}

#reportView .report-accordion.has-triggered-veto .report-accordion-body {
  background: rgba(255, 255, 255, 0.5);
}

#reportView .report-accordion.has-triggered-veto .report-global-veto-note,
#reportView .report-accordion.has-triggered-veto .report-gate-card,
#reportView .report-accordion.has-triggered-veto .report-veto-family-note {
  background: rgba(255, 255, 255, 0.58);
}

#treatmentView .treatment-summary-pane .summary-caution-list,
#treatmentView .treatment-summary-pane .summary-caution-row {
  overflow: visible;
}

@media (max-width: 1600px) {
  .treatment-feature-card {
    grid-template-columns: 240px minmax(0, 1fr);
    column-gap: 12px;
  }

  .treatment-card-target,
  .treatment-card-actions {
    min-width: 0;
  }

  .treatment-card-target {
    grid-column: 2;
    grid-row: 2;
  }

  .treatment-card-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: minmax(74px, max-content) minmax(180px, max-content);
    justify-content: end;
  }

  .treatment-feature-card > .triggered-condition {
    grid-column: 1 / -1;
  }

  .treatment-card-actions {
    align-items: start;
  }
}

@media (max-width: 1680px) {
  #queryView .phq-history-layout {
    grid-template-columns: 1fr;
  }

  #queryView .phq-performance-note {
    max-width: 560px;
  }
}

#treatmentView .decision-probability-gauge {
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--decision-gauge-color) var(--decision-progress), var(--decision-gauge-track) 0);
  box-shadow: inset 0 0 0 2px var(--decision-gauge-ring);
}

#reportView .report-probability-gauge {
  background:
    radial-gradient(circle at center, #fff 0 50%, transparent 51%),
    conic-gradient(var(--report-gauge-color) 0 var(--report-progress), var(--report-gauge-track) var(--report-progress) 360deg);
  box-shadow: inset 0 0 0 2px var(--report-gauge-ring);
}

#reportView .report-probability-metric.is-adjusted .report-probability-gauge {
  background:
    radial-gradient(circle at center, #fff 0 50%, transparent 51%),
    conic-gradient(var(--report-gauge-color) 0 var(--report-progress), var(--report-gauge-track) var(--report-progress) 360deg);
  box-shadow: inset 0 0 0 2px var(--report-gauge-ring);
}

#treatmentView .decision-probability-gauge span,
#reportView .report-probability-gauge span,
#treatmentView .decision-output-header span,
#reportView .report-accordion-button::after {
  color: #5e97ff;
}

#reportView .report-probability-gauge span,
#reportView .report-probability-metric.is-adjusted .report-probability-gauge span {
  color: var(--report-gauge-color);
}

#treatmentView .decision-output-card .decision-probability-gauge span {
  color: var(--decision-gauge-color);
}

#reportView .session-report-panel {
  gap: 28px;
  padding: 30px;
  background: #fff;
  box-shadow: none;
}

#reportView .session-report-panel > .panel-heading {
  margin-bottom: 2px;
}

#reportView .report-safety-note {
  border: 0;
  border-radius: 20px;
  background: rgba(94, 151, 255, 0.09);
  padding: 22px 24px;
}

#reportView .report-safety-note p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.55;
}

#reportView .report-summary-grid {
  gap: 0;
}

#reportView .report-probability-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

#reportView .report-probability-comparison {
  border-bottom: 1px solid rgba(94, 151, 255, 0.22);
}

#reportView .report-probability-metric {
  padding: 30px 32px;
}

#reportView .report-probability-main {
  padding: 30px 32px;
}

#reportView .report-probability-result {
  border-bottom: 1px solid rgba(94, 151, 255, 0.22);
  padding: 28px 32px;
}

#reportView .report-threshold-note {
  border-radius: 0 0 20px 20px;
  background: rgba(94, 151, 255, 0.09);
  padding: 22px 32px;
}

#reportView .report-phq-history-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 32px 8px;
}

#reportView .report-card-heading h4 {
  font-size: 1.22rem;
}

#reportView .report-phq-flow {
  gap: 16px;
}

#reportView .report-phq-flow article {
  border: 0;
  border-radius: 20px;
  background: rgba(94, 151, 255, 0.09);
  padding: 16px 18px;
}

.empty-state {
  max-width: 560px;
}

.empty-state p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.assessment-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.assessment-step-tab {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 72px;
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fff;
  color: var(--ink-soft);
  padding: 11px 12px;
  text-align: left;
}

.assessment-step-tab.is-step-complete::after {
  position: absolute;
  top: 16px;
  right: 18px;
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  content: "✓";
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
}

.assessment-step-tab span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.assessment-step-tab strong {
  line-height: 1.25;
}

.assessment-step-tab.is-active span,
.assessment-step-tab.is-active strong {
  color: #5e97ff;
}

.assessment-step-tab:hover,
.assessment-step-tab.is-active {
  border-color: #5e97ff;
  background: rgba(94, 151, 255, 0.08);
  color: #5e97ff;
}

.assessment-step-panel {
  display: contents;
}

.assessment-step-panel[data-assessment-step-panel="1"].is-active {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 16px;
}

.assessment-step-panel[hidden] {
  display: none;
}

#queryView .panel,
#queryView .panel-wide {
  border: 2px solid #5e97ff;
  border-radius: 20px;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"].panel-wide {
  border: 0;
  border-radius: 0;
}

#queryView input:not([type="range"]):not([type="hidden"]):not([type="checkbox"]),
#queryView select,
#queryView textarea {
  border: 2px solid rgba(94, 151, 255, 0.48);
  border-radius: 20px;
}

#queryView input:not([type="range"]):not([type="hidden"]):not([type="checkbox"]):focus,
#queryView select:focus,
#queryView textarea:focus {
  border-color: #5e97ff;
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
}

#queryView .slider-field {
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fff;
}

#queryView .slider-field.is-unset {
  background: rgba(94, 151, 255, 0.04);
}

#queryView .slider-field input[type="range"] {
  accent-color: #5e97ff;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] > .panel {
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
  padding: 18px 32px 34px;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] > .panel .panel-heading {
  margin-bottom: 18px;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-list {
  gap: 16px 22px;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field {
  position: relative;
  border: 0;
  border-radius: 20px;
  background: rgba(94, 151, 255, 0.05);
  padding: 18px 54px 18px 20px;
  transition: background .16s ease, box-shadow .16s ease;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset {
  background: #f7f9fb;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-missing,
#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-required-preview {
  background: rgba(239, 68, 68, 0.06);
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, 0.34);
}

#queryView .is-required-preview-shake {
  animation: required-field-shake 360ms ease-in-out;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-answered::after {
  position: absolute;
  top: 16px;
  right: 18px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #168a49;
  color: #fff;
  content: "✓";
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(22, 138, 73, 0.18);
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field input[type="range"] {
  accent-color: #5e97ff;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field input[type="range"]::-webkit-slider-thumb {
  border: 2px solid #5e97ff;
  background: #5e97ff;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field input[type="range"]::-moz-range-thumb {
  border: 2px solid #5e97ff;
  background: #5e97ff;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset .slider-label-text {
  color: var(--muted);
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"] {
  opacity: 1;
  accent-color: #d8e1ee;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: #d8e1ee;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"]::-webkit-slider-thumb {
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"]::-moz-range-track,
#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"]::-moz-range-progress {
  height: 7px;
  border-radius: 999px;
  background: #d8e1ee;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .slider-field.is-unset input[type="range"]::-moz-range-thumb {
  border: 0;
  background: transparent;
  opacity: 0;
}

#queryView .inline-link,
#queryView .text-button {
  color: #5e97ff;
}

#queryView .info-dot {
  border-color: rgba(94, 151, 255, 0.48);
  color: #5e97ff;
}

#queryView .info-dot:hover,
#queryView .info-dot:focus {
  border-color: #5e97ff;
  box-shadow: 0 0 0 3px rgba(94, 151, 255, 0.18);
}

.assessment-meta-grid,
.analyst-grid {
  margin-bottom: 16px;
}

.phq-timeline {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr) auto minmax(190px, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.timeline-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fbfcfc;
  padding: 13px;
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timeline-card.current {
  border-color: #5e97ff;
  background: rgba(94, 151, 255, 0.08);
}

.timeline-card.is-no-data {
  border-style: dashed;
  background: #f4f7f7;
  opacity: .72;
}

.timeline-card.is-no-data input[type="number"] {
  color: var(--muted);
}

.timeline-card strong {
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.timeline-label-with-info {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.timeline-label-with-info strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.phq-history-info {
  flex: 0 0 auto;
}

.timeline-card-label {
  display: grid;
  gap: 8px;
}

.timeline-time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.no-data-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid rgba(94, 151, 255, 0.34);
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.no-data-toggle input {
  width: 14px;
  min-height: 14px;
  accent-color: #5e97ff;
  padding: 0;
}

.timeline-arrow {
  display: grid;
  align-self: center;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: rgba(94, 151, 255, 0.14);
  color: #5e97ff;
  font-weight: 900;
}

.inline-link {
  justify-self: start;
  margin-top: 2px;
}

.details-toggle-row {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 14px;
}

.derived-panel {
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fbfcfc;
  margin-bottom: 16px;
  padding: 14px;
}

.derived-panel[hidden] {
  display: none;
}

.derived-panel-heading h4 {
  margin: 0;
  color: var(--ink-soft);
}

.derived-panel-heading p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.derived-panel-heading .derived-note {
  border-left: 4px solid #5e97ff;
  background: rgba(94, 151, 255, 0.08);
  border-radius: 20px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 750;
  margin-top: 10px;
  padding: 9px 10px;
}

.derived-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.derived-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  border: 2px solid rgba(94, 151, 255, 0.28);
  border-radius: 20px;
  background: #fff;
  padding: 11px;
}

.derived-item strong,
.derived-item small {
  display: block;
}

.derived-item strong {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.25;
}

.derived-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.derived-item span {
  flex: 0 0 auto;
  border-radius: 20px;
  background: rgba(94, 151, 255, 0.12);
  color: #5e97ff;
  font-weight: 900;
  padding: 5px 8px;
  text-align: right;
}

#queryView .assessment-progress.panel {
  gap: 26px;
  padding: 26px 28px;
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fff;
}

#queryView .assessment-step-tab {
  min-height: 88px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  padding: 18px 22px;
}

#queryView .assessment-step-tab:hover,
#queryView .assessment-step-tab.is-active {
  background: rgba(94, 151, 255, 0.08);
}

#queryView .assessment-step-tab span,
#queryView .assessment-step-tab.is-active span,
#queryView .assessment-step-tab.is-active strong {
  color: #5e97ff;
}

#queryView .assessment-step-panel[data-assessment-step-panel="0"] > .panel {
  border: 2px solid #5e97ff;
  border-radius: 20px;
  background: #fff;
  padding: 30px 32px;
}

#queryView .assessment-step-panel[data-assessment-step-panel="1"] .panel-heading .eyebrow {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: none;
}

#queryView .patient-details-section,
#queryView .phq-history-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

#queryView .patient-details-section {
  gap: 18px;
  margin-bottom: 58px;
}

#queryView .phq-history-section {
  gap: 20px;
}

#queryView .assessment-subsection-heading h4 {
  color: var(--ink);
  font-size: 1rem;
}

#queryView .patient-meta-grid {
  column-gap: 22px;
  row-gap: 18px;
  align-items: start;
}

#queryView .profile-field-compact input,
#queryView .profile-field-compact select {
  width: 100%;
}

#queryView label > span {
  color: var(--ink);
  font-weight: 850;
}

#queryView input:not([type="range"]):not([type="hidden"]):not([type="checkbox"]),
#queryView select {
  min-height: 48px;
  border-color: rgba(94, 151, 255, 0.48);
  border-radius: 999px;
  background: #fff;
}

#queryView .profile-field.is-required-preview input,
#queryView .timeline-card.is-required-preview {
  background: rgba(239, 68, 68, 0.06);
  box-shadow: inset 0 0 0 2px rgba(239, 68, 68, 0.34);
}

#queryView .profile-field.is-required-preview input,
#queryView .timeline-card.is-required-preview input:not([type="range"]):not([type="hidden"]):not([type="checkbox"]) {
  border-color: rgba(239, 68, 68, 0.46);
}

#queryView textarea {
  min-height: 98px;
  border-color: rgba(94, 151, 255, 0.48);
  border-radius: 20px;
  background: #fff;
}

#queryView .phq-timeline {
  grid-template-columns: minmax(220px, 260px) 34px minmax(220px, 240px) 34px minmax(220px, 240px);
  justify-content: start;
  gap: 12px;
  align-items: center;
}

#queryView .phq-performance-note {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(94, 151, 255, 0.12);
  color: var(--ink-soft);
  padding: 18px 20px;
  line-height: 1.45;
}

#queryView .phq-performance-note[data-phq-performance-level="high"] {
  background: rgba(76, 196, 141, 0.18);
}

#queryView .phq-performance-note[data-phq-performance-level="medium"] {
  background: rgba(255, 204, 89, 0.24);
}

#queryView .phq-performance-note[data-phq-performance-level="low"] {
  background: rgba(231, 77, 77, 0.13);
}

#queryView .phq-performance-note strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.25;
}

#queryView .phq-performance-note p,
#queryView .phq-performance-note small {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  white-space: pre-line;
}

#queryView .phq-performance-note p {
  font-size: 0.78rem;
}

#queryView .phq-performance-note .phq-performance-score-line {
  color: var(--ink-soft);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.3;
}

#queryView .phq-performance-note[data-phq-performance-level="high"] .phq-performance-score-line {
  color: #0c6b5f;
}

#queryView .phq-performance-note[data-phq-performance-level="medium"] .phq-performance-score-line {
  color: #7a5200;
}

#queryView .phq-performance-note[data-phq-performance-level="low"] .phq-performance-score-line {
  color: #b42323;
}

#queryView .phq-performance-note small {
  font-size: 0.72rem;
}

#queryView .timeline-card {
  align-content: center;
  min-height: 142px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  padding: 18px 20px;
}

#queryView .timeline-card:not(.current) {
  justify-items: center;
  text-align: center;
}

#queryView .timeline-card:not(.current) .timeline-card-label {
  margin-top: 10px;
}

#queryView .timeline-card.current {
  min-height: 176px;
  background: rgba(94, 151, 255, 0.12);
  padding: 24px;
}

#queryView .timeline-card:not(.current) .timeline-label-with-info {
  max-width: 100%;
  justify-content: center;
}

#queryView .timeline-card:not(.current) .timeline-label-with-info strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

#queryView .timeline-card.current.is-required-preview {
  background: rgba(239, 68, 68, 0.06);
}

@keyframes required-field-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-5px);
  }

  40% {
    transform: translateX(5px);
  }

  60% {
    transform: translateX(-3px);
  }

  80% {
    transform: translateX(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #queryView .is-required-preview-shake {
    animation: none;
  }
}

#queryView .timeline-time {
  color: var(--muted);
}

#queryView .timeline-card .timeline-time {
  display: none;
}

#queryView .timeline-card strong {
  color: var(--ink);
  font-size: 1.02rem;
  white-space: nowrap;
}

#queryView .timeline-card input:not([type="range"]):not([type="hidden"]):not([type="checkbox"]) {
  min-height: 52px;
}

#queryView .timeline-card .phq-score-input {
  width: 96px;
  max-width: 100%;
  min-height: 46px;
  justify-self: center;
  padding-inline: 14px;
  text-align: center;
  font-size: 1rem;
  font-weight: 850;
}

#queryView .no-data-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-self: center;
  gap: 10px;
  width: min(100%, 220px);
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e86eb4;
  padding: 0;
  font-size: 0.98rem;
  font-weight: 950;
  text-align: left;
}

#queryView .no-data-toggle span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

#queryView .no-data-toggle input {
  width: 18px;
  min-height: 18px;
  justify-self: end;
}

#queryView .timeline-arrow {
  width: 34px;
  height: 34px;
  background: #5e97ff;
  color: #fff;
  font-size: 1.1rem;
}

#queryView #openPhqCheckButton {
  color: #5e97ff;
  font-size: 1rem;
  font-weight: 950;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#queryView .step-actions {
  border: 0;
  background: transparent;
  box-shadow: none;
}

#queryView .step-actions.panel.panel-wide {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.clinical-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  border: 1px solid rgba(180, 83, 9, 0.24);
  border-radius: 8px;
  background: #fffaf2;
  padding: 14px;
}

.clinical-note strong {
  color: var(--amber);
}

.clinical-note p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.55;
}

.info-button {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 999px;
  background: #fff;
  color: var(--amber);
  font-weight: 900;
}

.info-button::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  width: min(360px, calc(100vw - 48px));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  content: attr(title);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  padding: 12px;
  text-align: left;
  white-space: pre-line;
  z-index: 20;
}

.info-button:hover::after,
.info-button:focus-visible::after {
  display: block;
}

.phq-check-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 350px);
  gap: 18px;
  align-items: start;
}

.phq-check-panel {
  padding: 22px;
}

.phq-check-guide {
  display: block;
  position: fixed;
  top: 112px;
  right: 28px;
  z-index: 60;
  width: 116px;
  min-width: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.phq-check-thought-bubble {
  position: absolute;
  top: 16px;
  right: calc(100% + 14px);
  width: max-content;
  max-width: min(320px, calc(100vw - 178px));
  margin: 0;
  border: 2px solid rgba(94, 151, 255, 0.34);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(33, 55, 84, 0.1);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.38;
  padding: 16px 18px;
  text-align: right;
  white-space: pre-line;
}

.phq-check-thought-bubble::after {
  content: "";
  position: absolute;
  top: 34px;
  right: -10px;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(94, 151, 255, 0.34);
  border-right: 2px solid rgba(94, 151, 255, 0.34);
  background: #fff;
  transform: rotate(45deg);
}

.phq-check-mascot {
  display: block;
  width: 116px;
  height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(33, 55, 84, 0.16));
}

.screen-note {
  max-width: 920px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.55;
}

.phq-timeframe {
  border: 1px solid rgba(94, 151, 255, 0.22);
  margin: 0 0 18px;
  background: rgba(94, 151, 255, 0.12);
  border-radius: 20px;
  color: var(--ink-soft);
  font-weight: 300;
  line-height: 1.45;
  padding: 14px 16px;
}

.phq-items {
  display: grid;
  gap: 16px;
}

.phq-item-row {
  display: grid;
  gap: 16px;
  margin: 0;
  border: 2px solid rgba(94, 151, 255, 0.24);
  border-radius: 20px;
  background: #fff;
  padding: 18px 16px 16px;
}

.phq-item-row legend {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5e97ff;
  font-weight: 300;
  line-height: 1.28;
  padding: 0 10px 0 0;
}

.phq-item-row legend span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #5e97ff;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
}

.phq-item-row legend strong {
  min-width: 0;
  padding-top: 0;
}

.phq-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.phq-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: #fff;
  padding: 10px 11px;
  color: var(--text);
  font-weight: 300;
  line-height: 1.25;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.phq-options label:has(input:checked) {
  border-color: transparent;
  background: rgba(94, 151, 255, 0.24);
  box-shadow: none;
}

.phq-options input {
  width: auto;
  min-height: auto;
  accent-color: #5e97ff;
}

.phq-score-card {
  position: sticky;
  top: 18px;
  border: 1px solid rgba(94, 151, 255, 0.24);
  border-radius: 20px;
}

.phq-score-card .eyebrow {
  color: #5e97ff;
}

.phq-total {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 0 8px;
}

.phq-total span {
  color: #5e97ff;
  font-size: 3.8rem;
  font-weight: 300;
  line-height: 1;
}

.phq-total small,
.score-status,
.severity-caveat,
.confirmation-message {
  color: var(--muted);
  line-height: 1.45;
}

.severity-band {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}

.severity-band span {
  border: 1px solid rgba(94, 151, 255, 0.22);
  border-radius: 20px;
  background: #fff;
  padding: 8px 10px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 300;
}

.severity-band span.is-active {
  border-color: rgba(94, 151, 255, 0.34);
  background: rgba(94, 151, 255, 0.12);
  color: #5e97ff;
}

.full-width {
  width: 100%;
}

.confirmation-message {
  min-height: 20px;
  margin-bottom: 0;
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 1060px) {
  .auth-screen,
  .app-shell,
  .query-grid,
  .phq-check-layout {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    align-content: start;
    overflow-y: auto;
  }

  .auth-hero,
  .auth-panel-v3 {
    min-height: auto;
  }

  .auth-hero {
    order: 1;
  }

  .auth-panel-v3 {
    order: 2;
  }

  .auth-mascot-card {
    position: static;
    width: min(100%, 520px);
  }

  .treatment-layout {
    grid-template-columns: 1fr;
  }

  .treatment-summary-pane {
    position: static;
  }

  .treatment-scenario-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .treatment-feature-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .treatment-card-header,
  .treatment-card-metrics,
  .treatment-card-target,
  .treatment-card-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .treatment-card-actions {
    justify-content: start;
  }

  .treatment-card-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-hero {
    grid-template-columns: 1fr;
  }

  .about-hero-visual {
    justify-items: start;
  }

  .about-card-grid-three,
  .about-card-grid-four,
  .about-flow,
  .about-pill-grid,
  .about-methodology-stages,
  .about-methodology-panels,
  .about-stat-grid,
  .about-ack-grid,
  .about-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-methodology-stages span {
    clip-path: none;
    border-radius: 14px;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell.is-sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .app-shell.is-sidebar-collapsed .sidebar {
    gap: 18px;
    padding: 22px 18px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand {
    width: calc(100% + 36px);
    min-height: 0;
    margin: -22px -18px 0;
    padding: 5px 0;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand-banner {
    display: block;
  }

  .app-shell.is-sidebar-collapsed .sidebar-brand-mark,
  .app-shell.is-sidebar-collapsed .sidebar-collapse-button,
  .app-shell.is-sidebar-collapsed .workspace-guide {
    display: none;
  }

  .sidebar-collapse-button {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .nav-module {
    grid-column: 1 / -1;
  }

  .nav-module-panel {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .nav-button {
    text-align: center;
  }

  .app-shell.is-sidebar-collapsed .nav-list,
  .app-shell.is-sidebar-collapsed .nav-module-panel {
    justify-items: stretch;
    gap: 2px;
  }

  .app-shell.is-sidebar-collapsed .nav-module-toggle,
  .app-shell.is-sidebar-collapsed .nav-button {
    justify-content: space-between;
    width: 100%;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    border-radius: 18px;
    padding: 2px 8px;
  }

  .app-shell.is-sidebar-collapsed .nav-button-main {
    justify-content: flex-start;
    gap: 3px;
  }

  .app-shell.is-sidebar-collapsed .nav-icon-wrap {
    width: 62px;
    height: 62px;
  }

  .app-shell.is-sidebar-collapsed .nav-icon {
    width: 58px;
    height: 58px;
  }

  .app-shell.is-sidebar-collapsed .nav-lens-icon {
    width: 38px;
    height: 38px;
  }

  .app-shell.is-sidebar-collapsed .nav-module-panel {
    padding-left: 22px;
  }

  .app-shell.is-sidebar-collapsed .nav-module-chevron {
    display: block;
  }

  .app-shell.is-sidebar-collapsed .nav-module-placeholder {
    display: block;
  }

  .app-shell.is-sidebar-collapsed .nav-button-main > span:not(.nav-icon-wrap) {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }

  .app-shell.is-sidebar-collapsed .nav-module-toggle[data-nav-tooltip]::before,
  .app-shell.is-sidebar-collapsed .nav-button[data-nav-tooltip]::before {
    display: none;
  }

  .app-shell.is-sidebar-collapsed .nav-button.is-step-complete::after {
    position: static;
    width: 20px;
    height: 20px;
    font-size: 0.74rem;
  }

  .app-shell.is-sidebar-collapsed .sidebar-control-box,
  .app-shell.is-sidebar-collapsed .language-box,
  .app-shell.is-sidebar-collapsed .session-area {
    display: grid;
  }

  .session-area {
    margin-top: 0;
  }

  .form-grid,
  .form-grid.four-col,
  .phq-options,
  .derived-list {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .phq-history-layout {
    grid-template-columns: 1fr;
  }

  .phq-timeline {
    grid-template-columns: 1fr;
  }

  #queryView .phq-timeline {
    grid-template-columns: 1fr;
  }

  .timeline-arrow {
    justify-self: center;
    transform: none;
  }

  .phq-score-card {
    position: static;
  }

  .future-comparison-header {
    display: none;
  }

  .future-comparison-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .report-delta-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .report-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-probability-comparison {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-probability-metric + .report-probability-metric {
    border-top: 1px solid rgba(15, 118, 110, 0.18);
    border-left: 0;
  }

  .future-column-label {
    display: block;
  }
}

@media (max-width: 680px) {
  .auth-screen,
  .workspace,
  .sidebar {
    padding: 16px;
  }

  .auth-screen {
    gap: 0;
    background:
      linear-gradient(180deg, rgba(247, 251, 252, 0.98), rgba(236, 250, 252, 0.96) 52%, rgba(255, 246, 249, 0.98));
  }

  .auth-panel,
  .panel,
  .empty-state,
  .action-bar {
    padding: 14px;
  }

  #queryView .profile-field-main,
  #queryView .profile-field-compact,
  #queryView .assessment-notes-field {
    grid-column: 1 / -1;
    grid-row: auto;
    max-width: none;
  }

  .auth-panel-v3,
  .auth-hero {
    padding: 20px;
  }

  .auth-hero {
    border-radius: 20px 20px 0 0;
  }

  .auth-panel-v3 {
    gap: 18px;
    border-radius: 0 0 20px 20px;
  }

  .auth-hero {
    gap: 18px;
  }

  .auth-logo-row {
    gap: 10px;
  }

  .auth-logo-mark-tile {
    width: 78px;
    height: 78px;
    border-radius: 22px;
  }

  .auth-logo-mark {
    width: 70px;
    height: 70px;
  }

  .auth-wordmark {
    width: min(240px, 66vw);
    height: 54px;
  }

  .auth-form-wordmark {
    width: min(190px, 74vw);
  }

  .auth-mascot-card {
    width: min(210px, 62vw);
    padding: 0;
  }

  .auth-mascot {
    width: 100%;
    max-height: 220px;
  }

  .auth-language .language-toggle {
    width: 100%;
  }

  .topbar,
  .panel-heading,
  .full-calculation-heading,
  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .full-calculation-heading .secondary-button {
    width: 100%;
  }

  .topbar-status {
    justify-items: start;
    text-align: left;
  }

  .topbar-safety-card {
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
  }

  .home-review-copy h3 {
    font-size: 1.35rem;
  }

  .home-review-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px 16px 18px;
  }

  .home-review-mascot {
    width: 70px;
    height: 70px;
  }

  .home-review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-lens-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .home-start-assessment-button {
    width: 100%;
  }

  .journey-map {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .journey-connector {
    width: 2px;
    height: 18px;
    margin-left: 21px;
  }

  .journey-step {
    width: 100%;
  }

  .home-loneliness-handoff {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .home-loneliness-mascot {
    width: 62px;
    height: 62px;
  }

  .home-sidequest {
    display: block;
  }

  .about-hero,
  .about-model-section,
  .about-safety-card {
    padding: 18px;
  }

  .about-card-grid-three,
  .about-card-grid-four,
  .about-flow,
  .about-pill-grid,
  .about-methodology-stages,
  .about-methodology-panels,
  .about-stat-grid,
  .about-ack-grid,
  .about-team-grid {
    grid-template-columns: 1fr;
  }

  .about-methodology-panel {
    min-height: auto;
  }

  .about-methodology-tags span {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  .about-hero-visual img {
    width: 74px;
    height: 74px;
  }

  .future-comparison-panel > .panel-heading {
    grid-template-columns: 1fr;
  }

  .treatment-scenario-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .treatment-scenario-heading span {
    align-self: flex-start;
  }

  .treatment-scenario-grid,
  .treatment-card-metrics {
    grid-template-columns: 1fr;
  }

  .treatment-card-header,
  .treatment-interaction-item {
    align-items: stretch;
    flex-direction: column;
  }

  .treatment-interaction-item {
    grid-template-columns: 1fr;
  }

  .treatment-card-badges {
    justify-content: flex-start;
  }

  .future-comparison-panel > .panel-heading .secondary-button {
    width: 100%;
  }

  .decision-output-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .decision-probability-gauge {
    width: 104px;
  }

  .banner-preview {
    top: 96px;
    right: 16px;
    left: auto;
    width: 92px;
    min-width: 0;
    padding: 0;
  }

  .banner-mascot-trigger {
    width: 92px;
    height: 92px;
  }

  .banner-ready-badge {
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }

  .banner-preview::before {
    top: 100%;
    right: 0;
    width: 92px;
    height: 10px;
  }

  .banner-thought-bubble {
    top: calc(100% + 8px);
    right: 0;
    width: min(300px, calc(100vw - 32px));
    font-size: 0.78rem;
    text-align: left;
  }

  .banner-thought-bubble::after {
    top: -9px;
    right: 38px;
    border: 0;
    border-top: 2px solid rgba(94, 151, 255, 0.34);
    border-left: 2px solid rgba(94, 151, 255, 0.34);
  }

  .banner-preview-card {
    top: calc(100% + 8px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    min-width: 0;
  }

  .banner-decision-main {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .banner-probability-gauge {
    width: 82px;
  }

  .phq-check-guide {
    top: 96px;
    right: 16px;
    width: 92px;
  }

  .phq-check-thought-bubble {
    top: calc(100% + 8px);
    right: 0;
    width: min(260px, calc(100vw - 150px));
    font-size: 0.78rem;
    padding: 12px 14px;
  }

  .phq-check-thought-bubble::after {
    top: -9px;
    right: 38px;
    border: 0;
    border-top: 2px solid rgba(94, 151, 255, 0.34);
    border-left: 2px solid rgba(94, 151, 255, 0.34);
  }

  .phq-check-mascot {
    width: 92px;
    height: 92px;
  }

  .slider-field {
    grid-template-columns: 1fr;
  }

  .slider-field output {
    justify-self: start;
    min-width: 100%;
    text-align: left;
  }

  .future-comparison-row {
    padding: 12px;
  }

  .report-phq-flow,
  .report-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-phq-arrow {
    justify-self: center;
  }

  .report-probability-main {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    padding: 20px;
  }

  .report-probability-metric {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    padding: 20px;
  }

  .report-probability-gauge {
    width: 136px;
  }

  .report-probability-gauge span {
    font-size: 1.5rem;
  }

  .report-probability-result,
  .report-threshold-note {
    padding: 18px 20px;
  }

  .report-accordion-button,
  .report-accordion-body {
    padding: 12px;
  }

  .future-slider-cell input {
    min-width: 0;
  }

  .nav-list,
  .form-grid,
  .form-grid.four-col,
  .assessment-progress,
  .phq-options,
  .derived-list,
  .slider-list {
    grid-template-columns: 1fr;
  }

  .nav-module-panel {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }

  .language-toggle {
    width: 100%;
  }

  .language-toggle button {
    flex: 1;
  }

  .segmented label {
    flex: 1;
  }

  .segmented span {
    min-width: 0;
  }

  .button-row {
    justify-content: stretch;
  }

  .step-actions,
  .clinical-note {
    flex-direction: column;
  }

  .button-row button {
    width: 100%;
  }
}

/* Mobile quick build: keep the desktop app intact, then reshape dense clinical UI into a touch-first flow. */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 112px;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
    background: #fff;
  }

  .app-shell,
  .app-shell.is-sidebar-collapsed {
    display: block;
    min-width: 0;
    overflow-x: hidden;
  }

  .sidebar,
  .app-shell.is-sidebar-collapsed .sidebar {
    position: sticky;
    top: 0;
    z-index: 80;
    height: auto;
    max-height: none;
    gap: 8px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(33, 55, 84, 0.1);
    box-shadow: 0 12px 28px rgba(33, 55, 84, 0.12);
    padding: 8px 10px 10px;
  }

  .sidebar-brand,
  .app-shell.is-sidebar-collapsed .sidebar-brand {
    min-height: 70px;
    width: calc(100% + 20px);
    margin: -8px -10px 0;
    padding: 8px 128px 8px 0;
    background: #7671bf;
  }

  .sidebar-brand-banner,
  .app-shell.is-sidebar-collapsed .sidebar-brand-banner {
    display: block;
    width: 100%;
    height: 54px;
    object-fit: contain;
    object-position: center;
  }

  .sidebar-brand-mark,
  .sidebar-collapse-button,
  .workspace-guide,
  .language-box,
  .session-area,
  .reset-session-box,
  .app-shell.is-sidebar-collapsed .sidebar-brand-mark,
  .app-shell.is-sidebar-collapsed .sidebar-collapse-button,
  .app-shell.is-sidebar-collapsed .workspace-guide,
  .app-shell.is-sidebar-collapsed .language-box,
  .app-shell.is-sidebar-collapsed .session-area,
  .app-shell.is-sidebar-collapsed .reset-session-box {
    display: none;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-inline: -4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 4px 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-module {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
  }

  .nav-module-panel,
  .app-shell.is-sidebar-collapsed .nav-module-panel {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: auto;
    padding-left: 0;
  }

  .nav-module-panel[hidden] {
    display: none;
  }

  .nav-list > .nav-button,
  .nav-module-toggle,
  .nav-module-panel .nav-button,
  .app-shell.is-sidebar-collapsed .nav-module-toggle,
  .app-shell.is-sidebar-collapsed .nav-button {
    flex: 0 0 92px;
    width: 92px;
    height: 74px;
    min-height: 74px;
    max-height: 74px;
    justify-content: center;
    border-radius: 18px;
    padding: 6px 6px 7px;
    scroll-snap-align: start;
    text-align: center;
  }

  .nav-button-main,
  .nav-module-toggle .nav-button-main,
  .app-shell.is-sidebar-collapsed .nav-button-main {
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 100%;
  }

  .nav-icon-wrap,
  .app-shell.is-sidebar-collapsed .nav-icon-wrap {
    width: 42px;
    height: 42px;
  }

  .nav-icon,
  .app-shell.is-sidebar-collapsed .nav-icon {
    width: 40px;
    height: 40px;
  }

  .nav-lens-icon,
  .app-shell.is-sidebar-collapsed .nav-lens-icon {
    width: 34px;
    height: 34px;
  }

  .nav-research-icon,
  .app-shell.is-sidebar-collapsed .nav-research-icon {
    width: 34px;
    height: 34px;
  }

  .nav-button-main span:last-child,
  .app-shell.is-sidebar-collapsed .nav-button-main > span:not(.nav-icon-wrap) {
    position: static;
    display: -webkit-box;
    width: auto;
    height: auto;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    clip-path: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: inherit;
    font-size: 0.62rem;
    line-height: 1.05;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .nav-module-chevron,
  .app-shell.is-sidebar-collapsed .nav-module-chevron,
  .nav-module-placeholder,
  .app-shell.is-sidebar-collapsed .nav-module-placeholder {
    display: none;
  }

  .nav-button.is-step-complete::after,
  .app-shell.is-sidebar-collapsed .nav-button.is-step-complete::after {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    font-size: 0.66rem;
  }

  .sidebar-language-button,
  .app-shell.is-sidebar-collapsed .sidebar-language-button {
    display: inline-flex;
    position: absolute;
    top: 8px;
    right: 14px;
    z-index: 3;
    width: auto;
    min-width: 82px;
    min-height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    font-size: 0.58rem;
    box-shadow: 0 8px 18px rgba(33, 55, 84, 0.12);
  }

  .session-area,
  .app-shell.is-sidebar-collapsed .session-area {
    display: block;
    position: absolute;
    top: 39px;
    right: 14px;
    z-index: 3;
    margin: 0;
  }

  .session-box,
  .app-shell.is-sidebar-collapsed .session-box {
    display: block;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .session-box > span,
  .session-box > strong,
  .app-version-note {
    display: none;
  }

  .session-box .text-button {
    min-width: 82px;
    min-height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--kokoro-vivid-crimson);
    padding: 5px 10px;
    font-size: 0.58rem;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  .session-box .text-button:hover,
  .session-box .text-button:focus-visible {
    background: rgba(240, 115, 136, 0.24);
    color: #d93e61;
  }

  .app-shell.is-sidebar-collapsed .nav-module-toggle[data-nav-tooltip]::before,
  .app-shell.is-sidebar-collapsed .nav-button[data-nav-tooltip]::before,
  .app-shell.is-sidebar-collapsed .sidebar-language-button[data-nav-tooltip]::before {
    display: none;
  }

  .workspace {
    width: 100%;
    min-width: 0;
    padding: 14px;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .topbar-safety-card {
    width: 100%;
    border-radius: 18px;
    padding: 9px 12px;
    white-space: normal;
  }

  .topbar-safety-card span {
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .workspace-location-chip,
  .workspace-title-row h2 {
    display: none;
  }

  .view {
    min-width: 0;
  }

  .panel,
  .action-bar,
  .home-review-card,
  .journey-step,
  .home-loneliness-handoff,
  .about-hero,
  .about-model-section,
  .about-safety-card,
  .decision-output-card,
  .report-safety-note,
  .report-probability-card,
  .report-phq-history-card,
  .report-accordion,
  .phq-check-panel,
  .phq-score-card {
    border-radius: 20px;
  }

  .panel,
  .panel.panel-wide,
  .action-bar {
    padding: 16px;
  }

  .panel-heading h3,
  .about-hero h2,
  .home-review-copy h3,
  .home-review-copy h4,
  .report-safety-note h3 {
    font-size: clamp(1.25rem, 7vw, 1.8rem);
    line-height: 1.12;
  }

  .home-review-card {
    align-items: start;
  }

  .home-review-mascot {
    justify-self: start;
  }

  .journey-step {
    min-height: 0;
    padding: 18px;
  }

  .journey-step strong {
    font-size: 1.12rem;
  }

  .journey-step em {
    font-size: 0.86rem;
  }

  .home-sidequest {
    font-size: 0.88rem;
  }

  .assessment-progress {
    position: sticky;
    top: 102px;
    z-index: 30;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: none;
  }

  .assessment-progress::-webkit-scrollbar {
    display: none;
  }

  .assessment-step-tab {
    flex: 0 0 180px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .assessment-step-tab strong {
    font-size: 0.86rem;
  }

  .assessment-step-tab span {
    font-size: 0.76rem;
  }

  .form-grid,
  .form-grid.four-col,
  #queryView .profile-grid,
  .phq-history-layout,
  .phq-timeline,
  .derived-list,
  .slider-list,
  .phq-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px;
  }

  .timeline-arrow,
  .report-phq-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .phq-card,
  .phq-performance-note {
    width: 100%;
  }

  .slider-card {
    padding: 16px;
  }

  .slider-field input[type="range"],
  .future-slider-cell input[type="range"] {
    min-height: 38px;
  }

  .slider-ticks {
    gap: 8px;
    font-size: 0.72rem;
  }

  .scale-legend-grid {
    grid-template-columns: 1fr;
  }

  .treatment-layout,
  .treatment-scenario-grid,
  .treatment-card-metrics,
  .report-summary-grid,
  .report-probability-comparison,
  .report-probability-main,
  .report-probability-metric,
  .report-phq-flow,
  .about-card-grid-three,
  .about-card-grid-four,
  .about-flow,
  .about-pill-grid,
  .about-methodology-stages,
  .about-methodology-panels,
  .about-stat-grid,
  .about-ack-grid,
  .about-team-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .treatment-summary-pane {
    position: static;
    order: 2;
  }

  .treatment-feature-section {
    padding: 10px;
  }

  .treatment-section-toggle {
    min-height: 54px;
    padding: 12px;
  }

  .treatment-feature-card {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 16px 12px;
  }

  .treatment-card-main,
  .treatment-card-header,
  .treatment-card-metrics,
  .treatment-card-target,
  .treatment-card-actions,
  .treatment-feature-card > .triggered-condition {
    grid-column: 1;
    grid-row: auto;
  }

  .treatment-card-main {
    display: grid;
    gap: 10px;
  }

  .treatment-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .treatment-card-actions .treatment-metric {
    min-width: 0;
  }

  .contribution-pill,
  .delta-pill {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .treatment-report-action-card {
    display: block;
  }

  .treatment-report-action-card .button-row {
    margin-left: 0;
    justify-content: stretch;
  }

  .treatment-report-action-card .primary-button,
  .treatment-report-action-card .secondary-button {
    width: 100%;
  }

  .decision-output-header,
  .decision-output-main,
  .decision-scenario-metrics,
  .report-probability-main,
  .report-probability-metric {
    padding: 18px;
  }

  .decision-probability-gauge,
  .report-probability-gauge {
    width: 112px;
  }

  .summary-caution-row {
    align-items: start;
    gap: 8px;
  }

  .report-accordion-button {
    gap: 10px;
  }

  .report-accordion-button strong {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .report-accordion-body,
  #reportView .session-report-panel,
  #reportView .report-phq-history-card,
  #reportView .report-probability-main,
  #reportView .report-probability-metric,
  #reportView .report-probability-result,
  #reportView .report-threshold-note {
    padding: 16px;
  }

  .full-calculation-table {
    margin-inline: -4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .full-calculation-row {
    min-width: 720px;
  }

  #reportView .full-calculation-row {
    min-width: 680px;
  }

  .about-methodology-graphic {
    padding: 14px;
  }

  .about-methodology-stages span {
    min-height: 48px;
  }

  .about-methodology-tags span {
    flex-basis: 100%;
  }

  .banner-preview,
  .phq-check-guide {
    z-index: 50;
  }

  .banner-preview-card,
  .banner-thought-bubble,
  .phq-check-thought-bubble {
    max-width: calc(100vw - 28px);
  }

  .button-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .primary-button,
  .secondary-button,
  .text-button {
    min-height: 46px;
  }
}

@media (max-width: 420px) {
  .workspace {
    padding: 10px;
  }

  .sidebar,
  .app-shell.is-sidebar-collapsed .sidebar {
    padding-inline: 8px;
  }

  .nav-list > .nav-button,
  .nav-module-toggle,
  .nav-module-panel .nav-button,
  .app-shell.is-sidebar-collapsed .nav-module-toggle,
  .app-shell.is-sidebar-collapsed .nav-button {
    flex-basis: 82px;
    width: 82px;
  }

  .nav-button-main span:last-child,
  .app-shell.is-sidebar-collapsed .nav-button-main > span:not(.nav-icon-wrap) {
    font-size: 0.56rem;
  }

  .panel,
  .panel.panel-wide,
  .action-bar {
    padding: 14px;
  }

  .treatment-card-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .auth-logo-row {
    gap: 8px;
  }

  .auth-logo-mark-tile {
    width: 64px;
    height: 64px;
    border-radius: 18px;
  }

  .auth-logo-mark {
    width: 58px;
    height: 58px;
  }

  .auth-wordmark {
    width: min(190px, 54vw);
    height: 42px;
  }

  .slider-help-button {
    width: 26px;
    height: 26px;
    font-size: 0.82rem;
  }
}
