/* Institution identity. Clinical ranges retain their existing colors. */
.brandedPage {
  --bg: #f4f6fa;
  --ink: #1b2c45;
  --muted: #657387;
  --line: #e0e6ee;
  --soft: #f7f9fc;
  --blue: #174a8b;
  --teal: #237e89;
  --shadow: 0 8px 30px rgba(24, 47, 81, .045);
  background: var(--bg);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.institutionMasthead {
  color: #fff;
  background: #10428a;
}

.mastheadInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1424px;
  margin: 0 auto;
  padding: 26px 32px;
}

.institutionBrand {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.hospitalEmblem {
  display: flex;
  align-items: center;
  flex: 0 0 136px;
  height: 90px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  background: #fff;
}

.hospitalEmblem svg {
  display: block;
  width: 100%;
  height: 100%;
}

.institutionType {
  margin: 0 0 8px;
  color: #d6e4f7;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .035em;
}

.institutionName {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -.018em;
}

.brandNavigation {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brandNavigationInner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1424px;
  min-height: 68px;
  margin: 0 auto;
  padding: 12px 32px;
}

.departmentName {
  color: #294462;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.cabinetLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid #dce5f1;
  border-radius: 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .16s, border-color .16s;
}

.cabinetLink:hover {
  border-color: #b9cbe3;
  background: #f3f7fc;
}

.brandedPage a:focus-visible,
.brandedPage button:focus-visible {
  outline: 3px solid #83aedc;
  outline-offset: 4px;
}

.brandedPage .sectionKicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .12em;
}

/* Compact patient introduction; the doctor's workspace keeps its own header. */
.patientPage .institutionMasthead {
  border-top: 4px solid #173f70;
  border-bottom: 1px solid #dce4ed;
  color: #173451;
  background: #fff;
}

.patientPage .mastheadInner {
  width: min(1280px, calc(100% - 48px));
  gap: 28px;
  padding: 14px 0;
}

