:root {
  --bg: #030806;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --text: #f5faf7;
  --muted: rgba(245, 250, 247, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #1bb38d;
  --accent-2: #2bd26e;
  --accent-soft: rgba(27, 179, 141, 0.16);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
  --radius: 24px;
  --radius-sm: 16px;
  --max: 1180px;
  --anchor-offset: 40px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

section[id],
.page[id] {
  scroll-margin-top: var(--anchor-offset);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(27, 179, 141, 0.18), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(43, 210, 110, 0.10), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(27, 179, 141, 0.08), transparent 30%),
    var(--bg);
  line-height: 1.6;
}

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

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  color: #c9fff0;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(3, 8, 6, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.brand span {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--muted);
}

.navlinks a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  box-shadow: 0 16px 36px rgba(34, 158, 217, 0.24);
}

.btn-primary:hover {
  background: #1f8fc5;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
}

main {
  padding: 28px 0 72px;
}

.telegram-link {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.15);
  color: #229ed9;
  flex: 0 0 auto;
}

.telegram-link img,
.telegram-link svg {
  width: 22px;
  height: 22px;
  display: block;
}

.hero {
  padding: 24px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 32px;
  align-items: center;
}

.blog-hero-grid {
  align-items: start;
}

.hero-copy {
  min-width: 0;
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.page-shell {
  padding-top: 12px;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.77rem;
  font-weight: 800;
}

.eyebrow {
  color: var(--accent-2);
  margin-bottom: 16px;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 5.8vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  max-width: none;
}

h1 span,
h2 span {
  color: var(--accent);
}

.lead {
  margin-top: 18px;
  max-width: 62ch;
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.94rem;
}

.trust span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  display: inline-block;
}

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

.stat-card,
.stat,
.signal-card,
.card,
details,
.strip,
.cta,
.sidebar-card,
.featured-article,
.page-header,
.archive-toolbar,
.search-large,
.topic-chip,
.post-hero,
.article-cta {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
}

.stat {
  padding: 16px;
  border-radius: 18px;
}

.stat strong {
  display: block;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.4;
}

section {
  padding: 28px 0;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.section-head.center {
  text-align: center;
}

.section-head.center .kicker {
  justify-content: center;
}

.sub {
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.78;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.featured-article,
.sidebar-card,
.post-card,
.cta-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.featured-image {
  min-height: 290px;
  background: linear-gradient(135deg, rgba(27, 179, 141, 0.68), rgba(43, 210, 110, 0.42));
  position: relative;
  padding: 24px;
  display: flex;
  align-items: end;
}

.featured-image::after {
  content: "";
  position: absolute;
  inset: auto -24px -24px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.image-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f8b79;
  font-weight: 700;
  font-size: 13px;
  width: fit-content;
}

.featured-body {
  padding: 24px;
}

.meta,
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.meta {
  margin-bottom: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(27, 179, 141, 0.08);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
}

.featured-body h3,
.post-card h3,
.sidebar-card h3,
.cta-card h3,
.page-header h1,
.post-header h1,
.archive-title h1 {
  margin: 12px 0 10px;
  letter-spacing: -0.04em;
}

.featured-body p,
.post-card p,
.sidebar-card p,
.cta-card p,
.page-header p,
.post-body p,
.post-body li,
.article-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sidebar {
  display: grid;
  gap: 22px;
}

.sidebar-card {
  padding: 22px;
}

.topic-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.topic-list.compact {
  margin-top: 14px;
}

.topic {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
}

.topic strong {
  font-weight: 700;
}

.topic span {
  color: var(--muted);
  font-weight: 700;
}

.search-row {
  display: grid;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: #030806;
}

.search input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
  color: #030806;
}

.search-large {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: #030806;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-large span {
  color: #0f8b79;
  font-size: 1rem;
  font-weight: 800;
}

.search-large input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
  color: #030806;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topic-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(43, 210, 110, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

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

.post-card .thumb {
  min-height: 180px;
  background: linear-gradient(135deg, rgba(43, 210, 110, 0.14), rgba(27, 179, 141, 0.07));
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.post-card .thumb::before,
.post-card .thumb::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(27, 179, 141, 0.10);
}

.post-card .thumb::before {
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -60px;
}

.post-card .thumb::after {
  width: 100px;
  height: 100px;
  left: -20px;
  top: -30px;
  background: rgba(43, 210, 110, 0.12);
}

.post-card .content {
  padding: 20px;
  display: grid;
  gap: 10px;
}

.post-card .content h3 {
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.35;
}

.post-card .content p {
  font-size: 0.96rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.page-header {
  border-radius: 30px;
  padding: 34px;
  margin-bottom: 26px;
}

.page-header .lead {
  margin-top: 14px;
}

.archive,
.related-posts {
  padding-top: 0;
}

.archive-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  margin-bottom: 20px;
}

.archive-count {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.archive-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 340px);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #030806;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.archive-search span {
  color: #0f8b79;
  font-weight: 800;
}

