:root {
  --bg: var(--tg-theme-bg-color, #0b0d12);
  --text: var(--tg-theme-text-color, #f5f7fb);
  --muted: var(--tg-theme-hint-color, #8e96a8);
  --accent: var(--tg-theme-button-color, #7c6df2);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --line: color-mix(in srgb, var(--muted) 22%, transparent);
  --danger: #ff7188;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }

.shell {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding:
    calc(22px + var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px))
    calc(18px + var(--tg-content-safe-area-inset-right, 0px))
    calc(28px + var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px))
    calc(18px + var(--tg-content-safe-area-inset-left, 0px));
}

.hero { padding: 4px 2px 20px; }

h1 {
  margin: 0 0 7px;
  font-size: clamp(30px, 9vw, 44px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.hero p, .empty p { margin: 0; color: var(--muted); line-height: 1.5; }

.feed { display: grid; }

.card {
  position: relative;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 2px;
  background: transparent;
}

.card.unread::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.card-top { display: flex; align-items: center; gap: 8px; padding-right: 18px; }

.version { color: var(--muted); font-size: 12px; font-weight: 650; }

.card h2 { margin: 15px 0 8px; font-size: 22px; letter-spacing: -.025em; }
.summary { margin: 0; color: var(--muted); line-height: 1.52; }

.body {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  line-height: 1.58;
  white-space: pre-wrap;
}

.card.open .body { display: block; }

.card-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }

.text-button, .channel-link {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.empty { padding: 64px 28px; text-align: center; }
.empty h2 { margin: 14px 0 8px; }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; font-size: 24px; }
.error-icon { color: var(--danger); background: color-mix(in srgb, var(--danger) 13%, transparent); }

.primary {
  margin-top: 20px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  color: var(--accent-text);
  background: var(--accent);
  font: inherit;
  font-weight: 720;
}

.hidden { display: none; }

.skeleton div {
  height: 14px;
  margin: 10px 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
}

.skeleton div:first-child { width: 28%; }
.skeleton div:nth-child(2) { width: 74%; height: 24px; }
.skeleton div:last-child { width: 92%; }
