/* Guides for families (#712): portal/guides/*.html. Loads after trust.css and homepage-hero.css; the body carries
   commercial-home (the homepage's header, menu, buttons and footer) and guide-page (everything below). Brand tokens
   from company/design/README.md. Phone first at 390px: 17px body, 44px targets. */
.guide-page {
  --g-green: #006b52;
  --g-green-hover: #00563f;
  --g-deep: #102c27;
  --g-mint: #e8f4ee;
  --g-mint-line: #cfe3da;
  --g-ink: #21313e;
  --g-muted: #405765;
  --g-line: #dce5ea;
  --g-page: #f5f8fa;
  --g-warn: #8a4b00;
  --g-warn-bg: #fff6e8;
  --g-warn-line: #f0d5a8;
}
.guide-page main {
  display: block;
}
.guide-page .guide-wrap {
  padding-top: 20px;
  padding-bottom: 8px;
}

/* Breadcrumb */
.guide-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--g-muted);
}
.guide-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.guide-crumbs li + li::before {
  content: "\203A";
  color: var(--g-muted);
}
.guide-crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  color: var(--g-green);
  font-weight: 500;
}
.guide-crumbs [aria-current] {
  color: var(--g-muted);
}
/* On a phone the trail is "Home > Guides": the page's own name is the heading right under it. */
@media (max-width: 560px) {
  .guide-crumbs .guide-crumb-page {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Heading block and the short answer */
.guide-head h1 {
  margin: 0 0 12px;
  max-width: 24ch;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--g-ink);
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--g-muted);
}
@media (min-width: 560px) {
  .guide-meta span + span::before {
    content: "\00B7";
    margin-right: 14px;
    color: var(--g-muted);
  }
}
.guide-answer {
  max-width: 780px;
  margin: 0 0 8px;
  padding: 18px 20px;
  border-left: 5px solid var(--g-green);
  border-radius: 0 14px 14px 0;
  background: var(--g-mint);
  color: var(--g-deep);
  font-size: 18px;
  line-height: 1.6;
}

/* The menu marks the Guides section: the hub is the current page, a guide is inside it. */
.guide-page .site-menu a[aria-current="page"],
.guide-page .site-menu a.is-section {
  color: var(--g-green);
  font-weight: 650;
}
@media (min-width: 769px) {
  .guide-page .site-menu a[aria-current="page"],
  .guide-page .site-menu a.is-section {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
  }
}

/* On a phone nothing floats over the text (#658): the assistant opens from the button under the questions instead.
   Links inside sentences get a 44px-tall tap area from padding, which doesn't move the lines around them. */
@media (max-width: 760px) {
  .guide-page .ca-widget-container .ca-bubble {
    display: none !important;
  }
  .guide-body :is(p, li, td) a {
    padding-block: 12px;
  }
  .guide-checked a,
  .guide-limits a {
    padding-block: 14px;
  }
  .guide-body .guide-cards a {
    padding: 18px 20px;
  }
}
.guide-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 20px 0 0;
}
.guide-page .guide-ask-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--g-line);
  border-radius: 12px;
  background: #fff;
  color: var(--g-green);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.guide-page .guide-ask-btn:hover {
  border-color: var(--g-green);
  background: var(--g-mint);
}

/* Layout: one column on phones; the "On this page" list moves to a sticky side column on wide screens. */
.guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.guide-head {
  grid-area: head;
}
.guide-toc {
  grid-area: toc;
  margin: 20px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--g-line);
  border-radius: 14px;
  background: var(--g-page);
}
.guide-body {
  grid-area: body;
  min-width: 0;
}
.guide-grid {
  grid-template-areas: "head" "toc" "body";
}
.guide-toc h2 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--g-muted);
}
.guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  color: var(--g-green);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}
.guide-toc a:hover {
  text-decoration: underline;
}
/* Phones and tablets get the same list folded away under "On this page", as the site's document pages do; wide
   screens get the open list in the side column. Only one of the two is ever displayed. */
