/* ===================================================================
   FirmForte — .ffig figure kit
   -------------------------------------------------------------------
   Token-driven, theme-safe, mobile-first explainer figures. Every label
   is wrapping HTML rather than fixed SVG <text>, so nothing clips or
   shrinks on a phone.

   Previously lived in an inline <style> in layouts/post.njk and was
   therefore blog-only. Moved here so service, practice-area, and pricing
   pages can use the same vocabulary — those pages had no explainer
   graphics at all, which is where the concepts are hardest and the
   stakes are highest.

   Loaded sitewide from partials/head.njk.
   =================================================================== */

/* ============================================================
   .ffig — FirmForte blog-figure kit. Token-driven, theme-safe,
   mobile-first. All labels are wrapping HTML (never fixed SVG
   <text>), so nothing clips or shrinks on a phone. Blog-scoped.
   ============================================================ */
.ffig { margin: 2.6rem 0; }
.ffig__frame { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); padding: 22px; }
.ffig code { font-family: var(--font-mono); font-size: .86em; background: var(--bg-soft); padding: 1px 5px; border-radius: 5px; color: var(--ink); }
.ffig__frame code { background: var(--bg); }
.ffig__cap { margin-top: 12px; font-size: .85rem; line-height: 1.55; color: var(--ink-muted); }
.ffig__eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 7px; }

/* Emphasis / anchor card (schema anchor, hub centre) */
.ffig__anchor { position: relative; border: 2px solid var(--accent-deep); border-radius: var(--radius-sm); background: var(--bg-elev); padding: 15px 17px; }
.ffig__anchor--hub { text-align: center; }
.ffig__anchor--hub .ffig__type { justify-content: center; }
.ffig__type { font-family: var(--font-mono); font-weight: 600; font-size: 15.5px; color: var(--ink); display: inline-flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin: 0; }
.ffig__id { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; color: var(--accent-deep); background: var(--accent-soft); padding: 2px 8px; border-radius: var(--radius-pill); }
.ffig__role { margin: 7px 0 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }
.ffig__spine { width: 2px; height: 20px; background: var(--border-strong); margin: 0 auto; }

/* Grid of nodes (schema dependents, hub components) */
.ffig__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.ffig__node { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); padding: 13px 14px; }
.ffig__node .ffig__type { font-size: 14px; }
.ffig__link { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink); background: var(--bg-soft); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }

/* Ordered vertical bands (search-results anatomy) */
.ffig__stack { display: flex; flex-direction: column; gap: 8px; }
.ffig__band { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); padding: 12px 14px; }
.ffig__band-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ffig__band-name { font-weight: 600; color: var(--ink); font-size: 14.5px; }
.ffig__band-note { color: var(--ink-soft); font-size: 12.5px; margin: 4px 0 0; line-height: 1.5; }
.ffig__where { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.ffig__where--yes { background: var(--accent); color: var(--bg-dark); }
.ffig__where--no { background: var(--bg-soft); color: var(--ink-muted); border: 1px solid var(--border); }

/* Weighted horizontal bars (ranked tiers) */
.ffig__bars { display: flex; flex-direction: column; gap: 13px; }
.ffig__bar-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 5px; flex-wrap: wrap; }
.ffig__bar-name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.ffig__bar-name span { color: var(--ink-muted); font-weight: 400; }
.ffig__bar-weight { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.ffig__bar-track { height: 13px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; }
.ffig__bar-fill { height: 100%; background: var(--accent); }
.ffig__bar-fill--muted { background: var(--ink-faint); }

/* Two-column compare (what the crawler sees) */
.ffig__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ffig__col { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); padding: 14px 15px; }
.ffig__col--bad { border-left: 3px solid var(--danger); }
.ffig__col--good { border-left: 3px solid var(--accent); }
.ffig__col-head { font-weight: 600; color: var(--ink); font-size: 14px; margin: 0 0 3px; }
.ffig__col-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 10px; }
.ffig__lines { display: flex; flex-direction: column; gap: 7px; }
.ffig__line { font-size: 12.5px; line-height: 1.45; color: var(--ink-soft); padding-left: 19px; position: relative; }
.ffig__line::before { position: absolute; left: 0; top: 0; font-family: var(--font-mono); font-size: 12px; }
.ffig__line--miss::before { content: "\2717"; color: var(--danger); }
.ffig__line--has::before { content: "\2713"; color: var(--accent-deep); }

@media (max-width: 520px) {
  .ffig__frame { padding: 15px; }
  .ffig__cols { grid-template-columns: 1fr; }
}

/* ===================================================================
   LAYER LOCATOR  ({% layer "structured" %})
   -------------------------------------------------------------------
   Four dependent layers with one lit, so a reader meeting the model one
   post at a time can see where the post sits in it. Earlier layers read
   as settled, later ones as pending; the current one carries the accent.
   =================================================================== */
.lyr {
  margin: 2.6rem 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.lyr-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
}
.lyr-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  counter-reset: lyr;
}
@media (max-width: 720px) { .lyr-steps { grid-template-columns: 1fr; } }
.lyr-step {
  position: relative;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  counter-increment: lyr;
  margin: 0;
}
.lyr-step-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 5px;
}
.lyr-step-name::before {
  content: counter(lyr) ". ";
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--ink-faint);
}
.lyr-step-note {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}
/* Layers already satisfied read as settled rather than inactive. */
.lyr-step.is-done .lyr-step-name { color: var(--ink-soft); }
.lyr-step.is-here {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
}
.lyr-step.is-here .lyr-step-name { color: var(--ink); }
.lyr-step.is-here .lyr-step-note { color: var(--ink-soft); }
.lyr-here {
  display: inline-block;
  margin-top: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.lyr-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
}