.patientPage .institutionBrand { gap: 18px; }
.patientPage .hospitalEmblem { flex-basis: 100px; height: 68px; padding: 2px; border: 0; border-radius: 0; }
.patientPage .institutionType { margin-bottom: 4px; color: #64748a; font-size: 13px; line-height: 1.4; letter-spacing: .015em; }
.patientPage .institutionName { color: #173451; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.mastheadActions { display: flex; align-items: center; gap: 26px; flex: 0 0 auto; }
.headerContactLink { padding: 12px 0; color: #465d73; font-size: 15px; font-weight: 500; text-decoration: none; }
.headerContactLink:hover { color: #143f70; text-decoration: underline; text-underline-offset: 5px; }
.patientPage .cabinetLink { gap: 11px; min-height: 46px; padding: 10px 16px; border-color: #cfdae8; border-radius: 8px; color: #183f6a; font-size: 15px; }
.cabinetLink svg { width: 20px; height: 20px; }

.patientPage .pageIntroduction {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 34px;
  width: min(1280px, calc(100% - 48px));
  margin: 20px auto;
  padding: 26px 30px;
  border: 1px solid #244e70;
  border-radius: 20px;
  background: radial-gradient(ellipse at 55% 100%, #20576a 0, transparent 70%), #12334e;
  box-shadow: 0 10px 26px rgba(20, 49, 75, .08);
}

.introductionCopy { min-width: 0; }
.patientPage .introductionCopy .sectionKicker {
  max-width: 490px;
  margin: 0 0 14px;
  color: #b4d9db;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .08em;
}

.patientPage .introductionCopy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3.35vw, 46px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.introductionCopy h1 span { color: #a5dfd8; }
.patientPage .introductionDescription { max-width: 680px; margin: 16px 0 0; color: #d4e2ec; font-size: 18px; line-height: 1.55; }
.patientPage .beginAssessment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 48px;
  margin-top: 22px;
  padding: 12px 21px;
  border: 1px solid #e1eeed;
  border-radius: 8px;
  background: #eff9f6;
  color: #143e53;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background .16s, transform .16s;
}

.beginAssessment svg { width: 22px; height: 22px; transition: transform .16s; }
.patientPage .beginAssessment:hover { background: #fff; }
.beginAssessment:hover svg { transform: translateX(3px); }
.patientPage .pageIntroduction a:focus-visible { outline-color: #b2e9e0; }
.patientPage .programSignature { min-width: 0; padding: 22px; border: 1px solid #fff; border-radius: 12px; background: #fff; }
.patientPage .programLogo { display: block; width: 244px; max-width: 100%; height: auto; margin: 0 0 16px; }
.patientPage .assessmentNotes p { margin: 0 0 10px; color: #52667b; font-size: 15px; line-height: 1.5; }
.patientPage .assessmentNotes .assessmentDisclaimer { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #dfe8ee; color: #586a7c; font-size: 14px; line-height: 1.5; }
.assessmentExplanation summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; color: #203e58; font-size: 16px; font-weight: 600; line-height: 1.4; list-style: none; cursor: pointer; }
.assessmentExplanation summary::-webkit-details-marker { display: none; }
.assessmentExplanation summary svg { flex: 0 0 18px; width: 18px; height: 18px; color: #4d7184; }
.assessmentExplanation[open] summary svg { transform: rotate(180deg); }
.patientPage .assessmentExplanation p { margin: 8px 0 4px; }
.assessmentExplanation summary:hover { color: #146572; }
.assessmentExplanation summary:focus-visible { outline: 3px solid #83aedc; outline-offset: 3px; border-radius: 3px; }

.patientPage .layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  width: min(1280px, calc(100% - 48px));
  max-width: 1280px;
  padding: 0 0 48px;
}

.brandedPage .panel,
.brandedPage .resultPanel {
  border-color: #dfe6ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.patientPage #assessmentForm {
  padding: 28px;
  scroll-margin-top: 24px;
}

.patientPage #assessmentForm > .patientSection:first-child { padding: 0; border: 0; border-radius: 0; }

.brandedPage .patientQuickPanel {
  gap: 20px;
  padding: 18px 20px;
  border-color: #dde7f1;
  border-radius: 9px;
  background: #f6f9fd;
}

.brandedPage .patientQuickPanel h3 { color: #284766; font-size: 18px; }
.brandedPage .patientQuickPanel p:not(.sectionKicker) { font-size: 14px; line-height: 1.5; }
.brandedPage .quickActionButton { box-shadow: none; border-radius: 6px; font-size: 14px; }
.brandedPage .quickActionButton.accent { background: var(--blue); color: #fff; }
.brandedPage .sectionHead h2 { color: #203f5e; font-size: 23px; letter-spacing: -.02em; }
.brandedPage .sectionNote { line-height: 1.65; }
.brandedPage .primary { background: var(--blue); box-shadow: 0 5px 14px rgba(23, 74, 139, .13); }
.brandedPage .primary:hover { background: #123c73; }
.brandedPage .resultPanel { padding: 22px; }
.brandedPage .resultPanel > h2 { margin: 0 0 10px; font-size: 23px; letter-spacing: -.02em; }
.brandedPage .resultPanel > .muted { font-size: 13px; line-height: 1.65; }
.brandedPage .channelBanner { border-color: #e0e8ed; box-shadow: none; background: #f8fbfc; }
.brandedPage .channelBanner .sectionKicker { margin-bottom: 4px; }
.brandedPage .sideChannelCard { margin-bottom: 28px; }
.brandedPage .miniLegend { font-size: 12px; }
.brandedPage .centerInfoCard,
.brandedPage .feedbackForm { border-color: #e0e7ef; box-shadow: none; }
.brandedPage .siteFooter { border-color: #dce4ed; background: #edf1f7; }
.brandedPage .siteFooterInner { max-width: 1424px; padding: 30px 32px; }
.brandedPage .siteFooter p { color: #415771; line-height: 1.65; }
.brandedPage .siteFooterLinks a { color: #5f7188; }

.brandedPage .centerInfoCard.contactCard {
  min-width: 0;
  padding: 22px 20px 18px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: linear-gradient(160deg, #fff 55%, #f6f8fc);
  scroll-margin-top: 24px;
}

.contactCard > .sectionKicker { margin-bottom: 5px; color: #67809a; }
.contactCard > h3 { margin: 0 0 5px; color: #203e60; font-size: 24px; font-weight: 600; letter-spacing: -.025em; }

.contactDetail {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid #e6ebf2;
}

.contactIcon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  margin-top: 1px;
  border: 1px solid #e3eaf4;
  border-radius: 9px;
  background: #f3f7fc;
  color: #3a6393;
}

.contactIcon svg { width: 19px; height: 19px; }
.contactContent { min-width: 0; }
.contactLabel { display: block; margin-bottom: 6px; color: #718096; font-size: 11px; font-weight: 500; line-height: 1.4; }
.contactAddress { margin: 0; color: #2b415c; font-size: 14px; font-style: normal; font-weight: 500; line-height: 1.6; }

.contactPhone {
  display: inline-block;
  padding: 2px 0 5px;
  color: #194b88;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}

.contactHours { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #687c93; font-size: 11px; line-height: 1.5; }
.contactHours svg { flex: 0 0 12px; width: 12px; height: 12px; }
.contactWebsite { display: inline-flex; align-items: center; gap: 13px; min-height: 28px; color: #194b88; font-size: 15px; font-weight: 600; text-decoration: none; }
.contactWebsite svg { width: 15px; height: 15px; color: #6884a7; transition: transform .15s; }
.contactWebsite:hover svg { transform: translate(2px, -2px); }
.contactPhone:hover, .contactWebsite:hover { color: #0f3262; text-decoration: underline; text-underline-offset: 4px; }

.contactVisitNote { display: grid; gap: 5px; padding: 14px 0 0; }
.contactVisitNote span { color: #7a8798; font-size: 11px; line-height: 1.5; }
.contactVisitNote strong { color: #4e627b; font-size: 12px; font-weight: 500; line-height: 1.5; }
.completionContacts { display: grid; grid-template-columns: 1fr 1.1fr .8fr; gap: 0 24px; }
.completionContacts > .sectionKicker, .completionContacts > h3, .completionContacts > .contactVisitNote { grid-column: 1 / -1; }

.doctorPage .doctorLayout.loginOnly {
  min-height: calc(100vh - 213px);
  padding: 46px 20px 64px;
}

.doctorPage .doctorLayout.loginOnly .doctorLogin {
  width: min(460px, 100%);
  padding: 38px 40px 30px;
  border-top: 3px solid #1d518f;
  box-shadow: 0 14px 50px rgba(25, 56, 92, .07);
}

.loginIdentity {
  padding-bottom: 26px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.loginIdentity img { display: block; width: 245px; max-width: 100%; height: auto; margin: 0 auto; }
.doctorPage .doctorLogin > .sectionKicker { text-align: center; }
.doctorPage .doctorLogin h1 { text-align: center; font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.doctorPage .loginForm { margin-top: 26px; gap: 18px; }
.doctorPage .loginForm label { font-size: 13px; font-weight: 600; }
.doctorPage .loginForm input { min-height: 46px; border-radius: 7px; }
.doctorPage .loginForm .primary { min-height: 46px; margin-top: 4px; }
.doctorPage .loginHelpButton { color: #61738b; font-size: 13px; font-weight: 500; }
.doctorPage .cabinetContextHeader { max-width: 1424px; margin: 0 auto; padding: 28px 32px 0; border: 0; box-shadow: none; background: transparent; }
.doctorPage .cabinetContextHeader h1 { font-size: 28px; }
.doctorPage .cabinetContextHeader .subtitle { font-size: 13px; }
.cabinetProgramLogo { display: block; width: 220px; height: auto; }

.doctorDocumentsButton {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 14px 18px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.doctorDocumentsButton svg { flex: 0 0 22px; width: 22px; height: 22px; }
.doctorDocumentsButton span:last-child { margin-left: auto; }
.doctorDocumentsButton:hover { background: #123c73; border-color: #123c73; }
.doctorDocumentsButton:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (min-width: 1600px) {
  .mastheadInner { padding-top: 32px; padding-bottom: 32px; }
}

@media (max-width: 1120px) {
  .mastheadInner { gap: 28px; }
  .institutionBrand { gap: 20px; }
  .hospitalEmblem { flex-basis: 112px; height: 78px; }
  .institutionName { font-size: 23px; }
  .patientPage .institutionName { font-size: 21px; }
  .patientPage .pageIntroduction { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; padding: 24px; }
  .patientPage .introductionCopy h1 { font-size: 38px; }
  .patientPage .headerContactLink { display: none; }
  .patientPage .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .patientPage #assessmentForm { padding: 24px; }
  .brandedPage .patientQuickPanel { grid-template-columns: 1fr; }
}

@media (max-width: 940px) {
  .patientPage .layout { grid-template-columns: 1fr; }
  .brandedPage .patientQuickPanel { grid-template-columns: minmax(0, 1fr) auto; }
  .patientPage .resultPanel { max-width: none; }
}

@media (max-width: 820px) {
  .completionContacts { grid-template-columns: 1fr; }
  .patientPage .mastheadInner { width: calc(100% - 40px); gap: 18px; }
  .patientPage .hospitalEmblem { flex-basis: 78px; height: 58px; }
  .patientPage .institutionBrand { gap: 12px; }
  .patientPage .institutionName { font-size: 18px; }
  .patientPage .institutionType { font-size: 12px; }
  .patientPage .cabinetLink { gap: 8px; padding: 10px 12px; font-size: 14px; }
  .patientPage .cabinetLink svg { display: none; }
  .patientPage .pageIntroduction { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 24px; }
  .patientPage .introductionCopy h1 { font-size: 40px; }
  .patientPage .introductionDescription { max-width: 620px; }
  .patientPage .programSignature { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: center; gap: 24px; padding: 20px; }
  .patientPage .programLogo { width: 180px; margin: 0; }
  .patientPage .layout { width: calc(100% - 40px); }
}

@media (max-width: 680px) {
  .mastheadInner { gap: 18px; padding: 20px; }
  .institutionBrand { gap: 14px; }
  .hospitalEmblem { flex-basis: 78px; height: 58px; padding: 7px; border-radius: 9px; }
  .institutionType { margin-bottom: 6px; font-size: 10px; letter-spacing: .015em; }
  .institutionName { font-size: 16px; line-height: 1.35; }
  .brandNavigationInner { gap: 16px; padding: 12px 20px; }
  .departmentName { max-width: 270px; font-size: 13px; }
  .cabinetLink { gap: 10px; min-height: 40px; padding: 8px 11px; font-size: 12px; }
  .patientPage .mastheadInner { width: calc(100% - 32px); flex-wrap: wrap; gap: 12px; padding: 12px 0; }
  .patientPage .institutionBrand { flex: 1 1 100%; gap: 12px; }
  .patientPage .hospitalEmblem { flex-basis: 66px; height: 50px; }
  .patientPage .institutionType { font-size: 11px; }
  .patientPage .institutionName { font-size: 17px; }
  .patientPage .mastheadActions { width: 100%; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 1px solid #e6ecf1; }
  .patientPage .headerContactLink { display: inline-flex; font-size: 14px; padding: 7px 0; }
  .patientPage .cabinetLink { min-height: 40px; padding: 8px 12px; }
  .patientPage .pageIntroduction { width: calc(100% - 24px); gap: 22px; margin: 14px auto; padding: 24px 20px 20px; border-radius: 14px; }
  .patientPage .introductionCopy .sectionKicker { margin-bottom: 12px; font-size: 12px; line-height: 1.5; letter-spacing: .06em; }
  .patientPage .introductionCopy h1 { font-size: clamp(29px, 6.2vw, 38px); line-height: 1.12; letter-spacing: -.035em; }
  .patientPage .introductionDescription { margin-top: 14px; font-size: 16px; line-height: 1.5; }
  .patientPage .beginAssessment { width: 100%; justify-content: space-between; min-height: 48px; margin-top: 18px; padding: 12px 17px; font-size: 16px; }
  .patientPage .programSignature { display: block; padding: 18px; border-radius: 9px; }
  .patientPage .programLogo { width: 210px; margin-bottom: 14px; }
  .patientPage .assessmentNotes p { font-size: 15px; }
  .patientPage .assessmentNotes .assessmentDisclaimer { font-size: 14px; }
  .patientPage .layout { width: calc(100% - 24px); gap: 14px; padding: 0 0 32px; }
  .patientPage #assessmentForm { padding: 20px 16px; }
  .brandedPage .patientQuickPanel { grid-template-columns: 1fr; padding: 16px; }
  .brandedPage .sectionHead h2 { font-size: 22px; }
  .brandedPage .siteFooterInner { padding: 26px 20px; }
  .doctorPage .doctorLayout.loginOnly { min-height: calc(100vh - 205px); padding: 30px 16px 44px; }
  .doctorPage .doctorLayout.loginOnly .doctorLogin { padding: 28px 24px; }
  .doctorPage .cabinetContextHeader { gap: 20px; padding: 26px 16px 0; }
  .doctorPage .cabinetContextHeader h1 { font-size: 24px; }
  .cabinetProgramLogo { width: 190px; }
}

@media (max-width: 420px) {
  .mastheadInner { gap: 14px; padding: 18px 16px; }
  .institutionBrand { gap: 11px; }
  .hospitalEmblem { flex-basis: 62px; height: 48px; padding: 5px; border-radius: 7px; }
  .institutionName { font-size: 14px; }
  .institutionType { font-size: 9px; }
  .brandNavigationInner { padding: 12px 16px; gap: 12px; }
  .departmentName { font-size: 12px; }
  .cabinetLink { gap: 6px; padding: 8px; font-size: 11px; }
  .patientPage .institutionType { font-size: 10px; }
  .patientPage .institutionName { font-size: 15px; }
  .patientPage .hospitalEmblem { flex-basis: 58px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .cabinetLink, .beginAssessment, .beginAssessment svg { transition: none; }
}
