.medical-detail {
  color: #182629;
  background: #fff;
  font-family: "Noto Sans HK", sans-serif;
}

/* Canonical heading scale shared by every standalone guide page. */
.medical-detail .md-hero h1 {
  font-size: clamp(42px, 3.7vw, 52px) !important;
  line-height: 1.12 !important;
}
@media (max-width: 600px) {
  .medical-detail .md-hero h1 {
    font-size: 38px !important;
    white-space: normal !important;
  }
}
.medical-detail * {
  box-sizing: border-box;
}
.md-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: auto;
}
.md-hero {
  padding: 54px 0 48px;
  background: linear-gradient(120deg, #f1fbfa, #fff 68%);
  border-bottom: 1px solid #dce9e7;
}
.md-hero .md-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 52px;
  align-items: center;
}
.md-breadcrumb {
  margin-bottom: 30px;
  color: #6c7b7e;
  font-size: 15px;
}
.md-breadcrumb a {
  color: #007f7d;
  font-weight: 700;
}
.md-kicker,
.md-section small {
  display: block;
  color: #008f8d;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.md-hero h1 {
  margin: 10px 0 18px;
  font-size: clamp(42px, 4.5vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.md-hero p {
  margin: 0;
  color: #34484c;
  font-size: 19px;
  line-height: 1.85;
}
.md-updated {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 12px;
  border-left: 3px solid #18aaa6;
  background: #fff;
  font-size: 14px;
  color: #536467;
}
.md-hero img {
  display: block;
  width: 100%;
  max-height: 370px;
  object-fit: contain;
}
.md-layout {
  position: relative;
  padding: 58px 0 88px;
}
.md-toc {
  position: sticky;
  top: 96px;
  float: right;
  width: 220px;
  margin-left: 44px;
  padding: 20px 18px;
  border-left: 2px solid #b9dfdc;
  background: rgba(255, 255, 255, 0.96);
}
.md-toc b {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
}
.md-toc a {
  display: block;
  padding: 6px 0;
  color: #007f7d;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.md-main {
  max-width: 820px;
}
.md-section {
  scroll-margin-top: 112px;
  padding: 54px 0;
  border-bottom: 1px solid #dce9e7;
}
.md-section:first-child {
  padding-top: 0;
}
.md-section h2 {
  margin: 8px 0 15px;
  font-size: 36px;
  line-height: 1.3;
}
.md-section > p {
  color: #34484c;
  font-size: 18px;
  line-height: 1.85;
}
.md-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border-top: 3px solid #12aaa5;
}
.md-fact {
  padding: 20px 18px 18px 0;
  border-bottom: 1px solid #dce9e7;
}
.md-fact b {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}
.md-fact strong {
  display: block;
  color: #007f7d;
  font-size: 21px;
  line-height: 1.4;
}
.md-fact span {
  display: block;
  margin-top: 5px;
  color: #485d61;
  font-size: 16px;
  line-height: 1.65;
}
.md-steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 26px;
  border-top: 3px solid #12aaa5;
}
.md-step {
  position: relative;
  padding: 22px 24px 22px 52px;
  border-bottom: 1px solid #dce9e7;
  counter-increment: step;
}
.md-step:before {
  content: counter(step);
  position: absolute;
  left: 10px;
  top: 22px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #009895;
  color: #fff;
  font-weight: 800;
}
.md-step b {
  display: block;
  font-size: 18px;
}
.md-step p {
  margin: 6px 0 0;
  color: #405458;
  font-size: 16px;
  line-height: 1.75;
}
.md-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid #b9dfdc;
}
.md-list li {
  padding: 14px 4px 14px 28px;
  border-bottom: 1px solid #dce9e7;
  color: #34484c;
  font-size: 17px;
  line-height: 1.75;
  position: relative;
}
.md-list li:before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: #008f8d;
  font-weight: 900;
}
.md-note {
  margin-top: 26px;
  padding: 24px 26px;
  border-left: 4px solid #16aaa6;
  background: #f2faf9;
}
.md-note h3 {
  margin: 0 0 9px;
  font-size: 22px;
}
.md-note p,
.md-note li {
  font-size: 17px;
  line-height: 1.75;
  color: #34484c;
}
.md-note ul {
  margin: 0;
  padding-left: 21px;
}
.md-faq details {
  padding: 18px 0;
  border-bottom: 1px solid #dce9e7;
}
.md-faq summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
}
.md-faq p {
  margin: 10px 0 0;
  color: #405458;
  font-size: 17px;
  line-height: 1.75;
}
.md-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}
.md-actions a {
  padding: 12px 17px;
  border: 1px solid #63bbb7;
  color: #007f7d;
  font-weight: 800;
  text-decoration: none;
}
.md-actions a:first-child {
  background: #008f8d;
  color: #fff;
}
.md-clear {
  clear: both;
}
.medical-detail footer {
  margin-top: 0;
}
.md-other {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.md-other a {
  padding: 18px;
  border: 1px solid #cfe3e1;
  color: #153b3d;
  font-weight: 800;
  text-decoration: none;
}
.md-other span {
  display: block;
  margin-top: 5px;
  color: #617477;
  font-size: 14px;
  font-weight: 500;
}
.md-table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: 16px;
}
.md-table th,
.md-table td {
  padding: 14px;
  border-bottom: 1px solid #dce9e7;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
.md-table th {
  background: #f1f8f7;
  font-weight: 800;
}
.md-table strong {
  color: #007f7d;
}
.subsidised-fee-table {
  margin-top: 0;
  table-layout: fixed;
}
.subsidised-fee-table th:first-child,
.subsidised-fee-table td:first-child {
  width: 58%;
}
.subsidised-fee-table th:last-child,
.subsidised-fee-table td:last-child {
  width: 42%;
}
.subsidised-fee-table td:first-child {
  color: #173f45;
  font-weight: 750;
}
.subsidised-fee-table th,
.subsidised-fee-table td {
  padding: 13px 18px;
  vertical-align: middle;
}
.md-source {
  font-size: 14px !important;
  color: #66777a !important;
}
.md-source a {
  color: #007f7d;
  font-weight: 700;
}
@media (max-width: 900px) {
  .md-hero .md-wrap {
    grid-template-columns: 1fr;
  }
  .md-hero img {
    max-height: 320px;
  }
  .md-toc {
    display: none;
  }
  .md-main {
    max-width: none;
  }
  .md-facts {
    grid-template-columns: 1fr 1fr;
  }
  .md-other {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .md-wrap {
    width: min(100% - 28px, 1120px);
  }
  .md-hero {
    padding: 36px 0;
  }
  .md-hero h1 {
    font-size: 39px;
  }
  .md-hero p {
    font-size: 18px;
  }
  .md-layout {
    padding-top: 42px;
  }
  .md-section {
    padding: 42px 0;
  }
  .md-section h2 {
    font-size: 30px;
  }
  .md-facts,
  .md-steps {
    grid-template-columns: 1fr;
  }
  .md-fact {
    padding-right: 0;
  }
  .md-step {
    padding-right: 4px;
  }
  .md-actions a {
    width: 100%;
    text-align: center;
  }
  .md-table {
    display: block;
    overflow-x: auto;
  }
}

/* Medical voucher: use colour sparingly and let typography create hierarchy. */
.medical-voucher-page .md-hero {
  background: #fbfaf7;
  border-bottom-color: #e8e3dc;
}
.medical-voucher-page .md-hero h1 {
  font-size: clamp(38px, 3.7vw, 52px);
  color: #008f8d;
  white-space: nowrap;
}
.medical-voucher-page .md-kicker,
.medical-voucher-page .md-section small {
  color: #b6543f;
}
.medical-voucher-page .md-updated {
  border-left-color: #a8b1b0;
  background: #f1f2f0;
  color: #475356;
}
.medical-voucher-page .md-toc {
  border-left-color: #cfd4d2;
}
.medical-voucher-page .md-toc a {
  color: #24383b;
  font-weight: 650;
}
.medical-voucher-page .md-toc a:hover {
  color: #007f7d;
}
.medical-voucher-page .md-facts,
.medical-voucher-page .md-steps {
  border-top-color: #263b3e;
}
.medical-voucher-page .md-fact strong {
  color: #203538;
}
.medical-voucher-page .md-step:before {
  background: #263b3e;
}
.medical-voucher-page .md-list {
  border-top-color: #cfd4d2;
}
.medical-voucher-page .md-list li:before {
  content: "—";
  color: #b6543f;
}
.medical-voucher-page .md-note {
  border-left-color: #d38a76;
  background: #faf6f1;
}
.medical-voucher-page .md-actions a {
  border-color: #aeb8b7;
  color: #263b3e;
}
.medical-voucher-page .md-actions a:first-child {
  border-color: #263b3e;
  background: #263b3e;
  color: #fff;
}
@media (max-width: 600px) {
  .medical-voucher-page .md-hero h1 {
    font-size: 38px;
    white-space: normal;
  }
}

/* Fee waiver uses the same restrained editorial palette. */
.medical-fee-waiver-page .md-hero {
  background: #fbfaf7;
  border-bottom-color: #e8e3dc;
}
.medical-fee-waiver-page .md-hero h1 {
  color: #008f8d;
  font-size: clamp(34px, 3.25vw, 48px);
  white-space: nowrap;
}
.medical-fee-waiver-page .md-kicker,
.medical-fee-waiver-page .md-section small {
  color: #b6543f;
}
.medical-fee-waiver-page .md-section h2 {
  color: #008f8d;
}
.medical-fee-waiver-page .md-updated {
  border-left-color: #a8b1b0;
  background: #f1f2f0;
  color: #475356;
}
.medical-fee-waiver-page .md-toc {
  border-left-color: #cfd4d2;
}
.medical-fee-waiver-page .md-toc a {
  color: #24383b;
  font-weight: 650;
}
.medical-fee-waiver-page .md-toc a:hover {
  color: #007f7d;
}
.medical-fee-waiver-page .md-facts,
.medical-fee-waiver-page .md-steps {
  border-top-color: #263b3e;
}
.medical-fee-waiver-page .md-fact strong {
  color: #203538;
}
.medical-fee-waiver-page .md-step:before {
  background: #263b3e;
}
.medical-fee-waiver-page .md-list {
  border-top-color: #cfd4d2;
}
.medical-fee-waiver-page .md-list li:before {
  content: "—";
  color: #b6543f;
}
.medical-fee-waiver-page .md-note {
  border-left-color: #d38a76;
  background: #faf6f1;
}
.medical-fee-waiver-page .md-actions a {
  border-color: #aeb8b7;
  color: #263b3e;
}
.medical-fee-waiver-page .md-actions a:first-child {
  border-color: #263b3e;
  background: #263b3e;
  color: #fff;
}
@media (max-width: 600px) {
  .medical-fee-waiver-page .md-hero h1 {
    font-size: 36px;
    white-space: normal;
  }
}

/* Dental and vaccination guides share the completed editorial system. */
.community-dental-page .md-hero,
.elderly-vaccination-page .md-hero {
  background: #fbfaf7;
  border-bottom-color: #e8e3dc;
}
.community-dental-page .md-hero h1,
.elderly-vaccination-page .md-hero h1 {
  color: #008f8d;
  font-size: clamp(34px, 3.15vw, 47px);
  white-space: nowrap;
}
.community-dental-page .md-kicker,
.community-dental-page .md-section small,
.elderly-vaccination-page .md-kicker,
.elderly-vaccination-page .md-section small {
  color: #b6543f;
}
.community-dental-page .md-section h2,
.elderly-vaccination-page .md-section h2 {
  color: #008f8d;
}
.community-dental-page .md-updated,
.elderly-vaccination-page .md-updated {
  border-left-color: #a8b1b0;
  background: #f1f2f0;
  color: #475356;
}
.community-dental-page .md-toc,
.elderly-vaccination-page .md-toc {
  border-left-color: #cfd4d2;
}
.community-dental-page .md-toc a,
.elderly-vaccination-page .md-toc a {
  color: #24383b;
  font-weight: 650;
}
.community-dental-page .md-facts,
.community-dental-page .md-steps,
.elderly-vaccination-page .md-facts,
.elderly-vaccination-page .md-steps {
  border-top-color: #263b3e;
}
.community-dental-page .md-fact strong,
.elderly-vaccination-page .md-fact strong {
  color: #203538;
}
.community-dental-page .md-step:before,
.elderly-vaccination-page .md-step:before {
  background: #263b3e;
}
.community-dental-page .md-list,
.elderly-vaccination-page .md-list {
  border-top-color: #cfd4d2;
}
.community-dental-page .md-list li:before,
.elderly-vaccination-page .md-list li:before {
  content: "—";
  color: #b6543f;
}
.community-dental-page .md-note,
.elderly-vaccination-page .md-note {
  border-left-color: #d38a76;
  background: #faf6f1;
}
.community-dental-page .md-actions a,
.elderly-vaccination-page .md-actions a {
  border-color: #aeb8b7;
  color: #263b3e;
}
.community-dental-page .md-actions a:first-child,
.elderly-vaccination-page .md-actions a:first-child {
  border-color: #263b3e;
  background: #263b3e;
  color: #fff;
}
@media (max-width: 600px) {
  .community-dental-page .md-hero h1,
  .elderly-vaccination-page .md-hero h1 {
    font-size: 36px;
    white-space: normal;
  }
}

/* Use whitespace rather than repeated hairlines to separate medical content. */
.medical-detail .md-section {
  border-bottom: 0;
}
.medical-detail .md-section + .md-section {
  padding-top: 46px;
}
.medical-detail .md-fact,
.medical-detail .md-step,
.medical-detail .md-list li,
.medical-detail .md-faq details {
  border-bottom: 0;
}
.medical-detail .md-steps {
  row-gap: 8px;
}
.medical-detail .md-list {
  border-top: 0;
}
.medical-detail .md-list li {
  padding-top: 9px;
  padding-bottom: 9px;
}
.medical-detail .md-faq {
  padding-bottom: 36px;
}
.medical-detail .md-faq details {
  padding: 13px 0;
}
.medical-detail .md-faq details + details {
  margin-top: 2px;
}
.medical-detail .md-actions {
  padding-top: 8px;
}
@media (max-width: 600px) {
  .medical-detail .md-section + .md-section {
    padding-top: 38px;
  }
}

.care-detail-page .md-hero {
  background: #fbfaf7;
  border-bottom-color: #e8e3dc;
}
.care-detail-page .md-hero h1,
.care-detail-page .md-section h2 {
  color: #008f8d;
}
.care-detail-page .md-hero h1 {
  font-size: clamp(34px, 3.1vw, 47px);
  white-space: nowrap;
}
.community-care-voucher-page .md-hero h1 {
  font-size: clamp(42px, 3.7vw, 52px);
  line-height: 1.12;
  white-space: normal;
}
.md-subheading {
  margin: 30px 0 12px;
  color: #24383b;
  font-size: 22px;
}
.md-table-wrap {
  margin: 22px 0 26px;
  overflow-x: auto;
  border: 1px solid #d8ddda;
  border-radius: 14px;
  background: #fff;
}
.md-data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: #24383b;
  font-size: 16px;
  line-height: 1.5;
}
.md-data-table th,
.md-data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e6e8e5;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.md-data-table th {
  background: #f3f1ec;
  color: #253638;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}
.md-data-table tbody tr:nth-child(even) {
  background: #fbfaf7;
}
.md-data-table tbody tr:last-child td {
  border-bottom: 0;
}
.md-data-table td:first-child,
.md-data-table td:nth-last-child(-n+3) {
  font-weight: 700;
}
.md-data-table td:nth-last-child(-n+2) {
  color: #007f7d;
}
.md-income-table {
  min-width: 0;
  table-layout: fixed;
}
.md-income-table th,
.md-income-table td {
  padding-left: 10px;
  padding-right: 10px;
  text-align: center;
  white-space: normal;
}
.md-income-table th:first-child,
.md-income-table td:first-child {
  width: 88px;
  text-align: left;
}
.md-income-table th small {
  display: block;
  margin-top: 3px;
  color: #687477;
  font-size: 13px;
  font-weight: 600;
}
.md-table-intro {
  margin: -2px 0 12px;
  color: #526164;
  font-size: 16px;
}
.rcsv-fee-table th:first-child,
.rcsv-fee-table td:first-child {
  width: 66px;
  min-width: 66px;
  max-width: 66px;
}
.rcsv-fee-table th:nth-child(2),
.rcsv-fee-table td:nth-child(2),
.rcsv-fee-table th:nth-child(3),
.rcsv-fee-table td:nth-child(3),
.rcsv-fee-table th:nth-child(4),
.rcsv-fee-table td:nth-child(4) {
  width: 16%;
}
.md-section > .md-actions:last-child {
  margin-top: 18px;
}
.care-detail-page .md-kicker,
.care-detail-page .md-section small {
  color: #b6543f;
}
.care-detail-page .md-updated {
  border-left-color: #a8b1b0;
  background: #f1f2f0;
  color: #475356;
}
.care-detail-page .md-facts,
.care-detail-page .md-steps {
  border-top-color: #263b3e;
}
.care-detail-page .md-fact strong {
  color: #203538;
}
.care-detail-page .md-step:before {
  background: #263b3e;
}
.care-detail-page .md-list {
  border-top: 0;
}
.care-detail-page .md-list li:before {
  content: "—";
  color: #b6543f;
}
.care-detail-page .md-note {
  border-left-color: #d38a76;
  background: #faf6f1;
}
.care-detail-page .md-actions a {
  border-color: #aeb8b7;
  color: #263b3e;
}
.care-detail-page .md-actions a:first-child {
  border-color: #263b3e;
  background: #263b3e;
  color: #fff;
}
@media (max-width: 600px) {
  .care-detail-page .md-hero h1 {
    font-size: 36px;
    white-space: normal;
  }
  .community-care-voucher-page .md-hero h1 {
    font-size: 38px;
  }
  .md-table-wrap {
    margin-right: -18px;
    border-radius: 10px 0 0 10px;
  }
  .md-data-table {
    font-size: 15px;
  }
  .md-data-table th,
  .md-data-table td {
    padding: 12px 13px;
  }
  .md-income-table {
    min-width: 660px;
  }
  .subsidised-fee-table th,
  .subsidised-fee-table td {
    padding: 12px;
  }
  .subsidised-fee-table th:first-child,
  .subsidised-fee-table td:first-child {
    width: 62%;
  }
  .subsidised-fee-table th:last-child,
  .subsidised-fee-table td:last-child {
    width: 38%;
  }
}

/* Final canonical title size: keep every guide at the same visual level. */
.medical-detail .md-hero h1 {
  font-size: clamp(42px, 3.7vw, 52px) !important;
  line-height: 1.12 !important;
}
@media (max-width: 600px) {
  .medical-detail .md-hero h1 {
    font-size: 38px !important;
    white-space: normal !important;
  }
}
