
  /* All styles scoped under .matchd-cl so this can be safely embedded in WordPress */
  .matchd-cl {
    --uwa-blue: #003087;
    --uwa-blue-dark: #00226A;
    --uwa-blue-light: #e6ebf5;
    --uwa-gold: #DAAA00;
    --uwa-gold-light: #FDD26E;
    --tier1-bg: #fffbe6;
    --tier1-border: #DAAA00;
    --tier2-bg: #f4f7fd;
    --tier2-border: #003087;
    --tier3-bg: #ffffff;
    --tier3-border: #00226A;
    --black: #000;
    --grey-1: #f5f7fb;
    --grey-2: #e6e8ee;
    --grey-3: #6b7280;
    --white: #fff;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--black);
    line-height: 1.5;
    background: var(--grey-1);
  }
  .matchd-cl * { box-sizing: border-box; }
  .matchd-cl-page { max-width: 1180px; margin: 0 auto; padding: 1.5em 1.25em 6em; scroll-behavior: smooth; }

  /* Banner */
  .matchd-cl-banner {
    background: var(--uwa-blue);
    color: var(--white);
    border-bottom: 4px solid var(--uwa-gold);
    padding: 1.75em 1.5em;
    margin: -1.5em -1.25em 1.5em;
  }
  .matchd-cl-banner .crumb {
    font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--uwa-gold-light); margin: 0 0 0.3em; font-weight: 600;
  }
  .matchd-cl-banner h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: clamp(1.5em, 2.6vw, 1.95em);
    margin: 0; color: var(--white); line-height: 1.2;
  }
  .matchd-cl-banner .lede {
    margin: 0.4em 0 0; max-width: 100%; font-size: 0.95em; color: rgba(255,255,255,0.92);
  }

  /* Stage toggle */
  .matchd-cl-tabs {
    display: flex; gap: 0; margin: 0 0 1em; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--grey-2); background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  .matchd-cl-tab {
    flex: 1; padding: 0.85em 1em; font: 600 0.95em 'Montserrat', sans-serif;
    background: var(--white); color: var(--uwa-blue); border: none; cursor: pointer;
    border-right: 1px solid var(--grey-2); transition: background 0.15s;
  }
  .matchd-cl-tab:last-child { border-right: none; }
  .matchd-cl-tab:hover { background: var(--grey-1); }
  .matchd-cl-tab[aria-selected="true"] {
    background: var(--uwa-blue); color: var(--white);
  }

  /* Meta fields (date + initials) */
  .matchd-cl-meta {
    display: flex; gap: 1em; flex-wrap: wrap; align-items: end;
    background: var(--white); border: 1px solid var(--grey-2); border-radius: 6px;
    padding: 0.85em 1em; margin: 0 0 1em;
  }
  .matchd-cl-meta-field { display: flex; flex-direction: column; gap: 0.25em; flex: 1; min-width: 140px; }
  .matchd-cl-meta-field label {
    font-size: 0.8em; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--uwa-blue); font-weight: 600;
  }
  .matchd-cl-meta-field input {
    padding: 0.5em 0.7em; border: 1px solid var(--grey-2); border-radius: 4px;
    font: 400 0.95em 'Montserrat', sans-serif;
  }
  .matchd-cl-meta-field input:focus { outline: none; border-color: var(--uwa-blue); box-shadow: 0 0 0 3px rgba(0,48,135,0.12); }
  .matchd-cl-meta-info {
    font-size: 0.78em; color: var(--grey-3); flex: 100%; margin: 0;
  }

  /* Privacy note */
  .matchd-cl-privacy {
    background: var(--white); border-left: 4px solid var(--uwa-gold);
    padding: 0.7em 0.9em; margin: 0 0 1.25em; font-size: 0.85em; color: var(--grey-3);
    border-radius: 0 4px 4px 0;
  }
  .matchd-cl-privacy strong { color: var(--black); }

  /* Layout: sidebar + main */
  .matchd-cl-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.25em; align-items: start; }
  @media (max-width: 760px) { .matchd-cl-layout { grid-template-columns: 1fr; } }

  /* Section nav */
  .matchd-cl-nav {
    position: sticky; top: 0.75em;
    background: var(--white); border: 1px solid var(--grey-2); border-radius: 6px; padding: 0.6em 0.5em;
    font-size: 0.88em;
    max-height: calc(100vh - 1.5em);
    overflow-y: auto;
  }
  /* Active section highlight in nav */
  .matchd-cl-nav a.is-current {
    background: var(--uwa-blue-light);
    color: var(--uwa-blue);
    font-weight: 700;
    border-left: 3px solid var(--uwa-blue);
    padding-left: calc(0.7em - 3px);
  }
  .matchd-cl-nav-group {
    margin: 0.5em 0 0.65em;
  }
  .matchd-cl-nav-group:first-child { margin-top: 0.2em; }
  .matchd-cl-nav-group h4 {
    font: 700 0.65em 'Montserrat', sans-serif; text-transform: uppercase;
    letter-spacing: 0.09em; color: var(--uwa-blue); margin: 0 0.6em 0.4em;
    display: flex; align-items: center; gap: 0.45em;
  }
  .matchd-cl-nav-group h4 .step-num {
    background: var(--uwa-blue); color: var(--white); width: 1.3em; height: 1.3em;
    border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85em;
  }
  .matchd-cl-nav-group.tier-1 h4 .step-num { background: var(--uwa-gold); color: var(--black); }
  .matchd-cl-nav-group.tier-notes h4 .step-num { background: var(--grey-2); color: var(--grey-3); font-weight: 700; }
  .matchd-cl-nav-group.tier-notes a { font-style: italic; }
  .matchd-cl-nav-group ul { list-style: none; margin: 0; padding: 0; }
  .matchd-cl-nav-group a {
    display: block; padding: 0.35em 0.7em 0.35em 1.6em; color: var(--black);
    text-decoration: none; border-radius: 4px; font-size: 0.92em;
  }
  .matchd-cl-nav-group a:hover { background: var(--grey-1); color: var(--uwa-blue); }
  @media (max-width: 760px) {
    .matchd-cl-nav { position: static; }
    .matchd-cl-nav-group { margin: 0.5em 0; }
    .matchd-cl-nav-group ul { display: flex; flex-wrap: wrap; gap: 0.2em; }
    .matchd-cl-nav-group li { flex: 1 1 auto; }
    .matchd-cl-nav-group a { padding: 0.3em 0.55em; font-size: 0.84em; }
  }

  /* Progress */
  .matchd-cl-progress {
    background: var(--white); border: 1px solid var(--grey-2); border-radius: 6px;
    padding: 0.6em 0.9em; margin: 0 0 1em;
    display: flex; align-items: center; gap: 1em;
  }
  .matchd-cl-progress-text { font: 600 0.88em 'Montserrat', sans-serif; color: var(--uwa-blue); white-space: nowrap; }
  .matchd-cl-progress-bar { flex: 1; height: 6px; background: var(--grey-2); border-radius: 999px; overflow: hidden; }
  .matchd-cl-progress-fill { height: 100%; background: var(--uwa-blue); width: 0; transition: width 0.25s; }

  /* Group bands (tier headers) */
  .matchd-cl-band {
    display: flex; align-items: center; gap: 0.7em; margin: 1.4em 0 0.75em;
  }
  .matchd-cl-band .step {
    width: 1.9em; height: 1.9em; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font: 700 0.95em 'Montserrat', sans-serif;
    flex-shrink: 0;
  }
  .matchd-cl-band.tier-1 .step { background: var(--uwa-gold); color: var(--black); }
  .matchd-cl-band.tier-2 .step { background: var(--uwa-blue); color: var(--white); }
  .matchd-cl-band.tier-3 .step { background: var(--uwa-blue-dark); color: var(--white); }
  .matchd-cl-band-text { display: flex; flex-direction: column; gap: 0.1em; }
  .matchd-cl-band-text strong {
    font: 700 1em 'Montserrat', sans-serif; color: var(--uwa-blue);
    text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85em;
  }
  .matchd-cl-band-text span {
    font-size: 0.92em; color: var(--grey-3);
  }
  .matchd-cl-band:first-of-type { margin-top: 0; }

  /* Section card base */
  .matchd-cl-section {
    background: var(--white); border: 1px solid var(--grey-2); border-radius: 6px;
    margin: 0 0 0.85em; overflow: hidden; scroll-margin-top: 1em;
  }
  .matchd-cl-section h2 {
    font-family: 'Merriweather', Georgia, serif; color: var(--uwa-blue);
    font-size: 1.1em; margin: 0; padding: 0.7em 1em;
    background: var(--grey-1); border-bottom: 1px solid var(--grey-2);
  }
  .matchd-cl-section-body { padding: 0.85em 1em 1em; }

  /* TIER 1: Medication reviews — hero card, gold-themed */
  .matchd-cl-section.tier-1 {
    border-left: 5px solid var(--tier1-border);
    background: var(--tier1-bg);
    box-shadow: 0 2px 8px rgba(218,170,0,0.12);
  }
  .matchd-cl-section.tier-1 h2 {
    background: linear-gradient(to right, var(--uwa-gold) 0, var(--uwa-gold-light) 100%);
    color: var(--black);
    font-size: 1.25em;
    padding: 0.85em 1.1em;
    border-bottom: 1px solid var(--uwa-gold);
  }
  .matchd-cl-trigger-question {
    background: var(--white); border: 2px solid var(--uwa-gold);
    border-radius: 8px; padding: 0.85em 1em; margin: 0 0 0.9em;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .matchd-cl-trigger-question .qlabel {
    font: 700 0.72em 'Montserrat', sans-serif;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--uwa-gold); margin-bottom: 0.25em;
  }
  .matchd-cl-trigger-question .qtext {
    font: 700 1.15em 'Merriweather', Georgia, serif;
    color: var(--uwa-blue); margin: 0 0 0.35em;
  }
  .matchd-cl-trigger-question .qhint {
    font-size: 0.88em; color: var(--grey-3); margin: 0;
  }

  /* TIER 2: Concepts — blue-themed */
  .matchd-cl-section.tier-2 {
    border-left: 4px solid var(--tier2-border);
    background: var(--tier2-bg);
  }
  .matchd-cl-section.tier-2 h2 {
    background: var(--tier2-bg);
    border-bottom-color: var(--uwa-blue);
    color: var(--uwa-blue);
  }

  /* TIER 3: Medicine categories — clean, slightly more clinical */
  .matchd-cl-section.tier-3 {
    border-left: 4px solid var(--tier3-border);
  }
  .matchd-cl-section.tier-3 h2 {
    background: var(--uwa-blue-light);
    color: var(--uwa-blue-dark);
    border-bottom-color: var(--uwa-blue);
  }
  .matchd-cl-section.tier-3 h2::before {
    content: '\1F48A'; /* pill emoji */
    margin-right: 0.4em;
    font-size: 0.95em;
  }

  /* Final notes block (sits after Step 3, no tier band) */
  .matchd-cl-notes-section {
    margin-top: 1em;
    border-left: 4px solid var(--grey-2);
  }
  .matchd-cl-notes-section h2 {
    background: var(--grey-1);
    color: var(--black);
    font-style: italic;
    font-size: 1em;
    border-bottom: 1px solid var(--grey-2);
  }

  /* Three-up grid for tier 2 sections on wider screens */
  .matchd-cl-grid {
    display: grid; gap: 0.85em; grid-template-columns: 1fr;
  }
  @media (min-width: 980px) { .matchd-cl-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; } }
  @media (min-width: 980px) { .matchd-cl-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
  .matchd-cl-grid .matchd-cl-section { margin: 0; }

  .matchd-cl-prompt { font-weight: 600; color: var(--uwa-blue); margin: 0.7em 0 0.35em; }
  .matchd-cl-prompt:first-child { margin-top: 0; }
  .matchd-cl-sub { margin: 0.4em 0 0.4em; color: var(--black); font-weight: 600; font-size: 0.94em; }

  /* Checklist items - POSITIVE checked state (bold UWA Blue, no strikethrough) */
  .matchd-cl-list { list-style: none; margin: 0.25em 0 0.5em; padding: 0; }
  .matchd-cl-list li { margin: 0 0 0.2em; }
  .matchd-cl-list label {
    display: flex; align-items: flex-start; gap: 0.55em; padding: 0.4em 0.5em;
    border-radius: 4px; cursor: pointer; transition: background 0.1s, color 0.1s; font-size: 0.94em;
  }
  .matchd-cl-list label:hover { background: var(--grey-1); }
  .matchd-cl-list input[type=checkbox] {
    flex-shrink: 0; margin-top: 0.18em; width: 1.05em; height: 1.05em;
    accent-color: var(--uwa-blue); cursor: pointer;
  }
  .matchd-cl-list input[type=checkbox]:checked + span {
    color: var(--uwa-blue);
    font-weight: 600;
  }
  .matchd-cl-list label:has(input:checked) { background: var(--uwa-blue-light); }

  /* Free text fields */
  .matchd-cl-field { display: block; margin: 0.4em 0 0.7em; }
  .matchd-cl-field label { display: block; font-weight: 600; margin-bottom: 0.3em; font-size: 0.9em; }
  .matchd-cl-field textarea {
    width: 100%; min-height: 60px; padding: 0.55em 0.7em; border: 1px solid var(--grey-2);
    border-radius: 4px; font: 400 0.93em inherit; resize: vertical;
  }
  .matchd-cl-field textarea:focus { outline: none; border-color: var(--uwa-blue); box-shadow: 0 0 0 3px rgba(0,48,135,0.12); }

  /* Actions */
  .matchd-cl-actions {
    position: fixed; bottom: 1em; right: 1em; display: flex; gap: 0.5em; z-index: 50;
  }
  .matchd-cl-actions button {
    font: 600 0.9em 'Montserrat', sans-serif; padding: 0.7em 1.05em;
    border-radius: 4px; border: 1px solid transparent; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18); transition: background 0.15s;
  }
  .matchd-cl-actions .print { background: var(--uwa-gold); color: var(--black); }
  .matchd-cl-actions .print:hover { background: var(--uwa-gold-light); }
  .matchd-cl-actions .reset { background: var(--white); color: var(--uwa-blue); border-color: var(--uwa-blue); }
  .matchd-cl-actions .reset:hover { background: var(--grey-1); }

  /* Footer */
  .matchd-cl-foot {
    margin-top: 2em; padding: 1em 0 0; border-top: 1px solid var(--grey-2);
    font-size: 0.8em; color: var(--grey-3); text-align: center;
  }

  /* PRINT */
  @media print {
    .matchd-cl { background: var(--white); font-size: 9pt; line-height: 1.3; }
    .matchd-cl-page { padding: 0; max-width: 100%; }
    .matchd-cl-banner {
      background: var(--white); color: var(--black); border-bottom: 1.5pt solid var(--uwa-blue);
      padding: 0 0 0.3em; margin: 0 0 0.5em;
    }
    .matchd-cl-banner h1, .matchd-cl-banner .lede, .matchd-cl-banner .crumb { color: var(--black); }
    .matchd-cl-banner .crumb { font-size: 7pt; margin-bottom: 0.1em; }
    .matchd-cl-banner h1 { font-size: 13pt; }
    .matchd-cl-banner .lede { display: none; }
    .matchd-cl-tabs, .matchd-cl-privacy, .matchd-cl-actions, .matchd-cl-nav, .matchd-cl-progress { display: none; }

    .matchd-cl-meta {
      border: none; padding: 0 0 0.4em; margin: 0 0 0.4em;
      border-bottom: 0.5pt solid #999;
    }
    .matchd-cl-meta-field label { font-size: 7pt; }
    .matchd-cl-meta-field input { border: none; border-bottom: 0.5pt solid #999; padding: 0.1em 0.2em; font-size: 9pt; }
    .matchd-cl-meta-info { display: none; }

    .matchd-cl-layout { display: block; }

    .matchd-cl-band {
      margin: 0.6em 0 0.3em; gap: 0.4em;
    }
    .matchd-cl-band .step {
      width: 1.3em; height: 1.3em; font-size: 7pt;
      background: var(--white) !important; color: var(--black) !important;
      border: 1pt solid var(--uwa-blue);
    }
    .matchd-cl-band-text strong { font-size: 8pt; }
    .matchd-cl-band-text span { font-size: 7.5pt; }

    .matchd-cl-section, .matchd-cl-section.tier-1, .matchd-cl-section.tier-2, .matchd-cl-section.tier-3 {
      break-inside: avoid; page-break-inside: avoid;
      border: 0.5pt solid #ccc; box-shadow: none; margin: 0 0 0.45em;
      background: var(--white);
    }
    .matchd-cl-section h2 {
      background: var(--white) !important; border-bottom: 0.5pt solid #999;
      font-size: 10pt; padding: 0.2em 0.5em; color: var(--black) !important;
    }
    .matchd-cl-section.tier-3 h2::before { display: none; }
    .matchd-cl-section-body { padding: 0.3em 0.5em 0.45em; }
    .matchd-cl-trigger-question {
      border: 1pt solid var(--uwa-blue); padding: 0.3em 0.5em;
      box-shadow: none; margin-bottom: 0.4em;
    }
    .matchd-cl-trigger-question .qlabel { color: var(--black); }
    .matchd-cl-trigger-question .qtext { font-size: 10pt; margin: 0 0 0.15em; }
    .matchd-cl-trigger-question .qhint { font-size: 7.5pt; color: var(--black); }

    .matchd-cl-prompt { font-size: 9pt; margin: 0.3em 0 0.15em; }
    .matchd-cl-sub { font-size: 8.5pt; margin: 0.2em 0 0.15em; }
    .matchd-cl-list label {
      padding: 0.05em 0; font-size: 8.5pt; line-height: 1.25; background: none !important;
    }
    .matchd-cl-list input[type=checkbox] {
      -webkit-appearance: checkbox; appearance: checkbox;
      width: 0.9em; height: 0.9em; margin-top: 0.12em;
    }
    .matchd-cl-list input[type=checkbox]:checked + span {
      font-weight: 700; color: var(--black);
    }
    .matchd-cl-field textarea { border: 0.5pt solid #999; min-height: 30px; font-size: 8pt; }
    .matchd-cl-field label { font-size: 8pt; margin-bottom: 0.1em; }

    .matchd-cl-grid { display: block; }
    .matchd-cl-grid .matchd-cl-section { margin-bottom: 0.45em; }

    .matchd-cl-foot { font-size: 7pt; color: var(--black); border-top: 0.5pt solid #999; margin-top: 0.6em; padding-top: 0.3em; }
    @page { margin: 1.5cm 1.2cm; }
  }
