:root {
  --bg-blue: #e8f4ff;
  --bg-lilac: #f7f1ff;
  --text: #111C2D;
  --muted: #6c7584;
  --line: #e7ebf0;
  --panel: #ffffff;
  --primary: #0c8fd8;
  --primary-dark: #0875b7;
  --danger: #F95668;
  --warning-bg: #fff8f1;
  --cpa: #e8621c;
  --cpa-soft: #fff5ec;
  --acc: #2d782b;
  --acc-soft: #eff8ec;
  --shadow: 0 18px 45px rgba(39, 70, 102, 0.12);

  /* depth tokens */
  --sds-size-depth-0: 0px;
  --sds-size-depth-25: 0.5px;
  --sds-size-depth-50: 1px;
  --sds-size-depth-100: 2px;
  --sds-size-depth-200: 4px;
  --sds-size-depth-300: 6px;
  --sds-size-depth-400: 8px;
  --sds-size-depth-500: 12px;
  --sds-size-depth-600: 16px;
  --sds-size-depth-800: 24px;
  --sds-size-depth-1000: 32px;
  --sds-size-depth-1200: 48px;
  --sds-size-depth-negative-25: -0.5px;
  --sds-size-depth-negative-50: -1px;
  --sds-size-depth-negative-100: -2px;
  --sds-size-depth-negative-200: -4px;
  --sds-color-black-25: rgba(0, 0, 0, 0.02);
  --sds-color-black-50: rgba(0, 0, 0, 0.03);
  --sds-color-black-100: rgba(0, 0, 0, 0.04);
  --sds-color-black-200: rgba(0, 0, 0, 0.08);
  --sds-color-black-300: rgba(0, 0, 0, 0.12);
  --sds-color-black-400: rgba(0, 0, 0, 0.16);
  --sds-color-black-500: rgba(0, 0, 0, 0.24);
  --sds-color-black-600: rgba(0, 0, 0, 0.32);
  --sds-color-black-800: rgba(0, 0, 0, 0.48);
  --sds-color-black-1000: rgba(0, 0, 0, 0.64);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: linear-gradient(115deg, var(--bg-blue), #f8fbff 48%, var(--bg-lilac));
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans Thai", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cpd-page-shell {
  width: min(1840px, calc(100% - 64px));
  margin: 28px auto 34px;
  padding: 34px 30px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.cpd-hero {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 0 0 24px;
  text-align: center;
}

.cpd-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  image-rendering: auto;
}

.cpd-hero h1 {
  margin: 0;
  color: #111C2DCC;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 140%;
  letter-spacing: -0.01em;
}

.cpd-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 56px;
  margin-bottom: 20px;
  padding: 12px 28px;
  background: #FEF7EF;
  color: var(--danger);
}

.cpd-alert-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  color: var(--text);
  font-weight: 600;
  font-size: 17px;
  line-height: 140%;
  letter-spacing: -0.02em;
  vertical-align: middle;
}

.cpd-alert-title::after {
  content: "";
  width: 1px;
  height: 26px;
  margin-left: 16px;
  background: #e4b8bd;
}

.cpd-alert-icon {
  color: var(--danger);
}

.cpd-alert p {
  margin: 0;
  font-weight: 600;
}

.search-panel,
.results-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--sds-size-depth-0) var(--sds-size-depth-100) var(--sds-size-depth-100) var(--sds-size-depth-negative-100) var(--sds-color-black-100), var(--sds-size-depth-0) var(--sds-size-depth-400) var(--sds-size-depth-800) var(--sds-size-depth-negative-100) var(--sds-color-black-200);
}

.search-panel {
  margin-bottom: 20px;
  padding: 18px 28px 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(100px, 0.55fr) minmax(260px, 1.45fr) minmax(220px, 1fr);
  gap: 14px;
}

.field-grid label,
.field-grid .field>span:first-child,
.field-grid .compact-field>span:first-child {
  color: #414957;
}

.field-grid input,
.field-grid select {
  color: #585C63;
  font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
}

.field,
.compact-field {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 400;
}

