/* =========================================================
   GUIDES (/guides and /guides/<slug>)
   Long-form answer pages. Built from the site's own parts:
   dotted canvas, black tiles, pale lime fills, ink-bordered
   pills, circle marks. Lime is a fill only.
   ========================================================= */

.guides-page {
  --g-ink: #101012;
  --g-text: #2b2b2f;
  --g-muted: #696b65;
  --g-line: #e8e8e6;
  --g-soft: #f4f4f2;
  --g-lime: #a0e92a;
  --g-lime-soft: #efffd4;
  --g-tile: #141414;
  --g-ease: cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
}

.g-main {
  background:
    radial-gradient(circle at 1px 1px, rgba(16, 16, 18, 0.09) 1px, transparent 1.2px) 0 0 / 18px 18px,
    #ffffff;
  padding: 0 14px clamp(48px, 6vw, 88px);
  overflow-x: clip;
}

.g-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

/* ---------- Hero ---------- */
.g-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(132px, 14vw, 184px) clamp(6px, 2vw, 24px) clamp(28px, 4vw, 44px);
}

.g-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 15px;
  color: var(--g-muted);
}

.g-crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.g-crumbs li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.g-crumbs a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: rgba(16, 16, 18, 0.25);
  text-underline-offset: 3px;
}

.g-crumbs a:hover {
  text-decoration-color: var(--g-ink);
}

.g-crumbs [aria-current] {
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-title {
  margin-top: 26px;
  max-width: 19ch;
  font-size: clamp(38px, 5.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 500;
  color: var(--g-ink);
  text-wrap: balance;
}

.g-meta {
  margin-top: 22px;
  font-size: 16px;
  color: var(--g-muted);
}

/* ---------- The short answer (the one bold element) ---------- */
.g-answer {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) clamp(24px, 4.4vw, 60px);
  border-radius: clamp(26px, 3vw, 36px);
  background: var(--g-tile);
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.g-answer-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: #222224;
  font-size: 15px;
  line-height: 1;
  color: #ffffff;
}

.g-answer-pill i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--g-lime);
}

.g-answer p {
  max-width: 62ch;
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.45;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: #f3f3f1;
}

.g-answer a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Layout: contents rail + article ---------- */
.g-layout {
  max-width: 1180px;
  margin: clamp(20px, 3vw, 32px) auto 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}

.g-toc {
  position: sticky;
  top: 112px;
  padding: 26px 24px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--g-line);
}

.g-toc-title {
  font-size: 15px;
  color: var(--g-muted);
  margin-bottom: 14px;
}

.g-toc ol {
  list-style: none;
  display: grid;
  gap: 4px;
}

.g-toc a {
  display: block;
  padding: 7px 12px;
  margin: 0 -12px;
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--g-ink);
  transition: background 0.25s ease;
}

.g-toc a:hover,
.g-toc a.is-current {
  background: var(--g-soft);
}

.g-toc a.is-current {
  font-weight: 500;
}

.g-prose {
  min-width: 0;
  padding: clamp(28px, 4vw, 56px) clamp(22px, 4.4vw, 64px);
  border-radius: clamp(26px, 3vw, 36px);
  background: #ffffff;
  border: 1px solid var(--g-line);
  color: var(--g-text);
  font-size: 18px;
  line-height: 1.68;
}

.g-prose > * {
  max-width: 68ch;
}

.g-prose > * + * {
  margin-top: 1.05em;
}

.g-prose h2 {
  margin-top: 2.1em;
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--g-ink);
  scroll-margin-top: 110px;
}

.g-prose > h2:first-child {
  margin-top: 0;
}

.g-prose h3 {
  margin-top: 1.6em;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--g-ink);
}

.g-prose h2 + *,
.g-prose h3 + * {
  margin-top: 0.6em;
}

.g-prose a {
  color: var(--g-ink);
  text-decoration: underline;
  text-decoration-color: rgba(16, 16, 18, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.g-prose a:hover {
  text-decoration-color: var(--g-ink);
}

.g-prose strong {
  font-weight: 700;
  color: var(--g-ink);
}

.g-prose ul,
.g-prose ol {
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.55em;
}

.g-prose ul > li,
.g-prose ol > li {
  position: relative;
  padding-left: 34px;
}

.g-prose ul > li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--g-lime);
  box-shadow: 0 0 0 1.5px var(--g-ink) inset;
}

.g-prose ol {
  counter-reset: g-step;
}

.g-prose ol > li {
  counter-increment: g-step;
  padding-left: 42px;
}

.g-prose ol > li::before {
  content: counter(g-step);
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--g-ink);
  color: #ffffff;
  font-family: var(--brand-font);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* Tables scroll inside their own box on phones */
.g-table {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--g-line);
  -webkit-overflow-scrolling: touch;
}

.g-prose > .g-table {
  max-width: 100%;
}

.g-table table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.45;
}

.g-table th,
.g-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
}

.g-table thead th {
  background: var(--g-soft);
  font-weight: 500;
  color: var(--g-ink);
}

.g-table tbody tr + tr td {
  border-top: 1px solid var(--g-line);
}

.g-table tbody td:first-child {
  font-weight: 500;
  color: var(--g-ink);
}

/* Worked example */
.g-example {
  padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 36px);
  border-radius: 28px;
  background: var(--g-lime-soft);
  color: var(--g-ink);
}

.g-prose > .g-example {
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

.g-example h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
}

