@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --navy-950: #061a2d;
  --navy-900: #0c2a43;
  --navy-800: #184668;
  --navy-700: #24608a;
  --cyan-600: #0b9aa7;
  --cyan-500: #31b6c2;
  --mint-100: #ecfbfb;
  --slate-700: #3d6079;
  --slate-500: #6786a0;
  --line: #c8dcec;
  --line-strong: #9bbcd3;
  --surface: #ffffff;
  --surface-soft: #f6fbff;
  --glass: rgba(255, 255, 255, 0.78);
  --shadow-lg: 0 24px 58px rgba(8, 38, 61, 0.16);
  --shadow-md: 0 16px 36px rgba(8, 38, 61, 0.12);
  --shadow-sm: 0 8px 20px rgba(8, 38, 61, 0.1);
  --radius-xl: 1.28rem;
  --radius-lg: 0.95rem;
  --radius-md: 0.72rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--navy-900);
  font-family: 'Source Sans 3', sans-serif;
  background: linear-gradient(180deg, #edf4fb 0%, #f5faff 100%);
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}

/* Home Page */

body.home-page {
  overflow-x: hidden;
}

.portal-shell {
  width: min(1560px, calc(100% - 1.4rem));
  margin: 0 auto;
  padding-bottom: 2rem;
}

.portal-head {
  padding: 1.6rem 0 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.branding {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  height: 3.2rem;
  width: auto;
  display: block;
}

.branding > div h1 {
  font-size: 1.1rem;
}

.branding > div p {
  margin: 0.12rem 0 0;
  font-size: 0.89rem;
  color: var(--slate-700);
}

.head-link {
  text-decoration: none;
  padding: 0.5rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--glass);
  backdrop-filter: blur(6px);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

.hero-grid {
  margin-top: 0.3rem;
  display: grid;
  grid-template-columns: 1.36fr 0.88fr;
  gap: 0.9rem;
}

.hero-primary,
.hero-secondary {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

.hero-primary {
  padding: clamp(1.2rem, 2.8vw, 2rem);
  background:
    linear-gradient(135deg, rgba(11, 154, 167, 0.11) 0%, rgba(35, 104, 170, 0.1) 70%),
    var(--surface);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(153, 188, 211, 0.84);
  padding: 0.24rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--navy-800);
}

.hero-primary h2 {
  margin-top: 0.66rem;
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.13;
  max-width: 16ch;
}

.hero-primary p {
  margin: 0.82rem 0 0;
  font-size: 1rem;
  color: var(--slate-700);
  max-width: 62ch;
}

.hero-buttons {
  margin-top: 1.05rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.62rem 0.94rem;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-600), #1d6db0);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(29, 109, 176, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.82);
  border-color: var(--line-strong);
  color: var(--navy-800);
}

.hero-stats {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.56rem;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.58rem 0.66rem;
}

.hero-stat strong {
  display: block;
  font-size: 1.45rem;
}

.hero-stat span {
  font-size: 0.82rem;
  color: var(--slate-700);
}

.hero-secondary {
  padding: clamp(1rem, 2.4vw, 1.55rem);
  background: linear-gradient(180deg, #f5faff 0%, #eef6ff 100%);
}

.hero-secondary h3 {
  font-size: 1.02rem;
  color: var(--navy-800);
}

.hero-secondary ul {
  margin: 0.74rem 0 0;
  padding-left: 1rem;
  color: var(--slate-700);
  display: grid;
  gap: 0.48rem;
  line-height: 1.38;
}

.signal-card {
  margin-top: 0.95rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 0.82rem;
  padding: 0.62rem 0.72rem;
  box-shadow: var(--shadow-sm);
}

.signal-label {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signal-value {
  margin: 0.2rem 0 0;
  font-weight: 700;
  color: var(--navy-800);
}

.signal-contact {
  margin: 0.22rem 0 0;
  color: var(--slate-700);
  font-size: 0.84rem;
}

.focus-strip {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.focus-card {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  padding: 0.78rem 0.82rem;
}

.focus-card h3 {
  font-size: 0.98rem;
  color: var(--navy-800);
}

.focus-card p {
  margin: 0.45rem 0 0;
  font-size: 0.91rem;
  color: var(--slate-700);
  line-height: 1.45;
}

.tools-panel {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--glass);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-md);
  padding: 0.82rem;
}

.search-line {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  flex-wrap: wrap;
}

.search {
  flex: 1;
  min-width: 250px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0.8rem;
  padding: 0 0.65rem;
  display: flex;
  align-items: center;
}

.search-icon {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--navy-900);
  font: inherit;
  padding: 0.78rem 0.52rem;
}

