/* Version History remains a separate Helios card below On This Page. */
.eleon-version-history-card{
  width:100%;
  min-width:0;
  margin-top:0;
  padding:16px;
  border:1px solid var(--helios-border,#2b3038);
  border-radius:12px;
  background:var(--helios-card,#17191e);
  box-shadow:none;
  color:inherit;
  overflow:hidden;
  box-sizing:border-box;
}

.evh-card-head{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 10px;
  padding:0 0 11px;
  border-bottom:1px solid rgba(255,255,255,.055);
  background:var(--helios-card,#17191e);
  color:inherit;
  font-size:16px;
}

.evh-card-head strong{
  display:block;
  color:inherit;
  font-weight:800;
}

.evh-card-icon{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  color:rgba(235,238,244,.82);
}

.evh-card-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.evh-card-rows{
  display:grid;
}

.evh-row{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  width:100%;
  min-width:0;
  min-height:44px;
  padding:8px 0;
  border:0;
  border-top:1px solid rgba(255,255,255,.055);
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
  box-sizing:border-box;
}

.evh-row:first-child{border-top:0}
.evh-row:hover{background:rgba(255,255,255,.025)}
.evh-version{font-size:13px;font-weight:800}
.evh-label{
  min-width:0;
  overflow:hidden;
  color:rgba(224,228,235,.66);
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}
.evh-row small{
  color:rgba(224,228,235,.45);
  font-size:10px;
  white-space:nowrap;
}
.evh-row em{
  grid-column:2;
  justify-self:start;
  padding:2px 5px;
  border:1px solid rgba(145,102,215,.34);
  border-radius:4px;
  background:rgba(116,76,180,.16);
  color:#bfa5e8;
  font:800 8px/1 sans-serif;
  font-style:normal;
}
.evh-row:has(em) small{
  grid-column:3;
  grid-row:1 / span 2;
}

.evh-view-all{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  min-height:40px;
  margin-top:9px;
  padding:0 11px;
  border:1px solid var(--helios-border,#303640);
  border-radius:8px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
}
.evh-view-all:hover{background:rgba(255,255,255,.025)}
.evh-view-all b{font-size:24px;line-height:1}

/* =========================================================
   CENTERED COMPARE POPUP
   ========================================================= */

.evh-modal[hidden]{display:none!important}
.evh-modal{
  position:fixed;
  inset:0;
  z-index:100000;
  display:grid;
  place-items:center;
  padding:20px;
}

.evh-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(6,8,12,.72);
  backdrop-filter:blur(4px);
}

.evh-modal-panel{
  position:relative;
  z-index:1;
  width:min(900px,calc(100vw - 32px));
  max-height:min(82vh,760px);
  overflow:hidden;
  border:1px solid var(--helios-border,#303640);
  border-radius:12px;
  background:var(--helios-card,#17191e);
  box-shadow:0 28px 80px rgba(0,0,0,.42);
  color:inherit;
}

.evh-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:15px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.evh-modal-head small,
.evh-modal-head strong{
  display:block;
}

.evh-modal-head small{
  margin-bottom:3px;
  color:rgba(224,228,235,.46);
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.evh-modal-head strong{
  font-size:16px;
}

.evh-modal-close{
  width:34px;
  height:34px;
  border:1px solid var(--helios-border,#303640);
  border-radius:8px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-size:22px;
}

.evh-modal-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 16px;
  border-bottom:1px solid rgba(255,255,255,.05);
  color:rgba(224,228,235,.52);
  font-size:11px;
}

.evh-modal-meta b{
  color:rgba(224,228,235,.68);
  font-weight:600;
}

.evh-modal-body{
  max-height:calc(82vh - 112px);
  overflow:auto;
  overflow-x:hidden;
}

.evh-diff-lines{
  font:11px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.evh-diff-line{
  display:grid;
  grid-template-columns:22px minmax(0,1fr);
  gap:5px;
  padding:5px 12px;
  border-left:3px solid transparent;
}

.evh-diff-prefix{
  font-weight:800;
  user-select:none;
}

.evh-diff-line code{
  min-width:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:inherit;
}

.evh-diff-line.is-remove{
  border-left-color:#b64f59;
  background:rgba(182,79,89,.10);
  color:#eaa0a6;
}

.evh-diff-line.is-add{
  border-left-color:#4d9e6e;
  background:rgba(77,158,110,.10);
  color:#a5d7b8;
}

.evh-diff-line.is-same{
  color:rgba(224,228,235,.40);
}

.evh-no-diff{
  padding:18px;
  color:rgba(224,228,235,.52);
  font-size:12px;
}

.eleon-history-modal-open{
  overflow:hidden;
}

@media(max-width:700px){
  .evh-modal{padding:10px}
  .evh-modal-panel{
    width:calc(100vw - 20px);
    max-height:88vh;
  }
  .evh-modal-meta{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* =========================================================
   2.3.5 â€” cleaner Helios Version History card
   ========================================================= */

.eleon-version-history-card{
  padding:15px!important;
  border-color:var(--helios-border,#2b3038)!important;
  border-radius:12px!important;
  background:var(--helios-card,#17191e)!important;
}

.evh-card-head{
  margin-bottom:4px!important;
  padding-bottom:11px!important;
  font-size:15px!important;
}

.evh-card-icon,
.evh-card-icon svg{
  width:21px!important;
  height:21px!important;
}

.evh-row{
  grid-template-columns:44px minmax(0,1fr) auto!important;
  gap:9px!important;
  min-height:52px!important;
  padding:9px 2px!important;
  border-radius:7px;
}
.evh-row:hover{
  background:rgba(255,255,255,.025)!important;
}

.evh-version{
  color:rgba(239,242,247,.94);
  font-size:13px!important;
  font-weight:800!important;
}

.evh-copy{
  display:block;
  min-width:0;
}
.evh-copy strong{
  display:block;
  overflow:hidden;
  color:rgba(225,229,236,.72);
  font-size:11px;
  font-weight:600;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.evh-copy small{
  display:block;
  margin-top:3px;
  color:rgba(225,229,236,.38);
  font-size:9px;
  white-space:nowrap;
}

.evh-row em{
  grid-column:auto!important;
  grid-row:auto!important;
  align-self:center;
  justify-self:end!important;
  padding:3px 6px!important;
  border:1px solid rgba(91,126,190,.28)!important;
  border-radius:999px!important;
  background:rgba(76,116,182,.12)!important;
  color:rgba(157,187,238,.82)!important;
  font:800 7px/1 sans-serif!important;
  letter-spacing:.05em;
}

.evh-row-arrow{
  justify-self:end;
  color:rgba(225,229,236,.28);
  font-size:19px;
}

.evh-view-all{
  min-height:38px!important;
  margin-top:8px!important;
  border-color:rgba(120,130,145,.22)!important;
  font-size:11px!important;
}
.evh-view-all b{
  color:rgba(225,229,236,.70);
  font-size:21px!important;
}

.evh-label,
.evh-row > small{
  display:none!important;
}


/* =========================================================
   2.3.6 â€” VERSION HISTORY HELIOS DARK / LIGHT
   ========================================================= */

.eleon-version-history-card{
  border-color:var(--est-border,#303640)!important;
  background:var(--est-card,#17191e)!important;
  color:var(--est-text,#eef1f5)!important;
  box-shadow:none!important;
}

.evh-card-head{
  border-bottom-color:color-mix(
    in srgb,
    var(--est-border,#303640) 45%,
    transparent
  )!important;
  background:var(--est-card,#17191e)!important;
  color:var(--est-text,#eef1f5)!important;
}

.evh-card-icon{
  color:var(--est-muted,#a4acb8)!important;
}

.evh-row{
  border-top-color:color-mix(
    in srgb,
    var(--est-border,#303640) 40%,
    transparent
  )!important;
  background:transparent!important;
  color:var(--est-text,#eef1f5)!important;
}

.evh-row:hover{
  background:var(--est-hover,rgba(120,166,255,.04))!important;
}

.evh-version{
  color:var(--est-text,#eef1f5)!important;
}

.evh-copy strong{
  color:var(--est-muted,#a4acb8)!important;
}

.evh-copy small{
  color:color-mix(
    in srgb,
    var(--est-muted,#a4acb8) 70%,
    transparent
  )!important;
}

.evh-row em{
  border-color:color-mix(
    in srgb,
    var(--est-accent,#78a6ff) 28%,
    transparent
  )!important;
  background:color-mix(
    in srgb,
    var(--est-accent,#78a6ff) 10%,
    transparent
  )!important;
  color:var(--est-accent,#78a6ff)!important;
}

.evh-row-arrow{
  color:color-mix(
    in srgb,
    var(--est-muted,#a4acb8) 45%,
    transparent
  )!important;
}

.evh-view-all{
  border-color:var(--est-border,#303640)!important;
  background:transparent!important;
  color:var(--est-text,#eef1f5)!important;
}

.evh-view-all:hover{
  background:var(--est-hover,rgba(120,166,255,.04))!important;
}

.evh-view-all b{
  color:var(--est-muted,#a4acb8)!important;
}

/* Compare popup */
.evh-modal-backdrop{
  background:rgba(6,8,12,.62)!important;
}

html.eleon-sidebar-light .evh-modal-backdrop{
  background:rgba(24,32,44,.30)!important;
}

.evh-modal-panel{
  border-color:var(--est-border,#303640)!important;
  background:var(--est-card,#17191e)!important;
  color:var(--est-text,#eef1f5)!important;
}

.evh-modal-head,
.evh-modal-meta{
  border-color:color-mix(
    in srgb,
    var(--est-border,#303640) 45%,
    transparent
  )!important;
}

.evh-modal-head small,
.evh-modal-meta{
  color:var(--est-muted,#a4acb8)!important;
}

.evh-modal-close{
  border-color:var(--est-border,#303640)!important;
  background:transparent!important;
  color:var(--est-text,#eef1f5)!important;
}

.evh-no-diff{
  color:var(--est-muted,#a4acb8)!important;
}

html.eleon-sidebar-light .evh-diff-line.is-remove{
  background:rgba(166,76,88,.055)!important;
  color:#8f4e59!important;
}

html.eleon-sidebar-light .evh-diff-line.is-add{
  background:rgba(67,135,91,.055)!important;
  color:#477d59!important;
}

html.eleon-sidebar-light .evh-diff-line.is-same{
  color:#8b93a0!important;
}


/* =========================================================
   VERSION HISTORY 2.4 â€” CLEAR COMPARE MODAL
   ========================================================= */

.evh-modal-panel{
  width:min(980px,calc(100vw - 32px))!important;
  border-radius:14px!important;
  overflow:hidden!important;
}

.evh-modal-head{
  align-items:flex-start!important;
  padding:18px 20px 16px!important;
}

.evh-modal-title-wrap{
  min-width:0;
}

.evh-modal-head small{
  margin-bottom:7px!important;
  color:var(--est-muted,#929aa7)!important;
  font-size:9px!important;
  font-weight:800;
  letter-spacing:.09em!important;
}

.evh-modal-head strong{
  color:var(--est-text,#eef1f5)!important;
  font-size:18px!important;
  font-weight:800!important;
}

.evh-modal-version-flow{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-top:10px;
}

.evh-version-pill{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border:1px solid var(--est-border,#303640);
  border-radius:7px;
  background:rgba(255,255,255,.018);
  color:var(--est-muted,#a4acb8);
  font-size:11px;
  font-weight:800;
}

.evh-version-pill.is-new{
  border-color:color-mix(in srgb,var(--est-accent,#78a6ff) 35%,var(--est-border,#303640));
  background:color-mix(in srgb,var(--est-accent,#78a6ff) 8%,transparent);
  color:var(--est-accent,#78a6ff);
}

.evh-version-arrow{
  color:var(--est-muted,#8c95a3);
  font-size:16px;
}

.evh-edit-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 7px;
  border:1px solid rgba(143,102,205,.30);
  border-radius:999px;
  background:rgba(143,102,205,.10);
  color:#b59adf;
  font-size:7px;
  font-weight:900;
  letter-spacing:.06em;
}

.evh-modal-meta{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  justify-content:start!important;
  gap:14px!important;
  padding:10px 20px!important;
  background:rgba(255,255,255,.012);
}

.evh-meta-date{
  color:var(--est-text,#eef1f5)!important;
  font-weight:700;
  white-space:nowrap;
}

.evh-meta-context{
  color:var(--est-muted,#929aa7)!important;
}

.evh-modal-body{
  padding:16px 20px 20px;
  max-height:calc(82vh - 150px)!important;
  background:var(--est-card,#17191e);
}

.evh-compare-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}

.evh-compare-stat{
  display:grid;
  grid-template-columns:28px auto;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:8px;
  min-height:58px;
  padding:9px 11px;
  border:1px solid var(--est-border,#303640);
  border-radius:9px;
  background:rgba(255,255,255,.012);
}

.evh-compare-stat > span{
  grid-row:1 / span 2;
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  border-radius:7px;
  font-size:14px;
  font-weight:900;
}

.evh-compare-stat strong{
  color:var(--est-text,#eef1f5);
  font-size:15px;
  line-height:1.1;
}

.evh-compare-stat small{
  color:var(--est-muted,#929aa7);
  font-size:9px;
}

.evh-compare-stat.is-remove > span{
  background:rgba(182,79,89,.10);
  color:#cf727c;
}
.evh-compare-stat.is-add > span{
  background:rgba(77,158,110,.10);
  color:#76b58e;
}
.evh-compare-stat.is-same > span{
  background:rgba(126,137,154,.08);
  color:#8f99a8;
}

.evh-compare-legend{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:14px;
  margin-bottom:9px;
  color:var(--est-muted,#929aa7);
  font-size:9px;
}

.evh-compare-legend span{
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.evh-compare-legend i{
  display:grid;
  place-items:center;
  width:17px;
  height:17px;
  border-radius:5px;
  font-style:normal;
  font-weight:900;
}

.evh-compare-legend .is-remove i{
  background:rgba(182,79,89,.10);
  color:#cf727c;
}
.evh-compare-legend .is-add i{
  background:rgba(77,158,110,.10);
  color:#76b58e;
}

.evh-diff-lines{
  display:grid;
  gap:7px;
  font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace!important;
}

.evh-diff-line{
  display:grid!important;
  grid-template-columns:78px minmax(0,1fr)!important;
  align-items:start;
  gap:10px!important;
  padding:10px 11px!important;
  border:1px solid transparent;
  border-left-width:3px!important;
  border-radius:8px;
}

.evh-diff-side{
  display:flex;
  align-items:center;
  gap:6px;
  padding-top:1px;
}

.evh-diff-prefix{
  display:grid;
  place-items:center;
  width:20px;
  height:20px;
  border-radius:5px;
  font-size:12px;
  font-weight:900;
}

.evh-diff-side small{
  font-family:inherit;
  font-size:8px;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.evh-diff-line code{
  display:block;
  padding:2px 0;
  color:var(--est-text,#eef1f5)!important;
  font-family:inherit;
  font-size:11px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.evh-diff-line.is-remove{
  border-color:rgba(182,79,89,.22)!important;
  border-left-color:#b64f59!important;
  background:rgba(182,79,89,.055)!important;
  color:#d77f87!important;
}
.evh-diff-line.is-remove .evh-diff-prefix{
  background:rgba(182,79,89,.12);
  color:#e18c94;
}

.evh-diff-line.is-add{
  border-color:rgba(77,158,110,.22)!important;
  border-left-color:#4d9e6e!important;
  background:rgba(77,158,110,.055)!important;
  color:#82bd98!important;
}
.evh-diff-line.is-add .evh-diff-prefix{
  background:rgba(77,158,110,.12);
  color:#93c9a7;
}

html.eleon-sidebar-light .evh-modal-body,
html.eleon-sidebar-light .evh-modal-panel{
  background:#fff!important;
}

html.eleon-sidebar-light .evh-modal-meta{
  background:#f8fafc!important;
}

html.eleon-sidebar-light .evh-version-pill{
  background:#f8fafc;
}

html.eleon-sidebar-light .evh-compare-stat{
  background:#f9fafc;
}

html.eleon-sidebar-light .evh-diff-line.is-remove{
  background:rgba(166,76,88,.045)!important;
}

html.eleon-sidebar-light .evh-diff-line.is-add{
  background:rgba(67,135,91,.045)!important;
}

html.eleon-sidebar-light .evh-diff-line code{
  color:#28313d!important;
}

@media(max-width:700px){
  .evh-modal-body{padding:12px!important}
  .evh-compare-summary{grid-template-columns:1fr 1fr 1fr}
  .evh-diff-line{grid-template-columns:1fr!important}
  .evh-modal-meta{grid-template-columns:1fr!important}
}


/* =========================================================
   2.4.1 â€” compact Helios modal close button
   ========================================================= */
.evh-modal-head{
  position:relative!important;
  padding-right:54px!important;
}

.evh-modal-close{
  position:absolute!important;
  top:14px!important;
  right:14px!important;
  width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  padding:0!important;
  border:1px solid color-mix(in srgb,var(--est-border,#303640) 75%,transparent)!important;
  border-radius:7px!important;
  background:transparent!important;
  color:var(--est-muted,#98a0ad)!important;
  box-shadow:none!important;
  font-size:0!important;
  line-height:1!important;
  cursor:pointer!important;
  transition:background .14s ease,border-color .14s ease,color .14s ease!important;
}

.evh-modal-close::before,
.evh-modal-close::after{
  content:"";
  position:absolute;
  width:11px;
  height:1.5px;
  border-radius:999px;
  background:currentColor;
}

.evh-modal-close::before{transform:rotate(45deg)}
.evh-modal-close::after{transform:rotate(-45deg)}

.evh-modal-close:hover,
.evh-modal-close:focus-visible{
  border-color:color-mix(in srgb,var(--est-accent,#78a6ff) 28%,var(--est-border,#303640))!important;
  background:color-mix(in srgb,var(--est-accent,#78a6ff) 5%,transparent)!important;
  color:var(--est-text,#eef1f5)!important;
  outline:none!important;
}

html.eleon-sidebar-light .evh-modal-close{
  background:#fff!important;
  color:#747e8c!important;
}

html.eleon-sidebar-light .evh-modal-close:hover,
html.eleon-sidebar-light .evh-modal-close:focus-visible{
  background:rgba(71,123,216,.055)!important;
  color:#2f5fae!important;
}


/* =========================================================
   2.4.2 â€” VERSION HISTORY ROW
   Version â†’ Date â†’ Created/Edited
   ========================================================= */

.evh-row{
  display:grid!important;
  grid-template-columns:44px auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-height:46px!important;
  padding:8px 2px!important;
}

.evh-version{
  grid-column:1!important;
  grid-row:1!important;
  align-self:center!important;
  white-space:nowrap!important;
}

.evh-date,
.evh-row small.evh-date{
  grid-column:2!important;
  grid-row:1!important;
  align-self:center!important;
  margin:0!important;
  color:color-mix(
    in srgb,
    var(--est-muted,#a4acb8) 72%,
    transparent
  )!important;
  font-size:9px!important;
  line-height:1!important;
  white-space:nowrap!important;
}

.evh-label{
  grid-column:3!important;
  grid-row:1!important;
  align-self:center!important;
  min-width:0!important;
  overflow:hidden!important;
  color:var(--est-muted,#a4acb8)!important;
  font-size:11px!important;
  font-weight:600!important;
  line-height:1.2!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Old EDITED badge is intentionally removed from the row.
   Created / Edited is now plain status text in column 3. */
.evh-row em{
  display:none!important;
}

/* Neutralize old positioning rules. */
.evh-row:has(em) small,
.evh-row small{
  grid-column:2!important;
  grid-row:1!important;
}

/* Light theme */
html.eleon-sidebar-light .evh-date{
  color:#7a8493!important;
}

html.eleon-sidebar-light .evh-label{
  color:#66717f!important;
}

@media(max-width:520px){
  .evh-row{
    grid-template-columns:40px auto minmax(0,1fr)!important;
    gap:7px!important;
  }

  .evh-date{
    font-size:8px!important;
  }

  .evh-label{
    font-size:10px!important;
  }
}


/* =========================================================
   2.4.3 â€” COMPACT SIDEBAR ROW
   Version | DD.MM.YYYY | Created/Edited
   Guaranteed to fit narrow Helios sidebar.
   ========================================================= */

.eleon-version-history-card .evh-row{
  display:grid!important;
  grid-template-columns:
    38px
    70px
    minmax(46px,1fr)!important;
  align-items:center!important;
  column-gap:6px!important;
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  padding:8px 0!important;
  box-sizing:border-box!important;
}

.eleon-version-history-card .evh-version{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  color:var(--est-text,#eef1f5)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}

.eleon-version-history-card .evh-date{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
  margin:0!important;
  overflow:visible!important;
  color:color-mix(
    in srgb,
    var(--est-muted,#a4acb8) 72%,
    transparent
  )!important;
  font-size:8.5px!important;
  font-weight:500!important;
  line-height:1!important;
  text-align:left!important;
  white-space:nowrap!important;
}

.eleon-version-history-card .evh-label{
  grid-column:3!important;
  grid-row:1!important;
  display:block!important;
  min-width:0!important;
  overflow:hidden!important;
  color:var(--est-muted,#a4acb8)!important;
  font-size:10px!important;
  font-weight:600!important;
  line-height:1!important;
  text-align:right!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* No redundant badge in compact row. */
.eleon-version-history-card .evh-row em{
  display:none!important;
}

/* Override every older small/date grid rule. */
.eleon-version-history-card .evh-row small,
.eleon-version-history-card .evh-row:has(em) small{
  grid-column:2!important;
  grid-row:1!important;
}

/* Light mode */
html.eleon-sidebar-light
.eleon-version-history-card
.evh-date{
  color:#7a8493!important;
}

html.eleon-sidebar-light
.eleon-version-history-card
.evh-label{
  color:#66717f!important;
}

/* Extra-narrow sidebar safety */
@media(max-width:520px){
  .eleon-version-history-card .evh-row{
    grid-template-columns:
      36px
      66px
      minmax(42px,1fr)!important;
    column-gap:5px!important;
  }

  .eleon-version-history-card .evh-date{
    font-size:8px!important;
  }

  .eleon-version-history-card .evh-label{
    font-size:9px!important;
  }
}


/* =========================================================
   2.4.4 â€” FINAL SIDEBAR ROW
   Version | Date | CREATED/EDITED badge
   ========================================================= */

.eleon-version-history-card .evh-row{
  display:grid!important;
  grid-template-columns:
    42px
    76px
    minmax(62px,1fr)!important;
  align-items:center!important;
  column-gap:7px!important;
  width:100%!important;
  min-width:0!important;
  min-height: 26px!important;
  padding:8px 0!important;
  box-sizing:border-box!important;
  margin: 0 -1px!important;
}

.eleon-version-history-card .evh-version{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  color:var(--est-text,#eef1f5)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1!important;
  white-space:nowrap!important;
}

.eleon-version-history-card .evh-date,
.eleon-version-history-card .evh-row small.evh-date{
  display:block!important;
  grid-column:2!important;
  grid-row:1!important;
  align-self:center!important;
  justify-self:start!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  color:color-mix(
    in srgb,
    var(--est-muted,#a4acb8) 78%,
    transparent
  )!important;
  font-size:8.5px!important;
  font-weight:500!important;
  line-height:1!important;
  white-space:nowrap!important;
  opacity:1!important;
}

.eleon-version-history-card .evh-status-badge{
  grid-column:3!important;
  grid-row:1!important;
  justify-self:end!important;
  align-self:center!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:20px!important;
  padding:0 7px!important;
  border:1px solid transparent!important;
  border-radius:999px!important;
  font:800 7px/1 sans-serif!important;
  letter-spacing:.05em!important;
  white-space:nowrap!important;
}

/* CREATED â€” blue */
.eleon-version-history-card .evh-status-badge.is-created{
  border-color:rgba(84,127,201,.34)!important;
  background:rgba(71,112,183,.12)!important;
  color:#8eb5f3!important;
}

/* EDITED â€” green */
.eleon-version-history-card .evh-status-badge.is-edited{
  border-color:rgba(72,145,100,.34)!important;
  background:rgba(59,128,86,.12)!important;
  color:#8dcea5!important;
}

/* Hide obsolete label/badge markup if browser cache still contains it. */
.eleon-version-history-card .evh-label,
.eleon-version-history-card .evh-row em{
  display:none!important;
}

/* Kill all older rules that could move/hide the date. */
.eleon-version-history-card .evh-row small,
.eleon-version-history-card .evh-row:has(em) small{
  grid-column:2!important;
  grid-row:1!important;
  display:block!important;
  margin:0!important;
  opacity:1!important;
}

/* Light theme */
html.eleon-sidebar-light
.eleon-version-history-card
.evh-date{
  color:#697584!important;
}

html.eleon-sidebar-light
.eleon-version-history-card
.evh-status-badge.is-created{
  border-color:rgba(63,111,190,.28)!important;
  background:rgba(63,111,190,.075)!important;
  color:#3e6fb7!important;
}

html.eleon-sidebar-light
.eleon-version-history-card
.evh-status-badge.is-edited{
  border-color:rgba(58,126,84,.28)!important;
  background:rgba(58,126,84,.075)!important;
  color:#3f7d56!important;
}

@media(max-width:520px){
  .eleon-version-history-card .evh-row{
    grid-template-columns:
      38px
      70px
      minmax(58px,1fr)!important;
    column-gap:6px!important;
  }

  .eleon-version-history-card .evh-date{
    font-size:8px!important;
  }

  .eleon-version-history-card .evh-status-badge{
    min-height:18px!important;
    padding:0 6px!important;
    font-size:6.5px!important;
  }
}


/* =========================================================
   2.4.5 â€” VERSION HISTORY INDEPENDENT FROM ON THIS PAGE
   ========================================================= */

/*
 * If Smart On This Page did not create its wrapper because the page
 * has no valid headings, Version History creates this fallback wrapper
 * inside the existing Helios right column.
 */
.eleon-history-only-sticky{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  position:sticky!important;
  top:82px!important;
  display:block!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}

/*
 * The fallback contains only Version History. No fake TOC card,
 * no article DOM changes, no parent overflow changes.
 */
.eleon-history-only-sticky
.eleon-version-history-card{
  width:100%!important;
  margin:0!important;
}

/*
 * Do not accidentally turn a normal article/content column into
 * a narrow sidebar if a theme selector matched too broadly.
 */
@media(min-width:901px){
  .eleon-history-only-sticky{
    min-width:180px!important;
  }
}

@media(max-width:900px){
  .eleon-history-only-sticky{
    position:relative!important;
    top:auto!important;
    width:100%!important;
  }
}


/* =========================================================
   2.4.6 â€” ABSOLUTE FALLBACK WHEN PAGE HAS NO RIGHT SIDEBAR
   ========================================================= */

/*
 * Native fallback: History is inside an existing Helios right column.
 */
.eleon-history-only-sticky.is-native-sidebar{
  width:100%!important;
  position:sticky!important;
  top:82px!important;
}

/*
 * Final fallback: custom page has NO right sidebar at all.
 * Create a standalone floating Version History card.
 */
.eleon-history-only-sticky.is-floating-history{
  position:fixed!important;
  z-index:8500!important;
  top:92px!important;
  right:18px!important;
  width:230px!important;
  max-width:calc(100vw - 36px)!important;
  max-height:calc(100vh - 112px)!important;
  margin:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:0!important;
  pointer-events:auto!important;
  box-sizing:border-box!important;
  scrollbar-width:thin;
  scrollbar-color:
    rgba(140,150,165,.30)
    transparent;
}

.eleon-history-only-sticky.is-floating-history
.eleon-version-history-card{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  box-shadow:
    0 14px 40px rgba(0,0,0,.16)!important;
}

/*
 * On wide desktop layouts reserve enough visual room so History does
 * not cover article content. This only applies when floating fallback
 * is actually used.
 */
@media(min-width:1250px){
  html.eleon-has-floating-history body{
    --eleon-history-rail-width:250px;
  }

  html.eleon-has-floating-history
  main,
  html.eleon-has-floating-history
  .main-content,
  html.eleon-has-floating-history
  .page-content{
    /*
     * Do NOT force a width. Only add right breathing room when the
     * theme container naturally supports it.
     */
    scroll-padding-right:
      var(--eleon-history-rail-width);
  }
}

/*
 * Medium screens: card stays visible but slightly narrower.
 */
@media(max-width:1249px) and (min-width:901px){
  .eleon-history-only-sticky.is-floating-history{
    right:12px!important;
    width:210px!important;
  }
}

/*
 * Small screens: floating rail would cover content, so put History
 * at the bottom as a normal fixed-width-safe card.
 */
@media(max-width:900px){
  .eleon-history-only-sticky.is-floating-history{
    position:relative!important;
    z-index:auto!important;
    top:auto!important;
    right:auto!important;
    width:auto!important;
    max-width:none!important;
    max-height:none!important;
    margin:24px 14px!important;
    overflow:visible!important;
  }
}
