/*
 * Гілка «публічний сайт»: скидання, типографіка й сітка сторінки.
 *
 * Це правила на голі теги (body, h1-h4, a, p), тому файл підключається ТІЛЬКИ
 * там, де немає старого набору (bootstrap 3, 10-style.css). У кабінеті старий
 * набір лишається, тому туди цей файл не йде — його роль там виконує app/.
 *
 * Токени — global/01-tokens.css, шрифти — global/02-fonts.css.
 */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--ground);
  color:var(--ink);
  font-family:"IBM Plex Sans","Segoe UI",system-ui,sans-serif;
  font-size:16px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img,svg{max-width:100%}
img{height:auto}
ul,ol{margin:0; padding:0}
figure,blockquote{margin:0}

/* ---------- типографіка ---------- */
h1,h2,h3,h4{
  font-family:"Roboto Slab",Georgia,serif;
  margin:0;
  text-wrap:balance;
  letter-spacing:-.015em;
}
h1{font-size:46px; line-height:1.12; letter-spacing:-.02em}
h2{font-size:31px; line-height:1.2}
h3{font-size:19px; line-height:1.3}
h4{font-size:16px; line-height:1.35}
p{margin:0 0 12px}
b,strong{font-weight:600}

a{color:inherit; text-decoration:none}
a:hover{color:var(--brand)}

.mono{
  font-family:"IBM Plex Mono",ui-monospace,SFMono-Regular,monospace;
  font-variant-numeric:tabular-nums;
}

.eyebrow{
  font-size:12.5px; font-weight:600; letter-spacing:.12em;
  text-transform:uppercase; color:var(--brand);
}
.lede{font-size:18.5px; color:var(--ink-2); max-width:34em}
.muted{color:var(--ink-2)}

/* ---------- доступність ---------- */
:focus-visible{outline:2px solid var(--brand); outline-offset:2px}

@media (prefers-reduced-motion: reduce){
  *{animation:none !important; transition:none !important; scroll-behavior:auto !important}
}

@media (max-width: 900px){
  h1{font-size:36px}
  h2{font-size:26px}
}


/* ---------- сітка й ритм сторінки ---------- */

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

.section{padding:64px 0}
.section--tight{padding-top:0}

.section-head{max-width:44em; margin-bottom:36px}
.section-head .eyebrow{display:block; margin-bottom:12px}
.section-head h2{margin-bottom:12px}
.section-head p{margin:0; color:var(--ink-2); font-size:17px}

/* колонкові сітки; кількість колонок задається модифікатором */
.grid{display:grid; gap:24px}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid--5{grid-template-columns:repeat(5,minmax(0,1fr))}

.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.row--between{justify-content:space-between}
.row--end{justify-content:flex-end}

/* горизонтальна прокрутка для широкого вмісту — таблиць, графіків */
.scroll-x{overflow-x:auto; -webkit-overflow-scrolling:touch}

@media (max-width: 900px){
  .section{padding:44px 0}
  .grid--2,.grid--3,.grid--4{grid-template-columns:1fr}
  .grid--5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
