/* Port of Arne's showcase/dashboard.css and inapp.css (2026-09-30 handoff).
   Original Hero-dashboard.png; no demo readings, histories or demo actions.
   Shared shell styling preserves the Explorer's real navigation and permissions.
   Overview content alone gets the hero/assistant composition. */
#dashboard-shell {
  --dashboard-gold: #cfb479;
  display: grid; grid-template-columns: clamp(260px, 16.5vw, 290px) minmax(0, 1fr);
  height: var(--app-available-height, 100dvh); min-height: 0;
  background: #0b2022; color: #e5eeec; font-family: Inter, "Segoe UI", sans-serif;
}
#dashboard-shell > .sidebar {
  --sidebar-padding-inline: 20px;
  --sidebar-padding-bottom: 24px;
  position: relative; top: auto; left: auto; width: auto;
  height: 100%; min-height: 0; padding: 32px var(--sidebar-padding-inline) var(--sidebar-padding-bottom);
  display: flex; flex-direction: column; gap: 0;
  background: linear-gradient(150deg, #102c2e, #091c20);
  border-right: 1px solid #344747; box-shadow: none;
}
#dashboard-shell > .sidebar::before,
#dashboard-shell > .sidebar::after { display: none; }
#dashboard-shell .sidebar-brand {
  display: block; flex: 0 0 auto; margin: 0; padding: 0 10px 16px;
  border: 0; background: transparent; box-shadow: none; text-align: left; font-family: inherit;
  font-size: 31px; letter-spacing: -.7px; line-height: 1.05; color: #e5eeec;
}
#dashboard-shell .sidebar-brand:focus-visible { outline: 2px solid var(--dashboard-gold); outline-offset: 4px; }
#dashboard-shell .sidebar-brand-heading {
  display: flex; width: calc(100% + 20px); align-items: center; flex-wrap: nowrap; gap: 6px;
  container-type: inline-size;
}
#dashboard-shell .sidebar-brand .inapp-wordmark {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  /* ec66afd did not bundle Inter; keep the wordmark's original Segoe UI
     rendering independent of the Inter font now bundled for the application. */
  color: inherit; font-family: "Segoe UI", sans-serif; line-height: inherit; letter-spacing: inherit; text-align: left; cursor: pointer;
  display: inline-block; flex: 0 0 auto; white-space: nowrap; font-size: clamp(18px, calc(16.3cqi - 10.6px), 31px); font-weight: 350;
  text-decoration: underline; text-decoration-color: #d6af56;
  text-decoration-thickness: 2px; text-underline-offset: .09em; text-decoration-skip-ink: auto;
}
#dashboard-shell .inapp-wordmark strong { color: #e5eeec; font-weight: 700; }
#dashboard-shell .inapp-wordmark > span { color: #48c0c6; }
#dashboard-shell .sidebar-brand-meta { margin-top: .65rem; }
#dashboard-shell #sidebar-license-tier {
  display: inline-block; flex: 0 0 auto; margin: 0; color: var(--dashboard-gold);
  font-size: 14px; font-weight: 400; line-height: 1.35; letter-spacing: 1.8px;
  text-transform: uppercase; white-space: nowrap;
}
#dashboard-shell .sidebar-app-version { margin: 0; color: rgba(238, 245, 243, .9); font-size: 11px; font-weight: 400; line-height: 1.2; letter-spacing: 0; white-space: nowrap; }
#dashboard-shell .sidebar-app-version #app-version { position: relative; top: -.35em; font-size: 11.5px; }
#dashboard-shell .sidebar-app-version #app-build { color: rgba(238, 245, 243, .58); font-size: 10px; }
#dashboard-shell .sidebar-new-badge-button {
  flex: 0 0 58px; align-items: center; justify-content: center;
  width: 58px; height: 22px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
}
#dashboard-shell .sidebar-new-badge-button:not([hidden]) { display: inline-flex; }
#dashboard-shell .sidebar-new-badge { display: block; width: 58px; height: 22px; object-fit: contain; }
#dashboard-shell .sidebar-new-badge-button:focus-visible { outline: 2px solid var(--dashboard-gold); outline-offset: 3px; }
#dashboard-shell .sidebar nav { display: grid; gap: 12px; }
#dashboard-shell[data-active-page="analysis-report"] > .sidebar > nav[aria-label="Hauptnavigation"] { display: none; }
#dashboard-shell .sidebar #report-chapter-navigation {
  flex: 1 1 auto; min-height: 0; grid-auto-rows: max-content; gap: .35rem;
  overflow: auto; margin-block: .4rem .8rem; padding: .2rem;
  scrollbar-width: thin; scrollbar-color: #36575d #0c2a30;
}
#dashboard-shell .report-chapter-link {
  display: block; min-width: 0; min-height: 32px; margin-block: 1px; padding: 5px 10px;
  border-radius: 5px; color: #afc6ca; font: 17px/22px system-ui, sans-serif;
  text-decoration: none; overflow-wrap: anywhere;
}
#dashboard-shell .report-chapter-link:hover { background: #1c3b40; }
#dashboard-shell .report-chapter-link[aria-current="location"] {
  color: #e6c583; background: #283b34; box-shadow: inset 2px 0 #dbb76b;
}
#dashboard-shell .report-chapter-link:focus-visible { outline: 2px solid #63bc86; outline-offset: -2px; }
#analysis-report-content > section[id^="report-chapter-"] { scroll-margin-block-start: 1rem; }
@media (max-height: 720px) {
  #dashboard-shell .sidebar #report-chapter-navigation { gap: .15rem; }
  #dashboard-shell .report-chapter-link { padding-block: .3rem; font-size: .8rem; }
}
#dashboard-shell:not([data-results-sidebar="true"]) > .sidebar > nav[aria-label="Hauptnavigation"] {
  margin-top: clamp(6px, 1.5dvh, 12px);
  padding-top: clamp(9px, 2.25dvh, 18px);
  border-top: 1px solid #285057;
}
#dashboard-shell .sidebar .nav-item {
  min-height: 62px; padding: 17px 14px; gap: 16px; margin: 0; width: 100%;
  border: 0; border-radius: 6px; background: transparent; box-shadow: none;
  color: #bdcecb; font: inherit; font-size: 16px; line-height: 1.4; font-weight: 400;
  white-space: normal; overflow-wrap: anywhere;
}
#dashboard-shell .sidebar .nav-item.active {
  background: #214343; color: #fff; box-shadow: inset 3px 0 var(--dashboard-gold);
}
#dashboard-shell .sidebar .nav-item:hover { background: #214343; color: #fff; }
#dashboard-shell .nav-item .nav-icon { width: 28px; height: 28px; flex-basis: 28px; color: inherit; }
#dashboard-shell .nav-item .nav-icon svg { width: 28px; height: 28px; stroke-width: 1.4; }
#dashboard-shell .sidebar-legal-link {
  --sidebar-legal-inset: 14px;
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 15px;
  /* Match the text's left/bottom inset, including the sidebar's own padding. */
  margin: auto 0 calc(var(--sidebar-padding-inline) - var(--sidebar-padding-bottom));
  padding: 10px var(--sidebar-legal-inset) var(--sidebar-legal-inset); border: 0; border-radius: 6px;
  color: #bdcecb; background: transparent; font-size: 16px; font-weight: 400;
  line-height: 1.25; text-decoration: none; text-align: left;
}
#dashboard-shell .sidebar-footer .sidebar-legal-link { margin-top: 0; }
/* Constrain the results row before flexing its sidebar: auto grid rows can grow
   to the parameter list's intrinsic height instead of creating a scrollport. */
