/* ========================================================================
   AFTERCARE INSTRUCTIONS (/aftercare/ hub + /aftercare/<slug>/ pages)
   Markup: src/_includes/partials/aftercare-set.njk, src/pages/aftercare/.
   Mobile first, single column, no sticky bars, nothing essential hidden.
   Print rules at the bottom print only the instructions.
   ======================================================================== */

.aftercare {
  --ac-ink: #2b2326;
  --ac-muted: #5a5053;
  --ac-line: rgba(0, 0, 0, 0.1);
  --ac-soft: var(--brand-ivory, #F5F1EA);
  --ac-warn-bg: #fff8e6;
  --ac-warn-line: #b7791f;
  color: var(--ac-ink);
  padding-bottom: 3rem;
}

.aftercare-wrap {
  max-width: 46rem;
  margin: 0 auto;
}

/* ---- Header band (reuses #inside-header gradient) ---- */
.aftercare-header h1 {
  font-size: 1.9rem;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .aftercare-header h1 { font-size: 2.4rem; }
}
.aftercare-crumb {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.aftercare-crumb a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- For / Stage line ---- */
.aftercare-applies {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.55;
}
.aftercare-applies a {
  color: var(--primary-color);
}

.aftercare-intro {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---- Phone blocks (top and bottom) ---- */
.aftercare-phones {
  margin: 1.5rem 0;
}
.aftercare-phones-lead {
  margin-bottom: 0.6rem;
  color: var(--ac-muted);
}
.aftercare-phone-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.aftercare-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.aftercare-phone-number {
  font-weight: 700;
}
@media (min-width: 576px) {
  .aftercare-phone-buttons { flex-direction: row; }
  .aftercare-phone { flex: 1 1 0; }
}

/* ---- Sections ---- */
.aftercare-section {
  margin-top: 2rem;
  scroll-margin-top: 6rem;
}
.aftercare-section h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0 0 0.75rem;
}
.aftercare-section h3 {
  font-size: 1.15rem;
  color: var(--primary-color);
  margin: 1.25rem 0 0.5rem;
}
.aftercare-list {
  padding-left: 1.25rem;
  margin-bottom: 0;
}
.aftercare-list li {
  margin-bottom: 0.6rem;
  line-height: 1.65;
  font-size: 1.05rem;
}
.aftercare-note {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  color: var(--ac-muted);
}

/* Priority: the short do / don't list, set apart */
.aftercare-section--priority {
  background: var(--ac-soft);
  border: 1px solid var(--ac-line);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
}

/* When to call: warning styling */
.aftercare-section--when-to-call {
  background: var(--ac-warn-bg);
  border: 1px solid var(--ac-warn-line);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
}
.aftercare-section--when-to-call .aftercare-note {
  color: var(--ac-ink);
  font-weight: 600;
}

.aftercare-subsection {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 0.75rem;
  border-left: 4px solid var(--primary-color);
  background: var(--ac-soft);
  border-radius: 0 0.5rem 0.5rem 0;
}
.aftercare-subsection h3 {
  margin-top: 0;
}

/* ---- Jump links + actions row ---- */
.aftercare-tools {
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--ac-line);
  border-bottom: 1px solid var(--ac-line);
}
.aftercare-jump-label {
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.aftercare-jump ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.aftercare-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--ac-line);
  border-radius: 999px;
  color: var(--primary-color);
  text-decoration: none;
  background: #fff;
}
.aftercare-jump a:hover {
  background: var(--ac-soft);
  text-decoration: underline;
}
.aftercare-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.aftercare-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
}
@media (min-width: 576px) {
  .aftercare-actions { flex-direction: row; flex-wrap: wrap; }
}

.aftercare-revised {
  margin-top: 2.5rem;
  color: var(--ac-muted);
  font-size: 0.95rem;
}
.aftercare-back {
  margin-top: 1rem;
}

.print-only { display: none; }

/* ---- Hub ---- */
.aftercare-hub-intro {
  max-width: 46rem;
  margin: 1.5rem auto 0;
}
.aftercare-hub-group {
  margin-top: 2rem;
}
.aftercare-hub-group h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}
.aftercare-hub-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 768px) {
  .aftercare-hub-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .aftercare-hub-cards { grid-template-columns: repeat(3, 1fr); }
}
.aftercare-hub-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ac-line);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.aftercare-hub-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}
.aftercare-hub-card:focus-within {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}
.aftercare-hub-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.aftercare-hub-card h3 a {
  color: var(--primary-color);
}
.aftercare-hub-card p {
  margin-bottom: 0;
  color: var(--ac-muted);
}
.aftercare-hub-help {
  max-width: 46rem;
  margin: 2.5rem auto 0;
}

/* ========================================================================
   PRINT: only the instructions, title, date, URL and both office numbers
   ======================================================================== */
@media print {
  @page { margin: 1.5cm; }

  body > *:not(main),
  main > *:not(.aftercare),
  .aftercare .no-print,
  .practice-summary-band,
  #clue-ai-bubble,
  #clue-ai-panel {
    display: none !important;
  }

  .print-only { display: block !important; }

  body, .aftercare {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }
  .aftercare { padding-bottom: 0; }
  .aftercare .container { max-width: none; padding: 0; }
  .aftercare-wrap { max-width: none; }

  .aftercare-header,
  #inside-header.aftercare-header {
    background: none !important;
    padding: 0 !important;
  }
  .aftercare-header .aftercare-wrap { padding: 0 !important; }
  .aftercare-header h1 {
    color: #000 !important;
    font-size: 18pt;
  }

  .aftercare-applies a {
    color: #000;
    text-decoration: none;
  }

  .aftercare-print-meta {
    margin: 0.75rem 0 0;
    font-size: 10pt;
  }

  .aftercare-section {
    margin-top: 1rem;
    break-inside: auto;
  }
  .aftercare-section h2,
  .aftercare-section h3 {
    color: #000 !important;
    break-after: avoid;
  }
  .aftercare-section h2 { font-size: 14pt; }
  .aftercare-section h3 { font-size: 12pt; }
  .aftercare-list li {
    font-size: 11pt;
    margin-bottom: 0.25rem;
    break-inside: avoid;
  }
  .aftercare-section--priority,
  .aftercare-section--when-to-call,
  .aftercare-subsection {
    background: none !important;
    border: 1px solid #000;
    padding: 0.6rem 0.8rem;
  }
  .aftercare-note { color: #000; }
  .aftercare-revised {
    margin-top: 1rem;
    color: #000;
  }
  .bi { display: none; }
}
