:root {
  --ink: #122033;
  --muted: #66758a;
  --paper: #fbf7ef;
  --white: #ffffff;
  --teal: #0f766e;
  --teal-dark: #124e52;
  --leaf: #7aa95c;
  --coral: #e78b6f;
  --gold: #e5b95f;
  --blue: #3d74a8;
  --line: rgba(18, 32, 51, 0.12);
  --shadow: 0 24px 72px rgba(18, 32, 51, 0.13);
  --radius: 8px;
  --header-shell-width: 1180px;
  --public-shell-width: 1240px;
  --portal-shell-width: 1120px;
  --space-section-y: 52px;
  --space-section-heading: 16px;
  --space-hero-top: 34px;
  --space-hero-bottom: 26px;
  --space-grid-gap: 12px;
  --space-card-pad: 20px;
  --space-card-gap: 12px;
  --space-stack-gap: 16px;
  --space-form-gap: 12px;
  --space-tight: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(229, 185, 95, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(61, 116, 168, 0.12), transparent 30%),
    linear-gradient(180deg, #fffdf8 0%, #f3faf5 45%, #f7fbff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 18px 0;
}

.nav {
  width: min(var(--header-shell-width), 100%);
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(18, 32, 51, 0.1);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 34px rgba(18, 32, 51, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  color: var(--teal-dark);
}

.brand span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #ffffff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.nav-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.nav-links a,
.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(15, 118, 110, 0.09);
  color: var(--teal-dark);
  outline: none;
}

.nav-cta,
.button.primary {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}

.button.secondary {
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-dark);
}

.hero,
.section,
.footer {
  width: min(var(--header-shell-width), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.54fr);
  gap: 32px;
  align-items: center;
  padding: 48px 0 36px;
}

.eyebrow,
.card-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  letter-spacing: 0;
}

.portal-site h1,
.portal-site h2,
.portal-site h3 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

h1 {
  max-width: 12ch;
  margin-top: 16px;
  font-size: clamp(3.7rem, 8vw, 7.3rem);
  line-height: 0.88;
}

.hero-copy h1 {
  max-width: 15ch;
  font-size: clamp(2.9rem, 5vw, 4.9rem);
  line-height: 0.96;
}

.lead,
.body-copy {
  color: var(--muted);
  line-height: 1.72;
}

.lead {
  max-width: 62ch;
  margin: 18px 0 0;
  font-size: 1.14rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-grid-gap);
  margin-top: 20px;
}

.compact-actions {
  margin-top: 22px;
}

.compact-actions .button {
  flex: 1 1 150px;
  min-width: 0;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-grid-gap);
  max-width: 690px;
  margin: 24px 0 0;
}

.trust-strip div,
.hero-card,
.service-grid article,
.process-list li,
.security-grid article,
.request-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.single-column {
  grid-template-columns: 1fr;
}

.portal-main {
  padding-top: 10px;
}

.portal-hero {
  min-height: auto;
  align-items: start;
}

.portal-card {
  align-self: start;
}

.portal-entry-section,
.access-intro-section {
  display: grid;
  gap: 18px;
  padding: 16px 0 12px;
}

.portal-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.portal-entry-grid > * {
  min-height: 100%;
}

.portal-heading h1 {
  max-width: 12ch;
  margin-top: 10px;
  font-size: clamp(1.64rem, 2.55vw, 2.18rem);
  line-height: 1.04;
}

.portal-heading .section-copy {
  max-width: 64ch;
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.56;
}

.compact h2 {
  max-width: 16ch;
  font-size: clamp(1.42rem, 2.1vw, 1.95rem);
  line-height: 1.08;
}

.portal-auth-shell {
  display: grid;
  gap: 14px;
}

.auth-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.auth-card h1,
.auth-card h2 {
  color: var(--teal-dark);
  font-size: clamp(1.18rem, 1.55vw, 1.48rem);
  line-height: 1.16;
  max-width: none;
  margin-top: 2px;
}

.auth-card .eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.auth-card .request-form {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.session-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  background: rgba(236, 253, 245, 0.94);
}

.session-banner strong,
.session-banner span {
  display: block;
}

.work-context-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin: 0;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.work-context-copy {
  display: grid;
  gap: 2px;
}

.work-context-copy strong {
  color: var(--teal-dark);
  font-size: 0.95rem;
  font-weight: 850;
}

.work-context-copy span {
  color: var(--muted);
  line-height: 1.45;
}

