/* Страница истории пересчёта. Переменные и шрифты — из styles.css. */
body.history-page, html:has(body.history-page) { overflow: auto; height: auto; min-height: 100%; }
body.history-page { position: relative; }

.h-stage {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 40px 90px rgba(0, 0, 0, 0.45);
}

.h-head { padding: 22px 26px 18px; }
.h-back {
  color: var(--neon);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.h-head h1 {
  margin: 10px 0 4px;
  font-family: "Cormorant Garamond", "Outfit", "Noto Sans Georgian", serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1.05;
}
.h-sub { margin: 0; color: var(--muted); font-size: 14px; }
.h-method { margin: 10px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; max-width: 980px; }
.h-legend {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin-top: 12px; font-size: 12px; color: var(--muted);
}
.h-legend .dot, .h-row .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--neon); box-shadow: 0 0 8px var(--neon); vertical-align: middle;
}
.fb {
  font-weight: 500; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--danger-demo); border: 1px solid rgba(255, 211, 122, 0.45);
  border-radius: 6px; padding: 1px 5px;
}

.h-tabs { display: none; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.h-tabs button {
  flex: 1 1 calc(50% - 8px);
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
}
.h-tabs button[aria-selected="true"] {
  color: #fff; border-color: var(--neon);
  box-shadow: 0 0 14px rgba(126, 232, 255, 0.25);
}

.h-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.h-card { padding: 18px 18px 14px; }
.h-card h2 {
  margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px;
}
.h-card h2 .tbadge {
  font-family: "Geist Mono", "Noto Sans Georgian", monospace; font-weight: 700; font-size: 20px; padding: 1px 7px 2px;
  border-radius: 8px; border: 1px solid currentColor;
}
.tbadge.is-month { color: var(--neon); text-shadow: 0 0 10px rgba(126, 232, 255, 0.7); }
.tbadge.is-week { color: #d6a8ff; text-shadow: 0 0 10px rgba(214, 168, 255, 0.75); }
.h-stats { margin: 8px 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.h-stats b { color: var(--ink); font-weight: 600; }

.h-rows { display: flex; flex-direction: column; }
.h-row {
  display: grid;
  grid-template-columns: 92px 64px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}
.h-row.is-today { background: rgba(126, 232, 255, 0.06); border-radius: 8px; }
.h-date { font-family: "Geist Mono", "Noto Sans Georgian", monospace; font-size: 12px; color: var(--muted); }
.h-date small { display: block; color: var(--faint); font-size: 10.5px; }
.h-pool { font-size: 12px; color: var(--muted); }
.h-pool b { color: var(--ink); font-size: 15px; font-weight: 600; }
.h-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.h-top span { white-space: nowrap; }
.h-top .lead { font-family: "Geist Mono", "Noto Sans Georgian", monospace; font-weight: 650; color: #fff; }
.h-top .sym { font-family: "Geist Mono", "Noto Sans Georgian", monospace; color: var(--ink); }
.h-top i { font-style: normal; color: var(--faint); font-size: 12px; }

.h-headbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.h-pagelink {
  display: inline-block; margin-top: 12px; color: var(--neon); text-decoration: none; font-size: 13px;
  border: 1px solid rgba(126, 232, 255, 0.3); border-radius: var(--radius-s); padding: 7px 12px;
  background: rgba(126, 232, 255, 0.05);
}
.h-pagelink:hover { background: rgba(126, 232, 255, 0.12); }

@media (max-width: 860px) {
  .h-stage { padding: 14px 12px 24px; }
  .h-head { padding: 16px 16px 14px; }
  .h-head h1 { font-size: 30px; }
  .h-tabs { display: flex; }
  .h-grid { grid-template-columns: 1fr; }
  .h-card { display: none; }
  .h-card.is-shown { display: block; }
  .h-row { grid-template-columns: 74px 56px 1fr; font-size: 12.5px; }
}
