/* Scoped to the existing knowledgebase. Avada and the existing plugin remain untouched. */
.d4y-kb {
  --d4y-modern-blue: var(--d4y-primary, #0054a0);
  --d4y-modern-ink: #142a42;
  --d4y-modern-muted: #53677c;
  --d4y-modern-line: #dce5ef;
  --d4y-modern-soft: #f5f8fc;
  box-sizing: border-box;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 36px);
  border: 1px solid var(--d4y-modern-line);
  border-radius: 24px;
  background: #fff;
  color: var(--d4y-modern-ink);
  box-shadow: 0 16px 48px rgba(16, 49, 79, .075);
}
.d4y-kb *, .d4y-kb *::before, .d4y-kb *::after { box-sizing: border-box; }
.d4y-kb .d4y-kb__header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 32px;
  padding: clamp(22px, 4vw, 44px);
  border-radius: 20px;
  background: linear-gradient(118deg, #063d77 0%, #0054a0 75%, #176abb 100%);
  color: #fff;
  overflow: hidden;
}
.d4y-kb .d4y-modern__eyebrow {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  color: #c7e6ff;
}
.d4y-kb .d4y-kb__title {
  margin: 0 !important;
  color: #fff !important;
  font-size: clamp(27px, 4vw, 42px) !important;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.16;
}
.d4y-kb .d4y-modern__intro { margin: 12px 0 24px; color: #e4f2ff; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.5; }
.d4y-kb .d4y-kb__controls { display: block !important; width: 100%; max-width: 690px; margin: 0 !important; }
.d4y-kb .d4y-kb__search { width: 100% !important; height: 56px !important; max-height: none !important; position: relative !important; }
.d4y-kb .d4y-kb__search-input[type="search"] {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  padding: 0 54px 0 18px !important;
  margin: 0 !important;
  border: 2px solid transparent !important;
  border-radius: 13px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(5, 29, 60, .14);
  color: var(--d4y-modern-ink) !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
}
.d4y-kb .d4y-kb__search-input::placeholder { color: #66798c; opacity: 1; }
.d4y-kb .d4y-kb__search-input:focus { border-color: #94d2ff !important; outline: 3px solid rgba(255,255,255,.5) !important; outline-offset: 2px; }
.d4y-kb .d4y-modern__clear { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 9px; background: #ecf3f9; color: #294767; font-size: 27px; line-height: 1; cursor: pointer; }
.d4y-kb .d4y-modern__clear:hover { background: #dcecf8; }
.d4y-kb .d4y-modern__clear[hidden] { display: none !important; }
.d4y-kb .d4y-modern__section-label { margin: 0 0 18px; }
.d4y-kb .d4y-modern__section-label[hidden] { display: none !important; }
.d4y-kb .d4y-modern__section-label span { display: block; color: var(--d4y-modern-blue); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.d4y-kb .d4y-modern__section-label h3 { margin: 5px 0 0; color: var(--d4y-modern-ink); font-size: clamp(20px, 2.5vw, 25px); line-height: 1.2; }
.d4y-kb .d4y-kb__cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 10px; }
.d4y-kb .d4y-kb__cat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 156px;
  padding: 20px;
  gap: 14px;
  border: 1px solid var(--d4y-modern-line);
  border-radius: 16px;
  background: #fff;
  color: var(--d4y-modern-ink);
  text-align: left;
  box-shadow: 0 3px 12px rgba(16,49,79,.035);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.d4y-kb .d4y-kb__cat::after { content: '↗'; position: absolute; right: 19px; top: 19px; color: var(--d4y-modern-blue); font-size: 21px; line-height: 1; }
.d4y-kb .d4y-kb__cat:hover, .d4y-kb .d4y-kb__cat:focus-visible { transform: translateY(-3px); border-color: #83b7e1; background: #fff; box-shadow: 0 12px 28px rgba(0,84,160,.1); }
.d4y-kb .d4y-kb__cat.active { border-color: #82b5df; background: #f5faff; box-shadow: none; }
.d4y-kb .d4y-kb__cat[hidden] { display: none !important; }
.d4y-kb .d4y-kb__cat-icon, .d4y-kb[data-icon-gradient="1"] .d4y-kb__cat-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 11px; background: #e8f3fd; color: var(--d4y-modern-blue); }
.d4y-kb .d4y-kb__cat-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--d4y-modern-ink); font-size: 17px; line-height: 1.35; font-weight: 750; }
.d4y-kb .d4y-kb__cat-count { padding: 2px 8px; border: 0; border-radius: 7px; background: #eaf1f8; color: #355b7e; font-size: 12px; }
.d4y-kb .d4y-kb__cat-desc { color: var(--d4y-modern-muted); font-size: 13px; }
.d4y-kb .d4y-kb__cat--all { background: #edf6ff; border-color: #cee3f6; }
.d4y-kb .d4y-kb__back { margin: 2px 0 17px; padding: 9px 15px; border: 1px solid var(--d4y-modern-line); border-radius: 9px; background: #fff; color: var(--d4y-modern-blue); font-size: 14px; font-weight: 700; }
.d4y-kb .d4y-kb__back[hidden] { display: none !important; }
.d4y-kb .d4y-modern__results-bar { margin: 0 0 12px; color: var(--d4y-modern-muted); font-size: 13px; font-weight: 650; }
.d4y-kb .d4y-modern__results-bar[hidden] { display: none !important; }
.d4y-kb .d4y-kb__results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.d4y-kb .d4y-kb__empty { grid-column: 1 / -1; padding: 24px; border: 1px dashed #bdd1e2; border-radius: 13px; background: var(--d4y-modern-soft); color: var(--d4y-modern-muted); text-align: center; }
.d4y-kb .d4y-kb__card { min-width: 0; height: auto !important; padding: 20px; gap: 8px; border: 1px solid var(--d4y-modern-line); border-radius: 14px; background: #fff; box-shadow: none; overflow: visible; }
.d4y-kb .d4y-kb__card:hover { border-color: #8ebee3; background: #fff; }
.d4y-kb .d4y-kb__card-title { margin: 0; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.d4y-kb .d4y-kb__card-title a { color: var(--d4y-modern-ink); }
.d4y-kb .d4y-kb__card-title a:hover { color: var(--d4y-modern-blue); }
.d4y-kb .d4y-kb__excerpt { color: var(--d4y-modern-muted); line-height: 1.55; overflow-wrap: anywhere; }
.d4y-kb .d4y-kb__meta { color: #63788c; }
.d4y-kb .d4y-kb__readmore { margin-top: 8px; color: var(--d4y-modern-blue); }
.d4y-kb :is(button, a):focus-visible { outline: 3px solid #69b7f3; outline-offset: 3px; }
@media (max-width: 800px) { .d4y-kb .d4y-kb__cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .d4y-kb { padding: 12px; border-radius: 17px; }
  .d4y-kb .d4y-kb__header { margin-bottom: 25px; padding: 25px 19px; border-radius: 14px; }
  .d4y-kb .d4y-modern__intro { margin-bottom: 18px; }
  .d4y-kb .d4y-kb__controls { max-width: none; }
  .d4y-kb .d4y-kb__search { height: 56px !important; max-height: none !important; flex: none !important; }
  .d4y-kb .d4y-kb__search-input[type="search"] { height: 56px !important; min-height: 56px !important; max-height: 56px !important; padding: 0 54px 0 15px !important; }
  .d4y-kb .d4y-kb__cats, .d4y-kb .d4y-kb__results { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .d4y-kb .d4y-kb__cat { min-height: 95px; padding: 15px 17px; flex-direction: row; align-items: center; gap: 13px; }
  .d4y-kb .d4y-kb__cat::after { position: static; margin-left: auto; align-self: center; }
  .d4y-kb .d4y-kb__cat-name { font-size: 15px; }
  .d4y-kb .d4y-kb__cat-desc { display: none; }
  .d4y-kb .d4y-kb__cat-icon { flex: 0 0 44px; }
  .d4y-kb .d4y-kb__card { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) { .d4y-kb .d4y-kb__cat, .d4y-kb .d4y-kb__card { transition: none; animation: none; } }