.result-note {
  margin: 0;
  color: var(--slate-700);
  font-size: 0.9rem;
  font-weight: 700;
}

.chip-row {
  margin-top: 0.72rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.filter-chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.42rem 0.73rem;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--navy-800);
  cursor: pointer;
  transition: all 140ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  background: linear-gradient(135deg, rgba(11, 154, 167, 0.18), rgba(29, 109, 176, 0.2));
  border-color: #78a7c9;
}

.module-grid {
  margin: 1rem 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.86rem;
}

.module-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: box-shadow 170ms ease, border-color 170ms ease;
}

.module-card::before {
  content: '';
  position: absolute;
  inset: -28% auto auto -18%;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(49, 182, 194, 0.18) 0%, rgba(49, 182, 194, 0) 72%);
  pointer-events: none;
}

.module-card:hover {
  border-color: #7aabcb;
  box-shadow: 0 20px 44px rgba(8, 38, 61, 0.18);
}

.module-card[data-hidden='true'] {
  display: none;
}

.module-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.module-code {
  border-radius: 999px;
  background: var(--mint-100);
  color: #0f6c76;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.24rem 0.52rem;
}

.module-pill {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.54rem;
}

.pill-provider {
  background: #eaf2ff;
  color: #0f5196;
}

.pill-patient {
  background: #e7f7ec;
  color: #1f6d45;
}

.pill-clinical {
  background: #eceeff;
  color: #41459b;
}

.pill-operations {
  background: #fff3de;
  color: #805a00;
}

.pill-pharmacy {
  background: #fdebf0;
  color: #98364f;
}

.module-card h3 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.module-card p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.5;
}

.module-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.48rem;
  color: var(--slate-500);
  font-size: 0.8rem;
  font-weight: 700;
}

.module-actions {
  margin-top: auto;
  display: flex;
  gap: 0.44rem;
  flex-wrap: wrap;
}

.module-help {
  margin: 0 0 1.35rem;
  color: var(--slate-700);
  font-size: 0.9rem;
  text-align: center;
}

.module-help code {
  border: 1px solid var(--line);
  border-radius: 0.38rem;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.05rem 0.24rem;
  font-family: 'Sora', sans-serif;
}
/* SOP Module Pages */

.sop-shell {
  width: min(1540px, calc(100% - 1.4rem));
  margin: 1rem auto 1.8rem;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0.9rem;
}

.sop-nav {
  position: sticky;
  top: 0.8rem;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.sop-nav-head {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(11, 154, 167, 0.12), rgba(30, 103, 184, 0.12)),
    #f6fbff;
}

.sop-nav-head p {
  margin: 0.4rem 0 0;
  color: var(--slate-700);
  font-size: 0.84rem;
  line-height: 1.4;
}

.sop-nav-list {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  display: grid;
  gap: 0.36rem;
}

.sop-nav-list a {
  display: block;
  text-decoration: none;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  padding: 0.47rem 0.58rem;
  color: var(--slate-700);
  font-size: 0.89rem;
  font-weight: 700;
}

.sop-nav-list a:hover,
.sop-nav-list a.is-active {
  background: #edf6ff;
  border-color: #97bfdc;
  color: var(--navy-800);
}

