/* Портал Рамблер — демо */

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, #ff3b30, #c5150e);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  padding-bottom: 2px;
  box-shadow: 0 5px 14px rgba(197, 21, 14, 0.24);
}

.brand-word {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.site-search {
  position: relative;
  flex: 1;
  max-width: 540px;
  margin-left: auto;
}

.site-search input {
  width: 100%;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #f3f3f6;
  padding: 0 48px 0 40px;
  font-size: 14px;
  outline: none;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.site-search input::placeholder {
  color: #93939e;
}

.site-search input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.1);
}

.site-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8c98;
  pointer-events: none;
}

.search-submit {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #8c8c98;
  transition: background 0.16s ease, color 0.16s ease;
}

.search-submit:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.search-submit .icon {
  width: 16px;
  height: 16px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.header-mail-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.16s ease;
}

.header-mail-link:hover {
  background: var(--brand-soft);
}

.header-mail-link .icon {
  width: 17px;
  height: 17px;
}

.portal-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-register {
  padding: 10px 16px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 11px 9px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.nav-row {
  border-top: 1px solid #f0f0f4;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
}

.nav-categories {
  display: contents;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 14px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #4c4c57;
  white-space: nowrap;
  transition: color 0.16s ease;
}

.nav-link:hover {
  color: var(--brand);
}

.nav-link-active {
  color: var(--ink);
}

.nav-link-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.nav-link-mail {
  color: var(--brand);
}

.nav-date {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* Пользователь в шапке */

.portal-user {
  position: relative;
}

.portal-user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 5px 36px 5px 5px;
  font-size: 13px;
  font-weight: 600;
  position: relative;
}

.portal-user-btn::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #70707c;
  border-bottom: 1.5px solid #70707c;
  transform: translateY(-70%) rotate(45deg);
}

.portal-user-btn:hover {
  border-color: #cfcfd9;
}

.portal-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.portal-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  z-index: 120;
  animation: pop-in 0.14s ease;
}

.portal-user-menu[hidden] {
  display: none;
}

.portal-user-head {
  padding: 9px 10px 11px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
}

.portal-user-head strong {
  display: block;
  font-size: 13.5px;
}

.portal-user-head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-user-menu a,
.portal-user-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
}

.portal-user-menu a:hover,
.portal-user-menu button:hover {
  background: #f6f6f9;
}

.portal-user-menu .menu-red {
  color: var(--brand);
}

/* ---------- Сетка ---------- */

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 28px 0 52px;
  align-items: start;
}

