:root {
  /* Brand: #c52d2f + cool charcoal + warm paper neutrals */
  --hms-bg: #f6f4f2;
  --hms-surface: #ffffff;
  --hms-ink: #1c1e24;
  --hms-muted: #5e6168;
  --hms-line: #e6e2de;
  --hms-navy: #2c3038;
  --hms-paper: #eceae6;
  --hms-skin: #e8b9a0;
  --hms-surface: #ffffff;
  --hms-ink: #1c1e24;
  --hms-muted: #5e6168;
  --hms-line: #e6e2de;
  --hms-accent: #c52d2f;
  --hms-accent-hover: #9e2325;
  --hms-navy: #2c3038;
  --hms-paper: #eceae6;
  --hms-skin: #e8b9a0;
  --hms-radius: 8px;
  --hms-wrap: 1120px;
  --hms-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.hmskurs {
  margin: 0;
  font-family: var(--hms-font);
  font-size: 18px;
  line-height: 1.55;
  color: var(--hms-ink);
  background: var(--hms-bg);
}

body.hmskurs:not(.hmskurs-course) a {
  color: var(--hms-accent);
}

body.hmskurs img {
  max-width: 100%;
  height: auto;
}

.hms-skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--hms-navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}

.hms-skip:focus {
  left: 8px;
}

#hms-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hms-main {
  flex: 1;
}