.work-context-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.portal-session-shell {
  display: grid;
  gap: 12px;
  padding: 12px 0 4px;
}

.ops-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0;
}

.ops-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(18, 32, 51, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal-dark);
  font-weight: 800;
}

.ops-nav a:hover,
.ops-nav a:focus-visible {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.ops-nav a.is-active {
  border-color: rgba(15, 118, 110, 0.34);
  background: rgba(15, 118, 110, 0.12);
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.08);
}

.submodule-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.submodule-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: 999px;
  background: rgba(247, 251, 255, 0.78);
  color: var(--teal-dark);
  font-size: 0.96rem;
  font-weight: 800;
}

.submodule-nav a:hover,
.submodule-nav a:focus-visible {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.08);
  outline: none;
}

.submodule-nav a.is-active {
  border-color: rgba(15, 118, 110, 0.36);
  background: rgba(15, 118, 110, 0.14);
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.08);
}

body.workspace-live .portal-session-shell {
  gap: 10px;
  padding-top: 4px;
}

body.workspace-live #patient-workspace-shell .section-heading,
body.workspace-live #practitioner-workspace-shell .section-heading,
body.workspace-live #manager-workspace .section-heading {
  display: none;
}

body.workspace-live .session-banner {
  padding: 10px 14px;
  gap: 10px;
}

body.workspace-live .session-banner strong {
  font-size: 1rem;
}

body.workspace-live .session-banner span {
  color: var(--muted);
}

body.workspace-live .work-context-bar {
  padding: 12px 14px;
  gap: 10px;
}

body.workspace-live .portal-session-shell .section-heading {
  gap: 4px;
}

body.workspace-live .portal-session-shell .section-heading h2 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.02;
  max-width: 12ch;
}

body.workspace-live .portal-session-shell .section-copy,
body.workspace-live .portal-workflow-card .portal-card-copy {
  display: none;
}

body.workspace-live .portal-workflow-card,
body.workspace-live .manager-workflow-card {
  gap: 8px;
}

body.workspace-live .manager-dashboard-layout,
body.workspace-live .portal-module-stack,
body.workspace-live .manager-module-stack {
  gap: 10px;
}

body.workspace-live .ops-nav {
  position: sticky;
  top: 88px;
  z-index: 20;
  padding: 6px 0 10px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 0.86));
  backdrop-filter: blur(10px);
}

body.workspace-live #patient-workspace-shell .portal-session-shell,
body.workspace-live #practitioner-workspace-shell .portal-session-shell {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  grid-template-areas:
    "banner context"
    "workflow workflow";
  gap: 10px 14px;
  align-items: start;
}

body.workspace-live #patient-workspace-shell .portal-session-shell > .session-banner,
body.workspace-live #practitioner-workspace-shell .portal-session-shell > .session-banner {
  grid-area: banner;
}

body.workspace-live #patient-workspace-shell .portal-session-shell > .work-context-bar,
body.workspace-live #practitioner-workspace-shell .portal-session-shell > .work-context-bar {
  grid-area: context;
  margin: 0;
}

body.workspace-live #patient-workspace-shell .portal-session-shell > .portal-workflow-card,
body.workspace-live #practitioner-workspace-shell .portal-session-shell > .portal-workflow-card {
  grid-area: workflow;
  margin: 0;
}

body.workspace-live #patient-workspace-shell .portal-session-shell .portal-workflow-card,
body.workspace-live #practitioner-workspace-shell .portal-session-shell .portal-workflow-card,
body.workspace-live #manager-workspace .manager-workflow-card {
  padding: 16px 18px;
}

body.workspace-live #patient-workspace-shell .portal-session-shell .portal-workflow-card .eyebrow,
body.workspace-live #practitioner-workspace-shell .portal-session-shell .portal-workflow-card .eyebrow,
body.workspace-live #manager-workspace .manager-workflow-card .eyebrow {
  margin-bottom: 0;
}

body.workspace-live #patient-workspace-shell .portal-session-shell .portal-workflow-card h2,
body.workspace-live #practitioner-workspace-shell .portal-session-shell .portal-workflow-card h2,
body.workspace-live #manager-workspace .manager-workflow-card h2 {
  font-size: 1.15rem;
  line-height: 1.15;
}

body.workspace-live #patient-workspace-shell .portal-session-shell .portal-workflow-map,
body.workspace-live #practitioner-workspace-shell .portal-session-shell .portal-workflow-map,
body.workspace-live #manager-workspace .manager-workflow-map {
  margin-top: 8px;
}

