
/* page-views-visits-sessions-engaged-time figures — loaded article-locally after resources.css.
   Replaces daily-unique-counts-vs-period-distinct.svg, events-page-views-visits-timeline.svg
   and elapsed-time-vs-engaged-time.svg. */

.pv-fig {
  margin: 38px 0;
  padding: 30px 32px 28px;
  border: 1px solid #cfdcf0;
  border-radius: 20px;
  background: #f4f7fb;
  color: #071b3a;
}

h3.pv-h {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #071b3a;
}

/* ---------- figure 1: daily uniques vs period distinct ---------- */

.pv-matrix {
  padding: 6px 22px 14px;
  border: 1px solid #d7e2f2;
  border-radius: 16px;
  background: #fff;
}

.pv-mrow {
  display: grid;
  grid-template-columns: 132px 112px 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid #e6edf7;
}

.pv-mrow--head {
  border-top: 0;
  padding: 12px 0 8px;
}

.pv-mrow--foot { border-top: 2px solid #071b3a; }

p.pv-mname {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
}

.pv-mrow--foot p.pv-mname {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6a80;
}

p.pv-mday {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6a80;
  text-align: center;
}

p.pv-mtot {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #071b3a;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.pv-cell { display: grid; place-items: center; }

.pv-dot {
  width: 20px;
  height: 20px;
  border: 2px solid #b0bdcd;
  border-radius: 50%;
  background: #fff;
}

.pv-dot--on {
  border-color: #2f6df6;
  background: #2f6df6;
}

p.pv-mtag {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #5a6a80;
}

.pv-mrow--head p.pv-mtag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pv-mtag b { color: #071b3a; }

.pv-sums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pv-sum {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 16px;
  padding: 14px 20px 15px;
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  background: #fff;
}

.pv-sum--bad {
  border-color: #e6cd9a;
  background: #fdf9f1;
}

p.pv-sum__k {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5a6a80;
}

.pv-sum--bad p.pv-sum__k { color: #8a5a06; }

p.pv-sum__v {
  grid-column: 2;
  grid-row: 1 / -1;
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  color: #071b3a;
  font-variant-numeric: tabular-nums;
}

.pv-sum--bad p.pv-sum__v { color: #8a5a06; }

p.pv-sum__d {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #4b5b76;
  text-wrap: pretty;
}

/* ---------- figure 2: events, stays, Visits ---------- */

p.pv-vk {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6a80;
}

.pv-srow {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr) 176px;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid #e6edf7;
}

p.pv-vk + .pv-srow { border-top: 0; }

p.pv-slab__t {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
}

p.pv-slab__p {
  margin: 1px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.3;
  color: #5a6a80;
  overflow-wrap: anywhere;
}

.pv-sband {
  position: relative;
  height: 26px;
  border-radius: 6px;
  background: #f4f7fb;
  box-shadow: inset 0 0 0 1px #e6edf7;
}

.pv-sbar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  min-width: 5px;
  border-radius: 4px;
  background: #d7e4fb;
  box-shadow: inset 0 0 0 1px #9dbcf5;
}

.pv-shid {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: repeating-linear-gradient(-45deg, #f6e4bd 0 4px, #fdf2dd 4px 8px);
  font-size: 10.5px;
  font-weight: 700;
  color: #6b4e08;
  overflow: hidden;
  white-space: nowrap;
}

.pv-tick {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 1px;
  background: #2f6df6;
}

.pv-tick--sys { background: #64748b; }
.pv-tick--hid { background: #b8860b; }

p.pv-seng {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 7px;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  color: #071b3a;
  font-variant-numeric: tabular-nums;
}

.pv-seng em {
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  color: #5a6a80;
}

p.pv-gaprow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5b76;
}

p.pv-gaprow::before,
p.pv-gaprow::after {
  content: "";
  flex: 1;
  border-top: 2px dashed #b0bdcd;
}

.pv-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6edf7;
  font-size: 14px;
  color: #5a6a80;
}

.pv-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pv-lg {
  width: 3px;
  height: 14px;
  border-radius: 1px;
  background: #2f6df6;
}

.pv-lg--sys { background: #64748b; }
.pv-lg--hid { background: #b8860b; }

.pv-legend__note { color: #5a6a80; }

.pv-counts {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pv-count {
  padding: 12px 14px 13px;
  border: 1px solid #d7e2f2;
  border-radius: 12px;
  background: #fff;
}

p.pv-count__v {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #071b3a;
  font-variant-numeric: tabular-nums;
}

p.pv-count__k {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.25;
  color: #5a6a80;
}

/* ---------- figure 3: elapsed vs engaged ---------- */

.pv-panel {
  padding: 18px 22px 14px;
  border: 1px solid #d7e2f2;
  border-radius: 16px;
  background: #fff;
}

.pv-lane {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid #e6edf7;
}

.pv-lane:first-child { border-top: 0; }

p.pv-lane__t {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #071b3a;
}

p.pv-lane__d {
  margin: 1px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: #5a6a80;
}

p.pv-lane__v {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #071b3a;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pv-band {
  position: relative;
  height: 30px;
  border-radius: 6px;
  background: #f4f7fb;
  box-shadow: inset 0 0 0 1px #e6edf7;
}

.pv-seg {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 3px;
  background: #2f6df6;
}

.pv-excl {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  border-left: 1px dashed #cfd8e3;
  border-right: 1px dashed #cfd8e3;
  background: repeating-linear-gradient(-45deg, #eef1f5 0 5px, #fff 5px 10px);
  font-size: 11px;
  font-weight: 600;
  color: #5a6a80;
  overflow: hidden;
  white-space: nowrap;
}

.pv-vis {
  position: absolute;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  border-radius: 3px;
  background: #17693f;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
}

.pv-lane:first-child .pv-excl:nth-child(5),
.pv-lane:nth-child(2) .pv-vis:last-child {
  padding-left: 0;
  font-size: 0;
  place-items: center;
  justify-content: center;
  text-align: center;
}

.pv-lane:first-child .pv-excl:nth-child(5)::after,
.pv-lane:nth-child(2) .pv-vis:last-child::after {
  font-size: 13px;
  line-height: 1;
}

.pv-lane:first-child .pv-excl:nth-child(5)::after { content: "5m"; }
.pv-lane:nth-child(2) .pv-vis:last-child::after { content: "3m"; }

p.pv-axis {
  position: relative;
  display: block;
  height: 16px;
  margin: 4px 0 0 230px;
  padding-right: 92px;
  font-size: 11.5px;
  font-weight: 600;
  color: #5a6a80;
  font-variant-numeric: tabular-nums;
}

.pv-axis span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.pv-axis span:first-child { transform: none; }
.pv-axis span:last-child { transform: translateX(-100%); }

.pv-reads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

p.pv-read {
  margin: 0;
  padding: 12px 16px;
  border-left: 4px solid #2f6df6;
  border-radius: 0 10px 10px 0;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  color: #4b5b76;
  text-wrap: pretty;
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .pv-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .pv-lane { grid-template-columns: 178px minmax(0, 1fr) 76px; }

  p.pv-axis { margin-left: 194px; }

  .pv-mrow { grid-template-columns: 116px 92px 92px minmax(0, 1fr); }
}

@media (max-width: 940px) {
  .pv-fig { padding: 24px 20px 22px; }

  h3.pv-h { font-size: 22px; }

  .pv-sums,
  .pv-reads { grid-template-columns: minmax(0, 1fr); }

  .pv-counts { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .pv-srow {
    grid-template-columns: minmax(0, 1fr) 176px;
    align-items: start;
  }

  .pv-slab { grid-column: 1; }

  .pv-sband {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 4px;
  }

  p.pv-seng { grid-column: 2; grid-row: 1; }

  .pv-lane {
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: start;
  }

  .pv-lane__lab { grid-column: 1; }

  .pv-band {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  p.pv-lane__v { grid-column: 2; grid-row: 1; }

  p.pv-axis { margin-left: 0; padding-right: 0; }
}

@media (max-width: 620px) {
  .pv-mrow {
    grid-template-columns: minmax(0, 1fr) repeat(2, 52px);
    gap: 8px;
  }

  .pv-mrow p.pv-mtag {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .pv-mrow--head p.pv-mtag,
  .pv-mrow--foot p.pv-mtag { display: none; }

  .pv-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .pv-excl { font-size: 10.5px; }

  .pv-lane:nth-child(2) .pv-vis:first-child {
    padding-left: 0;
    font-size: 0;
    place-items: center;
    justify-content: center;
    text-align: center;
  }

  .pv-lane:nth-child(2) .pv-vis:first-child::after {
    font-size: 13px;
    line-height: 1;
  }

  .pv-lane:nth-child(2) .pv-vis:first-child::after { content: "13m"; }

  .pv-lane:nth-child(2) .pv-vis:last-child {
    right: 0;
    left: auto !important;
    min-width: 20px;
  }

  .pv-lane:nth-child(2) .pv-vis:last-child::after { font-size: 12px; }
}