.portal-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.portal-aside {
  position: sticky;
  top: 134px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- Тоновые обложки ---------- */

.tone-g1 {
  background:
    radial-gradient(110% 100% at 92% 0%, rgba(96, 165, 250, 0.85) 0%, transparent 52%),
    linear-gradient(140deg, #0b1220 0%, #1e3a8a 55%, #2563eb 100%);
}

.tone-g2 {
  background:
    radial-gradient(100% 100% at 90% 5%, rgba(245, 158, 11, 0.85) 0%, transparent 50%),
    linear-gradient(145deg, #231308 0%, #7c2d12 58%, #b45309 100%);
}

.tone-g3 {
  background:
    radial-gradient(100% 100% at 88% 10%, rgba(196, 181, 253, 0.8) 0%, transparent 52%),
    linear-gradient(140deg, #120a27 0%, #4c1d95 62%, #7c3aed 100%);
}

.tone-g4 {
  background:
    radial-gradient(100% 100% at 88% 8%, rgba(45, 212, 191, 0.8) 0%, transparent 52%),
    linear-gradient(140deg, #03201e 0%, #065f56 60%, #0f766e 100%);
}

.tone-g5 {
  background:
    radial-gradient(100% 100% at 88% 8%, rgba(251, 113, 133, 0.8) 0%, transparent 52%),
    linear-gradient(140deg, #27060f 0%, #881337 58%, #be123c 100%);
}

.tone-g6 {
  background:
    radial-gradient(100% 100% at 88% 8%, rgba(132, 204, 22, 0.62) 0%, transparent 55%),
    linear-gradient(140deg, #141d09 0%, #365314 62%, #4d7c0f 100%);
}

/* ---------- Герой ---------- */

.hero-grid {
  display: grid;
  grid-template-columns: 1.42fr 1fr;
  grid-template-rows: repeat(2, 214px);
  gap: 16px;
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 0;
  padding: 22px;
  border-radius: 17px;
  overflow: hidden;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  background-color: #1a2332;
}

.hero-card .card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(20, 20, 35, 0.2);
}

.hero-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 15, 0.02) 18%, rgba(4, 6, 15, 0.76) 100%);
}

.hero-card.is-main {
  grid-row: span 2;
  padding: 28px;
}

.hero-ghost {
  position: absolute;
  z-index: 1;
  top: 6px;
  right: 16px;
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-card .hero-chip,
.hero-card h3,
.hero-card p,
.hero-card .hero-foot {
  position: relative;
  z-index: 2;
}

.hero-chip,
.article-category {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(8px);
}

.hero-card h3 {
  margin-top: 11px;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card.is-main h3 {
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
  -webkit-line-clamp: 4;
}

.hero-card p {
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-card.is-main p {
  margin-top: 12px;
  font-size: 14.5px;
  max-width: 92%;
}

.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-foot > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-arrow {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.hero-card:hover .hero-arrow {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-arrow svg {
  width: 15px;
  height: 15px;
}

.hero-skeleton {
  border-radius: 17px;
  background: linear-gradient(100deg, #e9e9ef 25%, #f5f5f8 38%, #e9e9ef 55%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.hero-skeleton-main {
  grid-row: span 2;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

/* ---------- Секции ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
}

.section-kicker.light {
  color: rgba(255, 255, 255, 0.7);
}

.section-title h2 {
  margin-top: 4px;
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.category-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-tab {
  border: 0;
  background: transparent;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.category-tab:hover {
  background: #ebebf1;
  color: var(--ink);
}

.category-tab.is-active {
  background: var(--ink);
  color: #fff;
}

.search-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  margin-bottom: 14px;
  background: var(--brand-soft);
  border: 1px solid #ffd7d4;
  border-radius: 10px;
  color: #8d1a15;
  font-size: 13px;
}

.search-note button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: 12.5px;
  white-space: nowrap;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 20, 35, 0.09);
  border-color: #dcdce4;
}

.news-thumb {
  position: relative;
  height: 144px;
  padding: 14px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background-color: #1a2332;
}

.news-thumb .card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.news-thumb::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.4));
}

.news-thumb-word {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 12px;
  max-width: 100%;
  overflow: hidden;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.news-thumb .hero-chip {
  position: relative;
  z-index: 3;
  font-size: 9.5px;
  padding: 4px 7px;
}

.news-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 16px;
}

.news-card h3 {
  font-size: 15.5px;
  line-height: 1.38;
  font-weight: 700;
  letter-spacing: -0.012em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-summary {
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  font-size: 11.5px;
  color: #8b8b97;
}

.news-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-meta svg {
  width: 14px;
  height: 14px;
  color: #b0b0ba;
  transition: color 0.16s ease, transform 0.16s ease;
}

.news-card:hover .news-meta svg {
  color: var(--brand);
  transform: translateX(2px);
}

.news-empty {
  grid-column: 1 / -1;
  padding: 48px 20px;
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
}

.news-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.news-more .btn {
  min-width: 190px;
}

/* ---------- Промо почты ---------- */

.mail-promo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  align-items: center;
  gap: 30px;
  padding: 38px;
  border-radius: 22px;
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(255, 137, 100, 0.35) 0%, transparent 55%),
    linear-gradient(132deg, #7f1212 0%, #bf1711 52%, #e2231a 100%);
  color: #fff;
  overflow: hidden;
  scroll-margin-top: 140px;
}

.mail-promo::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -250px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(255, 255, 255, 0.035),
    0 0 0 130px rgba(255, 255, 255, 0.025);
}

.mail-promo-text {
  position: relative;
  z-index: 2;
}

.mail-promo h2 {
  margin-top: 8px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.mail-promo p {
  margin-top: 14px;
  max-width: 440px;
  font-size: 14px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.8);
}

.promo-features {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.promo-features li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.promo-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-size: 10px;
  font-weight: 700;
}

.promo-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.promo-btn {
  background: #fff;
  color: var(--brand);
  padding: 12px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(60, 5, 5, 0.24);
}

.promo-btn:hover {
  background: #fff4f2;
}

.promo-link {
  font-size: 13.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.promo-link:hover {
  text-decoration: underline;
}

/* Макет почты */

.mail-preview {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 330px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 30px 70px rgba(60, 5, 5, 0.32);
  color: var(--ink);
  transform: rotate(-1.2deg);
  overflow: hidden;
}

.mail-preview-top {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid #efeff3;
  background: #fbfbfd;
}

.preview-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8d8df;
}

.preview-dot.red {
  background: #ff5f57;
}
.preview-dot.yellow {
  background: #febc2e;
}
.preview-dot.green {
  background: #28c840;
}

.preview-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: #8a8a95;
}

.mail-preview-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.mail-preview-side {
  width: 108px;
  padding: 12px 9px;
  border-right: 1px solid #f0f0f4;
  background: #fcfcfe;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.preview-compose {
  height: 28px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.preview-nav {
  height: 9px;
  border-radius: 4px;
  background: #ededf2;
  width: 78%;
}

.preview-nav.active {
  background: #ffe2e0;
  width: 92%;
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 7px;
}

.preview-nav.active span {
  display: block;
  width: 60%;
  height: 5px;
  border-radius: 3px;
  background: #f3a29d;
}

.preview-nav.short {
  width: 56%;
}

.mail-preview-list {
  flex: 1;
  min-width: 0;
  padding: 6px 12px;
}

.preview-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 2px;
  border-bottom: 1px solid #f2f2f6;
}

.preview-row.unread {
  background: #fff9f8;
  margin: 0 -12px;
  padding-left: 14px;
  padding-right: 14px;
  border-bottom-color: #ffe7e4;
}

.preview-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
}

.preview-avatar.a {
  background: #e8d5ff;
}
.preview-avatar.b {
  background: #d5e8ff;
}
.preview-avatar.c {
  background: #ffdfd5;
}
.preview-avatar.d {
  background: #d5f2e4;
}
.preview-avatar.e {
  background: #f7e7c7;
}

.preview-lines {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-lines b {
  height: 6px;
  width: 52%;
  border-radius: 3px;
  background: #b9b9c4;
}

.preview-lines span {
  height: 5px;
  width: 84%;
  border-radius: 3px;
  background: #e7e7ed;
}

.preview-row.unread .preview-lines b {
  background: #767681;
}

.preview-date {
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: #e3e3e9;
  flex: none;
}

.preview-badge {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #17171d;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(20, 20, 30, 0.22);
}

/* ---------- Гороскоп ---------- */

.horoscope-section {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  scroll-margin-top: 140px;
}

.horoscope-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.horoscope-head > p {
  max-width: 330px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: right;
}

.zodiac-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.zodiac-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #55555f;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.zodiac-chip:hover {
  border-color: #cfcfda;
  color: var(--ink);
}

.zodiac-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.zodiac-symbol {
  font-size: 14px;
  line-height: 1;
}

.horoscope-result {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  background:
    radial-gradient(100% 160% at 100% 0%, #ffe8df 0%, transparent 55%),
    #f6f4fb;
  min-height: 100px;
}

.horoscope-sign {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.horoscope-sign span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.horoscope-result p {
  font-size: 13.5px;
  line-height: 1.6;
  color: #3d3d47;
}

/* ---------- Правая колонка ---------- */

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.mail-card {
  padding: 22px;
  border-top: 3px solid var(--brand);
}

.mail-card-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mail-card-brand em {
  color: var(--brand);
  font-style: normal;
}

.mail-mark {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #ff3b30, #c5150e);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  padding-bottom: 1px;
  flex: none;
}

.mail-card h3 {
  margin-top: 15px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.mail-card-text {
  margin-top: 6px;
  margin-bottom: 13px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.mail-login-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mail-login-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mail-login-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.09);
}

.mail-login-btn {
  width: 100%;
  height: 40px;
  margin-top: 2px;
  font-size: 13.5px;
}

.mail-card-error {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #b91c1c;
}

.mail-card-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.mail-card-links a:hover,
.mail-card-links button:hover {
  color: var(--brand);
}

.mail-card-links button {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 600;
  font-size: 12px;
  padding: 0;
}

.demo-login-link {
  display: block;
  width: 100%;
  margin-top: 13px;
  padding: 9px 8px 0;
  border: 0;
  border-top: 1px dashed var(--line);
  background: transparent;
  font-size: 10.5px;
  line-height: 1.5;
  color: #9696a1;
  text-align: center;
}

.demo-login-link:hover {
  color: var(--brand);
}

.mail-card.is-auth {
  border-top-color: var(--green);
}

.mail-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.mail-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.mail-user-row strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
}

.mail-user-row span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
}

.mail-unread-note {
  margin-top: 13px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4fbf8;
  color: #0b7252;
  font-size: 12px;
  line-height: 1.45;
}

.mail-open-btn {
  width: 100%;
  height: 40px;
  margin-top: 12px;
  font-size: 13.5px;
}

/* Погода */

.side-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.side-card-head h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.side-card-head select {
  height: 28px;
  max-width: 145px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9f9fb;
  font-size: 11.5px;
  color: #55555f;
  outline: none;
}

.weather-now {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-icon {
  width: 52px;
  height: 52px;
  flex: none;
  color: #5f6c85;
}

.weather-temp {
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.weather-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.weather-details b {
  font-weight: 600;
  color: #44444f;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--muted);
}

.forecast-day .weather-icon {
  width: 22px;
  height: 22px;
}

.forecast-temp {
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}

.forecast-temp span {
  color: #9999a3;
  font-weight: 500;
}

/* Курсы */

.rates-source {
  font-size: 10.5px;
  color: #9a9aa5;
}

a.rates-source {
  color: var(--brand);
  font-weight: 600;
}

a.rates-source:hover {
  text-decoration: underline;
}

.side-source {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #9a9aa5;
}

.side-source a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.side-source a:hover {
  color: var(--brand);
}

.horoscope-source {
  margin-top: 12px;
  font-size: 10.5px;
  color: #9a9aa5;
}

.horoscope-source a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.horoscope-source a:hover {
  color: var(--brand);
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.terms-check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.terms-check a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rates-list {
  display: flex;
  flex-direction: column;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f2f2f6;
  font-size: 12.5px;
}

.rate-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.rate-code {
  width: 30px;
  font-weight: 700;
  font-size: 11.5px;
  color: #5c5c68;
}

.rate-name {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
}

.rate-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rate-delta {
  width: 43px;
  text-align: right;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.rate-delta.up {
  color: #0e9f6e;
}

.rate-delta.down {
  color: #dc2626;
}

.side-muted {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Подвал ---------- */

.site-footer {
  margin-top: 10px;
  padding: 44px 0 18px;
  background: #141419;
  color: #a9a9b5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.1fr 1.25fr;
  gap: 34px;
}

.footer-brand {
  color: #fff;
}

.footer-brand .brand-word {
  font-size: 21px;
}

.footer-about p {
  max-width: 330px;
  margin-top: 13px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #8b8b99;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
}

.footer-col h4 {
  margin-bottom: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col a:hover {
  color: #fff;
}

.footer-password {
  margin-top: 3px;
  color: #737380;
  font-size: 11px;
  line-height: 1.5;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 17px;
  border-top: 1px solid #26262e;
  color: #777784;
  font-size: 11.5px;
  flex-wrap: wrap;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- Модальное окно входа ---------- */

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 438px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(10, 10, 25, 0.3);
  animation: pop-in 0.2s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f4f4f7;
  color: #666671;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close:hover {
  background: #ebebf0;
  color: var(--ink);
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-brand em {
  color: var(--brand);
  font-style: normal;
}

.auth-modal h2 {
  margin-top: 20px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.auth-subtitle {
  margin-top: 5px;
  font-size: 13px;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 3px;
  margin-top: 20px;
  padding: 4px;
  border-radius: 10px;
  background: #f4f4f7;
}

.auth-tab {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 20, 30, 0.1);
}

.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.45;
}

.auth-error[hidden] {
  display: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 17px;
}

.auth-form[hidden] {
  display: none;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field > label {
  font-size: 11.5px;
  font-weight: 600;
  color: #55555f;
}

.form-field input {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13.5px;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.09);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 82px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.password-toggle:hover {
  color: var(--brand);
}

.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-suffix:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(226, 35, 26, 0.09);
}

.input-suffix input {
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  padding-right: 4px;
}

.input-suffix span {
  padding: 0 12px 0 2px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 3px;
}

.demo-inline {
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: #fafafd;
  padding: 9px;
  font-size: 11.5px;
  color: var(--muted);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.demo-inline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.auth-note {
  font-size: 10.5px;
  line-height: 1.5;
  color: #9a9aa5;
  text-align: center;
}

/* ---------- Модальное окно статьи ---------- */

.article-modal {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(10, 10, 25, 0.32);
  animation: pop-in 0.2s ease;
}

.article-modal .modal-close {
  background: rgba(15, 15, 20, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
}

.article-modal .modal-close:hover {
  background: rgba(15, 15, 20, 0.6);
  color: #fff;
}

.article-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 235px;
  padding: 24px;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
  background-color: #1a2332;
}

.article-hero .card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.article-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 15, 0.04), rgba(5, 5, 15, 0.58));
}

.article-hero .article-ghost {
  position: absolute;
  z-index: 0;
  top: 10px;
  right: 24px;
  max-width: 100%;
  overflow: hidden;
  font-size: 80px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.16);
  white-space: nowrap;
}

.article-hero .article-category,
.article-hero .article-time {
  position: relative;
  z-index: 1;
}

.article-time {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  padding: 5px 0;
}

.article-content {
  padding: 28px 32px 26px;
}

.article-content h2 {
  font-size: clamp(25px, 3.2vw, 33px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.article-summary {
  margin-top: 13px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #555560;
  font-weight: 500;
}

.article-text {
  margin-top: 18px;
}

.article-text p {
  margin: 0 0 15px;
  font-size: 14.5px;
  line-height: 1.75;
  color: #33333d;
}

.article-text p:last-child {
  margin-bottom: 0;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: #9999a4;
  flex-wrap: wrap;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
  .site-search {
    max-width: 390px;
  }

  .main-nav {
    gap: 17px;
  }

  .nav-link {
    font-size: 13px;
  }

  .header-register {
    display: none;
  }

  .hero-grid {
    grid-template-rows: repeat(2, 200px);
  }
}

@media (max-width: 1080px) {
  .portal-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
    padding-top: 22px;
  }

  .portal-main,
  .portal-aside {
    display: contents;
  }

  .hero {
    order: 1;
  }

  .mail-card {
    order: 2;
  }

  .news-section {
    order: 3;
  }

  .weather-card {
    order: 4;
  }

  .rates-card {
    order: 5;
  }

  .mail-promo {
    order: 6;
  }

  .horoscope-section {
    order: 7;
  }

  .hero-grid {
    grid-template-columns: 1.45fr 1fr;
    grid-template-rows: repeat(2, 215px);
  }

  .mail-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    column-gap: 24px;
    align-items: center;
  }

  .mail-card-brand,
  .mail-card h3 {
    grid-column: 1;
  }

  .mail-card-text {
    grid-column: 1;
  }

  .mail-login-form {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .mail-card-links {
    grid-column: 1;
    justify-content: flex-start;
    margin-top: 10px;
  }

  .demo-login-link {
    grid-column: 1 / -1;
  }

  .mail-card.is-auth {
    display: block;
  }

  .mail-promo {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: relative;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 13px 0;
    gap: 12px;
  }

  .header-actions {
    margin-left: auto;
  }

  .site-search {
    order: 5;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .site-search input {
    height: 40px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-row {
    display: none;
    border-top: 1px solid var(--line);
  }

  .site-header.nav-open .nav-row {
    display: block;
  }

  .nav-inner {
    padding: 6px 0;
    min-height: 0;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    padding: 11px 2px;
    font-size: 14px;
  }

  .nav-link-active::after {
    display: none;
  }

  .nav-date {
    display: none;
  }

  .header-mail-link span {
    display: none;
  }

  .portal-aside {
    display: contents;
  }

  .mail-card {
    display: block;
  }

  .mail-login-form {
    width: 100%;
    max-width: 420px;
  }

  .hero-grid {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: repeat(2, 190px);
    gap: 12px;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-card.is-main {
    padding: 22px;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .mail-promo {
    grid-template-columns: 1fr;
    padding: 30px;
  }

  .mail-preview {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .brand-word {
    font-size: 21px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .portal-layout {
    padding-bottom: 32px;
  }

  .hero-grid {
    display: flex;
    flex-direction: column;
  }

  .hero-card {
    min-height: 190px;
  }

  .hero-card.is-main {
    min-height: 300px;
    padding: 22px;
  }

  .hero-card.is-main h3 {
    font-size: 25px;
  }

  .hero-card h3 {
    font-size: 17px;
  }

  .category-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .category-tabs::-webkit-scrollbar {
    display: none;
  }

  .category-tab {
    flex: none;
  }

  .section-title h2 {
    font-size: 25px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-thumb {
    height: 136px;
  }

  .mail-promo {
    padding: 25px 22px;
    border-radius: 18px;
  }

  .mail-promo h2 {
    font-size: 29px;
  }

  .horoscope-section {
    padding: 22px;
    border-radius: 16px;
  }

  .horoscope-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .horoscope-head > p {
    text-align: left;
  }

  .horoscope-result {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .zodiac-chips {
    gap: 6px;
  }

  .side-card {
    padding: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px 20px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .auth-modal {
    padding: 24px 20px;
  }

  .article-content {
    padding: 22px 20px;
  }

  .article-hero {
    height: 190px;
    padding: 18px;
  }

  .article-hero .article-ghost {
    font-size: 54px;
  }

  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .header-register {
    display: none;
  }

  .portal-auth .btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .site-search {
    order: 5;
  }

  .hero-card.is-main {
    min-height: 270px;
  }

  .hero-card.is-main p {
    display: none;
  }

  .mail-card-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