body.workspace-live #patient-workspace-shell .portal-session-shell .workflow-node,
body.workspace-live #practitioner-workspace-shell .portal-session-shell .workflow-node,
body.workspace-live #manager-workspace .workflow-node {
  min-height: 40px;
  padding: 0 12px;
}

body.workspace-live #manager-workspace .section-heading h2 {
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
  line-height: 1.04;
  max-width: none;
}

body.workspace-live #manager-workspace .section-heading .eyebrow {
  margin-bottom: 0;
}

body.workspace-live #manager-dashboard .manager-kpi-grid {
  gap: 10px;
}

body.workspace-live #manager-rules-card,
body.workspace-live #manager-data-health,
body.workspace-live #manager-architecture-flow,
body.workspace-live #manager-submodule-requests .manager-overview-grid,
body.workspace-live #patient-journey-grid,
body.workspace-live .practitioner-focus,
body.workspace-live .guide-card {
  display: none;
}

body.workspace-live .portal-module-body .portal-card-copy,
body.workspace-live .manager-submodule-body .portal-card-copy {
  display: none;
}

body.workspace-live .portal-module-body,
body.workspace-live .manager-submodule-body {
  gap: 10px;
}

.portal-site .lead {
  max-width: 58ch;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(157, 243, 208, 0.36);
  color: #1f3e3c;
  font-size: 0.92rem;
  font-weight: 700;
}

.text-accent {
  color: #145fa2;
}

.legacy-token-field {
  display: none !important;
}

.portal-grid-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.access-hub-shell,
.portal-entry-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.access-role-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.access-connection-card,
.role-teaser-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 44px rgba(18, 32, 51, 0.08);
}

.entry-key-points,
.entry-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entry-key-points span,
.entry-panel-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.entry-key-points {
  margin-top: 12px;
}

.entry-panel-meta {
  margin-top: 2px;
}

.inline-text-cta {
  color: var(--teal-dark);
  font-weight: 800;
}

.inline-text-cta:hover,
.inline-text-cta:focus-visible {
  color: var(--blue);
  outline: none;
}

.inline-disclosure {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(18, 32, 51, 0.08);
  padding-top: 10px;
}

.inline-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 800;
  list-style: none;
}

.inline-disclosure summary::-webkit-details-marker {
  display: none;
}

.inline-disclosure summary::after {
  content: "Ouvrir";
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.inline-disclosure[open] summary::after {
  content: "Réduire";
}

.inline-disclosure-content {
  display: grid;
  gap: 10px;
}

.segmented-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(18, 32, 51, 0.06);
}

.segmented-preview span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 800;
}

.segmented-preview .is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.08);
}

.access-role-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.86fr) minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(18, 32, 51, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.access-role-grid .access-role-card {
  padding: 16px;
}

.access-role-card-strong {
  background: #ffffff;
  border-radius: 14px;
}

.access-role-card strong {
  color: var(--teal-dark);
  font-size: 1rem;
  line-height: 1.08;
}

.access-role-title-group {
  display: grid;
  gap: 4px;
}

.access-role-title-group small {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.access-role-card span {
  color: var(--muted);
  line-height: 1.46;
}

.role-card-copy {
  font-size: 0.94rem;
}

.role-card-cta {
  margin-top: 0;
  font-size: 0.92rem;
  text-align: right;
}

.access-role-card:hover,
.access-role-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 20px 48px rgba(18, 32, 51, 0.12);
  outline: none;
}

.access-teaser-section {
  display: grid;
  gap: 18px;
}

.entry-auth-grid {
  margin-top: 6px;
}

.auth-card-centered,
.role-guide-card,
.role-teaser-card {
  align-content: start;
}

.access-teaser-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.access-teaser-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.mini-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mini-role-grid div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.04);
}

.mini-role-grid strong {
  color: var(--teal-dark);
}

.mini-role-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.public-card {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.public-card h2 {
  color: var(--teal-dark);
}

.history-list {
  display: grid;
  gap: var(--space-tight);
  margin-top: 12px;
}

.history-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.history-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.history-item strong {
  color: var(--teal-dark);
  font-size: 0.98rem;
}

.history-item span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.48;
}

.history-item-note {
  color: var(--ink) !important;
  font-weight: 700;
}

.history-group {
  display: grid;
  gap: 10px;
}

.history-group + .history-group {
  margin-top: 18px;
}

.history-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.history-group-head strong {
  color: var(--teal-dark);
}

.history-group-head span {
  color: var(--muted);
  line-height: 1.45;
}