#dashboard-shell[data-results-sidebar="true"] { grid-template-rows: minmax(0, 1fr); }
/* Results replace the main menu with the original, scrollable HRV selection. */
#dashboard-shell[data-results-sidebar="true"] > .sidebar > nav[aria-label="Hauptnavigation"] { display: none; }
#dashboard-shell .sidebar-results-parameters { display: flex; flex: 1 1 0px; flex-direction: column; min-height: 0; min-width: 0; }
#dashboard-shell #results-sidebar-host .results-parameter-panel {
  display: flex; flex: 1 1 0px; flex-direction: column; min-height: 0; min-width: 0;
  width: 100%; margin: 0; padding: 0; border: 0; background: transparent;
}
#dashboard-shell #results-sidebar-host .atr-parameter-disclosure { display: flex; flex: 1 1 0px; flex-direction: column; min-height: 0; }
/* Native details adds its own content box; it must also pass on the height limit. */
#dashboard-shell #results-sidebar-host .atr-parameter-disclosure::details-content { display: flex; flex: 1 1 0px; flex-direction: column; min-height: 0; }
#dashboard-shell #results-sidebar-host .atr-parameter-disclosure-toggle { display: none; }
#dashboard-shell #results-sidebar-host .atr-parameter-disclosure-content { display: flex; flex: 1 1 0px; flex-direction: column; min-height: 0; padding: 0; }
#dashboard-shell #results-sidebar-host .section-label { flex: 0 0 auto; margin: 0 0 .65rem; color: var(--ui-color-text-muted); font-size: .85rem; }
#dashboard-shell #results-sidebar-host .atr-parameter-search { display: grid; flex: 0 0 auto; gap: .4rem; color: var(--ui-color-text-muted); font-size: .8rem; }
#dashboard-shell #results-sidebar-host input[type="search"] { width: 100%; min-width: 0; }
#dashboard-shell #results-sidebar-host #result-parameter-list {
  display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain;
  margin-top: .65rem; padding-right: .25rem; scrollbar-width: thin; scrollbar-color: #527579 transparent;
}
#dashboard-shell #results-sidebar-host #result-parameter-list button:not(.atr-mobile-parameter-info) {
  display: flex; align-items: start; justify-content: space-between; gap: .45rem; width: 100%; min-width: 0;
  min-height: 36px; padding: .4rem .5rem; border: 0; border-radius: .4rem;
  color: var(--ui-color-text-muted); background: transparent; font: inherit; font-size: .85rem; line-height: 1.4;
  text-align: left; white-space: normal;
}
#dashboard-shell #results-sidebar-host #result-parameter-list button.active { color: var(--ui-color-text); background: color-mix(in srgb, var(--ui-color-gold) 14%, transparent); box-shadow: inset 2px 0 var(--ui-color-gold); }
#dashboard-shell #results-sidebar-host #result-parameter-list .atr-parameter-label { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: .2rem .35rem; min-width: 0; }
#dashboard-shell #results-sidebar-host #result-parameter-list .atr-parameter-name { min-width: 0; white-space: normal; overflow-wrap: break-word; hyphens: auto; }
#dashboard-shell #results-sidebar-host #result-parameter-list .atr-parameter-unit { flex: 0 0 auto; color: var(--ui-color-text-muted); font-size: .7rem; }
#dashboard-shell #results-sidebar-host #result-parameter-list .atr-mobile-parameter-info { display: none; }
#dashboard-shell #results-sidebar-host #result-parameter-list :is(.atr-parameter-group-title, .atr-parameter-section > summary) { margin-inline: 0; font-size: .82rem; line-height: 1.4; white-space: normal; overflow-wrap: break-word; hyphens: auto; }
#dashboard-shell .sidebar-results-empty { margin: 0; color: var(--ui-color-text-muted); font-size: .85rem; line-height: 1.5; }
#dashboard-shell .sidebar-status {
  flex: 0 0 auto; margin: 20px 14px 0; padding: 19px 0 0; gap: 7px;
  border-top: 1px solid #ffffff12; color: #9bb9ad;
}
#dashboard-shell .sidebar-status > span { width: 5px; height: 5px; box-shadow: none; background: #9bb9ad; }
#dashboard-shell .sidebar-status strong { color: #9bb9ad; font-size: 11px; font-weight: 400; }
#dashboard-shell .sidebar-status small { margin-top: 12px; color: #79908e; font-size: 11px; line-height: 1.7; }
#dashboard-shell > .workspace {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  height: 100%; overflow: hidden;
}
#dashboard-shell .topbar {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  min-height: 76px; height: auto; gap: 12px 25px; padding: 12px 34px;
  color: #e5eeec; background: #10262a; border-bottom: 1px solid #29403f; backdrop-filter: none;
}
#dashboard-shell .topbar .topbar-title { display: none; }
#dashboard-shell .topbar .topbar-back {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 13px; border: 1px solid #338c87; border-radius: 6px;
  color: #e5eeec; background: transparent; font: inherit; font-size: 15px; white-space: nowrap;
}
#dashboard-shell .topbar .topbar-back:hover { background: #214343; }
#dashboard-shell .topbar .topbar-back:focus-visible { outline: 2px solid var(--dashboard-gold); outline-offset: 3px; }
#dashboard-shell .topbar .topbar-back > span:first-child { font-size: 22px; line-height: 1; }
#dashboard-shell .topbar .account-menu {
  display: flex; flex: 0 1 auto; min-width: 0; max-width: 100%; flex-wrap: nowrap;
  justify-content: flex-end; align-items: center; margin-left: auto; gap: 12px;
}
#dashboard-shell .topbar .account-menu button {
  min-height: 42px; padding: 10px 17px; border: 1px solid #cfb47966; border-radius: 6px;
  background: transparent; color: #e5eeec; box-shadow: none; font-size: 15px; font-weight: 400;
  flex-shrink: 0; white-space: nowrap;
}
#dashboard-shell .topbar .account-menu button:hover { background: #214343; }
#dashboard-shell .topbar .account-menu .fullscreen-button {
  padding: 9px 12px; border-color: #338c87; color: #81c7bb;
}
#dashboard-shell .fullscreen-button > span:first-child { font-size: 24px; }
#dashboard-shell .fullscreen-label { display: none; }
#dashboard-shell .sidebar-brand { margin-bottom: 12px; }
#dashboard-shell:not([data-active-page="overview"]) .trial-status { display: none; }
#dashboard-shell .workspace > .workspace-content {
  flex: 1 1 auto; min-height: 0; height: auto; width: 100%;
}
#dashboard-shell[data-active-page="overview"] > .workspace {
  position: relative;
}
#dashboard-shell[data-active-page="overview"] .topbar {
  /* Nested in the overview scrollport, so this overlay scrolls with the hero. */
  position: absolute; top: 0; right: 0; left: 0; z-index: 2;
  background: transparent;
  border-bottom-color: transparent;
}
/* The overview has its own full-width reading layout. Other shell pages
   provide their layout in their scoped stylesheets. */