.sop-main {
  display: grid;
  gap: 0.75rem;
}

.sop-hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: clamp(1rem, 2.4vw, 1.7rem);
}

.sop-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sop-hero h1 {
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  line-height: 1.2;
}

.sop-hero p {
  margin: 0.55rem 0 0;
  color: var(--slate-700);
}

.sop-chip-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.sop-chip {
  border-radius: 100px;
  padding: 0.22rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--slate-700);
  background: #f3f8fc;
}

.sop-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.sop-section h2 {
  font-size: 1.05rem;
}

.sop-section h3 {
  margin-top: 0.95rem;
  color: var(--navy-800);
  font-size: 0.94rem;
}

.sop-section p,
.sop-section li {
  margin-top: 0.45rem;
  color: var(--slate-700);
  line-height: 1.54;
}

.sop-section ul,
.sop-section ol {
  margin: 0.25rem 0 0;
  padding-left: 1.13rem;
}

.role-table,
.feature-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.68rem;
  font-size: 0.92rem;
}

.role-table th,
.role-table td,
.feature-table th,
.feature-table td {
  border: 1px solid #c8dcec;
  padding: 0.54rem 0.58rem;
  text-align: left;
  vertical-align: top;
}

.role-table th,
.feature-table th {
  background: #ecf4fc;
  color: var(--navy-800);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.77rem;
}

.callout {
  margin-top: 0.65rem;
  border-radius: 0.75rem;
  padding: 0.62rem 0.72rem;
  font-size: 0.9rem;
}

.callout-success {
  background: #e6f7ef;
  border: 1px solid #b8e3cc;
  color: #1f6f47;
}

.callout-warn {
  background: #fff4dc;
  border: 1px solid #efd9a3;
  color: #7f5a00;
}

.sop-footer {
  margin-top: 0.2rem;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Reveal Animation */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 360ms ease, transform 360ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .sop-shell {
    grid-template-columns: 1fr;
  }

  .sop-nav {
    position: static;
  }
}

@media (max-width: 760px) {
  .portal-shell {
    width: min(1180px, calc(100% - 1.1rem));
  }

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

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

  .module-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .sop-nav,
  .sop-hero .btn {
    display: none;
  }

  .sop-shell {
    width: 100%;
    margin: 0;
    display: block;
  }

  .sop-hero,
  .sop-section {
    box-shadow: none;
    border: 0;
    padding: 0;
    background: #ffffff;
  }

  .sop-section {
    margin-top: 1rem;
  }
}

/* Module Page Enhancements */

body.sop-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(11, 154, 167, 0.14) 0%, rgba(11, 154, 167, 0) 35%),
    radial-gradient(circle at 96% 8%, rgba(24, 95, 156, 0.12) 0%, rgba(24, 95, 156, 0) 34%),
    linear-gradient(180deg, #eff6fc 0%, #f8fbff 100%);
}

.sop-shell {
  position: relative;
}

.sop-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 75, 118, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 75, 118, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 62%);
}

.sop-nav {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(7px);
}

.sop-hero {
  background:
    linear-gradient(130deg, rgba(11, 154, 167, 0.08) 0%, rgba(30, 103, 184, 0.08) 70%),
    #ffffff;
}

.sop-company-strip {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
  padding: 0.6rem 0.72rem;
  font-size: 0.82rem;
  color: var(--slate-700);
}

.sop-company-strip .company-slogan {
  grid-column: 1 / -1;
  font-weight: 700;
  color: var(--navy-800);
}

.sop-toolbar {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  padding: 0.42rem 0.56rem;
}

.sop-toolbar-main {
  display: grid;
  gap: 0.2rem;
}

.sop-read-row {
  display: grid;
  gap: 0.2rem;
}

.sop-read-label {
  margin: 0;
  font-size: 0.76rem;
  color: var(--slate-700);
}

