:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #1a2b3b;
  background: #f4f7f9;
  font-size: 16px;
  line-height: 1.5;
  --teal: #087e80;
  --line: #e0e7ec;
  --muted: #637487;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--teal);
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #35b8bc;
  outline-offset: 3px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  background: #142938;
  color: #c2ced7;
  padding: 35px 23px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -1px;
  align-items: center;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: #26a6a4;
  border-radius: 10px;
  width: 39px;
  height: 39px;
  font-size: 32px;
  font-weight: 400;
  flex: none;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 1.05px;
  margin-top: 0;
  font-weight: 500;
  color: #b5cbd7;
}
.nav-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #90a8ba;
  margin: 49px 12px 17px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 7px;
  color: #c2ced7;
  text-decoration: none;
  font-size: 14px;
}
.sidebar nav a.active {
  background: #274453;
  color: #fff;
  box-shadow: inset 3px 0 #50cebf;
}
.sidebar nav small {
  margin-left: auto;
  font-size: 12px;
  color: #a8bfce;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid #344a58;
  padding: 23px 8px 0;
}
.scope {
  font-size: 14px;
  color: white;
}
.sidebar-bottom p {
  font-size: 13px;
  color: #a7bac7;
}
.version {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #94a9b7;
}
.workspace {
  margin-left: 246px;
}
.topbar {
  height: 77px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}