.hms-wrap {
  width: min(var(--hms-wrap), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.hms-header {
  background: var(--hms-surface);
  border-bottom: 1px solid var(--hms-line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.hms-header__inner {
  position: relative;
  width: min(var(--hms-wrap), calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.hms-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hms-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.hms-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--hms-line);
  background: var(--hms-surface);
  border-radius: 6px;
  padding: 10px 11px;
  cursor: pointer;
}

.hms-nav-toggle span {
  display: block;
  height: 2px;
  background: var(--hms-ink);
  margin: 5px 0;
}

.hms-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hms-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.hmskurs .hms-nav-list a {
  color: var(--hms-ink);
  text-decoration: none;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
}

body.hmskurs .hms-nav-list a:hover,
body.hmskurs .hms-nav-list .current-menu-item > a {
  color: var(--hms-accent);
}

.hms-nav-list .sub-menu {
  display: none;
}

.hms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 650;
  font-size: 16px;
  line-height: 1.2;
  border-radius: 6px;
  padding: 12px 18px;
  border: 1px solid transparent;
  cursor: pointer;
}

body.hmskurs a.hms-btn--primary,
.hms-btn--primary {
  background: var(--hms-accent);
  color: #fff;
}

body.hmskurs a.hms-btn--primary:hover,
.hms-btn--primary:hover {
  background: var(--hms-accent-hover);
  color: #fff;
}

.hms-btn--ghost {
  background: transparent;
  color: var(--hms-navy);
  border-color: var(--hms-line);
}

.hms-btn--ghost:hover {
  border-color: var(--hms-navy);
  color: var(--hms-navy);
}

.hms-btn--lg {
  padding: 14px 22px;
  font-size: 17px;
}

.hms-btn--sm {
  padding: 8px 14px;
  font-size: 14px;
}

.hms-btn--block {
  width: 100%;
}

.hms-btn.is-loading {
  gap: 10px;
  pointer-events: none;
  opacity: 0.85;
  cursor: wait;
}

.hms-btn.is-loading::before {
  content: "";
  width: 1.05em;
  height: 1.05em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hms-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.hms-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.hms-btn.is-loading:disabled {
  opacity: 0.85;
  cursor: wait;
}

@keyframes hms-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Hero */
.hms-hero {
  background: var(--hms-navy);
  color: #f4f1ea;
  padding: 48px 0 56px;
}

.hms-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 40px;
  align-items: center;
}

.hms-hero__visual {
  min-width: 0;
}

.hms-hero__art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
}

.hms-hero__art .hms-art-accent {
  fill: var(--hms-accent);
}

.hms-hero__art .hms-art-ink {
  fill: #1a1c20;
}

.hms-hero__art .hms-art-paper {
  fill: var(--hms-paper);
}

.hms-hero__art .hms-art-page {
  fill: #f7f6f4;
}

.hms-hero__art .hms-art-skin {
  fill: var(--hms-skin);
}

.hms-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 18ch;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hms-kicker {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d7cfc4;
  font-weight: 650;
}

.hms-lead {
  font-size: 1.12rem;
  max-width: 42rem;
  margin: 0 0 28px;
  color: #e8e2d8;
}

.hms-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

body.hmskurs .hms-hero .hms-btn--ghost {
  color: #f4f1ea;
  border-color: rgba(255, 255, 255, 0.35);
}

body.hmskurs .hms-hero .hms-btn--ghost:hover {
  color: #fff;
  border-color: #fff;
}

.hms-hero__note {
  margin: 0;
  font-size: 15px;
  color: #c9c2b6;
}

.hms-trust {
  background: var(--hms-surface);
  border-bottom: 1px solid var(--hms-line);
}

.hms-trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.hms-trust__grid > div {
  padding: 20px 16px;
  border-right: 1px solid var(--hms-line);
}

.hms-trust__grid > div:last-child {
  border-right: 0;
}

.hms-trust strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.hms-trust span {
  font-size: 14px;
  color: var(--hms-muted);
}

.hms-section {
  padding: 56px 0;
}

.hms-section--alt {
  background: var(--hms-surface);
  border-block: 1px solid var(--hms-line);
}

.hms-section h2,
.hms-article h1,
.hms-index-title {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hms-section__intro {
  max-width: 40rem;
  color: var(--hms-muted);
  margin: 0 0 32px;
}

.hms-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  counter-reset: step;
}

.hms-steps li {
  background: var(--hms-surface);
  border: 1px solid var(--hms-line);
  border-radius: var(--hms-radius);
  padding: 20px;
  counter-increment: step;
}

.hms-steps li::before {
  content: counter(step);
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hms-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 28px;
  margin-bottom: 10px;
}

.hms-steps h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.hms-steps p {
  margin: 0;
  color: var(--hms-muted);
  font-size: 16px;
}

.hms-center {
  text-align: center;
}

.hms-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.hms-checks {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.hms-checks li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid var(--hms-line);
}

.hms-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 14px;
  height: 7px;
  border-left: 2px solid var(--hms-accent);
  border-bottom: 2px solid var(--hms-accent);
  transform: rotate(-45deg);
}

.hms-fine {
  font-size: 14px;
  color: var(--hms-muted);
}

.hms-price {
  background: var(--hms-navy);
  color: #f4f1ea;
  border-radius: var(--hms-radius);
  padding: 28px 24px;
}

.hms-price__label {
  margin: 0 0 8px;
  font-size: 14px;
  color: #c9c2b6;
}

.hms-price__amount {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.hms-price__amount span {
  font-size: 1rem;
  font-weight: 500;
}

.hms-price__vat,
.hms-price__foot {
  color: #c9c2b6;
  font-size: 14px;
}

.hms-price .hms-btn {
  margin: 16px 0 10px;
}

.hms-faq-wrap {
  max-width: 720px;
}

.hms-faq details {
  border-bottom: 1px solid var(--hms-line);
  padding: 12px 0;
}

.hms-faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 6px 0;
}

.hms-faq p {
  margin: 8px 0 12px;
  color: var(--hms-muted);
}

/* Inner pages */
.hms-page {
  padding: 40px 0 64px;
}

.hms-page--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 48px;
  align-items: start;
}

.hms-sidebar {
  background: var(--hms-surface);
  border: 1px solid var(--hms-line);
  border-radius: var(--hms-radius);
  padding: 20px 20px 8px;
}

.hms-sidebar .widget {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hms-line);
}

.hms-sidebar .widget:last-child {
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}

.hms-sidebar__heading {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--hms-ink);
}

