@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-variable.260c81a4759b.woff2") format("woff2");
}

:root {
  --ink: #261f2b;
  --muted: #675f6b;
  --paper: #f7f4f8;
  --paper-warm: #fcfafc;
  --panel: #ffffff;
  --line: #ded8e1;
  --line-strong: #94859f;
  --primary: #705d99;
  --primary-strong: #594575;
  --primary-deep: #352a44;
  --primary-deepest: #261d31;
  --primary-soft: #eee9f4;
  --primary-soft-strong: #ddd3e7;
  --primary-wash: #f7f4f8;
  --teal: #14756d;
  --teal-strong: #0f5f58;
  --teal-soft: #d8ebe6;
  --moss: #667d45;
  --moss-soft: #e3ead7;
  --coral: #c75f4a;
  --coral-soft: #f5ddd6;
  --gold: #d8a53a;
  --gold-soft: #f3e8bd;
  --violet: #4e659b;
  --violet-soft: #e1e7f2;
  --sky: #3d7f9c;
  --sky-soft: #dbeaf0;
  --danger: #9f3526;
  --success: #2f7a45;
  --shadow: 0 18px 48px rgba(38, 31, 43, 0.12);
  --shadow-soft: 0 10px 28px rgba(38, 31, 43, 0.08);
  --radius: 8px;
  --page-pad: clamp(20px, 5vw, 72px);
  --section-pad: clamp(34px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(53, 42, 68, 0.035) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(180deg, #faf8f4 0%, var(--paper) 36%, #f2edf5 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

p,
li {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  color: var(--ink);
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h3 {
  margin: 14px 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px var(--page-pad);
  background: rgba(251, 250, 244, 0.9);
  border-bottom: 1px solid rgba(22, 33, 31, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  box-shadow: 0 8px 18px rgba(63, 43, 84, 0.24);
}

.site-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a,
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 33, 31, 0.09);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.site-nav a:hover,
.link-button:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

.messages {
  padding: 16px var(--page-pad) 0;
}

.message {
  max-width: 1120px;
  margin: 0 auto 10px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--sky);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.message.error {
  border-left-color: var(--danger);
  background: #fff3f0;
}

.message.success {
  border-left-color: var(--success);
  background: #eff9f0;
}

.message.warning {
  border-left-color: var(--gold);
  background: #fff9df;
}

.eyebrow,
.chip {
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(112, 93, 153, 0.2);
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.status-chip {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: none;
}

.chip.coral,
.status-chip.coral {
  background: var(--coral-soft);
  border-color: rgba(199, 95, 74, 0.22);
  color: #8c382b;
}

.chip.gold,
.status-chip.gold {
  background: var(--gold-soft);
  border-color: rgba(216, 165, 58, 0.26);
  color: #755514;
}

.chip.violet,
.status-chip.violet {
  background: var(--violet-soft);
  border-color: rgba(78, 101, 155, 0.24);
  color: #354d80;
}

.chip.teal,
.status-chip.teal,
.chip.success,
.status-chip.success {
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-color: rgba(20, 117, 109, 0.24);
}

.muted,
.feature-card p,
.dashboard-card p,
.row-card p {
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button.primary {
  color: white;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.button.primary:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.button.danger {
  color: #842d22;
  background: #fff4f1;
  border-color: #c96252;
}

.button.danger:hover {
  color: #fff;
  background: #983729;
  border-color: #983729;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.74);
}

.button.soft {
  color: var(--primary-strong);
  border-color: var(--primary-soft-strong);
  background: var(--primary-soft);
}

.button.full {
  width: 100%;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  padding: clamp(36px, 6vw, 80px) var(--page-pad);
  overflow: hidden;
}

.landing-hero {
  display: grid;
  align-items: end;
  min-height: calc(100vh - 72px);
  color: white;
  isolation: isolate;
}

.landing-hero .hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 0;
  box-shadow: none;
}

.landing-hero .hero-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(12, 20, 19, 0.78) 0%, rgba(12, 20, 19, 0.48) 48%, rgba(12, 20, 19, 0.12) 100%),
    linear-gradient(0deg, rgba(12, 20, 19, 0.54), transparent 44%);
}

.landing-hero .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-copy {
  max-width: 780px;
  padding-bottom: clamp(26px, 5vw, 70px);
}

.landing-hero h1,
.landing-hero .eyebrow,
.landing-hero .hero-text {
  color: white;
}

.hero-text {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  width: min(100%, 900px);
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-ribbon span {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.hero-ribbon strong {
  font-size: 0.95rem;
}

.hero-ribbon small {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
}

.dashboard-hero {
  position: relative;
  padding: var(--section-pad) var(--page-pad);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(112, 93, 153, 0.11) 0 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(135deg, #eee9f4 0%, #faf7ed 52%, #e3f1ed 100%);
  border-bottom: 1px solid rgba(22, 33, 31, 0.08);
}

.dashboard-hero.compact {
  padding-block: clamp(28px, 4vw, 54px);
}

.dashboard-hero h1 {
  max-width: 980px;
  font-size: clamp(2.25rem, 6vw, 5.2rem);
}

.dashboard-hero > p:last-of-type {
  max-width: 760px;
  color: #43524f;
  font-size: 1.16rem;
  line-height: 1.55;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.42fr);
  gap: clamp(18px, 4vw, 48px);
  align-items: end;
}

.hero-aside {
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(22, 33, 31, 0.09);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.hero-aside p {
  margin: 0;
}

.hero-aside strong {
  display: block;
  margin-top: 8px;
  font-size: 1.35rem;
}

.section,
.feature-grid,
.dashboard-grid,
.action-panel,
.workspace-grid {
  padding: var(--section-pad) var(--page-pad);
}

.section.alt {
  background: rgba(255, 255, 255, 0.42);
  border-block: 1px solid rgba(22, 33, 31, 0.06);
}

.intro,
.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(280px, 1.18fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
}

.intro p,
.split p {
  margin: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-head p {
  margin: 0;
}

.feature-grid,
.dashboard-grid,
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

.feature-card,
.feature-grid article,
.dashboard-card,
.auth-panel,
.action-panel,
.panel-form,
.row-card,
.empty-state,
.mini-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.feature-card,
.feature-grid article,
.dashboard-card,
.mini-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
}

.feature-card::before,
.feature-grid article::before,
.dashboard-card::before,
.mini-card::before {
  display: block;
  width: 42px;
  height: 5px;
  margin-bottom: 18px;
  background: var(--primary);
  border-radius: 999px;
  content: "";
}

.feature-grid article:nth-child(2n)::before,
.dashboard-card:nth-child(2n)::before,
.mini-card:nth-child(2n)::before {
  background: var(--coral);
}

.feature-grid article:nth-child(3n)::before,
.dashboard-card:nth-child(3n)::before,
.mini-card:nth-child(3n)::before {
  background: var(--gold);
}

.feature-grid article:nth-child(4n)::before,
.dashboard-card:nth-child(4n)::before,
.mini-card:nth-child(4n)::before {
  background: var(--violet);
}

.dashboard-card {
  min-height: 230px;
}

.dashboard-card h2,
.feature-grid h3,
.mini-card h3 {
  margin-top: 0;
}

.card-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  color: var(--ink);
  background: var(--gold-soft);
  border-radius: var(--radius);
  font-weight: 950;
}

.dashboard-card a,
.clean-list a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.clean-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clean-list li {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.action-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(260px, 1.25fr);
  gap: 24px;
  margin: 0 var(--page-pad) var(--section-pad);
  padding: 24px;
}

.action-panel ul,
.step-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.action-panel li,
.step-list li {
  position: relative;
  min-height: 46px;
  padding: 11px 14px 11px 44px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.45;
}

.action-panel li::before,
.step-list li::before {
  position: absolute;
  top: 12px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: white;
  background: var(--primary);
  border-radius: 999px;
  content: "";
}

.table-list {
  display: grid;
  gap: 14px;
}

.row-card {
  display: grid;
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(250px, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.row-card h2 {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.2;
}

.row-card p:first-child {
  margin-top: 0;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.empty-state {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 22px;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: var(--gold-soft);
  border-radius: var(--radius);
  font-weight: 950;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 72px);
  padding: 34px 20px;
}

.auth-shell.story {
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(22px, 5vw, 60px);
  align-items: stretch;
  padding: var(--section-pad) var(--page-pad);
}

.auth-story {
  display: grid;
  align-content: end;
  min-height: 520px;
  padding: 28px;
  color: white;
  background:
    linear-gradient(0deg, rgba(18, 29, 27, 0.74), rgba(18, 29, 27, 0.24)),
    url("/static/img/autisync-hero-1600.a84c2c812753.webp") center / cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.auth-story h1,
.auth-story h2,
.auth-story .auth-story-title,
.auth-story .eyebrow,
.auth-story p {
  color: white;
}

.auth-story h2,
.auth-story .auth-story-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1;
}

.auth-story p {
  max-width: 520px;
  font-size: 1.08rem;
  line-height: 1.55;
}

.auth-panel {
  width: min(100%, 460px);
  padding: 30px;
}

.auth-panel.wide {
  width: min(100%, 680px);
}

.auth-panel h1 {
  font-size: clamp(2rem, 7vw, 3.35rem);
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 24px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fcfdf9;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.auth-form textarea {
  min-height: 110px;
  resize: vertical;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 93, 153, 0.16);
  outline: 0;
}

.panel-form {
  padding: 22px;
}

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

.permission-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
}

.permission-list input {
  width: 18px;
  min-height: 18px;
}

.compact-list ul {
  display: grid;
  gap: 8px;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.compact-list li label {
  align-items: flex-start;
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-switch a {
  color: var(--primary-strong);
  font-weight: 900;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.errorlist {
  margin: 0;
  padding-left: 20px;
  color: var(--danger);
  line-height: 1.5;
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: var(--section-pad) var(--page-pad);
  background: #edf3ec;
}

.profile-summary article {
  min-height: 190px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 14px;
}

.timeline-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 17px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  padding-left: 54px;
}

.timeline-card::before {
  position: absolute;
  top: 18px;
  left: 8px;
  width: 20px;
  height: 20px;
  background: var(--coral);
  border: 4px solid var(--paper);
  border-radius: 999px;
  content: "";
}

.review-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.2fr) auto auto;
  gap: 10px;
}

.review-form input,
.review-form select {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 1080px) {
  .feature-grid,
  .dashboard-grid,
  .workspace-grid,
  .workspace-grid.three,
  .profile-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .intro,
  .split,
  .action-panel,
  .hero-panel,
  .auth-shell.story {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 360px;
  }

  .row-card,
  .review-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Authenticated workspace shell
   -------------------------------------------------------------------------- */

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
  padding: 11px 15px;
  color: #fff;
  background: var(--primary-deep);
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 3px var(--primary-deep);
  font-weight: 850;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

html:not(.js) [data-command-open],
html:not(.js) [data-calm-toggle] {
  display: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px #fff;
}

.app-body {
  --page-pad: clamp(18px, 3vw, 46px);
  --section-pad: clamp(28px, 4vw, 52px);
  background: var(--primary-wash);
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: 252px;
  height: 100vh;
  height: 100dvh;
  padding: 18px 14px 14px;
  overflow: auto;
  color: #f9f6fb;
  background:
    radial-gradient(circle at 12% 10%, rgba(112, 93, 153, 0.24), transparent 27%),
    radial-gradient(circle at 88% 88%, rgba(20, 117, 109, 0.16), transparent 32%),
    linear-gradient(180deg, var(--primary-deep) 0%, var(--primary-deepest) 100%);
  border-right: 1px solid rgba(38, 29, 49, 0.32);
}

.sidebar-brand-row,
.app-brand,
.workspace-identity,
.workspace-nav a,
.sidebar-tool,
.topbar-start,
.topbar-actions,
.command-button,
.privacy-indicator,
.quick-search,
.quick-results a,
.quick-dialog-foot {
  display: flex;
  align-items: center;
}

.sidebar-brand-row {
  justify-content: space-between;
  gap: 10px;
  padding: 0 5px 16px;
}

.app-brand {
  min-width: 0;
  color: #fff;
}

.app-brand > span:last-child {
  display: grid;
  min-width: 0;
}

.app-brand strong {
  color: #fff;
  font-size: 1.02rem;
}

.app-brand small {
  color: rgba(249, 246, 251, 0.72);
  font-size: 0.73rem;
  font-weight: 700;
}

.app-sidebar .brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--primary-deep);
  background: linear-gradient(145deg, #f5f0f8, var(--primary-soft-strong));
  box-shadow: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.icon-button svg,
.workspace-nav svg,
.sidebar-tool svg,
.command-button svg,
.privacy-indicator svg,
.quick-search svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-close {
  display: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.workspace-identity {
  gap: 10px;
  min-height: 66px;
  margin: 2px 4px 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}

.workspace-identity > span:nth-child(2) {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.workspace-identity strong,
.workspace-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-identity strong {
  color: #fff;
  font-size: 0.84rem;
}

.workspace-identity small {
  color: rgba(249, 246, 251, 0.72);
  font-size: 0.72rem;
}

.identity-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--primary-deepest);
  background: #f0d594;
  border-radius: 12px;
  font-weight: 950;
}

.workspace-nav {
  display: grid;
  gap: 4px;
}

.nav-label {
  margin: 14px 12px 5px;
  color: rgba(249, 246, 251, 0.68);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.workspace-nav a,
.sidebar-tool {
  gap: 11px;
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  color: rgba(249, 246, 251, 0.82);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 760;
  text-align: left;
  text-decoration: none;
}

.workspace-nav a:hover,
.sidebar-tool:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.workspace-nav a[aria-current="page"] {
  color: var(--primary-deepest);
  background: var(--primary-soft);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 22px rgba(24, 15, 31, 0.28);
}

.workspace-nav a > span:not(.nav-count),
.sidebar-tool span {
  min-width: 0;
  flex: 1;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  color: var(--primary-deepest);
  background: #f0d594;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
}

.sidebar-footer {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer form {
  margin: 0;
}

.app-frame {
  min-width: 0;
  background: var(--primary-wash);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 10px var(--page-pad);
  background: rgba(247, 244, 248, 0.92);
  border-bottom: 1px solid rgba(53, 42, 68, 0.1);
  backdrop-filter: blur(16px);
}

.topbar-start,
.topbar-actions {
  gap: 12px;
  min-width: 0;
}

.topbar-context {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.topbar-context span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-context strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.command-button {
  gap: 9px;
  min-height: 44px;
  padding: 0 10px 0 13px;
  color: #42504d;
  background: #fff;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.command-button kbd,
.quick-dialog-foot kbd {
  min-width: 24px;
  padding: 3px 6px;
  color: #5b6764;
  background: #f1f3ef;
  border: 1px solid #d6ddd8;
  border-bottom-width: 2px;
  border-radius: 6px;
  font: 700 0.68rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

.privacy-indicator {
  gap: 6px;
  min-height: 40px;
  padding: 0 10px;
  color: #286659;
  background: #e5f2eb;
  border: 1px solid #c8e3d6;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
}

.privacy-indicator svg {
  width: 16px;
  height: 16px;
}

.app-main {
  min-width: 0;
  min-height: calc(100vh - 68px);
  background:
    radial-gradient(circle at 85% 0%, rgba(112, 93, 153, 0.1), transparent 25rem),
    radial-gradient(circle at 8% 38%, rgba(20, 117, 109, 0.055), transparent 22rem),
    var(--primary-wash);
}

.app-main:focus {
  outline: none;
}

.app-body .messages {
  padding-inline: var(--page-pad);
}

.app-body .message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
  border-radius: 13px;
}

.message [data-dismiss-message] {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.4rem;
}

.app-body .dashboard-hero {
  margin: 24px var(--page-pad) 0;
  padding: clamp(25px, 4vw, 44px);
  background:
    radial-gradient(circle at 90% 5%, rgba(20, 117, 109, 0.13), transparent 19rem),
    linear-gradient(135deg, #ece6f2 0%, #faf7ed 58%, #e3f1ed 100%);
  border: 1px solid rgba(112, 93, 153, 0.17);
  border-radius: 24px;
  box-shadow: 0 12px 38px rgba(63, 43, 84, 0.08);
}

.app-body .dashboard-hero h1 {
  max-width: 780px;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.app-body .hero-aside,
.app-body .feature-card,
.app-body .feature-grid article,
.app-body .dashboard-card,
.app-body .auth-panel,
.app-body .action-panel,
.app-body .panel-form,
.app-body .row-card,
.app-body .empty-state,
.app-body .mini-card,
.app-body .visual-panel,
.app-body .metric-tile,
.app-body .client-signal-card,
.app-body .plan-panel,
.app-body .document-card {
  border-radius: 17px;
}

.app-body .button,
.app-body input,
.app-body select,
.app-body textarea {
  border-radius: 11px;
}

.app-body .button {
  min-height: 44px;
}

.app-body .site-nav a,
.app-body .link-button {
  min-height: 44px;
}

.nav-scrim {
  display: none;
}

.quick-navigator {
  width: min(660px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 36px));
  padding: 0;
  color: var(--ink);
  background: #fbfcf9;
  border: 1px solid #d7dfda;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(46, 31, 59, 0.3);
}

.quick-navigator::backdrop {
  background: rgba(38, 29, 49, 0.5);
  backdrop-filter: blur(4px);
}

.quick-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 12px;
}

.quick-dialog-head h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
}

.quick-dialog-head .eyebrow {
  margin-bottom: 6px;
}

.quick-dialog-head form {
  margin: 0;
}

.quick-search {
  gap: 10px;
  margin: 8px 22px 14px;
  padding: 0 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid #c9d4ce;
  border-radius: 13px;
}

.quick-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 93, 153, 0.16);
}

.quick-search input {
  width: 100%;
  min-height: 48px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.quick-results {
  display: grid;
  max-height: 430px;
  padding: 0 14px 12px;
  overflow: auto;
}

.quick-group-label {
  margin: 12px 9px 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-results a {
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 9px 11px;
  color: var(--ink);
  border-radius: 11px;
  text-decoration: none;
}

.quick-results a:hover,
.quick-results a:focus-visible {
  background: var(--primary-soft);
}

.quick-results a span {
  font-weight: 850;
}

.quick-results a small {
  color: var(--muted);
  text-align: right;
}

.quick-empty {
  margin: 12px 22px 22px;
  padding: 17px;
  color: var(--muted);
  background: #f3f3ee;
  border-radius: 12px;
}

.quick-dialog-foot {
  justify-content: flex-end;
  gap: 16px;
  padding: 11px 22px;
  color: var(--muted);
  background: var(--primary-wash);
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
}

.quick-dialog-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 var(--page-pad) 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.collection-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: min(100%, 300px);
  flex: 1;
}

.collection-search svg {
  position: absolute;
  left: 12px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.collection-search input {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px 9px 41px;
  color: var(--ink);
  background: #fafbf8;
  border: 1px solid var(--line-strong);
}

.filter-pills,
.view-switcher {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pills button,
.view-switcher button {
  min-height: 40px;
  padding: 7px 12px;
  color: var(--muted);
  background: #faf8fb;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
}

.filter-pills button[aria-pressed="true"],
.view-switcher button[aria-pressed="true"] {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.filter-empty {
  margin: 0 var(--page-pad) var(--section-pad);
}

.profile-section-nav {
  position: sticky;
  top: 68px;
  z-index: 30;
  display: flex;
  gap: 6px;
  margin: 18px var(--page-pad) 0;
  padding: 7px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(24, 52, 47, 0.08);
  backdrop-filter: blur(14px);
  scrollbar-width: thin;
}

.profile-section-nav a {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 820;
  text-decoration: none;
  white-space: nowrap;
}

.profile-section-nav a:hover,
.profile-section-nav a[aria-current="location"] {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.app-body section[id] {
  scroll-margin-top: 132px;
}

.quiet-mode .app-main,
.quiet-mode .app-frame,
.quiet-mode .app-body,
.quiet-mode .dashboard-hero,
.quiet-mode .story-band,
.quiet-mode .dashboard-hero {
  background-image: none !important;
}

.quiet-mode .app-body :where(.dashboard-hero, .metric-tile, .visual-panel, .client-signal-card, .hero-aside, .row-card, .panel-form, .dashboard-card, .document-card, .plan-panel, .collection-toolbar) {
  box-shadow: none !important;
}

.quiet-mode .app-body :where(*, *::before, *::after) {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Practitioner record editing and structured patient intake */
.record-editor-shell {
  display: grid;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
}

.record-editor-intro,
.record-editor-section,
.record-editor-actions {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.record-editor-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
}

.record-editor-intro h1 {
  margin: 4px 0 8px;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.record-editor-intro p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.record-editor-form {
  display: grid;
  gap: 18px;
}

.record-editor-section {
  min-width: 0;
  margin: 0;
  padding: 24px;
}

.record-editor-section legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
}

.record-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.record-editor-grid > label {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.record-editor-grid input:not([type="checkbox"]),
.record-editor-grid textarea,
.record-editor-grid select {
  width: 100%;
}

.record-editor-grid .span-two {
  grid-column: 1 / -1;
}

.record-status-toggle .check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 13px;
  background: var(--primary-soft);
  border: 1px solid rgba(20, 117, 109, 0.22);
  border-radius: 12px;
}

.record-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 22px;
}

@media (max-width: 760px) {
  .record-editor-intro {
    display: grid;
  }

  .record-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-editor-grid .span-two {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .record-editor-intro,
  .record-editor-section {
    padding: 18px;
  }

  .record-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .record-editor-actions .button {
    width: 100%;
  }
}

.patient-import-workspace {
  display: grid;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
}

.patient-import-workspace svg,
.clinical-record-workspace svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.import-hero,
.import-review-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 10%, rgba(255, 255, 255, 0.17), transparent 24%),
    linear-gradient(135deg, #123f4d, #176b69 58%, #3c777f);
  border-radius: 25px;
  box-shadow: 0 22px 46px rgba(20, 63, 71, 0.22);
}

.import-hero .eyebrow,
.import-review-hero .eyebrow {
  color: #b8f2e8;
}

.import-hero h1,
.import-review-hero h1 {
  max-width: 760px;
  margin: 5px 0 8px;
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: 1.08;
}

.import-hero p:last-child,
.import-review-hero p:last-child {
  max-width: 740px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.import-hero .button,
.import-review-hero .button {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.import-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.import-stepper li {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
}

.import-stepper li:not(:last-child)::after {
  position: absolute;
  top: 20%;
  right: 0;
  width: 1px;
  height: 60%;
  background: var(--line);
  content: "";
}

.import-stepper li > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: #edf2f2;
  border-radius: 50%;
  font-weight: 900;
}

.import-stepper strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.import-stepper small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.import-stepper .is-current {
  background: linear-gradient(135deg, var(--primary-soft), rgba(224, 243, 240, 0.32));
}

.import-stepper .is-current > span,
.import-stepper .is-complete > span {
  color: #fff;
  background: var(--primary);
}

.import-stepper .is-complete > span::after {
  content: "✓";
}

.import-stepper .is-complete > span {
  color: transparent;
  font-size: 0;
}

.import-stepper .is-complete > span::after {
  color: #fff;
  font-size: 0.9rem;
}

.import-start-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(290px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.import-upload-card,
.import-format-card,
.import-history,
.import-row-section,
.import-complete-banner,
.clinical-record-workspace {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.import-upload-card,
.import-format-card,
.import-history,
.import-row-section {
  padding: 24px;
}

.import-upload-card > header,
.import-format-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.import-upload-card h2,
.import-format-card h2,
.import-history h2,
.import-row-section h2,
.clinical-record-heading h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1.45rem;
}

.import-lock-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.import-upload-form {
  display: grid;
  gap: 18px;
}

.import-file-drop {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  color: var(--ink);
  background: linear-gradient(135deg, #f7fbfa, #f2f7f8);
  border: 1.5px dashed #92bbb7;
  border-radius: 16px;
  cursor: pointer;
}

.import-file-drop > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.import-file-drop small,
.import-form-grid small,
.import-submit-row small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.import-file-drop input[type="file"] {
  grid-column: 1 / -1;
  width: 100%;
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.import-file-drop input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  padding: 7px 12px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border: 0;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.import-file-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 14px;
}

.import-file-icon svg {
  width: 25px;
}

.import-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.import-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.import-form-grid input,
.import-form-grid select,
.import-decision select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.import-form-grid input:focus,
.import-form-grid select:focus,
.import-decision select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(112, 93, 153, 0.16);
  outline-offset: 1px;
}

.import-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.import-submit-row > span {
  display: grid;
  gap: 2px;
}

.import-format-list {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.import-format-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  padding: 13px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.import-format-list article > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 950;
}

.import-format-list article > div {
  display: grid;
  gap: 3px;
}

.import-format-list small,
.import-safety-note p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.import-safety-note {
  margin-top: 15px;
  padding: 14px;
  color: #574513;
  background: #fff8df;
  border: 1px solid #eadba8;
  border-radius: 13px;
}

.import-safety-note p {
  margin: 5px 0 0;
  color: #756329;
}

.import-template-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 15px;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.import-history-list,
.import-row-list {
  display: grid;
  gap: 10px;
  margin-top: 17px;
}

.import-history-list > a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 56px 20px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  color: inherit;
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
}

.import-history-list > a > span:nth-child(2),
.import-history-count {
  display: grid;
  gap: 2px;
}

.import-history-list small,
.import-history-count small {
  color: var(--muted);
  font-size: 0.72rem;
}

.import-history-list svg {
  width: 18px;
  color: var(--muted);
}

.import-history-format {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 950;
}

.import-history-count {
  text-align: center;
}

.import-status,
.import-action,
.verification-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.import-status.status-staged,
.import-action.action-conflict,
.verification-pill.status-imported_unverified {
  color: #745615;
  background: #fff2c8;
}

.import-status.status-committed,
.import-action.action-link,
.verification-pill.status-confirmed {
  color: #17635c;
  background: #dff3ef;
}

.import-action.action-create {
  color: #315b86;
  background: #e3effa;
}

.import-status.status-failed,
.import-status.status-canceled,
.import-status.status-expired,
.import-action.action-error,
.verification-pill.status-entered_in_error {
  color: #873f38;
  background: #f9e4e1;
}

.import-action.action-skip {
  color: #5e6872;
  background: #edf0f2;
}

.import-empty-history {
  display: grid;
  gap: 3px;
  padding: 22px;
  color: var(--ink);
  background: #fafcfc;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

.import-empty-history small {
  color: var(--muted);
}

.import-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
}

.import-review-hero .import-status {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.27);
}

.import-review-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

.import-review-summary > div {
  display: grid;
  gap: 2px;
  padding: 17px 16px;
  text-align: center;
}

.import-review-summary > div:not(:last-child) {
  border-right: 1px solid var(--line);
}

.import-review-summary strong {
  color: var(--ink);
  font-size: 1.45rem;
}

.import-review-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.import-state-message {
  padding: 13px 15px;
  color: #6e423b;
  background: #fff0ed;
  border: 1px solid #ecc9c3;
  border-radius: 12px;
  font-weight: 750;
}

.import-complete-banner {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  padding: 22px 24px;
  background: linear-gradient(135deg, #effaf7, #f8fcfb);
  border-color: #badfd7;
}

.import-complete-banner > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}

.import-complete-banner svg {
  width: 28px;
}

.import-complete-banner h2 {
  margin: 3px 0 4px;
  color: var(--ink);
  font-size: 1.25rem;
}

.import-complete-banner p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.import-commit-form {
  display: grid;
  gap: 17px;
}

.import-row-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #82a6aa;
  border-radius: 15px;
}

.import-row-card.action-create {
  border-left-color: #5c8eb9;
}

.import-row-card.action-link {
  border-left-color: var(--primary);
}

.import-row-card.action-conflict {
  border-left-color: #d3a536;
}

.import-row-card.action-error {
  border-left-color: #c86558;
}

.import-row-card > header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #fafcfc;
  border-bottom: 1px solid var(--line);
}

.import-row-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: #edf2f2;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.import-row-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.import-row-card header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.import-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.32fr);
  gap: 14px 22px;
  padding: 16px;
}

.import-row-body dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 10px;
  margin: 0;
}

.import-row-body dl > div {
  min-width: 0;
  padding: 10px;
  background: #f7f9f9;
  border-radius: 10px;
}

.import-row-body dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.import-row-body dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.import-issues {
  display: grid;
  gap: 4px;
  grid-column: 1;
  margin: 0;
  padding: 11px 12px 11px 30px;
  border-radius: 10px;
  font-size: 0.76rem;
}

.import-issues.errors {
  color: #7d3c35;
  background: #fff0ed;
}

.import-issues.warnings {
  color: #705518;
  background: #fff8df;
}

.import-decision {
  display: grid;
  grid-column: 2;
  grid-row: 2 / span 2;
  gap: 6px;
  align-content: start;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.import-decision select {
  width: 100%;
}

.import-row-body > .button.compact {
  grid-column: 2;
  align-self: end;
}

.import-commit-bar {
  position: sticky;
  z-index: 8;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  background: rgba(242, 250, 248, 0.97);
  border: 1px solid #b8dcd5;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(30, 79, 74, 0.18);
  backdrop-filter: blur(12px);
}

.import-commit-bar > span {
  display: grid;
  gap: 2px;
}

.import-commit-bar small {
  color: var(--muted);
  font-size: 0.73rem;
}

.import-cancel-form {
  display: flex;
  justify-content: flex-end;
}

.clinical-record-workspace {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.clinical-record-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.clinical-record-heading p:last-child {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
}

.clinical-review-count {
  display: grid;
  min-width: 92px;
  padding: 10px 13px;
  color: #6e5314;
  background: #fff4d2;
  border-radius: 13px;
  text-align: center;
}

.clinical-review-count strong {
  font-size: 1.35rem;
}

.clinical-review-count small {
  font-size: 0.68rem;
  font-weight: 850;
}

.clinical-record-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.clinical-record-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #f5f8f8;
  border-bottom: 1px solid var(--line);
}

.clinical-record-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.clinical-record-group > header span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.clinical-record-list {
  display: grid;
}

.clinical-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 15px;
}

.clinical-record-card + .clinical-record-card {
  border-top: 1px solid var(--line);
}

.clinical-record-card.verification-entered_in_error {
  opacity: 0.7;
  background: #fafafa;
}

.clinical-record-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.clinical-kind-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 11px;
  font-size: 0.8rem;
  font-weight: 950;
}

.clinical-kind-icon.kind-allergy {
  color: #9a4c41;
  background: #fae9e6;
}

.clinical-kind-icon.kind-medication {
  color: #345f8b;
  background: #e8f1fa;
}

.clinical-record-main h4 {
  margin: 1px 0 3px;
  color: var(--ink);
  font-size: 0.94rem;
}

.clinical-record-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.clinical-record-main .clinical-record-note {
  margin-top: 7px;
  color: var(--ink-soft, #3d4a4a);
}

.clinical-record-main small {
  display: block;
  margin-top: 7px;
  color: #7b8587;
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.clinical-record-review {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: end;
}

.clinical-record-review form {
  display: flex;
  gap: 6px;
}

.clinical-record-review button {
  padding: 7px 9px;
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid #aed4ce;
  border-radius: 9px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.clinical-record-review button.mark-error {
  color: #8a473e;
  border-color: #dfb9b3;
}

.clinical-record-empty {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px;
  background: #f8fbfa;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.clinical-record-empty > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 12px;
}

.clinical-record-empty svg {
  width: 23px;
}

.clinical-record-empty > div {
  display: grid;
  gap: 3px;
}

.clinical-record-empty small {
  color: var(--muted);
}

.profile-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 3px;
  padding: 0 5px;
  color: #725513;
  background: #ffecb4;
  border-radius: 999px;
  font-size: 0.65rem;
}

@media (max-width: 1080px) {
  .import-start-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-format-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-items: start;
  }

  .import-format-card > header,
  .import-format-list {
    grid-column: 1 / -1;
  }

  .import-format-card > header {
    margin-bottom: 0;
  }

  .import-format-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }

  .import-safety-note,
  .import-template-link {
    margin-top: 0;
  }

  .import-template-link {
    align-self: center;
    justify-self: start;
  }

  .import-review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .import-review-summary > div:nth-child(3) {
    border-right: 0;
  }

  .import-review-summary > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .import-hero,
  .import-review-hero,
  .clinical-record-heading {
    display: grid;
  }

  .import-review-actions {
    justify-content: flex-start;
  }

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

  .import-stepper li:nth-child(2)::after {
    display: none;
  }

  .import-stepper li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .import-format-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-format-card > header,
  .import-format-list,
  .import-safety-note,
  .import-template-link {
    grid-column: 1;
  }

  .import-format-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-form-grid,
  .import-row-body,
  .clinical-record-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-row-body dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-decision,
  .import-row-body > .button.compact {
    grid-column: 1;
    grid-row: auto;
  }

  .clinical-record-review {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .import-hero,
  .import-review-hero,
  .import-upload-card,
  .import-format-card,
  .import-history,
  .import-row-section,
  .clinical-record-workspace {
    padding: 18px;
  }

  .import-submit-row,
  .import-commit-bar {
    display: grid;
  }

  .import-submit-row .button,
  .import-commit-bar .button {
    width: 100%;
  }

  .import-history-list > a {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
  }

  .import-history-list .import-status,
  .import-history-count {
    display: none;
  }

  .import-review-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-review-summary > div:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .import-review-summary > div:nth-child(2n) {
    border-right: 0;
  }

  .import-review-summary > div:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .import-row-card > header {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .import-row-card > header .import-action {
    grid-column: 2;
    justify-self: start;
  }

  .import-row-body dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .import-complete-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinical-record-review form {
    flex-wrap: wrap;
  }
}

/* Isolated demo, role switching, and disclosure navigation ---------------- */

.site-nav .site-nav-demo,
.button.demo-button {
  color: #fff;
  background: #6652a3;
  border-color: #6652a3;
  box-shadow: 0 9px 22px rgba(82, 56, 113, 0.2);
}

.site-nav .site-nav-demo:hover,
.button.demo-button:hover {
  color: #fff;
  background: #594575;
  border-color: #594575;
}

.workspace-nav-parent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.workspace-nav-parent-row .workspace-nav-parent {
  min-width: 0;
}

.workspace-nav-disclosure {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(249, 246, 251, 0.78);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
}

.workspace-nav-disclosure:hover,
.workspace-nav-disclosure:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.workspace-nav-disclosure .nav-parent-arrow {
  margin: 0;
  transform: none;
  transition: transform 160ms ease;
}

.workspace-nav-disclosure[aria-expanded="true"] .nav-parent-arrow {
  opacity: 1;
  transform: rotate(90deg);
}

.workspace-nav-subtree[hidden] {
  display: none !important;
}

.identity-demo-chip {
  flex: 0 0 auto;
  justify-self: end;
  padding: 4px 7px;
  color: #2d1e3b;
  background: #f0d594;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.privacy-indicator.is-demo {
  color: #513a69;
  background: linear-gradient(135deg, #f0e8f7, #dff1eb);
  border-color: #cbb9de;
}

.demo-workspace-banner {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin: 14px var(--page-pad) 0;
  padding: 10px 14px;
  color: #3e2c50;
  background:
    radial-gradient(circle at 5% 20%, rgba(255, 255, 255, 0.76), transparent 26%),
    linear-gradient(115deg, #eee5f6, #f8f5fa 50%, #dcefe8);
  border: 1px solid #cdbbdf;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(73, 50, 96, 0.09);
}

.demo-workspace-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--teal-strong));
  border-radius: 12px;
  font-weight: 950;
}

.demo-workspace-banner p {
  min-width: 0;
  margin: 0;
}

.demo-workspace-banner p > * {
  display: block;
}

.demo-workspace-banner p span {
  margin-top: 2px;
  color: #695d72;
  font-size: 0.75rem;
}

.demo-countdown {
  min-width: 92px;
  color: #5f4776;
  font-size: 0.73rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.demo-workspace-banner > a {
  min-height: 40px;
  padding: 10px 12px;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  font-size: 0.74rem;
  font-weight: 900;
  text-decoration: none;
}

.demo-entry-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
  gap: clamp(26px, 5vw, 72px);
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 90px) 0 80px;
}

.demo-entry-intro {
  align-self: start;
  padding-top: 24px;
}

.demo-entry-intro h1 {
  max-width: 720px;
  margin: 8px 0 18px;
  font-size: clamp(2.6rem, 5vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.demo-entry-lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.65;
}

.demo-safety-grid {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.demo-safety-grid article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 1px 12px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(112, 93, 153, 0.16);
  border-radius: 15px;
}

.demo-safety-grid article > span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 950;
}

.demo-safety-grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.demo-role-form {
  padding: clamp(22px, 4vw, 38px);
  background:
    radial-gradient(circle at 100% 0, rgba(213, 235, 226, 0.72), transparent 34%),
    rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(112, 93, 153, 0.17);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(53, 36, 72, 0.14);
}

.demo-role-form-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.demo-role-form-head h2 {
  max-width: 620px;
  margin: 5px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.demo-time-chip,
.role-current-chip {
  flex: 0 0 auto;
  padding: 8px 11px;
  color: #543d6c;
  background: #eee5f6;
  border: 1px solid #d0bee0;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 900;
}

.demo-notice {
  margin: 18px 0 0;
  padding: 12px 14px;
  color: #3c5d55;
  background: #e2f1eb;
  border-left: 4px solid var(--teal-strong);
  border-radius: 10px;
}

.demo-notice.is-error {
  color: #7a2f28;
  background: #fbe7e3;
  border-left-color: #bd4b3f;
}

.demo-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.demo-role-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-height: 88px;
  padding: 13px;
  background: #fbfafc;
  border: 1px solid #ddd4e5;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.demo-role-card:hover {
  transform: translateY(-2px);
  border-color: #b8a2cc;
  box-shadow: 0 10px 24px rgba(70, 48, 91, 0.09);
}

.demo-role-card:has(input:checked) {
  background: linear-gradient(135deg, #f1eaf7, #f9fbfa);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(112, 93, 153, 0.12);
}

.demo-role-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.demo-role-card:focus-within {
  outline: 3px solid rgba(112, 93, 153, 0.28);
  outline-offset: 2px;
}

.demo-role-icon,
.role-setting-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), #4b998d);
  border-radius: 13px;
  font-weight: 950;
}

.demo-role-card strong,
.demo-role-card small {
  display: block;
}

.demo-role-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.35;
}

.demo-role-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  color: transparent;
  border: 1px solid #c8bdcf;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 950;
}

.demo-role-card:has(input:checked) .demo-role-check {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.demo-human-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 14px;
  background: #f7f4f9;
  border: 1px solid #ded3e6;
  border-radius: 14px;
}

.demo-human-check p {
  margin: 0;
}

.demo-human-check p > * {
  display: block;
}

.demo-human-check p span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.demo-start-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #4d968a);
}

.demo-entry-footnote {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.auth-demo-option {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  text-align: center;
}

.auth-demo-option > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-demo-option small {
  color: var(--muted);
}

.role-settings-page {
  width: min(1120px, calc(100% - (2 * var(--page-pad))));
  margin: 0 auto;
  padding: clamp(36px, 6vw, 70px) 0 90px;
}

.role-settings-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 90% 10%, rgba(216, 237, 229, 0.86), transparent 30%),
    linear-gradient(135deg, #eee6f5, #fff 62%);
  border: 1px solid #d8cbe3;
  border-radius: 24px;
}

.role-settings-hero h1 {
  margin: 6px 0 10px;
  font-size: clamp(2rem, 4vw, 3.7rem);
}

.role-settings-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.role-settings-demo-note {
  margin-top: 18px;
  padding: 17px 19px;
  color: #425e57;
  background: #e3f1ec;
  border-left: 4px solid var(--teal-strong);
  border-radius: 13px;
}

.role-settings-demo-note p {
  margin: 4px 0 0;
}

.role-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.role-setting-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 86px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.role-setting-card.is-current {
  background: linear-gradient(135deg, #f0e9f7, #f7fbf9);
  border-color: #baa6cd;
}

.role-setting-card strong,
.role-setting-card small {
  display: block;
}

.role-setting-card small {
  margin-top: 3px;
  color: var(--muted);
}

.role-setting-card button,
.role-setting-status {
  min-height: 40px;
  padding: 9px 12px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
}

.role-setting-status {
  display: inline-grid;
  place-items: center;
  color: #3e5c54;
  background: #dceee7;
}

.role-settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.role-settings-actions form {
  margin: 0;
}

@media (max-width: 980px) {
  .demo-entry-shell {
    grid-template-columns: minmax(0, 1fr);
    width: min(760px, calc(100% - 32px));
    padding-top: 38px;
  }

  .demo-entry-intro,
  .demo-role-form {
    min-width: 0;
  }

  .demo-entry-intro {
    padding-top: 0;
  }

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

  .demo-safety-grid article {
    grid-template-columns: 1fr;
  }

  .demo-safety-grid article > span {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .demo-workspace-banner {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    margin: 10px 10px 0;
  }

  .demo-workspace-banner > a {
    display: none;
  }

  .demo-workspace-banner p span {
    display: none;
  }

  .demo-countdown {
    min-width: 74px;
    font-size: 0.66rem;
  }

  .demo-role-grid,
  .role-settings-grid {
    grid-template-columns: 1fr;
  }

  .demo-safety-grid {
    grid-template-columns: 1fr;
  }

  .demo-human-check {
    grid-template-columns: 1fr;
  }

  .role-settings-hero {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .site-nav a {
    justify-content: center;
    min-width: 0;
    padding-inline: 7px;
    text-align: center;
  }

  .demo-entry-shell {
    width: min(100% - 20px, 760px);
    padding-top: 24px;
  }

  .demo-role-form {
    padding: 17px;
    border-radius: 20px;
  }

  .demo-role-form-head {
    align-items: start;
    flex-direction: column;
  }

  .demo-role-card {
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    min-height: 82px;
    padding: 11px;
  }

  .demo-role-icon {
    width: 38px;
    height: 38px;
  }

  .role-setting-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .role-setting-card > form,
  .role-setting-status {
    grid-column: 1 / -1;
    width: 100%;
  }

  .role-setting-card button {
    width: 100%;
  }

  .role-settings-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .role-settings-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-nav-disclosure .nav-parent-arrow,
  .demo-role-card {
    transition: none;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .js .app-sidebar {
    position: fixed;
    left: 0;
    width: min(286px, calc(100vw - 54px));
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .js .nav-open .app-sidebar {
    transform: translateX(0);
  }

  .js .sidebar-close,
  .js .nav-toggle {
    display: inline-grid;
  }

  .js .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    padding: 0;
    visibility: hidden;
    background: rgba(38, 29, 49, 0.5);
    border: 0;
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
  }

  .js .nav-open .nav-scrim {
    visibility: visible;
    opacity: 1;
  }

  .nav-locked {
    overflow: hidden;
  }

  html:not(.js) .app-shell {
    display: block;
  }

  html:not(.js) .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  html:not(.js) .workspace-nav {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  html:not(.js) .nav-label {
    grid-column: 1 / -1;
  }

  html:not(.js) .sidebar-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-body {
    --page-pad: 14px;
    --section-pad: 30px;
  }

  .app-topbar {
    min-height: 62px;
    padding-block: 8px;
  }

  .topbar-context span,
  .command-button span,
  .command-button kbd,
  .privacy-indicator span {
    display: none;
  }

  .command-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    padding: 0;
  }

  .privacy-indicator {
    display: inline-grid;
    place-items: center;
    width: 42px;
    padding: 0;
  }

  .app-body .dashboard-hero {
    margin-top: 14px;
    padding: 23px 18px;
    border-radius: 18px;
  }

  .app-body .dashboard-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .collection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-search {
    min-width: 100%;
  }

  .filter-pills,
  .view-switcher {
    width: 100%;
  }

  .filter-pills button {
    flex: 1;
  }

  .profile-section-nav {
    top: 62px;
    margin-inline: 0;
    border-inline: 0;
    border-radius: 0;
  }

  .quick-dialog-foot {
    display: none;
  }

  .quick-results a {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .quick-results a small {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .landing-hero {
    min-height: 680px;
  }

  .hero-ribbon,
  .feature-grid,
  .dashboard-grid,
  .workspace-grid,
  .workspace-grid.three,
  .profile-summary {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-panel,
  .auth-panel.wide {
    padding: 22px;
  }
}

.story-band {
  padding: var(--section-pad) var(--page-pad);
  background:
    linear-gradient(135deg, rgba(112, 93, 153, 0.11), rgba(216, 165, 58, 0.12)),
    var(--paper-warm);
  border-block: 1px solid rgba(22, 33, 31, 0.07);
}

.story-band.dark {
  color: white;
  background:
    radial-gradient(circle at 90% 20%, rgba(20, 117, 109, 0.22), transparent 20rem),
    linear-gradient(135deg, var(--primary-deepest), var(--primary-deep));
}

.story-band.dark h2,
.story-band.dark h3,
.story-band.dark .eyebrow,
.story-band.dark p {
  color: white;
}

.story-band.dark .muted {
  color: rgba(255, 255, 255, 0.72);
}

.care-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.path-step {
  min-height: 190px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.story-band.dark .path-step {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.path-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  color: var(--ink);
  background: var(--gold-soft);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 950;
}

.constellation {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, minmax(0, 0.9fr));
  gap: 12px;
  margin-top: 26px;
}

.constellation-item {
  min-height: 132px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.constellation-item.featured {
  grid-row: span 2;
  display: grid;
  align-content: end;
  min-height: 276px;
  color: white;
  background:
    linear-gradient(0deg, rgba(22, 33, 31, 0.84), rgba(22, 33, 31, 0.2)),
    url("/static/img/autisync-hero-1600.a84c2c812753.webp") center / cover;
  border-color: rgba(255, 255, 255, 0.18);
}

.constellation-item.featured h3,
.constellation-item.featured p,
.constellation-item.featured .chip {
  color: white;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--page-pad) var(--section-pad);
  margin-top: calc(var(--section-pad) * -0.4);
}

.metric-tile {
  min-height: 120px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.metric-tile span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.insight-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1.2fr);
  gap: 18px;
  padding: var(--section-pad) var(--page-pad);
  background: rgba(255, 255, 255, 0.5);
  border-block: 1px solid rgba(22, 33, 31, 0.06);
}

.insight-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.insight-panel.highlight {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  border-color: rgba(255, 255, 255, 0.2);
}

.insight-panel.highlight h2,
.insight-panel.highlight h3,
.insight-panel.highlight p,
.insight-panel.highlight .eyebrow {
  color: white;
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: var(--section-pad) var(--page-pad) 0;
}

.lens-card {
  min-height: 178px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.lens-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.25rem;
}

.connection-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: var(--section-pad) var(--page-pad) 0;
}

.connection-step {
  min-height: 160px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.connection-step strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 1.18rem;
}

.permission-deck {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: var(--section-pad) var(--page-pad) 0;
}

.permission-card {
  min-height: 150px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.form-note {
  padding: 14px;
  color: var(--muted);
  background: var(--sky-soft);
  border: 1px solid rgba(61, 127, 156, 0.18);
  border-radius: var(--radius);
  line-height: 1.5;
}

.practitioner-hero {
  background:
    linear-gradient(90deg, rgba(61, 127, 156, 0.13) 0 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(135deg, #e9f2ef 0%, #fbf5e5 48%, #e6edf5 100%);
}

.practitioner-aside {
  border-top: 5px solid var(--primary);
}

.visual-command-board,
.client-signal-grid {
  display: grid;
  gap: 16px;
  padding: 0 var(--page-pad) var(--section-pad);
}

.visual-command-board {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.visual-panel,
.client-signal-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.visual-panel {
  padding: 20px;
}

.age-bars {
  display: grid;
  gap: 12px;
}

.age-bar-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: center;
}

.age-bar-row span,
.age-bar-row strong {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.age-bar-track {
  height: 16px;
  overflow: hidden;
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.age-bar-track i {
  display: block;
  min-width: 6px;
  height: 100%;
  background: var(--primary);
}

.age-bar-track i.gold,
.signal-tile.gold span {
  background: var(--gold);
}

.age-bar-track i.coral,
.signal-tile.coral span {
  background: var(--coral);
}

.age-bar-track i.violet,
.signal-tile.violet span {
  background: var(--violet);
}

.signal-tile.sky span {
  background: var(--sky);
}

.signal-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}

.signal-tile {
  min-height: 128px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background: #fbfcf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.signal-tile span,
.signal-avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: var(--primary);
  border-radius: 999px;
  font-weight: 950;
}

.signal-tile strong {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.signal-tile small,
.signal-card-head small {
  color: var(--muted);
  font-weight: 850;
}

.client-signal-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 0;
}

.client-signal-card {
  min-height: 188px;
  padding: 16px;
  display: grid;
  gap: 14px;
  align-content: space-between;
  color: var(--ink);
  text-decoration: none;
  border-top: 5px solid var(--client-color, var(--teal));
}

.client-signal-card:hover {
  border-color: var(--client-color, var(--teal));
  box-shadow: var(--shadow-strong);
}

.signal-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.signal-avatar {
  width: 46px;
  height: 46px;
  background:
    linear-gradient(135deg, var(--client-color, var(--teal)) 0 58%, var(--clinic-color, var(--gold)) 58% 100%);
}

.signal-card-head strong {
  display: block;
  line-height: 1.15;
}

.progress-lane {
  height: 12px;
  overflow: hidden;
  background: #eef3ef;
  border-radius: 999px;
}

.progress-lane i {
  display: block;
  min-width: 8px;
  height: 100%;
  background:
    linear-gradient(90deg, var(--client-color, var(--teal)), var(--clinic-color, var(--gold)));
}

.signal-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 6px;
}

.signal-pills span {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  background: #f6f8f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
}

.signal-pills .alert {
  color: #7a2b24;
  background: var(--coral-soft);
  border-color: rgba(199, 95, 74, 0.28);
}

.practitioner-shell,
.session-board,
.client-workspace,
.session-file-layout {
  display: grid;
  gap: 18px;
  padding: var(--section-pad) var(--page-pad);
}

.practitioner-shell {
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.45fr);
  align-items: start;
}

.practitioner-main,
.practitioner-side,
.session-board > article,
.client-chat,
.client-session-panel,
.session-file-layout > article,
.session-file-layout > aside {
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.calendar-legend,
.client-stack,
.session-list,
.chat-thread {
  display: grid;
  gap: 10px;
}

.calendar-legend {
  grid-auto-flow: column;
  justify-content: end;
  align-items: center;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.calendar-legend i,
.client-swatch,
.session-marker {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  background: var(--clinic-color, var(--teal));
  border-radius: 3px;
}

.session-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day {
  min-height: 154px;
  padding: 10px;
  background: #fbfcf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.calendar-day.today {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 2px rgba(112, 93, 153, 0.14);
}

.calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-day header span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day header strong {
  font-size: 1.1rem;
}

.calendar-events {
  display: grid;
  gap: 7px;
}

.calendar-event {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 8px 7px 10px;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--clinic-color, var(--gold)) 0 5px, transparent 5px),
    color-mix(in srgb, var(--client-color, var(--teal)) 13%, white);
  border: 1px solid color-mix(in srgb, var(--client-color, var(--teal)) 32%, white);
  border-radius: 6px;
  text-decoration: none;
}

.calendar-event span,
.calendar-event strong,
.calendar-empty {
  font-size: 0.78rem;
  line-height: 1.25;
}

.calendar-event strong {
  font-weight: 950;
}

.calendar-empty {
  color: #87918e;
  font-weight: 850;
}

.client-row,
.session-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  color: var(--ink);
  background: #fbfcf7;
  border: 1px solid var(--line);
  border-left: 5px solid var(--client-color, var(--teal));
  border-radius: var(--radius);
  text-decoration: none;
}

.client-row:hover,
.session-row:hover,
.calendar-event:hover {
  border-color: var(--client-color, var(--teal));
  box-shadow: var(--shadow-soft);
}

.client-row strong,
.session-row strong {
  display: block;
  line-height: 1.2;
}

.client-row small,
.session-row small,
.client-row em,
.session-row em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.35;
}

.client-row em,
.session-row em {
  font-weight: 900;
}

.client-swatch {
  width: 18px;
  height: 36px;
  background:
    linear-gradient(180deg, var(--client-color, var(--teal)) 0 50%, var(--clinic-color, var(--gold)) 50% 100%);
}

.session-marker {
  width: 16px;
  height: 40px;
  background:
    linear-gradient(180deg, var(--client-color, var(--teal)) 0 62%, var(--clinic-color, var(--gold)) 62% 100%);
}

.session-board,
.session-file-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}

.client-workspace {
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
}

.chat-bubble {
  max-width: 82%;
  padding: 13px;
  background: var(--sky-soft);
  border: 1px solid rgba(61, 127, 156, 0.18);
  border-radius: var(--radius);
}

.chat-bubble.user {
  justify-self: end;
  background: var(--primary-soft);
  border-color: rgba(112, 93, 153, 0.22);
}

.chat-bubble p {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.45;
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

.chat-input input {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.context-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.care-plan-section {
  background:
    linear-gradient(90deg, rgba(216, 165, 58, 0.1) 0 1px, transparent 1px) 0 0 / 36px 36px,
    rgba(255, 255, 255, 0.28);
  border-block: 1px solid rgba(22, 33, 31, 0.06);
}

.care-plan-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.care-plan-grid,
.context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.context-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.55fr);
}

.plan-panel {
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.goal-stack,
.task-stack,
.context-stack {
  display: grid;
  gap: 12px;
}

.goal-card,
.task-card,
.context-stack article {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fbfcf7;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.goal-card {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.28fr);
  align-items: center;
}

.goal-card h3,
.task-card h3 {
  margin: 0;
}

.goal-card p,
.task-card p,
.preference-panel p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.goal-meter {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.goal-meter strong {
  font-size: 1.35rem;
}

.goal-meter small,
.signal-activity-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
}

.goal-meter i {
  width: 100%;
  height: 12px;
  overflow: hidden;
  background: #eef3ef;
  border-radius: 999px;
}

.goal-meter b {
  display: block;
  min-width: 6px;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

.task-card {
  border-left: 5px solid var(--sky);
}

.task-card.high,
.task-card.urgent,
.task-card.overdue,
.vault-stat.urgent span {
  border-color: var(--coral);
}

.vault-stat.urgent span {
  background: var(--coral);
}

.task-status-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-status-form select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdf9;
}

.preference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.preference-grid span,
.soft-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--muted);
  background: #f5f2e7;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.preference-grid .on,
.soft-link {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-color: rgba(112, 93, 153, 0.22);
}

.care-plan-forms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.context-stack article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.context-stack span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  color: white;
  background: var(--primary);
  border-radius: 999px;
  font-weight: 950;
}

.audit-board {
  padding-top: var(--section-pad);
}

.vault-section {
  background: rgba(255, 255, 255, 0.34);
  border-block: 1px solid rgba(22, 33, 31, 0.06);
}

.vault-overview {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(170px, 0.34fr) minmax(280px, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.vault-stat,
.vault-sensitivity,
.document-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.vault-stat {
  min-height: 142px;
  display: grid;
  align-content: space-between;
  padding: 16px;
}

.vault-stat span,
.document-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: var(--violet);
  border-radius: 999px;
  font-weight: 950;
}

.vault-stat.teal span {
  background: var(--teal);
}

.vault-stat strong {
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  line-height: 0.95;
}

.vault-stat small,
.document-card small {
  color: var(--muted);
  font-weight: 850;
  line-height: 1.35;
}

.vault-sensitivity {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.sensitivity-bars {
  display: grid;
  gap: 8px;
}

.sensitivity-row {
  display: grid;
  grid-template-columns: minmax(98px, 0.38fr) minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
}

.sensitivity-row span,
.sensitivity-row em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.sensitivity-row i {
  height: 13px;
  overflow: hidden;
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.sensitivity-row b {
  display: block;
  min-width: 8px;
  height: 100%;
  background: var(--primary);
}

.sensitivity-row.clinical b,
.document-icon.clinical {
  background: var(--coral);
}

.sensitivity-row.school b,
.document-icon.school {
  background: var(--sky);
}

.sensitivity-row.assessment b,
.document-icon.assessment {
  background: var(--gold);
}

.sensitivity-row.safety_restricted b,
.document-icon.safety_restricted {
  background: var(--danger);
}

.sensitivity-row.admin_only b,
.document-icon.admin_only {
  background: var(--ink);
}

.vault-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 18px;
  align-items: start;
}

.document-grid {
  display: grid;
  gap: 12px;
}

.document-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
}

.document-card.compact {
  align-items: center;
}

.document-card h3 {
  margin: 0;
}

.document-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.document-actions {
  display: grid;
  gap: 8px;
  min-width: 128px;
}

.vault-upload {
  position: sticky;
  top: 92px;
}

.checkbox-label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
}

.document-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: var(--section-pad) var(--page-pad);
}

.session-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: var(--section-pad) var(--page-pad);
}

.session-notes {
  min-height: 190px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.session-notes p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .care-path,
  .metric-strip,
  .permission-deck,
  .session-detail-grid,
  .document-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .constellation,
  .connection-map,
  .lens-grid,
  .visual-command-board,
  .practitioner-shell,
  .client-workspace,
  .care-plan-grid,
  .context-grid,
  .care-plan-forms,
  .vault-layout,
  .vault-overview,
  .session-board,
  .session-file-layout {
    grid-template-columns: 1fr;
  }

  .client-signal-grid,
  .signal-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .constellation-item.featured {
    grid-row: auto;
  }
}

@media (max-width: 780px) {
  .care-path,
  .metric-strip,
  .care-plan-overview,
  .permission-deck,
  .insight-band,
  .client-signal-grid,
  .signal-tiles,
  .session-calendar,
  .session-detail-grid,
  .document-detail-grid {
    grid-template-columns: 1fr;
  }

  .calendar-legend {
    grid-auto-flow: row;
    justify-content: start;
  }

  .chat-input,
  .client-row,
  .session-row,
  .goal-card,
  .task-status-form,
  .document-card {
    grid-template-columns: 1fr;
  }

  .vault-upload {
    position: static;
  }
}

.assessment-studio {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 46px);
  padding: var(--section-pad) var(--page-pad);
  background: rgba(255, 255, 255, 0.38);
  border-bottom: 1px solid rgba(22, 33, 31, 0.07);
}

.studio-copy {
  position: sticky;
  top: 96px;
  align-self: start;
}

.studio-copy p {
  margin: 0;
}

.studio-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 16px;
  align-items: stretch;
}

.form-builder-card,
.form-preview-panel,
.result-panel,
.respondent-card,
.assignment-card,
.result-profile-card,
.question-result-card,
.assignment-result {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.form-builder-card,
.form-preview-panel,
.result-panel,
.respondent-card,
.result-profile-card,
.question-result-card,
.assignment-result {
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-field {
  min-width: 0;
}

.form-field .errorlist {
  margin-top: 7px;
}

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

.builder-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-footer .checkbox-label {
  width: auto;
  min-width: 150px;
  margin: 0;
}

.questionnaire-builder,
.assignment-builder {
  margin-top: 0;
}

.question-picker {
  padding: 12px;
  background: #f7faf4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-preview-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  background:
    linear-gradient(135deg, rgba(112, 93, 153, 0.11), rgba(216, 165, 58, 0.1)),
    rgba(255, 255, 255, 0.94);
}

.preview-sheet {
  display: grid;
  gap: 14px;
  min-height: 280px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-sheet h3 {
  margin: 0;
}

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

.scale-preview span,
.type-palette span {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: var(--ink);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 950;
}

.preview-lines {
  display: grid;
  gap: 9px;
}

.preview-lines i {
  display: block;
  height: 13px;
  background: #e8eee8;
  border-radius: 999px;
}

.preview-lines i:nth-child(2) {
  width: 78%;
}

.preview-lines i:nth-child(3) {
  width: 56%;
}

.question-options-label[hidden] {
  display: none;
}

.preview-choice-grid,
.preview-radio-list,
.preview-input-line,
.preview-textarea-lines,
.preview-number-line {
  display: grid;
  gap: 10px;
}

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

.preview-choice-grid span,
.preview-radio-list span,
.preview-input-line,
.preview-number-line {
  min-height: 42px;
  padding: 10px 12px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 900;
}

.preview-radio-list span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-radio-list i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-radius: 999px;
}

.preview-textarea-lines {
  padding: 12px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-textarea-lines i {
  display: block;
  height: 13px;
  background: #e8eee8;
  border-radius: 999px;
}

.preview-textarea-lines i:nth-child(2) {
  width: 82%;
}

.preview-textarea-lines i:nth-child(3) {
  width: 58%;
}

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

.type-palette span:nth-child(2) {
  background: var(--gold-soft);
}

.type-palette span:nth-child(3) {
  background: var(--coral-soft);
}

.type-palette span:nth-child(4) {
  background: var(--violet-soft);
}

.type-palette span:nth-child(5) {
  background: var(--sky-soft);
}

.respondent-grid,
.assignment-list,
.results-dashboard,
.question-result-grid,
.result-profile-list {
  display: grid;
  gap: 14px;
}

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

.respondent-card {
  display: grid;
  gap: 14px;
}

.respondent-card h3 {
  margin: 0;
}

.respondent-card p {
  margin: 6px 0 0;
}

.respondent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.respondent-chips span {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 7px 10px;
  background: #f7faf4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 900;
}

.respondent-chips.compact span {
  min-height: 38px;
  font-size: 0.9rem;
}

.respondent-chips b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: white;
  background: var(--primary);
  border-radius: 999px;
  font-size: 0.78rem;
}

.respondent-chips small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.assessment-row {
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1fr);
}

.row-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.row-actions p {
  margin: 0;
}

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

.assignment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.assignment-card h3,
.assignment-card p,
.assignment-card small {
  margin: 8px 0 0;
}

.assignment-card small {
  display: block;
  color: var(--muted);
  font-weight: 850;
  line-height: 1.35;
}

.assignment-stats {
  display: grid;
  place-items: center;
  min-width: 108px;
  padding: 12px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.assignment-stats strong {
  font-size: 2rem;
  line-height: 1;
}

.assignment-stats span,
.assignment-stats em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.assessment-metrics {
  background: rgba(255, 255, 255, 0.28);
}

.results-dashboard {
  align-items: start;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--section-pad) var(--page-pad);
}

.result-panel {
  min-height: 300px;
}

.result-panel h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.bar-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 190px;
  padding-top: 16px;
  overflow-x: auto;
}

.bar-column {
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto auto;
  gap: 7px;
  justify-items: center;
  min-width: 54px;
}

.bar-column i {
  align-self: end;
  display: block;
  width: 34px;
  min-height: 8px;
  background: linear-gradient(180deg, var(--primary), var(--sky));
  border-radius: var(--radius) var(--radius) 2px 2px;
}

.trend-chart .bar-column i {
  background: linear-gradient(180deg, var(--coral), var(--gold));
}

.bar-column span,
.bar-column strong,
.trend-summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.trend-summary {
  margin: 8px 0 0;
}

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

.distribution-list.compact {
  gap: 7px;
}

.distribution-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr) 34px;
  gap: 9px;
  align-items: center;
}

.distribution-row span,
.distribution-row strong {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.distribution-row i {
  height: 13px;
  overflow: hidden;
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.distribution-row b {
  display: block;
  min-width: 7px;
  height: 100%;
  background: var(--violet);
}

.text-answer-list {
  display: grid;
  gap: 10px;
}

.text-answer-list blockquote {
  margin: 0;
  padding: 12px;
  background: #f7faf4;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
}

.text-answer-list.compact blockquote {
  padding: 10px;
}

.text-answer-list p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.text-answer-list cite {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
}

.chart-builder {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  margin: 0 0 14px;
}

.custom-chart-panel {
  max-width: 980px;
}

.result-profile-card {
  display: grid;
  gap: 18px;
}

.result-profile-card > header,
.assignment-result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.result-profile-card h2,
.result-profile-card h3,
.assignment-result h3 {
  margin: 0;
}

.assignment-result {
  display: grid;
  gap: 16px;
  background: rgba(247, 250, 244, 0.76);
}

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

.question-result-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.question-result-card h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.question-result-card p {
  margin: 0;
}

.mini-trend {
  display: flex;
  align-items: end;
  gap: 6px;
  min-height: 82px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mini-trend span {
  display: grid;
  align-items: end;
  width: 16px;
  height: 64px;
}

.mini-trend i {
  display: block;
  min-height: 6px;
  background: var(--coral);
  border-radius: 999px 999px 2px 2px;
}

.json-snapshot {
  background: var(--ink);
  color: white;
  border-radius: var(--radius);
  overflow: hidden;
}

.json-snapshot summary {
  padding: 13px 15px;
  cursor: pointer;
  font-weight: 900;
}

.json-snapshot pre {
  max-height: 360px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  background: #101816;
  color: #e8f3ed;
  font-size: 0.82rem;
  line-height: 1.45;
}

.respond-form {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.respond-question {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.respond-question-head {
  display: grid;
  gap: 10px;
}

.respond-question h2 {
  font-size: clamp(1.25rem, 2vw, 1.85rem);
}

.answer-options > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.answer-options label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 13px;
  background: #f7faf4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
}

.answer-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.scale-options label {
  min-width: 54px;
  justify-content: center;
}

.yes-no-options label:first-child {
  background: var(--teal-soft);
}

.yes-no-options label:last-child {
  background: var(--coral-soft);
}

.answer-text input,
.answer-text textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fcfdf9;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.answer-text textarea {
  min-height: 150px;
  resize: vertical;
}

.answer-text input:focus,
.answer-text textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 93, 153, 0.16);
  outline: 0;
}

.respond-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1500px) {
  .results-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .question-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .assessment-studio,
  .studio-board,
  .respondent-grid,
  .assignment-list,
  .results-dashboard,
  .question-result-grid,
  .form-grid.two,
  .chart-builder {
    grid-template-columns: 1fr;
  }

  .studio-copy {
    position: static;
  }

  .assessment-row,
  .assignment-card {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-items: start;
  }

  .result-profile-card > header,
  .assignment-result-head {
    display: grid;
  }
}

/* Dashboard workflow components (kept last to override legacy dashboard rules). */

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--page-pad) 18px;
}

.dashboard-section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.dashboard-section-heading p {
  margin: 0;
  color: var(--muted);
}

.dashboard-section-heading .eyebrow {
  margin-bottom: 7px;
  color: var(--primary);
}

.app-body .metric-strip {
  position: relative;
  z-index: 2;
}

.today-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 var(--page-pad) var(--section-pad);
}

.today-board-head {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.today-board-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.today-panel {
  min-width: 0;
  padding: 19px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-soft);
}

.today-panel .section-head {
  align-items: center;
  margin-bottom: 13px;
}

.today-panel h3 {
  margin: 0;
  font-size: 1.23rem;
}

.today-panel .eyebrow {
  margin-bottom: 5px;
}

.panel-count {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 11px;
  font-size: 1.05rem;
}

.priority-list {
  display: grid;
  gap: 7px;
}

.priority-list > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px 11px;
  color: var(--ink);
  background: #f8faf6;
  border: 1px solid #e0e6e1;
  border-radius: 12px;
  text-decoration: none;
}

.priority-list > a:hover {
  background: var(--primary-wash);
  border-color: var(--primary-soft-strong);
}

.priority-list > a > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.priority-list > a strong,
.priority-list > a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-list > a strong {
  font-size: 0.88rem;
}

.priority-list > a small {
  color: var(--muted);
  font-size: 0.75rem;
}

.priority-list .status-chip {
  flex: 0 0 auto;
  font-size: 0.7rem;
}

.compact-empty {
  display: grid;
  gap: 5px;
  min-height: 112px;
  align-content: center;
  padding: 17px;
  color: var(--muted);
  background: #f6f7f3;
  border: 1px dashed #cad4ce;
  border-radius: 12px;
}

.compact-empty strong {
  color: var(--ink);
}

.compact-empty span {
  font-size: 0.84rem;
  line-height: 1.45;
}

.dashboard-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--page-pad) var(--section-pad);
}

.profile-quick-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.profile-quick-card:hover {
  border-color: #b6a6c8;
  transform: translateY(-1px);
}

.profile-quick-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-quick-card strong,
.profile-quick-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-quick-card small {
  color: var(--muted);
}

.profile-initial {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 13px;
  font-weight: 950;
}

.admin-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--page-pad) var(--section-pad);
}

.admin-quick-actions > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 15px;
  color: var(--ink);
  background: var(--primary-wash);
  border: 1px solid var(--line);
  border-radius: 15px;
  text-decoration: none;
}

.admin-quick-actions > a > span:last-child {
  display: grid;
  gap: 3px;
}

.admin-quick-actions small {
  color: var(--muted);
}

.admin-quick-actions .card-index {
  margin: 0;
  flex: 0 0 auto;
}

.secondary-insights {
  padding-top: 0;
}

.secondary-insights > details {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 17px;
}

.secondary-insights summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 70px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.secondary-insights summary::-webkit-details-marker {
  display: none;
}

.secondary-insights summary > span:first-child {
  display: grid;
}

.secondary-insights summary .eyebrow {
  margin: 0 0 4px;
}

.secondary-insights summary > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 780;
}

.secondary-insights details[open] summary {
  border-bottom: 1px solid var(--line);
}

.secondary-insights .visual-command-board {
  padding: 18px;
}

.signal-tile .signal-name,
.signal-tile.gold .signal-name,
.signal-tile.coral .signal-name,
.signal-tile.violet .signal-name,
.signal-tile.sky .signal-name {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-height: 28px;
  justify-self: start;
  padding: 4px 8px;
  color: #31504a;
  background: #e6f0eb;
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.2;
}

.signal-pills {
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
}

.signal-pills span {
  padding: 4px 7px;
  text-align: center;
}

@media (max-width: 1120px) {
  .today-board,
  .dashboard-profile-grid,
  .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .today-board,
  .dashboard-profile-grid,
  .admin-quick-actions {
    grid-template-columns: 1fr;
  }

  .today-panel:last-child {
    grid-column: auto;
  }

  .priority-list > a {
    align-items: flex-start;
    flex-direction: column;
  }

  .secondary-insights summary > span:last-child {
    display: none;
  }

  .secondary-insights .visual-command-board {
    grid-template-columns: 1fr;
    padding: 12px;
  }
}

.action-disclosure {
  margin-top: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.action-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 13px 17px;
  cursor: pointer;
  list-style: none;
}

.action-disclosure > summary::-webkit-details-marker {
  display: none;
}

.action-disclosure > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.action-disclosure > summary small {
  color: var(--muted);
  font-weight: 600;
}

.action-disclosure > summary > span:last-child {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 10px;
  font-size: 1.35rem;
  font-weight: 500;
  transition: transform 160ms ease;
}

.action-disclosure[open] > summary {
  border-bottom: 1px solid var(--line);
}

.action-disclosure[open] > summary > span:last-child {
  transform: rotate(45deg);
}

.action-disclosure .care-plan-forms {
  padding: 16px;
}

.message-disclosure {
  margin: 0;
}

.message-disclosure .panel-form {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.care-profile-browser[data-view="list"] {
  grid-template-columns: 1fr;
}

.care-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 146px;
  color: var(--ink);
  text-decoration: none;
}

.care-profile-card::before {
  display: none;
}

.care-profile-card-copy {
  display: grid;
  min-width: 0;
  justify-items: start;
}

.care-profile-card h2 {
  margin: 10px 0 2px;
  font-size: 1.35rem;
}

.care-profile-card p {
  margin: 0;
}

.care-profile-arrow {
  color: var(--primary);
  font-size: 1.35rem;
}

.care-profile-browser[data-view="list"] .care-profile-card {
  min-height: 88px;
}

@media (max-width: 720px) {
  .action-disclosure > summary {
    align-items: flex-start;
  }

  .action-disclosure .care-plan-forms {
    padding: 10px;
  }

  .care-profile-card {
    min-height: 106px;
    padding: 15px;
  }
}

/* Progress and patterns workspace */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.progress-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(22px, 5vw, 72px);
  align-items: end;
  padding: clamp(38px, 7vw, 94px) var(--page-pad) 34px;
  background:
    radial-gradient(circle at 84% 18%, rgba(216, 165, 58, 0.2), transparent 28%),
    linear-gradient(145deg, rgba(238, 233, 244, 0.94), rgba(227, 241, 237, 0.74));
  border-bottom: 1px solid rgba(112, 93, 153, 0.16);
}

.progress-hero h1 {
  max-width: 980px;
  font-size: clamp(2.7rem, 6.4vw, 6rem);
}

.progress-lede {
  max-width: 820px;
  margin: 22px 0 0;
  color: #3f504c;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

.progress-principle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 20px;
  color: var(--primary-deep);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 93, 153, 0.26);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.progress-principle > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: white;
  background: var(--primary);
  border-radius: 14px;
  font-size: 1.35rem;
  font-weight: 900;
}

.progress-principle p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.period-switcher {
  position: sticky;
  top: 68px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 58px;
  padding: 9px var(--page-pad);
  background: rgba(248, 249, 244, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.period-switcher > span {
  margin-right: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.period-switcher a {
  min-height: 38px;
  padding: 8px 12px;
  color: #4d5d59;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.period-switcher a:hover {
  border-color: var(--line-strong);
}

.period-switcher a[aria-current="page"] {
  color: white;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 26px var(--page-pad);
}

.progress-metrics article {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.progress-metrics article > div {
  display: grid;
  min-width: 0;
}

.progress-metrics strong {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1;
}

.progress-metrics small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.metric-symbol {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 14px;
  font-weight: 950;
}

.metric-symbol.coral { color: #7c3024; background: var(--coral-soft); }
.metric-symbol.gold { color: #6f4e0b; background: var(--gold-soft); }
.metric-symbol.violet { color: #354d80; background: var(--violet-soft); }

.evidence-lanes {
  padding: 28px var(--page-pad) var(--section-pad);
}

.evidence-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.evidence-lane-grid article {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 239, 0.84));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.evidence-lane-grid h3 {
  margin-top: 32px;
  font-size: 1.32rem;
}

.evidence-lane-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.lane-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: var(--primary);
  border-radius: 11px;
  font-weight: 950;
}

.lane-number.coral { background: var(--coral); }
.lane-number.gold { color: #3d2d08; background: var(--gold); }

.progress-goal-section {
  background: rgba(255, 255, 255, 0.44);
  border-block: 1px solid rgba(22, 33, 31, 0.07);
}

.progress-toolbar {
  margin: 0 0 18px;
}

.progress-toolbar .collection-search input {
  padding-left: 13px;
}

.progress-goal-list {
  display: grid;
  gap: 18px;
}

.progress-goal-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 140px;
}

.progress-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.progress-card-head h3 {
  margin: 14px 0 7px;
  font-size: clamp(1.45rem, 2.7vw, 2.15rem);
}

.progress-card-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.goal-current-value {
  display: grid;
  min-width: 150px;
  padding: 14px 16px;
  text-align: right;
  background: var(--primary-soft);
  border: 1px solid rgba(112, 93, 153, 0.22);
  border-radius: 15px;
}

.goal-current-value span,
.goal-current-value small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.goal-current-value strong {
  margin: 3px 0;
  color: var(--primary-strong);
  font-size: 2.15rem;
  line-height: 1;
}

.goal-anchor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 13px;
  align-items: stretch;
  margin: 22px 0;
}

.goal-anchor-grid article {
  padding: 15px;
  background: #f7f8f3;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.goal-anchor-grid article:last-child {
  background: #edf6ee;
  border-color: #cce1cf;
}

.goal-anchor-grid span:not(.anchor-arrow) {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-anchor-grid p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.anchor-arrow {
  align-self: center;
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 900;
}

.trajectory-figure {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 18px;
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.trajectory-figure > figcaption,
.assessment-pattern-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.trajectory-figure h4 {
  margin: 3px 0 0;
  font-size: 1.08rem;
}

.change-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 10px;
  color: #0f5c53;
  background: var(--teal-soft);
  border: 1px solid rgba(20, 117, 109, 0.2);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.change-chip.neutral {
  color: #4f596f;
  background: #ececf3;
  border-color: #d8d8e5;
}

.chart-summary {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.line-chart-shell {
  width: 100%;
  max-width: 100%;
  min-height: 230px;
  padding: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.progress-line-chart {
  display: block;
  width: 100%;
  height: 230px;
  overflow: visible;
}

.progress-line-chart.compact {
  height: 190px;
}

.compact-chart-shell {
  min-height: 190px;
  padding: 0;
}

.chart-scroll-hint {
  display: none;
}

.chart-grid-line {
  stroke: #d8ded9;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-grid-line.target {
  stroke: #8db6a4;
  stroke-dasharray: 5 4;
}

.chart-series-line {
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-series-line.coral { stroke: var(--coral); }

.chart-point-halo {
  fill: rgba(112, 93, 153, 0.15);
  opacity: 0;
  transition: opacity 150ms ease;
}

.chart-point {
  fill: white;
  stroke: var(--primary);
  stroke-width: 3;
}

.chart-point-group.coral .chart-point { stroke: var(--coral); }
.chart-point-group.coral .chart-point-halo { fill: rgba(199, 95, 74, 0.15); }

.chart-point-group:hover .chart-point-halo,
.chart-point-group:focus .chart-point-halo {
  opacity: 1;
}

.chart-point-group:focus {
  outline: none;
}

.chart-point-group:focus .chart-point {
  stroke: var(--primary-deep);
  stroke-width: 4;
}

.chart-axis-label,
.chart-date-label,
.chart-point-code {
  fill: #67736f;
  font-family: inherit;
  font-size: 8px;
}

.chart-point-code {
  fill: #304b46;
  font-size: 6.5px;
  font-weight: 900;
}

.chart-date-label.end {
  text-anchor: end;
}

.chart-data-table {
  margin-top: 7px;
  border-top: 1px solid var(--line);
}

.assessment-pattern-card,
.assessment-pattern-card > header,
.assessment-pattern-card figure {
  min-width: 0;
  max-width: 100%;
}

.chart-data-table > summary {
  min-height: 44px;
  padding: 12px 3px 8px;
  color: #315c55;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 10px;
}

.chart-data-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: white;
}

.chart-data-table caption {
  padding: 10px;
  text-align: left;
  color: var(--muted);
  font-size: 0.78rem;
}

.chart-data-table th,
.chart-data-table td {
  padding: 10px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.chart-data-table td:last-child span {
  display: block;
  margin-top: 4px;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-top: 14px;
  padding: 20px;
  color: var(--muted);
  background: #f1f3ef;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
}

.progress-entry-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1.3fr);
  gap: clamp(22px, 5vw, 64px);
  align-items: start;
  background: linear-gradient(140deg, var(--primary-deep), var(--primary-strong));
}

.progress-entry-section h2,
.progress-entry-section .eyebrow,
.progress-entry-intro > p {
  color: white;
}

.progress-entry-intro > p:last-of-type {
  color: #d6e7e2;
  line-height: 1.6;
}

.entry-reminder {
  margin-top: 22px;
  padding: 16px;
  color: #183d38;
  background: #e3eee9;
  border-radius: 14px;
}

.entry-reminder ul {
  margin: 9px 0 0;
  padding-left: 20px;
}

.entry-reminder li + li { margin-top: 6px; }

.progress-entry-form {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
  background: white;
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(4, 24, 20, 0.28);
}

.progress-entry-form label {
  display: grid;
  gap: 7px;
  color: #263b37;
  font-weight: 850;
}

.progress-entry-form label small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
}

.progress-entry-form input,
.progress-entry-form select,
.progress-entry-form textarea {
  width: 100%;
}

.selected-goal-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 14px;
  background: #eef6f1;
  border: 1px solid #c8ddd1;
  border-radius: 13px;
}

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

.selected-goal-preview > span,
.selected-goal-preview > strong {
  grid-column: 1 / -1;
}

.selected-goal-preview > span,
.selected-goal-preview small {
  color: #567069;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-goal-preview > div {
  padding: 10px;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 9px;
}

.selected-goal-preview p {
  margin: 5px 0 0;
  color: #334844;
  font-size: 0.82rem;
  line-height: 1.45;
}

.assessment-patterns {
  background: rgba(245, 221, 214, 0.18);
}

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

.assessment-pattern-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-top: 4px solid var(--coral);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.assessment-pattern-card h3 {
  margin: 11px 0 5px;
}

.assessment-pattern-card header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.assessment-pattern-card figure {
  margin: 12px 0 0;
}

.data-warning {
  padding: 9px 11px;
  color: #684417;
  background: #fff3d2;
  border-left: 4px solid var(--gold);
  font-size: 0.82rem;
}

.activity-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.activity-chart {
  position: sticky;
  top: 138px;
  margin: 0;
  padding: 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.activity-chart > figcaption {
  font-size: 1rem;
  font-weight: 900;
}

.activity-bars {
  display: flex;
  align-items: end;
  gap: 7px;
  min-height: 230px;
  margin-top: 15px;
  padding: 18px 8px 0;
  border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(to top, transparent 0 54px, #edf0ec 54px 55px);
  overflow-x: auto;
}

.activity-bar-column {
  display: grid;
  grid-template-rows: 22px 170px 28px;
  gap: 5px;
  align-items: end;
  justify-items: center;
  min-width: 38px;
  flex: 1;
}

.activity-bar-column strong,
.activity-bar-column span {
  color: var(--muted);
  font-size: 0.7rem;
}

.activity-bar-column i {
  display: block;
  width: min(100%, 30px);
  height: var(--bar-height);
  min-height: 3px;
  max-height: 170px;
  background: linear-gradient(to top, var(--primary), #4da99e);
  border-radius: 7px 7px 2px 2px;
}

.activity-timeline {
  display: grid;
  gap: 0;
  padding: 4px 0;
}

.activity-event {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  min-height: 92px;
}

.activity-event::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: -4px;
  left: 10px;
  width: 2px;
  background: var(--line);
}

.activity-event:last-child::before { display: none; }

.activity-event-marker {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  background: var(--primary-soft);
  border: 5px solid var(--primary);
  border-radius: 50%;
}

.activity-event.task .activity-event-marker { background: var(--gold-soft); border-color: #9a6d12; }
.activity-event.session .activity-event-marker { background: var(--violet-soft); border-color: var(--violet); }
.activity-event.observation .activity-event-marker { background: var(--sky-soft); border-color: var(--sky); }
.activity-event.assessment .activity-event-marker { background: var(--coral-soft); border-color: var(--coral); }

.activity-event > div {
  padding: 0 0 19px 4px;
}

.activity-event time {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-event h3 {
  margin: 4px 0;
  font-size: 1rem;
}

.activity-event p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.empty-state.compact {
  min-height: 110px;
  padding: 18px;
}

@media (max-width: 980px) {
  .progress-hero,
  .progress-entry-section,
  .activity-layout {
    grid-template-columns: 1fr;
  }

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

  .evidence-lane-grid,
  .assessment-pattern-grid {
    grid-template-columns: 1fr;
  }

  .activity-chart {
    position: static;
  }
}

@media (max-width: 680px) {
  .progress-hero {
    padding-top: 34px;
  }

  .period-switcher {
    position: static;
    justify-content: flex-start;
  }

  .progress-metrics {
    grid-template-columns: 1fr;
  }

  .progress-card-head,
  .goal-anchor-grid,
  .form-grid.two,
  .selected-goal-preview {
    grid-template-columns: 1fr;
  }

  .selected-goal-preview > span,
  .selected-goal-preview > strong {
    grid-column: auto;
  }

  .goal-current-value {
    text-align: left;
  }

  .anchor-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .trajectory-figure > figcaption,
  .assessment-pattern-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .line-chart-shell {
    min-height: 170px;
    padding: 0;
  }

  .progress-line-chart,
  .progress-line-chart.compact {
    height: 175px;
  }
}

@media (max-width: 580px) {
  .line-chart-shell,
  .compact-chart-shell {
    min-height: 185px;
    padding-bottom: 10px;
    scrollbar-width: thin;
  }

  .line-chart-shell .progress-line-chart {
    width: 480px;
    min-width: 480px;
    height: 175px;
  }

  .chart-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 5px 0 8px;
    color: #48645f;
    font-size: 0.78rem;
    font-weight: 800;
  }

  .chart-scroll-hint span {
    color: var(--primary);
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .app-body .dashboard-hero h1.long-title {
    overflow-wrap: normal;
    font-size: clamp(1.95rem, 9vw, 2.3rem);
  }

  .progress-goal-card {
    padding-inline: 14px;
  }

  .trajectory-figure {
    padding-inline: 12px;
  }
}

/* --------------------------------------------------------------------------
   Responsive usability hardening
   -------------------------------------------------------------------------- */

:root {
  --shadow-strong: 0 18px 44px rgba(63, 43, 84, 0.16);
}

.mobile-nav-dock {
  display: none;
}

html:not(.js) .mobile-nav-dock {
  display: none;
}

.quick-navigator[open] {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 36px);
  overflow: hidden;
}

.quick-navigator[open] .quick-results {
  min-height: 0;
  flex: 1;
  max-height: none;
}

.message [data-dismiss-message],
.filter-pills button,
.view-switcher button,
.profile-section-nav a,
.period-switcher a,
.site-nav a {
  min-height: 44px;
}

.soft-link {
  min-height: 44px;
}

.permission-list label {
  min-height: 44px;
}

.status-chip,
.row-card strong,
.row-card small,
.document-card strong,
.document-card small,
.session-row strong,
.session-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #fff;
}

.auth-form :where(input, select, textarea):focus-visible,
.answer-text :where(input, textarea):focus-visible,
.quick-search input:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #fff;
}

.progress-entry-form :where(input:not([type="hidden"]), select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fcfdf9;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.progress-entry-form textarea {
  min-height: 120px;
  resize: vertical;
}

.progress-entry-form :where(input, select, textarea):focus-visible {
  border-color: var(--primary);
}

.profile-action-disclosure {
  flex: 1 1 100%;
}

.profile-action-disclosure > summary {
  width: max-content;
  list-style: none;
}

.profile-action-disclosure > summary::-webkit-details-marker {
  display: none;
}

.profile-action-disclosure > summary span {
  display: inline-block;
  margin-left: 8px;
  font-size: 1.15rem;
  line-height: 1;
}

.profile-action-disclosure[open] > summary span {
  transform: rotate(45deg);
}

.profile-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
}

.calendar-legend {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calendar-legend span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.practitioner-main {
  min-width: 0;
}

.chart-data-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  contain: inline-size;
}

.activity-layout,
.activity-chart,
.activity-timeline {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 980px) {
  .activity-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.calendar-event small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.25;
}

.answer-options.scale-options > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.answer-options.scale-options label {
  min-width: 0;
  justify-content: center;
  padding-inline: 6px;
}

@media (max-width: 1280px) {
  .practitioner-shell {
    grid-template-columns: 1fr;
  }

  .care-plan-grid,
  .care-plan-forms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .care-plan-grid .preference-panel,
  .care-plan-forms > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .care-plan-grid,
  .care-plan-forms {
    grid-template-columns: 1fr;
  }

  .care-plan-grid .preference-panel,
  .care-plan-forms > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 1120px) {
  .js .app-sidebar {
    visibility: hidden;
    pointer-events: none;
    transition: transform 180ms ease, visibility 0s linear 180ms;
  }

  .js .nav-open .app-sidebar {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
}

@media (max-width: 780px) {
  .session-calendar {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    margin-inline: -8px;
    padding: 3px 8px 12px;
    overflow-x: auto;
    scroll-padding-inline: 8px;
    scroll-snap-type: x proximity;
  }

  .calendar-day {
    min-width: min(78vw, 260px);
    min-height: 132px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .calendar-day.empty {
    min-width: 132px;
  }

  .client-row,
  .session-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .client-row em,
  .session-row em {
    grid-column: 2;
    justify-self: start;
  }

  .document-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .document-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-main {
    min-height: calc(100vh - 62px);
    min-height: calc(100dvh - 62px);
  }

  .has-mobile-nav .app-frame {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .has-mobile-nav .nav-toggle {
    display: none;
  }

  .mobile-nav-dock {
    position: fixed;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 50;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 3px;
    min-height: 66px;
    padding: 5px;
    background: rgba(252, 250, 252, 0.97);
    border: 1px solid var(--primary-soft-strong);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(46, 31, 59, 0.22);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-dock a,
  .mobile-nav-dock button {
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 4px 2px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-nav-dock a[aria-current="page"],
  .mobile-nav-dock button[aria-current="page"] {
    color: var(--primary-strong);
    background: var(--primary-soft);
  }

  .mobile-nav-dock svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .mobile-nav-badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 7px);
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding-inline: 4px;
    color: #fff;
    background: #9f3526;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 0.58rem;
    line-height: 1;
  }

  .app-topbar {
    padding-inline: 14px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .period-switcher {
    top: 62px;
  }

  .auth-shell.story .auth-panel {
    order: -1;
  }

  .auth-shell.story .auth-story {
    min-height: 230px;
  }

  .site-header {
    position: sticky;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 12px 14px;
  }

  .site-nav {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .site-nav a {
    padding-inline: 10px;
  }

  .metric-strip:not(.progress-metrics) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-tile {
    min-height: 94px;
    padding: 15px;
  }

  .progress-toolbar .filter-pills {
    flex-wrap: nowrap;
    padding: 2px 1px 7px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .progress-toolbar .filter-pills button {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .profile-action-disclosure > summary,
  .profile-action-links .button {
    width: 100%;
  }

  .priority-list > a strong,
  .priority-list > a small {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .result-panel {
    min-height: auto;
  }

  .quick-navigator[open] {
    max-height: calc(100dvh - 20px);
  }
}

@media (max-width: 350px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }
}

/* Practitioner workspace v2 -------------------------------------------------
   Kept as one final component layer so older dashboard rules cannot reverse
   laptop and phone breakpoints. */

.practitioner-dashboard,
.practitioner-directory,
.session-form-page {
  --workspace-primary: var(--primary);
  --workspace-navy: var(--primary-deep);
  --workspace-cream: #fffdf7;
  position: relative;
  min-width: 0;
  overflow: clip;
  background:
    radial-gradient(circle at 92% 3%, rgba(61, 127, 156, 0.13), transparent 24rem),
    radial-gradient(circle at 4% 30%, rgba(112, 93, 153, 0.1), transparent 22rem),
    linear-gradient(180deg, #faf8fb 0%, #f5f1f7 52%, #f8f5ed 100%);
}

.practitioner-dashboard::before,
.practitioner-directory::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: 0.45;
  background-image: radial-gradient(rgba(112, 93, 153, 0.13) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, black, transparent 42%);
}

.practitioner-dashboard > *,
.practitioner-directory > * {
  position: relative;
  z-index: 1;
}

.practitioner-dashboard svg,
.practitioner-directory svg,
.session-form-page svg,
.session-dialog svg,
.hero-actions .button svg,
.session-hero .button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.practitioner-dashboard .button,
.practitioner-directory .button,
.session-form-page .button,
.session-hero .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.app-body .practitioner-hero-v2 {
  margin: 0;
  padding: clamp(22px, 4vw, 48px) var(--page-pad) 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.92) 0 5rem, transparent 5.1rem),
    linear-gradient(125deg, #ece6f2 0%, #faf7ed 48%, #e3f1ed 100%);
  border: 0;
  border-bottom: 1px solid rgba(63, 43, 84, 0.12);
  border-radius: 0 0 28px 28px;
  box-shadow: 0 18px 44px rgba(23, 61, 75, 0.08);
}

.practitioner-hero-v2::after {
  position: absolute;
  top: -90px;
  right: -55px;
  width: 290px;
  height: 290px;
  content: "";
  background:
    linear-gradient(90deg, rgba(112, 93, 153, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(112, 93, 153, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  border-radius: 50%;
  transform: rotate(12deg);
  mask-image: radial-gradient(circle, black, transparent 70%);
}

.practitioner-hero-v2 .hero-panel {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
}

.practitioner-hero-copy {
  min-width: 0;
}

.practitioner-hero-copy .eyebrow,
.directory-hero .eyebrow,
.session-form-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary-strong);
}

.practitioner-hero-copy .eyebrow svg,
.directory-hero .eyebrow svg,
.session-form-hero .eyebrow svg {
  width: 17px;
  height: 17px;
}

.app-body .practitioner-hero-v2 h1 {
  max-width: 780px;
  font-size: clamp(2.7rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.practitioner-hero-copy > p:not(.eyebrow) {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.55;
}

.practitioner-hero-actions {
  margin-top: 24px;
}

.practitioner-next-session {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  min-height: 142px;
  padding: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(112, 93, 153, 0.22);
  border-top: 0;
  border-radius: 20px;
  box-shadow: 0 18px 44px rgba(63, 43, 84, 0.14);
  text-decoration: none;
  backdrop-filter: blur(16px);
}

.practitioner-next-session::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--sky));
  border-radius: 0 0 5px 5px;
}

.hero-aside-icon,
.panel-icon,
.attention-item-icon,
.metric-icon,
.signal-shortcut-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.hero-aside-icon {
  width: 48px;
  height: 48px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-deep));
  border-radius: 15px;
  box-shadow: 0 9px 20px rgba(63, 43, 84, 0.24);
}

.practitioner-next-session > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.practitioner-next-session small {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practitioner-next-session strong,
.practitioner-next-session span span {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.practitioner-next-session strong {
  font-size: 1.08rem;
}

.practitioner-next-session span span {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-aside-arrow,
.row-arrow,
.metric-arrow {
  width: 18px !important;
  height: 18px !important;
}

.practitioner-next-session:hover,
.practitioner-next-session:focus-visible {
  border-color: rgba(112, 93, 153, 0.52);
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(63, 43, 84, 0.18);
}

.practitioner-attention,
.pinned-client-section,
.signal-shortcuts,
.recent-session-section,
.client-directory-results,
.session-results {
  padding: var(--section-pad) var(--page-pad) 0;
}

.practitioner-attention .dashboard-section-heading,
.pinned-client-section .dashboard-section-heading,
.signal-shortcuts .dashboard-section-heading,
.recent-session-section .dashboard-section-heading,
.client-directory-results .dashboard-section-heading,
.session-results .dashboard-section-heading,
.clinic-directory .dashboard-section-heading {
  padding: 0 0 18px;
}

.attention-total {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  color: #842f23;
  background: #fae2dc;
  border: 1px solid rgba(199, 95, 74, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.attention-total.clear {
  color: #22613b;
  background: #e1f0e5;
  border-color: rgba(47, 122, 69, 0.22);
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.attention-panel {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(41, 78, 70, 0.13);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(30, 60, 52, 0.07);
  backdrop-filter: blur(10px);
}

.attention-panel.overdue-panel {
  background:
    linear-gradient(180deg, rgba(250, 226, 220, 0.62), rgba(255, 255, 255, 0.94) 38%);
  border-color: rgba(199, 95, 74, 0.22);
}

.attention-panel > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-icon {
  width: 40px;
  height: 40px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 12px;
}

.panel-icon.coral {
  color: #8a382b;
  background: var(--coral-soft);
}

.panel-icon.gold {
  color: #725411;
  background: var(--gold-soft);
}

.panel-icon.violet {
  color: #354d80;
  background: var(--violet-soft);
}

.panel-icon.sky {
  color: #285c74;
  background: var(--sky-soft);
}

.attention-panel > header > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attention-panel header small,
.session-editor-panel header small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.attention-panel h3 {
  margin: 0;
  font-size: 1.02rem;
}

.attention-panel > header > strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  color: #35514b;
  background: #edf3ef;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.attention-list {
  display: grid;
  gap: 7px;
}

.attention-list > a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 66px;
  padding: 9px;
  color: var(--ink);
  background: rgba(249, 251, 247, 0.92);
  border: 1px solid #e2e9e3;
  border-radius: 13px;
  text-decoration: none;
}

.attention-list > a:hover,
.attention-list > a:focus-visible {
  background: #fff;
  border-color: #abcabd;
  box-shadow: 0 8px 18px rgba(22, 33, 31, 0.07);
}

.attention-item-icon {
  width: 34px;
  height: 34px;
  color: #285c74;
  background: var(--sky-soft);
  border-radius: 10px;
}

.attention-item-icon.task {
  color: #725411;
  background: var(--gold-soft);
}

.attention-item-icon.assessment {
  color: #354d80;
  background: var(--violet-soft);
}

.attention-item-icon svg {
  width: 17px;
  height: 17px;
}

.attention-list > a > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attention-list > a small,
.attention-list > a strong,
.attention-list > a em {
  overflow: hidden;
  text-overflow: ellipsis;
}

.attention-list > a small {
  white-space: nowrap;
}

.attention-list > a strong,
.attention-list > a em {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.attention-list > a small {
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.attention-list > a strong {
  font-size: 0.83rem;
}

.attention-list > a em {
  color: var(--muted);
  font-size: 0.71rem;
  font-style: normal;
}

.calm-empty {
  display: flex;
  gap: 11px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  color: #34534c;
  background: #f1f6f1;
  border: 1px dashed #bfd1c5;
  border-radius: 14px;
}

.calm-empty > svg {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--success);
}

.calm-empty span {
  display: grid;
  gap: 3px;
}

.calm-empty small {
  color: var(--muted);
  line-height: 1.4;
}

.app-body .practitioner-metrics-v2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding-top: var(--section-pad);
}

.app-body .practitioner-metrics-v2 .metric-tile {
  min-width: 0;
  min-height: 132px;
  padding: 17px;
}

.metric-link {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.metric-link::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  content: "";
  background: currentColor;
  border-radius: 50%;
  opacity: 0.055;
}

.metric-link:hover,
.metric-link:focus-visible {
  transform: translateY(-3px);
  border-color: var(--primary-soft-strong);
  box-shadow: 0 18px 38px rgba(63, 43, 84, 0.14);
}

.metric-icon {
  width: 47px;
  height: 47px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 14px;
}

.metric-link.sky .metric-icon {
  color: #285c74;
  background: var(--sky-soft);
}

.metric-link.gold .metric-icon {
  color: #725411;
  background: var(--gold-soft);
}

.metric-link.violet .metric-icon {
  color: #354d80;
  background: var(--violet-soft);
}

.metric-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.app-body .metric-link .metric-copy > span {
  color: #475c57;
  font-size: clamp(0.82rem, 1.2vw, 0.94rem);
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.app-body .metric-link .metric-copy > strong {
  margin: 2px 0 0;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  line-height: 1;
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.app-body .metric-link .metric-copy > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.section-link svg {
  width: 17px;
  height: 17px;
}

.pinned-client-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 14px;
  padding: 2px 2px 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
}

.pinned-client-rail > * {
  scroll-snap-align: start;
}

.client-card-v2 {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d9e2db;
  border-top: 4px solid var(--card-tone, var(--teal));
  border-radius: 18px;
  box-shadow: 0 11px 28px rgba(28, 61, 54, 0.08);
}

.client-card-v2.tone-coral { --card-tone: var(--coral); --card-soft: var(--coral-soft); }
.client-card-v2.tone-gold { --card-tone: #b4831f; --card-soft: var(--gold-soft); }
.client-card-v2.tone-violet { --card-tone: var(--violet); --card-soft: var(--violet-soft); }
.client-card-v2.tone-sky { --card-tone: var(--sky); --card-soft: var(--sky-soft); }
.client-card-v2.tone-olive { --card-tone: var(--moss); --card-soft: var(--moss-soft); }
.client-card-v2.tone-teal { --card-tone: var(--teal); --card-soft: var(--teal-soft); }

.client-card-v2 > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 15px 15px 11px;
}

.client-card-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.client-card-avatar,
.client-chip-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--card-tone, var(--teal)), #294f5b);
  font-weight: 950;
}

.client-card-avatar {
  width: 47px;
  height: 47px;
  border-radius: 14px;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--card-tone, var(--teal)) 22%, transparent);
}

.client-card-identity > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.client-card-identity strong,
.client-card-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-card-identity strong {
  font-size: 1.02rem;
}

.client-card-identity small {
  color: var(--muted);
  font-size: 0.78rem;
}

.pin-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #687773;
  background: #f5f7f3;
  border: 1px solid #dbe2dc;
  border-radius: 12px;
  cursor: pointer;
}

.pin-button.active {
  color: #7a5710;
  background: var(--gold-soft);
  border-color: rgba(180, 131, 31, 0.36);
}

.pin-button.active svg {
  fill: currentColor;
}

.pin-button:hover,
.pin-button:focus-visible {
  color: #725411;
  background: #fff4cc;
  border-color: #c5a04c;
}

.client-session-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 59px;
  margin: 0 15px;
  padding: 10px 11px;
  color: var(--ink);
  background: color-mix(in srgb, var(--card-soft, var(--teal-soft)) 54%, white);
  border: 1px solid color-mix(in srgb, var(--card-tone, var(--teal)) 17%, white);
  border-radius: 12px;
  text-decoration: none;
}

.client-session-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.client-session-summary small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.client-session-summary strong {
  font-size: 0.8rem;
}

.client-session-summary time,
.client-session-summary > .status-chip {
  flex: 0 0 auto;
  color: #31524b;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.client-signal-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 11px 15px;
}

.client-signal-links a {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 5px 2px;
  color: #63706d;
  background: #f7f8f5;
  border: 1px solid #e2e6e1;
  border-radius: 10px;
  font-size: 0.63rem;
  font-weight: 850;
  text-decoration: none;
}

.client-signal-links a span {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.client-signal-links a:hover,
.client-signal-links a:focus-visible {
  color: var(--primary-strong);
  background: var(--primary-wash);
  border-color: var(--primary-soft-strong);
}

.client-card-v2 > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 15px 14px;
  border-top: 1px solid #edf0ec;
}

.client-open-link,
.client-schedule-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.client-open-link svg,
.client-schedule-link svg {
  width: 16px;
  height: 16px;
}

.client-schedule-link {
  padding: 8px 10px;
  color: #354d80;
  background: var(--violet-soft);
}

.pinned-empty,
.directory-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #baccc1;
  border-radius: 18px;
}

.pinned-empty > span:nth-child(2),
.directory-empty > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 4px;
}

.pinned-empty small,
.directory-empty small {
  color: var(--muted);
}

.signal-shortcuts .dashboard-section-heading > p {
  max-width: 400px;
  text-align: right;
}

.signal-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.signal-shortcut {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 96px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dce3dd;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(28, 61, 54, 0.06);
  text-decoration: none;
}

.signal-shortcut > .row-arrow {
  display: none;
}

.signal-shortcut-icon {
  width: 38px;
  height: 38px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 11px;
}

.signal-shortcut.coral .signal-shortcut-icon { color: #8a382b; background: var(--coral-soft); }
.signal-shortcut.gold .signal-shortcut-icon { color: #725411; background: var(--gold-soft); }
.signal-shortcut.violet .signal-shortcut-icon { color: #354d80; background: var(--violet-soft); }
.signal-shortcut.sky .signal-shortcut-icon { color: #285c74; background: var(--sky-soft); }

.signal-shortcut > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.signal-shortcut strong {
  font-size: 1.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.signal-shortcut span span {
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-shortcut small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-shortcut:hover,
.signal-shortcut:focus-visible {
  border-color: #b6a6c8;
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(63, 43, 84, 0.12);
}

.practitioner-calendar-section {
  margin: var(--section-pad) var(--page-pad) 0;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d5dfd7;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(25, 61, 53, 0.09);
}

.calendar-command-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.calendar-command-bar h2 {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.calendar-command-bar > div > p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-period-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: #f0f4ef;
  border: 1px solid #dce4dd;
  border-radius: 13px;
}

.calendar-period-nav a {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  min-height: 44px;
  padding: 7px 10px;
  color: #34524c;
  background: transparent;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.calendar-period-nav a:hover,
.calendar-period-nav a:focus-visible {
  background: #fff;
  box-shadow: 0 4px 12px rgba(24, 62, 53, 0.08);
}

.calendar-client-tray {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 15px;
  padding: 12px;
  background:
    linear-gradient(110deg, rgba(216, 235, 230, 0.7), rgba(219, 234, 240, 0.62));
  border: 1px solid #cbded6;
  border-radius: 16px;
}

.calendar-client-tray-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.calendar-client-tray-copy > span:last-child {
  display: grid;
  gap: 3px;
}

.calendar-client-tray-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.calendar-client-list {
  display: flex;
  gap: 7px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.calendar-client-chip {
  --card-tone: var(--teal);
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  min-width: 246px;
  min-height: 49px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cfdbd3;
  border-radius: 12px;
  scroll-snap-align: start;
}

.calendar-client-chip.tone-coral { --card-tone: var(--coral); }
.calendar-client-chip.tone-gold { --card-tone: #b4831f; }
.calendar-client-chip.tone-violet { --card-tone: var(--violet); }
.calendar-client-chip.tone-sky { --card-tone: var(--sky); }
.calendar-client-chip.tone-olive { --card-tone: var(--moss); }
.calendar-client-chip.tone-teal { --card-tone: var(--teal); }

.calendar-client-chip.is-dragging {
  opacity: 0.48;
  cursor: grabbing;
}

.client-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.calendar-client-chip > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow: hidden;
  color: #294740;
  font-size: 0.76rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

.calendar-client-chip > .client-chip-schedule {
  justify-content: center;
  min-width: 76px;
  min-height: 44px;
  padding: 5px 8px;
  color: #354d80;
  background: var(--violet-soft);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

.drag-handle {
  display: grid;
  place-items: center;
  width: 24px;
  color: #77847f;
  cursor: grab;
}

.drag-handle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.session-calendar-v2 {
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
}

.session-calendar-v2 .calendar-day {
  min-width: 0;
  min-height: 166px;
  padding: 9px;
  background: #fafcf9;
  border-color: #dde5df;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.session-calendar-v2 .calendar-day.today {
  background: var(--primary-soft);
  border-color: #9d8bb5;
  box-shadow: inset 0 0 0 2px rgba(112, 93, 153, 0.14);
}

.session-calendar-v2 .calendar-day.is-drop-target {
  background: #fff8dc;
  border-color: #b88a2c;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(107, 77, 15, 0.13);
}

.session-calendar-v2 .calendar-day > header {
  min-height: 38px;
}

.session-calendar-v2 .calendar-day time {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.day-add-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-soft-strong);
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
}

.day-add-button svg {
  width: 16px;
  height: 16px;
}

.calendar-event-wrap {
  position: relative;
  min-width: 0;
}

.session-calendar-v2 .calendar-event {
  min-width: 0;
  min-height: 62px;
  padding: 8px 30px 8px 9px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-soft), #faf7ed);
  border-color: var(--primary-soft-strong);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
}

.calendar-event-wrap.tone-teal .calendar-event {
  background: linear-gradient(135deg, #e8f3ee, #f6f2df);
  border-color: #c7dcd1;
  border-left-color: var(--teal);
}

.calendar-event-wrap.tone-coral .calendar-event {
  background: linear-gradient(135deg, #fae9e4, #fff8ee);
  border-color: #e7c4ba;
}

.calendar-event-wrap.tone-gold .calendar-event {
  background: linear-gradient(135deg, #f8edc9, #fffaf0);
  border-color: #dec986;
}

.calendar-event-wrap.tone-violet .calendar-event {
  background: linear-gradient(135deg, #eee7f7, #faf7fd);
  border-color: #d0c0e4;
}

.calendar-event-wrap.tone-sky .calendar-event {
  background: linear-gradient(135deg, #e1f0f5, #f5fbfc);
  border-color: #bdd7df;
}

.calendar-event-wrap.tone-olive .calendar-event {
  background: linear-gradient(135deg, #e9efdf, #f8faf3);
  border-color: #cad7b8;
}

.session-calendar-v2 .calendar-event[draggable="true"] {
  cursor: grab;
}

.session-calendar-v2 .calendar-event.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.session-calendar-v2 .calendar-event time,
.session-calendar-v2 .calendar-event strong,
.session-calendar-v2 .calendar-event small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-status {
  display: inline-flex;
  width: fit-content;
  padding: 2px 6px;
  color: #40534e;
  background: #edf1ee;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 900;
  line-height: 1.35;
}

.calendar-event-status.status-canceled {
  color: #7f3f46;
  background: #f9e6e8;
}

.calendar-event-status.status-completed {
  color: #285e51;
  background: #dbefe6;
}

.calendar-event-status.in-progress {
  color: #5a4610;
  background: #f7e8b5;
}

.session-calendar-v2 .calendar-event time {
  color: #315c51;
  font-size: 0.68rem;
  font-weight: 900;
}

.session-calendar-v2 .calendar-event strong {
  margin-top: 2px;
  font-size: 0.76rem;
}

.calendar-event-wrap.canceled {
  opacity: 0.65;
}

.calendar-edit-link {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #37534d;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(55, 83, 77, 0.15);
  border-radius: 8px;
}

.calendar-session-drag {
  position: absolute;
  right: 7px;
  bottom: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #60716c;
  cursor: grab;
}

.calendar-session-drag svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.calendar-event-wrap.is-dragging {
  opacity: 0.5;
}

.calendar-edit-link svg {
  width: 14px;
  height: 14px;
}

.calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 13px;
  color: var(--muted);
  border-top: 1px solid #e4e9e4;
  font-size: 0.78rem;
}

.calendar-footer span,
.calendar-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-footer a {
  min-height: 44px;
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.calendar-footer svg {
  width: 16px;
  height: 16px;
}

.recent-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: var(--section-pad);
}

.recent-session-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 86px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dae2dc;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(25, 61, 53, 0.06);
  text-decoration: none;
}

.recent-session-date {
  display: grid;
  place-items: center;
  width: 48px;
  height: 56px;
  color: #31574e;
  background: #e3f0ea;
  border-radius: 12px;
}

.recent-session-date strong {
  font-size: 1.25rem;
  line-height: 1;
}

.recent-session-date small {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recent-session-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.recent-session-card > span:nth-child(2) > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-session-card > span:nth-child(2) > small {
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recent-session-card > span:nth-child(2) > span {
  color: var(--muted);
  font-size: 0.76rem;
}

/* Practitioner client and session directories */

.directory-hero,
.session-form-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(34px, 6vw, 76px) var(--page-pad) 34px;
  background:
    radial-gradient(circle at 84% 15%, rgba(255, 255, 255, 0.85), transparent 13rem),
    linear-gradient(125deg, #ece6f2, #faf7ed 52%, #e3f1ed);
  border-bottom: 1px solid rgba(112, 93, 153, 0.15);
  border-radius: 0 0 28px 28px;
}

.directory-hero > div:first-child,
.session-form-hero > div:first-child {
  max-width: 800px;
}

.directory-hero h1,
.session-form-hero h1 {
  font-size: clamp(2.5rem, 5.8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.directory-hero > div:first-child > p:last-child,
.session-form-hero > div:first-child > p:last-child {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.directory-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.directory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: var(--section-pad) var(--page-pad) 0;
}

.directory-summary a {
  display: grid;
  gap: 3px;
  min-height: 96px;
  padding: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d7e0d9;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(25, 61, 53, 0.06);
  text-decoration: none;
}

.directory-summary a[aria-current="page"],
.directory-summary a:hover,
.directory-summary a:focus-visible {
  background: var(--primary-soft);
  border-color: #b6a6c8;
}

.directory-summary a.coral[aria-current="page"],
.directory-summary a.coral:hover {
  background: #fbeae5;
  border-color: #d99788;
}

.directory-summary strong {
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.directory-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.clinic-directory {
  padding: var(--section-pad) var(--page-pad) 0;
}

.clinic-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.clinic-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 94px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d6e1db;
  border-radius: 16px;
  text-decoration: none;
}

.clinic-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #285c74;
  background: var(--sky-soft);
  border-radius: 14px;
}

.clinic-summary-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.clinic-summary-card > span:nth-child(2) strong,
.clinic-summary-card > span:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clinic-summary-card > span:nth-child(2) small {
  color: var(--muted);
  font-size: 0.76rem;
}

.clinic-session-count {
  display: grid;
  justify-items: end;
  color: #244f62;
  font-size: 1.3rem;
  font-weight: 950;
}

.clinic-session-count small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.client-filter-panel {
  margin: var(--section-pad) var(--page-pad) 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d5dfd8;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(25, 61, 53, 0.07);
}

.filter-panel-heading {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 14px;
}

.filter-panel-heading > span:last-child {
  display: grid;
}

.filter-panel-heading .eyebrow {
  margin: 0 0 3px;
}

.filter-panel-heading h2 {
  font-size: 1.45rem;
}

.client-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  align-items: end;
}

.client-filter-form label,
.session-editor-grid label,
.session-dialog-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #38534d;
  font-size: 0.76rem;
  font-weight: 900;
}

.client-filter-form input,
.client-filter-form select,
.session-editor-grid input,
.session-editor-grid select,
.session-editor-grid textarea,
.session-dialog-grid input,
.session-dialog-grid select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfcf9;
  border: 1px solid #cbd7cf;
  border-radius: 11px;
}

.client-filter-form .span-two,
.session-editor-grid .span-two,
.session-dialog-grid .span-two {
  grid-column: span 2;
}

.filter-input-wrap {
  position: relative;
  display: block;
}

.filter-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: #71807b;
  transform: translateY(-50%);
}

.filter-input-wrap input {
  padding-left: 39px;
}

.filter-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-card-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 0 var(--section-pad);
}

.pagination a,
.pagination span {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 900;
}

.pagination a {
  color: var(--primary-strong);
  background: var(--primary-soft);
  text-decoration: none;
}

.session-directory-list {
  display: grid;
  gap: 9px;
  padding-bottom: var(--section-pad);
}

.session-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d8e1da;
  border-left: 5px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(25, 61, 53, 0.055);
}

.session-directory-row.completed { border-left-color: var(--success); }
.session-directory-row.canceled { border-left-color: var(--coral); opacity: 0.75; }
.session-directory-row.overdue { border-left-color: #b78119; background: #fffdf5; }

.session-directory-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  color: var(--ink);
  text-decoration: none;
}

.session-date-block {
  display: grid;
  place-items: center;
  width: 55px;
  min-height: 64px;
  padding: 6px;
  color: #285c54;
  background: #e2f0e9;
  border-radius: 12px;
}

.session-date-block strong {
  font-size: 1.35rem;
  line-height: 1;
}

.session-date-block span,
.session-date-block small {
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.session-directory-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.session-directory-copy > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-directory-copy small {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 900;
}

.session-directory-copy strong {
  font-size: 1rem;
}

.session-directory-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.session-row-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 11px;
  color: #354d80;
  background: var(--violet-soft);
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
}

.session-row-edit svg {
  width: 16px;
  height: 16px;
}

/* Session forms and confirmation dialogs */

.session-form-page {
  min-height: calc(100vh - 62px);
}

.session-form-hero {
  padding-top: clamp(30px, 5vw, 60px);
}

.session-editor {
  display: grid;
  gap: 14px;
  padding: var(--section-pad) var(--page-pad);
}

.session-editor-panel {
  padding: clamp(16px, 3vw, 24px);
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid #d5dfd8;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(25, 61, 53, 0.07);
}

.session-editor-panel > header {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 16px;
}

.session-editor-panel > header > span:last-child {
  display: grid;
}

.session-editor-panel h2 {
  font-size: 1.45rem;
}

.session-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.session-editor-grid textarea {
  min-height: 116px;
  resize: vertical;
}

.session-editor-grid label > small {
  color: var(--muted);
  font-weight: 600;
}

.session-editor-grid .errorlist,
.session-dialog-grid .errorlist {
  margin: 0;
  padding: 0;
  color: var(--danger);
  list-style: none;
  font-size: 0.72rem;
}

.session-editor-actions {
  position: sticky;
  bottom: 12px;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px;
  background: rgba(250, 251, 247, 0.92);
  border: 1px solid #d1dcd4;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(20, 55, 48, 0.12);
  backdrop-filter: blur(15px);
}

.session-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #fbfcf8;
  border: 1px solid #cbd8d0;
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(46, 31, 59, 0.32);
}

.session-dialog.compact {
  width: min(560px, calc(100vw - 28px));
}

.session-dialog::backdrop {
  background: rgba(38, 29, 49, 0.6);
  backdrop-filter: blur(5px);
}

.session-dialog-form {
  padding: 20px;
}

.session-dialog-form > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.session-dialog-form > header > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.session-dialog-form > header small {
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-dialog-form h2 {
  font-size: 1.35rem;
}

.session-dialog-form .form-note {
  margin: 15px 0;
}

.session-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.session-dialog-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e0e6e0;
}

/* Quiet mode keeps the information hierarchy while removing decoration. */

.quiet-mode .practitioner-dashboard,
.quiet-mode .practitioner-directory,
.quiet-mode .session-form-page,
.quiet-mode .practitioner-hero-v2,
.quiet-mode .directory-hero,
.quiet-mode .session-form-hero,
.quiet-mode .calendar-client-tray {
  background: var(--paper) !important;
}

.quiet-mode .practitioner-dashboard::before,
.quiet-mode .practitioner-directory::before,
.quiet-mode .practitioner-hero-v2::after,
.quiet-mode .metric-link::after {
  display: none;
}

.quiet-mode :where(.attention-panel, .metric-link, .client-card-v2, .signal-shortcut, .practitioner-calendar-section, .recent-session-card, .client-filter-panel, .session-editor-panel) {
  box-shadow: none !important;
  backdrop-filter: none;
}

@media (max-width: 1240px) {
  .attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attention-panel.overdue-panel {
    grid-column: 1 / -1;
  }

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

  .client-card-directory-grid,
  .clinic-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .practitioner-hero-v2 .hero-panel {
    grid-template-columns: 1fr;
  }

  .practitioner-next-session {
    min-height: 108px;
  }

  .app-body .practitioner-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-client-tray {
    grid-template-columns: 1fr;
  }

  .session-calendar-v2 {
    display: flex;
    width: 100%;
    gap: 9px;
    padding: 3px 2px 13px;
    overflow-x: auto;
    scroll-padding-inline: 2px;
    scroll-snap-type: x proximity;
  }

  .session-calendar-v2 .calendar-day {
    min-width: 170px;
    flex: 0 0 170px;
    scroll-snap-align: start;
  }

  .directory-hero,
  .session-form-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-hero-actions {
    justify-content: flex-start;
  }

  .client-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .app-body .practitioner-hero-v2 {
    padding: 24px var(--page-pad) 22px;
    border-radius: 0 0 20px 20px;
  }

  .app-body .practitioner-hero-v2 h1 {
    font-size: clamp(2.55rem, 13vw, 4.2rem);
  }

  .practitioner-hero-copy > p:not(.eyebrow) {
    margin-top: 12px;
    font-size: 0.94rem;
  }

  .practitioner-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .practitioner-hero-actions .button.primary {
    grid-column: 1 / -1;
  }

  .practitioner-hero-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    font-size: 0.78rem;
  }

  .practitioner-next-session {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 88px;
    padding: 14px;
    border-radius: 16px;
  }

  .hero-aside-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .practitioner-attention,
  .pinned-client-section,
  .signal-shortcuts,
  .recent-session-section,
  .client-directory-results,
  .session-results {
    padding-top: 28px;
  }

  .attention-grid,
  .recent-session-grid,
  .client-card-directory-grid,
  .clinic-card-grid {
    grid-template-columns: 1fr;
  }

  .attention-panel.overdue-panel {
    grid-column: auto;
  }

  .attention-list > a small,
  .attention-list > a strong,
  .attention-list > a em {
    white-space: normal;
  }

  .app-body .practitioner-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .app-body .practitioner-metrics-v2 .metric-tile {
    min-height: 116px;
    padding: 13px;
  }

  .metric-link {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
  }

  .metric-arrow {
    display: none;
  }

  .metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .app-body .metric-link .metric-copy > strong {
    font-size: 2rem;
  }

  .app-body .metric-link .metric-copy > small {
    display: none;
  }

  .pinned-client-rail {
    grid-auto-columns: min(88vw, 340px);
  }

  .signal-shortcuts .dashboard-section-heading > p {
    text-align: left;
  }

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

  .signal-shortcut {
    min-height: 86px;
  }

  .practitioner-calendar-section {
    margin-top: 30px;
    padding: 14px;
    border-radius: 18px;
  }

  .calendar-command-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-period-nav {
    width: 100%;
  }

  .calendar-period-nav a {
    flex: 1;
  }

  .calendar-client-tray-copy small {
    display: none;
  }

  .calendar-client-chip {
    min-width: 222px;
  }

  .drag-handle {
    display: none;
  }

  .calendar-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-hero,
  .session-form-hero {
    padding: 30px var(--page-pad) 25px;
    border-radius: 0 0 20px 20px;
  }

  .directory-hero h1,
  .session-form-hero h1 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

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

  .directory-summary a {
    min-height: 85px;
    padding: 12px;
  }

  .client-filter-panel {
    padding: 14px;
  }

  .client-filter-form,
  .session-editor-grid,
  .session-dialog-grid {
    grid-template-columns: 1fr;
  }

  .client-filter-form .span-two,
  .session-editor-grid .span-two,
  .session-dialog-grid .span-two {
    grid-column: auto;
  }

  .filter-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-directory-row {
    grid-template-columns: 1fr;
  }

  .session-row-edit {
    justify-self: stretch;
    justify-content: center;
  }

  .session-directory-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .session-directory-main > .status-chip {
    grid-column: 2;
    justify-self: start;
  }

  .session-directory-copy > * {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-line-clamp: unset;
  }

  .session-editor {
    padding-top: 28px;
  }

  .session-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    bottom: 78px;
  }

  .session-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .session-dialog-form {
    padding: 15px;
  }

  .session-dialog-form > footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mobile-nav-dock .mobile-secondary-link {
    display: none;
  }
}

@media (max-width: 390px) {
  .app-body .practitioner-metrics-v2 .metric-tile {
    min-height: 106px;
    padding: 11px;
  }

  .metric-icon {
    width: 36px;
    height: 36px;
  }

  .metric-icon svg {
    width: 17px;
    height: 17px;
  }

  .app-body .metric-link .metric-copy > span {
    font-size: 0.72rem;
  }

  .app-body .metric-link .metric-copy > strong {
    font-size: 1.75rem;
  }

  .client-signal-links {
    gap: 3px;
    padding-inline: 10px;
  }

  .client-signal-links a {
    font-size: 0.57rem;
  }

  .signal-shortcut {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    min-height: 108px;
    padding: 9px;
  }

  .signal-shortcut-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .signal-shortcut-icon svg {
    width: 16px;
    height: 16px;
  }

  .signal-shortcut span span,
  .signal-shortcut small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .signal-shortcut span span {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .signal-shortcut small {
    margin-top: 2px;
    font-size: 0.58rem;
    line-height: 1.25;
  }

  .pinned-empty,
  .directory-empty {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pinned-empty .button,
  .directory-empty .button {
    width: 100%;
  }
}

@media (max-width: 340px) {
  .app-body .practitioner-metrics-v2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-body .practitioner-metrics-v2 .metric-tile {
    min-height: 106px;
  }

  .signal-shortcut-grid,
  .directory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (hover: none), (pointer: coarse) {
  [draggable="true"] {
    -webkit-user-drag: none;
  }

  .drag-handle,
  .calendar-session-drag {
    display: none;
  }

  .day-add-button,
  .calendar-edit-link {
    width: 44px;
    height: 44px;
  }

  .session-calendar-v2 .calendar-event {
    padding-right: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-link,
  .signal-shortcut,
  .practitioner-next-session,
  .session-calendar-v2 .calendar-day {
    transition: none;
  }
}

/* Workspace hierarchy and contextual navigation ---------------------------
   The sidebar keeps its full information architecture on desktop. Compact
   viewports show the active branch in the drawer while the page-level
   context bar keeps nearby destinations one tap away. */

.workspace-nav a.workspace-nav-parent {
  position: relative;
}

.workspace-nav .nav-parent-arrow {
  width: 15px;
  height: 15px;
  margin-left: auto;
  opacity: 0.62;
  transform: rotate(90deg);
}

.workspace-nav a.workspace-nav-parent[aria-current="location"] {
  color: #fff;
  background:
    linear-gradient(
      90deg,
      rgba(185, 163, 211, 0.22),
      rgba(255, 255, 255, 0.07)
    );
  border-color: rgba(221, 211, 231, 0.26);
  box-shadow: inset 3px 0 0 #c9b8dc;
}

.workspace-nav a.workspace-nav-parent[aria-current="location"]
  .nav-parent-arrow {
  opacity: 1;
}

.workspace-nav-subtree {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 1px 0 8px;
  padding: 2px 0 3px 31px;
}

.workspace-nav-subtree::before {
  position: absolute;
  top: 0;
  bottom: 8px;
  left: 20px;
  width: 1px;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(210, 193, 225, 0.48),
    rgba(210, 193, 225, 0.09)
  );
}

.workspace-nav a.workspace-nav-child {
  position: relative;
  gap: 8px;
  min-height: 44px;
  padding: 7px 8px;
  color: rgba(249, 246, 251, 0.76);
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.2;
}

.workspace-nav a.workspace-nav-child:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.workspace-nav a.workspace-nav-child[aria-current="page"] {
  color: var(--primary-deepest);
  background: var(--primary-soft);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 7px 18px rgba(24, 15, 31, 0.23);
}

.workspace-nav a.workspace-nav-child > .nav-branch-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  flex: 0 0 7px;
  background: rgba(221, 211, 231, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.workspace-nav-child[aria-current="page"] .nav-branch-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(112, 93, 153, 0.14);
}

.workspace-nav-child > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.workspace-nav-child .nav-count {
  min-width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding-inline: 5px;
  font-size: 0.67rem;
}

.workspace-context-nav {
  position: sticky;
  top: 68px;
  z-index: 42;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: 100%;
  height: 60px;
  min-width: 0;
  padding: 7px var(--page-pad);
  color: var(--ink);
  background:
    linear-gradient(
      90deg,
      rgba(238, 233, 244, 0.97),
      rgba(250, 248, 251, 0.97) 48%,
      rgba(227, 241, 237, 0.97)
    );
  border-bottom: 1px solid rgba(79, 60, 102, 0.14);
  box-shadow: 0 7px 22px rgba(63, 43, 84, 0.08);
  backdrop-filter: blur(16px);
}

.workspace-context-trail,
.workspace-context-links,
.workspace-context-links a {
  display: flex;
  align-items: center;
}

.workspace-context-trail {
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-context-trail svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workspace-context-trail a,
.workspace-context-trail strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-context-trail a {
  text-decoration: none;
}

.workspace-context-trail a:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.workspace-context-trail strong {
  color: var(--primary-deep);
}

.workspace-context-links {
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 93, 153, 0.34) transparent;
  -webkit-overflow-scrolling: touch;
}

.workspace-context-links a {
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 0.77rem;
  font-weight: 820;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.workspace-context-links a:hover {
  color: var(--primary-deep);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(112, 93, 153, 0.22);
}

.workspace-context-links a[aria-current="page"] {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 7px 18px rgba(63, 43, 84, 0.22);
}

.workspace-context-links a.context-nav-action {
  color: var(--primary-deep);
  background: #f2dfaa;
  border-color: #dcc277;
}

.workspace-context-links a.context-nav-action[aria-current="page"] {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.workspace-context-links .context-nav-action span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
}

.workspace-context-links
  .context-nav-action[aria-current="page"]
  span {
  color: var(--primary-strong);
  background: #fff;
}

.workspace-context-nav + .app-main .profile-section-nav {
  top: 128px;
}

.workspace-context-nav + .app-main section[id] {
  scroll-margin-top: 198px;
}

/* Tools hub --------------------------------------------------------------- */

.tools-workspace {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 3.2vw, 46px) var(--page-pad)
    clamp(42px, 6vw, 80px);
  overflow: clip;
  background:
    radial-gradient(
      circle at 94% 4%,
      rgba(61, 127, 156, 0.13),
      transparent 25rem
    ),
    radial-gradient(
      circle at 2% 44%,
      rgba(112, 93, 153, 0.1),
      transparent 22rem
    ),
    linear-gradient(180deg, #faf8fb 0%, #f4f0f6 55%, #f8f6ee 100%);
}

.tools-workspace::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(
    rgba(112, 93, 153, 0.15) 0.7px,
    transparent 0.7px
  );
  background-size: 23px 23px;
  mask-image: linear-gradient(to bottom, black, transparent 48%);
}

.tools-workspace > * {
  position: relative;
  z-index: 1;
}

.tools-workspace svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tools-hub-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  min-height: 350px;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  color: #f9f6fb;
  background:
    radial-gradient(
      circle at 85% 14%,
      rgba(205, 188, 222, 0.26),
      transparent 14rem
    ),
    radial-gradient(
      circle at 5% 100%,
      rgba(236, 208, 133, 0.15),
      transparent 18rem
    ),
    linear-gradient(132deg, var(--primary-deepest) 0%, var(--primary-deep) 48%, var(--primary) 100%);
  border: 1px solid rgba(38, 29, 49, 0.32);
  border-radius: 28px;
  box-shadow: 0 22px 58px rgba(46, 31, 59, 0.24);
}

.tools-hub-hero::after {
  position: absolute;
  right: -92px;
  bottom: -145px;
  width: 360px;
  height: 360px;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(238, 233, 244, 0.13) 1px,
      transparent 1px
    ),
    linear-gradient(
      rgba(238, 233, 244, 0.13) 1px,
      transparent 1px
    );
  background-size: 26px 26px;
  border-radius: 50%;
  transform: rotate(14deg);
}

.tools-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.tools-hero-copy .eyebrow {
  color: #f0d58e;
}

.tools-hero-copy h1 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(2.75rem, 5.4vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.tools-hero-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 20px 0 0;
  color: #f9f6fb;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.65;
}

.tools-hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 25px;
}

.tools-hero-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 13px;
  color: #f9f6fb;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(238, 233, 244, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 820;
  backdrop-filter: blur(8px);
}

.tools-hero-summary svg {
  width: 17px;
  height: 17px;
  color: #f1d58d;
}

.tools-hero-graphic {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 265px;
}

.tool-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(238, 233, 244, 0.26);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.tool-orbit::before,
.tool-orbit::after {
  position: absolute;
  width: 10px;
  height: 10px;
  content: "";
  background: #f0d58e;
  border: 3px solid var(--primary-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(240, 213, 142, 0.1);
}

.tool-orbit-one {
  width: 250px;
  height: 250px;
}

.tool-orbit-one::before {
  top: 29px;
  right: 35px;
}

.tool-orbit-one::after {
  bottom: 29px;
  left: 35px;
}

.tool-orbit-two {
  width: 185px;
  height: 185px;
  border-style: dashed;
  transform: translate(-50%, -50%) rotate(28deg);
}

.tool-orbit-two::before {
  top: -6px;
  left: 82px;
}

.tool-orbit-two::after {
  right: -6px;
  bottom: 78px;
}

.tool-graphic-card {
  position: absolute;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 18px 42px rgba(28, 18, 36, 0.34);
  backdrop-filter: blur(8px);
}

.tool-graphic-form {
  top: 18px;
  left: 8%;
  flex-direction: column;
  gap: 14px;
  width: 158px;
  height: 204px;
  padding: 48px 19px 18px;
  background:
    linear-gradient(var(--primary), var(--primary)) 19px 18px / 54px 8px no-repeat,
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.96),
      rgba(238, 233, 244, 0.93)
    );
  border-radius: 18px;
  transform: rotate(-7deg);
}

.tool-graphic-form i {
  display: block;
  height: 10px;
  background:
    linear-gradient(90deg, #d0e2da 0 74%, transparent 74%),
    #fff;
  border: 1px solid #c6d9d0;
  border-radius: 5px;
}

.tool-graphic-chart {
  right: 2%;
  bottom: 11px;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  width: 180px;
  height: 132px;
  padding: 29px 22px 18px;
  background:
    linear-gradient(#235c6a, #235c6a) 20px 17px / 67px 7px no-repeat,
    linear-gradient(
      145deg,
      rgba(250, 251, 244, 0.97),
      rgba(231, 241, 236, 0.93)
    );
  border-radius: 18px;
  transform: rotate(6deg);
}

.tool-graphic-chart i {
  display: block;
  width: 19px;
  background: linear-gradient(180deg, #54a192, #16675e);
  border-radius: 5px 5px 2px 2px;
}

.tool-graphic-chart i:nth-child(1) {
  height: 28%;
}

.tool-graphic-chart i:nth-child(2) {
  height: 67%;
}

.tool-graphic-chart i:nth-child(3) {
  height: 46%;
}

.tool-graphic-chart i:nth-child(4) {
  height: 88%;
  background: linear-gradient(180deg, #e6c56d, #c59528);
}

.tool-hub-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 0.55fr);
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin: clamp(34px, 5vw, 60px) 0 20px;
}

.tool-hub-heading h2 {
  font-size: clamp(1.8rem, 3.2vw, 3.25rem);
}

.tool-hub-heading > p {
  justify-self: end;
  max-width: 570px;
  margin: 0;
  color: #60716c;
  line-height: 1.55;
}

.tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  min-width: 0;
}

.tool-hub-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 46px;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
  min-width: 0;
  min-height: 202px;
  padding: clamp(20px, 3vw, 30px);
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 13px 34px rgba(63, 43, 84, 0.11);
  text-decoration: none;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.tool-hub-card::before {
  position: absolute;
  top: -65px;
  right: -52px;
  width: 190px;
  height: 190px;
  content: "";
  pointer-events: none;
  background: rgba(112, 93, 153, 0.11);
  border-radius: 50%;
}

.tool-hub-card:hover {
  border-color: #b6a6c8;
  box-shadow: 0 20px 46px rgba(63, 43, 84, 0.17);
  transform: translateY(-3px);
}

.tool-hub-card-library {
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(112, 93, 153, 0.17),
      transparent 12rem
    ),
    linear-gradient(145deg, #fffdf7, var(--primary-soft));
}

.tool-hub-card-results {
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(61, 127, 156, 0.16),
      transparent 12rem
    ),
    linear-gradient(145deg, #fbfdf9, #e8f1f2);
  border-color: #cedee0;
}

.tool-card-icon,
.tool-card-arrow,
.tools-guidance-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.tool-card-icon {
  width: 64px;
  height: 64px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-deep));
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  box-shadow: 0 11px 25px rgba(63, 43, 84, 0.24);
}

.tool-hub-card-results .tool-card-icon {
  background: linear-gradient(145deg, #3d7f9c, #225868);
  box-shadow: 0 11px 25px rgba(34, 88, 104, 0.22);
}

.tool-card-icon svg {
  width: 28px;
  height: 28px;
}

.tool-card-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.tool-card-copy > * {
  min-width: 0;
}

.tool-card-kicker {
  color: var(--primary-strong);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tool-hub-card-results .tool-card-kicker {
  color: #316e85;
}

.tool-card-copy strong {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.1;
}

.tool-card-copy > span:last-child {
  color: #60706c;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tool-card-arrow {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 93, 153, 0.18);
  border-radius: 14px;
  transition:
    color 170ms ease,
    background 170ms ease,
    transform 170ms ease;
}

.tool-hub-card:hover .tool-card-arrow {
  color: #fff;
  background: var(--primary);
  transform: translateX(3px);
}

.tools-guidance {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  gap: 15px;
  margin-top: clamp(20px, 3vw, 30px);
  padding: 20px clamp(18px, 3vw, 28px);
  color: #39534d;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d6e2dc;
  border-left: 4px solid #d6af4e;
  border-radius: 17px;
  box-shadow: 0 9px 26px rgba(22, 61, 54, 0.07);
}

.tools-guidance-icon {
  width: 46px;
  height: 46px;
  color: var(--teal-strong);
  background: #e0efe8;
  border-radius: 14px;
}

.tools-guidance strong {
  display: block;
  color: #214840;
  line-height: 1.35;
}

.tools-guidance p {
  margin: 5px 0 0;
  color: #64736f;
  line-height: 1.5;
}

.tools-guidance a {
  color: var(--teal-strong);
  font-weight: 820;
  text-underline-offset: 3px;
}

.quiet-mode .workspace-context-nav,
.quiet-mode .tools-workspace,
.quiet-mode .tools-hub-hero,
.quiet-mode .tool-hub-card {
  background-image: none !important;
}

.quiet-mode .tool-orbit,
.quiet-mode .tools-workspace::before,
.quiet-mode .tools-hub-hero::after,
.quiet-mode .tool-hub-card::before {
  display: none;
}

.quiet-mode .tools-hub-hero,
.quiet-mode .tool-hub-card,
.quiet-mode .tools-guidance {
  box-shadow: none;
}

@media (max-width: 1120px) {
  .workspace-nav-subtree {
    display: none;
  }

  .workspace-nav-parent[aria-current="location"]
    + .workspace-nav-subtree {
    display: grid;
  }

  .workspace-nav .nav-parent-arrow {
    transform: none;
  }

  .workspace-nav
    a.workspace-nav-parent[aria-current="location"]
    .nav-parent-arrow {
    transform: rotate(90deg);
  }

  html:not(.js) .workspace-nav-subtree {
    grid-column: auto;
  }

  .workspace-context-nav {
    grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  }

  .tools-hub-hero {
    grid-template-columns: minmax(0, 1fr) minmax(245px, 0.65fr);
  }

  .tool-hub-card {
    grid-template-columns: 56px minmax(0, 1fr) 44px;
    padding: 21px;
  }

  .tool-card-icon {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 840px) {
  .tools-hub-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .tools-hero-graphic {
    width: min(420px, 100%);
    min-height: 220px;
    justify-self: center;
  }

  .tool-hub-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .tool-hub-heading > p {
    justify-self: start;
  }

  .tool-hub-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .workspace-context-nav {
    top: 62px;
    display: block;
    height: 56px;
    padding: 6px 10px;
  }

  .workspace-context-trail {
    display: none;
  }

  .workspace-context-links {
    justify-content: flex-start;
    width: 100%;
    height: 44px;
    padding-inline: 1px;
    scroll-padding-inline: 8px;
  }

  .workspace-context-links a {
    min-height: 44px;
    padding-inline: 11px;
    scroll-snap-align: start;
  }

  .workspace-context-nav + .app-main .profile-section-nav {
    top: 118px;
  }

  .workspace-context-nav + .app-main section[id] {
    scroll-margin-top: 190px;
  }

  .tools-workspace {
    padding: 16px 14px 54px;
  }

  .tools-hub-hero {
    gap: 18px;
    min-height: 0;
    padding: 27px 22px 22px;
    border-radius: 22px;
  }

  .tools-hero-copy h1 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .tools-hero-copy > p:not(.eyebrow) {
    margin-top: 16px;
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .tools-hero-summary {
    margin-top: 19px;
  }

  .tools-hero-graphic {
    min-height: 180px;
  }

  .tool-orbit-one {
    width: 184px;
    height: 184px;
  }

  .tool-orbit-two {
    width: 136px;
    height: 136px;
  }

  .tool-graphic-form {
    top: 8px;
    left: calc(50% - 115px);
    width: 118px;
    height: 150px;
    padding: 39px 14px 14px;
    background-position: 14px 15px, 0 0;
    background-size: 45px 7px, auto;
    border-radius: 15px;
  }

  .tool-graphic-chart {
    right: calc(50% - 120px);
    bottom: 2px;
    width: 132px;
    height: 96px;
    gap: 7px;
    padding: 26px 16px 13px;
    background-position: 16px 13px, 0 0;
    background-size: 53px 6px, auto;
    border-radius: 15px;
  }

  .tool-graphic-chart i {
    width: 14px;
  }

  .tool-hub-heading {
    margin-top: 34px;
  }

  .tool-hub-card {
    min-height: 176px;
    border-radius: 19px;
  }
}

@media (max-width: 390px) {
  .workspace-context-links a {
    padding-inline: 10px;
    font-size: 0.72rem;
  }

  .tools-workspace {
    padding-inline: 10px;
  }

  .tools-hub-hero {
    padding: 23px 17px 18px;
    border-radius: 19px;
  }

  .tools-hero-copy h1 {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .tools-hero-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .tools-hero-summary > span {
    width: 100%;
  }

  .tools-hero-graphic {
    min-height: 160px;
  }

  .tool-hub-heading h2 {
    font-size: 1.7rem;
  }

  .tool-hub-card {
    grid-template-columns: 48px minmax(0, 1fr) 38px;
    gap: 10px;
    min-height: 168px;
    padding: 16px 13px;
  }

  .tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .tool-card-icon svg {
    width: 23px;
    height: 23px;
  }

  .tool-card-copy {
    gap: 5px;
  }

  .tool-card-copy strong {
    font-size: 1.12rem;
  }

  .tool-card-copy > span:last-child {
    font-size: 0.78rem;
    line-height: 1.42;
  }

  .tool-card-arrow {
    width: 38px;
    height: 44px;
    border-radius: 12px;
  }

  .tools-guidance {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 16px 13px;
  }

  .tools-guidance-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 340px) {
  .workspace-context-nav {
    padding-inline: 7px;
  }

  .workspace-context-links {
    gap: 3px;
  }

  .workspace-context-links a {
    padding-inline: 9px;
    font-size: 0.69rem;
  }

  .tools-workspace {
    padding-inline: 8px;
  }

  .tools-hub-hero {
    padding-inline: 15px;
  }

  .tool-hub-card {
    grid-template-columns: 44px minmax(0, 1fr) 34px;
    gap: 8px;
    padding-inline: 11px;
  }

  .tool-card-icon {
    width: 44px;
    height: 44px;
  }

  .tool-card-arrow {
    width: 34px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .workspace-nav a.workspace-nav-parent,
  .workspace-nav a.workspace-nav-child,
  .workspace-context-links a {
    transition:
      color 150ms ease,
      background 150ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hub-card,
  .tool-card-arrow,
  .workspace-nav a.workspace-nav-parent,
  .workspace-nav a.workspace-nav-child,
  .workspace-context-links a {
    transition: none;
  }
}

/* Floating assistant --------------------------------------------------------
   Public, unapproved, and unsupported roles stay on local canned guidance.
   The live form is rendered only after server-side workspace authorization. */

.chatbot-root {
  --chatbot-safe-top: 84px;
  --chatbot-launcher-bottom: 24px;
  --chatbot-panel-bottom: 94px;
}

.public-body .chatbot-root {
  --chatbot-safe-top: 80px;
}

.app-body.has-context-nav .chatbot-root {
  --chatbot-safe-top: 144px;
}

.app-body:has(.profile-section-nav) .chatbot-root {
  --chatbot-safe-top: 202px;
}

html:not(.js) .chatbot-root {
  display: none;
}

.chatbot-launcher,
.chatbot-panel {
  position: fixed;
  right: 24px;
  z-index: 48;
}

.chatbot-launcher {
  bottom: var(--chatbot-launcher-bottom);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 58px;
  min-height: 58px;
  padding: 7px 15px 7px 7px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.25), transparent 34%),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 58%, var(--primary-deep) 100%);
  border: 1px solid rgba(38, 29, 49, 0.38);
  border-radius: 999px;
  box-shadow:
    0 18px 42px rgba(63, 43, 84, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  isolation: isolate;
}

.chatbot-launcher::after {
  position: absolute;
  inset: -5px;
  z-index: -1;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(112, 93, 153, 0.3);
  border-radius: inherit;
  animation: chatbot-breathe 3.2s ease-in-out infinite;
}

.chatbot-launcher[aria-expanded="true"] {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, var(--primary-strong), var(--primary-deepest));
}

.chatbot-launcher-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  color: var(--primary-deep);
  background: linear-gradient(145deg, #f8f4d9, var(--primary-soft));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  box-shadow: inset 0 -5px 11px rgba(112, 93, 153, 0.11);
}

.chatbot-launcher svg,
.chatbot-avatar svg,
.chatbot-close svg,
.chatbot-suggestions svg,
.chatbot-panel-footer svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.chatbot-launcher svg {
  width: 27px;
  height: 27px;
}

.chatbot-launcher svg path:nth-child(2) {
  stroke-width: 3.5;
}

.chatbot-launcher .chatbot-spark {
  color: #d69d32;
  stroke-width: 2;
}

.chatbot-launcher-copy {
  display: grid;
  gap: 1px;
  padding-right: 2px;
  text-align: left;
  white-space: nowrap;
}

.chatbot-launcher-copy small {
  color: rgba(249, 246, 251, 0.86);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.chatbot-launcher-copy strong {
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.2;
}

.chatbot-panel {
  bottom: var(--chatbot-panel-bottom);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(390px, calc(100vw - 48px));
  max-height: min(
    620px,
    calc(100vh - var(--chatbot-safe-top) - var(--chatbot-panel-bottom))
  );
  max-height: min(
    620px,
    calc(100dvh - var(--chatbot-safe-top) - var(--chatbot-panel-bottom))
  );
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(250, 248, 251, 0.99), rgba(252, 250, 244, 0.99));
  border: 1px solid rgba(112, 93, 153, 0.24);
  border-radius: 24px;
  box-shadow:
    0 26px 70px rgba(46, 31, 59, 0.29),
    0 4px 16px rgba(46, 31, 59, 0.12);
  animation: chatbot-panel-in 170ms ease-out;
}

.chatbot-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 15px 15px 14px 17px;
  color: #f9f6fb;
  background:
    radial-gradient(circle at 88% -20%, rgba(216, 165, 58, 0.28), transparent 45%),
    linear-gradient(130deg, var(--primary-deep) 0%, var(--primary-strong) 58%, var(--primary) 100%);
  border-bottom: 1px solid rgba(38, 29, 49, 0.34);
}

.chatbot-panel-header::after {
  position: absolute;
  right: 72px;
  bottom: 0;
  width: 68px;
  height: 26px;
  content: "";
  pointer-events: none;
  background-image: radial-gradient(rgba(240, 213, 148, 0.32) 1px, transparent 1px);
  background-size: 8px 8px;
  mask-image: linear-gradient(to top, #000, transparent);
}

.chatbot-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.chatbot-heading > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chatbot-heading small {
  color: rgba(249, 246, 251, 0.86);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.chatbot-heading strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: var(--primary-deep);
  background: linear-gradient(145deg, #fff8dd, var(--primary-soft));
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(38, 29, 49, 0.22);
}

.chatbot-avatar svg {
  width: 25px;
  height: 25px;
}

.chatbot-avatar svg path:nth-child(2) {
  stroke-width: 3.4;
}

.chatbot-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  color: #eff8f4;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
  cursor: pointer;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.chatbot-close svg {
  width: 20px;
  height: 20px;
}

.chatbot-panel-body {
  min-width: 0;
  min-height: 0;
  padding: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.chatbot-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
  margin-bottom: 14px;
}

.chatbot-mode-chip,
.chatbot-preview-chip,
.chatbot-live-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
}

.chatbot-mode-chip {
  gap: 6px;
  overflow: hidden;
  color: var(--teal-strong);
  background: #e1f0e8;
  border: 1px solid #c4dfd2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-mode-chip > span[aria-hidden="true"] {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: #1b7b6d;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(27, 123, 109, 0.12);
}

.chatbot-mode-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chatbot-preview-chip {
  flex: 0 0 auto;
  color: #6d5931;
  background: #f7edcf;
  border: 1px solid #ead8a7;
}

.chatbot-live-chip {
  flex: 0 0 auto;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border: 1px solid #b7d8cf;
}

.chatbot-transcript {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.chatbot-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.chatbot-message-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--primary);
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 900;
}

.chatbot-message p {
  min-width: 0;
  margin: 0;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px;
  box-shadow: 0 5px 14px rgba(63, 43, 84, 0.06);
  font-size: 0.8rem;
  line-height: 1.48;
}

.chatbot-message-user {
  grid-template-columns: minmax(0, 1fr) 36px;
  padding-left: 30px;
}

.chatbot-message-user .chatbot-message-mark {
  grid-column: 2;
  grid-row: 1;
  width: 36px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  font-size: 0.58rem;
}

.chatbot-message-user p {
  grid-column: 1;
  grid-row: 1;
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  border-radius: 14px 4px 14px 14px;
}

.chatbot-reply-details {
  display: grid;
  grid-column: 2;
  gap: 7px;
  min-width: 0;
  margin-top: -3px;
}

.chatbot-reply-note,
.chatbot-sources {
  min-width: 0;
  padding: 8px 10px;
  color: #4d4660;
  background: var(--primary-wash);
  border: 1px solid var(--primary-soft-strong);
  border-radius: 11px;
  font-size: 0.68rem;
  line-height: 1.4;
}

.chatbot-reply-note.is-safety {
  color: #70471a;
  background: #fff5dd;
  border-color: #edd49a;
}

.chatbot-sources strong {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-deep);
  font-size: 0.67rem;
}

.chatbot-sources ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 16px;
  overflow-wrap: anywhere;
}

.chatbot-message-loading p {
  min-height: 42px;
}

.chatbot-loading-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
}

.autisync-sync-spinner {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform-origin: center;
}

.chatbot-loading-dots .autisync-sync-spinner {
  color: var(--primary);
  animation: chatbot-spin 900ms linear infinite;
}

.chatbot-live-form {
  display: grid;
  gap: 12px;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.chatbot-live-form[hidden],
.chatbot-new-chat[hidden],
.chatbot-suggestions[hidden] {
  display: none;
}

.chatbot-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.chatbot-field label {
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 850;
}

.chatbot-field select,
.chatbot-field textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cfc6d9;
  border-radius: 12px;
  font: inherit;
  font-size: 0.78rem;
}

.chatbot-field select {
  min-height: 44px;
  padding: 8px 34px 8px 10px;
}

.chatbot-field textarea {
  min-height: 84px;
  max-height: 160px;
  padding: 10px;
  line-height: 1.45;
  resize: vertical;
}

.chatbot-field select:focus,
.chatbot-field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(112, 93, 153, 0.17);
  outline-offset: 1px;
}

.chatbot-field select[aria-invalid="true"],
.chatbot-field textarea[aria-invalid="true"] {
  border-color: #b94e58;
}

.chatbot-field select[aria-invalid="true"]:focus,
.chatbot-field textarea[aria-invalid="true"]:focus {
  outline-color: rgba(185, 78, 88, 0.17);
}

.chatbot-field-help {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.chatbot-field-help span {
  flex: 0 0 auto;
  white-space: nowrap;
}

.chatbot-data-warning {
  margin: 0;
  padding: 9px 10px;
  color: #70471a;
  background: #fff5dd;
  border: 1px solid #edd49a;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.4;
}

.chatbot-verification {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 10px;
  color: #4a4560;
  background: var(--primary-wash);
  border: 1px solid var(--primary-soft-strong);
  border-radius: 13px;
  overflow: hidden;
}

.chatbot-verification[hidden] {
  display: none;
}

.chatbot-verification p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.chatbot-verification strong {
  color: var(--primary-deep);
  font-size: 0.71rem;
}

.chatbot-verification p span {
  font-size: 0.66rem;
  line-height: 1.35;
}

.chatbot-verification .cf-turnstile {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chatbot-form-status {
  margin: 0;
  padding: 8px 10px;
  color: #51496a;
  background: var(--primary-wash);
  border: 1px solid var(--primary-soft-strong);
  border-radius: 10px;
  font-size: 0.68rem;
  line-height: 1.4;
}

.chatbot-form-status[hidden] {
  display: none;
}

.chatbot-form-status.is-error {
  color: #7b2f36;
  background: #fff0f1;
  border-color: #edc5c8;
}

.chatbot-form-status.is-success {
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-color: #b7d8cf;
}

.chatbot-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 9px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border: 1px solid var(--primary-strong);
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(63, 43, 84, 0.17);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
}

.chatbot-send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-strong), var(--primary-deep));
}

.chatbot-send-button:focus-visible {
  outline: 3px solid rgba(112, 93, 153, 0.22);
  outline-offset: 2px;
}

.chatbot-send-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.chatbot-send-spinner {
  display: none;
  width: 18px;
  height: 18px;
  color: #fff;
}

.chatbot-live-form.is-loading .chatbot-send-spinner {
  display: inline-block;
  animation: chatbot-spin 800ms linear infinite;
}

.chatbot-suggestions {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.chatbot-suggestions > p {
  margin: 0 2px 2px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chatbot-suggestions button,
.chatbot-suggestions a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 7px 10px 7px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.83);
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}

.chatbot-suggestions button::after,
.chatbot-suggestions a::after {
  content: "\2192";
  color: var(--primary);
  font-size: 1rem;
  text-align: right;
}

.chatbot-suggestions button:hover,
.chatbot-suggestions a:hover {
  color: var(--primary-strong);
  background: var(--primary-wash);
  border-color: #b9a8cb;
}

.chatbot-suggestions button:focus-visible,
.chatbot-suggestions a:focus-visible {
  outline: 3px solid rgba(42, 155, 184, 0.45);
  outline-offset: 2px;
}

.chatbot-suggestions svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 10px;
}

.chatbot-panel-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 15px;
  color: var(--muted);
  background: rgba(247, 244, 248, 0.98);
  border-top: 1px solid var(--line);
  font-size: 0.69rem;
  font-weight: 750;
}

.chatbot-connection-dot {
  width: 8px;
  height: 8px;
  background: #d09a31;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(208, 154, 49, 0.15);
}

.chatbot-connection-dot.is-connected {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 117, 109, 0.14);
}

.chatbot-panel-footer svg {
  width: 17px;
  height: 17px;
  color: #76817d;
}

.quiet-mode .chatbot-launcher,
.quiet-mode .chatbot-panel,
.quiet-mode .chatbot-panel-header {
  background-image: none;
  box-shadow: none;
}

.quiet-mode .chatbot-launcher::after {
  animation: none;
}

@keyframes chatbot-breathe {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.04);
  }
}

@keyframes chatbot-panel-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chatbot-loading-dot {
  0%,
  60%,
  100% {
    opacity: 0.36;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes chatbot-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (hover: hover) and (pointer: fine) {
  .chatbot-launcher {
    transition: box-shadow 150ms ease, transform 150ms ease;
  }

  .chatbot-launcher:hover {
    box-shadow:
      0 22px 48px rgba(63, 43, 84, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
  }

  .chatbot-suggestions button,
  .chatbot-send-button,
  .chatbot-close {
    transition:
      color 140ms ease,
      background 140ms ease,
      border-color 140ms ease,
      transform 140ms ease;
  }

  .chatbot-suggestions button:hover {
    transform: translateX(2px);
  }
}

@media (max-width: 1120px) {
  .chatbot-launcher,
  .chatbot-panel {
    right: 20px;
  }

  .chatbot-launcher {
    min-width: 56px;
    min-height: 56px;
    padding: 6px;
  }

  .chatbot-launcher-copy {
    display: none;
  }

  .chatbot-panel {
    width: min(380px, calc(100vw - 40px));
  }
}

@media (max-width: 720px) {
  .chatbot-root {
    --chatbot-safe-top: 76px;
    --chatbot-launcher-bottom: calc(14px + env(safe-area-inset-bottom));
    --chatbot-panel-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .app-body.has-context-nav .chatbot-root {
    --chatbot-safe-top: 136px;
  }

  .app-body:has(.profile-section-nav) .chatbot-root {
    --chatbot-safe-top: 194px;
  }

  .has-mobile-nav .chatbot-root {
    --chatbot-launcher-bottom: calc(78px + max(8px, env(safe-area-inset-bottom)));
    --chatbot-panel-bottom: calc(144px + max(8px, env(safe-area-inset-bottom)));
  }

  .has-mobile-nav:has(.session-editor-actions) .chatbot-root {
    --chatbot-launcher-bottom: calc(235px + max(8px, env(safe-area-inset-bottom)));
    --chatbot-panel-bottom: calc(301px + max(8px, env(safe-area-inset-bottom)));
  }

  .chatbot-launcher {
    right: 14px;
    min-width: 54px;
    min-height: 54px;
    padding: 5px;
  }

  .chatbot-launcher-icon {
    width: 44px;
    height: 44px;
  }

  .chatbot-launcher-copy {
    display: none;
  }

  .chatbot-panel {
    right: 10px;
    left: 10px;
    width: auto;
    max-width: none;
    border-radius: 20px;
  }

  .chatbot-panel-header {
    padding: 12px 12px 11px 14px;
  }

  .chatbot-panel-body {
    padding: 13px;
  }
}

@media (max-width: 360px) {
  .chatbot-launcher {
    min-width: 48px;
    min-height: 48px;
    padding: 4px;
  }

  .chatbot-launcher-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .chatbot-launcher svg {
    width: 23px;
    height: 23px;
  }

  .chatbot-panel-header {
    gap: 8px;
  }

  .chatbot-heading {
    gap: 8px;
  }

  .chatbot-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 12px;
  }

  .chatbot-heading strong {
    font-size: 0.82rem;
  }

  .chatbot-close {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .chatbot-mode-row {
    align-items: center;
    flex-flow: row wrap;
  }

  .chatbot-suggestions button {
    grid-template-columns: 30px minmax(0, 1fr) 15px;
    padding-right: 8px;
  }

  .chatbot-suggestions svg {
    width: 30px;
    height: 30px;
  }

  .public-body .chatbot-root {
    --chatbot-safe-top: 128px;
  }
}

@media (max-width: 720px) and (max-height: 600px) {
  .chatbot-root,
  .app-body.has-context-nav .chatbot-root,
  .app-body:has(.profile-section-nav) .chatbot-root {
    --chatbot-safe-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chatbot-launcher::after,
  .chatbot-panel,
  .chatbot-loading-dots span,
  .chatbot-send-spinner {
    animation: none;
  }

  .chatbot-launcher,
  .chatbot-suggestions button,
  .chatbot-send-button,
  .chatbot-close {
    transition: none;
  }
}

/* Final disclosure-state overrides must follow the legacy responsive layer. */
.workspace-nav-disclosure .nav-parent-arrow {
  margin: 0;
  transform: none;
}

.workspace-nav-disclosure[aria-expanded="true"] .nav-parent-arrow {
  transform: rotate(90deg);
}

.workspace-nav-subtree[hidden] {
  display: none !important;
}

.workspace-nav-subtree:not([hidden]) {
  display: grid;
}

@media (max-width: 360px) {
  .demo-entry-shell {
    width: calc(100% - 12px);
  }

  .demo-role-form {
    padding: 10px;
  }

  .demo-human-check {
    overflow: hidden;
    padding: 10px 8px;
  }

  .demo-human-check .cf-turnstile {
    width: 300px !important;
    max-width: none;
    margin-bottom: -7px;
    transform: scale(0.89);
    transform-origin: top left;
  }
}

/* Client profile workspace -------------------------------------------------
   A stable page shell with real in-page tabs. Purple is the primary visual
   language; green remains the supporting care/status colour. */

.client-profile-workspace {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: clamp(20px, 3.5vw, 44px) var(--page-pad)
    clamp(54px, 7vw, 92px);
  background:
    radial-gradient(circle at 92% 3%, rgba(112, 93, 153, 0.16), transparent 26rem),
    radial-gradient(circle at 2% 30%, rgba(20, 117, 109, 0.09), transparent 23rem),
    linear-gradient(180deg, #faf8fc 0%, #f5f1f8 44%, #f8f7f1 100%);
  isolation: isolate;
}

.client-profile-workspace::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(rgba(112, 93, 153, 0.19) 0.7px, transparent 0.7px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000, transparent 42%);
}

.client-profile-header {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 0.62fr);
  gap: 16px;
  align-items: stretch;
}

.client-identity-card,
.profile-snapshot-card {
  min-width: 0;
  min-height: 300px;
  height: 100%;
  border: 1px solid rgba(112, 93, 153, 0.19);
  border-radius: 26px;
  box-shadow: 0 20px 52px rgba(53, 42, 68, 0.1);
}

.client-identity-card {
  display: grid;
  align-content: space-between;
  gap: 22px;
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(216, 165, 58, 0.18), transparent 10rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 250, 0.96));
}

.client-identity-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.client-profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  color: #fff;
  background:
    linear-gradient(145deg, var(--primary), var(--primary-strong) 66%, var(--teal) 66%);
  border: 4px solid #fff;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(63, 43, 84, 0.22);
  font-size: 1.7rem;
  font-weight: 950;
}

.client-identity-heading {
  min-width: 0;
}

.client-identity-heading .eyebrow {
  margin-bottom: 7px;
}

.client-identity-heading h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.client-full-name {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--teal-strong);
  background: #e2f1ea;
  border: 1px solid #bcded1;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.profile-status-pill i {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(20, 117, 109, 0.12);
}

.profile-status-pill.is-inactive {
  color: #75594a;
  background: #f2eae4;
  border-color: #dfcfc5;
}

.profile-status-pill.is-inactive i {
  background: #8a6b5a;
  box-shadow: 0 0 0 4px rgba(138, 107, 90, 0.12);
}

.client-profile-summary {
  max-width: 860px;
  margin: 0;
  color: #4e4654;
  font-size: clamp(0.94rem, 1.3vw, 1.08rem);
  line-height: 1.6;
}

.client-identity-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.client-identity-details > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(112, 93, 153, 0.14);
  border-radius: 14px;
}

.client-identity-details dt,
.client-identity-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.client-identity-details dt {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-identity-details dd {
  color: var(--primary-deep);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.35;
}

.profile-snapshot-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(20px, 2.6vw, 28px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 95% 3%, rgba(216, 165, 58, 0.3), transparent 13rem),
    radial-gradient(circle at 0% 100%, rgba(20, 117, 109, 0.32), transparent 14rem),
    linear-gradient(145deg, var(--primary-deepest), var(--primary-deep) 55%, var(--primary-strong));
}

.profile-snapshot-card::after {
  position: absolute;
  content: "";
}

.snapshot-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.snapshot-heading .eyebrow,
.snapshot-heading h2 {
  color: #fff;
}

.snapshot-heading h2 {
  margin: 2px 0 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
}

.snapshot-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--primary-deep);
  background: linear-gradient(145deg, #fff8dd, #eee9f4);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(20, 10, 30, 0.24);
}

.snapshot-icon svg,
.client-profile-workspace svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.snapshot-icon svg {
  width: 25px;
  height: 25px;
}

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

.snapshot-metrics > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
}

.snapshot-metrics strong {
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.snapshot-metrics span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.snapshot-latest {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.snapshot-latest > span {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  background: #7bd1b6;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(123, 209, 182, 0.12);
}

.snapshot-latest p {
  display: grid;
  gap: 2px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.73rem;
  line-height: 1.45;
}

.snapshot-latest strong {
  color: #fff;
}

.profile-navigation-shell {
  position: sticky;
  top: 68px;
  z-index: 29;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  padding: 7px;
  background: rgba(252, 250, 253, 0.91);
  border: 1px solid rgba(112, 93, 153, 0.19);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(53, 42, 68, 0.12);
  backdrop-filter: blur(18px);
}

.workspace-context-nav + .app-main .profile-navigation-shell {
  top: 128px;
}

.profile-tab-list {
  display: flex;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 93, 153, 0.35) transparent;
}

.profile-tab-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 48px;
  gap: 7px;
  padding: 8px 11px;
  color: #665e6b;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
}

.profile-tab-list a svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.profile-tab-list a:hover,
.profile-tab-list a:focus-visible {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-color: var(--primary-soft-strong);
}

.profile-tab-list a[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: var(--primary-strong);
  box-shadow: 0 7px 18px rgba(63, 43, 84, 0.22);
}

.profile-tool-rail {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: max-content;
}

.profile-tool-rail > span {
  padding-inline: 6px 3px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-tool-rail > a,
.profile-tools-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 6px;
  padding: 7px 9px;
  color: var(--primary-deep);
  background: #fff;
  border: 1px solid rgba(112, 93, 153, 0.17);
  border-radius: 11px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.profile-tool-rail svg {
  width: 16px;
  height: 16px;
}

.profile-tools-menu {
  position: relative;
}

.profile-tools-menu > summary {
  list-style: none;
}

.profile-tools-menu > summary::-webkit-details-marker {
  display: none;
}

.profile-tools-menu[open] > summary {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.profile-tools-menu > div {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 220px;
  gap: 4px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(53, 42, 68, 0.18);
}

.profile-tools-menu > div a {
  min-height: 42px;
  padding: 10px;
  color: var(--ink);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.profile-tools-menu > div a:hover,
.profile-tools-menu > div a:focus-visible {
  color: var(--primary-strong);
  background: var(--primary-soft);
}

.profile-tool-mobile-link {
  display: none;
}

.profile-tab-panel[hidden] {
  display: none !important;
}

.profile-tab-panel {
  scroll-margin-top: 220px;
}

.profile-tab-panel:not([hidden]) {
  min-width: 0;
  animation: profile-panel-reveal 180ms ease-out;
}

@keyframes profile-panel-reveal {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-panel-section {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(112, 93, 153, 0.15);
  border-radius: 24px;
  box-shadow: 0 16px 44px rgba(53, 42, 68, 0.08);
}

.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.profile-section-heading > div:first-child {
  max-width: 850px;
}

.profile-section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.profile-section-heading > div:first-child > p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-heading-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-button-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.icon-button-label svg {
  width: 17px;
  height: 17px;
}

.ai-heading-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-mark {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  gap: 7px;
  padding: 5px 9px;
  color: var(--primary-strong);
  background: linear-gradient(135deg, #f1ebf8, #fff7dd);
  border: 1px solid #d8cbea;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 900;
}

.ai-mark svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.ai-mark.compact {
  min-height: 28px;
  font-size: 0.64rem;
}

.highlight-sticky-grid,
.team-sticky-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.highlight-sticky,
.team-sticky {
  position: relative;
  min-width: 0;
  padding: 24px 20px 19px;
  border: 1px solid rgba(80, 64, 88, 0.12);
  border-radius: 3px 16px 16px 5px;
  box-shadow: 0 14px 26px rgba(53, 42, 68, 0.1);
}

.highlight-sticky:nth-child(1) {
  transform: rotate(-0.7deg);
}

.highlight-sticky:nth-child(2) {
  transform: rotate(0.55deg) translateY(3px);
}

.highlight-sticky:nth-child(3) {
  transform: rotate(-0.35deg);
}

.note-lilac {
  background: linear-gradient(150deg, #f5eefc, #ece2f7);
}

.note-mint {
  background: linear-gradient(150deg, #eaf6f0, #d9ede5);
}

.note-gold {
  background: linear-gradient(150deg, #fff8df, #f5e9ba);
}

.sticky-pin {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  box-shadow: 0 4px 7px rgba(53, 42, 68, 0.28);
  transform: translateX(-50%);
}

.sticky-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary-deep);
  font-size: 0.72rem;
  font-weight: 900;
}

.sticky-label svg {
  width: 18px;
  height: 18px;
}

.highlight-sticky p {
  min-height: 74px;
  margin: 17px 0;
  color: #3f3745;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
}

.highlight-sticky small,
.team-sticky small {
  color: #69616d;
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.4;
}

.profile-essential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.profile-essential-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: #faf9fc;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.profile-essential-grid article.is-restricted {
  background: #fffaf0;
  border-color: #ead8aa;
}

.essential-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 13px;
}

.essential-icon.coral {
  color: #7c3024;
  background: var(--coral-soft);
}

.essential-icon svg {
  width: 21px;
  height: 21px;
}

.profile-essential-grid small {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-essential-grid p {
  margin: 4px 0 0;
  color: #48404d;
  font-size: 0.82rem;
  line-height: 1.5;
}

.team-note-strip {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.section-head.compact {
  align-items: center;
  margin-bottom: 13px;
}

.section-head.compact h3,
.section-head.compact p {
  margin: 0;
}

.team-sticky {
  padding: 17px;
  background: #fffdf4;
  border-left: 4px solid var(--gold);
  border-radius: 13px;
}

.team-sticky h4 {
  margin: 11px 0 5px;
}

.team-sticky p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.48;
}

.highlight-composer {
  margin-top: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #f8f4fc, #f8fbf8);
  border: 1px solid #d9cdea;
  border-radius: 18px;
}

.highlight-composer > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
}

.highlight-composer > summary::-webkit-details-marker {
  display: none;
}

.highlight-composer > summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.highlight-composer > summary small {
  color: var(--muted);
  font-weight: 600;
}

.composer-summary-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-radius: 13px;
  font-size: 1.5rem;
}

.composer-summary-action {
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 900;
}

.highlight-composer[open] > summary {
  border-bottom: 1px solid #d9cdea;
}

.highlight-composer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  gap: 14px;
  padding: 16px;
}

.highlight-note-form {
  margin: 0;
  padding: 17px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.note-form-actions,
.refine-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.note-form-actions svg {
  width: 17px;
  height: 17px;
}

.local-refine-disclosure {
  margin: 0;
  padding: 10px;
  color: #5a5162;
  background: var(--primary-wash);
  border-left: 4px solid var(--primary);
  font-size: 0.72rem;
  line-height: 1.45;
}

.refine-preview-card {
  position: relative;
  min-width: 0;
  min-height: 250px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 165, 58, 0.19), transparent 10rem),
    #fff;
  border: 1px solid #d7cae7;
  border-radius: 17px;
}

.refine-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.refine-preview-card > p:not(.sr-only) {
  min-height: 92px;
  margin: 24px 0;
  color: #443b4b;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ai-thinking-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ai-thinking-stars i {
  position: absolute;
  display: block;
  width: 8px;
  height: 8px;
  opacity: 0;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
}

.ai-thinking-stars i:nth-child(1) { top: 13%; left: 8%; }
.ai-thinking-stars i:nth-child(2) { top: 17%; right: 12%; width: 13px; height: 13px; }
.ai-thinking-stars i:nth-child(3) { right: 8%; bottom: 18%; }
.ai-thinking-stars i:nth-child(4) { bottom: 11%; left: 15%; width: 11px; height: 11px; }

.refine-preview-card.is-ai-thinking {
  border-color: #bba5d5;
  box-shadow:
    0 0 0 4px rgba(112, 93, 153, 0.1),
    0 16px 40px rgba(63, 43, 84, 0.13);
  animation: ai-card-glow 1.3s ease-in-out infinite;
}

.refine-preview-card.is-ai-thinking .ai-thinking-stars i {
  animation: ai-star-twinkle 1s ease-in-out infinite;
}

.refine-preview-card.is-ai-thinking .ai-thinking-stars i:nth-child(2) { animation-delay: 180ms; }
.refine-preview-card.is-ai-thinking .ai-thinking-stars i:nth-child(3) { animation-delay: 360ms; }
.refine-preview-card.is-ai-thinking .ai-thinking-stars i:nth-child(4) { animation-delay: 540ms; }

@keyframes ai-card-glow {
  50% {
    box-shadow:
      0 0 0 5px rgba(112, 93, 153, 0.16),
      0 18px 46px rgba(63, 43, 84, 0.18);
  }
}

@keyframes ai-star-twinkle {
  0%,
  100% {
    opacity: 0.15;
    transform: scale(0.65) rotate(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.25) rotate(45deg);
  }
}

.trajectory-overview {
  margin-top: 18px;
}

.trajectory-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.trajectory-card-grid > .graphical-empty {
  grid-column: 1 / -1;
}

.trajectory-mini-card,
.profile-trajectory-card {
  min-width: 0;
  background: linear-gradient(150deg, #fff, #faf8fc);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(53, 42, 68, 0.06);
}

.trajectory-mini-card {
  padding: 15px;
}

.trajectory-mini-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.trajectory-mini-card header > div {
  min-width: 0;
}

.trajectory-mini-card header span,
.trajectory-current span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 850;
}

.trajectory-mini-card h3 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 0.92rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trajectory-mini-card header > strong {
  color: var(--primary-strong);
  font-size: 1.35rem;
}

.goal-domain-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--teal));
  border-radius: 13px;
  font-weight: 950;
}

.mini-chart-shell {
  min-width: 0;
  margin-top: 13px;
  padding: 6px;
  overflow-x: auto;
  background: #fafbf8;
  border: 1px solid #e3e0e5;
  border-radius: 13px;
}

.mini-chart-shell svg {
  display: block;
  width: 100%;
  min-width: 250px;
  height: 122px;
}

.trajectory-mini-card .chart-point-halo {
  opacity: 0.55;
}

.trajectory-mini-card footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--teal-strong);
  font-size: 0.71rem;
  font-weight: 900;
}

.trajectory-mini-card footer small {
  color: var(--muted);
  font-weight: 750;
}

.graphical-empty {
  position: relative;
  justify-items: center;
  min-height: 210px;
  align-content: center;
  overflow: hidden;
  text-align: center;
}

.empty-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px dashed #b8a6cc;
  border-radius: 50%;
}

.empty-orbit i {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
}

.empty-orbit i:nth-child(1) { top: -4px; }
.empty-orbit i:nth-child(2) { right: -3px; bottom: 9px; background: var(--teal); }
.empty-orbit i:nth-child(3) { bottom: 3px; left: 2px; background: var(--gold); }

/* Progress tab */

.progress-reading-note,
.assistant-context-strip,
.session-context-lane {
  display: grid;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 15px;
  border-radius: 16px;
}

.progress-reading-note {
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 16px;
  color: #4e3f5d;
  background: linear-gradient(135deg, var(--primary-soft), #edf6f1);
  border: 1px solid #d4c7e2;
}

.progress-reading-note > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--primary);
  border-radius: 14px;
  font-size: 1.3rem;
}

.progress-reading-note p,
.assistant-context-strip p,
.session-context-lane p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.profile-trajectory-list {
  display: grid;
  gap: 16px;
}

.profile-trajectory-card {
  padding: clamp(16px, 2.6vw, 24px);
  border-left: 5px solid var(--primary);
}

.profile-trajectory-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.trajectory-title-group {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.trajectory-title-group h3 {
  margin: 4px 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
}

.trajectory-current {
  display: grid;
  min-width: 160px;
  gap: 2px;
  padding: 12px;
  text-align: right;
  background: var(--primary-soft);
  border: 1px solid #d5c8e3;
  border-radius: 14px;
}

.trajectory-current strong {
  color: var(--primary-strong);
  font-size: 2rem;
  line-height: 1;
}

.trajectory-current small {
  color: var(--muted);
  font-size: 0.68rem;
}

.goal-anchor-grid.compact {
  margin-block: 16px;
}

.profile-trajectory-figure {
  min-width: 0;
  margin: 0;
  padding: 15px;
  background: #fafbf8;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.profile-trajectory-figure > figcaption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-trajectory-figure > figcaption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-trajectory-figure .line-chart-shell {
  min-height: 205px;
}

.profile-trajectory-figure .progress-line-chart {
  min-width: 520px;
  height: 205px;
}

.session-context-lane {
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  margin-top: 18px;
  background: #f7f3fa;
  border: 1px solid #ddd2e7;
}

.session-context-pills {
  display: flex;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
}

.session-context-pills a {
  display: grid;
  min-width: 145px;
  min-height: 58px;
  gap: 3px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 11px;
  text-decoration: none;
}

.session-context-pills a.upcoming {
  border-left-color: var(--teal);
}

.session-context-pills span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 900;
}

.session-context-pills strong {
  font-size: 0.76rem;
  line-height: 1.3;
}

/* Graphical care plan */

.graphical-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat-card {
  display: flex;
  align-items: center;
  min-height: 88px;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(145deg, #fff, #faf8fc);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.profile-stat-card.urgent {
  background: #fff8f5;
  border-color: #e4bfb5;
}

.profile-stat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 15px;
}

.profile-stat-icon.teal { color: var(--teal-strong); background: var(--teal-soft); }
.profile-stat-icon.coral { color: #7c3024; background: var(--coral-soft); }

.profile-stat-icon svg {
  width: 23px;
  height: 23px;
}

.profile-stat-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-stat-card strong {
  font-size: 1.7rem;
  line-height: 1;
}

.profile-stat-card small {
  color: var(--muted);
  font-weight: 800;
}

.visual-care-plan-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(250px, 0.46fr);
  margin-top: 14px;
}

.visual-care-plan-grid .plan-panel {
  min-width: 0;
  padding: 17px;
  border-radius: 18px;
}

.visual-goal-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  padding: 14px;
  background: #fcfaff;
  border-left: 4px solid var(--primary);
  border-radius: 15px;
}

.goal-orbit {
  --goal-progress: 0%;
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  background: conic-gradient(var(--primary) var(--goal-progress), #e7e0ec 0);
  border-radius: 50%;
}

.goal-orbit::after {
  position: absolute;
  inset: 7px;
  background: #fff;
  border-radius: 50%;
  content: "";
}

.goal-orbit > span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  color: var(--primary-strong);
}

.goal-orbit strong {
  font-size: 1.28rem;
}

.goal-orbit small {
  font-size: 0.65rem;
  font-weight: 900;
}

.goal-card-copy {
  min-width: 0;
}

.goal-card-copy h4,
.visual-task-card h4 {
  margin: 5px 0;
  font-size: 1rem;
}

.goal-card-copy > p {
  margin: 5px 0 11px;
  font-size: 0.78rem;
}

.goal-anchor-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 9px;
  background: #f5f2f8;
  border-radius: 11px;
}

.goal-anchor-summary span {
  color: #504857;
  font-size: 0.69rem;
  line-height: 1.4;
}

.goal-anchor-summary small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-anchor-summary i {
  color: var(--primary);
  font-style: normal;
}

.visual-task-card {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  padding: 14px 14px 14px 18px;
  overflow: hidden;
  background: #fbfcff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.task-status-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--sky);
}

.visual-task-card.high .task-status-rail,
.visual-task-card.urgent .task-status-rail,
.visual-task-card.overdue .task-status-rail {
  background: var(--coral);
}

.visual-task-card p {
  margin: 8px 0;
  font-size: 0.78rem;
}

.visual-preference-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 117, 109, 0.18), transparent 10rem),
    #fff;
}

.preference-illustration {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  color: var(--teal-strong);
  background: var(--teal-soft);
  border-radius: 18px;
}

.preference-illustration svg {
  width: 38px;
  height: 38px;
}

.plan-editor-disclosure {
  margin-top: 16px;
}

/* Sessions, documents, messages, assessments and activity */

.assistant-context-strip {
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f2ecf8, #edf6f1);
  border: 1px solid #d6cae4;
}

.assistant-context-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--primary);
  border-radius: 15px;
}

.assistant-context-icon svg {
  width: 24px;
  height: 24px;
}

.profile-session-board {
  gap: 12px;
  padding: 0;
}

.profile-session-board .client-session-panel {
  min-width: 0;
  padding: 17px;
  border-radius: 18px;
  box-shadow: none;
}

.profile-session-board .session-row {
  min-width: 0;
  border-radius: 13px;
}

.profile-vault-section .vault-overview {
  grid-template-columns: minmax(150px, 0.25fr) minmax(150px, 0.25fr) minmax(300px, 1fr);
}

.visual-vault-sensitivity {
  min-width: 0;
  border-radius: 16px;
}

.visual-document-card {
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(53, 42, 68, 0.06);
}

.vault-upload {
  top: 210px;
  border-radius: 18px;
}

.message-workspace-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.message-history-panel {
  min-width: 0;
  padding: 17px;
  background: #faf9fc;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.visual-message-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 15px;
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: none;
}

.visual-message-card h4 {
  margin: 0;
}

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

.assessment-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 17px;
  background: linear-gradient(145deg, #fff, #faf8fc);
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  border-radius: 17px;
}

.assessment-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 15px;
}

.assessment-card-icon svg {
  width: 24px;
  height: 24px;
}

.assessment-profile-card h3 {
  margin: 0;
}

.assessment-profile-card p,
.assessment-profile-card small {
  color: var(--muted);
}

.activity-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 18px;
}

.activity-timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  content: "";
  background: linear-gradient(var(--primary), var(--teal));
}

.activity-note-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.activity-marker {
  position: absolute;
  top: 25px;
  left: -16px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border: 3px solid #f7f3fa;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--primary);
}

.activity-date {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 58px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-radius: 13px;
}

.activity-date strong {
  font-size: 0.9rem;
}

.activity-date small {
  color: var(--muted);
  font-size: 0.65rem;
}

.activity-note-card h3 {
  margin: 0;
}

.activity-note-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

/* Assistant pop-out control */

.chatbot-panel-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
}

.chatbot-popout,
.chatbot-new-chat {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #eff8f4;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 13px;
}

.chatbot-new-chat {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.chatbot-popout[hidden] {
  display: none;
}

.chatbot-popout:hover,
.chatbot-new-chat:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.chatbot-new-chat:disabled,
.chatbot-field select:disabled,
[data-chatbot-person-launch]:disabled {
  cursor: wait;
  opacity: 0.58;
}

.chatbot-popout svg,
.chatbot-new-chat svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-body:has(.profile-tab-list) .chatbot-root {
  --chatbot-safe-top: 210px;
}

/* Client profile responsive behavior */

@media (max-width: 1500px) {
  .profile-tool-rail > span,
  .profile-tool-rail > a {
    display: none;
  }

  .profile-tools-menu > div .profile-tool-mobile-link {
    display: block;
  }
}

@media (max-width: 1380px) {
  .profile-navigation-shell {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-tool-rail {
    justify-content: flex-end;
    min-width: 0;
    padding: 0;
    border-top: 0;
  }

  .visual-care-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-preference-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1120px) {
  .client-profile-header {
    grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  }

  .client-identity-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-sticky-grid,
  .trajectory-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-sticky-grid > :last-child,
  .trajectory-card-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .highlight-sticky-grid > :last-child {
    transform: none;
  }

  .profile-vault-section .vault-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-vault-section .visual-vault-sensitivity {
    grid-column: 1 / -1;
  }

  .vault-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .vault-upload {
    position: static;
  }
}

@media (max-width: 900px) {
  .client-profile-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .client-identity-card,
  .profile-snapshot-card {
    min-height: 0;
  }

  .profile-navigation-shell,
  .workspace-context-nav + .app-main .profile-navigation-shell {
    top: 128px;
  }

  .profile-tool-rail {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .profile-section-heading {
    flex-direction: column;
  }

  .profile-heading-actions {
    justify-content: flex-start;
  }

  .highlight-composer-layout,
  .message-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .visual-care-plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .visual-preference-panel {
    grid-column: auto;
  }

  .session-context-lane {
    grid-template-columns: minmax(0, 1fr);
  }

  .assessment-profile-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .client-profile-workspace {
    gap: 12px;
    padding: 12px 10px calc(92px + env(safe-area-inset-bottom));
  }

  .client-identity-card,
  .profile-snapshot-card,
  .profile-panel-section {
    border-radius: 19px;
  }

  .client-identity-card,
  .profile-snapshot-card {
    padding: 17px;
  }

  .client-identity-topline {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 11px;
  }

  .client-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 1.35rem;
  }

  .profile-status-pill {
    grid-column: 2;
    justify-self: start;
  }

  .client-identity-heading h1 {
    font-size: clamp(1.85rem, 10vw, 3.3rem);
  }

  .client-identity-details {
    gap: 6px;
  }

  .client-identity-details > div {
    padding: 10px;
  }

  .profile-navigation-shell,
  .workspace-context-nav + .app-main .profile-navigation-shell {
    top: 124px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-inline: -2px;
    background: rgba(252, 250, 253, 0.99);
    border-radius: 15px;
  }

  .profile-tab-list a {
    min-height: 46px;
    padding-inline: 10px;
  }

  .profile-tool-rail > span {
    display: none;
  }

  .profile-tool-rail {
    justify-content: flex-end;
    min-width: 0;
    padding: 0;
    overflow: visible;
    border-top: 0;
  }

  .profile-tool-rail > a {
    display: none;
  }

  .profile-tools-menu > summary {
    min-height: 44px;
  }

  .profile-tools-menu > div {
    position: fixed;
    top: 188px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 210px);
    overflow-y: auto;
  }

  .profile-tools-menu > div .profile-tool-mobile-link {
    display: block;
  }

  .profile-panel-section {
    padding: 17px 14px;
  }

  .profile-tab-panel {
    scroll-margin-top: 210px;
  }

  .profile-section-heading h2 {
    font-size: 1.85rem;
  }

  .profile-heading-actions,
  .profile-heading-actions .button {
    width: 100%;
  }

  .profile-heading-actions .button {
    justify-content: center;
  }

  .highlight-sticky-grid,
  .team-sticky-grid,
  .trajectory-card-grid,
  .profile-essential-grid,
  .graphical-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .highlight-sticky-grid > :last-child,
  .trajectory-card-grid > :last-child:nth-child(odd) {
    grid-column: auto;
  }

  .highlight-sticky {
    transform: none !important;
  }

  .highlight-sticky p {
    min-height: 0;
  }

  .highlight-composer > summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .composer-summary-action {
    display: none;
  }

  .form-grid.two,
  .care-plan-forms {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-form-actions .button,
  .refine-preview-actions .button {
    flex: 1 1 150px;
  }

  .profile-trajectory-card > header {
    flex-direction: column;
  }

  .trajectory-current {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .goal-anchor-grid.compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-anchor-grid.compact .anchor-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .profile-trajectory-figure {
    padding: 11px;
  }

  .profile-trajectory-figure > figcaption {
    flex-direction: column;
  }

  .visual-goal-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-orbit {
    width: 64px;
    height: 64px;
  }

  .goal-anchor-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-anchor-summary i {
    justify-self: center;
    transform: rotate(90deg);
  }

  .assistant-context-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .assistant-context-strip > .status-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .profile-session-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-session-board .session-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-session-board .session-row em {
    grid-column: 2;
  }

  .profile-vault-section .vault-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-vault-section .visual-vault-sensitivity {
    grid-column: auto;
  }

  .visual-document-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .visual-document-card .document-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assessment-profile-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .assessment-profile-card > .button {
    grid-column: 1 / -1;
  }

  .activity-note-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .activity-date {
    width: fit-content;
    min-width: 58px;
    padding: 6px;
  }

  .app-body:has(.profile-tab-list) .chatbot-root {
    --chatbot-safe-top: 202px;
  }
}

@media (max-width: 420px) {
  .client-profile-workspace {
    padding-inline: 8px;
  }

  .profile-tool-rail > a {
    font-size: 0.67rem;
  }

  .profile-tab-list a span {
    font-size: 0.69rem;
  }

  .trajectory-title-group {
    align-items: flex-start;
  }

  .activity-timeline {
    padding-left: 14px;
  }

  .chatbot-panel-actions {
    gap: 3px;
  }

  .chatbot-popout,
  .chatbot-new-chat,
  .chatbot-panel-actions .chatbot-close {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .profile-tab-list a,
  .profile-tool-rail > a,
  .profile-tools-menu > summary,
  .highlight-sticky,
  .trajectory-mini-card,
  .visual-document-card,
  .assessment-profile-card,
  .chatbot-popout,
  .chatbot-new-chat {
    transition:
      color 150ms ease,
      background 150ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease,
      transform 150ms ease;
  }

  .highlight-sticky:hover {
    z-index: 2;
    box-shadow: 0 19px 34px rgba(53, 42, 68, 0.15);
    transform: translateY(-4px) rotate(0);
  }

  .trajectory-mini-card:hover,
  .visual-document-card:hover,
  .assessment-profile-card:hover {
    border-color: #b7a5cc;
    box-shadow: 0 14px 32px rgba(53, 42, 68, 0.11);
    transform: translateY(-2px);
  }
}

.quiet-mode .client-profile-workspace,
.quiet-mode .client-identity-card,
.quiet-mode .profile-snapshot-card,
.quiet-mode .profile-panel-section {
  background-image: none;
}

.quiet-mode .client-profile-workspace::before,
.quiet-mode .ai-thinking-stars {
  display: none;
}

.quiet-mode .client-identity-card,
.quiet-mode .profile-snapshot-card,
.quiet-mode .profile-navigation-shell,
.quiet-mode .profile-panel-section,
.quiet-mode .highlight-sticky,
.quiet-mode .trajectory-mini-card {
  box-shadow: none;
}

.quiet-mode .highlight-sticky {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .profile-tab-panel:not([hidden]),
  .refine-preview-card.is-ai-thinking,
  .refine-preview-card.is-ai-thinking .ai-thinking-stars i {
    animation: none;
  }

  .highlight-sticky {
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   Assessment workflow refinement
   -------------------------------------------------------------------------- */

.assessment-flow-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 var(--page-pad) var(--section-pad);
  margin-top: calc(var(--section-pad) * -0.22);
}

.assessment-flow-nav a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 88px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.assessment-flow-nav a > span,
.workflow-step-chip {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 12px;
  font-weight: 950;
}

.assessment-flow-nav a > span {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
}

.assessment-flow-nav strong,
.assessment-flow-nav small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.assessment-flow-nav strong {
  font-size: 0.94rem;
  line-height: 1.12;
}

.assessment-flow-nav small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.18;
}

.app-body .dashboard-hero.compact {
  margin-top: 16px;
  padding: clamp(19px, 2.2vw, 28px);
}

.app-body .dashboard-hero.compact .hero-panel {
  align-items: center;
  gap: clamp(16px, 2.5vw, 30px);
}

.app-body .dashboard-hero.compact h1 {
  max-width: 820px;
  margin-block: 6px 10px;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}

.app-body .dashboard-hero.compact .hero-aside {
  padding: 14px 16px;
}

.app-body .dashboard-hero.compact .hero-aside strong {
  font-size: 1.15rem;
}

.assessment-workflow-section {
  scroll-margin-top: 150px;
}

.workflow-step-chip {
  width: fit-content;
  min-height: 30px;
  margin-bottom: 12px;
  padding: 5px 10px;
  font-size: 0.75rem;
}

.field-hint {
  margin: 0 0 8px !important;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.optional-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.form-grid .span-two,
.assignment-form-group .span-two {
  grid-column: span 2;
}

.form-grid .span-all {
  grid-column: 1 / -1;
}

.question-selection-fieldset,
.assignment-form-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.question-selection-fieldset > legend,
.assignment-form-group > legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.question-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.auth-form .question-picker-search {
  display: block;
}

.auth-form .question-picker-search input,
.assessment-list-search input {
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.assessment-edit-schedule-shell {
  display: grid;
  justify-items: center;
}

.assignment-edit-form {
  width: min(100%, 1120px);
  margin-top: 0;
}

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

.assignment-locked-group :disabled {
  color: var(--ink);
  background: #f0eef3;
  border-color: var(--line);
  opacity: 1;
  cursor: not-allowed;
}

.question-picker-actions,
.question-order-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.button.compact {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.78rem;
}

.question-picker {
  max-height: 410px;
  overflow: auto;
  overscroll-behavior: contain;
}

.question-picker > div {
  display: grid;
  gap: 8px;
}

.question-picker-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.auth-form .question-picker-item > label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  line-height: 1.4;
  cursor: pointer;
}

.auth-form .question-picker-item input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  min-height: 20px;
  margin-top: 1px;
  accent-color: var(--primary);
}

.question-picker-item.is-selected {
  background: var(--primary-soft);
  border-color: #baa9cc;
}

.question-order-actions {
  visibility: hidden;
}

.question-picker-item.is-selected .question-order-actions {
  visibility: visible;
}

.question-order-actions button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
}

.question-picker-count,
.question-picker-empty,
.assessment-list-count {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

html:not(.js) .question-picker-toolbar,
html:not(.js) .question-picker-count,
html:not(.js) .question-order-actions,
html:not(.js) .response-progress-dynamic {
  display: none;
}

.js .response-progress-fallback {
  display: none;
}

.assignment-form-group {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #faf9fc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.assignment-form-group > legend {
  padding: 0 8px;
}

.assignment-form-group > legend span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 7px;
  color: #fff;
  background: var(--primary);
  border-radius: 9px;
  font-size: 0.78rem;
}

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

.repeat-interval-control {
  display: grid;
  grid-template-columns: minmax(76px, 0.38fr) minmax(72px, auto);
  gap: 8px;
  align-items: center;
}

.repeat-interval-control > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.assignment-publish-group {
  grid-template-columns: minmax(160px, 0.3fr) minmax(260px, 1fr) auto;
  align-items: end;
}

.assignment-publish-group > legend {
  grid-column: 1 / -1;
}

.assignment-live-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  min-width: 0;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.assignment-live-summary .status-chip {
  grid-row: 1 / span 3;
  align-self: start;
}

.assignment-live-summary strong,
.assignment-live-summary p,
.assignment-live-summary small {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.assignment-live-summary p,
.assignment-live-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.assignment-schedule-line,
.assignment-due-line,
.assessment-profile-schedule,
.response-hero-meta,
.available-assessment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.assignment-schedule-line {
  margin-top: 11px;
}

.assignment-schedule-line span,
.assignment-due-line > span:not(.status-chip),
.assessment-profile-schedule > span:not(.status-chip),
.response-hero-meta > span:not(.status-chip),
.available-assessment-meta span {
  padding: 5px 8px;
  color: var(--muted);
  background: #f5f2f8;
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 800;
}

.assignment-note,
.assignment-result-schedule {
  margin: 9px 0 !important;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.assessment-list-search {
  display: block;
  width: min(100%, 280px);
}

.assessment-list-search.wide {
  width: min(100%, 380px);
}

.assessment-list-search input {
  width: 100%;
}

.assessment-list-count {
  margin: -13px 0 14px;
}

.assessment-results-filter-panel {
  margin: 0 var(--page-pad) var(--section-pad);
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-top: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.assessment-filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.assessment-filter-heading h2,
.assessment-filter-heading p {
  margin: 0;
}

.assessment-results-filter-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  margin-top: 0;
}

.assessment-results-filter-form > .form-field,
.assessment-filter-actions {
  grid-column: span 2;
}

.assessment-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.available-assessment-section {
  padding-top: 0;
}

.available-assessment-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
}

.available-assessment-count b {
  color: var(--primary-strong);
  font-size: 1.6rem;
}

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

.available-assessment-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  padding: 19px;
  background: linear-gradient(145deg, #fff, #f7f3fb);
  border: 1px solid #cbbdda;
  border-top: 5px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.available-assessment-card h3,
.available-assessment-card p {
  margin: 7px 0 0;
}

.available-assessment-card .button {
  align-self: end;
  justify-self: start;
}

.available-assessment-meta {
  display: grid;
}

.available-assessment-meta .completion-copy {
  color: var(--teal-strong);
  background: var(--teal-soft);
}

.respond-form {
  max-width: 1240px;
}

.respond-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.34fr);
  gap: 20px;
  align-items: start;
}

.respond-question-list {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.response-form-intro {
  padding: 18px 20px;
  background: var(--primary-soft);
  border: 1px solid #cbbdda;
  border-radius: var(--radius);
}

.response-form-intro h2,
.response-form-intro p {
  margin: 0;
}

.respond-question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.question-number,
.required-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.required-label {
  padding: 4px 7px;
  background: var(--gold-soft);
  border-radius: 8px;
}

.respond-question.is-complete {
  border-color: #92c6bd;
  box-shadow: inset 5px 0 0 var(--teal);
}

.answer-options label:has(input:checked) {
  color: var(--primary-deep);
  background: var(--primary-soft);
  border-color: #a894bf;
  box-shadow: 0 0 0 2px rgba(112, 93, 153, 0.12);
}

.respond-submit-panel {
  position: sticky;
  top: 144px;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 19px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.respond-submit-panel p,
.respond-submit-panel strong {
  margin: 0;
}

.response-progress-dynamic {
  display: grid;
  gap: 9px;
}

.response-progress-track {
  height: 12px;
  overflow: hidden;
  background: #e9eeeb;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.response-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--teal));
  border-radius: inherit;
  transition: width 180ms ease;
}

.response-progress-dynamic p,
.response-progress-fallback,
.response-save-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.response-assignment-summary {
  display: grid;
  gap: 9px;
  margin: 0;
}

.response-assignment-summary > div {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.response-assignment-summary dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.response-assignment-summary dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.respond-actions.stacked {
  display: grid;
}

.respond-actions.stacked .button {
  width: 100%;
}

.assessment-error-summary {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  color: var(--danger);
  background: var(--coral-soft);
  border: 1px solid rgba(173, 67, 59, 0.28);
  border-radius: var(--radius);
}

.assessment-profile-schedule {
  margin-top: 10px;
}

.assessment-profile-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.assessment-profile-actions .button {
  white-space: nowrap;
}

.assessment-complete-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--teal);
  border-radius: 13px;
  font-weight: 950;
}

.chart-data-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.chart-data-details summary {
  min-height: 42px;
  padding: 11px 2px 7px;
  color: var(--primary-strong);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
}

.chart-data-details.compact {
  margin-top: 2px;
}

.chart-data-details.compact summary {
  min-height: 38px;
  font-size: 0.76rem;
}

.chart-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.chart-data-details table {
  width: 100%;
  min-width: 260px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.8rem;
}

.chart-data-details caption {
  padding: 8px 9px;
  color: var(--muted);
  font-weight: 850;
  text-align: left;
}

.chart-data-details th,
.chart-data-details td {
  padding: 8px 9px;
  border: 1px solid var(--line);
  text-align: left;
}

.chart-data-details thead th {
  color: var(--ink);
  background: var(--paper-warm);
}

.latest-response-provenance {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
}

.technical-snapshot {
  color: var(--ink);
  background: #f5f2f8;
  border: 1px solid var(--line);
}

.technical-snapshot summary {
  color: var(--muted);
}

.technical-snapshot > p {
  margin: 0;
  padding: 0 15px 13px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.status-chip.published-lock {
  color: #584b65;
  background: #eee9f2;
  border-color: #d8cde0;
}

.question-order-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.assessment-library-section {
  padding-block: 14px;
}

.assessment-library-disclosure {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.assessment-library-disclosure > summary,
.assignment-response-details > summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.assessment-library-disclosure > summary::-webkit-details-marker,
.assignment-response-details > summary::-webkit-details-marker {
  display: none;
}

.assessment-library-disclosure > summary {
  min-height: 92px;
  padding: 18px 20px;
}

.assessment-library-disclosure > summary > span:first-child,
.assignment-response-details > summary > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.assessment-library-disclosure .eyebrow {
  margin: 0;
}

.assessment-library-title {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.assessment-library-disclosure small,
.assignment-response-details small {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

.assessment-library-disclosure-action,
.assignment-response-detail-count {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.assessment-library-disclosure-action > span,
.assignment-response-detail-count > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--primary-soft);
  border-radius: 9px;
  transition: transform 150ms ease;
}

.assessment-library-disclosure[open] > summary,
.assignment-response-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.assessment-library-disclosure[open] .assessment-library-disclosure-action > span,
.assignment-response-details[open] .assignment-response-detail-count > span {
  transform: rotate(180deg);
}

.assessment-library-disclosure-body {
  padding: 20px;
}

.assessment-library-disclosure-body > .section-head {
  margin-top: 0;
}

.assignment-response-details {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.assignment-response-details > summary {
  min-height: 62px;
  padding: 11px 14px;
}

.assignment-response-detail-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.assignment-no-responses {
  margin: 0;
  padding: 11px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 750;
}

@media (hover: hover) and (pointer: fine) {
  .assessment-flow-nav a,
  .available-assessment-card,
  .question-picker-item {
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
  }

  .assessment-flow-nav a:hover,
  .available-assessment-card:hover {
    border-color: #b7a5cc;
    box-shadow: 0 14px 30px rgba(53, 42, 68, 0.12);
    transform: translateY(-2px);
  }
}

@media (max-width: 1180px) {
  .assessment-flow-nav,
  .available-assessment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assignment-publish-group,
  .respond-form-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .assignment-publish-group > legend {
    grid-column: auto;
  }

  .respond-submit-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .assessment-flow-nav,
  .available-assessment-grid,
  .assignment-timing-grid,
  .assessment-results-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .assessment-results-filter-form > .form-field,
  .assessment-filter-actions,
  .form-grid .span-two,
  .assignment-form-group .span-two {
    grid-column: auto;
  }

  .assessment-filter-heading,
  .question-picker-toolbar {
    display: grid;
  }

  .assessment-list-search,
  .assessment-list-search.wide {
    width: 100%;
  }

  .assessment-profile-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .assignment-locked-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .assessment-profile-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .assessment-flow-nav,
  .available-assessment-grid,
  .assessment-profile-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .assessment-flow-nav a {
    min-height: 76px;
  }

  .question-picker-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-picker-actions .button {
    width: 100%;
  }

  .question-picker-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .question-order-actions {
    justify-content: end;
  }

  .assignment-form-group,
  .respond-question,
  .respond-submit-panel,
  .available-assessment-card {
    padding: 15px;
  }

  .assessment-library-disclosure > summary,
  .assignment-response-details > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .assessment-library-disclosure-action,
  .assignment-response-detail-count {
    justify-content: space-between;
    width: 100%;
  }
}

.quiet-mode .assessment-flow-nav a,
.quiet-mode .assignment-form-group,
.quiet-mode .available-assessment-card,
.quiet-mode .respond-submit-panel,
.quiet-mode .assessment-results-filter-panel {
  background-image: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .assessment-flow-nav a,
  .available-assessment-card,
  .question-picker-item,
  .response-progress-track span,
  .assessment-library-disclosure-action > span,
  .assignment-response-detail-count > span {
    transition: none;
  }
}
/* Public brand, landing, and project story ---------------------------------
   This final public layer intentionally stays separate from the private
   workspace system above. Public media is static-first and video is opt-in. */

.brand-symbol {
  display: block;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.public-brand {
  gap: 8px;
  flex: 0 0 auto;
  min-height: 48px;
}

.public-body .site-header {
  background: #fff;
}

.public-body .site-nav {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
}

.public-logo-frame {
  position: relative;
  display: block;
  flex: 0 0 142px;
  width: 142px;
  height: 42px;
  overflow: hidden;
  background: #fff;
}

.public-logo-frame :is(img, svg) {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 142px;
  height: auto;
  transform: translate(-50%, -50%);
}

.public-home-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  color: var(--primary-strong);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(102, 82, 163, 0.18);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(40, 36, 58, 0.08);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.public-home-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.public-brand:hover .public-home-icon,
.public-brand[aria-current="page"] .public-home-icon {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 10px 24px rgba(83, 60, 129, 0.24);
  transform: translateY(-1px);
}

.public-brand:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 3px;
  border-radius: 10px;
}

.site-nav a[aria-current="page"] {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-color: var(--primary-soft-strong);
}

.site-nav .site-nav-item,
.site-nav .site-nav-login {
  gap: 7px;
  min-height: 44px;
  padding-inline: 9px 11px;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(102, 82, 163, 0.13);
  border-radius: 13px;
  font-size: 0.78rem;
  transition: color 170ms ease, background 170ms ease, border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.site-nav .site-nav-item:hover,
.site-nav .site-nav-item:focus-visible {
  color: var(--primary-strong);
  background: var(--primary-wash);
  border-color: var(--primary-soft-strong);
  box-shadow: 0 9px 22px rgba(63, 43, 84, 0.11);
  transform: translateY(-1px);
}

.site-nav-icon,
.site-nav-menu svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.site-nav .site-nav-login {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #7660b4, #58427f);
  border-color: #58427f;
  box-shadow: 0 9px 22px rgba(82, 56, 113, 0.2);
}

.site-nav .site-nav-login::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.24) 48%, transparent 78%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
}

.site-nav .site-nav-login > * {
  position: relative;
}

.site-nav .site-nav-login:hover,
.site-nav .site-nav-login:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #6652a3, #463268);
  border-color: #463268;
  box-shadow: 0 13px 28px rgba(82, 56, 113, 0.3);
  transform: translateY(-2px);
}

.site-nav .site-nav-login:hover::before,
.site-nav .site-nav-login:focus-visible::before {
  transform: translateX(120%);
}

.site-nav-login-arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 170ms ease;
}

.site-nav .site-nav-login:hover .site-nav-login-arrow,
.site-nav .site-nav-login:focus-visible .site-nav-login-arrow {
  transform: translateX(3px);
}

.site-nav .site-nav-demo {
  margin-left: auto;
}

.site-nav a {
  white-space: nowrap;
}

.site-nav-menu {
  display: none;
}

.public-body {
  background: #fbfafc;
}

.public-body #main-content {
  overflow: clip;
}

.public-body .chatbot-launcher {
  min-width: 54px;
  min-height: 54px;
  padding: 5px;
}

.public-body .chatbot-launcher-copy {
  display: none;
}

.public-page {
  --public-navy: #17213f;
  --public-purple: #6652a3;
  --public-blue: #2a9bb8;
  --public-lilac: #eee9f7;
  --public-mist: #eef7f8;
  --public-cream: #fffaf0;
  color: var(--public-navy);
  background:
    radial-gradient(circle at 5% 12%, rgba(73, 199, 218, 0.08), transparent 22rem),
    linear-gradient(180deg, #fdfcff 0%, #fbfafc 100%);
}

.public-page h1,
.public-page h2,
.public-page h3 {
  color: var(--public-navy);
}

.public-page h1 {
  font-size: clamp(3.1rem, 5.4vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.public-page h2 {
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.public-page h3 {
  letter-spacing: -0.015em;
}

.public-page .eyebrow {
  color: var(--public-purple);
  letter-spacing: 0.08em;
}

.public-section {
  padding: clamp(72px, 9vw, 132px) var(--page-pad);
}

.public-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto clamp(36px, 5vw, 68px);
}

.public-section-heading > p,
.mission-copy > p,
.public-hero-text,
.outcomes-copy > p,
.story-copy > p,
.team-teaser p,
.lab-section p,
.about-hero-copy > p {
  color: #5c6476;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.7;
}

.public-section-heading > p {
  margin: 0;
}

.landing-statement,
.detail-note {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(38px, 8vw, 130px);
  align-items: start;
  background: #fff;
}

.landing-statement > div,
.detail-note > div {
  max-width: 760px;
}

.landing-statement p:not(.eyebrow),
.detail-note p,
.compact-public-cta > div:first-child > p:not(.eyebrow),
.boundary-callout {
  color: #5c6476;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.7;
}

.landing-statement > div:last-child > p,
.detail-note > div:last-child > p:first-child {
  margin-top: 5px;
}

.landing-paths {
  background: linear-gradient(145deg, #f2edf9, #eef8f8);
}

.landing-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
}

.landing-link-grid > a {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 245px;
  padding: clamp(24px, 2.7vw, 36px);
  color: var(--public-navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ded8e8;
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(42, 35, 65, 0.07);
  text-decoration: none;
}

.landing-link-grid > a > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 30px;
  color: var(--public-purple);
  background: var(--public-lilac);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
}

.landing-link-grid strong {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.25;
}

.landing-link-grid small {
  margin-top: 12px;
  color: #616979;
  font-size: 0.88rem;
  line-height: 1.6;
}

.public-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.58fr);
  gap: clamp(44px, 8vw, 130px);
  align-items: end;
  min-height: 620px;
  padding: clamp(74px, 10vw, 146px) var(--page-pad);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(62, 191, 211, 0.2), transparent 24rem),
    radial-gradient(circle at 3% 90%, rgba(186, 136, 222, 0.17), transparent 26rem),
    linear-gradient(135deg, #17213f, #33264c);
}

.public-detail-hero > div {
  max-width: 880px;
}

.public-detail-hero h1,
.public-detail-hero .eyebrow {
  color: #fff;
}

.public-detail-hero > div > p:last-child {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.72;
}

.public-detail-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-detail-points li {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.public-detail-points li:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.public-detail-points strong {
  color: #fff;
}

.public-detail-points span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  line-height: 1.5;
}

.people-page .audience-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-card.operations {
  background: linear-gradient(155deg, #fff, #f5f2ed);
}

.detail-note {
  background: var(--public-cream);
}

.detail-note > div:last-child p + p {
  margin-top: 18px;
}

.detail-boundaries {
  background: #fff;
}

.boundary-callout {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 38px);
  background: #f4f0fa;
  border: 1px solid #ded5e9;
  border-radius: 22px;
}

.compact-public-cta {
  align-items: center;
}

.compact-public-cta > div:first-child {
  max-width: 820px;
}

.compact-public-cta > div:first-child > p:not(.eyebrow) {
  max-width: 700px;
  margin-bottom: 0;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  grid-template-rows: auto auto auto;
  column-gap: clamp(28px, 5vw, 86px);
  row-gap: 28px;
  align-items: center;
  min-height: min(850px, calc(100svh - 72px));
  padding: clamp(56px, 8vw, 116px) var(--page-pad);
  background:
    radial-gradient(circle at 8% 0%, rgba(183, 135, 222, 0.13), transparent 25rem),
    radial-gradient(circle at 96% 60%, rgba(56, 184, 207, 0.14), transparent 30rem);
}

.public-hero-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  max-width: 760px;
}

.public-hero-text {
  max-width: 680px;
  margin: 26px 0 0;
}

.public-hero-actions {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin-top: 0;
}

.public-hero-actions .button {
  min-height: 54px;
  padding-inline: 22px;
  border-radius: 14px;
}

.public-hero-actions .button.primary,
.public-cta .button.primary {
  background: #6652a3;
  border-color: #6652a3;
  box-shadow: 0 14px 30px rgba(82, 63, 135, 0.24);
}

.public-hero-actions .button.primary:hover,
.public-cta .button.primary:hover {
  background: #594575;
  border-color: #594575;
}

.site-nav .site-nav-demo:focus-visible,
.public-hero-actions .button.primary:focus-visible,
.public-cta .button.primary:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 3px;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 30px 0 0;
  padding: 0;
  color: #50596c;
  list-style: none;
  font-size: 0.82rem;
  font-weight: 820;
}

.public-hero > .trust-list {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  margin-top: 0;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-list svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--public-purple);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.public-hero-visual {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 4;
  min-width: 0;
}

.public-hero-visual::before,
.public-hero-visual::after {
  position: absolute;
  z-index: 0;
  content: "";
  border-radius: 50%;
}

.public-hero-visual::before {
  top: -12%;
  right: -9%;
  width: 48%;
  aspect-ratio: 1;
  background: rgba(180, 133, 219, 0.16);
}

.public-hero-visual::after {
  bottom: -10%;
  left: -8%;
  width: 32%;
  aspect-ratio: 1;
  background: rgba(44, 174, 198, 0.14);
}

.public-hero-visual picture,
.public-hero-visual > picture img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.public-hero-visual > picture img {
  height: auto;
  aspect-ratio: 1600 / 758;
  object-fit: cover;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 38% 18% 30% 15% / 22% 32% 16% 30%;
  box-shadow: 0 34px 80px rgba(32, 39, 65, 0.22);
}

.hero-story-pathway {
  position: relative;
  z-index: 1;
  width: 100%;
}

.story-pathway-toolbar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 30;
}

.story-pathway-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  color: #fff;
  background: rgba(23, 33, 63, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(23, 33, 63, 0.2);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.story-pathway-toggle:hover {
  background: #594575;
}

.story-pathway-toggle:focus-visible,
.story-pathway-card:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 4px;
}

.story-pathway-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.story-pathway-play-icon,
.story-pathway-replay-icon,
.hero-story-pathway.is-paused .story-pathway-pause-icon,
.hero-story-pathway.is-complete .story-pathway-pause-icon,
.hero-story-pathway.is-complete .story-pathway-play-icon {
  display: none;
}

.hero-story-pathway.is-paused .story-pathway-play-icon,
.hero-story-pathway.is-complete .story-pathway-replay-icon {
  display: block;
}

.story-pathway-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1 / 1.02;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(45, 172, 199, 0.23), transparent 29%),
    radial-gradient(circle at 88% 82%, rgba(155, 111, 193, 0.25), transparent 34%),
    linear-gradient(145deg, rgba(247, 244, 251, 0.96), rgba(232, 244, 246, 0.92));
  border: 1px solid rgba(102, 82, 163, 0.14);
  border-radius: 42px;
  box-shadow: 0 34px 80px rgba(32, 39, 65, 0.18);
}

.story-pathway-stage::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(102, 82, 163, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 82, 163, 0.12) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(145deg, #000, transparent 76%);
}

.story-pathway-route {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.story-pathway-segment {
  fill: none;
  stroke: #c7c0d7;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  transition: stroke 420ms ease, filter 420ms ease;
}

.hero-story-pathway.is-enhancing:not(.is-ready) .story-pathway-segment {
  opacity: 0;
  stroke-dashoffset: 1;
}

.hero-story-pathway.is-ready:not(.has-entered) .story-pathway-segment {
  animation: story-pathway-line-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-story-pathway.is-ready:not(.has-entered) .story-pathway-segment[data-story-pathway-segment="1"] {
  animation-delay: 320ms;
}

.hero-story-pathway.is-ready:not(.has-entered) .story-pathway-segment[data-story-pathway-segment="2"] {
  animation-delay: 690ms;
}

.hero-story-pathway.is-ready:not(.has-entered) .story-pathway-segment[data-story-pathway-segment="3"] {
  animation-delay: 1060ms;
}

.story-pathway-segment.is-complete {
  stroke: url(#story-path-gradient);
  filter: drop-shadow(0 3px 5px rgba(102, 82, 163, 0.3));
}

.story-pathway-steps {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
}

.story-pathway-step {
  --story-tilt: 0deg;
  position: absolute;
  z-index: 2;
  transition: opacity 420ms ease, filter 420ms ease,
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.story-pathway-step-1 {
  --story-order: 0;
  --story-tilt: -2.2deg;
  top: 4.5%;
  left: 3%;
  width: 51%;
}

.story-pathway-step-2 {
  --story-order: 1;
  --story-tilt: 2.4deg;
  top: 25%;
  right: 3%;
  width: 44%;
}

.story-pathway-step-3 {
  --story-order: 2;
  --story-tilt: -1.8deg;
  top: 51%;
  left: 5%;
  width: 44%;
}

.story-pathway-step-4 {
  --story-order: 3;
  --story-tilt: 1.7deg;
  right: 4%;
  bottom: 3.5%;
  width: 50%;
}

.hero-story-pathway.is-enhancing:not(.is-ready) .story-pathway-step {
  opacity: 0;
  transform: translate3d(0, 28px, 0) rotate(var(--story-tilt)) scale(0.9);
}

.hero-story-pathway.is-ready .story-pathway-step {
  opacity: 0.78;
  filter: saturate(0.78) contrast(0.96);
  transform: rotate(var(--story-tilt));
}

.hero-story-pathway.is-ready:not(.has-entered) .story-pathway-step {
  transition-delay: calc(var(--story-order) * 180ms);
}

.hero-story-pathway.is-ready .story-pathway-step.is-complete {
  opacity: 0.92;
  filter: saturate(0.94);
}

.hero-story-pathway.is-ready .story-pathway-step.is-active {
  z-index: 12;
  opacity: 1;
  filter: none;
  transform: translate3d(0, -5px, 0) rotate(0) scale(1.055);
}

.hero-story-pathway.is-ready .story-pathway-step.is-active .story-pathway-card {
  border-color: #fff;
  box-shadow: 0 30px 72px rgba(24, 29, 52, 0.34), 0 0 0 4px rgba(125, 96, 177, 0.14);
}

.story-pathway-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  color: #fff;
  text-align: left;
  background: var(--public-navy);
  border: 6px solid rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  box-shadow: 0 24px 58px rgba(24, 29, 52, 0.24);
  cursor: pointer;
}

.story-pathway-card:disabled {
  cursor: default;
}

.story-pathway-card::after {
  position: absolute;
  inset: 31% 0 0;
  z-index: 3;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(12, 18, 39, 0.86));
  pointer-events: none;
}

.story-pathway-media,
.story-pathway-media img,
.story-pathway-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.story-pathway-media img,
.story-pathway-media video {
  object-fit: cover;
}

.story-pathway-media video {
  z-index: 1;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.story-pathway-step.is-video-ready .story-pathway-media video {
  opacity: 1;
}

.story-pathway-motion-mark {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(23, 33, 63, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(12, 18, 39, 0.22);
  backdrop-filter: blur(10px);
}

.story-pathway-motion-mark svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke: none;
}

.story-pathway-step.is-video-playing .story-pathway-motion-mark {
  color: #192440;
  background: #9be0e5;
  border-color: #d9f8fa;
}

.story-pathway-caption {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  z-index: 5;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  background: rgba(23, 33, 63, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.story-pathway-caption small {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.68rem, 0.8vw, 0.76rem);
  font-weight: 720;
  line-height: 1.35;
}

.story-pathway-caption strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: clamp(0.84rem, 1.15vw, 1rem);
  line-height: 1.18;
}

.story-pathway-caption strong > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: #18213f;
  background: #d9bef0;
  border-radius: 50%;
  font-size: 0.61rem;
}

@media (hover: hover) and (pointer: fine) {
  .story-pathway-step:not(.is-active) .story-pathway-card:hover {
    border-color: #d9bef0;
    box-shadow: 0 28px 66px rgba(24, 29, 52, 0.3);
  }
}

@keyframes story-pathway-line-in {
  from {
    opacity: 0;
    stroke-dashoffset: 1;
  }
  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

.hero-floating-card {
  position: absolute;
  right: -18px;
  bottom: 7%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(290px, 72%);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(102, 82, 163, 0.16);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(32, 39, 65, 0.18);
  backdrop-filter: blur(14px);
}

.hero-floating-card > span:last-child {
  display: grid;
  gap: 3px;
}

.hero-floating-card small {
  color: #6f7584;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-floating-card strong {
  font-size: 0.9rem;
}

.hero-floating-icon,
.audience-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, var(--public-purple), #2d91aa);
  border-radius: 14px;
}

.hero-floating-icon {
  width: 44px;
  height: 44px;
}

.hero-floating-icon svg,
.audience-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.public-trust-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 var(--page-pad);
  color: #fff;
  background: var(--public-navy);
}

.public-trust-band p {
  display: grid;
  align-content: center;
  min-height: 126px;
  margin: 0;
  padding: 22px clamp(18px, 2.5vw, 38px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.public-trust-band p:last-child {
  border-right: 0;
}

.public-trust-band strong {
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 2.35rem);
  line-height: 1;
}

.public-trust-band span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.78rem;
  font-weight: 750;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
  max-width: 1440px;
  margin: 0 auto;
}

.audience-card {
  position: relative;
  min-height: 370px;
  padding: clamp(26px, 3vw, 42px);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1ddeb;
  border-radius: 28px;
  box-shadow: 0 18px 46px rgba(37, 35, 64, 0.08);
}

.audience-card::after {
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 220px;
  height: 220px;
  content: "";
  background: rgba(102, 82, 163, 0.08);
  border-radius: 50%;
}

.audience-card.practice {
  background: linear-gradient(155deg, #fff, #f4f0fa);
}

.audience-card.community {
  background: linear-gradient(155deg, #fff, #edf7f7);
}

.audience-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 34px;
}

.audience-card.practice .audience-icon {
  background: linear-gradient(145deg, #7d63ad, #514079);
}

.audience-card.community .audience-icon {
  background: linear-gradient(145deg, #3b9db0, #206776);
}

.audience-card .eyebrow {
  margin-bottom: 8px;
  font-size: 0.69rem;
}

.audience-card h3 {
  max-width: 320px;
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.audience-card > p:last-child {
  position: relative;
  z-index: 1;
  max-width: 420px;
  color: #646b7a;
  line-height: 1.65;
}

.capabilities-section {
  background: #fff;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
}

.capability-grid article {
  min-height: 260px;
  padding: clamp(24px, 3vw, 38px);
  background: #faf9fc;
  border: 1px solid #e1ddeb;
  border-radius: 22px;
}

.capability-grid article:nth-child(3n + 2) {
  background: #f2f8f8;
  border-color: #d2e6e8;
}

.capability-grid article > span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--public-purple);
  background: var(--public-lilac);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
}

.capability-grid h3 {
  margin-top: 32px;
  font-size: 1.3rem;
}

.capability-grid p,
.project-stage-note > p:last-child,
.demo-disclosure {
  color: #646b79;
  line-height: 1.65;
}

.outcomes-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(48px, 9vw, 150px);
  padding: clamp(72px, 9vw, 132px) var(--page-pad);
  color: #fff;
  background:
    radial-gradient(circle at 10% 15%, rgba(72, 199, 218, 0.17), transparent 24rem),
    linear-gradient(135deg, #1d2949, #33264c);
}

.outcomes-section h2,
.outcomes-section h3,
.outcomes-section .eyebrow {
  color: #fff;
}

.outcomes-copy > p {
  color: rgba(255, 255, 255, 0.71);
}

.text-link {
  display: inline-flex;
  gap: 10px;
  margin-top: 18px;
  color: #fff;
  font-weight: 850;
  text-underline-offset: 5px;
}

.outcome-list {
  display: grid;
}

.outcome-list article {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 22px;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.outcome-list article:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
}

.outcome-list > article > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #e0c5f2;
  border: 1px solid rgba(224, 197, 242, 0.35);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
}

.outcome-list h3,
.outcome-list p {
  margin: 0;
}

.outcome-list h3 {
  font-size: 1.25rem;
}

.outcome-list p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.67);
  line-height: 1.6;
}

.story-section {
  display: grid;
  gap: clamp(24px, 4vw, 42px);
  padding-block: clamp(48px, 6vw, 84px);
  background: var(--public-cream);
}

.story-copy {
  max-width: 760px;
}

.story-video {
  display: block;
  width: min(760px, 100%);
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #18213f;
  border: 8px solid #fff;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(40, 36, 58, 0.2);
  object-fit: cover;
}

.steps-section {
  background:
    radial-gradient(circle at 95% 15%, rgba(61, 162, 185, 0.1), transparent 25rem),
    #fff;
}

.public-section-heading.centered {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  text-align: center;
}

.public-section-heading.centered > p {
  max-width: 680px;
  margin-inline: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.steps-grid li {
  position: relative;
  min-height: 260px;
  padding: 30px clamp(20px, 2.5vw, 38px);
  border-top: 1px solid #d9d5e2;
  border-bottom: 1px solid #d9d5e2;
  border-left: 1px solid #d9d5e2;
}

.steps-grid li:first-child {
  border-radius: 24px 0 0 24px;
}

.steps-grid li:last-child {
  border-right: 1px solid #d9d5e2;
  border-radius: 0 24px 24px 0;
}

.steps-grid li > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--public-purple);
  background: var(--public-lilac);
  border-radius: 50%;
  font-weight: 900;
}

.steps-grid h3 {
  margin-top: 32px;
  font-size: 1.15rem;
}

.steps-grid p {
  color: #666d7c;
  line-height: 1.6;
}

.team-teaser,
.lab-section {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.team-teaser {
  color: #fff;
  background:
    radial-gradient(circle at 15% 50%, rgba(72, 199, 218, 0.24), transparent 18rem),
    linear-gradient(135deg, #263050, #4b3768);
}

.team-teaser h2,
.team-teaser .eyebrow {
  color: #fff;
}

.team-teaser p {
  color: rgba(255, 255, 255, 0.7);
}

.team-teaser-mark {
  display: grid;
  place-items: center;
  width: clamp(104px, 12vw, 160px);
  height: clamp(104px, 12vw, 160px);
  padding: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
}

.team-teaser-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-teaser .button {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
}

.public-cta {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  padding: clamp(64px, 8vw, 110px) var(--page-pad);
  background:
    radial-gradient(circle at 88% 20%, rgba(71, 192, 210, 0.17), transparent 22rem),
    linear-gradient(135deg, #f2edf9, #ebf7f6);
}

.public-cta > div:first-child {
  max-width: 850px;
}

.public-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.site-footer {
  padding: clamp(48px, 6vw, 78px) var(--page-pad) 96px;
  color: rgba(255, 255, 255, 0.72);
  background: #121a32;
}

.site-footer-main {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(260px, 1fr) minmax(300px, 0.8fr);
  gap: clamp(26px, 5vw, 78px);
  align-items: start;
  padding-bottom: 42px;
}

.footer-logo-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 90px;
  overflow: hidden;
  background: #fff;
}

.footer-logo-frame :is(img, svg) {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
}

.footer-brand {
  display: inline-flex;
  justify-self: start;
  width: min(214px, 100%);
  max-width: 100%;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
}

.site-footer-main > p {
  max-width: 580px;
  margin: 0;
  line-height: 1.7;
}

.site-footer nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.site-footer nav a {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 780;
  text-decoration: none;
}

.site-footer nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.76rem;
}

/* About and team --------------------------------------------------------- */

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.65fr);
  gap: clamp(42px, 8vw, 120px);
  align-items: end;
  min-height: 660px;
  padding: clamp(72px, 10vw, 150px) var(--page-pad);
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(65, 194, 211, 0.21), transparent 23rem),
    radial-gradient(circle at 5% 80%, rgba(188, 137, 225, 0.18), transparent 25rem),
    linear-gradient(135deg, #17213f, #35264c);
}

.about-hero h1,
.about-hero .eyebrow {
  color: #fff;
}

.about-hero-copy > p {
  max-width: 790px;
  color: rgba(255, 255, 255, 0.72);
}

.about-hero-principles {
  display: grid;
}

.about-hero-principles p {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 14px;
  margin: 0;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.about-hero-principles p:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.about-hero-principles p > span {
  grid-row: 1 / 3;
  color: #d9b7ed;
  font-size: 0.72rem;
  font-weight: 900;
}

.about-hero-principles strong {
  color: #fff;
}

.about-hero-principles small {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.45;
}

.mission-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(400px, 1.1fr);
  gap: clamp(42px, 8vw, 130px);
  background: #fff;
}

.mission-copy p:first-child {
  margin-top: 0;
}

.supervisor-section {
  background: linear-gradient(150deg, #f1ecf8, #f3f9f8);
}

.supervisor-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(380px, 1.28fr);
  gap: clamp(30px, 6vw, 88px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(18px, 2vw, 28px);
  background: #fff;
  border: 1px solid #ded8e7;
  border-radius: 32px;
  box-shadow: 0 26px 68px rgba(42, 35, 65, 0.12);
}

.supervisor-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
}

.supervisor-card > div {
  padding-right: clamp(8px, 3vw, 38px);
}

.supervisor-card h3 {
  margin: 5px 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.team-role {
  margin: 0;
  color: var(--public-purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-credentials {
  margin: 10px 0 24px;
  color: #6c7280;
  font-weight: 760;
}

.supervisor-card > div > p:not(.team-role, .team-credentials) {
  color: #5e6574;
  line-height: 1.72;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  color: var(--public-purple);
  background: #f3eff8;
  border: 1px solid #ddd3e9;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.project-team-section {
  background: #fff;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  max-width: 1440px;
  margin: 0 auto;
}

.team-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfdbe7;
  border-radius: 26px;
  box-shadow: 0 16px 42px rgba(42, 35, 65, 0.08);
}

.team-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f2f0f4;
}

.team-card > div {
  padding: clamp(22px, 2.5vw, 34px);
}

.team-card h3 {
  margin: 7px 0 14px;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.12;
}

.team-card > div > p:not(.team-role) {
  color: #646b79;
  line-height: 1.65;
}

.profile-links.compact {
  margin-top: 20px;
}

.profile-links.compact a {
  background: #faf9fc;
}

.lab-section {
  background: linear-gradient(145deg, #edf8f8, #f3edf9);
}

.lab-mark {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  color: #fff;
  background: linear-gradient(145deg, var(--public-purple), #2f8da4);
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(66, 71, 128, 0.22);
}

.lab-mark svg {
  width: 64px;
  height: 64px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.responsibility-section {
  background: #fff;
}

.responsibility-section > div:first-child {
  max-width: 760px;
  margin-bottom: 42px;
}

.responsibility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.responsibility-grid article {
  min-height: 220px;
  padding: clamp(24px, 3vw, 38px);
  background: #faf9fc;
  border-top: 4px solid var(--public-purple);
  border-radius: 0 0 20px 20px;
}

.responsibility-grid article:nth-child(2) {
  border-top-color: #2d93aa;
}

.responsibility-grid article:nth-child(3) {
  border-top-color: #d49a43;
}

.responsibility-grid h3 {
  margin-top: 0;
}

.responsibility-grid p {
  color: #656c7a;
  line-height: 1.65;
}

.project-stage-note {
  max-width: 920px;
  margin: 28px auto 0;
  padding: clamp(24px, 3vw, 38px);
  background: #f4f0fa;
  border: 1px solid #ded5e9;
  border-radius: 22px;
}

.project-stage-note h3 {
  margin-top: 8px;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

.public-cta-actions {
  max-width: 480px;
}

.demo-disclosure {
  flex-basis: 100%;
  margin: 7px 0 0;
  font-size: 0.78rem;
}

@media (hover: hover) and (pointer: fine) {
  .audience-card,
  .team-card,
  .landing-link-grid > a,
  .profile-links a {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  }

  .audience-card:hover,
  .team-card:hover,
  .landing-link-grid > a:hover {
    border-color: #c5b7d8;
    box-shadow: 0 24px 58px rgba(42, 35, 65, 0.13);
    transform: translateY(-3px);
  }

  .profile-links a:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 1280px) {
  .landing-page .public-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }

  .landing-page .public-hero-copy,
  .landing-page .public-hero-actions,
  .landing-page .public-hero > .trust-list {
    grid-column: 1;
  }

  .landing-page .public-hero-copy {
    grid-row: 1;
    align-self: auto;
    max-width: 820px;
  }

  .landing-page .public-hero-actions {
    grid-row: 2;
  }

  .landing-page .public-hero > .trust-list {
    grid-row: 3;
  }

  .landing-page .public-hero-visual {
    grid-column: 1;
    grid-row: 4;
    width: min(760px, 100%);
    justify-self: center;
  }
}

@media (max-width: 1080px) {
  .public-hero {
    grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  }

  .public-trust-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-trust-band p:nth-child(2) {
    border-right: 0;
  }

  .public-trust-band p:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .story-section,
  .about-hero,
  .public-detail-hero,
  .mission-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-copy {
    max-width: 760px;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .steps-grid li,
  .steps-grid li:first-child,
  .steps-grid li:last-child {
    border: 1px solid #d9d5e2;
    border-radius: 20px;
  }

  .team-teaser,
  .lab-section {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .team-teaser > .button,
  .lab-section > .button {
    grid-column: 2;
    justify-self: start;
  }

  .site-footer-main {
    grid-template-columns: minmax(170px, 0.4fr) minmax(0, 1fr);
  }

  .site-footer nav {
    grid-column: 1 / -1;
  }

  .about-hero {
    min-height: 0;
  }

  .public-detail-hero {
    min-height: 0;
  }

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

@media (max-width: 1040px) {
  .site-header {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
  }

  .site-nav {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
  }

  .site-nav .site-nav-secondary,
  .site-nav .site-nav-about,
  .site-nav .site-nav-login {
    display: none;
  }

  .site-nav-menu {
    position: static;
    display: block;
  }

  .site-nav-menu summary {
    gap: 6px;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(22, 33, 31, 0.09);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 800;
    list-style: none;
  }

  .site-nav-menu summary::-webkit-details-marker {
    display: none;
  }

  .site-nav-menu summary::after {
    margin-left: 6px;
    content: "\25BE";
    font-size: 0.72em;
  }

  .site-nav-menu summary svg {
    width: 19px;
    height: 19px;
  }

  .site-nav-menu summary:focus-visible {
    outline: 3px solid #2a9bb8;
    outline-offset: 3px;
  }

  .site-nav-menu[open] summary {
    color: var(--primary-strong);
    background: var(--primary-soft);
    border-color: var(--primary-soft-strong);
  }

  .site-nav-menu > div {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--page-pad);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(520px, calc(100vw - var(--page-pad) - var(--page-pad)));
    padding: 12px;
    background: #fff;
    border: 1px solid rgba(22, 33, 31, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(23, 33, 63, 0.2);
  }

  .site-nav-menu > div a,
  .site-nav > .site-nav-demo {
    min-height: 44px;
  }

  .site-nav-menu > div a {
    gap: 9px;
    width: 100%;
    justify-content: flex-start;
    font-size: 0.82rem;
  }

  .site-nav-menu > div svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 900px) {
  .public-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
  }

  .public-hero-copy {
    grid-column: 1;
    grid-row: auto;
    align-self: auto;
    max-width: 820px;
  }

  .public-hero-visual {
    grid-column: 1;
    grid-row: auto;
    width: min(760px, 100%);
    justify-self: center;
  }

  .public-hero-actions,
  .public-hero > .trust-list {
    grid-column: 1;
    grid-row: auto;
  }

  .public-section-heading,
  .outcomes-section,
  .supervisor-card,
  .landing-statement,
  .detail-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-section-heading {
    align-items: start;
    gap: 20px;
  }

  .audience-grid,
  .team-grid,
  .responsibility-grid,
  .capability-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .capability-grid article {
    min-height: 0;
  }

  .audience-card {
    min-height: 300px;
  }

  .supervisor-card > img {
    width: min(520px, 100%);
  }

  .supervisor-card > div {
    padding: 10px clamp(8px, 2vw, 20px) 24px;
  }

  .team-card {
    display: grid;
    grid-template-columns: minmax(180px, 0.48fr) minmax(0, 1fr);
  }

  .public-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-cta-actions {
    justify-content: flex-start;
  }

  .people-page .audience-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
  }

  .public-logo-frame {
    flex-basis: 108px;
    width: 108px;
    height: 52px;
  }

  .public-logo-frame :is(img, svg) {
    width: 108px;
  }

  .public-body .chatbot-root {
    --chatbot-safe-top: 80px;
    --chatbot-panel-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .public-body .chatbot-launcher {
    top: 80px;
    right: 8px;
    bottom: auto;
    min-width: 46px;
    min-height: 46px;
    padding: 3px;
  }

  .public-body .chatbot-launcher-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .site-nav {
    padding: 0;
  }

  .site-nav-menu summary {
    padding: 0 8px;
    font-size: 0.72rem;
  }

  .site-nav-menu > div {
    right: 10px;
    left: 10px;
    width: auto;
  }

  .site-nav-menu > div a {
    font-size: 0.82rem;
  }

  .site-nav a {
    min-height: 44px;
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .public-page h1 {
    font-size: clamp(2.55rem, 9vw, 3.25rem);
  }

  .public-page h2 {
    font-size: clamp(1.9rem, 10vw, 3rem);
  }

  .about-page h1 {
    font-size: clamp(2.6rem, 12vw, 3.25rem);
  }

  .public-hero {
    row-gap: 24px;
    padding-top: 48px;
  }

  .landing-page .public-hero-visual {
    margin-top: 2px;
  }

  .story-pathway-toolbar {
    position: relative;
    top: auto;
    right: auto;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
  }

  .story-pathway-toggle {
    color: var(--public-navy);
    background: rgba(255, 255, 255, 0.9);
    border-color: #d9d5e2;
    box-shadow: 0 10px 24px rgba(32, 39, 65, 0.1);
  }

  .story-pathway-toggle:hover {
    color: #fff;
  }

  .story-pathway-stage {
    aspect-ratio: auto;
    min-height: 0;
    padding: 16px;
    overflow: visible;
    border-radius: 28px;
  }

  .story-pathway-stage::before,
  .story-pathway-route {
    display: none;
  }

  .story-pathway-steps {
    position: relative;
    inset: auto;
    display: grid;
    gap: 34px;
  }

  .story-pathway-step,
  .story-pathway-step-1,
  .story-pathway-step-2,
  .story-pathway-step-3,
  .story-pathway-step-4 {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: calc(100% - 30px);
  }

  .story-pathway-step:nth-child(odd) {
    justify-self: start;
  }

  .story-pathway-step:nth-child(even) {
    justify-self: end;
  }

  .story-pathway-step:not(:last-child)::after {
    position: absolute;
    right: 50%;
    bottom: -35px;
    z-index: 0;
    width: 18px;
    height: 31px;
    content: "";
    background: linear-gradient(180deg, #2a9bb8, #765ab0);
    clip-path: polygon(43% 0, 57% 0, 57% 67%, 78% 67%, 50% 100%, 22% 67%, 43% 67%);
    filter: drop-shadow(0 4px 5px rgba(102, 82, 163, 0.24));
    transform: translateX(50%);
  }

  .hero-story-pathway.is-ready .story-pathway-step,
  .hero-story-pathway.is-ready .story-pathway-step.is-complete,
  .hero-story-pathway.is-ready .story-pathway-step.is-active {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .story-pathway-card {
    display: grid;
    aspect-ratio: auto;
    border-width: 5px;
    border-radius: 20px;
  }

  .story-pathway-card::after {
    display: none;
  }

  .story-pathway-media {
    position: relative;
    inset: auto;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .story-pathway-caption {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    min-height: 96px;
    padding: 13px 14px;
    background: var(--public-navy);
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }

  .story-pathway-caption small {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.76rem;
  }

  .story-pathway-caption strong {
    font-size: 0.92rem;
  }

  .landing-page .public-hero-visual > picture img {
    border-radius: 20px;
  }

  .landing-page .hero-floating-card {
    display: none;
  }

  .public-detail-hero {
    padding-top: 66px;
  }

  .public-hero-actions,
  .public-cta-actions {
    display: grid;
    width: 100%;
  }

  .public-hero-actions .button,
  .public-cta-actions .button {
    width: 100%;
  }

  .trust-list {
    display: grid;
  }

  .public-hero-visual > picture img {
    border-width: 6px;
    border-radius: 25px;
  }

  .hero-floating-card {
    right: 12px;
    bottom: -20px;
    left: 12px;
    min-width: 0;
  }

  .public-trust-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-trust-band p {
    min-height: 96px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .public-trust-band p:last-child {
    border-bottom: 0;
  }

  .audience-card {
    min-height: 0;
    border-radius: 22px;
  }

  .outcome-list article {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
  }

  .outcome-list > article > span {
    width: 44px;
    height: 44px;
  }

  .story-video {
    border-width: 4px;
    border-radius: 18px;
  }

  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-grid li {
    min-height: 0;
  }

  .team-teaser,
  .lab-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-teaser > .button,
  .lab-section > .button {
    grid-column: auto;
  }

  .team-teaser-mark,
  .lab-mark {
    width: 96px;
    height: 96px;
    border-radius: 24px;
  }

  .lab-mark svg {
    width: 50px;
    height: 50px;
  }

  .site-footer-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer nav {
    grid-column: auto;
  }

  .site-footer-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer {
    padding-bottom: 24px;
  }

  .about-hero {
    padding-top: 66px;
  }

  .landing-link-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-link-grid > a {
    min-height: 0;
  }

  .mission-section {
    gap: 26px;
  }

  .supervisor-card {
    border-radius: 24px;
  }

  .supervisor-card > img {
    border-radius: 18px;
  }

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

  .team-card > img {
    aspect-ratio: 4 / 3;
    object-position: center 25%;
  }
}

@media (max-width: 380px) {
  .public-logo-frame {
    flex-basis: 88px;
    width: 88px;
    height: 44px;
  }

  .public-logo-frame :is(img, svg) {
    width: 88px;
  }

  .story-pathway-stage {
    padding: 10px;
  }

  .story-pathway-step,
  .story-pathway-step-1,
  .story-pathway-step-2,
  .story-pathway-step-3,
  .story-pathway-step-4 {
    width: 100%;
  }

  .story-pathway-motion-mark {
    top: 9px;
    right: 9px;
  }

}

@media (max-width: 360px) {
  .public-logo-frame {
    flex-basis: 80px;
    width: 80px;
    height: 44px;
  }

  .public-logo-frame :is(img, svg) {
    width: 80px;
  }

  .public-brand {
    gap: 4px;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav-menu summary {
    padding-inline: 6px;
    font-size: 0.68rem;
  }

  .public-section,
  .public-hero,
  .outcomes-section,
  .public-cta,
  .about-hero,
  .public-detail-hero {
    padding-inline: 14px;
  }

  .public-page h1 {
    font-size: 2.55rem;
  }

  .about-page h1 {
    font-size: 2.35rem;
  }

  .site-header {
    gap: 6px;
    padding-inline: 5px;
  }

  .public-brand {
    width: auto;
    height: auto;
    overflow: visible;
  }

  .public-logo-frame :is(img, svg) {
    max-width: 100%;
    height: auto;
  }

  .site-nav a {
    padding-inline: 6px;
    font-size: 0.68rem;
  }

  .site-footer {
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audience-card,
  .team-card,
  .profile-links a,
  .landing-link-grid > a,
  .story-pathway-step,
  .story-pathway-media video,
  .story-pathway-segment {
    transition: none;
  }

  .hero-story-pathway.is-enhancing:not(.is-ready) .story-pathway-step,
  .hero-story-pathway.is-ready .story-pathway-step,
  .hero-story-pathway.is-ready .story-pathway-step.is-active,
  .hero-story-pathway.is-ready .story-pathway-step.is-complete {
    opacity: 1;
    filter: none;
    transform: rotate(var(--story-tilt));
  }

  .hero-story-pathway.is-ready:not(.has-entered) .story-pathway-segment {
    animation: none;
  }

  .hero-story-pathway.is-enhancing:not(.is-ready) .story-pathway-segment,
  .story-pathway-segment {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@media (max-width: 620px) and (prefers-reduced-motion: reduce) {
  .hero-story-pathway.is-enhancing:not(.is-ready) .story-pathway-step,
  .hero-story-pathway.is-ready .story-pathway-step,
  .hero-story-pathway.is-ready .story-pathway-step.is-active,
  .hero-story-pathway.is-ready .story-pathway-step.is-complete {
    transform: none;
  }
}

/* Home feature universe and connected feature stories ---------------------- */
.home-logo-visual {
  width: min(760px, 100%);
  justify-self: end;
  perspective: 1400px;
}

.feature-universe {
  position: relative;
  z-index: 2;
  width: 100%;
  perspective: 1400px;
}

.feature-universe-surface {
  --universe-tilt-x: 0deg;
  --universe-tilt-y: 0deg;
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 700 / 680;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.76) 37%, transparent 62%),
    radial-gradient(circle at 18% 15%, rgba(65, 197, 216, 0.24), transparent 30%),
    radial-gradient(circle at 82% 79%, rgba(153, 105, 207, 0.28), transparent 33%),
    linear-gradient(145deg, #edf8fa, #f2ecfa 56%, #fff8ec);
  border: 1px solid rgba(102, 82, 163, 0.17);
  border-radius: 44px;
  box-shadow: 0 42px 95px rgba(32, 39, 65, 0.22);
  transform: rotateX(var(--universe-tilt-x)) rotateY(var(--universe-tilt-y));
  transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}

.feature-universe-surface::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(77, 75, 126, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 75, 126, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000, transparent 74%);
}

.feature-universe-surface::after {
  position: absolute;
  top: 8%;
  left: 22%;
  z-index: -1;
  width: 56%;
  height: 34%;
  content: "";
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 28px 70px rgba(47, 53, 87, 0.17);
  filter: blur(3px);
  transform: translateZ(-35px) rotate(-3deg);
}

.feature-universe-logo {
  position: absolute;
  top: -4%;
  left: 17%;
  z-index: 3;
  display: block;
  width: 66%;
  height: auto;
  background: transparent;
  transform: translateZ(58px);
}

.feature-logo-sync-rotor,
.page-sync-rotor {
  transform-box: view-box;
}

.feature-logo-sync-rotor {
  transform-origin: 1099px 472px;
}

.page-sync-rotor {
  transform-origin: 1210px 635px;
}

.feature-logo-sync-rotor {
  animation: universe-logo-sync 850ms linear infinite;
}

.is-page-syncing .page-sync-rotor {
  animation: universe-logo-sync 850ms linear infinite;
}

.feature-universe-connections {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform: translateZ(20px);
}

.universe-path {
  fill: none;
  opacity: 0.13;
  stroke: rgba(91, 80, 143, 0.66);
  stroke-dasharray: 5 10;
  stroke-linecap: round;
  stroke-width: 1.8;
  transition: opacity 180ms ease, stroke 180ms ease, stroke-width 180ms ease;
}

.universe-path.is-scenario-active {
  opacity: 1;
  stroke: #168faa;
  stroke-width: 4;
}

.universe-path.is-scenario-active.is-scenario-animating {
  animation: universe-path-flow 850ms linear infinite;
}

.feature-universe.is-scenario-all .universe-path.is-scenario-active {
  stroke: #7254ad;
}

.feature-universe.is-scenario-all .universe-path.is-scenario-active.is-scenario-animating {
  animation-duration: 1000ms;
}

.feature-universe.is-scenario-paused .universe-path,
.feature-universe.is-scenario-paused .universe-system-core,
.feature-universe.is-scenario-paused .universe-sync-mark,
.feature-universe.is-scenario-paused .universe-brain-icon svg,
.feature-universe.is-scenario-paused .universe-chatbot-icon svg,
.feature-universe.is-scenario-paused .universe-followup-icon svg,
.feature-universe.is-scenario-paused .universe-activity-card {
  animation-play-state: paused !important;
}

.feature-universe.is-static-scenarios .universe-path,
.feature-universe.is-static-scenarios .universe-system-core,
.feature-universe.is-static-scenarios .universe-sync-mark,
.feature-universe.is-static-scenarios .universe-brain-icon svg,
.feature-universe.is-static-scenarios .universe-chatbot-icon svg,
.feature-universe.is-static-scenarios .universe-followup-icon svg,
.feature-universe.is-static-scenarios .universe-activity-card {
  animation: none !important;
}

.feature-universe.is-static-scenarios .universe-path.is-scenario-active {
  opacity: 0.48;
  stroke-width: 2.4;
}

.universe-system-core {
  fill: #fff;
  stroke: #6d55a6;
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
}

.universe-compact-paths {
  display: none;
}

.universe-compact-core {
  fill: #fff;
  stroke: #6d55a6;
  stroke-width: 4;
}

.feature-universe.is-playing .universe-system-core {
  animation: universe-core-pulse 1.35s ease-out 3;
}

.feature-universe-hubs,
.feature-universe-actors {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transform: translateZ(82px);
}

.feature-universe-hub {
  position: absolute;
  display: grid;
  justify-items: center;
  align-items: center;
  align-content: center;
  gap: 8px;
  width: min(126px, 20%);
  height: 132px;
  min-height: 132px;
  padding: 10px 10px 9px;
  color: var(--public-navy);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(102, 82, 163, 0.18);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(32, 39, 65, 0.16);
  text-align: center;
  text-decoration: none;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  transform: translate(-50%, -50%);
}

.universe-hub-sharing {
  top: 52%;
  left: 13.6%;
}

.universe-hub-drafting {
  top: 52%;
  left: 37.9%;
}

.universe-hub-chatbot {
  top: 52%;
  left: 62.1%;
}

.universe-hub-followup {
  top: 52%;
  left: 86.4%;
}

.universe-hub-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: linear-gradient(145deg, #2aa9c4, #7554b2);
  border-radius: 17px;
  box-shadow: 0 10px 22px rgba(87, 67, 149, 0.2);
}

.universe-hub-drafting .universe-hub-icon {
  background: linear-gradient(145deg, #7654b2, #384a83);
}

.universe-hub-chatbot .universe-hub-icon {
  background: linear-gradient(145deg, #273255, #7554b2);
}

.universe-hub-followup .universe-hub-icon {
  background: linear-gradient(145deg, #178fa8, #594575);
}

.universe-hub-icon svg {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.universe-hub-icon .universe-shield {
  fill: rgba(255, 255, 255, 0.16);
}

.feature-universe-hub.is-scenario-animating .universe-sync-mark {
  animation: universe-sync-turn 900ms ease-in-out 2;
  transform-box: fill-box;
  transform-origin: center;
}

.feature-universe-hub.is-scenario-animating .universe-brain-icon svg {
  animation: universe-brain-think 850ms ease-out 2 alternate;
  transform-box: fill-box;
  transform-origin: center;
}

.feature-universe-hub.is-scenario-animating .universe-chatbot-icon svg {
  animation: universe-chat-pop 780ms ease-out 2;
  transform-box: fill-box;
  transform-origin: center;
}

.feature-universe-hub.is-scenario-animating .universe-followup-icon svg {
  animation: universe-followup-pulse 850ms ease-out 2;
  transform-box: fill-box;
  transform-origin: center;
}

.feature-universe-hub strong {
  display: grid;
  place-items: center;
  min-height: 2.4em;
  color: var(--public-navy);
  font-size: 0.76rem;
  line-height: 1.14;
}

.feature-universe-hub:hover,
.feature-universe-hub:focus-visible,
.feature-universe-hub.is-active,
.feature-universe-hub.is-scenario-active {
  border-color: rgba(72, 176, 200, 0.72);
  box-shadow: 0 24px 48px rgba(32, 39, 65, 0.23), 0 0 0 4px rgba(70, 188, 210, 0.13);
  transform: translate(-50%, calc(-50% - 3px)) scale(1.02);
}

.feature-universe-hub:focus-visible,
.universe-actor:focus-visible,
.universe-scenario-list button:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 3px;
}

.feature-universe-actors {
  z-index: 6;
  transform: translateZ(94px);
}

.universe-actor {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 3px;
  width: 108px;
  min-height: 78px;
  padding: 8px 10px;
  color: #35405a;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(102, 82, 163, 0.17);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(32, 39, 65, 0.14);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease,
    box-shadow 180ms ease, transform 180ms ease;
}

.universe-actor:disabled {
  color: #35405a;
  opacity: 1;
  cursor: default;
}

.universe-actor svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: #6d55a6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.universe-actor span {
  font-size: 0.75rem;
  font-weight: 900;
}

.universe-actor-practitioner {
  top: 70.9%;
  left: 13.6%;
}

.universe-actor-client {
  top: 70.9%;
  left: 37.9%;
}

.universe-actor-teacher {
  top: 70.9%;
  left: 62.1%;
}

.universe-actor-parent {
  top: 70.9%;
  left: 86.4%;
}

.universe-actor:not(:disabled):hover,
.universe-actor.is-scenario-active {
  color: #fff;
  background: #6652a3;
  border-color: #6652a3;
  box-shadow: 0 20px 40px rgba(57, 46, 98, 0.28), 0 0 0 5px rgba(75, 177, 200, 0.15);
  transform: translate(-50%, calc(-50% - 3px)) scale(1.02);
}

.universe-actor:not(:disabled):hover svg,
.universe-actor.is-scenario-active svg {
  stroke: #fff;
}

.universe-actor.is-scenario-related {
  color: #245d6b;
  background: #f4fdff;
  border-color: #39abc3;
  box-shadow: 0 18px 36px rgba(43, 160, 185, 0.2), 0 0 0 5px rgba(75, 177, 200, 0.14);
}

.universe-actor.is-scenario-related svg {
  stroke: #258ba3;
}

.universe-activity-card {
  position: absolute;
  top: 78.5%;
  left: 86.4%;
  z-index: 7;
  display: grid;
  gap: 5px;
  width: min(160px, 23%);
  min-height: 112px;
  padding: 10px 11px;
  color: #35405a;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(42, 155, 184, 0.34);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(32, 39, 65, 0.16);
  pointer-events: none;
  backdrop-filter: blur(12px);
  transform: translateX(-50%) translateZ(102px);
}

.universe-activity-card[data-activity-actor="practitioner"] {
  left: 13.6%;
}

.universe-activity-card[data-activity-actor="client"] {
  left: 37.9%;
}

.universe-activity-card[data-activity-actor="teacher"] {
  left: 62.1%;
}

.universe-activity-card[data-activity-actor="parent"] {
  left: 86.4%;
}

.universe-activity-card[data-activity-actor="all"] {
  left: 50%;
  width: min(390px, 58%);
}

.universe-activity-card[data-activity-state="planned"] {
  background: rgba(255, 249, 235, 0.97);
  border-color: rgba(196, 143, 49, 0.5);
}

.universe-activity-card[data-activity-state="mixed"] {
  border-color: rgba(109, 85, 166, 0.52);
}

.universe-activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.universe-activity-heading strong,
.universe-activity-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.universe-activity-heading strong {
  color: #594575;
  font-size: 0.63rem;
  letter-spacing: 0.02em;
}

.universe-activity-heading span {
  color: #20788d;
  font-size: 0.56rem;
  font-weight: 900;
  text-transform: uppercase;
}

.universe-activity-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  font-size: 0.62rem;
  line-height: 1.26;
}

.universe-activity-request {
  color: #4c5366;
  -webkit-line-clamp: 2;
}

.universe-activity-response {
  padding: 5px 6px;
  color: #174f5d;
  background: #e4f5f7;
  border-radius: 8px;
  font-weight: 800;
  -webkit-line-clamp: 2;
}

.universe-activity-card[data-activity-state="planned"] .universe-activity-response {
  color: #6a4a17;
  background: #fff0ce;
}

.universe-activity-card.is-scenario-animating {
  animation: universe-activity-arrive 520ms ease-out 1;
}

.universe-scenario-list {
  display: grid;
  grid-auto-columns: calc((100% - 28px) / 5);
  grid-auto-flow: column;
  grid-template-columns: none;
  gap: 7px;
  margin: 14px 0 0;
  padding: 3px 2px 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(102, 82, 163, 0.55) rgba(102, 82, 163, 0.1);
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  list-style: none;
}

.universe-scenario-list li {
  display: flex;
  min-width: 0;
  scroll-snap-align: start;
}

.universe-scenario-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 5px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 132px;
  padding: 10px;
  color: #4d5871;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(102, 82, 163, 0.14);
  border-radius: 12px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}

.universe-scenario-list button:disabled {
  color: #4d5871;
  opacity: 1;
  cursor: default;
}

.universe-scenario-list button > span {
  display: inline-flex;
  justify-self: start;
  padding: 2px 6px;
  color: #6b55a6;
  background: rgba(102, 82, 163, 0.09);
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 950;
  line-height: 1.2;
}

.universe-scenario-list strong,
.universe-scenario-list small {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.universe-scenario-list strong {
  color: inherit;
  font-size: 0.72rem;
  line-height: 1.2;
}

.universe-scenario-list small {
  color: #727b8e;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1.2;
}

.universe-scenario-list button:not(:disabled):hover,
.universe-scenario-list button.is-scenario-active {
  color: #fff;
  background: #6652a3;
  border-color: #6652a3;
  box-shadow: 0 10px 24px rgba(57, 46, 98, 0.2);
  transform: translateY(-2px);
}

.universe-scenario-list button.is-scenario-active > span,
.universe-scenario-list button.is-scenario-active small,
.universe-scenario-list button:not(:disabled):hover > span,
.universe-scenario-list button:not(:disabled):hover small {
  color: rgba(255, 255, 255, 0.82);
}

.universe-scenario-list button.is-scenario-active > span,
.universe-scenario-list button:not(:disabled):hover > span {
  background: rgba(255, 255, 255, 0.14);
}

@keyframes universe-path-flow {
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes universe-logo-sync {
  to {
    transform: rotate(360deg);
  }
}

@keyframes universe-core-pulse {
  0% {
    opacity: 1;
    transform: scale(0.75);
  }
  70%,
  100% {
    opacity: 0.15;
    transform: scale(2.6);
  }
}

@keyframes universe-sync-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes universe-brain-think {
  from {
    opacity: 0.55;
    transform: scale(0.9) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: scale(1.06) rotate(2deg);
  }
}

@keyframes universe-chat-pop {
  0%,
  100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.12) rotate(-2deg);
  }
}

@keyframes universe-followup-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  48% {
    transform: scale(1.1) rotate(3deg);
  }
}

@keyframes universe-activity-arrive {
  from {
    opacity: 0.35;
    transform: translateX(-50%) translateY(7px) translateZ(102px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) translateZ(102px);
  }
}

.home-feature-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 8% 8%, rgba(64, 197, 217, 0.18), transparent 28rem),
    radial-gradient(circle at 94% 52%, rgba(162, 109, 213, 0.23), transparent 30rem),
    linear-gradient(145deg, #111a37, #241b3d 58%, #122c43);
}

.home-feature-showcase::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}

.home-feature-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto clamp(44px, 6vw, 82px);
}

.home-feature-heading h2,
.home-feature-heading .eyebrow {
  color: #fff;
}

.home-feature-heading > p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.72;
}

.home-feature-stack {
  display: grid;
  gap: clamp(26px, 4vw, 52px);
  max-width: 1440px;
  margin: 0 auto;
}

.home-feature-story {
  display: grid;
  grid-template-columns: minmax(320px, 0.76fr) minmax(520px, 1.24fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  min-height: 650px;
  padding: clamp(28px, 5vw, 68px);
  color: var(--public-navy);
  background:
    radial-gradient(circle at 90% 0%, rgba(78, 195, 215, 0.16), transparent 25rem),
    rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 38px;
  box-shadow: 0 32px 82px rgba(5, 10, 28, 0.28);
  scroll-margin-top: 104px;
}

.feature-story-reports {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  background:
    radial-gradient(circle at 5% 90%, rgba(153, 105, 207, 0.2), transparent 24rem),
    linear-gradient(145deg, #fffdf8, #f5f0fb);
}

.feature-story-reports .home-feature-copy {
  order: 2;
}

.feature-story-reports .feature-constellation {
  order: 1;
}

.feature-story-assistant {
  background:
    radial-gradient(circle at 88% 84%, rgba(42, 155, 184, 0.16), transparent 25rem),
    linear-gradient(145deg, #fbfdff, #f2eef9);
}

.feature-story-followups {
  background:
    radial-gradient(circle at 8% 84%, rgba(42, 155, 184, 0.17), transparent 25rem),
    linear-gradient(145deg, #f8fcff, #f5effa);
}

.home-feature-copy {
  position: relative;
  z-index: 2;
}

.feature-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--public-purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-kicker span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(145deg, #2aa9c4, #7654b2);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(76, 62, 132, 0.2);
}

.feature-availability {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 18px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.feature-availability.is-current {
  color: #14596b;
  background: #dff5f7;
  border: 1px solid #b8e5e9;
}

.feature-availability.is-planned {
  color: #6c4b15;
  background: #fff0ce;
  border: 1px solid #f0d695;
}

.home-feature-copy h3 {
  margin: 0;
  color: var(--public-navy);
  font-size: clamp(2rem, 3.6vw, 3.7rem);
  line-height: 1.01;
  letter-spacing: -0.045em;
}

.home-feature-copy > p:not(.feature-kicker) {
  margin: 24px 0 0;
  color: #596277;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.72;
}

.feature-proof-list {
  display: grid;
  gap: 11px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.feature-proof-list li {
  position: relative;
  padding-left: 28px;
  color: #384259;
  font-size: 0.86rem;
  font-weight: 780;
  line-height: 1.45;
}

.feature-proof-list li::before {
  position: absolute;
  top: 0.12em;
  left: 0;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  content: "✓";
  color: #fff;
  background: #6d55a6;
  border-radius: 50%;
  font-size: 0.65rem;
}

.feature-constellation {
  --feature-tilt-x: 0deg;
  --feature-tilt-y: 0deg;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 540px;
  aspect-ratio: 680 / 560;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96), rgba(245, 247, 253, 0.82) 46%, transparent 70%),
    linear-gradient(145deg, rgba(229, 246, 249, 0.84), rgba(241, 233, 249, 0.9));
  border: 1px solid rgba(102, 82, 163, 0.15);
  border-radius: 34px;
  box-shadow: inset 0 1px 0 #fff, 0 25px 58px rgba(31, 38, 69, 0.14);
  perspective: 1100px;
  transform: rotateX(var(--feature-tilt-x)) rotateY(var(--feature-tilt-y));
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.feature-constellation::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.22;
  background-image: radial-gradient(circle, #695b95 1px, transparent 1.5px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.feature-connection-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  transform: translateZ(12px);
}

.feature-connection-map path {
  fill: none;
  opacity: 0.4;
  stroke: #8f85aa;
  stroke-dasharray: 8 12;
  stroke-linecap: round;
  stroke-width: 3;
  transition: opacity 180ms ease, stroke 180ms ease, stroke-width 180ms ease;
}

.feature-connection-map path.is-active,
.feature-connection-map .feature-output-line {
  opacity: 1;
  stroke: #3aa9c2;
  stroke-width: 4;
}

.home-feature-story.is-visible .feature-connection-map path {
  animation: feature-connection-flow 2.2s linear 2;
}

.home-feature-story.is-interacting .feature-connection-map path.is-active {
  animation: feature-connection-flow 700ms linear 2;
}

.feature-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  padding: 20px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #2aa5c0, #7353ae);
  border: 8px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 30px 65px rgba(51, 49, 98, 0.32), 0 0 0 10px rgba(102, 82, 163, 0.08);
  transform: translate(-50%, -50%) translateZ(62px);
}

.feature-hub svg {
  width: 72px;
  height: 58px;
  fill: rgba(255, 255, 255, 0.18);
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.feature-hub .hub-shield {
  fill: rgba(255, 255, 255, 0.18);
}

.feature-hub .hub-check {
  fill: none;
}

.feature-hub strong,
.feature-hub small {
  color: #fff;
}

.feature-hub strong {
  margin-top: -4px;
  font-size: 1rem;
}

.feature-hub small {
  opacity: 0.75;
  font-size: 0.68rem;
  font-weight: 800;
}

.feature-orbit-node {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 104px;
  min-height: 82px;
  padding: 10px 12px;
  color: #25304c;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(89, 74, 135, 0.2);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(38, 44, 75, 0.15);
  cursor: pointer;
  transform: translateZ(42px);
  transition: color 170ms ease, background 170ms ease, border-color 170ms ease,
    box-shadow 170ms ease, transform 170ms ease;
}

.feature-orbit-node:disabled {
  color: #25304c;
  opacity: 1;
  cursor: default;
}

.feature-orbit-node svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #6750a2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.feature-orbit-node span {
  font-size: 0.82rem;
  font-weight: 900;
}

.feature-orbit-node:not(:disabled):hover,
.feature-orbit-node:focus-visible,
.feature-orbit-node.is-active {
  color: #fff;
  background: #6652a3;
  border-color: #6652a3;
  box-shadow: 0 22px 44px rgba(57, 46, 98, 0.28), 0 0 0 5px rgba(75, 177, 200, 0.16);
  transform: translateY(-4px) translateZ(58px) scale(1.04);
}

.feature-orbit-node:not(:disabled):hover svg,
.feature-orbit-node:focus-visible svg,
.feature-orbit-node.is-active svg {
  stroke: #fff;
}

.feature-orbit-node:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 3px;
}

.feature-sharing-school,
.feature-assistant-teacher,
.feature-followup-schedule {
  top: 6%;
  left: 5%;
}

.feature-sharing-clinic,
.feature-assistant-practitioner,
.feature-followup-questionnaire {
  top: 6%;
  right: 5%;
}

.feature-sharing-home,
.feature-assistant-young,
.feature-followup-respondent {
  bottom: 13%;
  left: 6%;
}

.feature-sharing-parent,
.feature-assistant-caregiver,
.feature-followup-results {
  right: 6%;
  bottom: 13%;
}

.feature-live-detail {
  position: absolute;
  right: 16%;
  bottom: 3%;
  left: 16%;
  z-index: 6;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  color: #4f5870;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(102, 82, 163, 0.12);
  border-radius: 13px;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
  backdrop-filter: blur(10px);
}

.feature-data-pulse,
.feature-chat-pulse {
  fill: rgba(61, 177, 201, 0.18);
  stroke: #3aa9c2;
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
}

.home-feature-story.is-visible .pulse-one,
.home-feature-story.is-visible .chat-pulse-one {
  animation: feature-hub-pulse 1.8s ease-out 2;
}

.home-feature-story.is-visible .pulse-two,
.home-feature-story.is-visible .chat-pulse-two {
  animation: feature-hub-pulse 1.8s 0.7s ease-out 2;
}

.feature-report-constellation {
  background:
    radial-gradient(circle at 52% 50%, rgba(255, 255, 255, 0.98), rgba(249, 245, 237, 0.82) 47%, transparent 70%),
    linear-gradient(145deg, #fff6e6, #eee7f8);
}

.feature-ai-hub {
  width: 132px;
  height: 132px;
  background: linear-gradient(145deg, #6b52a7, #2e99b2);
}

.feature-ai-hub svg {
  width: 58px;
  height: 58px;
}

.feature-report-notes {
  top: 8%;
  left: 3%;
}

.feature-report-forms {
  top: 38%;
  left: 2%;
}

.feature-report-progress {
  bottom: 13%;
  left: 4%;
}

.feature-report-output {
  position: absolute;
  top: 50%;
  right: 3%;
  z-index: 5;
  display: grid;
  gap: 9px;
  width: 154px;
  min-height: 170px;
  padding: 20px;
  color: var(--public-navy);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(102, 82, 163, 0.16);
  border-radius: 20px;
  box-shadow: 0 20px 42px rgba(44, 45, 82, 0.18);
  transform: translateY(-50%) translateZ(48px) rotateY(-3deg);
}

.feature-report-output span {
  font-size: 0.88rem;
  font-weight: 900;
}

.feature-report-output i {
  display: block;
  width: 100%;
  height: 7px;
  background: #e1dbea;
  border-radius: 999px;
}

.feature-report-output i:nth-of-type(2) {
  width: 82%;
}

.feature-report-output i:nth-of-type(3) {
  width: 58%;
}

.feature-report-output small {
  align-self: end;
  color: #25778b;
  font-size: 0.76rem;
  font-weight: 850;
}

.feature-paper-stream {
  position: absolute;
  top: 50%;
  left: 24%;
  z-index: 3;
  width: 90px;
  height: 100px;
  transform: translate(-50%, -50%) translateZ(28px);
}

.paper-sheet {
  --paper-angle: 0deg;
  position: absolute;
  display: grid;
  gap: 7px;
  width: 58px;
  height: 76px;
  padding: 13px 10px;
  background: #fff;
  border: 1px solid #d9d2e4;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(51, 50, 82, 0.13);
  transform: translateX(0) rotate(var(--paper-angle));
}

.paper-sheet i {
  display: block;
  width: 100%;
  height: 5px;
  background: #d9d3e4;
  border-radius: 999px;
}

.paper-sheet-one {
  --paper-angle: -12deg;
  top: 12px;
  left: 2px;
}

.paper-sheet-two {
  --paper-angle: 7deg;
  top: 2px;
  left: 22px;
}

.paper-sheet-three {
  --paper-angle: 17deg;
  top: 18px;
  left: 38px;
}

.feature-story-reports.is-visible .paper-sheet-one {
  animation: paper-breathe 2.8s ease-in-out 1;
}

.feature-story-reports.is-visible .paper-sheet-two {
  animation: paper-breathe 2.8s 0.35s ease-in-out 1;
}

.feature-story-reports.is-visible .paper-sheet-three {
  animation: paper-breathe 2.8s 0.7s ease-in-out 1;
}

.feature-assistant-hub {
  background: linear-gradient(145deg, #273255, #7452ad);
}

.feature-assistant-hub svg {
  width: 70px;
  height: 62px;
}

.feature-followup-constellation {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.98), rgba(239, 248, 250, 0.84) 48%, transparent 70%),
    linear-gradient(145deg, #e8f7f8, #eee7f8);
}

.feature-followup-hub {
  background: linear-gradient(145deg, #168fa9, #684d9e);
}

.feature-followup-hub svg {
  width: 68px;
  height: 60px;
}

.solution-story-section {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(520px, 1.15fr);
  gap: clamp(42px, 7vw, 116px);
  align-items: center;
  padding-block: clamp(64px, 6vw, 88px);
  background:
    radial-gradient(circle at 7% 10%, rgba(43, 170, 197, 0.16), transparent 25rem),
    radial-gradient(circle at 93% 86%, rgba(153, 105, 207, 0.18), transparent 27rem),
    linear-gradient(145deg, #eef8f9, #f3edf9);
}

.solution-story-copy {
  max-width: 620px;
}

.solution-story-copy > p:last-child {
  color: #596277;
  font-size: clamp(1rem, 1.3vw, 1.17rem);
  line-height: 1.72;
}

.solution-story-visual {
  width: min(670px, 100%);
  justify-self: end;
}

@keyframes feature-connection-flow {
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes feature-hub-pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.65);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@keyframes paper-breathe {
  0%,
  100% {
    transform: translateX(0) rotate(var(--paper-angle));
  }
  50% {
    transform: translateX(8px) rotate(var(--paper-angle));
  }
}

@media (hover: hover) and (pointer: fine) {
  .feature-universe-surface:hover {
    --universe-tilt-x: 1.2deg;
    --universe-tilt-y: -1.7deg;
    box-shadow: 0 48px 105px rgba(32, 39, 65, 0.26);
  }

  .feature-constellation:hover {
    --feature-tilt-x: 0.8deg;
    --feature-tilt-y: -1deg;
    box-shadow: inset 0 1px 0 #fff, 0 30px 66px rgba(31, 38, 69, 0.18);
  }
}

@media (max-width: 1100px) {
  .home-feature-heading,
  .home-feature-story,
  .solution-story-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-feature-heading {
    align-items: start;
  }

  .home-feature-heading > p {
    max-width: 760px;
  }

  .home-feature-story {
    min-height: 0;
  }

  .home-feature-copy {
    max-width: 760px;
  }

  .feature-story-reports .home-feature-copy,
  .feature-story-reports .feature-constellation {
    order: initial;
  }

  .feature-constellation {
    width: min(760px, 100%);
    justify-self: center;
  }

  .solution-story-visual {
    justify-self: center;
  }
}

@media (max-width: 700px) {
  .feature-universe-surface {
    aspect-ratio: 700 / 700;
    border-radius: 28px;
  }

  .feature-universe-logo {
    top: -2%;
    left: 20%;
    width: 60%;
  }

  .feature-universe-hub {
    width: min(122px, 20%);
    height: 120px;
    min-height: 120px;
    padding: 8px 7px;
    border-radius: 18px;
  }

  .universe-hub-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .universe-hub-icon svg {
    width: 37px;
    height: 37px;
  }

  .feature-universe-hub strong {
    font-size: 0.78rem;
  }

  .universe-actor {
    width: min(96px, 18%);
    min-height: 72px;
    padding: 7px;
  }

  .universe-actor span {
    font-size: 0.75rem;
  }

  .universe-actor svg {
    width: 26px;
    height: 26px;
  }

  .universe-scenario-list strong {
    font-size: 0.74rem;
  }

  .universe-scenario-list small {
    font-size: 0.68rem;
  }

  .feature-universe-hub.is-scenario-active,
  .universe-actor.is-scenario-active {
    transform: translate(-50%, -50%);
  }

  .home-feature-story {
    gap: 30px;
    padding: 22px;
    border-radius: 26px;
  }

  .home-feature-copy {
    display: contents;
  }

  .home-feature-copy > * {
    position: relative;
    z-index: 2;
  }

  .home-feature-copy .feature-kicker {
    order: 1;
    margin-bottom: 0;
  }

  .home-feature-copy .feature-availability {
    order: 2;
    justify-self: start;
    margin-bottom: 0;
  }

  .home-feature-copy h3 {
    order: 3;
    font-size: clamp(2rem, 9.5vw, 3rem);
  }

  .home-feature-copy > p:not(.feature-kicker) {
    order: 5;
    margin-top: 0;
  }

  .feature-proof-list {
    order: 6;
    margin-top: 0;
  }

  .feature-constellation {
    order: 4;
    min-height: 500px;
    aspect-ratio: auto;
    border-radius: 24px;
  }

  .feature-story-reports .feature-constellation {
    order: 4;
  }

  .feature-orbit-node {
    min-width: 88px;
    min-height: 72px;
    padding: 8px;
  }

  .feature-orbit-node svg {
    width: 26px;
    height: 26px;
  }

  .feature-hub {
    width: 130px;
    height: 130px;
    border-width: 6px;
  }

  .feature-ai-hub {
    width: 112px;
    height: 112px;
  }

  .feature-report-output {
    right: 3%;
    width: 122px;
    min-height: 145px;
    padding: 14px;
  }

  .feature-paper-stream {
    left: 25%;
    transform: translate(-50%, -50%) scale(0.82) translateZ(28px);
  }

  .feature-live-detail {
    right: 8%;
    left: 8%;
  }
}

@media (max-width: 620px) {
  .public-body:has(.landing-page) .chatbot-launcher {
    top: auto;
    right: 8px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }

}

@media (max-width: 620px) {
  .feature-universe-surface {
    min-height: 780px;
    aspect-ratio: auto;
  }

  .feature-universe-logo {
    top: -1%;
    left: 19%;
    width: 62%;
  }

  .feature-universe-connections {
    opacity: 0.72;
  }

  .universe-desktop-paths {
    display: none;
  }

  .universe-compact-paths {
    display: inline;
  }

  .universe-compact-paths .universe-path {
    opacity: 0.14;
    stroke: #6d61a0;
  }

  .universe-compact-paths .universe-path.is-scenario-active {
    opacity: 1;
    stroke: #168faa;
  }

  .feature-universe.is-static-scenarios .universe-compact-paths .universe-path.is-scenario-active {
    opacity: 0.48;
    stroke-width: 2.4;
  }

  .feature-universe-hub {
    width: min(150px, 42%);
    height: 104px;
    min-height: 104px;
  }

  .universe-hub-sharing {
    top: 30%;
    left: 26%;
  }

  .universe-hub-drafting {
    top: 30%;
    left: 74%;
  }

  .universe-hub-chatbot {
    top: 45%;
    left: 26%;
  }

  .universe-hub-followup {
    top: 45%;
    left: 74%;
  }

  .feature-universe-hub strong {
    font-size: 0.72rem;
  }

  .universe-hub-icon {
    width: 42px;
    height: 42px;
  }

  .universe-hub-icon svg {
    width: 34px;
    height: 34px;
  }

  .universe-actor {
    width: 42%;
    min-height: 70px;
  }

  .universe-actor-practitioner,
  .universe-actor-client {
    top: 61.5%;
  }

  .universe-actor-teacher,
  .universe-actor-parent {
    top: 75%;
  }

  .universe-actor-practitioner,
  .universe-actor-teacher {
    left: 26%;
  }

  .universe-actor-client,
  .universe-actor-parent {
    left: 74%;
  }

  .universe-activity-card,
  .universe-activity-card[data-activity-actor="practitioner"],
  .universe-activity-card[data-activity-actor="client"],
  .universe-activity-card[data-activity-actor="teacher"],
  .universe-activity-card[data-activity-actor="parent"],
  .universe-activity-card[data-activity-actor="all"] {
    top: 83%;
    left: 50%;
    width: 88%;
    min-height: 108px;
  }

  .universe-activity-heading strong {
    font-size: 0.7rem;
  }

  .universe-activity-heading span,
  .universe-activity-card p {
    font-size: 0.66rem;
  }

  .universe-scenario-list {
    grid-auto-columns: minmax(150px, 44%);
    padding: 2px 2px 10px;
  }

  .universe-scenario-list button {
    min-height: 124px;
  }
}

@media (max-width: 430px) {
  .home-feature-showcase {
    padding-inline: 14px;
  }

  .home-feature-story {
    padding: 18px;
  }

  .feature-constellation {
    min-height: 520px;
  }

  .feature-orbit-node {
    min-width: 82px;
    min-height: 68px;
  }

  .feature-sharing-school,
  .feature-assistant-teacher,
  .feature-followup-schedule {
    top: 4%;
    left: 3%;
  }

  .feature-sharing-clinic,
  .feature-assistant-practitioner,
  .feature-followup-questionnaire {
    top: 4%;
    right: 3%;
  }

  .feature-sharing-home,
  .feature-assistant-young,
  .feature-followup-respondent {
    bottom: 15%;
    left: 3%;
  }

  .feature-sharing-parent,
  .feature-assistant-caregiver,
  .feature-followup-results {
    right: 3%;
    bottom: 15%;
  }

  .feature-report-notes,
  .feature-report-forms,
  .feature-report-progress {
    left: 2%;
  }

  .feature-report-progress {
    bottom: 27%;
  }

  .feature-report-output {
    right: 2%;
    width: 104px;
  }

  .feature-paper-stream {
    display: none;
  }

  .feature-live-detail {
    right: 3%;
    left: 3%;
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-universe-surface,
  .feature-universe-hub,
  .universe-actor,
  .universe-path,
  .universe-system-core,
  .universe-sync-mark,
  .universe-brain-icon svg,
  .universe-chatbot-icon svg,
  .universe-followup-icon svg,
  .feature-logo-sync-rotor,
  .page-sync-rotor,
  .universe-activity-card,
  .universe-scenario-list button,
  .feature-constellation,
  .feature-orbit-node,
  .feature-connection-map path,
  .paper-sheet,
  .feature-data-pulse,
  .feature-chat-pulse {
    animation: none !important;
    transition: none !important;
    transform-style: flat;
  }

  .feature-universe-surface,
  .feature-constellation {
    transform: none;
  }

}

.save-data .feature-connection-map path,
.save-data .universe-path,
.save-data .universe-system-core,
.save-data .universe-sync-mark,
.save-data .universe-brain-icon svg,
.save-data .universe-chatbot-icon svg,
.save-data .universe-followup-icon svg,
.save-data .feature-logo-sync-rotor,
.save-data .page-sync-rotor,
.save-data .universe-activity-card,
.save-data .paper-sheet,
.save-data .feature-data-pulse,
.save-data .feature-chat-pulse {
  animation: none !important;
}

/* Public About, coordination comparison, and visual process flow ---------- */

.compact-team-section {
  background: linear-gradient(150deg, #f1ecf8, #f3f9f8);
}

.team-name-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
}

.team-name-card {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 104px;
  padding: clamp(18px, 2vw, 26px);
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ded8e7;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(42, 35, 65, 0.07);
}

.team-name-card h3 {
  margin: 0;
  font-size: clamp(1rem, 1.45vw, 1.26rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.collaborator-section {
  background:
    radial-gradient(circle at 92% 12%, rgba(42, 155, 184, 0.12), transparent 24rem),
    #fff;
}

.collaborator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1440px;
  margin: 0 auto;
}

.collaborator-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  min-height: 112px;
  padding: 20px 22px;
  color: var(--public-navy);
  background: #faf9fc;
  border: 1px solid #dfd9e8;
  border-radius: 20px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.collaborator-card:nth-child(even) {
  background: #f3f9f9;
  border-color: #d3e5e7;
}

.collaborator-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff;
  background: linear-gradient(145deg, #2a9bb8, #6652a3);
  border-radius: 16px;
}

.collaborator-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.collaborator-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.collaborator-card small {
  color: #6c7280;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.collaborator-card strong {
  margin-top: 5px;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  line-height: 1.25;
}

.collaborator-arrow {
  color: var(--public-purple);
  font-size: 1.15rem;
  font-weight: 900;
}

.collaborator-card:hover {
  border-color: #bfb1d3;
  box-shadow: 0 20px 46px rgba(42, 35, 65, 0.11);
  transform: translateY(-2px);
}

.collaborator-card:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 4px;
}

.coordination-comparison {
  background:
    radial-gradient(circle at 8% 10%, rgba(98, 108, 120, 0.08), transparent 24rem),
    radial-gradient(circle at 92% 84%, rgba(102, 82, 163, 0.12), transparent 28rem),
    #fff;
}

.coordination-comparison-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.65fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
  max-width: 1440px;
  margin: 0 auto clamp(34px, 5vw, 64px);
}

.coordination-comparison-heading > p {
  margin: 0;
  color: #5c6476;
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  line-height: 1.7;
}

.care-model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 32px);
  max-width: 1440px;
  margin: 0 auto;
}

.care-model-card {
  min-width: 0;
  padding: clamp(20px, 2.4vw, 34px);
  overflow: hidden;
  border-radius: 30px;
}

.traditional-care-model {
  color: #343940;
  background: linear-gradient(145deg, #f4f4f3, #e9eaeb);
  border: 1px solid #cdd0d3;
  box-shadow: 0 24px 56px rgba(50, 55, 60, 0.13);
}

.autisync-care-model {
  color: var(--public-navy);
  background:
    radial-gradient(circle at 84% 10%, rgba(45, 166, 192, 0.18), transparent 20rem),
    linear-gradient(145deg, #eef8f9, #f3edf9);
  border: 1px solid #d4cce2;
  box-shadow: 0 24px 58px rgba(45, 42, 78, 0.16);
}

.care-model-universe {
  width: min(760px, 100%);
  margin: 18px auto 0;
}

.care-model-universe .feature-universe-surface {
  border-radius: 24px;
  box-shadow: 0 26px 58px rgba(32, 39, 65, 0.17);
}

.care-model-universe .universe-scenario-list {
  grid-auto-columns: calc((100% - 21px) / 4);
  margin-top: 12px;
}

.care-model-universe .universe-activity-card {
  top: auto;
  bottom: 2.5%;
  width: min(176px, 25%);
  min-height: 130px;
  align-content: start;
}

.care-model-universe .universe-activity-heading {
  align-items: start;
  flex-wrap: wrap;
}

.care-model-universe .universe-activity-heading strong,
.care-model-universe .universe-activity-heading span {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.care-model-universe .universe-activity-card p {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: initial;
}

.care-model-universe .universe-scenario-list button {
  min-height: 142px;
}

.care-model-card > header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.care-model-card > header .eyebrow,
.care-model-card > header h3 {
  margin-top: 0;
}

.traditional-care-model > header .eyebrow {
  color: #686e74;
}

.care-model-number {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: #737980;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 900;
}

.autisync-care-model .care-model-number {
  background: linear-gradient(145deg, #2a9bb8, #6652a3);
}

.care-model-card h3 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.35vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.care-model-intro {
  min-height: 5.2em;
  margin: 20px 0 0;
  color: #5e6672;
  font-size: 0.92rem;
  line-height: 1.62;
}

.traditional-care-model .care-model-intro,
.traditional-care-model .care-model-summary {
  color: #5e6368;
}

.care-model-diagram {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 390px;
  margin-top: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(95, 100, 108, 0.18);
  border-radius: 24px;
}

.traditional-care-model .care-model-diagram {
  min-height: clamp(520px, 47vw, 660px);
  background:
    repeating-linear-gradient(-8deg, transparent 0 41px, rgba(104, 109, 114, 0.035) 42px 43px),
    linear-gradient(148deg, rgba(250, 250, 249, 0.92), rgba(229, 230, 230, 0.78));
}

.autisync-care-model .care-model-diagram {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.94), rgba(248, 249, 253, 0.76) 46%, transparent 73%),
    rgba(255, 255, 255, 0.5);
  border-color: rgba(102, 82, 163, 0.15);
}

.care-model-routes {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.traditional-care-model .care-model-routes path {
  fill: none;
  opacity: 0.75;
  stroke: #8e949a;
  stroke-dasharray: 6 9;
  stroke-linecap: round;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.traditional-care-model .care-model-routes > path {
  marker-end: url(#fragmented-handoff-arrow);
  animation: fragmented-route-flow 1.4s linear infinite;
}

.traditional-care-model .care-model-routes > path:nth-of-type(2n) {
  animation-duration: 1.85s;
  animation-delay: -620ms;
}

.traditional-care-model .care-model-routes > path:nth-of-type(3n) {
  animation-duration: 1.15s;
  animation-delay: -340ms;
}

.traditional-care-model .care-model-routes marker path {
  fill: #7a8086;
  stroke: none;
}

.traditional-care-model .care-model-routes .care-model-route-return {
  opacity: 0.55;
  stroke-dasharray: 3 11;
  animation-direction: reverse;
}

.traditional-care-model .care-model-routes .care-model-route-cross {
  opacity: 0.3;
  stroke-dasharray: 2 13;
  stroke-width: 1.7;
}

.traditional-care-model .care-model-routes .care-model-route-loop {
  opacity: 0.58;
  stroke-dasharray: 4 8;
  stroke-width: 2;
}

.autisync-care-model .care-model-routes path {
  fill: none;
  opacity: 0.8;
  stroke: url(#autisync-comparison-route);
  stroke-dasharray: 8 10;
  stroke-linecap: round;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

.autisync-care-model .care-model-routes circle {
  fill: none;
  opacity: 0.28;
  stroke: #7960ae;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.care-model-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: min(142px, 27%);
  min-height: 84px;
  padding: 10px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #c7cacf;
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(53, 58, 64, 0.11);
}

.autisync-care-model .care-model-node {
  border-color: #d2c9e0;
  box-shadow: 0 13px 28px rgba(54, 52, 92, 0.13);
}

.care-model-node svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #666d74;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.autisync-care-model .care-model-node svg {
  stroke: #6652a3;
}

.care-model-node strong,
.care-model-node small {
  display: block;
}

.care-model-node strong {
  margin-top: 4px;
  color: inherit;
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  line-height: 1.15;
}

.care-model-node small {
  margin-top: 3px;
  color: #70767c;
  font-size: clamp(0.58rem, 0.8vw, 0.67rem);
  font-weight: 720;
  line-height: 1.2;
}

.care-model-node-north-west {
  top: 3%;
  left: 3%;
}

.care-model-node-north-east {
  top: 3%;
  right: 3%;
}

.care-model-node-south-west {
  bottom: 3%;
  left: 3%;
}

.care-model-node-south-east {
  right: 3%;
  bottom: 3%;
}

.traditional-care-model .care-model-node-north-west {
  transform: rotate(-2.5deg);
}

.traditional-care-model .care-model-node-north-east {
  top: 6%;
  transform: rotate(1.8deg);
}

.traditional-care-model .care-model-node-south-west {
  bottom: 6%;
  left: 5%;
  transform: rotate(2.2deg);
}

.traditional-care-model .care-model-node-south-east {
  right: 4%;
  bottom: 2%;
  transform: rotate(-2.8deg);
}

.care-model-centre {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: min(188px, 35%);
  min-height: 132px;
  padding: 16px 12px;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #666d74, #3f4449);
  border: 7px solid rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(52, 56, 61, 0.25);
  transform: translate(-50%, -50%);
}

.autisync-care-centre {
  background: linear-gradient(145deg, #239bb7, #6e51a7);
  box-shadow: 0 24px 52px rgba(63, 54, 111, 0.3), 0 0 0 8px rgba(102, 82, 163, 0.08);
}

.traditional-care-centre::before {
  position: absolute;
  inset: -14px;
  z-index: -1;
  content: "";
  border: 2px dashed rgba(95, 101, 107, 0.5);
  border-radius: 30px;
  animation: fragmented-centre-burden 4.8s linear infinite;
}

.care-model-centre svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.care-model-centre strong,
.care-model-centre small {
  display: block;
  color: #fff;
}

.care-model-centre strong {
  margin-top: 5px;
  font-size: clamp(0.78rem, 1.15vw, 0.95rem);
  line-height: 1.2;
}

.care-model-centre small {
  margin-top: 3px;
  opacity: 0.78;
  font-size: 0.63rem;
  font-weight: 780;
}

.traditional-workload {
  display: block;
  margin-top: 8px;
  padding: 4px 7px;
  color: #33383d;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  font-size: clamp(0.5rem, 0.68vw, 0.6rem);
  font-weight: 900;
  line-height: 1.2;
}

.loose-paper,
.profile-record {
  position: absolute;
  z-index: 4;
}

.loose-paper {
  --paper-position: rotate(0deg);
  display: grid;
  justify-items: center;
  gap: 1px;
  width: 50px;
  padding: 4px;
  color: #62676c;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #c6c9cc;
  border-radius: 7px;
  box-shadow: 0 8px 16px rgba(53, 58, 64, 0.12);
  animation: fragmented-paper-jostle 3.4s ease-in-out infinite;
  transform: var(--paper-position);
}

.loose-paper:nth-of-type(2n) {
  animation-delay: -1.7s;
  animation-duration: 4.1s;
}

.loose-paper svg {
  width: 22px;
  height: 26px;
  fill: #f2f2f1;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.loose-paper small {
  font-size: 0.55rem;
  font-weight: 850;
}

.loose-paper-one {
  top: 23%;
  left: 50%;
  --paper-position: translateX(-50%) rotate(-7deg);
}

.loose-paper-two {
  top: 48%;
  right: 5%;
  --paper-position: translateY(-50%) rotate(7deg);
}

.loose-paper-three {
  bottom: 21%;
  left: 50%;
  --paper-position: translateX(-50%) rotate(5deg);
}

.loose-paper-four {
  top: 48%;
  left: 5%;
  --paper-position: translateY(-50%) rotate(-6deg);
}

.loose-paper-five {
  top: 31%;
  left: 27%;
  --paper-position: rotate(11deg);
}

.loose-paper-six {
  top: 29%;
  right: 26%;
  --paper-position: rotate(-9deg);
}

.loose-paper-seven {
  bottom: 30%;
  left: 25%;
  --paper-position: rotate(-13deg);
}

.loose-paper-eight {
  right: 25%;
  bottom: 28%;
  --paper-position: rotate(12deg);
}

@keyframes fragmented-route-flow {
  to {
    stroke-dashoffset: -48;
  }
}

@keyframes fragmented-centre-burden {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fragmented-paper-jostle {
  0%,
  100% {
    transform: var(--paper-position) translateY(0);
  }
  50% {
    transform: var(--paper-position) translateY(-4px);
  }
}

.profile-record {
  padding: 6px 8px;
  color: #514176;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cec2dd;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(56, 50, 94, 0.11);
  font-size: clamp(0.55rem, 0.75vw, 0.65rem);
  font-weight: 850;
  white-space: nowrap;
}

.profile-record-one {
  top: 24%;
  left: 50%;
  transform: translateX(-50%);
}

.profile-record-two {
  top: 48%;
  right: 3%;
  transform: translateY(-50%);
}

.profile-record-three {
  bottom: 23%;
  left: 50%;
  transform: translateX(-50%);
}

.profile-record-four {
  top: 48%;
  left: 3%;
  transform: translateY(-50%);
}

.care-model-summary {
  min-height: 3.5em;
  margin: 18px 0 0;
  color: #555e70;
  font-size: 0.84rem;
  line-height: 1.55;
}

.care-model-summary strong {
  color: inherit;
}

.method-comparison-wrap {
  max-width: 1440px;
  margin: clamp(34px, 5vw, 64px) auto 0;
  overflow-x: auto;
  border: 1px solid #dcd7e4;
  border-radius: 24px;
  box-shadow: 0 18px 46px rgba(42, 35, 65, 0.08);
}

.method-comparison-wrap:focus-visible {
  outline: 3px solid #2a9bb8;
  outline-offset: 4px;
}

.method-comparison-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #fff;
}

.method-comparison-table caption {
  padding: 24px 26px;
  color: var(--public-navy);
  text-align: left;
  background: linear-gradient(135deg, #f4f1f8, #eef7f8);
  border-bottom: 1px solid #dcd7e4;
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  font-weight: 900;
}

.method-comparison-table th,
.method-comparison-table td {
  padding: 18px 20px;
  text-align: left;
  border-right: 1px solid #e6e2ea;
  border-bottom: 1px solid #e6e2ea;
  vertical-align: middle;
}

.method-comparison-table tr > *:last-child {
  border-right: 0;
}

.method-comparison-table tbody tr:last-child > * {
  border-bottom: 0;
}

.method-comparison-table thead th {
  color: #4f5768;
  background: #faf9fc;
  font-size: 0.74rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.method-comparison-table thead th:nth-child(2) {
  background: #f0f1f1;
}

.method-comparison-table thead th:nth-child(3) {
  background: #f0ebf7;
}

.method-comparison-table tbody th {
  width: 48%;
  color: #303950;
  font-size: 0.9rem;
  line-height: 1.45;
}

.method-comparison-table tbody td {
  width: 26%;
}

.comparison-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4c5360;
  font-size: 0.8rem;
  line-height: 1.3;
}

.comparison-status > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  color: #fff;
  background: #747a81;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 900;
}

.comparison-status.is-yes > span {
  background: #25798b;
}

.comparison-status strong {
  color: inherit;
}

.comparison-table-note {
  min-width: 780px;
  margin: 0;
  padding: 14px 20px;
  color: #656c79;
  background: #faf9fc;
  border-top: 1px solid #e6e2ea;
  font-size: 0.74rem;
  line-height: 1.5;
}

.process-steps-intro {
  max-width: 720px;
  margin: 20px auto 0;
  color: #626a79;
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.65;
}

.process-steps-grid {
  gap: 18px;
}

.process-steps-grid .process-step,
.process-steps-grid .process-step:first-child,
.process-steps-grid .process-step:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 600px;
  padding: clamp(20px, 2.2vw, 30px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ddd8e5;
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(42, 35, 65, 0.08);
}

.process-steps-grid .process-step:nth-child(even) {
  background: linear-gradient(155deg, #fff, #f0f8f8);
  border-color: #d3e4e6;
}

.process-step-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.process-step-number,
.process-step-icon {
  display: grid;
  place-items: center;
}

.process-step-number {
  width: 42px;
  height: 42px;
  color: #fff;
  background: linear-gradient(145deg, #2a9bb8, #6652a3);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 9px 20px rgba(79, 65, 135, 0.18);
}

.process-step-icon {
  width: 58px;
  height: 58px;
  color: #6652a3;
  background: #f0ebf7;
  border: 1px solid #dcd2e8;
  border-radius: 17px;
}

.process-step:nth-child(even) .process-step-icon {
  color: #237b8e;
  background: #e5f4f5;
  border-color: #c9e3e6;
}

.process-step-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.process-steps-grid .process-step h3 {
  margin: 26px 0 0;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.18;
}

.process-steps-grid .process-step > p {
  margin: 14px 0 24px;
  color: #626a79;
  font-size: 0.88rem;
  line-height: 1.62;
}

.process-mini-ui {
  min-height: 208px;
  margin-top: auto;
  padding: 13px;
  color: #35405a;
  background: #f7f6f9;
  border: 1px solid #ded9e6;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 #fff;
}

.process-step:nth-child(even) .process-mini-ui {
  background: #f3f9f9;
  border-color: #d6e6e8;
}

.mini-ui-toolbar {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  margin: -2px -2px 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dfdbe5;
}

.mini-ui-toolbar > span {
  width: 9px;
  height: 9px;
  background: #4da5b8;
  border-radius: 50%;
  box-shadow: 14px 0 0 #8f73b7;
}

.mini-ui-toolbar strong {
  margin-left: 12px;
  color: #303950;
  font-size: 0.72rem;
}

.mini-ui-toolbar small {
  color: #687080;
  font-size: 0.58rem;
  font-weight: 820;
}

.profile-mini-ui > p,
.permission-mini-ui > p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #e3dfe8;
  font-size: 0.68rem;
  font-weight: 780;
}

.profile-mini-ui > p:last-child,
.permission-mini-ui > p:last-child {
  border-bottom: 0;
}

.profile-mini-ui i {
  display: block;
  width: 42%;
  height: 7px;
  background: #d4cede;
  border-radius: 999px;
}

.invite-mini-ui > p {
  display: grid;
  gap: 3px;
  margin: 0 0 9px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d9e4e5;
  border-radius: 9px;
}

.invite-mini-ui > p small {
  color: #6d7481;
  font-size: 0.58rem;
}

.invite-mini-ui > p strong {
  color: #35405a;
  font-size: 0.67rem;
  overflow-wrap: anywhere;
}

.mini-ui-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-top: 10px;
  padding: 7px 10px;
  color: #fff;
  background: #6652a3;
  border-radius: 9px;
  font-size: 0.63rem;
  font-weight: 850;
}

.mini-toggle {
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.56rem;
}

.mini-toggle.is-on {
  color: #155d69;
  background: #dff3f4;
  border: 1px solid #bde0e3;
}

.mini-toggle.is-off {
  color: #665b46;
  background: #f1ece2;
  border: 1px solid #ddd3c0;
}

.activity-mini-ui > p {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid #e0dce6;
}

.activity-mini-ui > p:last-child {
  border-bottom: 0;
}

.activity-mini-ui > p > i {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  background: #2a9bb8;
  border: 2px solid #d9f0f2;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #2a9bb8;
}

.activity-mini-ui > p > span {
  display: grid;
}

.activity-mini-ui strong {
  color: #35405a;
  font-size: 0.66rem;
}

.activity-mini-ui small {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.57rem;
}

.process-boundary-note {
  max-width: 1040px;
  margin: 28px auto 0;
  padding: 18px 22px;
  color: #555e70;
  background: #f4f0fa;
  border: 1px solid #ddd4e8;
  border-radius: 16px;
  font-size: 0.84rem;
  line-height: 1.58;
}

.process-boundary-note strong {
  color: #4f3f74;
}

@media (hover: hover) and (pointer: fine) {
  .process-steps-grid .process-step {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  }

  .process-steps-grid .process-step:hover {
    border-color: #c6b9d7;
    box-shadow: 0 24px 54px rgba(42, 35, 65, 0.12);
    transform: translateY(-3px);
  }
}

@media (max-width: 1100px) {
  .team-name-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .coordination-comparison-heading,
  .care-model-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .coordination-comparison-heading {
    align-items: start;
  }

  .coordination-comparison-heading > p {
    max-width: 760px;
  }

  .care-model-intro,
  .care-model-summary {
    min-height: 0;
  }

  .care-model-diagram {
    min-height: 430px;
  }

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

  .process-steps-grid .process-step,
  .process-steps-grid .process-step:first-child,
  .process-steps-grid .process-step:last-child {
    min-height: 560px;
    border-radius: 24px;
  }
}

@media (max-width: 720px) {
  .collaborator-grid,
  .process-steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-steps-grid .process-step,
  .process-steps-grid .process-step:first-child,
  .process-steps-grid .process-step:last-child {
    min-height: 0;
  }

  .process-mini-ui {
    width: min(420px, 100%);
    min-height: 0;
    margin-top: 12px;
  }
}

@media (max-width: 620px) {
  .team-name-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-name-card {
    min-height: 0;
  }

  .collaborator-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 96px;
    padding: 16px;
  }

  .collaborator-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .collaborator-icon svg {
    width: 30px;
    height: 30px;
  }

  .care-model-card {
    padding: 16px;
    border-radius: 24px;
  }

  .care-model-card > header {
    gap: 10px;
  }

  .care-model-number {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .care-model-diagram {
    min-height: 390px;
    border-radius: 18px;
  }

  .care-model-node {
    width: min(104px, 32%);
    min-height: 72px;
    padding: 7px 5px;
    border-radius: 13px;
  }

  .care-model-node svg {
    width: 22px;
    height: 22px;
  }

  .care-model-node strong {
    font-size: 0.65rem;
  }

  .care-model-node small {
    font-size: 0.54rem;
  }

  .care-model-centre {
    width: min(144px, 44%);
    min-height: 116px;
    padding: 12px 7px;
    border-width: 5px;
    border-radius: 19px;
  }

  .care-model-centre svg {
    width: 34px;
    height: 34px;
  }

  .care-model-centre strong {
    font-size: 0.68rem;
  }

  .care-model-centre small {
    font-size: 0.55rem;
  }

  .care-model-universe .universe-activity-card,
  .care-model-universe .universe-activity-card[data-activity-actor="practitioner"],
  .care-model-universe .universe-activity-card[data-activity-actor="client"],
  .care-model-universe .universe-activity-card[data-activity-actor="teacher"],
  .care-model-universe .universe-activity-card[data-activity-actor="parent"],
  .care-model-universe .universe-activity-card[data-activity-actor="all"] {
    top: 81.5%;
    bottom: auto;
    width: 90%;
    min-height: 128px;
  }

  .care-model-universe .universe-scenario-list {
    grid-auto-columns: minmax(150px, 44%);
  }

  .loose-paper {
    width: 42px;
  }

  .profile-record {
    max-width: 86px;
    padding: 5px 6px;
    overflow: hidden;
    font-size: 0.52rem;
    text-overflow: ellipsis;
  }

  .method-comparison-wrap {
    border-radius: 18px;
  }

  .method-comparison-table caption {
    padding: 18px;
  }
}

@media (min-width: 621px) and (max-width: 760px) {
  .care-model-universe .feature-universe-surface {
    aspect-ratio: 700 / 760;
  }

  .care-model-universe .universe-activity-card {
    width: min(190px, 29%);
  }

  .care-model-universe .universe-activity-card[data-activity-actor="practitioner"] {
    left: 14.5%;
  }

  .care-model-universe .universe-activity-card[data-activity-actor="parent"] {
    left: 85.5%;
  }

  .care-model-universe .universe-activity-card[data-activity-actor="all"] {
    left: 50%;
    width: min(390px, 58%);
  }
}

@media (max-width: 360px) {
  .public-body .site-header {
    overflow-x: clip;
  }
}

@media (prefers-reduced-motion: reduce) {
  .collaborator-card,
  .process-steps-grid .process-step,
  .traditional-care-model .care-model-routes > path,
  .traditional-care-centre::before,
  .loose-paper {
    animation: none !important;
    transition: none;
  }
}

.save-data .traditional-care-model .care-model-routes > path,
.save-data .traditional-care-centre::before,
.save-data .loose-paper {
  animation: none !important;
}

/* Practitioner AI insights -------------------------------------------------
   Stored, source-aware observations are deliberately separate from human goal
   progress. Colours distinguish modality only; they never imply better/worse. */

.ai-insights-page {
  --ai-video: #7351a3;
  --ai-video-soft: #f0e9f8;
  --ai-audio: #14756d;
  --ai-audio-soft: #e4f3ef;
  --ai-transcript: #b6564c;
  --ai-transcript-soft: #f9e9e5;
  display: grid;
  gap: 18px;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.ai-insights-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  gap: clamp(22px, 4vw, 64px);
  padding: clamp(28px, 4.5vw, 54px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 218, 126, 0.25), transparent 13rem),
    radial-gradient(circle at 4% 110%, rgba(43, 177, 154, 0.28), transparent 18rem),
    linear-gradient(137deg, #2f1d49 0%, #513572 50%, #7653a1 100%);
}

.ai-insights-hero::before,
.ai-insights-hero::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.ai-insights-hero::before {
  top: -130px;
  right: -90px;
  width: 360px;
  height: 360px;
}

.ai-insights-hero::after {
  top: -63px;
  right: -22px;
  width: 220px;
  height: 220px;
}

.ai-insights-hero > * {
  position: relative;
  z-index: 1;
}

.ai-insights-hero > div:first-child {
  max-width: 870px;
}

.ai-insights-hero .ai-heading-line {
  margin-bottom: 24px;
}

.ai-insights-hero .ai-mark {
  color: #40285e;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(18, 9, 28, 0.2);
}

.ai-insights-hero .status-chip.violet {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.ai-insights-hero .eyebrow {
  margin: 0 0 8px;
  color: #d8cae8;
}

.ai-insights-hero h2 {
  max-width: 830px;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.75rem);
  line-height: 1.01;
  letter-spacing: -0.045em;
}

.ai-insights-intro {
  max-width: 800px;
  margin: 17px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.9rem, 1.25vw, 1.05rem);
  line-height: 1.65;
}

.ai-insight-boundaries {
  display: grid;
  min-width: 205px;
  gap: 8px;
}

.ai-insight-boundaries span {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 850;
  backdrop-filter: blur(8px);
}

.ai-insight-boundaries i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: #a1e2cf;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(115, 214, 188, 0.1);
}

.ai-insight-trust-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  margin: 0 clamp(20px, 3vw, 34px);
  padding: 16px 18px;
  color: #59472a;
  background: #fff8df;
  border: 1px solid #ead79c;
  border-radius: 16px;
}

.ai-insight-trust-note.is-demo {
  color: #3f3760;
  background: #f3edf9;
  border-color: #d9cbe9;
}

.trust-note-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: #98732d;
  border-radius: 11px;
  font-size: 0.76rem;
  font-weight: 950;
}

.ai-insight-trust-note.is-demo .trust-note-icon {
  background: var(--primary-strong);
}

.ai-insight-trust-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.8rem;
}

.ai-insight-trust-note p {
  margin: 0;
  color: inherit;
  font-size: 0.74rem;
  line-height: 1.5;
}

.ai-insight-section {
  min-width: 0;
  margin: 0 clamp(20px, 3vw, 34px);
  padding: clamp(20px, 3vw, 30px);
  background: #fcfbfd;
  border: 1px solid rgba(112, 93, 153, 0.15);
  border-radius: 21px;
}

.ai-insight-section h3 {
  margin: 3px 0 5px;
  color: var(--primary-deepest);
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  letter-spacing: -0.025em;
}

.ai-insight-section .profile-section-heading > div > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.ai-section-count,
.ai-latest-analysis {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 11px;
  color: #675775;
  background: #f2eef5;
  border: 1px solid #ded4e7;
  border-radius: 11px;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.ai-latest-analysis {
  display: grid;
  gap: 1px;
  text-align: right;
}

.ai-latest-analysis strong {
  color: var(--primary-deep);
}

.ai-source-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ai-source-note {
  --note-accent: var(--primary);
  position: relative;
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 260px;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(112, 93, 153, 0.17);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(53, 42, 68, 0.07);
}

.ai-source-note::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: "";
  background: var(--note-accent);
}

.ai-source-note.is-communication {
  --note-accent: var(--teal);
}

.ai-source-note.is-support,
.ai-source-note.is-context {
  --note-accent: var(--gold-strong, #b07b22);
}

.ai-source-note-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.ai-note-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--note-accent);
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 950;
}

.ai-source-note-topline small {
  color: var(--note-accent);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ai-source-note h4 {
  margin: 3px 0 0;
  color: var(--primary-deepest);
  font-size: 0.98rem;
  line-height: 1.25;
}

.ai-source-note > p {
  align-self: start;
  margin: 0;
  color: #4d4753;
  font-size: 0.82rem;
  line-height: 1.62;
}

.ai-source-note footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid #eee9f1;
}

.ai-source-note footer a,
.ai-source-note footer > span:not(.status-chip),
.ai-source-note footer > small {
  min-width: 0;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-source-note footer a {
  color: var(--primary-strong);
  font-weight: 800;
}

.ai-insight-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 190px;
  padding: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(244, 239, 248, 0.86), rgba(235, 246, 242, 0.8));
  border: 1px dashed rgba(112, 93, 153, 0.3);
  border-radius: 18px;
}

.ai-insight-empty.compact {
  min-height: 150px;
}

.ai-insight-empty > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid #ded3e7;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(53, 42, 68, 0.1);
  font-size: 0.72rem;
  font-weight: 950;
}

.ai-insight-empty h4 {
  margin: 0 0 6px;
  color: var(--primary-deep);
}

.ai-insight-empty p {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.ai-analysis-coverage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.ai-analysis-coverage > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 15px;
  background: #fff;
  border: 1px solid #e7e0eb;
  border-radius: 14px;
}

.ai-analysis-coverage dt,
.ai-analysis-coverage dd {
  margin: 0;
}

.ai-analysis-coverage dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.ai-analysis-coverage dd {
  color: var(--primary-deepest);
  font-size: 1.65rem;
  font-weight: 950;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ai-analysis-coverage small {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.ai-run-provenance {
  margin: 0 0 14px;
  overflow: hidden;
  background: #f8f5fa;
  border: 1px solid #e4dce9;
  border-radius: 14px;
}

.ai-run-provenance > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  gap: 12px;
  padding: 10px 14px;
  color: var(--primary-deep);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
  list-style: none;
}

.ai-run-provenance > summary::-webkit-details-marker {
  display: none;
}

.ai-run-provenance > summary::before {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  content: "i";
  color: #fff;
  background: var(--primary-strong);
  border-radius: 8px;
  font-family: Georgia, serif;
}

.ai-run-provenance > summary > span:first-child {
  margin-right: auto;
}

.ai-run-provenance > summary > span:last-child {
  color: var(--muted);
  font-size: 0.62rem;
}

.ai-run-provenance > dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #e7e0eb;
  border-top: 1px solid #e4dce9;
}

.ai-run-provenance > dl > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px;
  background: #fff;
}

.ai-run-provenance dt,
.ai-run-provenance dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.ai-run-provenance dt {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-run-provenance dd,
.ai-run-provenance a {
  color: var(--primary-deep);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.4;
}

.ai-signal-explorer {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e1dae7;
  border-radius: 19px;
  box-shadow: 0 14px 34px rgba(53, 42, 68, 0.06);
}

.ai-signal-picker-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 9px;
  background: #f6f2f8;
  border-bottom: 1px solid #e2dbe7;
}

.ai-signal-picker-shell > span {
  padding-left: 7px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ai-signal-picker {
  display: flex;
  min-width: 0;
  gap: 5px;
  padding-bottom: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.ai-signal-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 42px;
  gap: 7px;
  padding: 8px 11px;
  color: #625a68;
  background: #fff;
  border: 1px solid #ddd5e3;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
}

.ai-signal-picker button:hover,
.ai-signal-picker button:focus-visible {
  color: var(--primary-strong);
  border-color: #baa7cd;
}

.ai-signal-picker button[aria-selected="true"] {
  color: #fff;
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  box-shadow: 0 7px 16px rgba(78, 51, 106, 0.22);
}

.signal-modality-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--ai-video);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(115, 81, 163, 0.12);
}

.signal-modality-dot.is-audio {
  background: var(--ai-audio);
  box-shadow: 0 0 0 3px rgba(20, 117, 109, 0.12);
}

.signal-modality-dot.is-transcript {
  background: var(--ai-transcript);
  box-shadow: 0 0 0 3px rgba(182, 86, 76, 0.12);
}

.ai-signal-picker button[aria-selected="true"] .signal-modality-dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.ai-signal-panel {
  --signal-color: var(--ai-video);
  --signal-soft: var(--ai-video-soft);
  min-width: 0;
}

.ai-signal-panel.is-audio {
  --signal-color: var(--ai-audio);
  --signal-soft: var(--ai-audio-soft);
}

.ai-signal-panel.is-transcript {
  --signal-color: var(--ai-transcript);
  --signal-soft: var(--ai-transcript-soft);
}

.ai-signal-panel[hidden] {
  display: none;
}

.ai-signal-summary {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) auto minmax(330px, 0.9fr);
  gap: 22px;
  align-items: center;
  padding: clamp(19px, 3vw, 28px);
  border-bottom: 1px solid #eee9f1;
}

.ai-signal-title {
  min-width: 0;
}

.ai-signal-modality {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 5px 7px;
  color: var(--signal-color);
  background: var(--signal-soft);
  border-radius: 7px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-signal-title h4 {
  margin: 0 0 6px;
  color: var(--primary-deepest);
  font-size: 1.25rem;
}

.ai-signal-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.48;
}

.ai-signal-current {
  display: grid;
  min-width: 130px;
  gap: 2px;
  padding: 14px 18px;
  text-align: right;
  background: var(--signal-soft);
  border: 1px solid color-mix(in srgb, var(--signal-color) 20%, transparent);
  border-radius: 14px;
}

.ai-signal-current small,
.ai-signal-current span {
  color: #655e69;
  font-size: 0.62rem;
  font-weight: 800;
}

.ai-signal-current strong {
  color: var(--signal-color);
  font-size: 2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ai-signal-current .status-chip {
  width: fit-content;
  margin-top: 6px;
  justify-self: end;
  text-align: center;
}

.ai-signal-summary > dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ai-signal-summary > dl > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #eee9f1;
}

.ai-signal-summary > dl > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.ai-signal-summary dt,
.ai-signal-summary dd {
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.4;
}

.ai-signal-summary dt {
  color: var(--muted);
  font-weight: 750;
}

.ai-signal-summary dd {
  color: var(--primary-deep);
  font-weight: 850;
  text-align: right;
}

.ai-signal-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.3fr);
  min-width: 0;
  gap: 14px;
  padding: clamp(16px, 2.7vw, 26px);
  background: #fcfbfd;
}

.ai-signal-chart {
  min-width: 0;
  margin: 0;
  padding: 12px 14px 10px;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e8e2eb;
  border-radius: 15px;
}

.ai-signal-chart svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
  color: var(--signal-color);
  overflow: visible;
}

.ai-signal-chart .ai-chart-grid {
  stroke: #e9e4ec;
  stroke-width: 1;
}

.ai-signal-chart .ai-chart-baseline {
  stroke: #988ca1;
  stroke-width: 1.25;
  stroke-dasharray: 5 5;
}

.ai-signal-chart .ai-chart-series {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
  vector-effect: non-scaling-stroke;
}

.ai-signal-chart .ai-chart-point circle:last-of-type {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.ai-signal-chart .ai-chart-point-halo {
  fill: var(--signal-soft);
  stroke: none;
}

.ai-signal-chart .ai-chart-point:focus {
  outline: none;
}

.ai-signal-chart .ai-chart-point:focus .ai-chart-point-halo {
  fill: color-mix(in srgb, var(--signal-color) 24%, white);
  stroke: currentColor;
  stroke-width: 1.5;
}

.ai-signal-chart text {
  fill: #736b78;
  stroke: none;
  font-family: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ai-signal-chart .ai-chart-y-label {
  text-anchor: end;
  dominant-baseline: middle;
}

.ai-signal-chart .ai-chart-x-label {
  text-anchor: middle;
  font-size: 10px;
  font-weight: 750;
}

.ai-signal-chart .ai-chart-value-label {
  fill: var(--signal-color);
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  transform: translateY(-15px);
}

.ai-signal-chart .ai-chart-baseline-label {
  fill: #817486;
  font-size: 9px;
  text-anchor: end;
  transform: translateY(-5px);
}

.ai-signal-chart .ai-chart-axis-title {
  fill: #867e8a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ai-signal-chart .ai-chart-axis-title.end {
  text-anchor: end;
}

.ai-signal-chart figcaption {
  max-width: 760px;
  margin: 7px 3px 0;
  color: var(--muted);
  font-size: 0.63rem;
  line-height: 1.48;
}

.ai-signal-reading-guide {
  align-self: stretch;
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 13px;
  padding: 18px;
  color: #3f3a43;
  background: var(--signal-soft);
  border: 1px solid color-mix(in srgb, var(--signal-color) 18%, transparent);
  border-radius: 15px;
}

.reading-guide-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #fff;
  background: var(--signal-color);
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  font-weight: 900;
}

.ai-signal-reading-guide .eyebrow {
  color: var(--signal-color);
}

.ai-signal-reading-guide h5 {
  margin: 3px 0 5px;
  color: var(--primary-deepest);
  font-size: 0.92rem;
}

.ai-signal-reading-guide p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
}

.ai-signal-reading-guide dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.ai-signal-reading-guide dl > div {
  min-width: 0;
  padding: 9px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
}

.ai-signal-reading-guide dt,
.ai-signal-reading-guide dd {
  margin: 0;
}

.ai-signal-reading-guide dt {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 800;
}

.ai-signal-reading-guide dd {
  margin-top: 3px;
  color: var(--signal-color);
  font-size: 0.72rem;
  font-weight: 900;
}

.ai-confidence-note {
  padding-top: 11px;
  color: var(--muted);
  border-top: 1px solid color-mix(in srgb, var(--signal-color) 18%, transparent);
  font-size: 0.62rem !important;
}

.ai-signal-values {
  border-top: 1px solid #e9e3ed;
}

.ai-signal-values > summary,
.ai-feature-groups > details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  gap: 12px;
  padding: 12px clamp(17px, 2.7vw, 26px);
  color: var(--primary-deep);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
  list-style: none;
}

.ai-signal-values > summary::-webkit-details-marker,
.ai-feature-groups > details > summary::-webkit-details-marker {
  display: none;
}

.ai-signal-values > summary::after,
.ai-feature-groups > details > summary::after {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-left: auto;
  content: "+";
  color: var(--primary-strong);
  background: #eee8f3;
  border-radius: 8px;
}

.ai-signal-values[open] > summary::after,
.ai-feature-groups > details[open] > summary::after {
  content: "−";
}

.ai-signal-values > summary > span:last-child,
.ai-feature-groups > details > summary > span:last-child {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
}

.ai-signal-values .table-wrap {
  margin: 0 clamp(17px, 2.7vw, 26px) clamp(17px, 2.7vw, 26px);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #e6dfe9;
  border-radius: 13px;
  scrollbar-width: thin;
}

.ai-signal-values .table-wrap:focus-visible {
  outline: 3px solid rgba(112, 93, 153, 0.28);
  outline-offset: 3px;
}

.ai-signal-values table {
  min-width: 1040px;
  margin: 0;
}

.ai-signal-values th,
.ai-signal-values td {
  padding: 11px;
  font-size: 0.67rem;
  vertical-align: top;
}

.ai-signal-values tbody th {
  display: grid;
  gap: 2px;
  color: var(--primary-deep);
}

.ai-signal-values tbody th small {
  max-width: 240px;
  color: var(--muted);
  font-weight: 650;
}

.ai-signal-values tbody td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.ai-feature-library {
  margin-bottom: 0;
}

.ai-feature-groups {
  display: grid;
  gap: 8px;
}

.ai-feature-groups > details {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5dee9;
  border-radius: 14px;
}

.ai-feature-groups > details[open] > summary {
  background: #f5f1f8;
  border-bottom: 1px solid #e5dee9;
}

.ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.ai-feature-grid article {
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 155px;
  gap: 13px;
  padding: 14px;
  background: #fcfbfd;
  border: 1px solid #ede8ef;
  border-radius: 12px;
}

.ai-feature-grid article > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-feature-grid h4 {
  margin: 0;
  color: var(--primary-deep);
  font-size: 0.78rem;
}

.ai-feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.ai-feature-grid footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #ece7ee;
}

.ai-feature-grid footer > span:first-child {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 800;
}

.ai-insight-method-note {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2px;
  background: #e5dde9;
  border-top: 1px solid #e1d9e6;
}

.ai-insight-method-note > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  padding: clamp(19px, 3vw, 28px);
  background: #f5f1f7;
}

.ai-insight-method-note span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--primary-strong);
  background: #fff;
  border: 1px solid #ddd3e5;
  border-radius: 10px;
  font-size: 0.58rem;
  font-weight: 950;
}

.ai-insight-method-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.ai-insight-method-note strong {
  color: var(--primary-deep);
}

@media (max-width: 1100px) {
  .ai-insights-hero {
    align-items: start;
    flex-direction: column;
  }

  .ai-insight-boundaries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .ai-signal-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ai-signal-summary > dl {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-signal-summary > dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    padding: 10px;
    background: #faf8fb;
    border: 1px solid #ede8ef;
    border-radius: 10px;
  }

  .ai-signal-summary dd {
    text-align: left;
  }

  .ai-signal-chart-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-signal-reading-guide {
    grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.35fr);
    align-items: start;
  }

  .ai-signal-reading-guide .ai-confidence-note {
    grid-column: 2 / -1;
  }
}

@media (max-width: 780px) {
  .ai-source-note-grid,
  .ai-feature-grid,
  .ai-insight-method-note {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-source-note {
    min-height: 0;
  }

  .ai-analysis-coverage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-run-provenance > dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-signal-picker-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .ai-signal-picker-shell > span {
    padding: 4px 7px 0;
  }

  .ai-signal-reading-guide {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ai-signal-reading-guide dl,
  .ai-signal-reading-guide .ai-confidence-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .ai-insights-hero {
    gap: 22px;
    padding: 25px 19px;
  }

  .ai-insights-hero .ai-heading-line {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 19px;
  }

  .ai-insight-boundaries {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-insight-trust-note,
  .ai-insight-section {
    margin-inline: 12px;
  }

  .ai-insight-section {
    padding: 16px;
    border-radius: 17px;
  }

  .ai-insight-section .profile-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .ai-latest-analysis {
    text-align: left;
  }

  .ai-insight-empty {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-analysis-coverage > div {
    padding: 12px;
  }

  .ai-analysis-coverage dd {
    font-size: 1.35rem;
  }

  .ai-run-provenance > dl {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .ai-signal-current {
    text-align: left;
  }

  .ai-signal-current .status-chip {
    justify-self: start;
  }

  .ai-signal-summary > dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-signal-chart-layout {
    padding: 11px;
  }

  .ai-signal-chart {
    padding-inline: 9px;
  }

  .ai-feature-grid {
    padding: 7px;
  }

  .ai-feature-grid article {
    min-height: 0;
  }
}

.quiet-mode .ai-insights-hero,
.quiet-mode .ai-insight-trust-note,
.quiet-mode .ai-insight-section,
.quiet-mode .ai-signal-explorer,
.quiet-mode .ai-source-note,
.quiet-mode .ai-signal-current,
.quiet-mode .ai-signal-reading-guide {
  background-image: none;
  box-shadow: none;
}

.quiet-mode .ai-insights-hero::before,
.quiet-mode .ai-insights-hero::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .ai-signal-picker button,
  .ai-chart-point,
  .ai-signal-panel {
    animation: none !important;
    transition: none !important;
  }
}

/* Website contact inbox and verified notification destinations */

.mailbox-console,
.mailbox-thread-page,
.mailbox-settings-page,
.mailbox-verification-page {
  --mailbox-plum: #60467a;
  --mailbox-plum-soft: #f2edf6;
  --mailbox-teal: #377d72;
  --mailbox-teal-soft: #e6f3ef;
  --mailbox-gold-soft: #fff7df;
  --mailbox-coral-soft: #fff0eb;
  --mailbox-border: #d8dfdb;
}

.mailbox-console {
  min-height: calc(100vh - 70px);
  padding-bottom: 80px;
  background:
    radial-gradient(circle at 92% 15%, rgba(220, 239, 233, 0.66), transparent 24rem),
    linear-gradient(180deg, #fbfcfa 0, #f7f5fa 100%);
}

.mailbox-console-hero {
  position: relative;
  overflow: hidden;
}

.mailbox-console-hero::after,
.mailbox-thread-hero::after {
  position: absolute;
  right: clamp(20px, 4vw, 70px);
  bottom: -58px;
  width: 190px;
  height: 190px;
  background:
    linear-gradient(135deg, transparent 46%, rgba(96, 70, 122, 0.12) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 46%, rgba(55, 125, 114, 0.12) 47% 53%, transparent 54%);
  border: 1px solid rgba(96, 70, 122, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: rotate(12deg);
}

.mailbox-console-hero > *,
.mailbox-thread-hero > * {
  position: relative;
  z-index: 1;
}

.mailbox-console-hero h1 {
  max-width: 920px;
  font-size: clamp(2.45rem, 5vw, 4.7rem);
}

.mailbox-scope-note {
  width: min(1180px, calc(100% - (2 * var(--page-pad))));
  margin: 20px auto 0;
  padding: 17px 19px;
  border: 1px solid #c9ded7;
  border-left: 5px solid var(--mailbox-teal);
  box-shadow: 0 10px 25px rgba(33, 73, 65, 0.05);
}

.mailbox-scope-note code {
  padding: 1px 5px;
  color: #3e5751;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(55, 125, 114, 0.16);
  border-radius: 5px;
  font: inherit;
  font-size: 0.92em;
}

.mailbox-filter-form {
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(145px, 1fr));
}

.mailbox-filter-form .contact-consent-field {
  display: flex;
  flex-direction: row;
  align-self: center;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  background: #f8faf8;
  border: 1px solid #cbd7cf;
  border-radius: 11px;
}

.mailbox-filter-form .contact-consent-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.mailbox-results {
  padding: var(--section-pad) var(--page-pad) 0;
}

.mailbox-thread-list {
  gap: 11px;
  padding-bottom: 0;
}

.mailbox-thread-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 9px 13px 9px 9px;
  border-left-color: #b9c6c0;
  box-shadow: 0 9px 24px rgba(37, 55, 50, 0.055);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.mailbox-thread-row:hover,
.mailbox-thread-row:focus-within {
  border-color: #b8aac7;
  border-left-color: var(--mailbox-plum);
  box-shadow: 0 14px 32px rgba(65, 44, 79, 0.1);
  transform: translateY(-1px);
}

.mailbox-thread-row.is-unread {
  background: linear-gradient(105deg, #fff 0, var(--mailbox-plum-soft) 140%);
  border-left-color: var(--mailbox-plum);
}

.mailbox-thread-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  color: var(--ink);
  border-radius: 12px;
  text-decoration: none;
}

.mailbox-thread-main:focus-visible {
  outline: 3px solid rgba(96, 70, 122, 0.3);
  outline-offset: 2px;
}

.mailbox-thread-main > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.mailbox-thread-main > span:nth-child(2) strong,
.mailbox-thread-main > span:nth-child(2) small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-thread-main > span:nth-child(2) strong {
  font-size: 0.96rem;
}

.mailbox-thread-main > span:nth-child(2) small,
.mailbox-thread-main > span:last-child small,
.mailbox-thread-meta small {
  color: var(--muted);
  font-size: 0.71rem;
}

.mailbox-thread-state {
  width: 11px;
  height: 11px;
  background: #bec8c3;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #b8c2bd;
}

.is-unread .mailbox-thread-state {
  background: var(--mailbox-plum);
  box-shadow: 0 0 0 1px #826b98, 0 0 0 5px rgba(96, 70, 122, 0.1);
}

.mailbox-thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  max-width: 250px;
}

.mailbox-thread-meta .status-chip {
  min-height: 25px;
  padding: 4px 8px;
  font-size: 0.61rem;
}

.mailbox-thread-page {
  width: min(1220px, calc(100% - (2 * var(--page-pad))));
}

.mailbox-thread-hero {
  position: relative;
  overflow: hidden;
}

.mailbox-thread-hero h1 {
  overflow-wrap: anywhere;
}

.mailbox-thread-summary {
  padding-inline: 0;
}

.mailbox-thread-summary a {
  pointer-events: auto;
}

.mailbox-thread-summary strong {
  overflow: hidden;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-thread-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(285px, 0.8fr);
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.mailbox-thread-layout > .client-filter-panel,
.mailbox-thread-controls > .client-filter-panel,
.mailbox-compose-grid > .client-filter-panel,
.mailbox-delivery-history,
.mailbox-settings-page > .client-filter-panel,
.mailbox-address-card,
.mailbox-verification-page > .client-filter-panel {
  margin: 0;
}

.mailbox-conversation {
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
}

.mailbox-thread-controls {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.mailbox-thread-controls .client-filter-panel {
  padding: 18px;
}

.mailbox-thread-controls .auth-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e1e5e2;
}

.mailbox-thread-controls .auth-form + .auth-form {
  margin-top: 11px;
}

.mailbox-message-list {
  display: grid;
  gap: 13px;
}

.mailbox-message {
  position: relative;
  max-width: 90%;
  padding: 15px 17px;
  background: #f7f8f6;
  border: 1px solid var(--mailbox-border);
  border-left: 5px solid #8e9d96;
  border-radius: 8px 17px 17px 17px;
  box-shadow: 0 7px 19px rgba(35, 54, 49, 0.045);
}

.mailbox-message-incoming {
  border-left-color: var(--mailbox-plum);
}

.mailbox-message-outgoing {
  justify-self: end;
  background: var(--mailbox-teal-soft);
  border-color: #c5ddd6;
  border-right: 5px solid var(--mailbox-teal);
  border-left-width: 1px;
  border-radius: 17px 8px 17px 17px;
}

.mailbox-message-internal {
  max-width: 100%;
  background: var(--mailbox-gold-soft);
  border-color: #ead9a8;
  border-left-color: #b28a29;
  border-radius: 13px;
}

.mailbox-message > header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mailbox-message > header strong {
  color: #354f49;
  font-size: 0.68rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.mailbox-message > header span,
.mailbox-message > small {
  color: var(--muted);
  font-size: 0.66rem;
}

.mailbox-message-body {
  overflow-wrap: anywhere;
  color: #273e39;
  font-size: 0.9rem;
  line-height: 1.62;
}

.mailbox-compose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.mailbox-compose-grid .client-filter-panel {
  padding: clamp(18px, 3vw, 24px);
}

.mailbox-compose-grid textarea {
  min-height: 145px;
}

.mailbox-delivery-history {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 25px);
}

.mailbox-delivery-history .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #d7ded9;
  border-radius: 14px;
  outline: none;
}

.mailbox-delivery-history .table-wrap:focus-visible {
  box-shadow: 0 0 0 3px rgba(96, 70, 122, 0.22);
}

.mailbox-delivery-history table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.76rem;
}

.mailbox-delivery-history th,
.mailbox-delivery-history td {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e6e3;
  text-align: left;
  vertical-align: top;
}

.mailbox-delivery-history th {
  color: #49605a;
  background: #f4f7f5;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mailbox-delivery-history td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

.mailbox-delivery-history tbody tr:last-child td {
  border-bottom: 0;
}

.mailbox-settings-page {
  width: min(1120px, calc(100% - (2 * var(--page-pad))));
}

.mailbox-settings-page > .mailbox-scope-note {
  width: 100%;
}

.mailbox-settings-page > .client-filter-panel {
  margin-top: 22px;
  padding: clamp(18px, 3vw, 25px);
}

.mailbox-address-form {
  grid-template-columns: minmax(160px, 0.7fr) minmax(220px, 1.3fr) minmax(220px, 1fr);
  align-items: end;
}

.mailbox-address-form .form-note,
.mailbox-address-form .button {
  grid-column: 1 / -1;
}

.mailbox-address-form .button {
  justify-self: start;
}

.mailbox-address-list {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.mailbox-address-card {
  padding: clamp(18px, 3vw, 25px);
  border-left: 5px solid var(--mailbox-teal);
}

.mailbox-address-card.is-inactive {
  border-left-color: #a8b1ad;
  opacity: 0.82;
}

.mailbox-address-card > header h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.mailbox-rule-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mailbox-rule-form legend {
  margin-bottom: 11px;
  color: #38534d;
  font-size: 0.78rem;
  font-weight: 900;
}

.mailbox-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.mailbox-rule-grid label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f8faf8;
  border: 1px solid #d7dfda;
  border-radius: 12px;
}

.mailbox-rule-grid label > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mailbox-rule-grid label small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mailbox-rule-grid select {
  min-width: 0;
}

.mailbox-rule-form .contact-safety-note {
  margin-top: 4px;
  padding: 13px 15px;
  color: #5b455f;
  background: var(--mailbox-gold-soft);
  border: 1px solid #ead9a8;
  border-radius: 13px;
}

.mailbox-rule-form .contact-safety-note strong {
  display: block;
  color: #4b354e;
  font-size: 0.78rem;
}

.mailbox-rule-form .contact-safety-note p {
  margin: 4px 0 0;
  color: #715d72;
  font-size: 0.7rem;
  line-height: 1.5;
}

.mailbox-resend-form {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  max-width: 720px;
}

.mailbox-inline-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e1e5e2;
}

.mailbox-verification-page > .client-filter-panel {
  margin-top: 22px;
  padding: clamp(20px, 4vw, 32px);
}

.quiet-mode .mailbox-console,
.quiet-mode .mailbox-console-hero,
.quiet-mode .mailbox-thread-hero,
.quiet-mode .mailbox-thread-row,
.quiet-mode .mailbox-message,
.quiet-mode .mailbox-address-card {
  background-image: none;
  box-shadow: none;
}

@media (max-width: 980px) {
  .mailbox-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mailbox-thread-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mailbox-thread-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mailbox-address-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mailbox-address-form label:last-of-type {
    grid-column: 1 / -1;
  }

  .mailbox-rule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .mailbox-console-hero,
  .mailbox-thread-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .mailbox-console-hero::after,
  .mailbox-thread-hero::after {
    opacity: 0.5;
  }

  .mailbox-thread-row {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
  }

  .mailbox-thread-main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mailbox-thread-main > span:last-child {
    grid-column: 2;
  }

  .mailbox-thread-meta {
    justify-content: flex-start;
    max-width: none;
    padding: 0 10px 8px 34px;
  }

  .mailbox-thread-controls,
  .mailbox-compose-grid,
  .mailbox-address-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .mailbox-address-form label:last-of-type {
    grid-column: auto;
  }

  .mailbox-message {
    max-width: 96%;
  }

  .mailbox-message-internal {
    max-width: 100%;
  }

  .mailbox-resend-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .mailbox-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .mailbox-filter-form .span-two {
    grid-column: auto;
  }

  .mailbox-rule-grid label {
    grid-template-columns: minmax(0, 1fr);
  }

  .mailbox-thread-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mailbox-thread-main {
    padding-inline: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mailbox-thread-row {
    transition: none;
  }
}

@media (forced-colors: active) {
  .mailbox-thread-row,
  .mailbox-message,
  .mailbox-address-card,
  .mailbox-delivery-history .table-wrap,
  .mailbox-scope-note {
    border: 1px solid CanvasText;
  }
}

/* Typed session features and the compact client-profile heading scale. */
.app-body .practitioner-dashboard h1,
.app-body .practitioner-dashboard .practitioner-hero-v2 h1,
.app-body .practitioner-directory h1,
.app-body .session-form-page h1 {
  font-size: clamp(1.625rem, 2.4vw, 2.125rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.app-body .practitioner-dashboard h2,
.app-body .practitioner-directory h2,
.app-body .session-form-page h2 {
  font-size: clamp(1.5rem, 2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.app-body .practitioner-dashboard h3,
.app-body .practitioner-directory h3,
.app-body .session-form-page h3 { font-size: clamp(1.125rem, 1.45vw, 1.25rem); line-height: 1.3; }
.client-profile-workspace {
  --profile-heading-1: clamp(1.625rem, 2.4vw, 2.125rem);
  --profile-heading-2: clamp(1.5rem, 2vw, 1.75rem);
  --profile-heading-3: clamp(1.125rem, 1.45vw, 1.25rem);
}
.client-profile-workspace .client-identity-heading h1 {
  font-size: var(--profile-heading-1);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.client-profile-workspace h2,
.client-profile-workspace .profile-section-heading h2,
.client-profile-workspace .ai-insights-hero h2 {
  font-size: var(--profile-heading-2);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.client-profile-workspace h3,
.client-profile-workspace .snapshot-heading h2 {
  font-size: var(--profile-heading-3);
  line-height: 1.3;
}
.client-profile-workspace h4 { font-size: 1rem; line-height: 1.4; }
.client-profile-workspace .client-identity-card,
.client-profile-workspace .profile-snapshot-card { min-height: 250px; }
.client-profile-workspace .ai-insights-hero { padding: clamp(20px, 2.5vw, 30px); gap: 24px; }
.client-profile-workspace .profile-section-heading { margin-bottom: 18px; gap: 16px; }
.client-profile-workspace .ai-insights-intro { margin-top: 12px; }
.client-profile-workspace .feature-explorer { color: var(--ink); min-width: 0; }
.feature-explorer-toolbar { display: grid; grid-template-columns: minmax(200px, 1.4fr) minmax(180px, 1fr) minmax(150px, .8fr); gap: 12px; }
.feature-explorer label { display: grid; min-width: 0; gap: 6px; color: #4c3d5a; font-size: .8125rem; font-weight: 700; }
.feature-explorer input,
.feature-explorer select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; color: #302039; background: #fff; border: 1px solid #cfc4db; border-radius: 9px; font: inherit; font-size: .875rem; }
.feature-explorer select { padding-right: 28px; text-overflow: ellipsis; }
.feature-explorer :is(input, select, button, summary, a, [tabindex]):focus-visible { outline: 3px solid #7055b5; outline-offset: 3px; }
.feature-explorer-selection { display: grid; gap: 6px; margin-top: 15px; }
.feature-explorer-status { margin: 7px 0 12px; color: #66586f; font-size: .8125rem; line-height: 1.55; }
.feature-explorer-header { margin-top: 15px; padding: 17px 19px; border: 1px solid #e2d8ed; border-radius: 13px; background: #f7f3fb; }
.feature-explorer-header h4 { margin: 6px 0; color: #37244a; }
.feature-explorer-header > p:last-child { margin: 0; font-size: .9375rem; line-height: 1.6; }
.feature-explorer-meta { margin: 0; color: #6b5086; font-size: .75rem; font-weight: 700; overflow-wrap: anywhere; }
.feature-explorer-controls { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(140px, .7fr) minmax(240px, 1.7fr) minmax(150px, .8fr) auto; gap: 10px; align-items: end; margin: 17px 0 10px; }
.feature-explorer-controls .button { min-height: 44px; padding: 9px 12px; font-size: .8125rem; }
.feature-explorer-word-search { max-width: 420px; margin: 10px 0 13px; }
.feature-explorer-quality { margin: 10px 0; padding: 10px 12px; color: #4c3863; background: #f1eafa; border-left: 3px solid #8b6bb8; border-radius: 4px; font-size: .8125rem; line-height: 1.5; }
.feature-explorer-chart { min-width: 0; overflow-x: auto; padding: 15px; background: #fff; border: 1px solid #e3daea; border-radius: 12px; }
.feature-explorer-chart svg { display: block; width: 100%; min-width: 620px; height: auto; color: #7750a4; stroke: none; }
.feature-explorer-chart text { stroke: none; }
.feature-explorer-scroll-hint { display: none; }
.feature-chart-grid { stroke: #e8e1ed; stroke-width: 1; }
.feature-chart-axis { stroke: #8b7b97; stroke-width: 1.5; }
.feature-chart-label { fill: #5b4b66; font-size: 12px; font-family: inherit; }
.feature-chart-line { fill: none; stroke: #7750a4; stroke-width: 2.5; stroke-linejoin: round; }
.feature-chart-point { fill: white; stroke: #7750a4; stroke-width: 2.5; }
.feature-chart-point:focus { stroke: #173f6d; stroke-width: 4; outline: none; }
.feature-chart-bar { fill: #7750a4; }
.feature-explorer-note { color: #6c5c76; font-size: .8125rem; line-height: 1.55; }
.feature-explorer-source { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0; padding-bottom: 9px; border-bottom: 1px solid #e6deec; }
.feature-explorer-source p { margin: 0; color: #6c5c76; font-size: .8125rem; line-height: 1.5; }
.feature-explorer-source a { font-size: .8125rem; font-weight: 700; }
.feature-explorer-details { min-width: 0; margin-top: 12px; border: 1px solid #ded3e8; border-radius: 10px; overflow: hidden; }
.feature-explorer-details summary { min-height: 44px; padding: 12px 14px; cursor: pointer; color: #4d365f; background: #faf7fc; font-size: .875rem; font-weight: 750; }
.feature-explorer-details > p,
.feature-explorer-details > dl { margin: 12px 15px; font-size: .875rem; line-height: 1.6; }
.feature-explorer-details dl > div { display: grid; grid-template-columns: minmax(110px, .2fr) minmax(0, 1fr); gap: 14px; padding: 8px 0; }
.feature-explorer-details dt { font-weight: 750; color: #604b72; }
.feature-explorer-details dd { margin: 0; overflow-wrap: anywhere; }
.feature-explorer-details pre { max-height: 430px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 14px; color: #3f304e; background: #fcfafd; font-size: .8125rem; line-height: 1.6; }
.feature-explorer-table { max-width: 100%; max-height: 520px; overflow: auto; border: 0; border-radius: 0; }
.feature-explorer-table table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.feature-explorer-table :is(th, td) { padding: 10px 12px; vertical-align: top; text-align: left; border-bottom: 1px solid #ece6f0; white-space: normal; min-width: 110px; max-width: 400px; overflow-wrap: anywhere; }
.feature-explorer-table thead { position: sticky; top: 0; z-index: 1; background: #f4eff8; }
.feature-explorer-table tbody th { font-weight: 650; }
.feature-explorer-empty { margin: 0; padding: 15px; color: #66566f; line-height: 1.65; }
.feature-explorer-text-result { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #3e2b4e; font-size: 1rem; line-height: 1.7; }
.feature-explorer-bars { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.feature-explorer-bars li { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(100px, 3fr) minmax(36px, .35fr); align-items: center; gap: 12px; }
.feature-bar-label { color: #503e5f; font-size: .875rem; overflow-wrap: anywhere; }
.feature-bar-track { width: 100%; height: 20px; accent-color: #7750a4; }
.feature-bar-track::-webkit-meter-bar { border: 0; background: #eee7f5; border-radius: 5px; }
.feature-bar-track::-webkit-meter-optimum-value { background: #7750a4; border-radius: 5px; }
.feature-bar-value { font-size: .875rem; color: #60427d; font-variant-numeric: tabular-nums; text-align: right; }
.feature-explorer-legacy { margin: 0 clamp(12px, 2.5vw, 30px) 24px; border: 1px solid #d8cbe4; border-radius: 13px; }
.feature-explorer-legacy > summary { padding: 14px 17px; color: #624879; font-size: .875rem; font-weight: 700; cursor: pointer; }
.feature-explorer-legacy > .ai-insight-section { margin-inline: 0; }
.feature-explorer [hidden] { display: none !important; }
@media (max-width: 1200px) {
  .feature-explorer-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-explorer-controls > label:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .feature-explorer-chart:has(svg) + .feature-explorer-scroll-hint { display: block; }
  .feature-explorer-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-explorer-toolbar > label:first-child { grid-column: 1 / -1; }
  .feature-explorer-chart { padding: 10px; }
  .feature-explorer-header { padding: 14px; }
}
@media (max-width: 460px) {
  .feature-explorer-toolbar,
  .feature-explorer-controls { grid-template-columns: minmax(0, 1fr); }
  .feature-explorer-bars li { grid-template-columns: minmax(72px, 1fr) minmax(70px, 1.5fr) minmax(32px, .4fr); gap: 7px; }
  .feature-explorer-details dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .client-profile-workspace .ai-insights-hero { padding: 20px 16px; }
}
@media (forced-colors: active) {
  .feature-explorer-chart,
  .feature-explorer-details,
  .feature-explorer-header,
  .feature-explorer-quality { border: 1px solid CanvasText; }
  .feature-chart-point { fill: Canvas; stroke: CanvasText; }
  .feature-chart-line,
  .feature-chart-axis { stroke: CanvasText; }
  .feature-chart-label { fill: CanvasText; }
}