#dashboard-shell[data-active-page="overview"] .workspace-content {
  position: relative; z-index: 0;
  max-width: none; margin: 0; padding: 0; overflow: auto; background: #0b2022;
}
#dashboard-shell[data-active-page="overview"] .workspace-content::before { display: none; }
#dashboard-shell #page-overview {
  --dashboard-overview-topbar-space: 76px;
  position: relative; isolation: isolate; height: auto; min-height: 100%;
}
#dashboard-shell #page-overview:not([hidden]) { display: block; }
#dashboard-shell #page-overview .overview-hero {
  position: relative; display: block; min-height: clamp(14rem, 28dvh, 18rem); margin: 0; padding: 0;
  border: 0; background: transparent; container-type: inline-size;
}
#dashboard-shell .overview-hero-image {
  position: absolute; top: 0; left: 0; width: 100%; height: auto; min-height: 100%;
  object-fit: cover; object-position: center 35%; pointer-events: none;
  mask-image: none; z-index: -1;
}
#dashboard-shell .overview-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: transparent;
}
#dashboard-shell #page-overview .overview-hero-ari {
  position: absolute; margin: 0; padding: 0; transform: translateY(-50%);
  color: #d7eef1; font-size: clamp(14px, 1.1cqi, 18px); font-weight: 400; line-height: 1.25;
  white-space: nowrap; pointer-events: none;
  text-shadow: 0 1px 4px rgba(3, 22, 25, .95), 0 2px 12px rgba(3, 22, 25, .8);
}
#dashboard-shell #page-overview .overview-hero-ari > span { display: block; }
#dashboard-shell #page-overview .overview-hero-metric-title { color: #e4bf74; }
#dashboard-shell #page-overview .overview-hero-metric-value { font-size: 2em; line-height: 1.1; font-weight: 400; }
#dashboard-shell #page-overview .overview-hero-metric-unit { font-size: .8em; }
#dashboard-shell #page-overview .overview-welcome {
  position: relative; width: auto; max-width: 90%; margin: 0;
  padding: calc(var(--dashboard-overview-topbar-space) + clamp(1.25rem, 3dvh, 2rem)) 3.3% clamp(2.5rem, 5dvh, 3.5rem);
  text-align: left; transform: none;
}
#dashboard-shell #page-overview .overview-salutation {
  display: block; box-sizing: border-box; width: fit-content; max-width: 100%;
  margin: 0; text-shadow: 0 0 6px rgba(3, 22, 25, .7), 0 3px 18px rgba(3, 22, 25, .88);
}
#dashboard-shell #page-overview .overview-greeting { display: block; margin: 0 0 4px; font-size: clamp(1.1rem, 1.7vw, 1.5rem); line-height: 1.3; color: rgba(245, 250, 248, .8); }
#dashboard-shell #page-overview #overview-heading {
  display: block; min-width: 0; margin: 0; padding: 0; text-align: left; color: rgba(245, 250, 248, .8);
  font-size: clamp(1.75rem, 2.5vw, 2.5rem); font-weight: 400; line-height: 1.15; letter-spacing: -.035em;
}
#dashboard-shell #page-overview #overview-name {
  display: inline; color: inherit; font: inherit; letter-spacing: inherit;
  white-space: normal; overflow-wrap: anywhere;
}
#dashboard-shell #page-overview #overview-name-parts { display: inline; }
#dashboard-shell #page-overview .overview-name-first { color: #e8ecec; }
#dashboard-shell #page-overview .overview-name-last { color: var(--dashboard-gold); }
#dashboard-shell #page-overview #overview-heading { overflow-wrap: anywhere; }
#dashboard-shell #page-overview .overview-welcome {
  box-sizing: border-box; width: 48%; max-width: 48%;
  padding: calc(var(--dashboard-overview-topbar-space) + 14px) 3.3% 48px;
}
#dashboard-shell #page-overview .overview-purpose {
  margin: 14px 0 0; color: #e5eeec; font-size: clamp(.95rem, 1.35cqi, 1.25rem); line-height: 1.4;
  text-shadow: 0 1px 6px #031619;
}
#dashboard-shell #page-overview .overview-mission {
  margin: 8px 0 0; color: #c5d3cd; font-size: clamp(.8rem, 1cqi, 1rem); line-height: 1.4;
  text-shadow: 0 1px 6px #031619;
}
#dashboard-shell #page-overview .overview-welcome-message {
  position: relative; isolation: isolate; margin-top: 14px;
}
#dashboard-shell #page-overview .overview-welcome-message::before {
  content: ""; position: absolute; inset: -12px -24px -12px -18px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 34, 39, 0) 0%, rgba(5, 34, 39, .55) 3%, rgba(5, 34, 39, .88) 8%, rgba(5, 34, 39, .72) 60%, rgba(5, 34, 39, 0) 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
