.stats-page .stats-analysis[hidden] { display: none; }
.stats-page .stats-analysis {
  padding: 4px 0 10px;
  border-top: 1px solid #becdd3;
  color: #182b35;
}
.stats-page .stats-analysis-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 12px;
}
.stats-page .stats-analysis h2,
.stats-page .stats-analysis h3 { margin: 0; }
.stats-page .stats-analysis h2 { font-size: 18px; }
.stats-page .stats-analysis h3 { font-size: 14px; }
.stats-page .stats-analysis-heading p,
.stats-page .stats-analysis-summary,
.stats-page .stats-analysis-caution {
  margin: 5px 0 0;
  color: #536a77;
  font-size: 12px;
  line-height: 1.5;
}
.stats-page .stats-analysis-heading label {
  min-width: 186px;
  display: grid;
  gap: 6px;
  color: #405867;
  font-size: 12px;
  font-weight: 700;
}
.stats-page .stats-analysis-heading select {
  height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #edf1f4;
  box-shadow: inset 4px 4px 9px #cbd4da, inset -4px -4px 9px #fff;
  color: #182b35;
}
.stats-page .stats-analysis-empty {
  padding: 26px 12px;
  border: 1px dashed #b6c7cc;
  border-radius: 6px;
  color: #536a77;
  font-size: 13px;
  text-align: center;
}
.stats-page .stats-analysis-insight {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #0b7773;
  background: #e0ece9;
  color: #1c514e;
  font-size: 12px;
  line-height: 1.5;
}
.stats-page .stats-analysis-daily {
  min-width: 0;
  margin-top: 16px;
  padding: 14px 0 8px;
  border-top: 1px solid #c5d3d8;
}
.stats-page .stats-analysis-daily > p {
  margin: 5px 0 12px;
  color: #536a77;
  font-size: 11px;
  line-height: 1.5;
}
.stats-page .stats-analysis-daily svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.stats-page .stats-analysis-chart-stage { position: relative; min-width: 0; }
.stats-page .stats-analysis-grid { stroke: #a9bac4; stroke-opacity: .3; stroke-width: 1; stroke-dasharray: 3 5; }
.stats-page .stats-analysis-axis-label { fill: #788b98; font-size: 11px; }
.stats-page .stats-analysis-line-fill { fill: url(#stats-read-area); opacity: 0; animation: stats-analysis-fill .65s ease-out .6s forwards; }
.stats-page .stats-analysis-line {
  fill: none;
  stroke: url(#stats-read-stroke);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 2px 5px rgba(74,157,255,.35));
  animation: stats-analysis-draw 1.3s cubic-bezier(.22,1,.36,1) .12s forwards;
}
.stats-page .stats-analysis-dot {
  fill: #f8fbff;
  stroke: #4a9dff;
  stroke-width: 2.5;
  opacity: 0;
  transition: r .2s ease, filter .2s ease;
  animation: stats-analysis-appear .25s ease-out 1.05s forwards;
}
.stats-page .stats-analysis-marker.is-active .stats-analysis-dot,
.stats-page .stats-analysis-marker:focus-visible .stats-analysis-dot { r: 7; filter: drop-shadow(0 0 6px #4a9dff); }
.stats-page .stats-analysis-hit { fill: transparent; cursor: pointer; }
.stats-page .stats-analysis-guide { stroke: #4a9dff; stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 3 4; }
.stats-page .stats-analysis-guide[hidden] { display: none; }
.stats-page .stats-analysis-chart-tooltip {
  position: absolute; z-index: 2; top: 4px; max-width: min(88%, 240px); padding: 7px 10px;
  border: 1px solid rgba(74,157,255,.28); border-radius: 7px; background: #171f2b;
  box-shadow: 0 8px 20px rgba(0,0,0,.22); color: #f5f5f7; font-size: 11px;
  line-height: 1.4; white-space: nowrap; transform: translateX(-50%); pointer-events: none;
}
.stats-page .stats-analysis-chart-tooltip[hidden] { display: none; }
@keyframes stats-analysis-draw { to { stroke-dashoffset: 0; } }
@keyframes stats-analysis-fill { to { opacity: 1; } }
@keyframes stats-analysis-appear { to { opacity: 1; } }
.stats-page .stats-analysis-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 18px;
}
.stats-page .stats-analysis-ranking,
.stats-page .stats-analysis-examples {
  min-width: 0;
  border-top: 1px solid #c5d3d8;
  padding-top: 12px;
}
.stats-page .stats-analysis-ranking-list { display: grid; margin-top: 8px; }
.stats-page .stats-analysis-topic-chart {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 14px 0 18px;
}
.stats-page .stats-analysis-pie {
  display: block;
  width: 220px;
  height: 172px;
  flex: 0 0 220px;
  overflow: visible;
}
.stats-page .stats-analysis-pie-shadow { fill: rgba(9,19,31,.18); filter: blur(8px); }
.stats-page .stats-analysis-pie-side {
  filter: brightness(.55);
  stroke: rgba(0,0,0,.15);
  stroke-width: 1;
  opacity: 0;
  animation: stats-analysis-pie-side-in .45s ease-out calc(.2s + var(--slice-index) * .07s) forwards;
}
.stats-page .stats-analysis-pie-slice {
  cursor: pointer;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: stats-analysis-pie-enter .7s cubic-bezier(.2,.8,.25,1) calc(var(--slice-index) * .08s) forwards;
  transition: filter .2s ease;
}
.stats-page .stats-analysis-pie-top { stroke: rgba(255,255,255,.58); stroke-width: 1.5; }
.stats-page .stats-analysis-pie-slice.is-active,
.stats-page .stats-analysis-pie-slice:focus-visible { filter: brightness(1.18) drop-shadow(0 0 5px rgba(255,255,255,.45)); outline: none; }
@keyframes stats-analysis-pie-side-in { to { opacity: 1; } }
@keyframes stats-analysis-pie-enter {
  from { opacity: 0; transform: translateY(16px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .stats-page .stats-analysis-pie,
  .stats-page .stats-analysis-line,
  .stats-page .stats-analysis-line-fill,
  .stats-page .stats-analysis-pie-side,
  .stats-page .stats-analysis-pie-slice,
  .stats-page .stats-analysis-dot { animation: none; opacity: 1; }
  .stats-page .stats-analysis-line { stroke-dashoffset: 0; }
}
.stats-page .stats-analysis-topic-chart figcaption {
  min-width: 0;
  flex: 1;
}
.stats-page .stats-analysis-topic-chart figcaption > p {
  margin: 0 0 8px;
  color: #536a77;
  font-size: 11px;
}
.stats-page .stats-analysis-topic-chart ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stats-page .stats-analysis-topic-chart li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.stats-page .stats-analysis-topic-chart li > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-page .stats-analysis-topic-chart li strong { font-weight: 700; }
.stats-page .stats-analysis-swatch { width: 10px; height: 10px; border-radius: 2px; }
.stats-page .stats-analysis-ranking-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 46px minmax(88px, 1fr) 74px;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  border-bottom: 1px solid #d3dee2;
  font-size: 12px;
  cursor: pointer;
}
.stats-page .stats-analysis-ranking-list summary::marker { color: #536a77; }
.stats-page .stats-analysis-ranking-list ul {
  margin: 0;
  padding: 8px 10px 10px 22px;
  color: #536a77;
  font-size: 11px;
  line-height: 1.5;
}
.stats-page .stats-analysis-ranking-list li + li { margin-top: 5px; }
.stats-page .stats-analysis-ranking-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-page .stats-analysis-ranking-list span { color: #536a77; }
.stats-page .stats-analysis-ranking-list .above { color: #176748; font-weight: 700; }
.stats-page .stats-analysis-ranking-list .below { color: #a34637; font-weight: 700; }
.stats-page .stats-analysis-ranking-list .insufficient { color: #677981; }
.stats-page .stats-analysis-examples { margin-top: 20px; }
.stats-page .stats-analysis-examples ol { margin: 8px 0 0; padding-left: 20px; }
.stats-page .stats-analysis-examples li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #d3dee2;
  font-size: 12px;
}
.stats-page .stats-analysis-examples a,
.stats-page .stats-analysis-examples li > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-page .stats-analysis-examples a { color: #1a5b66; }
.stats-page .stats-analysis-examples li > span:last-child { flex: 0 0 auto; color: #405867; }
@media (max-width: 760px) {
  .stats-page .stats-analysis-heading { align-items: stretch; flex-direction: column; }
  .stats-page .stats-analysis-heading label { min-width: 0; }
  .stats-page .stats-analysis-columns { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .stats-page .stats-analysis-ranking-list summary {
    grid-template-columns: minmax(0, 1.2fr) 40px minmax(78px, 1fr) 72px;
    font-size: 11px;
  }
}
@media (max-width: 520px) {
  .stats-page .stats-analysis-chart-tooltip { white-space: normal; }
  .stats-page .stats-analysis-topic-chart { align-items: flex-start; flex-direction: column; }
  .stats-page .stats-analysis-pie { width: min(100%, 220px); height: auto; align-self: center; flex: none; }
  .stats-page .stats-analysis-topic-chart figcaption { width: 100%; }
  .stats-page .stats-analysis-topic-chart ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-page .stats-analysis-topic-chart li { grid-template-columns: 10px minmax(0, 1fr); }
  .stats-page .stats-analysis-topic-chart li strong { grid-column: 2; }
}