.history-group .history-list {
  margin-top: 0;
}

.trust-strip div {
  padding: 16px;
}

.trust-strip dt {
  color: var(--teal-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.trust-strip dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.public-site .hero,
.public-site .section,
.public-site .footer {
  width: min(var(--public-shell-width), calc(100% - 40px));
}

.public-site .hero-stage,
.public-site .quick-info,
.public-site .service-grid,
.public-site .prep-grid,
.public-site .security-grid,
.public-site .faq-grid,
.public-site .news-grid,
.public-site .org-layout,
.public-site .split-section,
.public-site .appointment-section,
.public-site .company-section-card,
.public-site .section-heading {
  max-width: var(--header-shell-width);
  margin-left: auto;
  margin-right: auto;
}

.portal-site .portal-main {
  width: min(var(--portal-shell-width), calc(100% - 40px));
  margin: 0 auto;
}

.portal-site .hero,
.portal-site .section {
  width: 100%;
  margin: 0;
}

.public-site {
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(61, 116, 168, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #fffdf8 0%, #f3faf5 46%, #f7fbff 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

.public-site .public-hero {
  min-height: auto;
  grid-template-columns: 1fr;
  gap: var(--space-stack-gap);
  padding: var(--space-hero-top) 0 var(--space-hero-bottom);
}

.hero-clinical {
  padding-top: 52px;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
  gap: 20px;
  align-items: center;
}

.hero-side-stack {
  display: grid;
  gap: 18px;
}

.metric-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(18, 32, 51, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(18, 32, 51, 0.08);
}

.metric-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(20, 95, 162, 0.1);
  color: #145fa2;
  font-size: 1.25rem;
  font-weight: 900;
}

.metric-card strong {
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.05;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.public-site .hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.94;
}

.public-site .section-heading h2,
.public-site .contact-copy h2,
.public-site .split-section h2 {
  max-width: 15ch;
  font-size: clamp(1.72rem, 3vw, 2.72rem);
  line-height: 1.02;
}

.public-site .lead {
  max-width: 58ch;
  margin-top: 18px;
  font-size: 1rem;
}

.hero-actions-anchored {
  margin-top: 28px;
}

.hero-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}

.hero-auth-links a {
  color: var(--muted);
  font-weight: 800;
}

.hero-auth-links a:hover,
.hero-auth-links a:focus-visible {
  color: var(--teal-dark);
  outline: none;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-tight);
  margin-top: 16px;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(18, 32, 51, 0.08);
  color: var(--teal-dark);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(18, 32, 51, 0.06);
}

.hero-visual {
  position: relative;
  margin: 0;
  min-height: 500px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #dfe9ef;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 32, 51, 0.02) 20%, rgba(18, 32, 51, 0.6) 100%);
}

.hero-visual figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  display: grid;
  gap: var(--space-tight);
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
  color: #ffffff;
}

.hero-visual figcaption strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.05;
}

.hero-visual figcaption span {
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.58;
}