#dashboard-shell #page-overview .overview-welcome-message .overview-purpose {
  margin-top: 0; color: #f5faf8; text-shadow: 0 1px 4px rgba(3, 22, 25, .85);
}
#dashboard-shell #page-overview .overview-welcome-message .overview-mission {
  color: #edf5f3; text-shadow: 0 1px 4px rgba(3, 22, 25, .85);
}
#dashboard-shell #page-overview .overview-quote {
  position: absolute; right: 3.3%; bottom: 44px; max-width: 27%; margin: 0;
  color: #f0dca6; font-size: clamp(.875rem, 1.2cqi, 1.125rem); font-style: italic; line-height: 1.5;
  text-align: right; text-shadow: 0 1px 6px #031619;
}
#dashboard-shell #page-overview .overview-quote::after {
  content: ""; display: block; width: 48px; height: 2px; margin: 10px 0 0 auto; background: #e7c785;
}
#dashboard-shell #page-overview .overview-measurement-stage {
  display: block; position: relative; margin: -24px 30px 0; padding: 0; min-height: 0;
}
/* Use the existing global selection; do not override access-based [hidden]. */
#dashboard-shell:has(#analysis-report-mode-switch [data-report-mode="expert"][aria-pressed="true"]) #page-overview .overview-measurement-stage {
  display: none;
}
#dashboard-shell[data-active-page="overview"] .topbar :is(.account-menu > button, .mobile-home, .mobile-logout) {
  background: rgba(8, 35, 39, .65);
  border: 1px solid rgba(170, 220, 225, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .20);
}
#dashboard-shell[data-active-page="overview"] .topbar :is(.account-menu > button:hover, .mobile-home:hover, .mobile-logout:hover) {
  background: rgba(8, 35, 39, .82);
  border-color: rgba(170, 220, 225, .9);
}
#dashboard-shell #page-overview .overview-measurement-assistant {
  grid-template-columns: 72px minmax(0, 1fr) minmax(12rem, 18rem); gap: 14px 22px;
  width: 100%; padding: 22px 26px;
  border-top: 1px solid rgba(245, 215, 155, .42); border-left: 1px solid rgba(235, 210, 155, .32);
  border-right: 1px solid rgba(140, 190, 190, .20); border-bottom: 1px solid rgba(140, 190, 190, .20); border-radius: 10px;
  background: radial-gradient(ellipse at 12% 0%, rgba(255, 216, 135, .22) 0%, rgba(200, 180, 110, .10) 30%, transparent 65%),
    linear-gradient(135deg, rgba(90, 115, 85, .32) 0%, rgba(25, 70, 72, .40) 50%, rgba(8, 45, 48, .58) 100%);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  box-shadow: -4px -3px 20px rgba(245, 205, 125, .13), 6px 10px 22px rgba(0, 0, 0, .12), inset 1px 1px 0 rgba(255, 240, 205, .22);
}
#dashboard-shell #page-overview .overview-measurement-icon {
  width: 72px; height: 72px; border-radius: 16px; background: #086a6466;
  border: 1px solid #32a89d; color: var(--dashboard-gold); box-shadow: none;
}
#dashboard-shell #page-overview .overview-measurement-icon svg { width: 48px; height: 48px; stroke-width: 1.4; }
#dashboard-shell .overview-measurement-copy { min-width: 0; }
#dashboard-shell .overview-measurement-copy .section-label { color: #e3c36d; font-size: 13px; font-weight: 600; letter-spacing: 1.8px; }
#dashboard-shell #page-overview .overview-measurement-copy h2 { margin: 4px 0 6px; color: #e5eeec; font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.2; font-weight: 500; }
#dashboard-shell #page-overview .overview-measurement-copy > p:last-child { max-width: none; font-size: 16px; color: #bdcfca; }
#dashboard-shell #page-overview .overview-measurement-button {
  width: 100%; min-width: 0; min-height: 3.5rem; padding: .85rem 1.2rem;
  display: inline-flex; justify-content: space-between; font-size: 1.05rem;
}
#dashboard-shell .overview-measurement-button span { color: inherit; }
#dashboard-shell #page-overview .overview-measurement-steps {
  grid-column: 2 / -1; display: flex; align-items: center; gap: 0;
  margin: 0; padding: 0; border: 0;
}
#dashboard-shell #page-overview .overview-measurement-steps li { flex: 1; min-width: 0; gap: 13px; color: #c5d3cd; font-size: 14px; overflow-wrap: anywhere; }
#dashboard-shell .overview-measurement-steps li:not(:last-child)::after { content: ""; height: 1px; flex: 1; background: #78918344; margin: 0 20px; }
#dashboard-shell #page-overview .overview-measurement-steps li > span {
  flex: 0 0 35px; width: 35px; height: 35px; font-size: 15px; font-weight: 400;
  border-color: #d6b85e; color: var(--dashboard-gold);
}
#dashboard-shell #page-overview .summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto minmax(32px, 1fr) auto; column-gap: 17px; row-gap: 0; margin: 20px 30px 30px; }
#dashboard-shell #page-overview .summary-card {
  display: grid; grid-template-columns: 57px minmax(0, 1fr); align-items: stretch; gap: 20px; min-width: 0;
  min-height: 142px; padding: 25px 22px; border: 1px solid #2a585b; border-radius: 9px;
  background: linear-gradient(120deg, #123a3e, #092a30); box-shadow: none;
  grid-row: span 3; grid-template-rows: subgrid; row-gap: 0;
}
#dashboard-shell .summary-card-icon {
  grid-column: 1; grid-row: 1 / -1; align-self: start; width: 57px; height: 60px; display: grid; place-items: center; padding: 11px;
  border: 1px solid #356264; border-radius: 12px; background: #28535366; color: #d9c27f;
}
#dashboard-shell .summary-card-icon svg { width: 35px; height: 35px; }
#dashboard-shell #page-overview .summary-row .summary-card-content { display: grid; grid-column: 2; grid-row: 1 / -1; grid-template-rows: subgrid; align-self: stretch; gap: 0; min-width: 0; }
#dashboard-shell #page-overview .summary-row .summary-card-content > span { display: flex; align-items: center; align-self: start; min-height: 32px; color: #b9cbc3; font-size: 1rem; font-weight: 400; line-height: 1.25; }
#dashboard-shell #page-overview .summary-row .summary-card-content > strong,
#dashboard-shell #page-overview .summary-row .overview-measurement-count-value strong { align-self: center; margin: 0; color: #e5eeec; font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#dashboard-shell #page-overview .summary-row .summary-card-content > small { color: #91aaa1; font-size: .875rem; font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
#dashboard-shell #activity-summary-card .overview-measurement-count-header {
  display: flex; flex-wrap: wrap; align-items: center; align-self: start; justify-content: space-between; gap: 4px 8px;
  color: #b9cbc3; font-size: 1rem; line-height: 1.25;
}
#dashboard-shell #page-overview .summary-row .overview-measurement-count-header > span {
  display: flex; align-items: center; min-height: 32px; color: #b9cbc3; font-size: 1rem; font-weight: 400; line-height: 1.25;
}
#dashboard-shell #activity-summary-card .overview-measurement-period {
  display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 2px; border: 1px solid #36575d;
  border-radius: 7px; background: transparent;
}
#dashboard-shell #activity-summary-card .overview-measurement-period button {
  min-width: 0; min-height: 26px; margin: 0; padding: 3px 5px; border: 0; border-radius: 4px;
  background: transparent; color: #a7bfbd; font: inherit; font-size: 12px; white-space: nowrap;
  box-shadow: none; transition: color 180ms ease, background-color 180ms ease;
}
#dashboard-shell #activity-summary-card .overview-measurement-period button[aria-pressed="true"] { background: #23444a; color: #e5efef; }
#dashboard-shell #activity-summary-card .overview-measurement-period button:not([aria-pressed="true"]):hover { background: #1c3b40; color: #e5efef; }
#dashboard-shell #activity-summary-card .overview-measurement-period button:focus-visible { outline: 2px solid #51cce0; outline-offset: 2px; }
#dashboard-shell #activity-summary-card .overview-measurement-count-value { display: flex; align-items: center; align-self: center; gap: 8px; min-height: 32px; }
#dashboard-shell #activity-summary-card .overview-measurement-count-value small { color: #91aaa1; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
#dashboard-shell #activity-summary-card .overview-measurement-count-footer { color: #91aaa1; font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
#dashboard-shell #activity-summary-card .overview-measurement-count-footer small { font-size: inherit; }
#dashboard-shell #page-overview .summary-row .summary-card-content .summary-card-link {
  display: inline-flex; align-items: center; justify-self: start; align-self: start; gap: 6px;
  min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: transparent; box-shadow: none; color: #e7c785; font: inherit;
  font-size: .875rem; font-weight: 400; line-height: 1.35; text-align: left; cursor: pointer;
}
#dashboard-shell #page-overview .summary-row .summary-card-link span { color: inherit; font: inherit; }
#dashboard-shell #page-overview .summary-row button.summary-card-link:hover,
#dashboard-shell #page-overview .summary-row .hardware-status-card:hover .summary-card-link { color: #fff2c8; }
#dashboard-shell #page-overview .summary-row button.summary-card-link:focus-visible { outline: 2px solid #e7c785; outline-offset: 4px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  #dashboard-shell #activity-summary-card .overview-measurement-period button { transition: none; }
}
/* Keep the same three content rows when the cards stack vertically. */
@media (max-width: 680px) {
  #dashboard-shell #page-overview .summary-row { grid-template-rows: none; row-gap: 10px; }
  #dashboard-shell #page-overview .summary-card { grid-row: auto; grid-template-rows: auto; }
  #dashboard-shell #page-overview .summary-row .summary-card-content { grid-row: 1; grid-template-rows: minmax(32px, auto) minmax(32px, 1fr) auto; }
  #dashboard-shell #page-overview .summary-card-icon { grid-row: 1; }
}
#dashboard-shell #page-overview .overview-insights {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(22rem, .75fr); gap: 17px;
  margin: 0 30px 30px;
}
#dashboard-shell #page-overview .overview-insight-card {
  min-width: 0; padding: 22px; border: 1px solid #2a585b; border-radius: 9px;
  background: linear-gradient(120deg, #123a3e, #092a30); box-shadow: none;
}
#dashboard-shell #page-overview .overview-insight-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px;
}
#dashboard-shell #page-overview .overview-insight-header .section-label {
  margin: 0 0 5px; color: #e3c36d; font-size: 12px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase;
}
#dashboard-shell #page-overview .overview-insight-header h2 {
  margin: 0; color: #e5eeec; font-size: 22px; font-weight: 500; line-height: 1.2;
}
#dashboard-shell #page-overview .overview-insight-subtitle,
#dashboard-shell #page-overview .overview-chart-scale-note {
  margin: 6px 0 0; color: #91aaa1; font-size: 12px; line-height: 1.4;
}
#dashboard-shell #page-overview .overview-insight-link {
  display: inline-flex; align-items: center; flex: 0 0 auto; gap: 8px; min-height: 32px; padding: 5px 0;
  border: 0; color: #e7c785; background: transparent; font: inherit; font-size: 13px; cursor: pointer;
}
#dashboard-shell #page-overview .overview-insight-link:hover { color: #fff2c8; }
#dashboard-shell #page-overview .overview-insight-link:focus-visible {
  outline: 2px solid #e7c785; outline-offset: 4px; border-radius: 4px;
}
#dashboard-shell #page-overview .overview-history-chart {
  display: block; width: 100%; height: auto; min-height: 190px;
}
#dashboard-shell #page-overview .overview-history-grid { stroke: rgba(185, 203, 195, .16); stroke-width: 1; }
#dashboard-shell #page-overview .overview-history-axis-label { fill: #a6beb9; font-size: 12px; }
#dashboard-shell #page-overview .overview-history-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#dashboard-shell #page-overview .overview-history-point { stroke: #092a30; stroke-width: 2; }
#dashboard-shell #page-overview .overview-history-axis { stroke: rgba(185, 203, 195, .3); stroke-width: 1; }
#dashboard-shell #page-overview .overview-history-legend {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 8px;
}
#dashboard-shell #page-overview .overview-history-legend[data-layout="grid"] {
  display: grid; grid-template-columns: repeat(var(--overview-legend-columns), minmax(0, 1fr));
  align-items: start;
}
#dashboard-shell #page-overview .overview-history-legend[data-layout="grid"] .overview-history-legend-item {
  min-width: 0; width: 100%; align-self: start;
}
#dashboard-shell #page-overview .overview-history-legend-item {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 30px;
  padding: 3px 0; border: 0; border-radius: 0; background: transparent;
  color: #dce7e3; font: inherit; font-size: 13px; text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