.guide-toc-wide {
  display: none;
}
.guide-toc-fold {
  grid-area: toc;
  margin: 18px 0 4px;
  border: 1px solid var(--g-line);
  border-radius: 14px;
  background: var(--g-page);
}
.guide-toc-fold summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 4px 18px;
  color: var(--g-green);
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.guide-toc-fold nav {
  padding: 0 18px 10px;
}
.guide-toc-fold ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-toc-fold a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--g-green);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}

/* Article text */
.guide-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--g-ink);
}
.guide-body section {
  scroll-margin-top: 96px;
}
.guide-body h2 {
  margin: 40px 0 12px;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 750;
  color: var(--g-ink);
}
.guide-body h3 {
  margin: 26px 0 8px;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--g-ink);
}
.guide-body p,
.guide-body li {
  max-width: 68ch;
}
.guide-body p {
  margin: 0 0 14px;
}
.guide-body ul,
.guide-body ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}
.guide-body li {
  margin: 0 0 8px;
}
.guide-body a {
  color: var(--g-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.guide-body a:hover {
  color: var(--g-green-hover);
  text-decoration-thickness: 2px;
}
.guide-body strong {
  color: var(--g-ink);
  font-weight: 650;
}
.guide-body .guide-cards,
.guide-body .guide-stats {
  padding-left: 0;
}

/* Numbered steps */
.guide-steps {
  counter-reset: step;
  padding-left: 0 !important;
  list-style: none;
}
.guide-steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin: 0 0 16px;
}
.guide-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g-green);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

/* Warning signs and other short lists */
.guide-signs {
  padding-left: 0 !important;
  list-style: none;
}
.guide-signs > li {
  position: relative;
  padding-left: 34px;
}
.guide-signs > li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 3px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--g-warn-bg);
  border: 1.5px solid var(--g-warn);
  color: var(--g-warn);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

/* Callouts */
.guide-callout {
  margin: 22px 0;
  padding: 18px 20px 6px;
  border: 1px solid var(--g-warn-line);
  border-left: 5px solid var(--g-warn);
  border-radius: 0 14px 14px 0;
  background: var(--g-warn-bg);
}
.guide-callout h2,
.guide-callout h3 {
  margin-top: 0;
}
.guide-note {
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid var(--g-line);
  border-radius: 12px;
  background: var(--g-page);
  font-size: 16px;
}

/* The product section: one calm panel per guide */
.guide-product {
  margin: 40px 0 8px;
  padding: 22px 20px 10px;
  border: 1px solid var(--g-mint-line);
  border-radius: 18px;
  background: var(--g-mint);
}
.guide-product h2 {
  margin-top: 0;
}
.guide-product .guide-product-grid {
  display: grid;
  gap: 8px 22px;
}
.guide-product img {
  display: none;
}

/* Figures with their source */
.guide-stats {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}
.guide-stats li {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid var(--g-line);
  border-radius: 14px;
  background: #fff;
  max-width: none;
}
.guide-stats strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--g-green);
  font-weight: 800;
}
.guide-stats span {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--g-muted);
}

/* Comparison table: a table on wide screens, one card per option on phones */
.guide-table-wrap {
  margin: 18px 0 24px;
}
.guide-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15.5px;
  line-height: 1.5;
}
.guide-table caption {
  margin-bottom: 10px;
  text-align: left;
  font-size: 15px;
  color: var(--g-muted);
}
.guide-table th,
.guide-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--g-line);
  text-align: left;
  vertical-align: top;
}
.guide-table thead th {
  background: var(--g-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.guide-table thead th:first-child {
  border-top-left-radius: 12px;
}
.guide-table thead th:last-child {
  border-top-right-radius: 12px;
}
.guide-table tbody th {
  font-weight: 700;
  color: var(--g-ink);
  background: var(--g-page);
}
.guide-table tbody tr.guide-table-ours th,
.guide-table tbody tr.guide-table-ours td {
  background: var(--g-mint);
}
.guide-table .guide-table-kind {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--g-muted);
}
@media (max-width: 760px) {
  .guide-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .guide-table,
  .guide-table tbody,
  .guide-table tr,
  .guide-table th,
  .guide-table td {
    display: block;
    width: 100%;
  }
  .guide-table tbody tr {
    margin: 0 0 14px;
    border: 1px solid var(--g-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
  }
  .guide-table tbody th {
    padding: 14px 16px 10px;
    font-size: 17px;
    border-bottom: 1px solid var(--g-line);
  }
  .guide-table tbody td {
    padding: 10px 16px;
    font-size: 16px;
  }
  .guide-table tbody td:last-child {
    border-bottom: 0;
  }
  .guide-table caption {
    display: block;
    width: 100%;
  }
  .guide-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--g-muted);
  }
}

