:root {
  --bg: #f6f8fc;
  --card: rgba(255, 255, 255, 0.94);
  --card-soft: rgba(241, 244, 250, 0.94);
  --line: rgba(203, 213, 225, 0.92);
  --text: #121722;
  --soft: #344052;
  --muted: #64748b;
  --brand: #0b5fff;
  --accent: #0e9f88;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(780px 420px at -5% -8%, rgba(11, 95, 255, 0.14), transparent 62%),
    radial-gradient(720px 420px at 105% 0%, rgba(14, 159, 136, 0.12), transparent 62%),
    linear-gradient(180deg, #f7f9fd 0%, #e8effa 100%);
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 18px 84px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a,
.link {
  color: var(--brand);
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero,
.card,
.tag-cloud,
.article-grid article {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 14px 30px rgba(16, 32, 57, 0.08);
}

.hero {
  border-radius: 24px;
  padding: clamp(24px, 5vw, 44px);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dce7ff;
  color: #0c2f73;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

p,
li {
  color: var(--soft);
  line-height: 1.65;
}

.lead {
  max-width: 780px;
  font-size: 1.08rem;
}

.section {
  margin-top: 28px;
}

.tag-cloud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-radius: 18px;
  padding: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(11, 95, 255, 0.18);
  border-radius: 999px;
  background: rgba(11, 95, 255, 0.07);
  color: #0c2f73;
  font-weight: 780;
  text-decoration: none;
}

.article-grid,
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.article-grid article,
.card {
  border-radius: 20px;
  padding: 18px;
}

.article-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-card-link:hover h3 {
  color: var(--brand);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.article-body,
.article-aside {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 14px 30px rgba(16, 32, 57, 0.08);
}

.article-body {
  padding: clamp(22px, 4vw, 42px);
}

.article-body h2 {
  margin-top: 34px;
}

.article-body h3 {
  margin-top: 24px;
}

.article-body table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  background: white;
}

.article-body th,
.article-body td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-body th {
  color: var(--text);
  background: #eef4ff;
}

.article-aside {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.article-aside a {
  display: block;
  margin: 8px 0;
  color: var(--brand);
  font-weight: 760;
}

.note {
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  background: rgba(14, 159, 136, 0.08);
}

.formula {
  padding: 16px;
  border-radius: 14px;
  background: #0f172a;
  color: white;
  font-weight: 850;
}

.formula span {
  color: #c7d2fe;
}

.label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 8px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: white;
  font-weight: 850;
  text-decoration: none;
}

footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.7;
}

footer a {
  color: var(--brand);
  font-weight: 760;
}

@media (max-width: 860px) {
  .article-grid,
  .topic-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-aside {
    position: static;
  }
}