#dashboard-shell #page-overview .overview-history-legend-item::before {
  flex: 0 0 18px; width: 18px; height: 3px; border-radius: 2px; background: var(--overview-series-color); content: "";
}
#dashboard-shell #page-overview .overview-history-legend-item[aria-pressed="false"] { opacity: .5; text-decoration: line-through; }
#dashboard-shell #page-overview .overview-history-legend-item:focus-visible,
#dashboard-shell #page-overview .overview-history-point:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#dashboard-shell #page-overview .overview-history-content { position: relative; min-width: 0; }
#dashboard-shell #page-overview .overview-history-tooltip {
  position: absolute; z-index: 1; bottom: 32px; left: 43px; right: 12px;
  margin: 0; padding: 7px 10px; border: 1px solid #3b6367; border-radius: 5px;
  background: #08282e; color: #e5eeec; font-size: 12px; line-height: 1.4;
  overflow-wrap: anywhere; pointer-events: none;
}
@media (pointer: coarse) {
  #dashboard-shell #page-overview .overview-history-legend-item { min-height: 44px; }
}
#dashboard-shell #page-overview .overview-insight-state {
  display: grid; min-height: 220px; margin: 0; place-items: center; color: #91aaa1; font-size: 14px; text-align: center;
}
#dashboard-shell #page-overview .overview-latest-list { display: grid; gap: 8px; }
#dashboard-shell #page-overview .overview-history-card,
#dashboard-shell #page-overview .overview-latest-card { align-self: start; }
#dashboard-shell #page-overview .overview-latest-card { box-sizing: border-box; }
#dashboard-shell #page-overview .overview-latest-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; width: 100%; padding: 12px 0;
  border: 0; border-top: 1px solid rgba(185, 203, 195, .14); color: inherit; background: transparent; text-align: left; cursor: pointer;
}
#dashboard-shell #page-overview .overview-latest-row:first-child { border-top: 0; padding-top: 0; }
#dashboard-shell #page-overview button.overview-latest-row:hover .overview-latest-name { color: #fff2c8; }
#dashboard-shell #page-overview .overview-latest-row-deleted { cursor: default; }
#dashboard-shell #page-overview .overview-latest-row:focus-visible { outline: 2px solid #e7c785; outline-offset: 4px; border-radius: 4px; }
#dashboard-shell #page-overview .overview-latest-name { min-width: 0; overflow-wrap: anywhere; color: #e5eeec; font-size: 14px; font-weight: 500; }
#dashboard-shell #page-overview .overview-latest-date { color: #91aaa1; font-size: 12px; white-space: nowrap; }
#dashboard-shell #page-overview .overview-latest-values { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 4px 12px; color: #b9cbc3; font-size: 12px; }
#dashboard-shell #page-overview .overview-latest-values span { white-space: nowrap; }
#dashboard-shell #page-overview .overview-latest-empty { margin: 0; padding: 24px 0; color: #91aaa1; font-size: 14px; text-align: center; }
@media (max-width: 1100px) {
  #dashboard-shell #page-overview .overview-insights { grid-template-columns: minmax(0, 1fr); }
}
#dashboard-shell #personal-access-overview { margin: 24px 30px; padding: 0; overflow: visible; }
#dashboard-shell :is(.sidebar, .topbar) button:focus-visible { outline: 2px solid var(--dashboard-gold); outline-offset: 3px; }
@media (min-width: 1101px) {
  #dashboard-shell #page-overview .overview-salutation { display: block; }
  #dashboard-shell #page-overview .overview-greeting {
    margin: 0 0 6px; font-size: clamp(1.5rem, 1.75vw, 1.6875rem); line-height: 1.3;
  }
  #dashboard-shell #page-overview #overview-heading {
    margin: 0 0 23px; line-height: 1.2; font-weight: 400;
  }
}
@media (max-width: 1100px) {
  #dashboard-shell .topbar .topbar-back { width: 42px; padding: 9px; }
  #dashboard-shell .topbar .topbar-back-label { display: none; }
  #dashboard-shell { grid-template-columns: 220px minmax(0, 1fr); }
  #dashboard-shell > .sidebar { --sidebar-padding-inline: 10px; --sidebar-padding-bottom: 22px; padding: 22px var(--sidebar-padding-inline) var(--sidebar-padding-bottom); }
  #dashboard-shell .sidebar-brand { font-size: 27px; padding-inline: 10px; }
  #dashboard-shell .sidebar .nav-item { min-height: 52px; padding: 13px; gap: 12px; font-size: 14px; }
  #dashboard-shell .topbar { padding: 10px 18px; gap: 12px; }
  #dashboard-shell #page-overview .overview-hero { min-height: clamp(13rem, 27dvh, 16rem); }
  #dashboard-shell .overview-hero-image { object-position: 62% bottom; }
  #dashboard-shell .overview-hero::after { background: transparent; }
  #dashboard-shell #page-overview .overview-welcome {
    max-width: 78%; padding: calc(var(--dashboard-overview-topbar-space) + 22px) 22px 40px;
  }
  #dashboard-shell #page-overview .overview-measurement-assistant { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 20px; }
  #dashboard-shell #page-overview .overview-measurement-icon { width: 56px; height: 56px; }
  #dashboard-shell #page-overview .overview-measurement-icon svg { width: 38px; height: 38px; }
  #dashboard-shell #page-overview .overview-measurement-copy h2 { font-size: 1.45rem; }
  #dashboard-shell #page-overview .overview-measurement-copy > p:last-child { font-size: 14px; }
  #dashboard-shell #page-overview .overview-measurement-button { grid-column: 1 / -1; justify-self: end; width: min(100%, 18rem); }
  #dashboard-shell #page-overview .overview-measurement-steps { grid-column: 1 / -1; }
  #dashboard-shell #page-overview .overview-measurement-steps li { gap: 8px; font-size: 12px; }
  #dashboard-shell .overview-measurement-steps li:not(:last-child)::after { margin-inline: 8px; }
}
/* Retain the existing responsive drawer and its navigation handlers. */
@media (max-width: 950px) {
  #dashboard-shell #results-sidebar-host #result-parameter-list .atr-mobile-parameter-info { display: block; width: auto; margin: 0 .5rem .4rem auto; padding: .2rem .45rem; border: 1px solid var(--ui-color-border-subtle); border-radius: .35rem; color: var(--ui-color-text-muted); background: transparent; font-size: .72rem; }
  #dashboard-shell #page-overview { --dashboard-overview-topbar-space: 62px; }
  #dashboard-shell { grid-template-columns: minmax(0, 1fr); }
  #dashboard-shell > .sidebar {
    position: fixed; top: var(--fullscreen-app-bar-height, 0px); left: -280px;
    width: 270px; height: var(--app-available-height, 100dvh);
  }
  #dashboard-shell.menu-open > .sidebar { left: 0; }
  #dashboard-shell .topbar .mobile-menu { display: block; color: #bdcecb; margin-right: auto; }
  #dashboard-shell .topbar { min-height: 62px; }
}
@media (max-width: 680px) {
  #dashboard-shell #page-overview { --dashboard-overview-topbar-space: 56px; }
  #dashboard-shell[data-active-page="overview"]:has(.trial-status:not([hidden])) #page-overview { --dashboard-overview-topbar-space: calc(68px + 1.4rem); }
  #dashboard-shell .topbar .trial-status { flex-basis: 100%; order: 1; margin: 0; font-size: .8rem; padding-block: 2px; }
  #dashboard-shell .topbar { min-height: 56px; padding: 8px 16px; gap: 8px; }
  #dashboard-shell .topbar .topbar-back { width: 36px; min-height: 36px; padding: 5px; }
  #dashboard-shell .topbar .account-menu { display: none; }
  #dashboard-shell .topbar .mobile-home,
  #dashboard-shell .topbar .mobile-logout { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; color: #e5eeec; background: #10262a; border: 1px solid #cfb47966; }
  #dashboard-shell #page-overview .overview-hero { min-height: clamp(12rem, 25dvh, 15rem); }
  #dashboard-shell #page-overview .overview-welcome {
    max-width: 100%; padding: calc(var(--dashboard-overview-topbar-space) + 18px) 16px 36px;
  }
  #dashboard-shell #page-overview .overview-measurement-button { justify-self: stretch; width: 100%; }
  #dashboard-shell .overview-hero-image { object-position: 60% bottom; }
  #dashboard-shell #page-overview .overview-measurement-stage { margin: -16px 12px 0; }
  #dashboard-shell #page-overview .overview-measurement-assistant { grid-template-columns: 47px minmax(0, 1fr); padding: 18px 16px; gap: 18px 14px; }
  #dashboard-shell #page-overview .overview-measurement-icon { width: 47px; height: 47px; border-radius: 14px; }
  #dashboard-shell #page-overview .overview-measurement-icon svg { width: 33px; height: 33px; }
  #dashboard-shell #page-overview .overview-measurement-copy h2 { font-size: 23px; }
  #dashboard-shell #page-overview .overview-measurement-copy > p:last-child { font-size: 13px; }
  #dashboard-shell #page-overview .overview-measurement-steps { display: grid; grid-template-columns: 1fr; gap: 13px; }
  #dashboard-shell .overview-measurement-steps li::after { display: none; }
  #dashboard-shell #page-overview .summary-row { grid-template-columns: minmax(0, 1fr); margin: 16px 12px 24px; gap: 10px; }
  #dashboard-shell #page-overview .summary-card { grid-template-columns: 47px minmax(0, 1fr); min-height: 0; padding: 17px 20px; gap: 14px; }
  #dashboard-shell .summary-card-icon { width: 47px; height: 50px; padding: 9px; }
  #dashboard-shell .summary-card-icon svg { width: 29px; height: 29px; }
  #dashboard-shell #page-overview .overview-insights { grid-template-columns: minmax(0, 1fr); margin: 0 12px 24px; gap: 10px; }
  #dashboard-shell #page-overview .overview-insight-card { padding: 17px 20px; }
  #dashboard-shell #page-overview .overview-insight-header { margin-bottom: 12px; }
  #dashboard-shell #page-overview .overview-history-chart { min-height: 170px; }
  #dashboard-shell #personal-access-overview { margin: 18px 12px; }
}
/* Keep every permitted navigation action reachable in short windows / zoom.
   Runtime detail is secondary; no navigation item is removed or paginated. */