.hero-visual .eyebrow {
  color: #ffe29c;
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-card {
  min-height: 100%;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.quick-card-wide {
  grid-column: span 2;
}

.quick-card h2,
.quick-card h3 {
  margin-top: 10px;
  color: var(--teal-dark);
}

.quick-card h2 {
  font-size: clamp(1.48rem, 1.8vw, 1.95rem);
}

.quick-card h3 {
  font-size: 1.12rem;
  line-height: 1.14;
}

.quick-card p {
  color: var(--muted);
  line-height: 1.62;
}

.portal-overview-grid,
.manager-overview-grid,
.access-scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.manager-dashboard {
  display: grid;
  gap: 14px;
}

.manager-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.manager-kpi-card {
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(18, 32, 51, 0.07);
}

.kpi-value {
  color: var(--teal-dark);
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  font-weight: 900;
  line-height: 0.96;
}

.kpi-note {
  color: var(--muted);
  line-height: 1.45;
}

.manager-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: start;
}

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

.architecture-flow {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.architecture-step {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.architecture-step strong {
  color: var(--teal-dark);
}

.architecture-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.architecture-step .status-pill {
  justify-self: end;
}

.rules-list,
.health-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.rule-card,
.health-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.rule-card strong,
.health-card strong {
  color: var(--teal-dark);
}

.rule-card span,
.health-card span {
  color: var(--muted);
  line-height: 1.5;
}

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

.manager-workflow-card,
.portal-workflow-card {
  gap: 12px;
}

.manager-workflow-map,
.portal-workflow-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.workflow-node {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  font-weight: 800;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

.workflow-node:hover,
.workflow-node:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
  box-shadow: 0 12px 28px rgba(18, 32, 51, 0.08);
  outline: none;
}

.workflow-node.is-active {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.manager-module-stack,
.portal-module-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.manager-module,
.manager-submodule,
.portal-module,
.portal-submodule {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 38px rgba(18, 32, 51, 0.07);
}

.manager-module > summary,
.manager-submodule > summary,
.portal-module > summary,
.portal-submodule > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.manager-module > summary::-webkit-details-marker,
.manager-submodule > summary::-webkit-details-marker,
.portal-module > summary::-webkit-details-marker,
.portal-submodule > summary::-webkit-details-marker {
  display: none;
}

.manager-module > summary strong,
.manager-submodule > summary span:first-child,
.portal-module > summary strong,
.portal-submodule > summary span:first-child {
  color: var(--teal-dark);
}

.manager-module > summary strong,
.portal-module > summary strong {
  display: block;
  font-size: 1.12rem;
}

.manager-module > summary p,
.portal-module > summary p {
  margin: 0 0 4px;
}

.manager-module-body,
.manager-submodule-body,
.portal-module-body,
.portal-submodule-body {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.manager-submodule,
.portal-submodule {
  background: rgba(247, 251, 255, 0.72);
}

.manager-submodule-hint {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.nested-grid {
  padding: 0;
}

.overview-card,
.scenario-card {
  display: grid;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(18, 32, 51, 0.07);
}

.overview-card h3,
.scenario-card strong {
  color: var(--teal-dark);
}

.overview-card h3 {
  margin-top: 2px;
  font-size: 1.08rem;
  line-height: 1.16;
}

.overview-card p,
.scenario-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.overview-card .card-cta,
.scenario-card .card-cta {
  margin-top: auto;
}

.access-support-section,
.service-grid,
.process-list {
  gap: 16px;
}

.access-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.company-list-inline {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: var(--space-tight);
}

.company-list-inline p {
  padding: 9px 11px;
  grid-template-columns: 112px 1fr;
  gap: 4px;
  background: rgba(15, 118, 110, 0.06);
  border: 1px solid rgba(15, 118, 110, 0.1);
}

.company-list-inline span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.company-list-inline strong {
  color: var(--ink);
}

.company-section-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px 16px;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
  align-items: center;
}

.company-section-card h3 {
  color: var(--teal-dark);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
}

.company-section-card .body-copy {
  margin: 8px 0 0;
}

.company-section-card .hero-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.section-copy {
  max-width: 62ch;
}

.public-site .section {
  padding: var(--space-section-y) 0;
}

.public-site .section-heading {
  margin-bottom: var(--space-section-heading);
}

.public-site .hero-actions {
  margin-top: 20px;
}

.public-site #public-next-step-grid .overview-card,
.public-site #public-journey-grid .overview-card {
  min-height: 100%;
  background: rgba(255, 255, 255, 0.82);
}

.public-site .trust-strip {
  margin-top: 24px;
}

.hero-card {
  padding: 26px;
  background:
    linear-gradient(150deg, rgba(18, 78, 82, 0.98), rgba(15, 118, 110, 0.9)),
    var(--teal-dark);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero-card .card-label {
  color: #ffe29c;
}

.hero-card h2 {
  margin-top: 10px;
  font-size: clamp(2rem, 3vw, 3.3rem);
  line-height: 0.98;
}

.company-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.company-list p {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.company-list span,
.fine-print {
  color: rgba(255, 255, 255, 0.72);
}

.company-list strong {
  overflow-wrap: anywhere;
}

.company-section-card .company-list span {
  color: var(--muted);
}

.company-section-card .company-list strong {
  color: var(--ink);
}

.fine-print {
  margin: 18px 0 0;
  line-height: 1.55;
}

.map-link,
.codes-panel a,
.org-grid a,
.map-card a,
.news-grid a,
.footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.map-link {
  display: inline-flex;
  margin-top: 16px;
  color: #ffe29c;
  font-weight: 850;
}

.section {
  padding: 52px 0;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.section-heading h2,
.split-section h2,
.contact-copy h2 {
  max-width: 13ch;
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  line-height: 1;
}

.service-grid,
.prep-grid,
.security-grid,
.org-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-grid-gap);
}

.service-grid article,
.prep-grid article,
.security-grid article,
.org-grid article,
.codes-panel,
.map-card,
.news-grid a {
  min-height: 206px;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.public-site .service-grid article,
.public-site .prep-grid article {
  min-height: 184px;
}

.public-site .org-grid article {
  min-height: 164px;
}

.public-site .news-grid a {
  min-height: 132px;
}

.service-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.11);
  color: var(--teal);
  font-size: 1.3rem;
  font-weight: 900;
}

.service-grid h3 {
  margin-top: 18px;
  color: var(--teal-dark);
  font-size: 1.16rem;
  line-height: 1.16;
}

.service-grid p,
.prep-grid p,
.security-grid span,
.org-grid p,
.codes-panel p {
  color: var(--muted);
  line-height: 1.62;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--teal-dark);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prep-grid article {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.prep-grid h3 {
  color: var(--teal-dark);
  font-size: 1.08rem;
  line-height: 1.16;
}

.prep-grid a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 850;
}

.split-section,
.contact-section,
.appointment-section,
.admin-section,
.org-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

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

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

.org-grid article {
  min-height: 210px;
}

.org-grid h3,
.codes-panel h3 {
  color: var(--teal-dark);
}

.codes-panel {
  min-height: auto;
  overflow-x: auto;
}

.codes-panel table {
  width: 100%;
  min-width: 740px;
  margin: 18px 0;
  border-collapse: collapse;
}

.codes-panel th,
.codes-panel td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.codes-panel th {
  color: var(--teal-dark);
}

.map-card {
  min-height: auto;
  margin-top: 16px;
}

.map-card p {
  color: var(--muted);
}

.news-grid a {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
  text-decoration: none;
}

.news-grid a span {
  color: var(--teal-dark);
  font-weight: 900;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-grid-gap);
}

.faq-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.07);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  color: var(--teal-dark);
  font-weight: 900;
  line-height: 1.45;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.62;
}

.form-stack {
  display: grid;
  gap: var(--space-stack-gap);
}

.form-panel-title {
  display: grid;
  gap: 8px;
}

.form-panel-title h3 {
  color: var(--teal-dark);
  font-size: 1.14rem;
  line-height: 1.14;
}

.form-panel-title p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.process-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 18px;
}