.hms-sidebar p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--hms-muted);
}

.hms-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hms-sidebar li {
  margin: 0 0 8px;
  font-size: 15px;
}

.hms-sidebar .hms-btn {
  width: 100%;
}

.hms-article__head {
  margin-bottom: 24px;
}

.hms-meta {
  color: var(--hms-muted);
  font-size: 15px;
}

.hms-prose {
  max-width: 42rem;
}

.hms-prose h2,
.hms-prose h3 {
  margin-top: 1.6em;
}

.hms-page-cta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--hms-line);
}

.hms-post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hms-post-list li {
  border-bottom: 1px solid var(--hms-line);
}

.hms-post-list a {
  display: block;
  padding: 18px 0;
  text-decoration: none;
  color: inherit;
}

.hms-post-list h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.hms-post-list p {
  margin: 0;
  color: var(--hms-muted);
  font-size: 16px;
}

/* Footer */
.hms-footer {
  background: var(--hms-navy);
  color: #d5cfc6;
  font-size: 15px;
  margin-top: auto;
}

.hms-footer a {
  color: #f4f1ea;
}

body.hmskurs .hms-footer a {
  color: #f4f1ea;
}

body.hmskurs .hms-footer a.hms-btn--primary {
  color: #fff;
}

.hms-footer__inner {
  width: min(var(--hms-wrap), calc(100% - 32px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 40px 0 28px;
}

.hms-footer__inner[data-cols="1"] {
  grid-template-columns: 1fr;
}

.hms-footer__inner[data-cols="2"] {
  grid-template-columns: 1fr 1fr;
}

.hms-footer__inner[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hms-footer .widget {
  margin: 0 0 22px;
}

.hms-footer .widget:last-child {
  margin-bottom: 0;
}

.hms-footer .widget p {
  margin: 0 0 12px;
}

.hms-footer .widget p:last-child {
  margin-bottom: 0;
}

.hms-footer .widget-title,
.hms-footer__brand,
.hms-footer__heading {
  color: #fff;
  font-weight: 700;
  margin: 0 0 10px;
}

.hms-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hms-footer li {
  margin: 0 0 8px;
}

.hms-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 0 56px;
  text-align: center;
  font-size: 13px;
}

.hms-sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--hms-accent);
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  font-weight: 700;
  text-decoration: none;
}

/* Course templates: keep chrome, don't fight Bootstrap */
body.hmskurs-course .hms-sticky-cta {
  display: none;
}

body.hmskurs-course .hms-main {
  background: var(--hms-surface);
  padding: 16px 0 40px;
}

body.hmskurs-course #sectionwrap {
  max-width: 960px;
}

@media (max-width: 860px) {
  .hms-nav-toggle {
    display: block;
  }

  .hms-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--hms-surface);
    border-bottom: 1px solid var(--hms-line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 12px;
  }

  .hms-nav.is-open {
    display: flex;
  }

  .hms-nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .hms-header__cta {
    text-align: center;
  }

  .hms-trust__grid,
  .hms-steps,
  .hms-split,
  .hms-footer__inner,
  .hms-hero__grid,
  .hms-page--sidebar {
    grid-template-columns: 1fr;
  }

  .hms-hero__visual {
    max-width: 320px;
    margin-inline: auto;
  }

  .hms-trust__grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--hms-line);
  }

  .hms-hero {
    padding: 36px 0 44px;
  }

  .hms-sticky-cta {
    display: block;
  }

  .hms-footer__bar {
    padding-bottom: 72px;
  }

  body.hmskurs-home .hms-sticky-cta {
    display: none;
  }
}

/* —— Course player —— */
.hms-course__wrap {
  padding: 24px 0 64px;
  width: min(1120px, calc(100% - 32px));
  max-width: 100%;
}

.hms-course__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
}

/* Sidebar column only when JS adds .has-sidebar (hidden aside must not leave a 240px track). */
.hms-course__layout.has-sidebar {
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
}

