/* Public overview on the impact desk sign-in page.
   The list rules are copied from page.css (#ovCats, #ovTop, #ovStack ->
   #pubCats, #pubTop, #pubStack) so the panel looks like the Overview;
   regenerate them if those rules change. */

.ov-dash #pubCats .ovb {
  row-gap: 6px;
  padding: 8px 10px 11px;
}

.ov-dash #pubCats .ovb .tr,
.ov-dash #pubTop > .ovb:not(.big) .tr {
  display: block;
  grid-column: 1/-1;
  position: relative;
  height: 2px;
  margin: 2px 0 7px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.ov-dash #pubCats .ovb .ld {
  display: none;
}

.ov-dash #pubCats .ovb {
  padding: 8px 10px;
}

.ov-dash #pubCats .ovb .nt {
  flex: 0 1 auto;
}

.ov-dash #pubCats .ovb .vl > span {
  display: none;
}

.ov-dash #pubCats .ovb:hover .nt,
.ov-dash #pubCats .ovb.hl .nt {
  color: color-mix(in srgb, var(--c, #e2622e) 30%, #fff);
}

.ov-dash #pubCats .ovb {
  isolation: isolate;
}

.ov-dash #pubCats .ovb:hover,
.ov-dash #pubCats .ovb.hl {
  background: none;
}

.ov-dash #pubCats .ovb::before {
  display: block;
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  left: 4px;
  right: 4px;
  top: 3px;
  bottom: 3px;
  width: auto;
  border-radius: 11px;
  transform: none;
  box-shadow: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--c, #e2622e) 17%, transparent),
    color-mix(in srgb, var(--c, #e2622e) 6%, transparent) 60%,
    color-mix(in srgb, var(--c, #e2622e) 2%, transparent)
  );
  filter: blur(1.5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ov-dash #pubCats .ovb:hover::before,
.ov-dash #pubCats .ovb.hl::before {
  opacity: 1;
  box-shadow: none;
}

.ov-dash #pubTop {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 10px;
  align-content: start;
}

.ov-dash #pubTop > .ovb {
  grid-column: 1/-1;
}

.ov-dash #pubTop > .ovb.big {
  grid-column: span 2;
}

.ov-dash #pubTop[data-big='1'] > .ovb.big {
  grid-column: span 6;
}

.ov-dash #pubTop[data-big='2'] > .ovb.big {
  grid-column: span 3;
}

.ov-dash #pubTop > .ovb:not(.big) {
  row-gap: 7px;
  padding: 9px 10px 10px;
  border-radius: 9px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.05);
}

.ov-dash #pubTop > .ovb.big + .ovb:not(.big) {
  border-top: 0;
}

.ov-dash #pubTop > .ovb:not(.big) .tr {
  display: block;
  grid-column: 1/-1;
  height: 3px;
}

.ov-dash #pubTop .ovb .tr::after {
  display: none;
}

.ov-dash #pubTop > .ovb:not(.big) .tr b::after {
  width: 4px;
  height: 4px;
}

.ov-dash #pubTop .ovb.big {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'rk sh' 'nm nm' 'ct ct' 'mx mx' 'tc tc';
  align-items: center;
  row-gap: 7px;
  margin-bottom: 12px;
  padding: 12px 13px 11px;
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.22s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.ov-dash #pubTop .ovb.big.top1 {
  border-color: rgba(226, 59, 46, 0.3);
  background: linear-gradient(180deg, rgba(226, 59, 46, 0.16), rgba(226, 59, 46, 0.03));
}

.ov-dash #pubTop .ovb.big:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

.ov-dash #pubTop .ovb.big.top1:hover {
  border-color: rgba(255, 120, 95, 0.5);
}

.ov-dash #pubTop .ovb.big .rk {
  display: block;
  grid-area: rk;
  font:
    700 9.5px/1 JetBrains Mono,
    ui-monospace,
    Menlo,
    monospace;
  letter-spacing: 0.12em;
  color: var(--tert);
}

.ov-dash #pubTop .ovb.big.top1 .rk {
  color: #ff8a72;
}

.ov-dash #pubTop .ovb.big .nm {
  grid-area: nm;
  font-size: 13px;
  color: var(--ink);
}

.ov-dash #pubTop .ovb.big .nm img {
  height: 14px;
}

