/* Smart Search v2: all rules are scoped; no fixed or overlay UI. */
.mscexb-archive-search.smart-search-page { position: relative; clear: both; padding-top: 16px; padding-bottom: 54px; color: #2d2b38; }
.mscexb-archive-search *, .mscexb-archive-search *::before, .mscexb-archive-search *::after { box-sizing: border-box; }
.mscexb-archive-search .smart-search-form { position: relative; display: block !important; clear: both; width: 100%; margin: 0 0 18px; padding: 0; background: transparent; }
.mscexb-archive-search .smart-search-primary-row { position: relative; display: flex !important; align-items: stretch; width: 100%; gap: 10px; }
.mscexb-archive-search .smart-search-form input, .mscexb-archive-search .smart-search-form select { display: block; min-width: 0; height: 48px; padding: 0 14px; color: #302c3d; background: #fff; border: 1px solid #d8d1e2; border-radius: 10px; outline: none; font: inherit; }
.mscexb-archive-search .smart-search-primary-row input { flex: 1 1 auto; width: 1%; max-width: none; }
.mscexb-archive-search .smart-search-form input:focus, .mscexb-archive-search .smart-search-form select:focus { border-color: #7b309b; box-shadow: 0 0 0 3px rgba(123,48,155,.13); }
.mscexb-archive-search .smart-search-form button { flex: 0 0 auto; height: 48px; padding: 0 21px; color: #fff; background: #6f2394; border: 1px solid #6f2394; border-radius: 10px; font: 700 15px/1 inherit; cursor: pointer; transition: background .18s ease,transform .18s ease; }
.mscexb-archive-search .smart-search-form button:hover { background: #572075; transform: translateY(-1px); }
.mscexb-archive-search .smart-search-filters { margin-top: 8px; padding: 0; border: 0; }
.mscexb-archive-search .smart-search-filters summary { width: max-content; max-width: 100%; padding: 5px 0; color: #6f2394; font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; }
.mscexb-archive-search .smart-search-filters summary span { color: #7d7487; font-weight: 400; }
.mscexb-archive-search .smart-search-filter-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; padding: 10px 0 2px; }
.mscexb-archive-search .smart-search-filter-row select { width: 100%; height: 42px; font-size: 14px; }
.mscexb-archive-search .smart-search-filters:not([open]) .smart-search-filter-row { display: none; }
.smart-search-summary, .smart-search-notice { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: 0 0 20px; padding: 14px 17px; color: #443555; background: #faf7fc; border-left: 4px solid #7b309b; border-radius: 7px; line-height: 1.5; }
.smart-search-summary span, .smart-search-notice span { color: #70677c; }
.smart-search-notice-error { color: #8e1f2c; border-left-color: #bd2336; background: #fff6f6; }
.smart-search-results { display: grid; gap: 14px; }
.smart-search-result { padding: 21px 23px 18px; background: #fff; border: 1px solid #e3deea; border-radius: 14px; box-shadow: 0 7px 22px rgba(36,27,52,.055); }
.smart-search-result-topline { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.smart-search-category { color: #6f2394; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.smart-search-score { padding: 3px 9px; color: #5f4d6e; background: #f1eafa; border-radius: 999px; font-size: 12px; font-weight: 700; }
.smart-search-result h2 { margin: 0 0 11px; font-size: 21px; line-height: 1.27; }
.smart-search-result h2 a { color: #392157; text-decoration: none; }
.smart-search-result h2 a:hover, .smart-search-open:hover { color: #7b309b; text-decoration: underline; }
.smart-search-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; color: #635d6c; font-size: 13px; }
.smart-search-counts strong { color: #3f354c; }
.smart-search-counts span { padding-left: 10px; border-left: 1px solid #ddd5e5; }
.smart-search-contexts { margin: 0; }
.smart-search-context { margin: 0 0 10px; color: #4d4854; font-size: 15px; line-height: 1.62; }
.smart-search-context mark { padding: 1px 2px; color: inherit; background: #ffe78a; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.smart-search-contexts details { margin-top: 10px; padding: 11px 13px 3px; background: #faf9fb; border: 1px solid #ece8f0; border-radius: 8px; }
.smart-search-contexts summary { color: #6f2394; font-weight: 700; cursor: pointer; }
.smart-search-description { margin: 0 0 12px; color: #5e5864; line-height: 1.6; }
.smart-search-result footer { margin-top: 13px; }
.smart-search-open { color: #6f2394; font-size: 14px; font-weight: 700; text-decoration: none; }
.smart-search-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 25px; }
.smart-search-pagination a { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; color: #633080; background: #fff; border: 1px solid #d9cce2; border-radius: 8px; font-weight: 700; text-decoration: none; }
.smart-search-pagination a[aria-current="page"], .smart-search-pagination a:hover { color: #fff; background: #6f2394; border-color: #6f2394; }
.smart-search-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.smart-search-sidebar { margin: 15px 0; }
.smart-search-sidebar form { display: flex; gap: 7px; }
.smart-search-sidebar input { width: 100%; min-width: 0; padding: 10px 11px; color: #302c3d; border: 1px solid #d8d1e2; border-radius: 7px; font: inherit; }
.smart-search-sidebar button { padding: 8px 11px; color: #fff; background: #6f2394; border: 0; border-radius: 7px; font: 700 13px/1 inherit; cursor: pointer; }
@media (max-width:720px) { .mscexb-archive-search.smart-search-page { padding-top:16px; } .mscexb-archive-search .smart-search-primary-row { display:block !important; } .mscexb-archive-search .smart-search-primary-row input { width:100%; margin-bottom:8px; } .mscexb-archive-search .smart-search-primary-row button { width:100%; } .mscexb-archive-search .smart-search-filter-row { grid-template-columns:1fr; } .smart-search-result { padding:18px 16px; } .smart-search-result h2 { font-size:19px; } .smart-search-result-topline { align-items:flex-start; } }

/* Highlight injected only after opening an article through Smart Search. */
.editor-content mark.smart-search-article-mark,
article mark.smart-search-article-mark {
  padding: 1px 2px;
  color: inherit;
  background: #ffe58a;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Compact search launcher: outside the content flow and above devtheme's go-up control. */
.smart-search-fab {
  position: fixed;
  right: 24px;
  bottom: 112px;
  z-index: 90;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #6f2394;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(65, 23, 84, .32);
  font: 400 36px/1 Arial, sans-serif;
  cursor: pointer;
}
.smart-search-fab:hover, .smart-search-fab:focus-visible { background: #572075; transform: scale(1.05); }
.smart-search-panel[hidden] { display: none !important; }
.smart-search-panel {
  position: fixed;
  right: 24px;
  bottom: 178px;
  z-index: 91;
  width: min(350px, calc(100vw - 32px));
  padding: 17px;
  color: #2d2b38;
  background: #fff;
  border: 1px solid #e2d9e8;
  border-radius: 13px;
  box-shadow: 0 14px 38px rgba(36, 22, 48, .24);
}
.smart-search-panel, .smart-search-panel *, .smart-search-panel *::before, .smart-search-panel *::after { box-sizing: border-box; }
.smart-search-panel form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.smart-search-panel-title { grid-column: 1 / -1; padding-right: 24px; color: #392157; font-weight: 700; }
.smart-search-panel input { width: 100%; min-width: 0; height: 43px; padding: 0 11px; color: #302c3d; border: 1px solid #d8d1e2; border-radius: 8px; font: inherit; }
.smart-search-panel button[type="submit"] { height: 43px; padding: 0 13px; color: #fff; background: #6f2394; border: 0; border-radius: 8px; font: 700 14px/1 inherit; cursor: pointer; }
.smart-search-close { position: absolute; top: 8px; right: 8px; width: 25px; height: 25px; padding: 0; color: #6f2394; background: transparent; border: 0; border-radius: 50%; font: 700 20px/1 Arial, sans-serif; cursor: pointer; }
@media (max-width:720px) { .smart-search-fab { right: 16px; bottom: 82px; width: 50px; height: 50px; font-size: 32px; } .smart-search-panel { right: 16px; bottom: 140px; } }
