/* HLPER guides: shared by every page in /guides/ and guides.html.
   Colours come from main.css / themes.css variables so every colour mode works.
   When you change this file, raise guide.css?v= in every guide page. */

.guide-page {
  --guide-tint: color-mix(in srgb, var(--accent-color) 8%, var(--surface-color, #fff));
  --guide-line: color-mix(in srgb, var(--accent-color) 22%, transparent);
  --guide-muted: color-mix(in srgb, var(--default-color) 65%, transparent);
  padding: 120px 0 60px; /* clears the fixed header; match study-tools.html if it differs */
}

.guide-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Breadcrumb */
.guide-crumbs {
  font-size: 0.875rem;
  color: var(--guide-muted);
  margin-bottom: 1rem;
}
.guide-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.guide-crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--guide-muted); }
.guide-crumbs a { color: var(--accent-color); text-decoration: none; }
.guide-crumbs a:hover { text-decoration: underline; }

/* Title and meta */
.guide-page h1 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.2;
  color: var(--heading-color);
  margin-bottom: 0.75rem;
}
.guide-meta {
  font-size: 0.9rem;
  color: var(--guide-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 1.75rem;
}
.guide-meta i { color: var(--accent-color); margin-right: 0.3rem; }

/* Short answer: the bit Google and AI tools lift */
.guide-answer {
  background: var(--guide-tint);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 12px 12px 0;
  padding: 1.1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 1.08rem;
  line-height: 1.6;
}
.guide-answer strong:first-child {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-color);
  margin-bottom: 0.35rem;
}
.guide-answer p { margin: 0; }

/* Contents */
.guide-toc {
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.25rem;
}
.guide-toc h2, .guide-body .guide-toc h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.guide-toc ol { margin: 0; padding-left: 1.2rem; }
.guide-toc li { margin: 0.2rem 0; }
.guide-toc a { color: var(--accent-color); text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }

/* Body text */
.guide-body { font-size: 1.05rem; line-height: 1.75; color: var(--default-color); }
.guide-body h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--heading-color);
  margin: 2.75rem 0 0.85rem;
  scroll-margin-top: 100px;
}
.guide-body h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--heading-color);
  margin: 1.75rem 0 0.5rem;
  scroll-margin-top: 100px;
}
.guide-body p, .guide-body ul, .guide-body ol { margin-bottom: 1rem; }
.guide-body li { margin-bottom: 0.35rem; }
.guide-body a { color: var(--accent-color); }

/* Numbered steps */
.guide-steps { counter-reset: step; list-style: none; padding: 0; }
.guide-steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0.5rem 3.1rem;
  margin-bottom: 1.1rem;
}
.guide-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent-color);
  color: var(--contrast-color, #fff);
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  display: grid;
  place-items: center;
}
.guide-steps h3 { margin-top: 0; }

/* Tables */
.guide-table-wrap { overflow-x: auto; margin-bottom: 1.25rem; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.guide-table caption { caption-side: bottom; font-size: 0.85rem; color: var(--guide-muted); padding-top: 0.5rem; }
.guide-table th, .guide-table td { border-bottom: 1px solid var(--guide-line); padding: 0.6rem 0.75rem; text-align: left; }
.guide-table thead th { background: var(--guide-tint); color: var(--heading-color); font-family: "Poppins", sans-serif; font-weight: 600; }

/* The filled-in plan */
.plan-card {
  border: 1px solid var(--guide-line);
  border-radius: 14px;
  overflow: hidden;
  margin: 1.25rem 0 1.5rem;
  background: var(--surface-color, transparent);
}
.plan-card dl { margin: 0; }
.plan-row { padding: 0.85rem 1.1rem; border-top: 1px solid var(--guide-line); }
.plan-row:first-child { border-top: 0; }
.plan-row dt {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-color);
  margin-bottom: 0.2rem;
}
.plan-row dd { margin: 0; line-height: 1.6; }
.plan-row.is-point { background: var(--guide-tint); }
.plan-row dd ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.plan-split { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.plan-split div { font-size: 0.95rem; }
.plan-split span { display: block; font-size: 0.78rem; color: var(--guide-muted); }
@media (max-width: 575px) { .plan-split { grid-template-columns: repeat(2, 1fr); } }

/* Pictures */
.guide-figure { margin: 1.5rem 0; }
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  background: #fff; /* the template image is a white sheet in every mode */
}
.guide-figure figcaption { font-size: 0.88rem; color: var(--guide-muted); margin-top: 0.5rem; }

/* Call to action */
.guide-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--guide-line);
  background: var(--guide-tint);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin: 2rem 0;
}
.guide-cta > i { font-size: 2rem; color: var(--accent-color); }
.guide-cta div { flex: 1 1 260px; }
.guide-cta p { margin: 0; font-size: 1rem; line-height: 1.55; }
.guide-cta p strong { display: block; font-family: "Poppins", sans-serif; color: var(--heading-color); }
.guide-btn, .guide-body .guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-color);
  color: var(--contrast-color, #fff);
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  padding: 0.55rem 1.2rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.guide-btn:hover, .guide-body .guide-btn:hover { color: var(--contrast-color, #fff); filter: brightness(1.1); }
.guide-btn.is-outline, .guide-body .guide-btn.is-outline { background: transparent; color: var(--accent-color); }
.guide-btn.is-outline:hover, .guide-body .guide-btn.is-outline:hover { background: var(--accent-color); color: var(--contrast-color, #fff); filter: none; }
.guide-btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 1.5rem; }

/* Tip and warning boxes */
.guide-note {
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  border: 1px solid var(--guide-line);
}
.guide-note p:last-child { margin-bottom: 0; }
.guide-note strong:first-child { color: var(--accent-color); }

/* FAQ */
.guide-faq details {
  border-bottom: 1px solid var(--guide-line);
  padding: 0.85rem 0;
}
.guide-faq summary {
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: var(--heading-color);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: "+"; color: var(--accent-color); font-size: 1.3rem; line-height: 1; }
.guide-faq details[open] summary::after { content: "\2212"; }
.guide-faq details p { margin: 0.6rem 0 0; }

/* Sources and related */
.guide-sources { font-size: 0.92rem; }
.guide-sources li { margin-bottom: 0.4rem; }
.guide-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.guide-related a, .guide-body .guide-related a {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--heading-color);
  font-weight: 500;
}
.guide-related a:hover { border-color: var(--accent-color); }
.guide-related i { color: var(--accent-color); font-size: 1.3rem; }

/* Hub page cards */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.guide-card {
  display: block;
  border: 1px solid var(--guide-line);
  border-radius: 14px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--default-color);
  background: var(--surface-color, transparent);
}
.guide-card:hover { border-color: var(--accent-color); }
.guide-card i { font-size: 1.6rem; color: var(--accent-color); }
.guide-card h2 { font-size: 1.15rem; margin: 0.6rem 0 0.4rem; color: var(--heading-color); }
.guide-card p { margin: 0; font-size: 0.95rem; line-height: 1.55; }
.guide-card .guide-tag { display: inline-block; margin-top: 0.75rem; font-size: 0.8rem; color: var(--accent-color); }

@media print {
  .guide-cta, .guide-toc, #header, #footer { display: none !important; }
  .guide-page { padding-top: 0; }
}