.process-list strong,
.security-grid strong {
  color: var(--teal-dark);
  font-weight: 900;
}

.process-list span {
  color: var(--muted);
}

.security-band {
  padding: 28px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(18, 78, 82, 0.97), rgba(61, 116, 168, 0.9)),
    var(--teal-dark);
  color: #ffffff;
}

.security-band .section-heading h2,
.security-band .eyebrow,
.security-grid strong {
  color: #ffffff;
}

.security-band .eyebrow {
  color: #ffe29c;
}

.security-grid article {
  min-height: 160px;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: none;
}

.security-grid span {
  display: block;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
}

.contact-cards {
  display: grid;
  gap: var(--space-tight);
  margin-top: 16px;
}

.contact-cards a {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-dark);
  font-weight: 850;
}

.contact-cards strong {
  color: var(--teal-dark);
}

.contact-cards span {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

.request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-form-gap);
  padding: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.request-form label {
  display: grid;
  gap: 8px;
}

.request-form label > span {
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 850;
}

.request-form input,
.request-form textarea,
.request-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(18, 32, 51, 0.16);
  border-radius: var(--radius);
  padding: 0 13px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.request-form textarea {
  min-height: 120px;
  padding-top: 12px;
  resize: vertical;
}

.request-form input:focus,
.request-form textarea:focus,
.request-form select:focus {
  border-color: rgba(15, 118, 110, 0.74);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.full {
  grid-column: 1 / -1;
}

.consent {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.consent input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.form-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 850;
}

.footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-grid-gap);
  padding: 22px 0 32px;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

.footer > div,
.footer address {
  min-height: 160px;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

.footer strong,
.footer .eyebrow {
  color: var(--teal-dark);
}

.footer address {
  display: grid;
  gap: 8px;
}

.public-site .service-grid article,
.public-site .prep-grid article,
.public-site .org-grid article,
.public-site .news-grid a,
.public-site .quick-card,
.public-site .faq-item {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.public-site .service-grid article:hover,
.public-site .prep-grid article:hover,
.public-site .org-grid article:hover,
.public-site .news-grid a:hover,
.public-site .quick-card:hover,
.public-site .faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(18, 32, 51, 0.11);
  border-color: rgba(15, 118, 110, 0.2);
}

.access-site .portal-main {
  display: grid;
  gap: 18px;
  padding: 14px 0 32px;
}

.access-site .quick-card {
  min-height: 100%;
}

.access-scenarios-section {
  padding-top: 4px;
}

.patient-site .portal-main {
  padding-top: 14px;
}

.patient-site .section {
  padding: 24px 0;
}

.patient-site .portal-grid-section {
  gap: 12px;
}

.patient-site .portal-overview-grid,
.practitioner-site .portal-overview-grid,
.manager-site .manager-overview-grid {
  padding: 10px 0 6px;
}

.manager-site .manager-overview-grid {
  padding-top: 2px;
}

.portal-inline-notes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-tight);
  margin-top: 14px;
}

