/* tool-page.css — the parts of a /platform/<tool> page that css/tool-explainer.css
   does not already provide.
   ---------------------------------------------------------------------------
   The 26 tool pages in docs/tool-pages-brief.md are built from
   platform/_tool-template.html, and their body reuses the explainer components
   (.mvte-hero, .mvte-fail, .mvte-step, .mvte-feat, .mvte-case, .mvte-sec) so a
   tool page and the in-app guide it was written from look like one product.
   Every one of the 238 selectors in tool-explainer.css is scoped under .mvte,
   so those come free once the page carries that class.

   Four things section 4 of the brief asks for have no .mvte equivalent, and
   they are all that is here: the breadcrumb, the screenshot figure, the
   related-links block, and a FAQ that works with JavaScript off.

   WHY NOT REUSE .mvte-qa FOR THE FAQ
   .mvte-qa is a <button> plus `.ans{max-height:0;overflow:hidden}`, opened by
   js/tool-explainer.js. With JavaScript off every answer stays collapsed at
   zero height. The brief's QA checklist (section 9) requires the page to work
   with JavaScript off, and Google requires FAQPage answer text to be visible to
   the user — a collapsed-forever answer fails both. <details>/<summary> is the
   same interaction with no script, so the FAQ here is native disclosure.

   WHY THE .mvte-reveal OVERRIDE AT THE BOTTOM
   Same reason. `.mvte-reveal{opacity:0}` until the script adds `.in`, so any
   section carrying it is invisible without JavaScript. The template does not
   use those classes, but content pasted out of an explainer will bring them
   along, and an invisible page is a worse failure than a missing animation.

   Everything here is scoped under .tp so it cannot reach another page.
   Tokens only, radius from the scale — see docs/DESIGN-CONSTITUTION.md. */

/* ---------- breadcrumb ---------- */
.tp-crumbs {
  padding: var(--space-6) 0 0;
  font: 500 13px/1.4 var(--font);
  color: var(--text-3);
}
.tp-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tp-crumbs li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tp-crumbs li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  transform: rotate(-45deg);
  opacity: 0.9;
}
.tp-crumbs a {
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-xs);
}
.tp-crumbs a:hover {
  color: var(--purple-bright);
  text-decoration: underline;
}
.tp-crumbs [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- screenshots ---------- */
.tp-shot {
  margin: var(--space-8) 0 0;
}
.tp-shot picture,
.tp-shot img {
  display: block;
}
.tp-shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.tp-shot figcaption {
  margin-top: var(--space-3);
  font: 400 13.5px/1.5 var(--font);
  color: var(--text-3);
  text-align: center;
}
/* The hero shot sits directly under the intro and carries the page, so it gets
   the wider measure the .mvte-lead copy above it does not. */
.tp-shot-hero {
  margin-top: var(--space-10);
}

/* ---------- three personas ----------
   .mvte-cases is a 2-column grid; section 4 asks for three personas. */
.tp-cases-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------- related ---------- */
.tp-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding: 0;
  list-style: none;
}
.tp-rel {
  display: block;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.tp-rel:hover {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  transform: translateY(-2px);
}
.tp-rel .kind {
  display: block;
  font: 600 11.5px/1 var(--font);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-bright);
}
.tp-rel .name {
  display: block;
  margin-top: var(--space-2);
  font: 700 16px/1.35 var(--font-heading);
}
.tp-rel .note {
  display: block;
  margin-top: var(--space-1);
  font: 400 14px/1.5 var(--font);
  color: var(--text-2);
}

/* ---------- FAQ (no JavaScript required) ---------- */
.tp-faq {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-8);
  max-width: 820px;
}
.tp-q {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.2s;
}
.tp-q[open] {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
}
.tp-q summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 18px 20px;
  cursor: pointer;
  font: 700 16.5px/1.4 var(--font-heading);
  color: var(--text);
  list-style: none;
}
.tp-q summary::-webkit-details-marker {
  display: none;
}
.tp-q summary::marker {
  content: "";
}
.tp-q summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid var(--purple-bright);
  border-bottom: 2px solid var(--purple-bright);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s;
}
.tp-q[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}
.tp-q summary:hover {
  color: var(--purple-bright);
}
.tp-q summary:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: -2px;
}
.tp-a {
  padding: 0 20px 18px;
  margin: 0;
  font: 400 14.5px/1.65 var(--font);
  color: var(--text-2);
}
.tp-a + .tp-a {
  padding-top: 0;
}

/* ---------- CTA band ----------
   Real anchors, not .mvte-btn: js/tool-explainer.js binds a scroll-to-input
   click handler to every .mvte-btn, which on a page with no tool input is a
   handler that does nothing useful on the one control that has to navigate. */
.tp-cta {
  margin: var(--space-10) 0 0;
  padding: 56px var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  text-align: center;
}
.tp-cta h2 {
  margin: 0;
  font: 800 clamp(24px, 3.2vw, 34px) / 1.2 var(--font-heading);
  color: var(--text);
}
.tp-cta p {
  margin: var(--space-4) auto 0;
  max-width: 52ch;
  font: 400 16px/1.6 var(--font);
  color: var(--text-2);
}
.tp-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: 700 15px/1 var(--font);
  text-decoration: none;
  background: var(--brand);
  color: var(--on-brand);
  transition: transform 0.15s, box-shadow 0.2s;
}
.tp-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.tp-btn-2 {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.tp-btn-2:hover {
  border-color: var(--purple-bright);
  color: var(--purple-bright);
}
.tp-note {
  margin-top: var(--space-4);
  font: 400 13.5px/1.5 var(--font);
  color: var(--text-3);
}

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .tp-cases-3 {
    grid-template-columns: 1fr;
  }
  .tp-cta {
    padding: 40px var(--space-5);
  }
}