.hms-course__main {
  width: 100%;
  min-width: 0;
  grid-column: 1 / -1;
}

.hms-course__layout.has-sidebar .hms-course__main {
  grid-column: auto;
}

.hms-course__sidebar[hidden] {
  display: none !important;
}

.hms-course__sidebar:not([hidden]) {
  position: sticky;
  top: 88px;
  background: var(--hms-paper);
  border: 1px solid var(--hms-line);
  border-radius: var(--hms-radius);
  padding: 16px;
  min-width: 0;
}

.hms-course-side-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hms-line);
}

.hms-course-save {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.85rem;
}

.hms-course-save label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.hms-course-save .hms-fine {
  margin-left: 24px;
}

.hms-course-side-course {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hms-ink);
}

.hms-course-progress__label {
  font-size: 0.85rem;
  color: var(--hms-muted);
  margin: 0 0 6px;
}

.hms-course-progress__bar {
  height: 8px;
  background: #ddd8d2;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 16px;
}

.hms-course-progress__bar span {
  display: block;
  height: 100%;
  background: var(--hms-accent);
}

.hms-course-side-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hms-muted);
  margin: 0 0 8px;
}

.hms-course-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.hms-course-toc button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--hms-ink);
  cursor: pointer;
}

.hms-course-toc .is-active button {
  background: var(--hms-surface);
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--hms-line);
}

.hms-course-toc .is-done button {
  color: var(--hms-muted);
}

.hms-course-industry-badge {
  font-size: 0.85rem;
  margin-top: 16px;
  color: var(--hms-muted);
}

.hms-course-side-restart {
  margin: 0;
  font-size: 0.85rem;
}

.hms-linkish {
  border: 0;
  background: none;
  color: var(--hms-accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}

.hms-course-panel {
  background: var(--hms-surface);
  border: 1px solid var(--hms-line);
  border-radius: var(--hms-radius);
  padding: 28px 28px 32px;
  width: 100%;
  box-sizing: border-box;
}

.hms-course-panel h1 {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
}

.hms-course-done h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.3;
}

.hms-course-done .hms-btn {
  margin: 0.75rem 0 0.25rem;
}

.hms-course-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hms-course-actions--spread {
  justify-content: space-between;
  align-items: center;
}

.hms-course-actions--sm {
  margin-top: 0;
  margin-bottom: 16px;
}

.hms-course-lesson > .hms-course-actions--sm + .hms-kicker {
  margin-top: 0;
}

.hms-course-html {
  font-size: 1.05rem;
}

.hms-course-html a {
  color: var(--hms-accent);
}

.hms-course-html ul,
.hms-course-html ol {
  padding-left: 1.25rem;
}

.hms-course-html li + li {
  margin-top: 0.3em;
}

.hms-course-html h2 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.hms-course-html h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.08rem;
}

.hms-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hms-course-html .hms-ext-link::after {
  content: "";
  content: "" / "";
  display: inline-block;
  inline-size: 0.75em;
  block-size: 0.75em;
  margin-inline-start: 0.25em;
  vertical-align: -0.05em;
  vertical-align: calc(0.5cap - 0.375em);
  background-color: currentColor;
  -webkit-mask: var(--hms-icon-external) center / contain no-repeat;
  mask: var(--hms-icon-external) center / contain no-repeat;
  forced-color-adjust: none;
  pointer-events: none;
}

.hms-course-html {
  --hms-icon-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 11 13'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

.hms-table-scroll {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--hms-line);
  border-radius: var(--hms-radius);
}

.hms-table-scroll:focus-visible {
  outline: 2px solid var(--hms-accent);
  outline-offset: 2px;
}

.hms-course-html table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.45;
}

.hms-course-html caption {
  padding: 0.7rem 0.85rem;
  text-align: start;
  font-weight: 700;
  background: var(--hms-paper);
}

.hms-course-html th,
.hms-course-html td {
  padding: 0.55rem 0.85rem;
  text-align: start;
  vertical-align: top;
  border-top: 1px solid var(--hms-line);
}

