/* CritterTrust help guide.
   Colours, fonts and the nav/footer match index.html so the help pages read
   as the same site. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #f0fdfa;
  --teal-mid: #99f6e4;
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --white: #ffffff;
  --cream: #fafaf8;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

/* ---------- Site nav (same as the homepage) ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 48px;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}
.nav-logo { display: flex; text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.is-current { color: var(--teal); }
.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--teal-dark); }

/* ---------- Layout ---------- */

.help-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 48px 64px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.help-main { min-width: 0; max-width: 720px; }

/* ---------- Topic navigation ---------- */

.topics--side {
  position: sticky;
  top: 96px;
  font-size: 14.5px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 8px;
}
.topics-home {
  display: block;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 5px 10px;
  margin: 0 0 14px -10px;
  border-radius: 8px;
}
.topics-group { margin-bottom: 20px; }
.topics-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.topics ul { list-style: none; }
.topics li a {
  display: block;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
}
.topics li a:hover { background: var(--teal-light); color: var(--teal-dark); }
.topics a[aria-current="page"] { background: var(--teal-light); color: var(--teal-dark); font-weight: 600; }

.topics--top { display: none; }

/* ---------- Article ---------- */

.crumb { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--teal); }

.prose h1 {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.prose .lede { font-size: 19px; color: var(--ink-soft); margin-bottom: 32px; }
.prose h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  line-height: 1.25;
  margin: 44px 0 12px;
  scroll-margin-top: 90px;
}
.prose h3 { font-size: 18px; font-weight: 600; margin: 28px 0 8px; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 24px; }
.prose li { margin-bottom: 6px; }
.prose li > ul, .prose li > ol { margin-top: 6px; margin-bottom: 6px; }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }

/* A path through the app: More → Availability */
.prose .path {
  font-weight: 600;
  color: var(--teal-dark);
  white-space: nowrap;
}

/* Numbered steps with a step marker */
.prose .steps { list-style: none; margin-left: 0; counter-reset: step; }
.prose .steps > li {
  position: relative;
  padding: 0 0 0 52px;
  margin-bottom: 28px;
  counter-increment: step;
}
.prose .steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prose .steps > li > h3 { margin-top: 3px; }

/* Callouts */
.callout {
  border-radius: 12px;
  padding: 16px 20px;
  margin: 0 0 24px;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
}
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--note { background: var(--gold-light); border-color: #fcd34d; }
.callout-title { font-weight: 600; margin-bottom: 4px; }

/* Screenshot placeholders and screenshots */
.shot { margin: 8px 0 24px; }
.shot img { max-width: 300px; width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); display: block; }
.shot-box {
  max-width: 300px;
  height: 140px;
  border: 2px dashed var(--muted);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--white);
}
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; max-width: 300px; }

/* Help home: section cards */
.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.section-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.prose .section-card h2 { font-family: 'DM Sans', sans-serif; font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.section-card ul { list-style: none; margin: 0; }
.section-card li { margin-bottom: 4px; }
.section-card a { text-decoration: none; }
.section-card a:hover { text-decoration: underline; }

.start-card {
  display: block;
  background: var(--teal);
  color: var(--white);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 28px;
  text-decoration: none;
}
.start-card:hover { background: var(--teal-dark); color: var(--white); }
.start-card strong { display: block; font-size: 19px; margin-bottom: 2px; }
.start-card span { opacity: 0.9; }

/* ---------- Foot of the article ---------- */

.help-foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--ink-soft);
}
.help-foot p { margin-bottom: 6px; }
.help-foot .checked { color: var(--muted); font-size: 13.5px; }

/* ---------- Site footer (same as the homepage) ---------- */

.site-foot {
  background: var(--ink);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.footer-note { font-size: 13px; color: rgba(255,255,255,0.45); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-link { font-size: 13px; color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-link:hover { color: var(--teal-mid); }

/* ---------- Phones and small tablets ---------- */

@media (max-width: 900px) {
  .site-nav { padding: 12px 16px; }
  .nav-links li:not(:last-child) { display: none; }
  .nav-cta { padding: 8px 16px; font-size: 13px !important; }

  .help-shell { display: block; padding: 20px 16px 48px; }
  .topics--side { display: none; }

  .topics--top {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 15px;
  }
  .topics--top summary { font-weight: 600; cursor: pointer; color: var(--teal-dark); }
  .topics--top[open] summary { margin-bottom: 14px; }

  .prose h1 { font-size: 32px; }
  .prose h2 { font-size: 23px; margin-top: 36px; }
  .prose .lede { font-size: 17.5px; }
  .prose .steps > li { padding-left: 46px; }
  .prose .path { white-space: normal; }

  .section-grid { grid-template-columns: 1fr; }

  .site-foot { padding: 32px 16px; flex-direction: column; align-items: flex-start; }
}

/* Tables in articles */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 15.5px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 600; background: var(--teal-light); }
@media (max-width: 900px) {
  .prose table { font-size: 14.5px; }
  .prose th, .prose td { padding: 8px 10px; }
}

/* Opened from inside the app: no "Get the app" button (see help.njk). */
.from-app .nav-cta { display: none; }