.topbar strong {
  font-weight: 500;
  color: #1d3444;
}
.topbar .muted {
  padding: 0 15px;
}
.top-badge {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 10px;
  color: #426075;
  font-size: 12px;
}
main {
  max-width: 1340px;
  margin: auto;
  padding: 39px 44px 60px;
  min-height: calc(100vh - 138px);
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 7px 0 10px;
  font-weight: 640;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  line-height: 1.35;
  margin: 0 0 10px;
}
h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: #538087;
  text-transform: uppercase;
}
.lead {
  color: var(--muted);
  margin: 0;
  max-width: 720px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 26px;
}
.count {
  font-size: 13px;
  white-space: nowrap;
  color: #677c8a;
}
.search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d7e1e8;
  border-radius: 9px;
  padding: 0 17px;
  margin: 28px 0 20px;
  box-shadow: 0 3px 7px #14293803;
  gap: 12px;
}
.search input {
  border: none;
  padding: 16px 0;
  width: 100%;
  outline: none;
  background: transparent;
}
.chips {
  display: flex;
  gap: 9px;
  margin: 0 0 28px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid #dce5eb;
  background: white;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #5c7182;
}
.chip.active {
  background: #e0f0ef;
  border-color: #a8d8d2;
  color: #076d69;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 15px;
}
.section-heading h2 {
  margin: 0;
  font-size: 18px;
}
.section-heading span {
  font-size: 13px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.card {
  display: flex;
  flex-direction: column;
  min-height: 215px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px #1633460c;
  border-color: #8ebdbd;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.icon {
  width: 39px;
  height: 39px;
  border-radius: 9px;
  background: #e8f5f2;
  color: #127c70;
  display: grid;
  place-items: center;
  font-size: 22px;
}
.icon.blue {
  background: #edf1fb;
  color: #4769a5;
}
.icon.purple {
  background: #f1edfa;
  color: #8463b2;
}
.pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f3f6f8;
  color: #587080;
}
.card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 3px 0 22px;
}
.card-end {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #69818d;
  border-top: 1px solid #eff2f5;
  padding-top: 12px;
}
.card-end b {
  font-weight: 500;
  color: var(--teal);
}
.notice {
  border: 1px solid #d4e2e8;
  border-radius: 8px;
  background: #eaf1f5;
  color: #4c6475;
  padding: 13px 17px;
  font-size: 13px;
  margin-top: 28px;
}
.notice.warn {
  background: #fff8e9;
  border-color: #ebd6a9;
  color: #795c23;
}
.back {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}
.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  gap: 23px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 25px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #edf1f4;
  padding-bottom: 17px;
  margin-bottom: 22px;
}
.panel-title h2 {
  font-size: 18px;
  margin: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: #40566a;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select {
  width: 100%;
  padding: 11px 12px;
  min-height: 47px;
  background: white;
  border: 1px solid #cedae3;
  border-radius: 6px;
  color: #233e51;
}
.field small {
  font-size: 12px;
  color: #647b8d;
}
.btn {
  background: #087e80;
  color: white;
  border: 1px solid #087e80;
  border-radius: 6px;
  padding: 11px 18px;
  font-weight: 550;
  font-size: 14px;
}
.btn.secondary {
  background: white;
  color: #446273;
  border-color: #ccdce4;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.result-panel {
  background: #153d47;
  color: #fff;
  position: sticky;
  top: 24px;
}
.result-panel h2 {
  font-size: 17px;
  color: #d2eceb;
}
.result-panel p {
  color: #bad4d6;
  font-size: 14px;
}
.result-label {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 11px;
  color: #a9cece;
}
.result-number {
  font-size: 42px;
  letter-spacing: -1.5px;
  margin: 10px 0;
}
.result-number small {
  font-size: 17px;
  letter-spacing: 0;
  font-weight: 400;
}
.result-row {
  padding: 12px 0;
  border-top: 1px solid #ffffff26;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 14px;
}
.result-row strong {
  font-weight: 550;
}
.error {
  color: #ffe2ad !important;
}
.refs {
  margin-top: 24px;
  font-size: 13px;
  color: #63778a;
}
.refs summary {
  cursor: pointer;
  font-weight: 600;
}
.refs p {
  margin: 9px 0;
}
.refs a {
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.checkrow {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  padding: 13px 0;
}
.checkrow input {
  margin-top: 5px;
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex: none;
}
.question {
  padding: 17px 0;
  border-bottom: 1px solid #e9eff3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.question p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.question fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 5px;
  flex: none;
}
.question label {
  cursor: pointer;
}
.question input {
  position: absolute;
  opacity: 0;
}
.question label span {
  display: block;
  border: 1px solid #d9e2e9;
  border-radius: 5px;
  padding: 7px 11px;
  font-size: 14px;
}
.question input:checked + span {
  background: #def2ef;
  border-color: #52a99d;
  color: #076a62;
}
.question input:focus-visible + span {
  outline: 3px solid #35b8bc;
}
.letter {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  display: inline-block;
  width: 21px;
}
.progress {
  height: 5px;
  background: #ffffff29;
  border-radius: 9px;
  overflow: hidden;
  margin: 18px 0;
}
.progress i {
  display: block;
  height: 100%;
  background: #5ed2be;
}
.flow-layout {
  display: grid;
  grid-template-columns: 235px 1fr;
  gap: 26px;
}
.steps {
  padding: 0;
  margin: 0;
  list-style: none;
}
.steps li {
  padding: 0 0 23px 28px;
  border-left: 2px solid #d8e3e8;
  position: relative;
  font-size: 14px;
  color: #718696;
}
.steps li:before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8e3e8;
  left: -6px;
  top: 5px;
}
.steps li.current {
  color: #087e80;
  font-weight: 650;
}
.steps li.current:before {
  background: #087e80;
  box-shadow: 0 0 0 4px #dff0ed;
}
.steps li.done {
  color: #344f62;
}
.flow-q {
  font-size: 23px;
  margin: 7px 0 17px;
}
.flow-body {
  color: #536c7b;
  line-height: 1.7;
}
.choices {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
.choice {
  padding: 15px 18px;
  border: 1px solid #d1e1e6;
  border-radius: 7px;
  background: #faffff;
  text-align: left;
  color: #234c56;
}
.choice:hover {
  border-color: #148c83;
  background: #eef9f6;
}
.flow-alert {
  background: #fff1ed;
  border-left: 3px solid #d06a4d;
  padding: 16px;
  color: #873f2c;
}
.flow-note {
  padding: 15px;
  background: #edf6f6;
  border-left: 3px solid #33978b;
  font-size: 14px;
  margin-top: 18px;
}
.empty {
  padding: 50px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  grid-column: 1/-1;
}
footer {
  border-top: 1px solid var(--line);
  padding: 18px 44px;
  color: #748897;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  background: white;
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
@media (min-width: 1450px) {
  main {
    padding-top: 48px;
  }
  .cards {
    gap: 22px;
  }
  .card {
    min-height: 230px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
    padding: 30px 15px;
  }
  .workspace {
    margin-left: 215px;
  }
  main {
    padding: 30px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tool-grid {
    grid-template-columns: 1fr;
  }
  .result-panel {
    position: static;
  }
  .flow-layout {
    grid-template-columns: 170px 1fr;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px 18px;
  }
  .brand {
    font-size: 25px;
  }
  .brand-sub {
    font-size: 8px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 18px;
    gap: 4px;
    overflow-x: auto;
  }
  .sidebar nav a {
    padding: 8px;
    font-size: 12px;
    white-space: nowrap;
    gap: 5px;
  }
  .sidebar nav small {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 53px;
    padding: 0 20px;
    font-size: 12px;
  }
  main {
    padding: 25px 20px 35px;
  }
  h1 {
    font-size: 28px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .count {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 180px;
  }
  .card-top {
    margin-bottom: 13px;
  }
  .card p {
    margin-bottom: 14px;
  }
  .panel {
    padding: 20px;
  }
  .form-grid {
    gap: 14px;
  }
  .flow-layout {
    grid-template-columns: 1fr;
  }
  .steps {
    display: flex;
    gap: 12px;
    overflow-x: auto;
  }
  .steps li {
    padding: 0 0 8px;
    border: 0;
    min-width: 100px;
    font-size: 12px;
  }
  .steps li:before {
    display: none;
  }
  .question {
    gap: 8px;
  }
  .question fieldset {
    gap: 3px;
  }
  .question label span {
    padding: 7px 8px;
  }
  .question strong {
    font-size: 14px;
  }
  footer {
    padding: 17px 20px;
    display: block;
  }
  footer span {
    display: block;
    margin-top: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.brand {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  align-items: flex-start;
}
.brand-sub {
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.brand-icon {
  margin-top: 3px;
}
@media (max-width: 700px) {
  .brand {
    font-size: 19px;
  }
  .brand-sub {
    font-size: 9px;
  }
}

.brand {
  font-size: 27px;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  display: grid;
  place-items: center;
  line-height: 1;
  margin: 0;
  width: 40px;
  height: 40px;
  background: #169b79;
}
.brand-icon svg {
  display: block;
}
.brand-sub {
  font-size: 9px;
  letter-spacing: 0.5px;
  margin-top: 3px;
}
.sidebar {
  overflow-y: auto;
}
.sidebar-bottom {
  padding-top: 18px;
}
.area-nav {
  border-left: 1px solid #415766;
  margin: 0 0 12px 24px;
  padding: 2px 0 2px 9px;
}
.sidebar nav .area-nav a {
  font-size: 13px;
  padding: 7px 9px;
  gap: 8px;
  line-height: 1.4;
}
.sidebar nav .area-nav a.selected {
  background: #244b50;
  color: #a1f0db;
}
.area-caption {
  font-size: 12px;
  letter-spacing: 1.2px;
  color: #5c7886;
  margin-bottom: 12px;
}
.area-filters {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.area-filters[hidden] {
  display: none;
}
.area-filters .chip small {
  margin-left: 7px;
  opacity: 0.65;
}
.area-filters .chips {
  margin-bottom: 18px;
}
@media (max-width: 700px) {
  .sidebar nav {
    display: block;
    overflow: visible;
  }
  .sidebar nav > a {
    display: flex;
    font-size: 14px;
  }
  .sidebar nav small {
    display: inline;
  }
  .area-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 15px;
  }
  .sidebar nav .area-nav a {
    white-space: normal;
    font-size: 13px;
  }
  .brand {
    font-size: 27px;
  }
}

.brand {
  align-items: center;
  min-height: 40px;
}
.brand-wordmark {
  display: flex;
  align-items: center;
  line-height: 1;
  height: 40px;
}
.sidebar > .brand-sub {
  margin: 8px 0 0 0;
  letter-spacing: 1px;
  font-size: 10px;
  color: #b5cbd7;
  line-height: 1.5;
}

.score-scope {
  font-size: 14px;
  color: #586e7d;
  margin: 0 0 20px;
}
.score-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 38%);
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid #e4ebef;
  align-items: center;
}
.score-field > label {
  display: flex;
  gap: 12px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.5;
}
.score-index {
  color: #638c92;
  font-size: 12px;
  padding-top: 3px;
}
.score-field label small {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: #62798a;
  margin-top: 5px;
}
.score-field select {
  width: 100%;
  min-height: 45px;
  padding: 10px 9px;
  border: 1px solid #cbd9e2;
  border-radius: 6px;
  font-size: 14px;
  color: #234255;
  background: white;
}
.score-classification {
  padding: 13px 15px;
  border-radius: 7px;
  background: #ffffff16;
  font-size: 17px;
  font-weight: 550;
}
.score-classification.moderate {
  background: #ffe9b3;
  color: #604718;
}
.score-classification.high {
  background: #ffe0d8;
  color: #7e3424;
}
.score-danger {
  background: #ffe0d8;
  color: #7e3424;
  border-radius: 7px;
  padding: 14px;
}
.score-danger p {
  color: #7e3424;
}
.score-breakdown {
  margin-top: 23px;
  font-size: 13px;
}
.score-breakdown summary {
  cursor: pointer;
  color: #c3e5df;
  margin-bottom: 14px;
}
.score-breakdown .result-row {
  font-size: 12px;
}
.card .pill {
  max-width: 70%;
  text-align: right;
}
@media (max-width: 700px) {
  .score-field {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .score-field select {
    font-size: 16px;
  }
  .score-field > label {
    font-size: 16px;
  }
}
.flow-body p {
  margin: 0 0 12px;
}
.flow-body p:last-child {
  margin-bottom: 0;
}
.info {
  margin: 14px 0;
  border: 1px solid #dce7eb;
  border-radius: 7px;
  background: #f8fbfc;
}
.info summary {
  cursor: pointer;
  padding: 11px 13px;
  font-weight: 600;
  color: #24666c;
}
.info p {
  padding: 0 13px 13px;
  margin: 0;
  font-size: 14px;
}
.clinical-list {
  display: grid;
  gap: 9px;
}
.clinical-list p {
  padding: 10px 12px;
  margin: 0;
  background: #f7fafb;
  border-radius: 6px;
}
.mini-tree {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 15px 0;
}
.mini-tree p {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 11px 12px;
  background: #f7fafb;
  border-left: 3px solid #5ea8a0;
  border-radius: 4px;
}
.mini-tree span {
  font-size: 13px;
  color: #657987;
}
.clinical-warning {
  padding: 11px 13px;
  background: #fff8e9;
  border-left: 3px solid #d49a2b;
  color: #73561f;
}
@media (max-width: 700px) {
  .mini-tree {
    grid-template-columns: 1fr;
  }
}
/* Compact clinical navigation and progressive flow interaction. */
.area-filters {
  padding: 0;
  border: 0;
  margin: 0 0 20px;
}
.area-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: #536c7b;
}
.area-picker select {
  min-width: 230px;
  max-width: 100%;
  padding: 11px 36px 11px 14px;
  border: 1px solid #cddfe3;
  border-radius: 10px;
  background: white;
  color: #234c56;
}
.flow-panel {
  border-radius: 18px;
  box-shadow: 0 12px 40px #14293808;
  min-width: 0;
  animation: flow-forward 0.28s ease-out;
}
.flow-panel.backward {
  animation-name: flow-backward;
}
.flow-panel:focus {
  outline: none;
}
.flow-panel .choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  border-radius: 12px;
  background: #fff;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
}
.flow-panel .choice:hover {
  background: #edf8f6;
  border-color: #169b79;
  transform: translateX(4px);
  box-shadow: 0 4px 14px #087e8010;
}
.flow-panel .choice:active {
  transform: scale(0.985);
}
.flow-panel .choice span {
  transition: transform 0.18s;
}
.flow-panel .choice:hover span {
  transform: translateX(4px);
}
.flow-panel .flow-q {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.steps li.current:before {
  transition: background 0.2s;
}
.info[open] {
  animation: details-in 0.2s ease-out;
}
.cards .tool-card {
  animation: details-in 0.22s ease-out;
}
@keyframes flow-forward {
  from {
    opacity: 0;
    transform: translateY(12px) translateX(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes flow-backward {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes details-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 700px) {
  .sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar nav > a {
    font-size: 14px;
    padding: 9px;
  }
  .area-picker {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .area-picker select {
    width: 100%;
    min-width: 0;
  }
  .flow-panel .flow-q {
    font-size: 23px;
  }
  .flow-panel .choice:hover {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-panel,
  .info[open],
  .cards .tool-card {
    animation: none;
  }
  .flow-panel .choice,
  .flow-panel .choice span {
    transition: none;
  }
  .flow-panel .choice:hover,
  .flow-panel .choice:active,
  .flow-panel .choice:hover span {
    transform: none;
  }
}

/* Layout sem barra superior. */
main {
  min-height: calc(100vh - 61px);
  padding-top: 44px;
}
@media (max-width: 700px) {
  main {
    padding-top: 28px;
  }
}
.flow-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -8px 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.urgent-btn {
  background: #a84232;
  border-color: #a84232;
}
.source-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e8f1f7;
  color: #315d75;
  font-size: 11px;
  font-weight: 650;
}
.multi-options {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
}
.multi-options legend {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.multi-options label {
  cursor: pointer;
}
.multi-options input {
  position: absolute;
  opacity: 0;
}
.multi-options label span {
  display: block;
  border: 1px solid #d1e1e6;
  border-radius: 11px;
  padding: 14px 16px;
  background: #fff;
  transition: 0.18s;
}
.multi-options input:checked + span {
  background: #e5f5f1;
  border-color: #169b79;
  color: #075f54;
  box-shadow: inset 3px 0 #169b79;
}
.multi-options input:focus-visible + span {
  outline: 3px solid #35b8bc;
}
.multi-options .btn {
  margin-top: 8px;
  justify-self: start;
}
.table-scroll {
  overflow-x: auto;
  margin: 4px 0 16px;
}
.drug-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
  font-size: 13px;
}
.drug-table th,
.drug-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px;
  border-bottom: 1px solid #dfe8ec;
}
.drug-table th {
  color: #31525f;
  background: #f2f7f8;
}
.drug-table td:first-child {
  font-weight: 650;
  color: #244a53;
}
@media (max-width: 700px) {
  .flow-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .flow-tools .btn {
    width: 100%;
    text-align: left;
  }
  .multi-options .btn {
    width: 100%;
  }
}
/* Consultation flow: compact phase, stable actions and contextual tools. */
.flow-shell {
  max-width: 920px;
  margin: auto;
}
.flow-phase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  color: #087e80;
  font-weight: 650;
}
.text-button {
  border: 0;
  background: transparent;
  color: #365f70;
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
}
.flow-shell .flow-tools {
  margin: 0 0 18px;
  border: 0;
  padding: 0;
}
.flow-shell .flow-panel {
  animation: details-in 0.18s ease-out;
}
.flow-panel .choice:hover,
.flow-panel .choice:active,
.flow-panel .choice:hover span {
  transform: none;
}
.flow-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 0;
  background: #fff;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  z-index: 1;
}
.flow-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(820px, 100%);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  border: 0;
  padding: 28px;
  box-shadow: -12px 0 40px #14293822;
  color: #1a2b3b;
}
.flow-dialog::backdrop {
  background: #14293880;
}
.flow-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.flow-dialog .clinical-list strong,
.flow-body .clinical-list strong {
  display: block;
}
.flow-dialog .clinical-list small {
  display: block;
  margin-bottom: 5px;
}
.multi-options label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d1e1e6;
  border-radius: 10px;
}
.multi-options input {
  position: static;
  opacity: 1;
  width: 20px;
  height: 20px;
  accent-color: #087e80;
  flex: none;
}
.multi-options label span {
  border: 0;
  padding: 0;
  background: none !important;
  box-shadow: none !important;
}
.multi-options label:has(input:checked) {
  background: #e5f5f1;
  border-color: #087e80;
}
.multi-options input:focus-visible + span {
  outline: none;
}
.multi-options label:focus-within {
  outline: 3px solid #35b8bc;
  outline-offset: 2px;
}
#multi-error {
  color: #a84232;
}
.page-heading h1 {
  font-size: 28px;
}
.flow-body {
  font-size: 16px;
}
.source-badge,
.eyebrow {
  font-size: 12px;
}
@media (max-width: 700px) {
  .flow-shell .flow-tools {
    display: flex;
    gap: 6px;
  }
  .flow-shell .flow-tools .btn {
    width: auto;
    font-size: 14px;
    padding: 9px;
  }
  .flow-dialog {
    padding: 20px;
  }
  .flow-dialog .table-scroll {
    overflow: visible;
  }
  .flow-dialog .drug-table {
    min-width: 0;
  }
  .drug-table thead {
    display: none;
  }
  .drug-table tbody,
  .drug-table tr,
  .drug-table td {
    display: block;
  }
  .drug-table tr {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
  }
  .drug-table td {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
  }
  .drug-table td:before {
    content: attr(data-label);
    font-weight: 600;
  }
  .flow-phase {
    gap: 10px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .flow-actions {
    bottom: 0;
  }
  .flow-panel .flow-q {
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-shell .flow-panel {
    animation: none;
  }
}
.catalog-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 24px 0 18px;
}
.catalog-toolbar .search {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.catalog-toolbar .area-filters {
  margin: 0;
}
.catalog-toolbar .area-picker {
  gap: 8px;
}
.catalog-toolbar .area-picker select {
  min-width: 180px;
}
@media (max-width: 900px) {
  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .catalog-toolbar .area-picker {
    flex-direction: row;
    align-items: center;
  }
  .catalog-toolbar .area-picker select {
    flex: 1;
    width: auto;
  }
}
/* Explicit flow button states; disabled controls never inherit hover feedback. */
:is(.flow-shell, .flow-dialog) button {
  transition:
    background-color 0.16s,
    border-color 0.16s,
    color 0.16s,
    box-shadow 0.16s;
}
:is(.flow-shell, .flow-dialog) .btn:not(.secondary):not(.urgent-btn):enabled:hover {
  background: #06696b;
  border-color: #06696b;
}
:is(.flow-shell, .flow-dialog) .btn:not(.secondary):not(.urgent-btn):enabled:active {
  background: #045456;
  border-color: #045456;
  box-shadow: inset 0 2px 3px #0002;
}
:is(.flow-shell, .flow-dialog) .btn.secondary:enabled:hover {
  background: #edf6f5;
  border-color: #238c82;
  color: #145b55;
}
:is(.flow-shell, .flow-dialog) .btn.secondary:enabled:active {
  background: #d5ebe7;
  border-color: #146a60;
  color: #104d46;
  box-shadow: inset 0 2px 3px #0001;
}
:is(.flow-shell, .flow-dialog) .urgent-btn:enabled:hover {
  background: #903628;
  border-color: #903628;
}
:is(.flow-shell, .flow-dialog) .urgent-btn:enabled:active {
  background: #772b21;
  border-color: #772b21;
  box-shadow: inset 0 2px 3px #0002;
}
:is(.flow-shell, .flow-dialog) .text-button:enabled:hover {
  background: #edf3f5;
  color: #174b60;
  border-radius: 6px;
}
:is(.flow-shell, .flow-dialog) .text-button:enabled:active {
  background: #dce8ed;
  color: #103e50;
}
.flow-shell .choice:enabled:hover {
  background: #edf8f6;
  border-color: #169b79;
  box-shadow: 0 2px 8px #087e8010;
}
.flow-shell .choice:enabled:active {
  background: #d5ebe7;
  border-color: #146a60;
  box-shadow: inset 0 2px 3px #0001;
}
:is(.flow-shell, .flow-dialog) button:focus-visible {
  outline: 3px solid #168982;
  outline-offset: 3px;
}
:is(.flow-shell, .flow-dialog) button:disabled,
:is(.flow-shell, .flow-dialog) button:disabled:hover,
:is(.flow-shell, .flow-dialog) button:disabled:active {
  background: #edf0f2;
  color: #78858e;
  border-color: #dce2e6;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  :is(.flow-shell, .flow-dialog) button {
    transition: none;
  }
}
.thyroid-form {
  margin-top: 18px;
}
.thyroid-form select {
  min-width: 0;
}
.thyroid-result {
  margin-top: 16px;
}
.clinical-status {
  padding: 12px 15px;
  margin: 12px 0;
  border-radius: 8px;
  border-left: 4px solid;
  font-weight: 600;
}
.clinical-status.mgf {
  background: #e8f5ef;
  color: #176249;
}
.clinical-status.review {
  background: #fff5db;
  color: #755416;
}
.clinical-status.refer {
  background: #eaf2ff;
  color: #28568a;
}
.clinical-status.urgent {
  background: #ffebe7;
  color: #9b3528;
}
@media (max-width: 600px) {
  .thyroid-form .form-grid {
    grid-template-columns: 1fr;
  }
}
/* Compact tool cards without hiding descriptions. */
.cards {
  gap: 12px;
}
.cards .card {
  min-height: 0;
  padding: 16px;
  border-radius: 10px;
}
.cards .card-top {
  margin-bottom: 10px;
}
.cards .icon {
  width: 32px;
  height: 32px;
  font-size: 19px;
  border-radius: 7px;
}
.cards .card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.cards .card p {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 12px;
}
.cards .card-end {
  padding-top: 9px;
  gap: 10px;
}
.sidebar nav a > span {
  min-width: 0;
}
.sidebar nav small {
  flex: none;
}
.mmse-group {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}
.mmse-group p {
  color: #536c7b;
  font-size: 15px;
  line-height: 1.6;
}
.mmse-figure {
  width: 100%;
  max-width: 380px;
  height: auto;
  background: white;
  margin: 12px 0;
}
.mmse-group h3 {
  font-size: 18px;
}
.mmse-answer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.mmse-answer button {
  width: 48px;
  height: 44px;
  border: 1px solid #cbd9e2;
  border-radius: 8px;
  background: #fff;
  color: #536c7b;
  font-size: 23px;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.mmse-answer button[data-response='yes']:hover {
  background: #e4f5eb;
  border-color: #258451;
}
.mmse-answer button[data-response='no']:hover {
  background: #fff0ed;
  border-color: #ad4537;
}
.mmse-answer button[data-response='yes'][aria-pressed='true'] {
  background: #176b44;
  border-color: #176b44;
  color: white;
}
.mmse-answer button[data-response='no'][aria-pressed='true'] {
  background: #a33e32;
  border-color: #a33e32;
  color: white;
}
.mmse-answer button:active {
  box-shadow: inset 0 2px 4px #0003;
}
.mmse-answer button:disabled {
  background: #edf0f2;
  color: #78858e;
  border-color: #dce2e6;
  cursor: not-allowed;
}
.mmse-answer button:focus-visible {
  outline: 3px solid #168982;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .mmse-answer {
    justify-content: flex-start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mmse-answer button {
    transition: none;
  }
}
.scale-question {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0 22px;
  margin: 0 0 20px;
  min-width: 0;
}
.scale-question legend {
  font-size: 16px;
  font-weight: 600;
  padding: 0;
  margin-bottom: 10px;
}
.scale-question label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  margin: 5px 0;
  border: 1px solid #dce5eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}
.scale-question input[type='radio'] {
  accent-color: #087e80;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 3px 0 0;
}
.scale-question label:has(input:checked) {
  background: #e5f5f1;
  border-color: #087e80;
  color: #17584e;
}
.scale-question label:hover {
  border-color: #087e80;
}
.scale-question label:focus-within {
  outline: 2px solid #168982;
  outline-offset: 2px;
}

/* Shared interaction states; response appearance is independent of score weight. */
button {
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}
.btn:not(.secondary):not(.urgent-btn):enabled:hover {
  background: #06686a;
  border-color: #06686a;
}
.btn:not(.secondary):not(.urgent-btn):enabled:active {
  background: #045456;
  border-color: #045456;
  box-shadow: inset 0 2px 4px #0003;
}
.btn.secondary:enabled:hover,
.text-button:enabled:hover {
  background: #eaf4f2;
  color: #165c53;
  border-color: #61998e;
}
.btn.secondary:enabled:active,
.text-button:enabled:active {
  background: #d5ebe7;
  color: #104d46;
  box-shadow: inset 0 2px 4px #0002;
}
.chip:enabled:hover {
  background: #edf8f6;
  border-color: #168982;
}
.chip.active,
.chip[aria-pressed='true'] {
  background: #176b60;
  border-color: #176b60;
  color: #fff;
}
.chip:enabled:active {
  box-shadow: inset 0 2px 4px #0003;
}
.mmse-answer button[aria-pressed='false'] {
  background: #fff;
  border-color: #b7c8d2;
  color: #536c7b;
  box-shadow: none;
}
.mmse-answer button[data-response='yes']:enabled:hover {
  background: #e4f5eb;
  border-color: #258451;
}
.mmse-answer button[data-response='no']:enabled:hover {
  background: #fff0ed;
  border-color: #ad4537;
}
.mmse-answer button[data-response='yes'][aria-pressed='true'] {
  background: #176b44;
  border-color: #176b44;
  color: #fff;
  box-shadow: 0 0 0 2px #176b4430;
}
.mmse-answer button[data-response='no'][aria-pressed='true'] {
  background: #a33e32;
  border-color: #a33e32;
  color: #fff;
  box-shadow: 0 0 0 2px #a33e3230;
}
.mmse-answer button:enabled:active {
  box-shadow: inset 0 2px 4px #0004;
}
.question label:hover span {
  border-color: #168982;
  background: #edf8f6;
}
.question input:checked + span {
  background: #176b60;
  border-color: #176b60;
  color: #fff;
  font-weight: 650;
}
.scale-question label:has(input:checked),
.multi-options label:has(input:checked) {
  background: #d9eee8;
  border-color: #176b60;
  box-shadow: inset 3px 0 #176b60;
}
.sidebar nav a:not(.active):hover {
  background: #203d4b;
  color: #fff;
}
button:disabled,
button:disabled:hover,
button:disabled:active,
.mmse-answer button:disabled[aria-pressed],
.mmse-answer button:disabled[aria-pressed]:hover {
  background: #edf0f2;
  color: #78858e;
  border-color: #dce2e6;
  opacity: 1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.question label:has(input:disabled) span,
.scale-question label:has(input:disabled),
.multi-options label:has(input:disabled) {
  background: #edf0f2;
  color: #78858e;
  border-color: #dce2e6;
  cursor: not-allowed;
  box-shadow: none;
}

.brand-tagline {
  margin: 10px 0 0;
  color: #b5cbd7;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
}

.catalog-toolbar {
  flex-wrap: wrap;
  align-items: flex-end;
}
.catalog-toolbar .search {
  flex: 1 1 280px;
}
.catalog-toolbar .area-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 100%;
  margin: 0;
}
.catalog-toolbar .area-picker {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  font-size: 12px;
}
.catalog-toolbar .area-picker select {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}

#cards.grouped-catalog {
  display: block;
}
.catalog-area + .catalog-area {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #d4dfe6;
}
.catalog-area-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.catalog-area-heading h2 {
  font-size: 18px;
  color: #234c56;
  margin: 0;
}
.catalog-area-heading > span {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.tool-card {
  position: relative;
  min-width: 0;
}
.tool-card .card {
  height: 100%;
}
.tool-card .card-top {
  padding-right: 38px;
}
.favorite-toggle {
  position: absolute;
  right: 15px;
  top: 15px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd9e2;
  border-radius: 8px;
  background: #fff;
  color: #536c7b;
  font-size: 24px;
}
.favorite-toggle:hover {
  background: #fff5d6;
  border-color: #a57b18;
}
.favorite-toggle[aria-pressed='true'] {
  background: #fff0ba;
  border-color: #a57b18;
  color: #805900;
}
.favorite-toggle:active {
  box-shadow: inset 0 2px 4px #0002;
}
.favorite-toggle.favorite-unavailable,
.favorite-toggle.favorite-unavailable:hover,
.favorite-toggle.favorite-unavailable:active {
  background: #f7f9fa;
  border-color: #d9e1e6;
  color: #9aaab3;
  box-shadow: none;
  pointer-events: none;
}
.overview-section {
  margin: 28px 0;
}
.overview-section > h2 {
  margin-bottom: 14px;
}
.overview-empty {
  padding: 24px;
  background: white;
  border: 1px dashed #cbd9e2;
  border-radius: 10px;
  color: var(--muted);
}
.local-preferences-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 30px;
}

/* The wrapper moves the card and favorite control as one unit. */
.tool-card {
  transition: transform 0.15s ease;
}
.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-2px);
}
.tool-card .card,
.tool-card .card:hover {
  transform: none;
}
.tool-card:hover .card,
.tool-card:focus-within .card {
  box-shadow: 0 7px 20px #1633460c;
  border-color: #8ebdbd;
}
@media (prefers-reduced-motion: reduce) {
  .tool-card:hover,
  .tool-card:focus-within {
    transform: none;
  }
}

.favorite-toggle {
  padding: 0;
  line-height: 1;
}
.favorite-toggle svg {
  display: block;
  flex: none;
}

.icon svg {
  display: block;
  width: 24px;
  height: 24px;
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
}
.nav-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.af-help {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.af-score > .field {
  max-width: 240px;
}
.af-score [data-af-result] {
  margin-top: 18px;
  padding: 16px;
  border-radius: 10px;
  background: #eaf4f2;
}
.af-score .score-field {
  gap: 16px;
}
.flow-body .checkrow {
  align-items: flex-start;
}
#renal-form input[type='radio'] {
  appearance: auto;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: none;
  accent-color: var(--teal);
  vertical-align: middle;
}
#renal-form fieldset.field > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 18px;
  cursor: pointer;
}

.cg-sex-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.cg-sex-options .btn[aria-pressed='true'] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 2px #087e8026;
}
.cg-sex-options .btn:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px #087e8026;
}
.cg-sex-options .btn:active {
  transform: translateY(1px);
}
/* Referral workspace: source criteria and the clinical draft are independent. */
.ref-shell {
  animation: ref-enter 0.2s ease-out;
}
.ref-heading {
  margin-bottom: 24px;
}
.ref-population {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
}
.ref-population small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.ref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ref-specialty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
  min-width: 0;
}
.ref-specialty:hover {
  border-color: #55988e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px #1429380c;
}
.ref-specialty:active {
  transform: translateY(0);
  background: #edf6f3;
}
.ref-specialty h3 {
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}
.ref-specialty p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ref-specialty .ref-specialty-summary {
  -webkit-line-clamp: 2;
  line-height: 1.45;
}
.ref-specialty .ref-specialty-match {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  -webkit-line-clamp: 2;
}
.ref-specialty > span:last-child {
  font-size: 12px;
  color: var(--teal);
  margin-top: auto;
}
.ref-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.ref-source-note {
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 32px;
  line-height: 1.7;
}
.ref-source-note strong {
  font-weight: 500;
}
.ref-source-note a {
  white-space: nowrap;
}
.ref-disclosure {
  margin: 20px 0;
}
.ref-disclosure > summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  color: #264c56;
}
.ref-disclosure > summary:hover {
  color: var(--teal);
}
.ref-disclosure > summary:focus-visible {
  outline: 3px solid #35b8bc;
  outline-offset: 3px;
}
.ref-disclosure[open] > summary {
  margin-bottom: 14px;
}
.ref-criteria .ref-section-title {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ref-section-title h2 {
  margin: 3px 0 0;
}
.ref-kicker {
  display: block;
  color: #53716d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ref-section-title > a {
  font-size: 12px;
  white-space: nowrap;
}
.ref-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  padding: 5px 9px;
  background: #eef1f4;
  color: #5b6c78;
  margin-bottom: 12px;
}
.ref-badge.red {
  background: #ffebe7;
  color: #962f23;
}
.ref-badge.orange {
  background: #fff0df;
  color: #985216;
}
.ref-badge.yellow {
  background: #fff6d4;
  color: #73570d;
}
.ref-badge.green {
  background: #e3f3eb;
  color: #216244;
}
.ref-criteria-list {
  margin: 16px 0 0;
  padding-left: 22px;
}
.ref-criteria-copy {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.7;
}
.ref-criteria-copy > span {
  white-space: pre-wrap;
}
.ref-item {
  margin: 10px 0 10px calc(min(var(--indent), 3) * 10px);
  font-size: 14px;
  line-height: 1.65;
}
.ref-item::marker {
  color: var(--teal);
}
.ref-item > span {
  white-space: pre-wrap;
}
.ref-item > .ref-badge {
  margin: 8px 0 0;
}
.ref-exclusion {
  background: #f6f1ed;
  border-left: 3px solid #ac7750;
  padding: 14px;
  border-radius: 4px;
}
.ref-negative-label {
  display: block;
  margin-bottom: 8px;
  color: #785032;
  font-size: 12px;
}
.ref-alternative {
  background: #ecf5f5;
  border-left: 3px solid #438f86;
  border-radius: 5px;
  padding: 14px;
  margin: 15px 0;
  font-size: 13px;
}
.ref-alternative p {
  margin: 6px 0;
}
.ref-alternative a {
  display: inline-block;
  margin: 4px 10px 4px 0;
}
.ref-page-links > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0;
}
.ref-page-links strong {
  flex-basis: 100%;
  font-size: 13px;
}
.ref-page-links a {
  text-decoration: none;
}
.ref-source-page img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 20px;
  border: 1px solid var(--line);
}
.ref-verbatim {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.ref-context {
  margin-top: 24px;
}
.ref-context > a {
  font-size: 13px;
}
.ref-alert {
  border: 1px solid #e8a496;
  border-left: 4px solid #bd4232;
  border-radius: 8px;
  background: #fff0eb;
  color: #873326;
  padding: 16px;
  margin-top: 16px;
  font-size: 14px;
}
.ref-alert a {
  color: #873326;
}
.ref-alert p:last-child {
  margin-bottom: 0;
}
.ref-topic-grid {
  margin: 20px 0 28px;
}
.ref-list-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
}
.ref-list-heading h2 {
  margin: 3px 0 0;
}
.ref-list-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.ref-criterion-card {
  min-height: 165px;
}
.ref-criterion-card > .ref-badge {
  order: -1;
  margin: 0;
}
.ref-criterion-card > p {
  -webkit-line-clamp: 3;
}
.ref-shell .btn {
  text-decoration: none;
  display: inline-block;
}
.ref-shell input,
.ref-shell select {
  min-width: 0;
}
.ref-shell select {
  max-width: 100%;
}
@keyframes ref-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1100px) {
  .ref-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .ref-population small {
    flex-basis: 100%;
    margin: 6px 0 0;
  }
  .ref-item {
    margin-left: 0;
  }
  .ref-criteria .ref-section-title {
    display: block;
  }
  .ref-list-heading {
    display: block;
  }
  .ref-list-heading p {
    margin-top: 8px;
  }
  .ref-criterion-card {
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ref-shell {
    animation: none;
  }
}
.ref-item {
  font-size: 16px;
}

.ref-item {
  --indent: 0;
  overflow-wrap: anywhere;
}
.ref-priority-heading {
  margin: 22px 0 8px;
}
.ref-priority-heading .ref-badge {
  margin: 0;
  font-size: 14px;
}
.ref-specialty h3 {
  font-size: 16px;
}
.ref-heading {
  margin-bottom: 16px;
}
.ref-scope {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.ref-detail-actions {
  margin-bottom: 18px;
}
.ref-context-label {
  color: var(--muted);
}

/* Keep logo and navigation spacing independent of optional captions. */
.sidebar > .brand {
  flex: 0 0 auto;
  min-height: 40px;
}
.sidebar > nav {
  margin-top: 40px;
  flex: 0 0 auto;
}
@media (max-width: 700px) {
  .sidebar > nav {
    margin-top: 20px;
  }
}
.ref-specialty-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.ref-specialty-heading h3 {
  flex: 1;
  min-width: 0;
}
.ref-specialty-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #17796e;
  background: #e8f5f1;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.ref-specialty-icon svg {
  display: block;
  width: 24px;
  height: 24px;
}
.ref-specialty:hover .ref-specialty-icon {
  background: #d8eee7;
  color: #105e55;
}
.ref-specialty:active .ref-specialty-icon {
  background: #c5e4d9;
}
@media (prefers-reduced-motion: reduce) {
  .ref-specialty-icon {
    transition: none;
  }
}
