:root {
  --ss-bg: #0a0d12;
  --ss-bg-elevated: #12161d;
  --ss-bg-header: #151a22;
  --ss-line: rgba(255, 255, 255, 0.12);
  --ss-line-soft: rgba(255, 255, 255, 0.07);
  --ss-nav-line: rgba(255, 255, 255, 0.28);
  --ss-text: #ffffff;
  --ss-text-muted: #b8bec8;
  --ss-text-dim: #7a828e;
  --ss-accent: #2f7bff;
  --ss-accent-soft: rgba(47, 123, 255, 0.15);
  --ss-green: #3ecf6e;
  --ss-red: #ef4444;
  --ss-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --ss-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ss-max: 1660px;
  --ss-ticker-font: 22px;
  --ss-logo-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  color: var(--ss-text);
  background: var(--ss-bg);
  font-family: var(--ss-sans);
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.ss-shell {
  min-height: 100vh;
  max-width: var(--ss-max);
  margin: 0 auto;
}

/* Ticker */
.ss-ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--ss-line-soft);
  background: transparent;
  height: 56px;
}

.ss-ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  height: 56px;
  animation: ss-ticker 70s linear infinite;
}

.ss-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.35rem;
  color: var(--ss-text);
  font-size: var(--ss-ticker-font);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.ss-ticker-item:hover {
  opacity: 0.78;
}

.ss-ticker-item img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: cover;
  background: #1f2937;
}

.ss-ticker-item time {
  font-family: var(--ss-mono);
  font-size: 0.82em;
  font-weight: 500;
  color: var(--ss-text-dim);
}

.ss-ticker-item span:last-child {
  padding-right: 0.15rem;
}

.ss-ticker-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 1.15rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.55);
}

@keyframes ss-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Header */
.ss-header {
  background: transparent;
}

.ss-header-top {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 1.5rem;
  min-height: 104px;
  padding: 1rem 1.5rem 0.85rem;
  background: transparent;
}

.ss-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  align-self: center;
}

.ss-date {
  font-family: var(--ss-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ss-text);
}

.ss-rate-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  margin: 0;
  font-family: var(--ss-mono);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
}

.ss-fx-item {
  font-weight: 500;
}

.ss-fx-item--usd {
  color: #4da3ff;
}

.ss-fx-item--eur {
  color: #f0b429;
}

.ss-fx-item--cny {
  color: #3ecf6e;
}

.ss-fx-sep {
  margin: 0 0.35rem 0 0.15rem;
  color: var(--ss-text-dim);
}

.ss-fx-fallback {
  color: var(--ss-text-dim);
}

.ss-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0.5rem;
}

.ss-logo img {
  height: var(--ss-logo-height);
  width: auto;
  max-width: min(420px, 42vw);
}

.ss-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  align-self: center;
}

.ss-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: opacity 0.15s ease;
}

.ss-telegram:hover {
  opacity: 0.82;
}

.ss-telegram-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #29a9eb;
  color: #fff;
  flex-shrink: 0;
}

.ss-telegram-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ss-telegram-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ss-text);
  line-height: 1.2;
}

.ss-telegram-sub {
  font-size: 12px;
  color: var(--ss-text-dim);
  line-height: 1.2;
}

.ss-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: -0.25rem;
  color: var(--ss-text);
  transition: opacity 0.15s ease;
}

.ss-search:hover {
  opacity: 0.7;
}

/* Nav */
.ss-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  gap: 0;
  padding: 0;
  background: transparent;
  border-top: 2px solid var(--ss-nav-line);
  border-bottom: 2px solid var(--ss-nav-line);
}

.ss-nav-link {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
  height: 64px;
  padding: 0 0.85rem;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
}

.ss-nav-link + .ss-nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 50%;
  min-height: 30px;
  background: var(--ss-nav-line);
  pointer-events: none;
}

.ss-nav-link::after {
  content: none;
}

.ss-nav-label {
  position: relative;
  display: inline-block;
}

.ss-nav-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 4px;
  border-radius: 1px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: center bottom;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.ss-nav-link:hover .ss-nav-label::after {
  transform: scaleX(1);
}

.ss-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ss-green);
  color: #041007;
  font-size: 11px;
  font-weight: 800;
}

.ss-nav-plus {
  color: var(--ss-text-dim);
  font-weight: 700;
}

.ss-nav-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--ss-text-dim);
  vertical-align: super;
  margin-left: 0.1rem;
}

.ss-nav-caret {
  margin-left: 0.15rem;
  font-size: 11px;
  color: var(--ss-text-dim);
}