.hms-course-html thead th {
  font-size: 0.85rem;
  color: var(--hms-muted);
  background: var(--hms-surface);
}

.hms-course-html tbody th {
  font-weight: 600;
}

.hms-course-html .hms-note {
  margin: 1.25rem 0;
  padding: 0.85rem 1rem;
  background: var(--hms-paper);
  border-inline-start: 4px solid var(--hms-accent);
  border-radius: var(--hms-radius);
}

.hms-course-html .hms-note--tip {
  border-inline-start-color: var(--hms-skin);
}

.hms-course-html .hms-note--law {
  background: var(--hms-surface);
  border: 1px solid var(--hms-line);
  border-inline-start: 4px solid var(--hms-navy);
  font-size: 0.95rem;
}

.hms-course-html .hms-note > :first-child {
  margin-top: 0;
}

.hms-course-html .hms-note > :last-child {
  margin-bottom: 0;
}

.hms-course-html .hms-note__title {
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.hms-course-html .hms-industry-extra {
  margin: 1.5rem 0 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hms-line);
}

.hms-field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
}

.hms-field__label {
  font-size: 0.9rem;
  font-weight: 600;
}

.hms-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Keep helper text visually attached to the field above it. */
.hms-pay-form .hms-field {
  margin-bottom: 2px;
}

.hms-pay-form .hms-field-row {
  margin: 14px 0 2px;
}

.hms-pay-form .hms-field-row .hms-field {
  margin-top: 0;
  margin-bottom: 0;
}

.hms-pay-form .hms-fine {
  margin: 2px 0 18px;
  line-height: 1.35;
}

.hms-pay-form .hms-fine + .hms-field {
  margin-top: 0;
}

.hms-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--hms-line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}

.hms-input:focus {
  outline: 2px solid color-mix(in srgb, var(--hms-accent) 35%, white);
  border-color: var(--hms-accent);
}

.hms-org-results {
  display: grid;
  gap: 8px;
  margin: 12px 0 8px;
  max-height: 320px;
  overflow: auto;
}

.hms-org-result,
.hms-industry-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--hms-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  box-sizing: border-box;
}

/* Author display:block overrides UA [hidden]; keep filtered items actually gone. */
.hms-org-result[hidden],
.hms-industry-item[hidden],
#hms-industry-pick[hidden],
#hms-skip-org-wrap[hidden],
#hms-invoice-fields[hidden],
.hms-paper-address[hidden],
#hms-pay-org-search[hidden] {
  display: none !important;
}

#hms-invoice-fields,
.hms-paper-address {
  margin: 8px 0 4px 28px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.hms-org-result:hover,
.hms-industry-item:hover {
  border-color: var(--hms-accent);
}

.hms-org-result span {
  font-size: 0.9rem;
  color: var(--hms-muted);
}

.hms-org-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
  min-height: 2.75rem;
  padding: 4px 0;
  margin: 0;
  background: none;
  border-radius: 0;
}

.hms-org-selected[hidden] {
  display: none !important;
}

.hms-org-selected__name {
  font-weight: 600;
}

.hms-org-selected__meta {
  color: var(--hms-muted);
  font-size: 0.9rem;
}

.hms-pay-org-field .hms-org-results {
  margin-top: 8px;
}

.hms-pay-lead {
  margin: 0 0 1.5rem;
  color: var(--hms-muted);
}

.hms-pay-group {
  margin: 1.5rem 0 0;
  padding: 0;
  border: 0;
}

.hms-pay-group legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.hms-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 8px;
  padding: 0;
  cursor: pointer;
}

.hms-choice input {
  margin: 0.35rem 0 0;
  flex: 0 0 auto;
}

.hms-choice__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.hms-choice__title {
  line-height: 1.35;
}

.hms-choice__hint {
  font-size: 0.85rem;
  color: var(--hms-muted);
  font-weight: 400;
  line-height: 1.4;
}

