/* Scoped to the health workspace; existing portal modules keep their styling. */
.hs-workspace {
  --hs-navy: #172c46;
  --hs-orange: #c86c32;
  --hs-muted: #697586;
  --hs-line: #dce2e8;
  color: var(--text, #203149);
  font-size: 14px;
  max-width: 1440px;
  margin: auto;
  padding-bottom: 90px;
}
.hs-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--hs-orange);
  text-transform: uppercase;
}
.hs-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin: 14px 0 24px;
}
.hs-heading h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin: 6px 0;
  color: var(--hs-navy);
}
.hs-heading p,
.hs-muted {
  color: var(--hs-muted);
  margin: 5px 0;
}
.hs-heading select {
  min-height: 46px;
  min-width: 260px;
  font-size: 15px;
}
.hs-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.hs-compliance {
  background: var(--card, #fff);
  border: 1px solid var(--hs-line);
  border-top: 3px solid var(--hs-navy);
  padding: 16px 12px;
  border-radius: 9px;
  min-width: 0;
}
.hs-compliance h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.hs-compliance time {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 5px;
}
.hs-compliance small {
  display: block;
  color: var(--hs-muted);
  font-size: 11px;
  margin-top: 7px;
}
.hs-pill {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: #fff1cf;
  color: #825400;
}
.hs-pill.on_file {
  background: #e1f2e8;
  color: #236243;
}
.hs-pill.overdue {
  background: #fbe3e1;
  color: #a02d30;
}
.hs-pill.not_required {
  background: #edf0f3;
  color: #626d7a;
}
.hs-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--hs-line);
  margin-bottom: 22px;
  overflow: auto;
}
.hs-tabs button {
  font: inherit;
  white-space: nowrap;
  border: 0;
  background: transparent;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--hs-muted);
  border-bottom: 3px solid transparent;
}
.hs-tabs button[aria-selected="true"] {
  color: var(--hs-navy);
  border-bottom-color: var(--hs-orange);
  font-weight: 700;
}
.hs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.hs-rail {
  position: sticky;
  top: 20px;
  background: var(--card, #fff);
  border: 1px solid var(--hs-line);
  border-radius: 10px;
  padding: 22px 16px;
}
.hs-rail > strong {
  font-size: 13px;
}
.hs-progress {
  height: 6px;
  background: #e7ebef;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 7px;
}
.hs-progress > i {
  display: block;
  height: 100%;
  background: var(--hs-orange);
}
.hs-rail nav {
  display: grid;
  gap: 4px;
  margin-top: 20px;
}
.hs-rail a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: var(--hs-navy);
  padding: 12px 4px;
  font-size: 12px;
  border-bottom: 1px solid #eef1f4;
}
.hs-rail a span {
  white-space: nowrap;
  color: var(--hs-muted);
}
.hs-card {
  background: var(--card, #fff);
  border: 1px solid var(--hs-line);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  scroll-margin-top: 22px;
}
.hs-card-head {
  padding: 21px 25px;
  border-bottom: 1px solid var(--hs-line);
  background: linear-gradient(110deg, #f7f9fb, #fff);
}
.hs-card-head h2 {
  font-size: 18px;
  color: var(--hs-navy);
  margin: 3px 0 0;
}
.hs-card-head small {
  color: var(--hs-muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.hs-card-body {
  padding: 24px;
}
.hs-question {
  padding: 22px 0;
  border-bottom: 1px solid var(--hs-line);
}
.hs-question:first-child {
  padding-top: 0;
}
.hs-question:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.hs-question h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
.hs-field {
  display: grid;
  gap: 8px;
  margin: 15px 0;
  font-size: 13px;
  font-weight: 600;
}
.hs-field input,
.hs-field textarea,
.hs-field select,
.hs-repeat input,
.hs-repeat select {
  width: 100%;
  font: inherit;
  font-weight: 400;
  background: var(--card, #fff);
  color: var(--text, #203149);
  padding: 12px 14px;
  border: 1px solid #cbd4de;
  border-radius: 7px;
  min-height: 46px;
}
.hs-field textarea {
  min-height: 115px;
  resize: vertical;
  line-height: 1.6;
}
.hs-field input:focus,
.hs-field textarea:focus,
.hs-field select:focus,
.hs-repeat input:focus {
  outline: 2px solid var(--hs-orange);
  outline-offset: 2px;
}
.hs-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.hs-segments button {
  font: inherit;
  padding: 12px 22px;
  min-height: 46px;
  border: 1px solid #cbd4de;
  border-radius: 7px;
  background: var(--card, #fff);
  color: var(--hs-navy);
  cursor: pointer;
}
.hs-segments button[aria-pressed="true"] {
  background: var(--hs-navy);
  color: white;
  border-color: var(--hs-navy);
  box-shadow: 0 2px 4px #172c461a;
}
.hs-segments.hs-risk button[data-value="yes"][aria-pressed="true"] {
  background: #a53136;
  border-color: #a53136;
}
.hs-detail {
  background: #f6f8fa;
  padding: 16px 20px;
  border-left: 3px solid #b7c6d5;
  border-radius: 0 8px 8px 0;
  margin: 14px 0 4px;
}
.hs-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  background: #f6f8fa;
  border-radius: 8px;
}
.hs-identity small {
  display: block;
  color: var(--hs-muted);
  margin-bottom: 5px;
  font-size: 11px;
}
.hs-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  background: #fff4df;
  border: 1px solid #ead9b5;
  border-radius: 9px;
  margin-bottom: 20px;
}
.hs-status.hs-final {
  background: #eaf5ef;
  border-color: #c6e1d0;
}
.hs-status small {
  display: block;
  margin-top: 4px;
  color: var(--hs-muted);
}
.hs-bottom {
  position: fixed;
  bottom: 0;
  left: var(--sw, 208px);
  right: 0;
  background: #fff;
  border-top: 1px solid var(--hs-line);
  box-shadow: 0 -5px 20px #172c4609;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
}
.hs-bottom .hs-muted {
  margin-right: auto;
  font-size: 12px;
}
.hs-workspace .btn {
  min-height: 42px;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 7px;
  cursor: pointer;
}
.hs-workspace .btn.bp {
  background: var(--hs-navy);
  color: white;
}
.hs-workspace .btn.hs-primary {
  background: var(--hs-orange);
  color: white;
  border-color: var(--hs-orange);
}
.hs-risk-panel {
  background: #fff5f3;
  border: 1px solid #e8b7b2;
  border-radius: 9px;
  padding: 20px;
  margin: 14px 0;
}
.hs-risk-panel h3 {
  color: #a12f33;
  margin: 0 0 10px;
  font-size: 17px;
}
.hs-repeat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  margin: 12px 0;
  background: #fff;
}
.hs-repeat label {
  font-size: 12px;
  display: grid;
  gap: 6px;
}
.hs-repeat .hs-remove {
  grid-column: 1/-1;
  justify-self: end;
}
.hs-check {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  font-size: 14px;
}
.hs-check input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.hs-signature {
  width: 100%;
  height: 160px;
  display: block;
  border: 1px dashed #8598ac;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}
.hs-signature-image {
  max-width: 100%;
  max-height: 160px;
  background: #fff;
}
.hs-missing {
  outline: 2px solid #bb353b !important;
  outline-offset: 3px;
  border-radius: 6px;
}
.hs-errors {
  padding: 18px 24px;
  border: 1px solid #cc5b60;
  background: #fff1f0;
  border-radius: 8px;
  margin: 20px 0;
  color: #92292d;
}
.hs-errors ul {
  margin: 10px 0 0;
  padding-left: 20px;
}
.hs-errors a {
  color: inherit;
}
.hs-log {
  margin: 26px 0;
  border-top: 1px solid var(--hs-line);
  padding: 20px 0;
}
.hs-log summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--hs-muted);
}
.hs-log pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  max-height: 500px;
  overflow: auto;
}
.hs-table-wrap {
  overflow: auto;
}
.hs-workspace table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.hs-workspace td,
.hs-workspace th {
  padding: 16px 12px;
  border-bottom: 1px solid var(--hs-line);
  text-align: left;
}
.hs-workspace th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hs-muted);
  background: #f6f8fa;
}
.hs-tracker-row {
  cursor: pointer;
}
.hs-tracker-row:hover {
  background: #f6f8fa;
}
.hs-tracker-row small {
  display: block;
  color: var(--hs-muted);
  margin-top: 8px;
}
.hs-history {
  margin-top: 25px;
}
.hs-history button {
  max-width: 100%;
  text-align: left;
}
.hs-error-text {
  color: #a02d30;
}
.hs-skeleton {
  height: 150px;
  background: linear-gradient(100deg, #edf1f5, #fafbfd, #edf1f5);
  border-radius: 10px;
  margin: 20px 0;
}
.hs-screening {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
}
.hs-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.hs-workspace [hidden] {
  display: none !important;
}
.hs-print-only {
  display: none;
}
.hs-note {
  padding: 14px 16px;
  background: #eef3f8;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0;
}
.hs-workspace button:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 1150px) {
  .hs-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hs-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
  }
}
@media (max-width: 760px) {
  .hs-heading {
    display: block;
  }
  .hs-heading h1 {
    font-size: 25px;
  }
  .hs-heading select {
    width: 100%;
    margin-top: 15px;
    min-width: 0;
  }
  .hs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hs-layout {
    display: block;
  }
  .hs-rail {
    position: static;
    margin-bottom: 20px;
  }
  .hs-rail nav {
    display: flex;
    overflow: auto;
    gap: 15px;
  }
  .hs-rail a {
    flex-shrink: 0;
    gap: 8px;
  }
  .hs-bottom {
    left: 0;
    padding: 12px;
    gap: 7px;
    flex-wrap: wrap;
  }
  .hs-bottom .hs-muted {
    display: none;
  }
  .hs-bottom .btn {
    flex: 1;
    white-space: nowrap;
    font-size: 12px;
    padding: 9px;
  }
  .hs-card-head,
  .hs-card-body {
    padding: 18px;
  }
  .hs-repeat,
  .hs-grid-two,
  .hs-screening {
    grid-template-columns: 1fr;
  }
  .hs-segments button {
    flex: 1;
    padding: 12px;
  }
  .hs-identity {
    gap: 16px 8px;
  }
  .hs-status {
    align-items: start;
    flex-direction: column;
  }
}
@media print {
  @page {
    size: letter;
    margin: 0.5in;
  }
  body.hs-printing > * {
    display: none !important;
  }
  body.hs-printing #hs-print-document {
    display: block !important;
    color: #172c46;
    font-family: Georgia, serif;
    font-size: 10pt;
  }
  #hs-print-document h1 {
    font-size: 18pt;
  }
  #hs-print-document h2 {
    font-size: 13pt;
    border-bottom: 1px solid #aab5bf;
    padding-bottom: 5px;
    margin-top: 18px;
  }
  #hs-print-document h3 {
    font-size: 10pt;
    margin-bottom: 4px;
  }
  #hs-print-document p {
    white-space: pre-wrap;
    margin: 3px 0 9px;
  }
  #hs-print-document section {
    break-inside: avoid;
  }
  #hs-print-document .hs-print-header {
    border-bottom: 2px solid #172c46;
    padding-bottom: 12px;
  }
  #hs-print-document .hs-print-draft {
    font-weight: bold;
    color: #a12f33;
    font-size: 16pt;
  }
  #hs-print-document img {
    max-height: 110px;
    max-width: 350px;
  }
  #hs-print-document footer {
    font-size: 9pt;
    margin-top: 20px;
  }
}