.field span,
.compact-field span {
  white-space: nowrap;
}

.field input,
.field select,
.compact-field select,
.page-jump input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input::placeholder,
.field select::placeholder,
.compact-field select::placeholder {
  color: #AEAEB2;
}

.field input,
.field select,
.compact-field select {
  padding: 8px 12px;
}

#keyword {
  font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #414957;
}

.field input:focus,
.field select:focus,
.compact-field select:focus,
.page-jump input:focus {
  border-color: rgba(12, 143, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(12, 143, 216, 0.12);
}

.keyword-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-primary {
  background: #0085DB;
  color: #fff;
}

.btn-primary:hover {
  background: #006fb8;
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: #3f4650;
}

.btn-secondary:hover {
  border-color: #cbd5df;
  background: #f8fafc;
}

.results-panel {
  position: relative;
  padding: 20px 28px 22px;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.results-toolbar h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

#result-count {
  color: var(--primary);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.compact-field {
  grid-template-columns: auto minmax(118px, 1fr);
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.compact-field>span {
  font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #414957;
}

.compact-field select {
  font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #585C63;
  min-height: 36px;
}

.view-toggle {
  display: inline-flex;
  overflow: hidden;
  min-height: 36px;
  border-radius: 8px;
  background: #eef3f8;
}

.view-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #4d5866;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
}

.view-toggle button+button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50%;
  background: var(--line);
}

.view-toggle button.is-active {
  border-color: var(--primary);
  background: #fff;
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cpd-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.cpd-table th,
.cpd-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}

.cpd-table th:last-child,
.cpd-table td:last-child {
  border-right: 0;
}

.cpd-table tbody tr:last-child td {
  border-bottom: 0;
}

.cpd-table thead th {
  background: #F0F5F9;
  color: #3d4652;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.cpd-table thead .cpa-group {
  background: #E36525;
  color: #fff;
}

.cpd-table thead .acc-group {
  background: #2D702C;
  color: #fff;
}

.cpd-table thead .cpa-sub {
  background: #FCF1E5;
  color: #E36525;
  white-space: nowrap;
  width: 5%;
}

.cpd-table thead .acc-sub {
  background: #EAF4E7;
  color: #2D702C;
  white-space: nowrap;
  width: 5%;
}

.cpd-table td {
  color: #46505d;
  text-align: center;
}

.cpd-table td:nth-child(2),
.cpd-table td:nth-child(5),
.cpd-table td:nth-child(12) {
  text-align: left;
}

.code-cell {
  white-space: nowrap;
}

.course-name {
  min-width: 340px;
}

.list-view {
  display: grid;
  gap: 10px;
}

.course-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 12px;
  background: #ffffff;
}

.course-card-index {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-right: 1px solid var(--line);
  color: #0e2442;
  font-size: 16px;
  font-weight: 800;
  padding-top: 4px;
}

.course-card-detail {
  min-width: 0;
}

.course-card h3 {
  margin: 0;
  color: #10284a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.course-institution {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-weight: 600;
}

.course-institution svg,
.course-meta-item svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #9aa6b2;
  fill: #9aa6b2;
  stroke-width: 0;
}

.course-meta-grid {
  display: grid;
  grid-template-columns: minmax(130px, 160px) minmax(150px, 180px) minmax(260px, 1fr);
  gap: 20px;
  color: #45505f;
}

