/* ============================================================
   LoomWeb content pages — reusable component library
   Loaded after site.css. Brand v1.0: ink/paper do the work,
   green (#5CA31F) points at the one thing that matters.
   ============================================================ */

/* ---- page frame: reading column + sticky TOC rail ---------- */
.content-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
@media (min-width: 1100px) {
  .content-page {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 56px;
    max-width: 1120px;
    padding-top: 72px;
  }
}

/* ---- hero --------------------------------------------------- */
.post-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--tint);
  padding: 7px 12px;
  border-radius: 999px;
}
.post-kicker::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-deep);
}
.post-hero h1 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.02em;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  margin: 18px 0 14px;
  max-width: 18ch;
  text-wrap: balance;
}
.post-hero .post-sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 26px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ---- table of contents rail --------------------------------- */
.toc {
  display: none;
}
@media (min-width: 1100px) {
  .toc {
    display: block;
    position: sticky;
    top: 96px;
    align-self: start;
    font-size: 13px;
  }
  .toc-label {
    font: 500 11px/1 var(--body);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 6px 0 12px;
  }
  .toc a {
    display: block;
    color: var(--muted);
    text-decoration: none;
    padding: 5px 0 5px 14px;
    border-left: 2px solid var(--line);
    line-height: 1.4;
  }
  .toc a:hover { color: var(--ink); border-left-color: var(--muted); }
  .toc a.active {
    color: var(--ink);
    border-left-color: var(--green-deep);
    font-weight: 500;
  }
  .toc .toc-cta {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
  }
  .toc .toc-cta p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
  .toc .toc-cta a {
    display: inline-block;
    border: 0; padding: 0;
    color: var(--green-deep);
    font-weight: 600;
  }
}

/* ---- body rhythm --------------------------------------------- */
.content-body { font-size: 17px; line-height: 1.7; }
.content-body > section { margin: 0 0 44px; }
.content-body p { margin: 0 0 16px; max-width: 68ch; }
.content-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #b9d68a;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.content-body a:hover { color: var(--green-deep); text-decoration-color: var(--green-deep); }
.content-body h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.015em;
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 16px;
  display: flex;
  gap: 12px;
  align-items: baseline;
  scroll-margin-top: 40px;
}
.content-body h2 .h2-index {
  font: 500 13px var(--body);
  color: var(--green-deep);
  letter-spacing: .05em;
}
.content-body ul { padding-left: 0; list-style: none; margin: 0 0 16px; }
.content-body ul li {
  padding: 7px 0 7px 26px;
  position: relative;
  max-width: 66ch;
}
.content-body ul li::before {
  content: "";
  position: absolute;
  left: 6px; top: 16px;
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 2px solid var(--green-deep);
}

/* ---- key facts callout --------------------------------------- */
.callout {
  background: linear-gradient(160deg, var(--tint), #f4faea 70%);
  border: 1px solid #d9ecb6;
  border-radius: 16px;
  padding: 22px 26px;
  margin: 0 0 44px;
}
.callout h2 {
  font: 500 12px var(--body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin: 0 0 12px;
  display: block;
}
.callout ul li { padding-left: 24px; }
.callout ul li::before { border-color: var(--green-deep); background: var(--paper); }

/* ---- comparison cards (which option fits) --------------------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.compare-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.55;
}
.compare-card h3 {
  font: 500 15px var(--display);
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

/* ---- FAQ accordion -------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  font: 500 16px var(--body);
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font: 400 22px/1 var(--display);
  color: var(--green-deep);
  transition: transform .15s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a {
  padding: 0 4px 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 62ch;
}
.faq .faq-a a { color: var(--green-deep); }

/* ---- closing CTA band ------------------------------------------ */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 18px;
  padding: 34px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 {
  font: 500 24px/1.25 var(--display);
  letter-spacing: -.01em;
  margin: 0;
  max-width: 22ch;
}
.cta-band p { margin: 6px 0 0; color: #b7c4bd; font-size: 14px; }
.cta-band .btn { background: var(--green-deep); }
.cta-band .btn:hover { background: #457715; }

/* ---- selection -------------------------------------------------- */
.content-page ::selection { background: #d9ecb6; }
.cta-band .btn { text-decoration: none; }

/* ============================================================
   Pillar pages: hero variants, animations, deep-index cards
   ============================================================ */
.content-page.pillar { max-width: 1180px; }
.content-page.pillar .content-main { max-width: 780px; }
.content-page.pillar .post-hero { padding: 30px 0 8px; }
.content-page.pillar .post-hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  max-width: 22ch;
}

/* animated thread: the infinity path draws itself in the hero */
.post-thread { margin: 6px 0 18px; }
.post-thread svg { width: 132px; height: auto; display: block; }
.post-thread path {
  fill: none;
  stroke: var(--green-deep);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: thread-draw 1.6s ease forwards .2s;
}
@keyframes thread-draw { to { stroke-dashoffset: 0; } }

/* scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .post-thread path { animation: none; stroke-dashoffset: 0; }
}

/* pillar index: cards linking down into the long-tail depth */
.pillar-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: var(--paper);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pillar-card:hover {
  transform: translateY(-3px);
  border-color: #b9d68a;
  box-shadow: 0 10px 30px rgba(28, 51, 42, .08);
}
.pillar-card .pc-n {
  font: 500 12px var(--body);
  color: var(--green-deep);
  letter-spacing: .06em;
}
.pillar-card .pc-t {
  font: 500 16px var(--display);
  color: var(--ink);
  line-height: 1.3;
}
.pillar-card .pc-d { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.pillar-card .pc-go {
  margin-top: auto;
  padding-top: 10px;
  font: 500 13px var(--body);
  color: var(--green-deep);
}
.pillar-card .pc-go::after { content: " →"; }

/* ---- numbered step timeline ----------------------------------- */
.step-list { counter-reset: step; margin: 8px 0 0; padding: 0; list-style: none; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 58px;
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--tint);
  border: 1px solid #d9ecb6;
  color: var(--green-deep);
  font: 500 13px/38px var(--body);
  text-align: center;
}
.step-list li::after {
  content: "";
  position: absolute;
  left: 19px; top: 42px; bottom: 4px;
  width: 1px;
  background: var(--line);
}
.step-list li:last-child::after { display: none; }
.step-list li h3 {
  font: 500 17px var(--display);
  margin: 6px 0 6px;
}
.step-list li p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---- ledger / comparison tables --------------------------------- */
.ledger { width: 100%; border-collapse: collapse; margin: 14px 0 8px; font-size: 15px; }
.ledger th, .ledger td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.ledger th {
  font: 500 12px var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.ledger td:first-child { font-weight: 500; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-note { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* ---- split panel (two models side by side) ---------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 16px 0 8px;
}
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.split .panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--paper);
}
.split .panel h3 {
  font: 500 16px var(--display);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.split .panel p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.split .panel ul { margin: 0; }
.split .panel ul li { font-size: 14.5px; padding: 5px 0 5px 22px; }
.split .panel ul li::before { width: 6px; height: 6px; top: 13px; left: 4px; }

/* ---- interactive checklist -------------------------------------- */
.checklist { margin: 10px 0 8px; }
.checklist label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 8px;
  cursor: pointer;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
.checklist label:has(input:checked) {
  color: var(--muted);
  text-decoration: line-through;
  background: var(--surface);
}
.checklist input { margin-top: 3px; accent-color: var(--green-deep); }

/* ---- icon cards grid --------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
.cards-grid .card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--paper);
}
.cards-grid .card h3 {
  font: 500 15px var(--display);
  margin: 0 0 6px;
}
.cards-grid .card p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
