:root {
  --bg: #0d0d10;
  --surface: #17171c;
  --brand: #ff5e00;
  --text: #f2f2f7;
  --text-soft: #c9c9d1;
  --muted: #8a8a93;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg) url("/86.webp") center / cover no-repeat fixed;
  color: var(--text);
  font: 16px/1.65 "Exo 2", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0.62;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 24px;
}

.header__logo {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.04em;
}

.header__brand { color: var(--brand); }

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

.header__date { margin: 0; color: var(--muted); text-transform: capitalize; }

.header__stale {
  font-size: 12px;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  background: rgba(23, 23, 28, 0.9);
  border: 1px solid #232329;
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow: hidden;
}

.card--skeleton { min-height: 160px; }

.card--skeleton,
.card--loading {
  background: linear-gradient(100deg, var(--surface) 40%, #1f1f26 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

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

.card__title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
}

.card__source {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.card__joke-title {
  margin: 0 0 10px;
  font-weight: 650;
  font-size: 18px;
  line-height: 1.45;
}

.card__joke-text { margin: 0; color: var(--text); line-height: 1.6; }

.card__quote {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--brand);
  font-size: 19px;
  line-height: 1.55;
  font-style: italic;
}

.card__cite {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
  color: var(--muted);
}

.card__repos { list-style: none; margin: 0; padding: 0; }

.repo { padding: 8px 0; border-top: 1px solid #232329; }
.repo:first-child { border-top: 0; padding-top: 0; }

.repo__name {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

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

.repo__meta { margin-left: 8px; font-size: 12px; color: var(--muted); }

.repo__desc { margin: 5px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-soft); }

.topic { margin-bottom: 14px; }
.topic:last-child { margin-bottom: 0; }

.topic__chip {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 1px 8px;
  margin-bottom: 8px;
}

.topic__list { list-style: none; margin: 0; padding: 0; }

.topic__item { margin-bottom: 8px; font-size: 14px; line-height: 1.55; }

.topic__link { color: var(--text); text-decoration: none; line-height: 1.5; }
.topic__link:hover { color: var(--brand); }

.topic__source { margin-left: 6px; font-size: 11px; color: var(--muted); }

.rates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.rates__tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(13, 13, 16, 0.75);
  border: 1px solid #232329;
  border-radius: 10px;
  padding: 8px 10px;
}

.rates__top { display: flex; align-items: center; gap: 6px; }

.rates__flag { font-size: 15px; line-height: 1; }

.rates__code {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rates__value { font-size: 15px; line-height: 1.3; }

.rates__change { font-size: 11px; color: var(--muted); }
.rates__change.up { color: #3fd06c; }
.rates__change.down { color: #ff5e5e; }

.rates__note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.markets__headline {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  text-decoration: none;
}

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

.card__error { color: var(--muted); font-size: 14px; }

.footer { margin-top: 28px; text-align: center; }

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