/* Guide pages: long-form layout built on the tokens in styles.css */

html {
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Timeline step badges: range labels like "6–4wk" need a pill, not a fixed circle */
.timeline-step {
  width: auto;
  min-width: 2.4rem;
  padding: 0 0.7rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Meta row under a guide title */
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.1rem;
  margin-top: 1.1rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.guide-meta .guide-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
}

/* Table of contents chips */
.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.6rem;
}
.guide-toc a {
  display: inline-flex;
  padding: 0.42rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.guide-toc a:hover {
  border-color: var(--primary);
  color: var(--text);
}

/* Long-form prose */
.guide-prose {
  max-width: 760px;
}
.guide-prose > h2 {
  margin: 3.2rem 0 0.9rem;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
}
.guide-prose > h3 {
  margin: 2rem 0 0.6rem;
  font-size: 1.18rem;
}
.guide-prose p,
.guide-prose li {
  color: var(--text-soft);
  line-height: 1.75;
}
.guide-prose p {
  margin: 0 0 1.1rem;
}
.guide-prose ul,
.guide-prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}
.guide-prose li {
  margin-bottom: 0.45rem;
}
.guide-prose li::marker {
  color: var(--primary-strong);
}
.guide-prose strong {
  color: var(--text);
}
.guide-prose a {
  color: var(--primary-strong);
  font-weight: 600;
}

/* Timeline reuse: keep card text tighter than prose rhythm */
.guide-prose .timeline-item h3 {
  margin: 0 0 0.3rem;
}
.guide-prose .timeline-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Definition / note callout */
.guide-callout {
  margin: 1.6rem 0;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.guide-callout p {
  margin: 0;
  color: var(--text-soft);
}
.guide-callout p + p {
  margin-top: 0.6rem;
}
.guide-callout .guide-callout-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Checklist */
.guide-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.guide-checklist-group {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.guide-checklist-group h3 {
  margin: 0 0 0.8rem;
  font-size: 1.02rem;
}
.guide-checklist-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.guide-checklist-group li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1.7rem;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}
.guide-checklist-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.22em;
  width: 0.95em;
  height: 0.95em;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
}
.guide-checklist-note,
.guide-prose p.guide-checklist-note {
  margin-top: 1.75rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* Copyable template block */
.guide-copyblock {
  position: relative;
  margin: 1.6rem 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  overflow: hidden;
}
.guide-copyblock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.guide-copyblock-bar span {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 600;
}
.guide-copy-btn {
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.guide-copy-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.guide-copy-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.guide-copyblock pre {
  margin: 0;
  padding: 1.2rem 1.35rem;
  overflow-x: auto;
  color: var(--text-soft);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

/* Example figure (product screenshots) */
.guide-figure {
  margin: 1.8rem 0;
}
.guide-figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}
.guide-figure figcaption {
  margin-top: 0.7rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

/* Annotated day sheet mock */
.daysheet-mock {
  margin: 1.8rem 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  overflow: hidden;
}
.daysheet-mock-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.daysheet-mock-row:last-child {
  border-bottom: none;
}
.daysheet-mock-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 0.85rem;
  font-weight: 800;
}
.daysheet-mock-row h3 {
  margin: 0.1rem 0 0.25rem;
  font-size: 1rem;
}
.daysheet-mock-row p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}
.daysheet-mock-row .daysheet-mock-sample {
  margin-top: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--text-soft);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
}

/* Failure-mode cards */
.guide-pitfalls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.guide-pitfall {
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.guide-pitfall h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}
.guide-pitfall p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* FAQ on guide pages */
.guide-faq details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.guide-faq summary {
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.guide-faq summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.guide-faq details p {
  margin: 0.7rem 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

/* Hub cards */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}
.guide-card .guide-card-tag {
  align-self: flex-start;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.guide-card h2,
.guide-card h3 {
  margin: 0;
  font-size: 1.18rem;
  color: var(--text);
}
.guide-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}
.guide-card .guide-card-meta {
  color: var(--text-soft);
  font-size: 0.83rem;
}
.guide-card .guide-card-cta {
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .guide-checklist,
  .guide-pitfalls {
    grid-template-columns: 1fr;
  }
  .guide-cards {
    grid-template-columns: 1fr;
  }
}

/* Print-only handout chrome (hidden on screen; shown in section print mode) */
.print-only {
  display: none;
}

/* Print: turn the page into a clean handout */
@media print {
  @page {
    size: portrait;
    margin: 14mm;
  }

  /* Section print mode: a button chose one .print-target to print */
  body.print-section-mode main .container > :not(.print-target) {
    display: none !important;
  }
  body.print-section-mode .hero,
  body.print-section-mode .section-muted {
    display: none !important;
  }
  body.print-section-mode .print-only {
    display: block !important;
  }
  .print-head {
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid #111;
    color: #111;
  }
  .print-head .print-head-title {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
  }
  .print-head .print-head-brand {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: #555;
  }
  .print-head-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 2rem;
    margin-top: 0.7rem;
    font-size: 0.9rem;
    color: #111;
  }
  .print-fill {
    display: inline-block;
    min-width: 170px;
    border-bottom: 1px solid #888;
  }
  .print-foot {
    margin-top: 0.9rem;
    padding-top: 0.5rem;
    border-top: 1px solid #bbb;
    font-size: 0.8rem;
    color: #555;
  }

  /* Copy blocks print as plain documents */
  .guide-copyblock-bar {
    display: none !important;
  }
  .guide-copyblock {
    border: none;
    border-radius: 0;
    background: #fff;
  }
  .guide-copyblock pre {
    padding: 0;
    color: #111;
  }

  body {
    background: #fff;
    color: #111;
  }
  .announce-bar,
  .site-header,
  .site-footer,
  .consent-banner,
  .guide-toc,
  .cta-section,
  .guide-copy-btn,
  .no-print {
    display: none !important;
  }
  .section {
    padding: 1rem 0;
  }
  .guide-prose p,
  .guide-prose li,
  .guide-checklist-group li,
  .guide-checklist-group h3,
  .guide-prose > h2,
  .guide-prose > h3 {
    color: #111;
  }
  .guide-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-checklist-group {
    border: 1px solid #bbb;
    background: #fff;
    break-inside: avoid;
  }
  .guide-checklist-group li::before {
    border-color: #888;
  }
}