.g-example h3::before {
  content: "";
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--g-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.g-example p,
.g-example li {
  font-size: 17px;
  line-height: 1.62;
}

.g-example > * + * {
  margin-top: 0.8em;
}

/* ---------- FAQ ---------- */
.g-faq {
  margin-top: 2.4em;
}

.g-faq-list {
  margin-top: 0.9em;
  border-top: 1px solid var(--g-line);
}

.g-faq-item {
  border-bottom: 1px solid var(--g-line);
}

.g-faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  cursor: pointer;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 500;
  color: var(--g-ink);
}

.g-faq-item summary::-webkit-details-marker {
  display: none;
}

.g-faq-item summary:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
  border-radius: 12px;
}

.g-faq-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--g-ink);
  display: grid;
  place-items: center;
  background: #ffffff;
  transition: background 0.35s var(--g-ease), transform 0.45s var(--g-ease);
}

.g-faq-mark svg {
  width: 18px;
  height: 18px;
}

.g-faq-item[open] .g-faq-mark {
  background: var(--g-lime);
  transform: rotate(45deg);
}

.g-faq-item .g-faq-a {
  padding: 0 56px 22px 0;
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- Call to action ---------- */
.g-cta {
  max-width: 1180px;
  margin: clamp(20px, 3vw, 32px) auto 0;
  padding: clamp(34px, 5vw, 64px) clamp(24px, 5vw, 64px);
  border-radius: clamp(26px, 3vw, 36px);
  background: var(--g-tile);
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 28px 40px;
  align-items: center;
}

.g-cta h2 {
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 18ch;
}

.g-cta p {
  margin-top: 14px;
  max-width: 52ch;
  font-size: 18px;
  line-height: 1.55;
  color: #d6d6d3;
}

.g-cta-actions {
  display: grid;
  justify-items: start;
  gap: 16px;
}

.g-cta .about-trust-cta {
  margin-top: 0;
  background: #ffffff;
  color: var(--g-ink);
}

.g-cta .about-trust-cta .about-trust-cta-icon {
  background: var(--g-ink);
  color: #ffffff;
}

.g-cta .about-trust-cta:hover {
  background: var(--g-lime);
  color: var(--g-ink);
}

.g-cta .about-trust-cta:hover .about-trust-cta-icon {
  background: var(--g-ink);
  color: #ffffff;
}

.g-cta-link {
  margin-left: 6px;
  font-size: 17px;
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 4px;
}

.g-cta-link:hover {
  text-decoration-color: #ffffff;
}

/* ---------- Related answers and the index list ---------- */
.g-related {
  max-width: 1180px;
  margin: clamp(36px, 5vw, 64px) auto 0;
}

.g-related-title {
  font-size: clamp(24px, 2.4vw, 32px);
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--g-ink);
  margin: 0 clamp(6px, 2vw, 24px) 18px;
}

.g-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.g-card a {
  height: 100%;
  min-height: 190px;
  padding: 26px 26px 24px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--g-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  color: var(--g-ink);
  transition: transform 0.45s var(--g-ease), box-shadow 0.45s var(--g-ease);
}

.g-card a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(16, 16, 18, 0.1);
}

.g-card-q {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.g-card-go {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--g-ink);
  color: #ffffff;
  transition: background 0.35s ease, color 0.35s ease;
}

.g-card a:hover .g-card-go {
  background: var(--g-lime);
  color: var(--g-ink);
}

/* Index page */
.g-index-hero .g-title {
  max-width: 17ch;
}

.g-lede {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--g-text);
}

.g-group {
  max-width: 1180px;
  margin: 0 auto;
}

.g-group + .g-group {
  margin-top: clamp(32px, 4vw, 52px);
}

.g-group-title {
  margin: 0 clamp(6px, 2vw, 24px) 16px;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--g-ink);
}

.g-rows {
  list-style: none;
  border-radius: clamp(26px, 3vw, 36px);
  background: #ffffff;
  border: 1px solid var(--g-line);
  overflow: hidden;
}

.g-row + .g-row {
  border-top: 1px solid var(--g-line);
}

.g-row a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 28px;
  align-items: center;
  padding: clamp(22px, 2.6vw, 30px) clamp(22px, 3.4vw, 40px);
  color: var(--g-ink);
  transition: background 0.3s ease;
}

.g-row a:hover {
  background: var(--g-soft);
}

.g-row h3 {
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 500;
}

.g-row p {
  grid-column: 1;
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--g-muted);
}

.g-row .g-card-go {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.g-row a:hover .g-card-go {
  background: var(--g-lime);
  color: var(--g-ink);
}

/* ---------- One load moment ---------- */
@media (prefers-reduced-motion: no-preference) {
  .g-hero,
  .g-answer {
    animation: g-rise 0.9s var(--g-ease) both;
  }

  .g-answer {
    animation-delay: 0.12s;
  }

  @keyframes g-rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-card a,
  .g-faq-mark {
    transition: none;
  }
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1020px) {
  .g-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-toc {
    display: none;
  }

  .g-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-card a {
    min-height: 0;
    flex-direction: row;
    align-items: center;
  }

  .g-cta {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .g-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .g-hero {
    padding-top: 118px;
  }

  .g-article .g-crumbs li:last-child {
    display: none;
  }

  .g-prose {
    font-size: 17px;
    padding: 26px 20px 30px;
  }

  .g-faq-item summary {
    font-size: 17px;
  }

  .g-faq-item .g-faq-a {
    padding-right: 0;
    font-size: 16px;
  }

  .g-cta .about-trust-cta {
    min-width: 0;
    width: 100%;
    height: 62px;
    font-size: 19px;
  }

  .g-row a {
    grid-template-columns: minmax(0, 1fr);
  }

  .g-row .g-card-go {
    display: none;
  }
}