.ov-dash #pubTop .ovb.big .vl {
  display: contents;
}

.ov-dash #pubTop .ovb.big .vl > span {
  grid-area: sh;
  justify-self: end;
  opacity: 1;
  transform: none;
  font-size: 10px;
  color: rgba(255, 217, 207, 0.7);
}

.ov-dash #pubTop .ovb.big .vl > b {
  grid-area: ct;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.ov-dash #pubTop .ovb.big.top1 .vl > b {
  color: #ffd0c0;
  text-shadow: 0 0 22px rgba(255, 120, 95, 0.35);
}

.ov-dash #pubTop .ovb.big .ovb-dl {
  top: 58px;
  right: 13px;
}

.ov-dash #pubTop > .ov-note {
  grid-column: 1/-1;
}

#pubTop .ovb.big.settled {
  animation: none;
}

.ov-dash.intro2 #pubTop .ovb.big.rise {
  animation: cardIn 0.8s cubic-bezier(0.2, 0.85, 0.25, 1) backwards;
  animation-delay: calc(var(--b, 0ms) + var(--i, 0) * 110ms);
  transform-origin: 50% 100%;
}

.ov-dash.intro2 #pubTop .ovb.big::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 215, 195, 0.16) 50%,
    transparent 65%
  );
  transform: translateX(-110%);
  animation: cardGlare 1.1s cubic-bezier(0.3, 0.7, 0.3, 1) backwards;
  animation-delay: calc(var(--b, 0ms) + 350ms + var(--i, 0) * 110ms);
}

@media (max-width: 760px) {
  .ov-dash #pubTop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ov-dash #pubTop > .ovb {
    grid-column: span 2;
  }
  .ov-dash #pubTop > .ovb.big {
    grid-column: span 1;
  }
  .ov-dash #pubTop > .ovb.big.top1,
  .ov-dash #pubTop[data-big='1'] > .ovb.big {
    grid-column: span 2;
  }
  .ov-dash #pubTop[data-big='2'] > .ovb.big {
    grid-column: span 1;
  }
  .ov-dash #pubTop .ovb.big .vl > b {
    font-size: 21px;
  }
}

/* ---------- the button in the heading that scrolls down to the panel ---------- */
/* .vw-jump is the pill from viewer.html ("Go to the map"), copied from
   assets/pages/viewer/page.css so both pages look the same */
.vw-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ed-gate-cta {
  margin: -8px 0 26px;
}
@media (max-width: 760px) {
  .ed-gate-cta {
    justify-content: center;
  }
}
.ed-gate-cta[hidden] {
  display: none;
}
.vw-jump {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family:
    JetBrains Mono,
    ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: #ffc7b8;
  background: rgba(150, 38, 20, 0.26);
  border: 0.5px solid rgba(226, 90, 31, 0.34);
  padding: 10px 18px;
  border-radius: 99px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.vw-jump i:last-child {
  font-size: 9px;
  opacity: 0.8;
  transition: transform 0.25s ease;
}
.vw-jump:hover {
  color: #fff1eb;
  background: rgba(226, 90, 31, 0.4);
  box-shadow: 0 8px 24px -10px rgba(226, 90, 31, 0.8);
}
.vw-jump:hover i:last-child {
  transform: translateY(2px);
}
@media (max-width: 700px) {
  .vw-jump {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    padding: 12px 14px;
  }
}

/* ---------- the panel itself ---------- */
.ed-pub {
  /* lands below the fixed navigation bar */
  scroll-margin-top: 96px;
  margin-top: 28px;
  /* the page gives every <section> a large vertical padding */
  padding: 0;
  overflow: hidden;
}
.ed-pub[hidden] {
  display: none;
}
.ed-pub:focus {
  outline: none;
}
/* The panel's background belongs to the sign-in card: both sit in .ed-card,
   which does the page's .rv reveal for the two at once. The panel's own .rv
   only fades its contents in when scrolled into view. */
.ed-pub.rv {
  opacity: 1;
  transform: none;
  filter: none;
}
.ed-pub .ed-pub-head,
.ed-pub .dash-grid {
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ed-pub .dash-grid {
  transition-delay: 0.1s;
}
.ed-pub.rv:not(.in) .ed-pub-head,
.ed-pub.rv:not(.in) .dash-grid {
  opacity: 0;
  transform: translateY(14px);
}
/* The lists keep a 12px lane for their scrollbar and the rows a 10px inner
   margin, so their numbers stopped short of the heading's note. The column
   reaches 22px into the section's 26px side padding: numbers now end under
   the note and the scrollbar runs just outside them. */
.ed-pub .dash-col {
  margin-right: -22px;
}
/* the scrollbar sits midway between the end of the graphs and the section's
   edge (the dividing line): the column reaches 22px past the graphs and the
   section's side padding is 26px, so its centre is 13px out, 9px in from
   the column's edge */
.ed-pub .ov-sb {
  right: 7.5px;
}
.ed-pub .dash-col.sb-on .ov-sb:hover,
.ed-pub .dash-col.sb-on .ov-sb.drag {
  /* widening to 6px keeps the same centre */
  margin-right: -1.5px;
}
@media (max-width: 760px) {
  /* 12px reach, 14px padding: centre 7px out, 5px in */
  .ed-pub .ov-sb {
    right: 3.5px;
  }
}
/* the country cards have no inner margin, so that list stops 10px earlier
   and its plain rows drop their right margin: card frames, numbers and
   meters all end under the note */
.ed-pub #pubTop {
  margin-right: 10px;
}
.ed-pub #pubTop > .ovb:not(.big) {
  padding-right: 0;
}
@media (max-width: 760px) {
  /* the sections narrow to 14px sides here */
  .ed-pub .dash-col {
    margin-right: -12px;
  }
}
/* heading left, muted note right, as .ov-side gives the Overview's headings */
.ed-pub h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.ed-pub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 26px 0;
}
.ed-pub-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ed-pub-head span {
  font-size: 12.5px;
  color: var(--muted);
}
.ed-pub .dash-foot span b {
  color: #fff;
  font-weight: 600;
}
/* ---------- sign-in and overview as one panel ----------
   .has-pub is set on the gate once the overview has loaded; without it the
   sign-in panel keeps its own rounded card. */
