/* MamaChatMD guide pages: /ghid/..., /ru/gid/... (articles and their index).
   Linked only from those pages, after style.css (see CSS in guides.py).

   From style.css these pages still use: the colour and radius variables, .wrap, .kicker,
   .cards.c3, .card, .tile, .facts, .disclaimer, .final, and the header and footer.
   The guide cards (.guide-card, .guides-all) and the header link (.nav-guides) are styled
   in style.css, because the home page shows them too. */

.guide {
  padding: 22px 0 56px;
  overflow-wrap: break-word;
}
.crumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.crumbs li + li::before {
  content: "\203A";
  margin-right: 8px;
  color: #a797ae;
}
.crumbs li:last-child::after {
  content: "\203A";
  margin-left: 8px;
  color: #a797ae;
}
.crumbs a {
  color: var(--ink-2);
  display: inline-block;
  padding: 6px 0;
}
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  margin-top: 10px;
}
.guide-head h1 {
  font-size: clamp(1.85rem, 6.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.guide-head .kicker {
  margin-bottom: 8px;
}
.guide-meta {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.guide-answer {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--rose);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 1.07rem;
  box-shadow: var(--shadow-sm);
}
.guide-intro {
  margin-top: 14px;
  max-width: 44em;
  font-size: 1.07rem;
  color: var(--ink-2);
}
.guide-head .facts {
  margin: 18px 0 0;
  max-width: none;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
}
.toc h2 {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.toc ol {
  margin: 10px 0 0;
  padding-left: 22px;
  display: grid;
  gap: 2px;
  font-size: 0.96rem;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--ink);
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

.guide-body > section + section {
  margin-top: 40px;
}
.guide-body h2 {
  font-size: clamp(1.4rem, 4.8vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.guide-body h3 {
  font-size: 1.12rem;
  font-weight: 800;
  margin-top: 24px;
}
.guide-body p,
.guide-body ul,
.guide-body ol {
  margin-top: 12px;
  color: var(--ink-2);
}
.guide-body ul,
.guide-body ol {
  padding-left: 22px;
}
.guide-body li {
  margin-top: 6px;
}
.guide-body strong {
  color: var(--ink);
}
.guide-body .q-answer {
  color: var(--ink);
  font-weight: 600;
}
.guide-body .guide-note {
  background: var(--sky);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.95rem;
  margin-top: 16px;
}
.guide-body .disclaimer {
  margin-top: 36px;
}

.guide-body .checklist {
  list-style: none;
  padding: 0;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.checklist li {
  margin: 0;
}
.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.97rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.checklist input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--rose-deep);
}
.checklist input:checked + span {
  color: var(--ink-2);
  text-decoration: line-through;
}

.gtable {
  width: 100%;
  margin-top: 16px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  line-height: 1.45;
}
.gtable caption {
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  padding: 0 2px 8px;
}
.gtable th,
.gtable td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.gtable th {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.gtable td {
  color: var(--ink-2);
}
.gtable td:first-child {
  color: var(--ink);
  font-weight: 700;
}
.gtable tbody tr:last-child td {
  border-bottom: 0;
}

.sources {
  margin-top: 40px;
}
.sources ol {
  font-size: 0.95rem;
}
.sources li {
  overflow-wrap: anywhere;
}
.sources li span {
  display: block;
  font-size: 0.86rem;
}
.sources-note {
  font-size: 0.9rem;
}

.guide-more {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.guide-more h2 {
  font-size: 1.15rem;
}
.guide-more ul {
  list-style: none;
  padding: 0;
}
.guide-more li {
  margin-top: 10px;
  font-weight: 700;
}
.guide-more p {
  font-size: 0.93rem;
}

.guide-more p a::after {
  content: " \2192";
}
.guide-index .cards {
  margin-top: 26px;
}
.guide-index .disclaimer {
  margin-top: 26px;
  max-width: 820px;
}

@media (max-width: 559px) {
  .gtable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .gtable,
  .gtable caption,
  .gtable tbody,
  .gtable tr,
  .gtable td {
    display: block;
  }
  .gtable {
    border: 0;
    background: none;
  }
  .gtable tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
  }
  .gtable tr + tr {
    margin-top: 8px;
  }
  .gtable td {
    padding: 0;
    border: 0;
  }
  .gtable td + td {
    margin-top: 8px;
  }
  .gtable td + td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-2);
  }
}

@media (min-width: 720px) {
  .guide {
    padding: 30px 0 80px;
  }
  .guide-body .checklist {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1040px) {
  .guide-grid {
    grid-template-columns: minmax(0, 720px) minmax(0, 300px);
    column-gap: 56px;
    row-gap: 34px;
    justify-content: space-between;
  }
  .guide-head,
  .guide-body {
    grid-column: 1;
  }
  .toc {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}

@media print {
  .langbar,
  .site-header,
  .site-footer,
  .final,
  .toc,
  .crumbs,
  .guide-more,
  .consent,
  .joinbar {
    display: none !important;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .guide {
    padding: 0;
  }
  .guide-body .checklist {
    grid-template-columns: repeat(2, 1fr);
  }
  .checklist label,
  .guide-answer,
  .gtable {
    box-shadow: none;
    break-inside: avoid;
  }
}
