@charset "UTF-8";

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body[data-page="latest"] {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: hidden;
  background: var(--pk-bg-dark, #131313);
  color: var(--pk-text-dark, #dddddd);
  font-family: Roboto, sans-serif;
}

.latest-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px var(--pk-gutter-desktop) 6px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: clip;
}

.latest-hero {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.latest-hero h1 {
  margin: 2px 0 4px;
  font-size: var(--pk-page-title-size, clamp(1.35rem, 2.45vw, 2.05rem));
  line-height: 1.15;
  color: #fff;
}

.latest-subtitle {
  margin: 0;
  color: var(--pk-text-muted-dark, #b7b7b7);
  font-size: var(--pk-page-subtitle-size, clamp(0.84rem, 1.05vw, 0.92rem));
}

.latest-chart-shell {
  width: 100%;
  min-height: 0;
  display: block;
  position: relative;
  min-width: 0;
}

.latest-controls-card {
  width: 100%;
  background: var(--pk-surface-muted-dark, rgba(30, 30, 30, 0.6));
  border: none;
  border-radius: var(--pk-card-radius, 8px);
  padding: 9px 10px;
  display: grid;
  grid-template-rows: auto;
  gap: 6px;
  min-height: 0;
  box-shadow: var(--pk-shadow-dark, 0 2px 10px rgba(0, 0, 0, 0.24));
  min-width: 0;
}

.latest-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "prev slider next play counter";
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.latest-controls > * {
  min-width: 0;
}

#poll-prev {
  grid-area: prev;
}

#poll-index {
  grid-area: slider;
}

#poll-next {
  grid-area: next;
}

#poll-play {
  grid-area: play;
}

#poll-counter {
  grid-area: counter;
}

.nav-button {
  border: 1px solid #4b4b4b;
  border-radius: 999px;
  padding: 7px clamp(10px, 1.1vw, 12px);
  background: rgba(24, 24, 24, 0.7);
  color: #d9d9d9;
  font: inherit;
  font-size: clamp(0.82rem, 0.88rem + 0.1vw, 0.9rem);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.nav-button:hover {
  color: #ffffff;
  border-color: #707070;
}

.nav-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #4b4b4b;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(24, 24, 24, 0.7);
  color: #d9d9d9;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 120ms ease, color 120ms ease, background-color 120ms ease;
}

.icon-button [data-play-icon] {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  line-height: 1;
}

.icon-button [data-play-icon]::before,
.icon-button [data-play-icon]::after {
  content: "";
  position: absolute;
  display: block;
}

.icon-button:not([data-state]) [data-play-icon]::before,
.icon-button[data-state="idle"] [data-play-icon]::before {
  left: 1px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  border-left: 8.6px solid currentColor;
}

.icon-button:not([data-state]) [data-play-icon]::after,
.icon-button[data-state="idle"] [data-play-icon]::after {
  display: none;
}

.icon-button[data-state="running"] [data-play-icon]::before,
.icon-button[data-state="running"] [data-play-icon]::after {
  top: 0;
  width: 3px;
  height: 11px;
  border-radius: 0.6px;
  background: currentColor;
}

.icon-button[data-state="running"] [data-play-icon]::before {
  left: 1px;
}

.icon-button[data-state="running"] [data-play-icon]::after {
  right: 1px;
}

.icon-button:hover {
  color: #ffffff;
  border-color: #707070;
}

.icon-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#poll-index {
  width: 100%;
  accent-color: #7f7f7f;
  min-width: 0;
}

.poll-counter {
  justify-self: end;
  color: #b4b4b4;
  font-size: 0.82rem;
  min-width: 54px;
  text-align: right;
  white-space: nowrap;
}

#latest-chart {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--pk-bg-dark, #131313);
  border-radius: 0;
  overflow: hidden;
}

#latest-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.latest-grid line {
  stroke: #343434;
  stroke-width: 1;
}

.latest-axis path,
.latest-axis line {
  stroke: #4a4a4a;
}

.latest-axis text {
  fill: #a8a8a8;
  font-size: 0.82rem;
}

.latest-axis-x text {
  font-weight: 700;
}

.latest-value {
  fill: #ececec;
  font-size: 0.81rem;
  font-weight: 700;
}

.latest-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--pk-surface-dark, rgba(30, 30, 30, 0.98));
  color: #f0f0f0;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: pre-line;
  transform: translate(-9999px, -9999px);
  transition: opacity 120ms ease;
}

.latest-meta {
  display: none;
  margin: 0;
  color: #9a9a9a;
  font-size: 0.82rem;
}

html[data-theme="light"] body[data-page="latest"] {
  background: var(--pk-bg-light, #f4f4f4);
  color: var(--pk-text-light, #202020);
}

html[data-theme="light"] .latest-hero h1 {
  color: #232323;
}

html[data-theme="light"] .eyebrow {
  color: #7a7a7a;
}

html[data-theme="light"] .latest-subtitle {
  color: var(--pk-text-muted-light, #626262);
}

html[data-theme="light"] .latest-controls-card {
  background: var(--pk-surface-light, rgba(255, 255, 255, 0.96));
  border: none;
  box-shadow: var(--pk-shadow-light);
}

html[data-theme="light"] #latest-chart {
  background: var(--pk-bg-light, #f4f4f4);
}

html[data-theme="light"] .nav-button {
  background: #f5f5f5;
  color: #353535;
  border-color: #c8c8c8;
}

html[data-theme="light"] .nav-button:hover {
  color: #171717;
  border-color: #9f9f9f;
}

html[data-theme="light"] .icon-button {
  background: #f5f5f5;
  color: #353535;
  border-color: #c8c8c8;
}

html[data-theme="light"] .icon-button:hover {
  color: #171717;
  border-color: #9f9f9f;
}

html[data-theme="light"] .poll-counter {
  color: #6a6a6a;
}

html[data-theme="light"] .latest-grid line {
  stroke: #dddddd;
}

html[data-theme="light"] .latest-axis path,
html[data-theme="light"] .latest-axis line {
  stroke: #bdbdbd;
}

html[data-theme="light"] .latest-axis text {
  fill: #666666;
}

html[data-theme="light"] .latest-value {
  fill: #1d1d1d;
}

html[data-theme="light"] .latest-tooltip {
  background: rgba(255, 255, 255, 0.98);
  color: #2d2d2d;
  border: 1px solid #d1d1d1;
}

html[data-theme="light"] .latest-meta {
  color: #707070;
}

@media (max-width: 900px) {
  .latest-controls {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "prev slider next play"
      "counter counter counter counter";
    row-gap: 6px;
    column-gap: 7px;
  }

  .poll-counter {
    justify-self: center;
    text-align: center;
    min-width: 72px;
  }
}

@media (max-width: 640px) {
  .latest-page {
    padding: 8px var(--pk-gutter-mobile) 4px;
    gap: 6px;
  }

  .latest-controls-card {
    padding: 8px;
    border-radius: var(--pk-card-radius, 8px);
    gap: 6px;
  }

  .latest-controls {
    gap: 6px;
  }

  .nav-button {
    padding: 6px 9px;
    font-size: 0.82rem;
  }

  .latest-hero h1 {
    margin: 1px 0 2px;
    font-size: clamp(1.25rem, 6.8vw, 1.7rem);
  }

  .latest-subtitle {
    font-size: 0.8rem;
    line-height: 1.25;
  }

  #latest-chart {
    min-height: 180px;
  }
}