.archive-search input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
  color: #030806;
}

.post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page {
  padding: 48px 0 72px;
}

.page .content {
  max-width: 820px;
}

.post-single .content,
.post-body {
  max-width: 820px;
}

.post-header {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

.post-header .lead {
  margin-top: 0;
}

.post-hero {
  margin: 0 0 28px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-hero img {
  width: 100%;
  height: auto;
}

.post-body {
  display: grid;
  gap: 18px;
  line-height: 1.85;
}

.post-body h2,
.post-body h3 {
  margin: 1.4em 0 0.4em;
  letter-spacing: -0.03em;
}

.post-body h2:first-child,
.post-body h3:first-child {
  margin-top: 0;
}

.post-body a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body ul,
.post-body ol {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 10px;
}

.post-body img {
  max-width: 100%;
  border-radius: 18px;
}

.post-footer-block {
  margin-top: 28px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related-posts .section-head {
  margin-top: 6px;
}

.article-cta {
  margin-top: 28px;
  padding: 28px;
  border-radius: 30px;
}

.article-cta h2 {
  margin-top: 0;
}

.cta {
  display: grid;
  grid-template-columns: 1.15fr auto;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border-radius: 30px;
  margin-top: 12px;
}

.cta p {
  margin-top: 8px;
  line-height: 1.75;
}

.footer-inner {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 520px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-tagline {
  color: rgba(245, 250, 247, 0.52);
}

.details,
details {
  border-radius: 18px;
  padding: 18px 20px;
}

summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  color: var(--muted);
  margin-top: 10px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.check {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: #9af0d7;
  font-size: 0.85rem;
  font-weight: 900;
  margin-top: 1px;
}

#meal-logging {
  padding: 40px 0;
}

.logging-methods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.method-pill {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.method-icon {
  font-size: 1.4rem;
  flex: 0 0 auto;
}

.method-pill strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.method-pill small {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.meal-logging-note {
  max-width: 70ch;
  margin: 22px auto 0;
  text-align: center;
  color: var(--muted);
  line-height: 1.7;
}

.notes,
.note {
  color: var(--muted);
}

.stats-strip {
  margin: 1.5rem 0 2.25rem;
}

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

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1rem;
  border-radius: 22px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(43, 210, 110, 0.2);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(27, 179, 141, 0.14), transparent 55%);
  pointer-events: none;
}

.stat-card strong {
  position: relative;
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.stat-card span {
  position: relative;
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 3vw, 3.3rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.page h1 {
  font-size: clamp(3.5rem, 7vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.page h2 {
  font-size: 1.35rem;
  margin: 28px 0 10px;
}

.page p,
.page li {
  color: var(--muted);
  line-height: 1.8;
}

@media (min-width: 1024px) {
  .hero-visual {
    justify-self: end;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: min(var(--max), calc(100% - 20px));
  }

  .nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand span {
    font-size: 1.3rem;
  }

  .navlinks a:not(.telegram-link) {
    display: none;
  }

  .navlinks {
    gap: 0;
  }

  .btn {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .hero-grid,
  .featured-grid,
  .blog-grid,
  .cta {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 18px 0 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stat-grid,
  .stats-grid,
  .logging-methods {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .topic-list {
    gap: 8px;
  }

  .topic-chip {
    width: auto;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 11vw, 4rem);
    line-height: 0.95;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.7;
  }

  .page-header,
  .cta,
  .article-cta {
    padding: 22px;
    border-radius: 24px;
  }

  .archive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .archive-search {
    min-width: 0;
    width: 100%;
  }

  .footer-inner,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
