:root {
  --hlb-ek-blue: #173b8f;
  --hlb-ek-blue-dark: #102f73;
  --hlb-ek-red: #d71920;
  --hlb-ek-yellow: #f4bd22;
  --hlb-ek-text: #17233d;
  --hlb-ek-muted: #5e6b7d;
  --hlb-ek-border: #dfe5ec;
  --hlb-ek-soft: #f7f9fc;
}

.hlb-ek-box,
.hlb-ek-cta,
.hlb-ek-internal-links,
.hlb-ek-faq,
.hlb-ek-step,
.hlb-ek-btn {
  box-sizing: border-box;
}

/* Classic Editor toolbar */
.hlb-ek-classic-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.hlb-ek-classic-panel strong {
  color: var(--hlb-ek-blue);
}

.hlb-ek-classic-panel select {
  min-width: 260px;
  max-width: 100%;
}

/* Editorial boxes: avoid nested cards and excessive framing */
body .hlb-ek-box {
  margin: 24px 0;
  padding: 16px 0 16px 18px;
  border: 0;
  border-left: 4px solid var(--hlb-ek-blue);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .hlb-ek-box h3,
body .hlb-ek-cta h3,
body .hlb-ek-step h3 {
  margin-top: 0 !important;
}

body .hlb-ek-box h3 {
  margin-bottom: 8px !important;
  color: var(--hlb-ek-text) !important;
}

body .hlb-ek-summary {
  padding: 18px 20px;
  border: 1px solid #dbe6f2;
  border-left: 4px solid var(--hlb-ek-blue);
  border-radius: 8px;
  background: #f8fbff;
}

body .hlb-ek-risk {
  border-left-color: var(--hlb-ek-red);
}

body .hlb-ek-checklist {
  border-left-color: var(--hlb-ek-blue);
}

body .hlb-ek-checklist ul,
body .hlb-ek-summary ul,
body .hlb-ek-risk ul {
  margin-bottom: 0;
}

/* Tables */
body .hlb-ek-table {
  margin: 24px 0 28px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body .hlb-ek-table table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--hlb-ek-border);
  font-size: 15.5px;
}

body .hlb-ek-table th,
body .hlb-ek-table td {
  padding: 12px 14px;
  border: 1px solid var(--hlb-ek-border);
  vertical-align: top;
}

body .hlb-ek-table th {
  background: #f3f6f9;
  color: #111827;
  font-weight: 800;
}

/* Process steps */
body .hlb-ek-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

body .hlb-ek-step {
  position: relative;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--hlb-ek-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

body .hlb-ek-step h3 {
  color: var(--hlb-ek-blue) !important;
  font-size: 18px !important;
}

/* CTA: HLB light blue/yellow visual system */
body .hlb-ek-cta {
  position: relative;
  margin: 30px 0;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: var(--hlb-ek-soft);
  color: var(--hlb-ek-text);
  box-shadow: 0 8px 24px rgba(18, 45, 82, 0.06);
}

body .hlb-ek-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--hlb-ek-yellow);
}

body .hlb-ek-cta-label {
  margin: 0 0 7px !important;
  color: var(--hlb-ek-blue) !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body .hlb-ek-cta h3 {
  margin: 0 0 10px !important;
  color: var(--hlb-ek-text) !important;
  font-size: 23px !important;
  line-height: 1.35;
}

body .hlb-ek-cta p {
  color: var(--hlb-ek-text) !important;
}

body .hlb-ek-cta-actions,
body .hlb-ek-cta .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

body .hlb-ek-btn,
body .hlb-ek-cta .wp-block-button__link,
body .hlb-ek-button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 7px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none !important;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

body .hlb-ek-btn:hover,
body .hlb-ek-btn:focus-visible,
body .hlb-ek-cta .wp-block-button__link:hover,
body .hlb-ek-cta .wp-block-button__link:focus-visible {
  transform: translateY(-1px);
}

body .hlb-ek-btn-primary,
body .hlb-ek-cta .wp-block-button:first-child .wp-block-button__link,
body .hlb-ek-button .wp-block-button__link {
  border: 1px solid var(--hlb-ek-yellow) !important;
  background: var(--hlb-ek-yellow) !important;
  color: var(--hlb-ek-text) !important;
}

body .hlb-ek-btn-primary:hover,
body .hlb-ek-btn-primary:focus-visible,
body .hlb-ek-cta .wp-block-button:first-child .wp-block-button__link:hover,
body .hlb-ek-cta .wp-block-button:first-child .wp-block-button__link:focus-visible {
  background: #e5ae11 !important;
  border-color: #e5ae11 !important;
  color: var(--hlb-ek-text) !important;
}

body .hlb-ek-btn-secondary,
body .hlb-ek-cta .wp-block-button:nth-child(2) .wp-block-button__link {
  border: 1px solid var(--hlb-ek-blue) !important;
  background: #ffffff !important;
  color: var(--hlb-ek-blue) !important;
}

body .hlb-ek-btn-secondary:hover,
body .hlb-ek-btn-secondary:focus-visible,
body .hlb-ek-cta .wp-block-button:nth-child(2) .wp-block-button__link:hover,
body .hlb-ek-cta .wp-block-button:nth-child(2) .wp-block-button__link:focus-visible {
  background: #edf4fc !important;
  color: var(--hlb-ek-blue-dark) !important;
}

body .hlb-ek-cta-form {
  margin: 16px 0 0 !important;
  font-size: 15px;
}

body .hlb-ek-cta-form a {
  color: var(--hlb-ek-blue) !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px;
}

/* FAQ: compact vertical rhythm */
body .hlb-ek-faq {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0 24px;
}

body .hlb-ek-faq-item {
  margin: 0 !important;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hlb-ek-border);
  border-radius: 7px;
  background: #ffffff;
}

