/* home — экран «Главная». Только токены, ни одного сырого цвета. */

.s-home{
  display:flex;
  flex-direction:column;
  gap:var(--space-6);
}

/* ——— геро-карточка ——— */
.a-card.s-home-hero{
  background:var(--gradient-gold);
  border:1px solid var(--gold-200);
  box-shadow:var(--shadow-gold);
  color:var(--c-on-gold);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  padding:var(--space-9) var(--space-6) var(--space-8);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:var(--space-5);
  overflow:hidden;
}
.s-home-hero__over{
  margin:0;
  font-size:var(--t-overline-size);
  line-height:var(--t-overline-lh);
  font-weight:var(--t-overline-weight);
  letter-spacing:var(--t-overline-tracking);
  text-transform:uppercase;
  color:var(--c-on-gold);
}
.s-home-hero__title{
  margin:0;
  font-family:var(--font-display);
  font-size:calc(var(--t-display-l-size) * 1.15);
  line-height:var(--t-display-l-lh);
  font-weight:var(--t-display-l-weight);
  letter-spacing:var(--t-display-l-tracking);
  color:var(--c-on-gold);
  text-wrap:balance;
}
.s-home-hero__mark{
  width:76px;
  height:76px;
  border-radius:var(--radius-pill);
  object-fit:cover;
  border:2px solid var(--gold-50);
  box-shadow:var(--shadow-glass);
  margin-top:var(--space-2);
}
.s-home-hero__text{
  margin:0;
  max-width:30ch;
  font-size:var(--t-body-s-size);
  line-height:var(--t-body-s-lh);
  color:var(--c-on-gold);
  opacity:.78;
}
.s-home-hero__links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:var(--space-4);
  margin-top:var(--space-2);
}
.a-chip.s-home-link{
  min-height:var(--tap-min);
  padding:0 var(--space-6);
  background:var(--gold-50);
  border:1px solid var(--gold-300);
  color:var(--c-on-gold);
  font-size:var(--t-body-s-size);
  font-weight:600;
  text-decoration:none;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  transition:transform var(--motion-fast) var(--motion-ease),
             box-shadow var(--motion-base) var(--motion-ease);
}
.a-chip.s-home-link:hover{box-shadow:var(--shadow-glass)}
.a-chip.s-home-link:active{transform:scale(.975)}
.a-chip.s-home-link:focus-visible{outline:none;box-shadow:var(--shadow-glow)}

/* ——— карточка-действие ——— */
.s-home-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:var(--space-5);
}
.s-home-card__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:var(--space-3);
}
.s-home-card__over{margin:0 0 var(--space-1)}
.s-home-card__text{margin:0;max-width:38ch}
.s-home-card__btn{margin-top:var(--space-4)}

.s-home-ico{
  width:var(--tap-min);
  height:var(--tap-min);
  flex:none;
  display:grid;
  place-items:center;
  border-radius:var(--radius-md);
  background:var(--c-glass);
  border:1px solid var(--c-glass-border);
  color:var(--c-accent);
  box-shadow:var(--shadow-glass);
}
.s-home-ico svg{width:22px;height:22px}

