/* ============================================================
   TOOL LANDING PAGE — individual tool deep-dive pages
   (/tools/rwi/, /tools/535-insights/, /tools/a2c/, etc.)
   Mirrors the coalition-page layout (same section structure) but
   scoped to the Technology pillar (teal) rather than Initiatives
   (amber). Reuses coalition.css class names; just overrides the
   accent where coalition.css hardcoded an amber RGB value.
   ============================================================ */

.tool-landing {
  --coalition-accent: var(--pillar-technology, var(--ls-teal-500));
  --coalition-accent-soft: rgba(34, 194, 181, 0.10);
}

/* Hero decoration: coalition.css hardcodes amber — override to teal */
.tool-landing .coalition-hero::before {
  border-color: rgba(127, 225, 212, 0.16);
}

/* Thread pill: coalition.css hardcodes amber-brown text — use teal */
.tool-landing .thread__anchor {
  color: var(--ls-teal-700, #0f7b73);
}

/* Entry-card hover: coalition.css hardcodes amber hover — teal hover */
.tool-landing .entry-card__cta:hover {
  color: var(--ls-teal-300, #7fe1d4);
}

/* ---------- Tool-specific additions ---------- */

/* Coverage / spec bar across the page */
.tool-landing .coalition-stat__number {
  font-variant-numeric: tabular-nums;
}

/* Methodology (what's in the index) reuses .thread — no change needed */

/* Preview block (a screenshot or sample cut of the tool) */
.tool-preview {
  padding-block: var(--section-y);
  background: var(--ls-white);
}
.tool-preview__header {
  max-width: var(--container-narrow);
  margin-bottom: var(--space-9);
}
.tool-preview__header h2 {
  margin-top: var(--space-3);
  max-width: 28ch;
}
.tool-preview__header .lead {
  margin-top: var(--space-5);
  max-width: 62ch;
}
.tool-preview__frame {
  border: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius-md);
  background: var(--ls-cream-50, var(--ls-neutral-50, #f8f6f1));
  overflow: hidden;
}
.tool-preview__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--ls-neutral-100, rgba(0, 0, 0, 0.04));
  border-bottom: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  font-family: var(--font-mono, monospace);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}
.tool-preview__bar::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: var(--radius-full, 9999px);
  background: var(--coalition-accent);
  box-shadow: 16px 0 0 rgba(0,0,0,.08), 32px 0 0 rgba(0,0,0,.06);
  margin-right: var(--space-5);
}
.tool-preview__body {
  padding: var(--space-7);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 900px) {
  .tool-preview__body { grid-template-columns: 1fr; }
}
.tool-preview__map {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 40%, var(--coalition-accent-soft) 0, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(6, 36, 59, 0.05) 0, transparent 45%),
    var(--ls-white);
  border: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  border-radius: var(--radius-sm);
  position: relative;
}
.tool-preview__map::before {
  content: 'SAMPLE CUT · RWI';
  position: absolute;
  top: var(--space-3); left: var(--space-3);
  font-size: var(--fs-2xs, 0.7rem);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
}
.tool-preview__legend {
  display: grid;
  gap: var(--space-4);
}
.tool-preview__legend h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--ls-navy-900);
  margin: 0;
  line-height: var(--lh-snug);
}
.tool-preview__legend p {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-text-body);
}
.tool-preview__legend dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-5);
  font-size: var(--fs-sm);
  padding-top: var(--space-4);
  border-top: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
}
.tool-preview__legend dt {
  color: var(--color-text-muted);
  font-weight: var(--fw-semibold);
}
.tool-preview__legend dd { margin: 0; color: var(--color-text-body); }

/* ============================================================
   PRIMARY LAUNCH CTA — refined button right after stats
   (used on tool landing pages like /tools/rwi/)
   ============================================================ */
.tool-launch-cta {
  background: var(--ls-cream-50, var(--ls-neutral-50, #f8f6f1));
  border-top: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  border-bottom: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  padding-block: var(--space-6);
}
.tool-launch-cta__inner {
  display: flex;
  justify-content: center;
}
.tool-launch-cta__btn {
  min-width: 14rem;
  text-align: center;
  justify-content: center;
  font-size: var(--fs-md);
  padding: 0.85rem 1.6rem;
  box-shadow: 0 8px 20px -14px rgba(6, 36, 59, 0.28);
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.tool-launch-cta__btn:hover {
  box-shadow: 0 10px 24px -14px rgba(6, 36, 59, 0.35);
  transform: translateY(-1px);
}

/* ============================================================
   TOOL DISCOVER — search bar + state tilegram (535 Insights landing)
   ============================================================ */
.tool-discover {
  background: var(--ls-cream-50, var(--ls-neutral-50, #f8f6f1));
  border-top: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  border-bottom: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.06));
  padding-block: var(--section-y);
}
.tool-discover__header {
  max-width: var(--container-narrow);
  margin: 0 auto var(--space-7);
  text-align: center;
}
.tool-discover__title {
  font-family: var(--font-sans);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  color: var(--ls-navy-900);
  margin-top: var(--space-3);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  max-width: 32ch;
  margin-inline: auto;
}

.tool-discover__search {
  display: flex;
  gap: var(--space-3);
  max-width: 46rem;
  margin: 0 auto var(--space-4);
}
.tool-discover__input {
  flex: 1;
  font-size: var(--fs-md);
  padding: 1rem 1.25rem;
  background: var(--ls-white);
  border: 1px solid var(--ls-neutral-300, rgba(0, 0, 0, 0.14));
  border-radius: var(--radius-md);
  color: var(--ls-navy-900);
}
.tool-discover__input::placeholder {
  color: var(--color-text-muted);
}
.tool-discover__input:focus {
  outline: 2px solid var(--pillar-technology, var(--ls-teal-500));
  outline-offset: 2px;
  border-color: var(--pillar-technology, var(--ls-teal-500));
}

.tool-discover__help {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-9);
}
.tool-discover__find {
  margin-left: var(--space-3);
  vertical-align: baseline;
}

.tool-discover__or {
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-6);
}

/* ---------- State tilegram ---------- */
.tool-discover__map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(8, auto);
  gap: 6px;
  max-width: 720px;
  margin: 0 auto;
}

.state-tile {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ls-white);
  color: var(--ls-navy-900);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  border: 1px solid var(--ls-neutral-200, rgba(0, 0, 0, 0.08));
  border-radius: 4px;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.state-tile:hover,
.state-tile:focus-visible {
  background: var(--pillar-technology, var(--ls-teal-500));
  border-color: var(--pillar-technology, var(--ls-teal-500));
  color: var(--ls-white);
  text-decoration: none;
  transform: scale(1.08);
  z-index: 2;
  outline: none;
}

@media (max-width: 640px) {
  .tool-discover__search { flex-direction: column; }
  .tool-discover__help { font-size: var(--fs-xs); }
  .tool-discover__find { display: block; margin: var(--space-3) auto 0; width: max-content; }
  .state-tile { font-size: 0.65rem; }
}
