/* The guide pages (one per search question) and the guides index. */
.guide {
  max-width: 44rem;
  padding-top: 56px;
  padding-bottom: 96px;
}

.guide .crumbs {
  font: 600 13px/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

.guide .crumbs a { color: var(--accent); text-decoration: none; }
.guide .crumbs a:hover { text-decoration: underline; }

.guide h1 {
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.05;
  font-weight: 750;
}

.guide .lede { margin: 18px 0 0; }

.guide h2 {
  font-size: 26px;
  line-height: 1.2;
  margin: 52px 0 12px;
  scroll-margin-top: 80px;
}

.guide h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 28px 0 6px;
}

.guide p, .guide li { color: var(--ink-2); }
.guide strong { color: var(--ink); }
.guide ul, .guide ol { padding-left: 1.3em; }
.guide li { margin: 8px 0; }
.guide a { color: var(--accent); }

/* ---- figures (inline SVG on the app's lattice) --------------------------- */

.fig {
  margin: 36px 0 8px;
  padding: 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.fig svg { display: block; width: 100%; height: auto; }

.fig figcaption {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
  margin-top: 10px;
  text-align: center;
}

.fig .lat { fill: none; stroke: var(--line); stroke-width: 1; }
.fig .part { fill: none; stroke: var(--ink); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.fig .ext { fill: none; stroke: var(--accent); stroke-width: 1.1; }
.fig .dim { fill: none; stroke: var(--accent); stroke-width: 1.4; }
.fig .tick { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.fig .num { fill: var(--accent); font: 650 15px/1 var(--font); }
.fig .note { fill: var(--muted); font: 500 12.5px/1 var(--font); }
.fig .face { fill: var(--sun); opacity: 0.28; }

/* ---- "In PencilCAD" steps ---------------------------------------------- */

.try {
  margin: 52px 0 0;
  padding: 6px 24px 18px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.guide .try h2 { margin-top: 22px; font-size: 22px; }

.guide .steps { list-style: none; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin: 14px 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 650 14px/26px var(--font);
  text-align: center;
}

/* ---- call to action ------------------------------------------------------ */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 22px;
  margin: 48px 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.cta .icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 0 0 1px var(--hairline);
}

.cta div { flex: 1 1 16rem; }
.guide .cta h2 { margin: 0 0 4px; font-size: 20px; }
.cta p { margin: 0; font-size: 15.5px; line-height: 1.45; }

/* ---- guide lists (index + "more guides") --------------------------------- */

.guide .guide-list { list-style: none; padding: 0; margin: 0; }
.lede + .guide-list { margin-top: 36px; }
.guide-list li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.guide-list li:first-child { border-top: 1px solid var(--hairline); }

.guide-list a {
  display: block;
  font: 650 18px/1.3 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.guide-list a:hover { color: var(--accent); }
.guide-list p { margin: 4px 0 0; font-size: 15.5px; line-height: 1.45; }

.guide .more h2 { font-size: 20px; margin-top: 48px; }

@media (max-width: 600px) {
  .guide { padding-top: 40px; padding-bottom: 72px; }
  .guide h2 { font-size: 23px; margin-top: 44px; }
  .fig { padding: 10px; }
  .try { padding: 4px 18px 14px; }
}

/* ---- making guides (Cricut, laser, router, sheet metal) ----------------- */

/* Operation colours in the figures. Each also differs by line style, so colour isn't the only cue. */
.fig {
  --op-cut: #D93A2B;
  --op-score: #2F6FDE;
  --op-draw: #2E8B57;
  --op-engrave: #8A5A00;
}

@media (prefers-color-scheme: dark) {
  .fig {
    --op-cut: #F0806F;
    --op-score: #84AEF2;
    --op-draw: #73C99A;
    --op-engrave: #E2B65C;
  }
}

.fig .cut { fill: none; stroke: var(--op-cut); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.fig .score { fill: none; stroke: var(--op-score); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linecap: round; }
.fig .draw { fill: none; stroke: var(--op-draw); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fig .engrave { fill: var(--op-engrave); opacity: 0.55; }
.fig .cons { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.fig .toolpath { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 4; stroke-linecap: round; }
.fig .bend { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 8 5; }
.fig .stock { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.6; }
.fig .sheet { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1.4; }
.fig .solid { fill: var(--ink); }
.fig .knock { fill: none; stroke: var(--card); stroke-linecap: round; stroke-linejoin: round; }
.fig .label { fill: var(--ink); font: 600 12.5px/1 var(--font); }
.fig .warn { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.fig .pick { fill: none; stroke: var(--ink); stroke-width: 2.5; }

/* Small reference tables (bend allowance). */
.table-wrap { overflow-x: auto; margin: 20px 0 8px; }
.guide table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.4; }
.guide th, .guide td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--hairline); color: var(--ink-2); vertical-align: top; }
.guide th { color: var(--ink); font-weight: 650; }
.guide td.n { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }

.guide .formula {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--paper-2);
  border-radius: 10px;
  font: 500 16px/1.7 var(--font);
  color: var(--ink);
}

/* Questions on a guide page reuse the home page's FAQ markup (as on Support). */
.guide .faq article { padding: 20px 0; border-top: 1px solid var(--hairline); }
.guide .faq article:last-child { border-bottom: 1px solid var(--hairline); }
.guide .faq h3 { margin: 0 0 6px; }
.guide .faq p { margin: 0; }

/* Safety note on the router guide. */
.guide .caution {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 10px 10px 0;
}
.guide .caution p { margin: 0; color: var(--ink); }

/* Trademark footnote. */
.guide .tm { margin: 40px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }

/* ---- picture-first guides --------------------------------------------------
   An animated figure is <figure class="fig anim" id="…"> with its own keyframes in the page's
   <style>, all scoped under #id.play (guide.js adds .play while it's on screen). The un-animated
   state is the finished picture, so Reduce Motion and no-script readers get a complete still. */

@media (prefers-reduced-motion: reduce) {
  .fig.anim.play * { animation: none !important; }
}

/* A storyboard: two to four small frames in order, numbered, wrapping on a phone. */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 28px 0 8px;
  counter-reset: frame;
}
.strip .fig { margin: 0; padding: 12px; position: relative; }
.strip .fig::before {
  counter-increment: frame;
  content: counter(frame);
  position: absolute;
  top: 8px;
  left: 10px;
  font: 650 12px/1 var(--font);
  color: var(--accent);
}
.strip .fig figcaption { font-size: 13.5px; margin-top: 6px; }

/* The pencil that draws in the figures, and a finger for taps and drags. */
.fig .pen-body { fill: var(--ink); }
.fig .pen-tip { fill: var(--accent); }
.fig .finger { fill: var(--paper-2); stroke: var(--ink-2); stroke-width: 1.2; }
.fig .tap { fill: none; stroke: var(--accent); stroke-width: 1.6; }

/* A short line under a figure that carries the step, when the picture does the rest. */
.guide .say { font-size: 17px; margin-top: 12px; }
