:root {
  color: #091b36;
  background: #f5f7fb;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --navy: #091b36;
  --blue: #0d6efd;
  --sky: #48a8ff;
  --coral: #ff7f70;
  --muted: #637188;
  --line: rgba(9,27,54,.11);
}

* { box-sizing: border-box; }
html { min-width: 320px; overflow-x: clip; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(circle at 94% 3%,rgba(72,168,255,.13),transparent 30rem),
    radial-gradient(circle at 0 52%,rgba(255,127,112,.07),transparent 30rem),
    #f5f7fb;
}
a { color: inherit; }
.site-header,
.page,
.site-footer { width: min(1160px,calc(100% - 48px)); margin-inline: auto; }
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: inline-flex; }
.brand img { display: block; width: 144px; }
.header-links { display: flex; align-items: center; gap: 22px; }
.header-links a { color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.header-links .header-primary {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
}
.page { padding: 20px 0 70px; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
  color: #7a8799;
  font-size: 11px;
}
.breadcrumbs a { text-decoration: none; }
.breadcrumbs span::before { content: "·"; margin-right: 7px; }
.hub-hero,
.article-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(9,27,54,.07);
  border-radius: 36px;
  background: linear-gradient(125deg,#fff4f1,#f2f7ff 64%,#e2efff);
  box-shadow: 0 22px 64px rgba(9,27,54,.08);
}
.hub-hero { min-height: 420px; padding: 62px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 50px; }
.hub-hero::after,
.article-hero::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -170px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(13,110,253,.12);
  border-radius: 50%;
}
.kicker {
  margin: 0;
  color: #0867ee;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 16px 0 0;
  font-size: clamp(43px,5.5vw,68px);
  line-height: .98;
  letter-spacing: -.057em;
}
.hub-lead,
.article-lead {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 22px 0 0;
  color: #56657a;
  font-size: 17px;
  line-height: 1.55;
}
.hub-visual {
  position: relative;
  z-index: 1;
  min-height: 270px;
  display: grid;
  place-items: center;
}
.hub-ring {
  width: 238px;
  height: 238px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: conic-gradient(#0d6efd 0 61%,#72bbfb 61% 100%);
  box-shadow: 0 28px 48px rgba(13,110,253,.2);
}
.hub-ring::before {
  content: "";
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #0b315f;
}
.hub-ring span { position: absolute; text-align: center; font-size: 13px; font-weight: 800; line-height: 1.35; }
.hub-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}
.hub-card {
  position: relative;
  min-height: 330px;
  padding: 29px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 30px rgba(9,27,54,.06);
  text-decoration: none;
  transition: transform 200ms ease,box-shadow 200ms ease;
}
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(9,27,54,.11); }
.hub-card-number { position: absolute; right: 24px; top: 17px; color: #d9e9fb; font-size: 58px; font-weight: 850; letter-spacing: -.08em; }
.hub-card-category,
.article-meta { color: #0870e7; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.hub-card h2 { position: relative; z-index: 1; margin: 56px 0 12px; font-size: 29px; line-height: 1.04; letter-spacing: -.04em; }
.hub-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.52; }
.hub-card-action,
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  text-decoration: none;
}
.hub-card-action { margin-top: auto; padding-top: 22px; color: #0969dc; font-size: 12px; }
.hub-card-action svg,
.tool-link svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.article-hero { padding: 54px 58px; }
.article-hero h1 { max-width: 900px; font-size: clamp(42px,5vw,64px); }
.article-meta { position: relative; z-index: 1; margin-top: 22px; }
.article-cover {
  position: relative;
  margin: 22px 0 0;
  overflow: hidden;
  border: 1px solid rgba(9,27,54,.09);
  border-radius: 30px;
  background: #eaf1fa;
  box-shadow: 0 18px 46px rgba(9,27,54,.1);
}
.article-cover picture,
.article-cover img { display: block; width: 100%; }
.article-cover img {
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
}
.article-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 290px;
  align-items: start;
  gap: 22px;
}
.article-body {
  min-width: 0;
  padding: 44px 50px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 34px rgba(9,27,54,.05);
}
.article-body h2 { margin: 42px 0 14px; font-size: 31px; line-height: 1.08; letter-spacing: -.035em; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 28px 0 10px; font-size: 21px; line-height: 1.16; }
.article-body p,
.article-body li { color: #36455a; font-size: 16px; line-height: 1.7; }
.article-body p { margin: 0 0 17px; }
.article-body ul,
.article-body ol { margin: 0 0 22px; padding-left: 23px; }
.article-body li + li { margin-top: 8px; }
.article-body strong { color: var(--navy); }
.article-body a { color: #0867ee; text-underline-offset: 3px; }
.article-body table { width: 100%; margin: 20px 0 24px; border-collapse: collapse; }
.article-body th,
.article-body td { padding: 13px 14px; border: 1px solid #dae2ec; text-align: left; vertical-align: top; font-size: 14px; line-height: 1.45; }
.article-body th { background: #edf5ff; }
.formula {
  margin: 22px 0;
  padding: 20px 22px;
  border: 1px solid #cfe1f5;
  border-radius: 18px;
  background: #f2f8ff;
  color: #123e70;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}
.note {
  margin: 22px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--coral);
  border-radius: 4px 18px 18px 4px;
  background: #fff5f2;
  color: #4b3b3a;
  font-size: 14px;
  line-height: 1.6;
}
.example {
  margin: 24px 0;
  padding: 23px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg,#071b38,#0b3f78);
}
.example span { display: block; color: #91c9fb; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.example strong { display: block; margin: 8px 0; color: #fff; font-size: 26px; }
.example p { margin: 0; color: #c5d0df; font-size: 14px; }
.article-sidebar { position: sticky; top: 18px; display: grid; gap: 14px; }
.tool-card,
.toc-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(9,27,54,.05);
}
.tool-card {
  padding: 29px 27px 27px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(145deg,#0b315f,#0d6efd);
  animation: tool-card-pulse 3.2s ease-in-out infinite;
}
.tool-card span { display: block; color: #a9d6ff; font-size: 10px; font-weight: 850; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.tool-card strong { display: block; margin: 14px 0 26px; font-size: 22px; line-height: 1.08; }
.tool-actions { display: grid; gap: 12px; }
.tool-link {
  min-height: 46px;
  padding: 0 16px;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 12px;
  transition: transform 180ms ease,background 180ms ease;
}
.tool-link:hover { transform: translateY(-1px); background: rgba(255,255,255,.2); }
.tool-link-site {
  border-color: rgba(255,127,112,.7);
  color: #091b36;
  background: #ff8a7c;
}
.tool-link-site:hover { background: #ff9b90; }
@keyframes tool-card-pulse {
  0%,100% { box-shadow: 0 10px 28px rgba(9,27,54,.05),0 0 0 0 rgba(13,110,253,0); }
  50% { box-shadow: 0 16px 34px rgba(9,27,54,.11),0 0 0 8px rgba(13,110,253,.1); }
}
.toc-card strong { font-size: 13px; }
.toc-card ol { margin: 14px 0 0; padding-left: 20px; }
.toc-card li { color: #68768a; font-size: 12px; line-height: 1.45; }
.toc-card li + li { margin-top: 8px; }
.toc-card a { text-decoration: none; }
.article-inline-toc {
  margin: 28px 0 8px;
  padding: 24px 26px;
  border-color: rgba(13,110,253,.16);
  background: linear-gradient(145deg,#f5f9ff,#fff);
  box-shadow: none;
}
.article-inline-toc strong {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 16px;
}
.article-inline-toc strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(13,110,253,.09);
}
.article-inline-toc ol {
  margin-top: 17px;
  columns: 2;
  column-gap: 34px;
}
.article-inline-toc li {
  break-inside: avoid;
  padding-right: 10px;
  color: #52637b;
  font-size: 14px;
  line-height: 1.5;
}
.article-inline-toc a {
  color: #31506f;
  transition: color 160ms ease;
}
.article-inline-toc a:hover { color: var(--blue); }
.sources { margin-top: 36px; padding-top: 22px; border-top: 1px solid #dce3ec; }
.sources h2 { margin-top: 0; font-size: 22px; }
.sources p,
.sources li { font-size: 13px; line-height: 1.55; }
.site-footer {
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: #788497;
  font-size: 11px;
}
.site-footer a { text-decoration: none; }

@media (max-width: 900px) {
  .hub-hero { padding: 44px; grid-template-columns: 1fr .65fr; gap: 20px; }
  .hub-ring { width: 190px; height: 190px; }
  .hub-ring::before { width: 118px; height: 118px; }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-card { min-height: 260px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .site-header,
  .page,
  .site-footer { width: min(100% - 28px,1160px); }
  .site-header { min-height: 70px; }
  .brand img { width: 126px; }
  .header-links a:not(.header-primary) { display: none; }
  .header-links .header-primary { min-height: 38px; padding-inline: 14px; font-size: 11px; }
  .page { padding-top: 8px; }
  .hub-hero { min-height: 0; padding: 33px 22px 28px; grid-template-columns: 1fr; border-radius: 27px; }
  .hub-visual { min-height: 210px; }
  .hub-ring { width: 184px; height: 184px; }
  h1,
  .article-hero h1 { font-size: 39px; }
  .hub-lead,
  .article-lead { font-size: 15px; }
  .hub-card { min-height: 285px; padding: 25px; border-radius: 22px; }
  .hub-card h2 { font-size: 27px; }
  .article-hero { padding: 34px 23px 29px; border-radius: 27px; }
  .article-cover { margin-top: 14px; border-radius: 21px; }
  .article-layout { gap: 14px; }
  .article-body { padding: 30px 22px; border-radius: 22px; }
  .article-body h2 { font-size: 27px; }
  .article-body p,
  .article-body li { font-size: 15px; }
  .article-body table { display: block; overflow-x: auto; }
  .article-inline-toc { margin-top: 24px; padding: 21px 20px; border-radius: 18px; }
  .article-inline-toc ol { columns: 1; }
  .article-inline-toc li { font-size: 13px; }
  .article-sidebar { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { transition-duration: .01ms !important; }
  .tool-card { animation: none !important; }
}