@media (max-height: 720px) {
  #dashboard-shell > .sidebar { --sidebar-padding-inline: 10px; --sidebar-padding-bottom: 12px; padding: 12px var(--sidebar-padding-inline) var(--sidebar-padding-bottom); }
  #dashboard-shell .sidebar-brand { font-size: 25px; padding: 0 8px 12px; }
  #dashboard-shell #sidebar-license-tier { font-size: 11px; margin-top: 0; }
  #dashboard-shell .sidebar nav { gap: 4px; }
  #dashboard-shell .sidebar .nav-item { min-height: 40px; padding: 8px 10px; gap: 8px; font-size: 13px; }
  #dashboard-shell .sidebar .nav-icon, #dashboard-shell .sidebar .nav-icon svg { width: 22px; height: 22px; flex-basis: 22px; }
  #dashboard-shell .sidebar-legal-link { --sidebar-legal-inset: 10px; padding: 8px var(--sidebar-legal-inset) var(--sidebar-legal-inset); min-height: 36px; font-size: 13px; line-height: 18px; }
  #dashboard-shell .sidebar-footer { gap: .4rem; padding-top: .5rem; }
  #dashboard-shell .sidebar-view-mode { gap: .25rem; margin-bottom: .5rem; padding-bottom: .5rem; }
  #dashboard-shell .sidebar-report-mode-switch .personal-report-mode-button { min-height: 36px; padding-block: .3rem; }
  #dashboard-shell .sidebar-status { padding-top: 8px; margin-top: 8px; }
  #dashboard-shell .sidebar-status small { margin-top: 4px; font-size: 10px; }
}
@media (max-height: 440px) {
  #dashboard-shell .sidebar-footer { gap: .25rem; padding-top: .35rem; }
  #dashboard-shell .sidebar-mode-info { width: 24px; height: 24px; }
  #dashboard-shell .sidebar-report-mode-switch .personal-report-mode-button { min-height: 32px; padding-block: .2rem; }
  #dashboard-shell .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboard-shell .sidebar-status { display: none; }
  #dashboard-shell .sidebar .nav-item { font-size: 12px; min-height: 40px; padding: 6px; }
}

