/* Сайт гайдів НЕ ПОВ, А РІЛ (#1197). Кольори й блоки — як у PDF
   (templates/guide.html), але під екран: спершу мобільний, сітки
   розкладаються в колонки лише там, де є місце. Без веб-шрифтів. */
:root {
  --accent: #1f7a5c;
  --accent-dark: #17614a;
  --ink: #16181d;
  --muted: #5f6672;
  --rule: #dfe3e8;
  --soft: #f3f4f6;
  --green-bg: #eaf5f0;
  --peach-bg: #fdf1e7;
  --peach-line: #e8a06b;
  --peach-ink: #b4582a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
b, strong { font-weight: 650; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }

/* ── шапка ── */
.top { border-bottom: 1px solid var(--rule); background: #fff; }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: .04em; font-size: 15px; }
.logo-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; letter-spacing: 0; }
.top-tg { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ── заклик ── */
.btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 650; padding: 11px 18px; border-radius: 9px; line-height: 1.25; text-align: center;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--green-bg); color: var(--accent-dark); }
.cta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 14px 0 0; padding: 10px 12px 10px 14px; border-radius: var(--radius);
  background: var(--green-bg); font-size: 14.5px; line-height: 1.4;
}
.cta-bar .btn { flex: none; }
.cta-box {
  display: flex; align-items: center; gap: 18px; margin: 34px 0; padding: 20px 22px;
  border: 1px solid var(--accent); border-radius: var(--radius); background: var(--green-bg);
}
.cta-box p { margin: 4px 0 0; font-size: 15.5px; }
.cta-title { font-weight: 750; font-size: 19px; }
.cta-box .btn { flex: none; }

/* ── крихти ── */
.crumbs { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs .sep { margin: 0 6px; }

/* ── шапка гайда ── */
.g-head, .list-head { margin: 22px 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.kicker a { text-decoration: none; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.02em; margin: 6px 0 10px; }
.lead { font-size: 18.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ── зміст ── */
.toc { background: var(--soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; font-size: 15.5px; }
.toc-title { font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 22px; }
.toc li { margin: 3px 0; }

/* ── секція ── */
.guide section { margin: 0 0 34px; scroll-margin-top: 12px; }
.sec-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 12px; }
.sec-num {
  flex: none; width: 26px; height: 26px; margin-top: 3px; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 750; font-size: 14px;
  display: grid; place-items: center;
}
h2 { font-size: 24px; line-height: 1.22; letter-spacing: -.01em; margin: 0; }
.subtitle { color: var(--muted); margin: 3px 0 0; font-size: 15.5px; }
.guide p { margin: 0 0 12px; }

/* ── буліти ── */
ul.dots { margin: 0 0 14px; padding: 0; list-style: none; }
ul.dots li { position: relative; padding-left: 18px; margin: 0 0 7px; }
ul.dots li::before { content: ""; position: absolute; left: 3px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.callout.peach ul.dots li::before { background: var(--peach-ink); }

/* ── картки ── */
.cards { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 14px; }
.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 15px; }
.card .icon { color: var(--accent); display: block; margin-bottom: 6px; }
.card-label { font-size: 11.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.card-title { font-size: 17px; line-height: 1.3; margin: 2px 0 4px; }
.guide .card-text { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.5; }
.cards.cols-2 .card-text { color: var(--ink); }

/* ── кроки ── */
.steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; grid-template-columns: 1fr; counter-reset: none; }
.steps li { display: flex; gap: 12px; align-items: baseline; background: var(--soft); border-radius: var(--radius); padding: 11px 14px; font-weight: 600; font-size: 16px; line-height: 1.4; }
.step-num { flex: none; color: var(--accent); font-weight: 800; font-size: 20px; min-width: 16px; }

/* ── врізки ── */
.callouts { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 14px; }
.callout { border: 1px solid; border-radius: var(--radius); padding: 14px 16px 6px; }
.callout.green { background: var(--green-bg); border-color: var(--accent); }
.callout.peach { background: var(--peach-bg); border-color: var(--peach-line); }
.callout-title { font-weight: 750; font-size: 17px; margin-bottom: 6px; }
.callout.green .callout-title { color: var(--accent); }
.callout.peach .callout-title { color: var(--peach-ink); }
.callout p, .callout li { font-size: 15.5px; }

/* ── таблиця ── */
.table-wrap { overflow-x: auto; margin: 0 0 14px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
th { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 10px 7px 0; border-bottom: 2px solid var(--accent); }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
td:first-child { font-weight: 650; }
table.wide td:last-child { color: var(--muted); }

/* ── чек-лист ── */
.checklist { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 14px; }
.check-col { border: 1px solid var(--rule); border-radius: var(--radius); padding: 13px 15px 7px; }
.check-title { font-size: 12.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.check-col ul { list-style: none; margin: 0; padding: 0; }
.check-col li { position: relative; padding-left: 24px; margin: 0 0 7px; font-size: 15.5px; line-height: 1.45; }
.check-col li::before { content: ""; position: absolute; left: 0; top: .22em; width: 13px; height: 13px; border: 1.6px solid var(--accent); border-radius: 3px; }

/* ── фото ── */
figure { margin: 0 0 16px; }
figure img { display: block; border-radius: var(--radius); margin: 0 auto; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; text-align: center; }
.cover { margin: 0 0 24px; }

.tags { color: var(--accent); font-size: 14.5px; }
.signature { text-align: right; font-weight: 750; }

/* ── списки гайдів ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chips a { font-size: 14px; text-decoration: none; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 99px; color: var(--ink); }
.chips a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.list { list-style: none; margin: 0; padding: 0; }
.item a { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.item a:hover .item-title { color: var(--accent); }
.item-meta { font-size: 13.5px; color: var(--muted); }
.item-cat { color: var(--accent); font-weight: 650; }
.item-title { font-size: 21px; margin: 3px 0 5px; }
.item-lead { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
.related { margin: 0 0 30px; }
.related h2 { margin-bottom: 12px; }
.grid { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.tile a { display: block; height: 100%; padding: 13px 15px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.tile a:hover { border-color: var(--accent); }
.tile-cat { display: block; font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.tile-title { display: block; font-weight: 650; line-height: 1.35; margin-top: 3px; }

/* ── підвал ── */
.foot { border-top: 1px solid var(--rule); margin-top: 20px; padding: 18px 0 30px; font-size: 14px; color: var(--muted); }
.foot-cats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.foot p { margin: 0; }

/* ── ширші екрани: сітки як у PDF ── */
@media (min-width: 620px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .steps li { flex-direction: column; gap: 2px; }
  .callouts { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .checklist { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 42px; }
}
@media (max-width: 520px) {
  body { font-size: 16.5px; }
  h1 { font-size: 29px; }
  h2 { font-size: 21px; }
  .lead { font-size: 17px; }
  .cta-bar { font-size: 13.5px; }
  .cta-box { flex-direction: column; align-items: stretch; }
  /* таблиця на 3+ колонки на вузькому екрані — картками з підписами */
  table.wide thead { display: none; }
  table.wide, table.wide tbody, table.wide tr, table.wide td { display: block; width: 100%; }
  table.wide tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.wide td { border: 0; padding: 2px 0; }
  table.wide td:not(:first-child)::before { content: attr(data-col) ": "; color: var(--muted); font-size: 13px; }
}
@media print {
  .top, .cta-bar, .cta-box, .related, .foot, .crumbs { display: none; }
}