.ss-nav-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: 0.85;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.ss-nav-icon--tg {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.04 15.31 8.9 18.6c.46 0 .66-.2.9-.44l2.16-2.07 4.48 3.28c.82.45 1.41.21 1.61-.74l2.94-13.78h.01c.26-1.22-.44-1.7-1.24-1.4L2.6 9.44c-1.2.47-1.18 1.14-.2 1.44l4.88 1.52L18.9 6.1c.56-.37 1.07-.16.65.21'/%3E%3C/svg%3E");
}

.ss-nav-avatars {
  display: inline-flex;
  margin-left: 0.35rem;
}

.ss-nav-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: -7px;
  border-radius: 999px;
  border: 2px solid var(--ss-bg);
  background: #374151;
  font-size: 9px;
  font-weight: 700;
}

.ss-nav-avatar:first-child {
  margin-left: 0;
}

/* Main grid */
.ss-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr) minmax(260px, 0.85fr);
  min-height: calc(100vh - 180px);
}

.ss-hero-col,
.ss-news-col,
.ss-articles-col {
  padding: 1.25rem;
}

.ss-news-col,
.ss-articles-col {
  border-left: 1px solid var(--ss-line);
}

.ss-col-label {
  margin: 0 0 1rem;
  font-family: var(--ss-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ss-text-dim);
}

/* Hero */
.ss-hero-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #1f2937;
}

.ss-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.ss-hero-media:hover img {
  transform: scale(1.02);
}

.ss-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.55rem;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-family: var(--ss-mono);
  font-size: 11px;
  font-weight: 500;
}

.ss-hero-title {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  background: #fff;
  color: #111827;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.ss-hero-lead {
  margin: 1rem 0 0;
  font-size: 15px;
  color: var(--ss-text-muted);
  max-width: 54ch;
}

.ss-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.25rem;
  font-size: 12px;
  color: var(--ss-text-dim);
}

.ss-author {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ss-text-muted);
}

.ss-author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--ss-accent-soft);
  color: var(--ss-accent);
  font-size: 10px;
  font-weight: 700;
}

/* News list */
.ss-news-list,
.ss-articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-news-list li + li {
  border-top: 1px solid var(--ss-line-soft);
}

.ss-news-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  padding: 0.85rem 0;
  transition: opacity 0.15s ease;
}

.ss-news-item:hover {
  opacity: 0.82;
}

.ss-news-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  background: #1f2937;
}

.ss-news-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.ss-news-body time {
  font-family: var(--ss-mono);
  font-size: 11px;
  color: var(--ss-text-dim);
}

.ss-news-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* Articles */
.ss-articles-list li + li {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ss-line-soft);
}

.ss-article-item {
  display: block;
  transition: opacity 0.15s ease;
}

.ss-article-item:hover {
  opacity: 0.82;
}

.ss-article-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 0.65rem;
  background: #1f2937;
}

.ss-article-item time {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--ss-mono);
  font-size: 11px;
  color: var(--ss-text-dim);
}

.ss-article-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* Popular head */
.ss-popular-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--ss-line);
}

.ss-popular-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.ss-popular-title span {
  color: var(--ss-text-dim);
  font-weight: 500;
}

.ss-popular-nav {
  display: flex;
  gap: 0.35rem;
}

.ss-popular-nav button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--ss-line);
  border-radius: 6px;
  color: var(--ss-text-muted);
}

.ss-popular-nav button:disabled {
  opacity: 0.35;
  cursor: default;
}

.ss-popular-nav button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ss-text);
}

/* Responsive */
@media (max-width: 1100px) {
  .ss-main {
    grid-template-columns: 1fr 1fr;
  }

  .ss-hero-col {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--ss-line);
  }

  .ss-news-col {
    border-left: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --ss-ticker-font: 18px;
    --ss-logo-height: 52px;
  }

  .ss-ticker {
    height: 48px;
  }

  .ss-ticker-track {
    height: 48px;
  }

  .ss-ticker-item img {
    width: 28px;
    height: 28px;
  }

  .ss-header-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    min-height: auto;
    padding: 1rem;
  }

  .ss-meta,
  .ss-header-actions {
    width: 100%;
    justify-content: center;
  }

  .ss-rate-line {
    justify-content: center;
  }

  .ss-nav {
    overflow-x: auto;
  }

  .ss-nav-link {
    flex: 0 0 auto;
    font-size: 17px;
    font-weight: 700;
    height: 56px;
    padding: 0 1.1rem;
  }

  .ss-main {
    grid-template-columns: 1fr;
  }

  .ss-news-col,
  .ss-articles-col {
    border-left: 0;
    border-top: 1px solid var(--ss-line);
  }

  .ss-hero-title {
    font-size: 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ss-ticker-track {
    animation: none;
  }

  .ss-hero-media img {
    transition: none;
  }

  .ss-nav-label::after {
    transition: none;
  }
}