/* ---------- JavaScript off ----------
   Read the note at the top of this file before removing these. Content that is
   only visible once a script runs is content a crawler and a reader with
   JavaScript disabled never see, and these pages exist to be crawled. */
.tp .mvte-reveal {
  opacity: 1;
  transform: none;
}
.tp .mvte-stagger > * {
  opacity: 1;
  transform: none;
}

/* ---------- /platform/ catalog ----------
   The one-row-per-tool listing generated by tests/platform-catalog.mjs. It
   lives here rather than in a <style> block because platform/index.html has
   none today and adding the page's first one for this would be the wrong
   precedent. Scoped under .pf-cat so it cannot reach the hero or the
   "Where to start" block above it. */
.pf-cat-scene {
  padding-top: var(--space-8);
}
.pf-cat {
  margin-top: var(--space-10);
}
.pf-cat-h {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  font: 800 19px/1.3 var(--font-heading);
  color: var(--text);
}
.pf-cat-n {
  flex: none;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--purple) 14%, transparent);
  color: var(--purple-bright);
  font: 700 11.5px/1 var(--font);
}
.pf-cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 2px var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pf-row > a,
.pf-row--flat {
  display: block;
  padding: 11px var(--space-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
}
.pf-row > a:hover {
  background: color-mix(in srgb, var(--purple) 7%, transparent);
}
.pf-row > a:focus-visible {
  outline: 2px solid var(--purple-bright);
  outline-offset: -2px;
}
.pf-row-n {
  display: block;
  font: 700 14.5px/1.4 var(--font);
  color: var(--text);
}
.pf-row > a:hover .pf-row-n {
  color: var(--purple-bright);
}
.tp-svg-hero { max-width: 780px; margin: 30px auto 0; }
.tp-svg-hero .mvte-demo { margin: 0; width: 100%; }

/* ---------- generic hero (tools with no explainer demo) ----------
   An honest schematic of a results panel: a window frame, a category glyph, a
   mini chart and abstract status rows. It invents no numbers and is not a
   screenshot of real data; it reads as "this is the shape of the report" while
   staying language-neutral (aria-hidden, no copy but the filename). */
.tph { position: relative; }
.tph-win {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.tph-win::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 85% at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(95% 75% at -10% 110%, color-mix(in srgb, var(--brand-2) 13%, transparent), transparent 60%);
  pointer-events: none;
}
.tph-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--hairline);
}
.tph-bar i {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
}
.tph-bar span {
  margin-left: var(--space-2);
  font: 500 12.5px/1 var(--font-mono);
  color: var(--text-3);
  letter-spacing: 0.01em;
}
.tph-body {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-6);
}
.tph-glyph {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--brand) 12%, var(--panel));
  border: 1px solid var(--border);
  color: var(--brand);
  flex: none;
}
.tph-glyph svg { width: 40px; height: 40px; }
.tph-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
.tph-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: 66px;
}
.tph-chart b {
  flex: 1;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 22%, transparent));
}
.tph-chart b:nth-child(1) { height: 44%; }
.tph-chart b:nth-child(2) { height: 68%; }
.tph-chart b:nth-child(3) { height: 52%; }
.tph-chart b:nth-child(4) { height: 88%; }
.tph-chart b:nth-child(5) { height: 60%; }
.tph-chart b:nth-child(6) { height: 76%; }
.tph-chart b:nth-child(7) { height: 48%; }
.tph-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.tph-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.tph-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--green);
  flex: none;
}
.tph-dot.b { background: var(--brand); }
.tph-dot.w { background: var(--amber); }
.tph-line {
  height: 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--text-3) 24%, transparent);
}
.tph-row:nth-child(1) .tph-line { width: 72%; }
.tph-row:nth-child(2) .tph-line { width: 54%; }
.tph-row:nth-child(3) .tph-line { width: 83%; }
.tph-row:nth-child(4) .tph-line { width: 46%; }
.tph-row:nth-child(5) .tph-line { width: 66%; }
@media (max-width: 560px) {
  .tph-body { grid-template-columns: 1fr; gap: var(--space-4); }
  .tph-glyph { width: 60px; height: 60px; }
  .tph-glyph svg { width: 32px; height: 32px; }
}
.pf-row-d {
  display: block;
  margin-top: 2px;
  font: 400 13px/1.5 var(--font);
  color: var(--text-3);
}
/* No link exists for this tool, so it is listed and not linked rather than
   pointed somewhere unrelated. Reads as text, not as a broken control. */
.pf-row--flat .pf-row-n {
  color: var(--text-2);
}
.pf-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--gold) 20%, transparent);
  color: var(--amber);
  font: 700 10px/1.4 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ---------- no scroll-reveal on the /platform overview ----------
   The shared aisi system fades each section in from dimmed + shifted as it
   scrolls into view (.aisi-rise -> .in). The owner does not want that on the
   /platform pages, so neutralise it here. tool-page.css is loaded only by the
   /platform overview (not /solutions), so this is scoped to it: every section
   is visible from the start, no fade and no slide. The .aisi-body prefix is
   needed because mv-aisi.css loads after this file on the overview, so a bare
   .aisi-rise would tie on specificity and lose on order. */
.aisi-body .aisi-rise {
  opacity: 1;
  transform: none;
  transition: none;
}