.sop-read-track {
  height: 0.34rem;
  border-radius: 999px;
  background: #e2edf6;
  overflow: hidden;
}

.sop-read-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b9aa7, #1d6db0);
  transition: width 180ms ease;
}

.sop-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toolbar-btn {
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: #ffffff;
  color: var(--navy-800);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.66rem;
  cursor: pointer;
}

.sop-section {
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sop-section:hover {
  border-color: #8eb8d8;
  box-shadow: 0 18px 36px rgba(8, 38, 61, 0.14);
}

.section-toggle {
  margin-top: 0.44rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  background: #ffffff;
  color: var(--navy-800);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.28rem 0.58rem;
  cursor: pointer;
}

.sop-section.is-collapsed > :not(h2):not(.section-toggle) {
  display: none;
}

@media (max-width: 760px) {
  .sop-company-strip {
    grid-template-columns: 1fr;
  }

  .sop-toolbar-actions {
    flex-direction: column;
  }
}

@media print {
  .sop-toolbar,
  .section-toggle {
    display: none !important;
  }

  .sop-company-strip {
    border: 0;
    padding: 0;
    margin-top: 0.3rem;
  }
}


/* Clinical Forms + Company Split */

.clinical-split {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 0.9rem;
  align-items: start;
}

.forms-panel,
.company-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.split-head h3 {
  margin-top: 0.62rem;
  font-size: 1.2rem;
  color: var(--navy-900);
}

.split-head p {
  margin: 0.55rem 0 0;
  color: var(--slate-700);
  line-height: 1.48;
}

.forms-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.68rem;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-card h4 {
  margin: 0;
  font-size: 0.93rem;
  color: var(--navy-800);
}

.form-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--slate-700);
  line-height: 1.42;
}

.form-card .btn {
  margin-top: auto;
}

.company-panel h3 {
  margin-top: 0.62rem;
  font-size: 1.22rem;
  color: var(--navy-900);
}

.company-panel > p {
  margin: 0.58rem 0 0;
  color: var(--slate-700);
  line-height: 1.48;
}

.company-highlights {
  margin-top: 0.78rem;
  display: grid;
  gap: 0.48rem;
}

.company-contact-grid {
  margin-top: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #f7fbff;
  padding: 0.66rem 0.7rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--slate-700);
}

.company-contact-grid p {
  margin: 0;
  overflow-wrap: anywhere;
}

.company-contact-grid a {
  color: var(--navy-700);
  font-weight: 700;
}

.service-strip {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.56rem;
}

.service-item {
  border: 1px solid var(--line);
  border-radius: 0.78rem;
  background: #ffffff;
  padding: 0.58rem 0.62rem;
}

.service-item h4 {
  margin: 0;
  font-size: 0.87rem;
  color: var(--navy-800);
}

.service-item p {
  margin: 0.34rem 0 0;
  font-size: 0.82rem;
  color: var(--slate-700);
  line-height: 1.4;
}

@media (max-width: 1180px) {
  .clinical-split {
    grid-template-columns: 1fr;
  }

  .forms-grid,
  .service-strip {
    grid-template-columns: 1fr;
  }
}
/* Mobile Optimization Overrides */

.portal-shell {
  width: min(1760px, calc(100% - 1rem));
}

.sop-shell {
  width: min(1720px, calc(100% - 1rem));
}