.portal-inline-notes span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(18, 32, 51, 0.08);
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.portal-tip {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.table-card {
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.table-card h2 {
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: clamp(1.22rem, 1.7vw, 1.56rem);
  line-height: 1.14;
}

.portal-card-copy {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.56;
}

.patient-site .request-form {
  padding: 16px;
}

.patient-site .history-list {
  margin-top: 14px;
  gap: 8px;
}

.patient-site .history-item {
  padding: 12px;
}

.manager-site .contact-copy h1 {
  max-width: 15ch;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.manager-site .portal-entry-section {
  padding-top: 18px;
}

.manager-site .manager-heading h1 {
  max-width: 9ch;
  font-size: clamp(1.88rem, 3vw, 2.55rem);
  line-height: 0.98;
}

.manager-site .manager-heading .section-copy {
  max-width: 54ch;
}

.manager-site .lead {
  max-width: 60ch;
  margin-top: 16px;
  font-size: 1.02rem;
}

.patient-site .patient-heading h1,
.practitioner-site .practitioner-heading h1 {
  max-width: 9ch;
  font-size: clamp(1.84rem, 2.9vw, 2.4rem);
  line-height: 0.98;
}

.patient-site .patient-workspace-heading h2,
.practitioner-site .practitioner-workspace-heading h2 {
  max-width: 14ch;
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  line-height: 1;
}

.patient-site .portal-entry-section,
.practitioner-site .portal-entry-section {
  padding-top: 18px;
}

.practitioner-site .section {
  padding: 26px 0;
}

.practitioner-stage-list {
  margin-top: 16px;
}

.practitioner-stage-list .history-item {
  padding: 13px;
}

.practitioner-grid {
  gap: 14px;
}

.practitioner-inline-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 118, 110, 0.06);
}

.practitioner-inline-card strong {
  color: var(--teal-dark);
}

.practitioner-inline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.practitioner-focus {
  min-height: auto;
}

.practitioner-steps {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.practitioner-steps li + li {
  margin-top: 6px;
}

.practitioner-admin-card {
  gap: 10px;
}

.practitioner-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.status-pill.is-ready {
  background: rgba(15, 118, 110, 0.12);
  color: var(--teal-dark);
}

.status-pill.is-active {
  background: rgba(59, 130, 246, 0.12);
  color: #174ea6;
}

.status-pill.is-alert {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5a00;
}

.status-pill.is-blocked {
  background: rgba(220, 38, 38, 0.12);
  color: #a61b1b;
}

.status-pill.is-neutral {
  background: rgba(18, 32, 51, 0.08);
  color: var(--ink);
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-actions button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--teal-dark);
  font-weight: 800;
  cursor: pointer;
}

.review-actions button:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 12px 28px rgba(18, 32, 51, 0.08);
}

.practitioner-review-comment {
  min-height: 88px;
}

.split-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-form-gap);
}

.availability-grid {
  display: grid;
  gap: 8px;
}