.course-meta-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.course-meta-item b {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.course-meta-item strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.course-hours {
  display: grid;
  grid-template-columns: 270px 270px;
  gap: 20px;
  align-items: center;
}

.hour-card {
  overflow: hidden;
  border: 1px solid;
  border-radius: 10px;
  background: #fff;
}

.hour-card-title {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 9px 10px 8px;
  color: #fff;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: -0.02em;
  vertical-align: middle;
}

.hour-card-title strong {
  font-size: inherit;
  font-weight: inherit;
}

.hour-card-title small {
  font-size: 12px;
  font-weight: 500;
}

.hour-card-labels,
.hour-card-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.hour-card-labels {
  font-weight: 600;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: -0.02em;
  vertical-align: middle;
}

.hour-card-labels span,
.hour-card-values span {
  padding: 9px 8px;
  border-right: 1px solid;
}

.hour-card-labels span:last-child,
.hour-card-values span:last-child {
  border-right: 0;
}

.hour-card-labels span {
  font-weight: inherit;
}

.hour-card-values span {
  background: #fff;
  color: #435061;
}

.hour-card-cpa {
  border-color: #ffd9c6;
}

.hour-card-cpa .hour-card-title {
  background: var(--cpa);
}

.hour-card-cpa .hour-card-labels span {
  border-color: #ffe3d4;
  background: var(--cpa-soft);
  color: #E36525;
}

.hour-card-cpa .hour-card-values span {
  border-color: #ffe3d4;
}

.hour-card-acc {
  border-color: #d9ecd8;
}

.hour-card-acc .hour-card-title {
  background: var(--acc);
}

.hour-card-acc .hour-card-labels span {
  border-color: #deefdb;
  background: var(--acc-soft);
  color: #2D702C;
}

.hour-card-acc .hour-card-values span {
  border-color: #deefdb;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed #cbd5df;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
  position: relative;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 14px;
}

@media (min-width: 768px) {
  .pagination-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
  }

  .pagination {
    grid-column: 2;
  }

  .page-jump {
    grid-column: 3;
    justify-self: end;
  }
}

.pagination button,
.pagination a {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #506071;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  user-select: none;
}

.pagination button:hover:not(:disabled):not(.is-active),
.pagination a:hover:not(.is-active) {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f8ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(12, 143, 216, 0.12);
}

.pagination button:active:not(:disabled):not(.is-active),
.pagination a:active:not(.is-active) {
  transform: translateY(0);
  background: #e4f2fc;
  box-shadow: none;
}

.pagination button.is-active,
.pagination a.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(12, 143, 216, 0.25);
  transform: scale(1.05);
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination span {
  color: #9aa6b2;
  font-size: 14px;
  letter-spacing: 1px;
  user-select: none;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #4c5663;
}

.page-jump input {
  width: 48px;
  min-height: 34px;
  padding: 6px;
  text-align: center;
}

/* ===== Combobox ===== */

.cpd-combo {
  position: relative;
}

.cpd-combo-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-weight: 400;
}

.cpd-combo-trigger:hover {
  border-color: #c2ccdb;
}

.cpd-combo-trigger:focus,
.cpd-combo.is-open .cpd-combo-trigger {
  border-color: rgba(12, 143, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(12, 143, 216, 0.12);
  outline: 0;
}

.cpd-combo-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpd-combo-label.is-placeholder {
  color: #AEAEB2;
}

.cpd-combo-clear {
  display: none;
}

.cpd-combo-clear:hover {
  background: #c8d1da;
  color: #1e2a35;
}

.cpd-combo-clear svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
}

.cpd-combo-arrow {
  flex-shrink: 0;
  display: inline-flex;
  color: #8a96a3;
  transition: transform 0.18s ease;
  line-height: 0;
}

.cpd-combo-arrow svg {
  width: 16px;
  height: 16px;
}

.cpd-combo.is-open .cpd-combo-arrow {
  transform: rotate(180deg);
}

.cpd-combo-dropdown {
  position: absolute;
  z-index: 200;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 220px;
  max-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #d4dde8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(30, 50, 80, 0.14);
  transform-origin: top center;
  animation: combo-drop-in 0.16s ease;
}