.hms-choice__hint a {
  color: var(--hms-accent);
}

.hms-pay-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hms-line);
}

.hms-pay-footer .hms-btn {
  margin-top: 12px;
}

.hms-pay-footer .hms-fine {
  margin: 12px 0 0;
}

.hms-quiz {
  border: 1px solid var(--hms-line);
  border-radius: 8px;
  padding: 14px 16px 16px;
  margin: 0 0 14px;
}

.hms-quiz legend {
  font-weight: 700;
  padding: 0 4px;
}

.hms-quiz__opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  margin: 4px 0;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hms-quiz__opt:hover {
  background: var(--hms-paper);
}

.hms-quiz__opt.is-correct,
.hms-quiz__opt.is-correct-answer {
  background: #e7f6ec;
  border-color: #2f7d4a;
  font-weight: 700;
}

.hms-quiz__opt.is-wrong {
  background: #fdeceb;
  border-color: #c52d2f;
}

.hms-quiz.is-ok {
  border-color: #2f7d4a;
  background: #f3faf5;
}

.hms-quiz.is-bad {
  border-color: #b33;
  background: #fff7f7;
}

.hms-quiz.is-missing {
  border-color: #c52d2f;
  box-shadow: 0 0 0 1px #c52d2f;
}

.hms-quiz__feedback {
  margin: 8px 0 0;
  font-size: 0.95rem;
}

.hms-exam-missing {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #f0c2c4;
  background: #fdeceb;
  color: #8a1f21;
  font-weight: 600;
}

.hms-industry-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
  max-height: none;
  overflow: visible;
}

.hms-pay-methods {
  margin: 1.5rem 0 0;
  padding: 0;
  border: 0;
}

.hms-course-price {
  font-size: 1.25rem;
  font-weight: 700;
}

.hms-pay-total {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.hms-pay-extras {
  display: grid;
  gap: 14px;
  margin: 18px 0 8px;
}

.hms-pay-extra {
  margin: 0;
  padding: 0;
  border: 0;
}

.hms-pay-extra legend {
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.hms-pay-extra .hms-quiz__opt {
  margin: 4px 0;
}

.hms-pay-extra .hms-quiz__opt small {
  display: inline;
  font-weight: 400;
  color: var(--hms-muted);
}

.hms-pay-extra .hms-quiz__opt small a {
  color: var(--hms-accent);
}

.hms-paper-address .hms-field {
  margin-top: 8px;
}

.hms-exam-pass {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.5rem;
  padding: 14px 16px 14px 14px;
  border-radius: var(--hms-radius);
  border: 1px solid #b6dfc0;
  background: #e7f6eb;
  color: #14532d;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
}

.hms-exam-pass::before {
  content: "";
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 4px;
  border-radius: 50%;
  background: #1a7f3c
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.4 11.2 3.2 8l1.15-1.15L6.4 8.9l5.25-5.25L12.8 4.8z'/%3E%3C/svg%3E")
    center / 0.85rem no-repeat;
}

.hms-exam-pass strong {
  font-weight: 700;
}

.hms-exam-pass__score {
  font-weight: 600;
}

.hms-warn {
  color: var(--hms-accent);
  font-weight: 600;
}

.hms-course-loading {
  padding: 40px 0;
  color: var(--hms-muted);
}

@media (max-width: 860px) {
  .hms-course__layout,
  .hms-course__layout.has-sidebar {
    grid-template-columns: 1fr;
  }

  .hms-course__layout.has-sidebar .hms-course__main {
    grid-column: 1;
  }

  .hms-course__sidebar:not([hidden]) {
    position: static;
    order: -1;
    padding: 12px 14px;
  }

  .hms-course-nav {
    display: none;
  }

  .hms-course-side-footer {
    margin-top: 12px;
  }

  .hms-course-progress__bar {
    margin-bottom: 0;
  }

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

  .hms-course-panel {
    padding: 20px 16px 24px;
  }
}