/* Results appearance from the AP6 demo, revision 2212aa8.
   Share the sidebar appearance with Overview, Setup, Measure and the report. Keep the
   existing controls, global mode and mobile drawer. Document scrolling remains
   specific to embedded results; other pages retain their workspace layouts. */
body:has(#dashboard-shell[data-results-sidebar="true"]:not([hidden])) {
  background: #071f25;
}
#dashboard-shell[data-results-sidebar="true"] {
  height: auto; min-height: calc(var(--app-available-height, 100dvh) - 28px);
  grid-template-rows: auto; gap: 12px; margin: 14px;
  overflow: visible; background: #071f25;
}
#dashboard-shell[data-results-sidebar="true"] > .workspace,
#dashboard-shell[data-results-sidebar="true"] .workspace-content {
  height: auto; max-height: none; min-height: 0; overflow: visible;
}
#dashboard-shell[data-results-sidebar="true"] > .workspace { background: #071f25; }
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) > .sidebar {
  --sidebar-padding-inline: 13px;
  --sidebar-padding-bottom: 20px;
  padding: 20px 13px; min-width: 0;
  color: #e5efef; background: #0c2a30;
  border: 1px solid #285057; border-radius: 10px;
  font: 16px system-ui, sans-serif;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand {
  margin: 0 0 28px; padding: 0 2px;
  font-family: Arial, sans-serif;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand-heading {
  width: 100%; flex-wrap: wrap;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand-meta {
  display: flex; align-items: flex-start; gap: 4px; margin-top: 16px;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) #sidebar-license-tier {
  color: #dbb76b; font-size: 17px; font-weight: 400; line-height: 1.3; letter-spacing: 2.3px;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-app-version {
  color: #afc4c7; font-size: 13px; line-height: 1; transform: translateY(-3px);
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-app-version #app-version { position: static; }
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-view-mode {
  gap: 8px; margin-bottom: 10px; padding-bottom: 0; border: 0;
}
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-view-mode-label { color: #afc4c7; font-size: 14px; font-weight: 400; }
#dashboard-shell:is([data-results-sidebar="true"], [data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-report-mode-switch .personal-report-mode-button:disabled {
  color: #91a9ad; background: transparent;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host .section-label {
  margin: 24px 8px 18px; color: #e0ecec;
  font-size: 20px; font-weight: 600; letter-spacing: 1.3px; text-transform: none;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host .atr-parameter-search {
  gap: 4px; margin: 10px 8px; min-width: 0; color: #e5efef;
  font: 17px/22px system-ui, sans-serif;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host .atr-parameter-search input {
  width: 100%; min-width: 0; box-sizing: border-box; padding: 3px 6px; font: inherit;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host .atr-parameter-search input::placeholder {
  font: inherit;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list {
  margin-top: 0; padding-right: 0;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list button:not(.atr-mobile-parameter-info) {
  align-items: center; gap: 8px; min-height: 32px; margin-block: 1px; padding: 5px 10px;
  border-radius: 5px; color: #afc6ca; background: transparent;
  font: 17px/22px system-ui, sans-serif; text-align: left; overflow: visible;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list button:hover { background: #1c3b40; }
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list button.active {
  color: #e6c583; background: #283b34; box-shadow: inset 2px 0 #dbb76b; font-weight: 400;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list button::before { content: none; }
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list .atr-parameter-label {
  align-items: flex-start; flex-wrap: nowrap; gap: 0;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list .atr-parameter-name {
  white-space: normal; overflow-wrap: anywhere; hyphens: none;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list .atr-parameter-unit {
  color: #afc4c7; font-size: 14px; opacity: 1;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list .atr-parameter-group-title {
  margin: 10px 8px 4px; padding-top: 8px; border-top: 1px solid #285057;
  color: #e0ecec; font-size: 15px; font-weight: 600; line-height: 1.4;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list .atr-parameter-section > summary {
  margin-inline: 0; color: #e5efef; font-size: 15px; line-height: 20px;
}
#dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list button:focus-visible {
  outline: 2px solid #63bc86; outline-offset: 2px;
}
#dashboard-shell[data-results-sidebar="true"] .sidebar-results-empty { color: #afc4c7; font-size: 14px; }

/* At the existing drawer boundary, only the desktop columns change width.
   The range also covers fractional CSS widths caused by zoom. Desktop results
   and navigation share document scrolling; the footer keeps its flow space. */
@media (width > 950px) {
  #dashboard-shell[data-results-sidebar="true"] {
    grid-template-columns: 330px minmax(0, 1fr);
  }
  #dashboard-shell[data-results-sidebar="true"] > .sidebar {
    position: relative; top: auto; align-self: stretch;
    height: auto; max-height: none; overflow: visible;
  }
  #dashboard-shell[data-results-sidebar="true"] .sidebar-results-parameters {
    clip-path: inset(0 0 var(--results-sidebar-clip-bottom, 0px) 0);
  }
  #dashboard-shell[data-results-sidebar="true"] .sidebar-results-parameters,
  #dashboard-shell[data-results-sidebar="true"] #results-sidebar-host :is(.results-parameter-panel, .atr-parameter-disclosure, .atr-parameter-disclosure-content),
  #dashboard-shell[data-results-sidebar="true"] #results-sidebar-host .atr-parameter-disclosure::details-content,
  #dashboard-shell[data-results-sidebar="true"] #results-sidebar-host #result-parameter-list {
    flex: 0 0 auto; height: auto; max-height: none; overflow: visible;
    overscroll-behavior-y: auto;
  }
  /* Natural footer space lets the last item scroll above the separator. */
  #dashboard-shell[data-results-sidebar="true"] > .sidebar > .sidebar-footer {
    position: sticky; bottom: calc(15px + var(--sidebar-padding-bottom, 20px));
    z-index: 11; flex-shrink: 0; background: #0c2a30;
  }
}
/* Preserve the existing mobile drawer, including its scrollable list and close
   handlers. A width bounded by the viewport also fits zoomed/portrait windows. */
@media (max-width: 950px) {
  #dashboard-shell[data-results-sidebar="true"] > .sidebar {
    width: min(330px, calc(100vw - 28px)); left: -350px;
  }
  #dashboard-shell[data-results-sidebar="true"].menu-open > .sidebar { left: 0; }
}

/* The requested main-navigation pages use the same framed 330px sidebar.
   Their workspaces keep their existing scrolling and content composition. */
body:has(#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]):not([hidden])) {
  /* Contain the framed shell's vertical margins within the viewport-height body. */
  display: flow-root;
  background: #071f25;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) {
  height: calc(var(--app-available-height, 100dvh) - 28px); min-height: 0;
  margin: 14px; gap: 12px; background: #071f25;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar nav {
  gap: 3px; min-height: 0;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar .nav-item {
  min-height: 43px; padding: 10px; gap: 12px;
  border-radius: 5px; color: #afc6ca; font: 16px/1.4 system-ui, sans-serif;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar .nav-item:hover { background: #1c3b40; }
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar .nav-item.active {
  color: #e6c583; background: #283b34; box-shadow: inset 2px 0 #dbb76b;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-legal-link {
  margin: 0; padding: 10px; color: #afc4c7; font: 14px/1.4 system-ui, sans-serif;
}
#dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar :is(.nav-item, .sidebar-legal-link):focus-visible {
  outline: 2px solid #63bc86; outline-offset: 2px;
}
@media (width > 950px) {
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) {
    grid-template-columns: 330px minmax(0, 1fr);
  }
}
@media (max-width: 950px) {
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) > .sidebar {
    width: min(330px, calc(100vw - 28px)); left: -350px;
  }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]).menu-open > .sidebar { left: 0; }
}
/* Navigation must continue to fit in short/zoomed windows. Retain the existing
   two-column menu below 440px; compact spacing before reducing readable type. */
@media (max-height: 720px) {
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) > .sidebar { padding-block: 12px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand { margin-bottom: 12px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand-meta { margin-top: 8px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar .nav-item { min-height: 36px; padding: 6px 10px; }
}
@media (max-height: 540px) {
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-brand { margin-bottom: 8px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) #sidebar-license-tier { font-size: 14px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar .nav-item { gap: 6px; padding-inline: 6px; font-size: 14px; }
  #dashboard-shell:is([data-active-page="overview"], [data-active-page="setup"], [data-active-page="measure"], [data-active-page="analysis-report"], [data-active-page="patients"]) .sidebar-legal-link { min-height: 32px; padding-block: 6px; }
}

/* Overview keeps its imprint; subpages keep the existing back action. */
#dashboard-shell .sidebar-footer { margin-top: auto; }
#dashboard-shell .sidebar-footer [data-open-imprint] { display: none; }
#dashboard-shell[data-active-page="overview"] .sidebar-footer [data-open-imprint] { display: flex; }
#dashboard-shell .sidebar .sidebar-back {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px;
  border: 1px solid #36575d; border-radius: 5px;
  color: #c5d7d9; background: transparent; box-shadow: none;
  font: 16px/1.4 system-ui, sans-serif; text-align: left;
}
#dashboard-shell .sidebar .sidebar-back .topbar-back-label { display: inline; }
#dashboard-shell .sidebar .sidebar-back:hover:not(:disabled) { color: #e5efef; background: #1c3b40; }
#dashboard-shell .sidebar .sidebar-back:focus-visible { outline: 2px solid #63bc86; outline-offset: 2px; }
@media (max-height: 540px) {
  #dashboard-shell .sidebar .sidebar-back { min-height: 32px; padding-block: 5px; font-size: 14px; }
}

/* Use the actual hero width: the sidebar and browser zoom both reduce it.
   Text, metric values and quote each keep their own row in compact layouts. */
@container (max-width: 700px) {
  #dashboard-shell #page-overview .overview-hero-content {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding-bottom: 40px;
  }
  #dashboard-shell #page-overview .overview-welcome {
    grid-row: 1; grid-column: 1 / -1; width: 100%; max-width: none;
    padding: calc(var(--dashboard-overview-topbar-space) + 12px) 20px 0;
  }
  #dashboard-shell #page-overview .overview-hero-ari {
    position: static; grid-row: 2; transform: none; justify-self: start; font-size: 14px;
  }
  #dashboard-shell #page-overview #overview-hero-bpm { grid-column: 1; margin-left: 20px; }
  #dashboard-shell #page-overview #overview-hero-ari { grid-column: 2; }
  #dashboard-shell #page-overview .overview-quote {
    position: static; grid-row: auto; grid-column: 1 / -1; max-width: none;
    margin: 0 20px; font-size: .875rem;
  }
  #dashboard-shell #page-overview .overview-welcome-message { margin-top: 10px; }
  #dashboard-shell #page-overview .overview-quote br { display: none; }
}