@keyframes combo-drop-in {
  from {
    opacity: 0;
    transform: scaleY(0.92) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

.cpd-combo-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.cpd-combo-search-icon {
  width: 15px;
  height: 15px;
  color: #9ba8b5;
  flex-shrink: 0;
}

.cpd-combo-search {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
}

.cpd-combo-search::placeholder {
  color: #AEAEB2;
}

.cpd-combo-list {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: #cdd5df #f5f7fa;
}

.cpd-combo-list::-webkit-scrollbar {
  width: 6px;
}

.cpd-combo-list::-webkit-scrollbar-track {
  background: #f5f7fa;
}

.cpd-combo-list::-webkit-scrollbar-thumb {
  background: #cdd5df;
  border-radius: 6px;
}

.cpd-combo-option {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #3e4c5e;
  transition: background 0.1s ease, color 0.1s ease;
  line-height: 1.4;
  border-radius: 0;
}

.cpd-combo-option:hover,
.cpd-combo-option.is-focused {
  background: #f0f6ff;
  color: var(--primary);
}

.cpd-combo-option.is-selected {
  background: #e8f3ff;
  color: var(--primary-dark);
  font-weight: 700;
}

.cpd-combo-option.is-selected::after {
  content: " ✓";
  opacity: 0.7;
}

.cpd-combo-option[hidden] {
  display: none !important;
}

.cpd-combo-empty {
  padding: 16px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ===== end Combobox ===== */

/* ===== Loading state ===== */

.results-panel {
  overflow: hidden;
  /* contain the ::before bar */
}

.results-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, var(--primary), #5bc0f8);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.results-panel.is-loading::before {
  opacity: 1;
  animation: results-bar 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes results-bar {
  0% {
    transform: scaleX(0.05);
    opacity: 1;
  }

  70% {
    transform: scaleX(0.85);
    opacity: 1;
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

.results-panel.is-loading .results-toolbar,
.results-panel.is-loading #table-view,
.results-panel.is-loading #list-view,
.results-panel.is-loading .empty-state,
.results-panel.is-loading .pagination-bar {
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.12s ease;
}

.results-panel.is-loading .results-toolbar h2 {
  color: transparent;
  background: linear-gradient(90deg, #e0e7ee 25%, #f0f4f8 50%, #e0e7ee 75%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  border-radius: 4px;
  animation: shimmer-text 1.4s ease infinite;
}

.results-panel.is-loading .view-toggle button {
  border-color: transparent;
  background: #e4eaf0;
  color: #9aa6b2;
  pointer-events: none;
  animation: toggle-pulse 1.2s ease-in-out infinite alternate;
}

.results-panel.is-loading .view-toggle button.is-active {
  border-color: transparent;
  background: #dae2ea;
  color: #8a96a3;
}

@keyframes toggle-pulse {
  0% {
    opacity: 0.6;
  }

  100% {
    opacity: 1;
  }
}

@keyframes shimmer-text {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.results-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: 9px;
  background: #fff5f6;
  border: 1px solid #fcd0d5;
  color: var(--danger);
  font-weight: 600;
  font-size: 14px;
}

.results-error[hidden] {
  display: none;
}

/* ===== end Loading state ===== */

/* ===== View switch animation ===== */

#table-view:not([hidden]) {
  animation: view-appear 0.22s ease;
}

#list-view:not([hidden]) {
  animation: view-appear 0.22s ease;
}

@keyframes view-appear {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== end View switch ===== */

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .cpd-page-shell {
    width: min(100% - 28px, 980px);
    padding: 24px 18px;
  }

  .field-grid,
  .keyword-row {
    grid-template-columns: 1fr;
  }

  .results-toolbar,
  .toolbar-actions,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-jump {
    margin-left: 0;
    justify-content: center;
  }

  .course-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .course-hours {
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    width: 100%;
  }

  .course-meta-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  body {
    font-size: 13px;
  }

  .cpd-page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .cpd-hero h1 {
    font-size: 20px;
  }

  .cpd-alert {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .cpd-alert-title::after {
    display: none;
  }

  .search-panel,
  .results-panel {
    border-radius: 14px;
    padding: 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .toolbar-actions {
    gap: 10px;
  }

  .compact-field {
    grid-template-columns: 1fr;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle button {
    flex: 1;
    justify-content: center;
  }

  .course-card {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .course-card-index {
    font-size: 14px;
  }

  .course-meta-grid,
  .course-hours {
    grid-template-columns: 1fr;
  }

  .course-hours {
    grid-column: 1 / -1;
    gap: 12px;
  }

  .hour-card-title strong {
    font-size: 13px;
  }

  .hour-card-labels span,
  .hour-card-values span {
    padding: 8px 6px;
  }
}