.availability-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.availability-day {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.inline-form-note {
  color: var(--muted);
  line-height: 1.55;
}

.assignment-card,
.finance-card,
.candidate-item {
  gap: 8px;
}

.assignment-candidates {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.candidate-item button {
  width: fit-content;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  color: var(--teal-dark);
  font-weight: 800;
  cursor: pointer;
}

.admin-assignment-card {
  align-items: start;
}

.guide-card {
  display: grid;
  gap: 12px;
  padding: var(--space-card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 42px rgba(18, 32, 51, 0.08);
}

.guide-card h3 {
  color: var(--teal-dark);
  font-size: 1.02rem;
  line-height: 1.18;
}

.manager-doc-grid {
  display: grid;
  gap: 14px;
}

.module-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.module-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(247, 251, 255, 0.78);
}

.module-summary-card strong {
  color: var(--teal-dark);
  font-size: 1.05rem;
}

.module-summary-card span {
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 980px) {
  .nav {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .nav-links {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .hero,
  .split-section,
  .contact-section,
  .appointment-section,
  .admin-section,
  .portal-grid-section,
  .footer {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .prep-grid,
  .security-grid,
  .org-grid,
  .news-grid,
  .faq-grid,
  .quick-info,
  .access-support-grid,
  .portal-overview-grid,
  .manager-overview-grid,
  .manager-kpi-grid,
  .access-scenario-grid,
  .mini-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-dashboard-layout,
  .health-grid,
  .manager-workflow-map,
  .portal-workflow-map {
    grid-template-columns: 1fr;
  }

  body.workspace-live #patient-workspace-shell .portal-session-shell,
  body.workspace-live #practitioner-workspace-shell .portal-session-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "banner"
      "context"
      "workflow";
  }

  .hero-stage {
    grid-template-columns: 1fr;
  }

  .access-hub-shell,
  .portal-entry-hero {
    grid-template-columns: 1fr;
  }

  .portal-entry-grid {
    grid-template-columns: 1fr;
  }

  .work-context-bar {
    grid-template-columns: 1fr;
  }

  .work-context-chips {
    justify-content: flex-start;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

  .access-role-card {
    grid-template-columns: minmax(140px, 0.82fr) minmax(0, 1fr) auto;
  }

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

  .quick-card-wide {
    grid-column: span 2;
  }

  .company-section-card {
    grid-template-columns: 1fr;
  }

  .split-mini,
  .form-pair-grid,
  .availability-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 660px) {
  :root {
    --space-section-y: 30px;
    --space-section-heading: 14px;
    --space-hero-top: 20px;
    --space-hero-bottom: 10px;
    --space-card-pad: 16px;
    --space-grid-gap: 10px;
    --space-stack-gap: 12px;
    --space-form-gap: 10px;
  }

  .site-header {
    padding: 8px 10px 0;
  }

  .hero,
  .section,
  .footer {
    width: min(100% - 20px, var(--header-shell-width));
  }

  .nav-cta {
    width: 100%;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-text-link,
  .nav-cta {
    flex: 1 1 0;
  }

  body.workspace-live #patient-workspace-shell .portal-session-shell .section-heading h2,
  body.workspace-live #practitioner-workspace-shell .portal-session-shell .section-heading h2,
  body.workspace-live #manager-workspace .section-heading h2 {
    max-width: none;
  }

  .nav-links a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.8rem);
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 10vw, 3.25rem);
    line-height: 1.02;
  }

  .hero-auth-links {
    gap: 10px;
  }

  .hero-auth-links a {
    width: 100%;
  }

  .location-pill {
    width: 100%;
    justify-content: center;
  }

  .portal-heading h1 {
    max-width: 100%;
    font-size: clamp(1.76rem, 8vw, 2.32rem);
  }

  .trust-strip,
  .service-grid,
  .prep-grid,
  .security-grid,
  .org-grid,
  .news-grid,
  .faq-grid,
  .quick-info,
  .access-support-grid,
  .portal-overview-grid,
  .manager-overview-grid,
  .manager-kpi-grid,
  .access-scenario-grid,
  .mini-role-grid,
  .request-form {
    grid-template-columns: 1fr;
  }

  .architecture-step {
    grid-template-columns: 1fr;
  }

  .manager-module > summary,
  .manager-submodule > summary,
  .portal-module > summary,
  .portal-submodule > summary {
    align-items: start;
    flex-direction: column;
  }

  .process-list li,
  .company-list p,
  .company-list-inline {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .request-form,
  .security-band {
    padding: 18px;
  }

  .access-role-card,
  .access-connection-card,
  .role-teaser-card,
  .quick-card,
  .overview-card,
  .scenario-card,
  .guide-card {
    padding: 14px;
  }

  .access-role-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .inline-disclosure summary {
    align-items: start;
    flex-direction: column;
  }

  .public-site .hero,
  .public-site .section,
  .public-site .footer,
  .public-site .portal-main {
    width: min(100% - 20px, var(--public-shell-width));
  }

  .portal-site .portal-main {
    width: min(100% - 20px, var(--portal-shell-width));
  }

  .portal-site .hero,
  .portal-site .section {
    width: 100%;
  }

  .hero-visual {
    min-height: 420px;
  }

  .company-list-inline p {
    grid-template-columns: 1fr;
  }

  .quick-card-wide {
    grid-column: auto;
  }

  .hero-visual figcaption {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px;
  }
}