body .hlb-ek-faq-item + .hlb-ek-faq-item {
  margin-top: 0 !important;
}

body .hlb-ek-faq-item summary {
  min-height: auto;
  padding: 11px 14px;
  cursor: pointer;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.42;
  list-style-position: inside;
}

body .hlb-ek-faq-item summary::marker {
  font-size: 11px;
}

body .hlb-ek-faq-item > *:not(summary) {
  margin: 0 !important;
  padding: 0 14px 12px;
  line-height: 1.65;
}

body .hlb-ek-faq-item[open] summary {
  padding-bottom: 7px;
  color: var(--hlb-ek-blue);
}

/* Related content: no pill cards; use clear editorial links */
body .hlb-ek-internal-links {
  margin: 30px 0 18px;
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid var(--hlb-ek-border);
  border-radius: 0;
  background: transparent;
}

body .hlb-ek-internal-links p {
  margin: 0 0 9px !important;
  color: var(--hlb-ek-text) !important;
}

body .hlb-ek-internal-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 24px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body .hlb-ek-internal-links li {
  margin: 0 !important;
}

body .hlb-ek-internal-links a,
body .hlb-related-inline a {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--hlb-ek-blue) !important;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 4px;
  transition: color 0.18s ease, text-decoration-thickness 0.18s ease;
}

body .hlb-ek-internal-links a::after,
body .hlb-related-inline a::after {
  content: " →";
}

body .hlb-ek-internal-links a:hover,
body .hlb-ek-internal-links a:focus-visible,
body .hlb-related-inline a:hover,
body .hlb-related-inline a:focus-visible {
  color: var(--hlb-ek-red) !important;
  text-decoration-thickness: 2px !important;
}

/* Keep editor preview readable */
.editor-styles-wrapper .hlb-ek-box,
.editor-styles-wrapper .hlb-ek-cta,
.editor-styles-wrapper .hlb-ek-internal-links,
.editor-styles-wrapper .hlb-ek-faq,
.editor-styles-wrapper .hlb-ek-steps {
  max-width: 900px;
}

@media (max-width: 760px) {
  body .hlb-ek-steps,
  body .hlb-ek-internal-links ul {
    grid-template-columns: 1fr;
  }

  body .hlb-ek-box {
    padding-left: 14px;
  }

  body .hlb-ek-summary,
  body .hlb-ek-cta,
  body .hlb-ek-step {
    padding: 18px;
  }

  body .hlb-ek-cta h3 {
    font-size: 21px !important;
  }

  body .hlb-ek-cta-actions,
  body .hlb-ek-cta .wp-block-buttons {
    flex-direction: column;
  }

  body .hlb-ek-btn,
  body .hlb-ek-cta .wp-block-button,
  body .hlb-ek-cta .wp-block-button__link {
    width: 100%;
  }

  body .hlb-ek-faq {
    gap: 4px;
  }

  body .hlb-ek-faq-item summary {
    padding: 10px 12px;
    font-size: 15px;
  }

  body .hlb-ek-faq-item > *:not(summary) {
    padding: 0 12px 11px;
    font-size: 15px;
  }

  body .hlb-ek-table table {
    min-width: 680px;
  }
}

/* v1.1.1: related-content block is intentionally smaller than article body. */
body .hlb-ek-internal-links,
body .hlb-ek-internal-links p,
body .hlb-ek-internal-links ul,
body .hlb-ek-internal-links li,
body .hlb-ek-internal-links a {
  font-size: 14px !important;
}

body .hlb-ek-internal-links p {
  line-height: 1.45;
}

body .hlb-ek-internal-links li,
body .hlb-ek-internal-links a {
  line-height: 1.55;
}