/* ——— разбор дня ——— */
.s-home-day__slot{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:var(--space-4);
  margin-top:var(--space-2);
}
.a-chip.s-home-day__chip{
  min-height:28px;
  font-size:var(--t-caption-size);
  font-weight:600;
  color:var(--c-text-2);
  white-space:nowrap;
}
.s-home-day__title{
  margin:0;
  font-family:var(--font-display);
  font-size:var(--t-title-size);
  line-height:var(--t-title-lh);
  font-weight:var(--t-title-weight);
  letter-spacing:var(--t-title-tracking);
  color:var(--c-text);
}
.s-home-day__text{
  margin:0;
  max-width:40ch;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* ——— «Ваши разборы» ——— */
.s-home-sec{display:block}
.s-home-sec__head{margin-bottom:var(--space-5)}
.s-home-sec__t{margin:0}

.s-home-hist__card{padding:var(--space-2) var(--space-6)}
.s-home-hist{list-style:none;margin:0;padding:0}
.s-home-hist li + li{border-top:1px solid var(--c-border)}
.s-home-hist__item{
  appearance:none;
  width:100%;
  min-height:var(--tap-min);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-5);
  padding:var(--space-5) 0;
  background:none;
  border:0;
  cursor:pointer;
  text-align:left;
  font-family:var(--font-text);
  color:var(--c-text);
  border-radius:var(--radius-sm);
  transition:opacity var(--motion-fast) var(--motion-ease);
}
.s-home-hist__item:hover{opacity:.72}
.s-home-hist__item:focus-visible{outline:none;box-shadow:var(--shadow-glow)}
.s-home-hist__col{min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}
.s-home-hist__t{
  font-size:var(--t-body-s-size);
  line-height:var(--t-body-s-lh);
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.s-home-hist__d{
  font-size:var(--t-caption-size);
  line-height:var(--t-caption-lh);
  color:var(--c-text-3);
}
.s-home-hist__go{flex:none;display:inline-flex;color:var(--c-text-3)}
.s-home-hist__go svg{width:18px;height:18px}

/* ——— появление ——— */
@media (prefers-reduced-motion:no-preference){
  .s-home > *{animation:s-home-in var(--motion-slow) var(--motion-ease-out) both}
  .s-home > *:nth-child(2){animation-delay:40ms}
  .s-home > *:nth-child(3){animation-delay:80ms}
  .s-home > *:nth-child(4){animation-delay:120ms}
  .s-home > *:nth-child(5){animation-delay:160ms}
  .s-home > *:nth-child(6){animation-delay:200ms}
  @keyframes s-home-in{
    from{opacity:0;transform:translateY(8px)}
    to{opacity:1;transform:none}
  }
}

/* ——— узкие экраны ——— */
@media (max-width:360px){
  .s-home-card{grid-template-columns:minmax(0,1fr)}
  .s-home-ico{display:none}
  .a-card.s-home-hero{padding:var(--space-8) var(--space-5)}
  .s-home-hero__title{font-size:var(--t-display-l-size)}
}

@media (prefers-reduced-motion:reduce){
  .s-home > *{animation:none}
  .a-chip.s-home-link,
  .s-home-hist__item{transition:none}
  .a-chip.s-home-link:active{transform:none}
}

/* ——— оценки дня ———
   Ради этих чисел приложение открывают утром на пять секунд: они должны
   читаться раньше, чем человек начнёт читать. */
.s-home-day__overall{
  display:flex;align-items:baseline;gap:var(--space-2);
  margin:0 0 var(--space-3);
}
.s-home-day__num{
  font-family:var(--font-display);
  font-size:var(--t-display-l-size);
  line-height:1;
  color:var(--c-accent);
}
.s-home-day__den{
  font-size:var(--t-body-s-size);
  color:var(--c-text-3);
}
.s-home-scores{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:var(--space-2);
  margin-bottom:var(--space-3);
}
.s-home-score{
  display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:var(--space-2) var(--space-1);
  border-radius:var(--radius-md);
  background:var(--c-sunken);
}
.s-home-score__ico{font-size:var(--t-body-s-size);line-height:1}
.s-home-score__val{
  font-family:var(--font-display);
  font-size:var(--t-title-size);
  line-height:1.1;
  color:var(--c-text);
}
.s-home-score__cap{
  font-size:var(--t-caption-size);
  color:var(--c-text-3);
  text-align:center;
}
.s-home-day__theme{
  margin:0 0 var(--space-3);
  color:var(--c-text-2);
  font-size:var(--t-body-size);
}

/* ——— серия заходов ——— */
.s-home-streak{display:flex;flex-wrap:wrap;gap:var(--space-2)}
.a-chip.s-home-streak__chip{font-size:var(--t-caption-size)}
button.s-home-streak__gift{
  cursor:pointer;
  border-color:var(--c-accent);
  color:var(--c-accent);
}

/* ——— входы в разделы без вкладки ——— */
.s-home-explore__card{padding:var(--space-2)}
.s-home-explore{list-style:none;margin:0;padding:0}
.s-home-explore__item{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:var(--space-3);
  width:100%;
  padding:var(--space-3);
  border:0;
  border-radius:var(--radius-md);
  background:transparent;
  text-align:left;
  cursor:pointer;
  transition:background var(--motion-fast) var(--motion-ease);
}
.s-home-explore__item:hover{background:var(--c-sunken)}
.s-home-explore__item:active{background:var(--c-sunken)}
.s-home-explore__ico{display:inline-flex;color:var(--c-accent)}
.s-home-explore__ico svg{width:22px;height:22px}
.s-home-explore__col{display:flex;flex-direction:column;gap:2px;min-width:0}
.s-home-explore__t{color:var(--c-text);font-weight:600}
.s-home-explore__d{color:var(--c-text-3);font-size:var(--t-caption-size)}
.s-home-explore__go{display:inline-flex;color:var(--c-text-3)}
.s-home-explore__go svg{width:18px;height:18px}

@media (max-width:360px){
  .s-home-scores{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){
  .s-home-explore__item{transition:none}
}
