/* ============================================================
   RESULTS — "Итоги года"
   ============================================================ */

.results > div { position: relative; }
/* сцена для 3D-переворота страницы */
.results{
  perspective: 1200px;
}


/* контейнер внутри блока (вместо inline max-width) */
.results-wrap{
  max-width: 1100px;
  margin: 0 auto;
}

/* шапка */
.results-head{
  text-align: center;
  margin-bottom: 1.2rem;
}

.results-title{ margin: 0; }

.results-hint{
  margin-top: 0.35rem;
  color: #666;
  font-size: 0.95rem;
}

/* ============================================================
   Закладки
   ============================================================ */

.results-tabs{
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.results-tab{
  position: relative;

  /* перебиваем "синие кнопки" из main.css */
  background: rgba(130, 52, 62, 0.14) !important;
  border: 1px solid rgba(130, 52, 62, 0.32) !important;
  color: rgba(40, 18, 22, 0.92) !important;

  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;

  font-family: "IBM Plex Mono", monospace !important;
  letter-spacing: 0.06em;
  text-transform: none;

  border-radius: 10px !important;

  /* форма "закладки": надрез справа */
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);

  /* наклон */
  transform: rotate(-10deg);
  transform-origin: left bottom;

  /* внятный размер без inline */
  padding: 0.55rem 0.9rem;

  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

/* чуть "наклеено": каждый второй на 1px выше */
.results-tab:nth-child(even){
  transform: rotate(-10deg) translateY(-1px);
}

.results-tab.is-active,
.results-tab[aria-selected="true"]{
  background: rgba(130, 52, 62, 0.40) !important;
  border-color: rgba(130, 52, 62, 0.45) !important;
}

/* складка на левом краю — как у тебя сейчас */
.results-tab::after{
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(20, 28, 38, 0.12);
  transform: skewX(2deg);
  opacity: 0.55;
  pointer-events: none;
}

/* ============================================================
   Лист
   ============================================================ */

.results-page{
  position: relative;

  /* ты просил фиксированный отступ */
  padding-left: 3.4rem;

  /* слева без скруглений */
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;

  overflow: hidden;
  will-change: transform, opacity;
}

/* складка/линия слева (пунктирная) */
.results-page::before{
  content:"";
  position:absolute;
  left: 22px;
  top: 18px;
  bottom: 18px;
  width: 0;
  border-left: 1px dashed rgba(20, 28, 38, 0.3);
  pointer-events:none;
}

/* состояние закрыто/открыто */
.results-page.is-closed{
  display: none;
  max-height: 0;
  opacity: 0;
  transform: translateX(18px); /* было вниз — стало вправо */
}

.results-page.is-open{
  display: block;
  opacity: 1;
  transform: translateX(0);
  transition: max-height 420ms ease, opacity 320ms ease, transform 320ms ease;
}

/* мета-строка и год */
.results-meta{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.results-year{
  font-family: "IBM Plex Mono", monospace;
  color: #666;
  letter-spacing: 0.06em;
}

.results-body{
  line-height: 1.75;
}

/* ============================================================
   Анимация переключения года:
   уход — влево, появление — справа налево
   ВАЖНО: имена keyframes оставляем resultsPageOut/resultsPageIn,
   чтобы JS не переписывать по animationName.
   ============================================================ */

@keyframes resultsPageOut{
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-36px); }
}

@keyframes resultsPageIn{
  0%   { opacity: 0; transform: translateX(36px); }
  100% { opacity: 1; transform: translateX(0); }
}

.results-page.is-turn-out{
  animation: resultsPageOut 240ms ease both;
}

.results-page.is-turn-in{
  animation: resultsPageIn 320ms ease both;
}

@media (prefers-reduced-motion: reduce){
  .results-page.is-turn-out,
  .results-page.is-turn-in{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   MOBILE TUNING — убираем лишний левый воздух у листа
   ============================================================ */
@media (max-width: 640px){
  /* на мобиле .card уже даёт padding: 1.4rem; 
     поэтому не нужно добавлять огромный левый отступ */
  .results-page{
    padding-left: 2.1rem; /* было 3.4rem -> стало ближе к ритму карточки */
  }

  /* пунктир ближе к левому краю */
  .results-page::before{
    left: 14px;     /* было 22px */
    top: 16px;      /* чуть спокойнее */
    bottom: 16px;
  }
}