.ed-gate.has-pub .ed-login {
  /* page.css without its lower-left glow, which the overview would cut off */
  background:
    radial-gradient(
      520px 300px at 88% 6%,
      rgba(226, 59, 46, 0.15) 0%,
      rgba(226, 59, 46, 0.144) 7.68%,
      rgba(226, 59, 46, 0.1266) 16%,
      rgba(226, 59, 46, 0.1015) 24.32%,
      rgba(226, 59, 46, 0.075) 32%,
      rgba(226, 59, 46, 0.0485) 39.68%,
      rgba(226, 59, 46, 0.0234) 48%,
      rgba(226, 59, 46, 0.006) 56.32%,
      rgba(226, 59, 46, 0) 64%
    ),
    linear-gradient(180deg, #1a0d0d, #130a0b);
  border-bottom-width: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
}
.ed-gate.has-pub .ed-login-side {
  border-bottom-right-radius: 0;
  /* even shade: page.css darkens it towards the bottom, which read as a
     shadow above the overview */
  background: rgba(0, 0, 0, 0.16);
}
.ed-gate.has-pub .ed-pub {
  margin-top: 0;
  border-color: rgba(226, 59, 46, 0.26);
  border-top: 0.5px solid var(--line);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  /* carries on from the sign-in panel's lower edge */
  background:
    radial-gradient(
      520px 300px at 88% 100%,
      rgba(226, 59, 46, 0.08) 0%,
      rgba(226, 59, 46, 0.03) 35%,
      rgba(226, 59, 46, 0) 64%
    ),
    linear-gradient(180deg, #130a0b, #110909);
  box-shadow: 0 26px 60px -34px rgba(0, 0, 0, 0.9);
}
@media (max-width: 1050px) {
  .ed-gate.has-pub .ed-login-side {
    border-radius: 0;
  }
}

/* the page narrows .dash-sec to 14px sides below 760px; the heading follows */
@media (max-width: 760px) {
  .ed-pub-head {
    padding: 16px 14px 0;
  }
}
@media (max-width: 860px) {
  .ed-pub .dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ed-pub .dash-grid > .dash-sec + .dash-sec {
    border-left: 0;
    border-top: 0.5px solid var(--line);
  }
}
@media (max-width: 520px) {
  .ed-pub .dash-cat {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }
  .ed-pub .dash-col {
    width: 100%;
  }
}