.signal-contact {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 900px) {
  .portal-shell {
    width: calc(100% - 0.75rem);
  }

  .portal-head {
    gap: 0.6rem;
  }

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

  .hero-primary h2 {
    font-size: clamp(1.35rem, 6.5vw, 1.95rem);
    max-width: none;
  }

  .hero-primary p {
    max-width: none;
    font-size: 0.97rem;
  }

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

  .focus-strip {
    grid-template-columns: 1fr;
  }

  .search {
    min-width: 0;
  }

  .result-note {
    width: 100%;
    font-size: 0.84rem;
  }

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

  .module-actions .btn {
    width: 100%;
  }
  .form-card .btn {
    width: 100%;
  }

  .module-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
  }

  .sop-shell {
    width: calc(100% - 0.75rem);
    grid-template-columns: 1fr;
  }

  .sop-nav {
    position: static;
  }

  .sop-hero-top > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .sop-hero-top > div:last-child .btn {
    flex: 1 1 100%;
  }

  .sop-company-strip {
    grid-template-columns: 1fr;
    font-size: 0.8rem;
  }

  .sop-company-strip span {
    overflow-wrap: anywhere;
  }

  .sop-section {
    overflow-x: auto;
  }

  .role-table,
  .feature-table {
    min-width: 560px;
  }

  .sop-toolbar-actions {
    flex-direction: column;
  }

  .toolbar-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .portal-head {
    padding-top: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    height: 2.45rem;
  }

  .branding > div h1 {
    font-size: 0.98rem;
  }

  .branding > div p {
    font-size: 0.8rem;
  }

  .head-link {
    width: 100%;
    text-align: center;
  }

  .hero-primary,
  .hero-secondary,
  .tools-panel,
  .module-card {
    border-radius: 0.84rem;
  }

  .btn {
    font-size: 0.85rem;
    padding: 0.58rem 0.74rem;
  }

  .filter-chip {
    font-size: 0.77rem;
    padding: 0.36rem 0.56rem;
  }

  .search input {
    padding: 0.7rem 0.45rem;
  }

  .sop-section {
    padding: 0.82rem;
  }

  .sop-chip {
    font-size: 0.71rem;
  }
}

/* Sticky Reading Progress Toolbar */
body.sop-page .sop-toolbar {
  position: sticky;
  top: calc(0.65rem + env(safe-area-inset-top, 0px));
  z-index: 25;
  margin-top: 0.3rem;
}

@media (max-width: 760px) {
  body.sop-page .sop-toolbar {
    top: calc(0.55rem + env(safe-area-inset-top, 0px));
  }
}

@media print {
  body.sop-page .sop-toolbar {
    position: static;
    margin-top: 0;
  }
}



/* Vertical Side Panels On Wide Screens */
@media (min-width: 1600px) {
  .portal-shell {
    width: min(2300px, calc(100% - 1.2rem));
    display: grid;
    grid-template-columns: clamp(300px, 22vw, 430px) minmax(940px, 1fr) clamp(300px, 22vw, 430px);
    gap: 0.95rem;
    align-items: start;
  }

  .portal-head,
  .hero-grid,
  .focus-strip,
  .tools-panel,
  .module-grid,
  .module-help {
    grid-column: 2;
  }

  .clinical-split {
    display: contents;
  }

  .forms-panel {
    grid-column: 1;
    grid-row: 2 / span 10;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1rem);
    overflow: auto;
  }

  .company-panel {
    grid-column: 3;
    grid-row: 2 / span 10;
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 1rem);
    overflow: auto;
  }

  .split-head h3,
  .company-panel h3 {
    font-size: 1.03rem;
  }

  .split-head p,
  .company-panel > p,
  .company-contact-grid,
  .service-item p {
    font-size: 0.81rem;
    line-height: 1.35;
  }

  .forms-grid {
    margin-top: 0.62rem;
    grid-template-columns: 1fr;
    gap: 0.44rem;
  }

  .form-card {
    padding: 0.52rem 0.56rem;
    border-radius: 0.7rem;
    gap: 0.3rem;
  }

  .form-card h4 {
    font-size: 0.83rem;
  }

  .form-card p {
    font-size: 0.78rem;
    line-height: 1.28;
  }

  .form-card .btn {
    align-self: flex-start;
    width: auto;
    font-size: 0.75rem;
    padding: 0.34rem 0.58rem;
    box-shadow: none;
  }

  .service-strip {
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .service-item {
    padding: 0.48rem 0.52rem;
  }
}