/* Visible FAQ */
.guide-faq .guide-faq-item {
  padding: 4px 0 6px;
  border-top: 1px solid var(--g-line);
}
.guide-faq .guide-faq-item:last-child {
  border-bottom: 1px solid var(--g-line);
}
.guide-faq h3 {
  margin: 18px 0 6px;
}

/* Sources */
.guide-sources ol {
  padding-left: 1.4em;
}
.guide-sources li {
  font-size: 16px;
  line-height: 1.5;
  color: var(--g-muted);
}
.guide-sources a {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.guide-checked {
  font-size: 15px;
  color: var(--g-muted);
}

/* More guides */
.guide-more {
  margin: 48px 0 0;
}
.guide-more h2,
.guide-hub h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 750;
  color: var(--g-ink);
}
.guide-cards {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-cards li {
  margin: 0;
}
.guide-cards a {
  display: block;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--g-line);
  border-radius: 16px;
  background: #fff;
  color: var(--g-ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.guide-cards a:hover {
  border-color: var(--g-green);
  box-shadow: 0 6px 18px rgba(16, 44, 39, 0.08);
}
.guide-cards strong {
  display: block;
  margin-bottom: 6px;
  color: var(--g-green);
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}
.guide-cards span {
  display: block;
  color: var(--g-muted);
  font-size: 16px;
  line-height: 1.5;
}

/* Hub */
.guide-hub {
  margin: 34px 0 0;
}
.guide-hub-hero {
  display: grid;
  gap: 20px;
  align-items: center;
}
.guide-hub-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Closing call to action */
.guide-cta {
  margin: 48px 0 0;
  padding: 26px 22px;
  border-radius: 20px;
  background: var(--g-deep);
  color: #fff;
}
.guide-cta h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 750;
  color: #fff;
}
.guide-cta p {
  margin: 0 0 18px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  color: #e3eeea;
}
.guide-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}
.guide-page .guide-cta .action {
  min-height: 52px;
  padding: 10px 24px;
  border-color: #fff;
  background: #fff;
  color: var(--g-deep);
  font-size: 17px;
}
.guide-page .guide-cta .action:hover {
  background: var(--g-mint);
  color: var(--g-deep);
}
.guide-cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-weight: 600;
  text-underline-offset: 3px;
}
.guide-cta-link:hover {
  color: var(--g-mint);
}

/* Limits line */
.guide-limits {
  margin: 22px 0 0;
  max-width: 80ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--g-muted);
}

/* Footer: the guides link sits in the footer's Product column like the others. */
.guide-page .site-footer {
  margin-top: 48px;
}

@media (min-width: 700px) {
  .guide-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .guide-product .guide-product-grid {
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: start;
  }
  .guide-product img {
    display: block;
    width: 150px;
    height: auto;
    grid-column: 2;
    grid-row: 1 / span 3;
  }
  .guide-cta {
    padding: 34px 36px;
  }
  .guide-hub-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 36px;
  }
}
@media (min-width: 900px) {
  .guide-page .guide-wrap {
    padding-top: 28px;
  }
  .guide-answer {
    font-size: 19px;
  }
  .guide-body {
    font-size: 18px;
  }
  .guide-body h2 {
    font-size: 1.65rem;
  }
}
@media (min-width: 1100px) {
  .guide-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
    grid-template-areas: "head head" "body toc";
    column-gap: 56px;
  }
  .guide-toc-wide {
    display: block;
    position: sticky;
    top: 100px;
    align-self: start;
    margin-top: 40px;
  }
  .guide-toc-fold {
    display: none;
  }
  .guide-cards.guide-cards-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .guide-cards a {
    transition: none;
  }
}
