/* FX Lab pages: comparison logs for the Engineering Editorial system (see DESIGN.md).
   Layered on /assets/site.css. Wide column for screens and tables, reading column for prose. */

.fx { padding-bottom: 6rem; }

/* Top bar and series nav */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.topbar .back { margin: 0; }
.fx ul.series { padding-left: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.series a { color: var(--muted); text-decoration: none; }
.series a:hover { color: var(--ink); text-decoration: underline; }
.series [aria-current="page"] { color: var(--ink); box-shadow: 0 2px 0 var(--blue); }

/* Page head */
.page-head { padding: clamp(2.6rem, 8vw, 5rem) 0 2.2rem; display: grid; gap: 1.2rem; }
.page-head .kicker { margin: 0; color: var(--muted); }
.page-head h1 {
  max-width: 16ch;
  margin: 0;
  font-family: var(--head);
  font-size: clamp(2.3rem, 6.4vw, 4.4rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.page-head .subtitle { margin: 0; font-family: var(--head); font-size: clamp(1.1rem, 2vw, 1.4rem); letter-spacing: -0.01em; color: var(--muted); }
.page-head .dek { max-width: 40rem; margin: 0; color: var(--ink-soft); font-size: 1.12em; line-height: 1.5; }
.page-head p { margin: 0; }

.slate { display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem; margin: 0.4rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--muted); }
.slate b { color: var(--ink); font-weight: 500; }

/* The one lime highlight per page: stacked mono caption. */
.callout {
  width: fit-content;
  max-width: 100%;
  margin: 0.4rem 0 0;
  padding: 0.9rem 1.1rem;
  background: var(--lime);
  color: #1f2937;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.7;
  text-transform: uppercase;
}
.callout span { display: block; }

/* Sections */
.fx main { display: grid; gap: clamp(3rem, 7vw, 4.5rem); }
.fx section { display: grid; gap: 1.2rem; min-width: 0; }
.fx section > * { margin: 0; }
.fx section.tool { padding-top: 1.6rem; border-top: 1px solid var(--line); }
.fx div.tool { padding-top: 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; min-width: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
main > section:not(.tool):not(:first-child) > .eyebrow:first-child { padding-top: 1rem; border-top: 1px solid var(--line); }

.fx h2 {
  font-family: var(--head);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.fx h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink);
}
.fx .tool-head h3 { font-family: var(--head); font-size: 1.15rem; letter-spacing: -0.01em; text-transform: none; font-weight: 600; }
.fx figcaption h3 { font-family: var(--head); font-size: 1.1rem; letter-spacing: -0.01em; text-transform: none; font-weight: 600; }
.fx p { margin: 0; }
.col { max-width: 44rem; }
.muted { color: var(--muted); }
.fine { font-size: 0.82rem; }
.mono { font-family: var(--mono); }
.fx code { font-family: var(--mono); font-size: 0.86em; background: var(--panel); border: 1px solid var(--line); padding: 0.05em 0.35em; overflow-wrap: anywhere; }

.tool-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; }
.stats { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.stats b { color: var(--blue); font-weight: 500; }

/* Screens */
.fx video, .fx img.strip, .fx figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #000;
  border: 1px solid var(--line);
}
.fx video { aspect-ratio: 16 / 9; }
.fx figure { margin: 0; display: grid; gap: 0.8rem; min-width: 0; }
.fx figcaption { display: grid; gap: 0.5rem; margin: 0; font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.fx figcaption.mono { font-family: var(--mono); font-size: 0.74rem; }
.strip-label { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: -0.7rem; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); text-align: center; }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.8rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.6rem 2rem; }
.two > div { min-width: 0; display: grid; gap: 0.6rem; align-content: start; }
.fx ul { margin: 0; padding-left: 1.1em; display: grid; gap: 0.4rem; }
.fx li::marker { color: var(--blue); }

/* Tables */
.scroll { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.fx table { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.86rem; line-height: 1.5; font-variant-numeric: normal; }
.fx th, .fx td { padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fx tr:last-child td { border-bottom: 0; }
.fx thead th, .fx th {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  white-space: nowrap;
}
.fx td:last-child { font-family: inherit; font-size: inherit; }
.fx td.n { font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx td:first-child { color: var(--ink); }
.fx table.wide-table { min-width: 56rem; }
.beats td:first-child, .paths td:first-child { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; color: var(--blue); }

/* Status marks: glyph and word carry the meaning, so colour is only a hint. */
.dot { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; white-space: nowrap; }
.dot.good { color: var(--blue); }
.dot.warn { color: var(--ink-soft); }
.dot.bad { color: var(--ink); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.25em; }
.tag { display: inline-block; width: fit-content; padding: 0.1rem 0.5rem; border: 1px solid currentColor; border-radius: 4px; font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; }
.tag.good { color: var(--blue); }
.tag.warn { color: var(--ink-soft); }
.tag.bad { color: var(--ink); border-style: dashed; }
.tag.off { color: var(--muted); border-style: dotted; }

/* Verdict tiles */
.verdicts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.verdicts > div { background: var(--bg); padding: 1.1rem 1.1rem 1.2rem; display: grid; gap: 0.45rem; align-content: start; min-width: 0; }
.verdicts .k { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.verdicts .hit { background: var(--lime); color: #1f2937; }
.verdicts .hit .k, .verdicts .hit h3, .verdicts .hit p, .verdicts .hit code { color: #1f2937; }
.verdicts .hit code { background: transparent; border-color: rgba(31, 41, 55, 0.35); }
.verdicts h3 { font-family: var(--head); font-size: 1.15rem; letter-spacing: -0.01em; text-transform: none; font-weight: 600; }

/* Notes, lists */
.note { padding: 0.15rem 0 0.15rem 1.1rem; border-left: 2px solid var(--blue); color: var(--ink-soft); }
.fx ol.causes { margin: 0; padding-left: 1.4em; display: grid; gap: 0.8rem; }
.fx ol.causes li::marker { font-family: var(--mono); color: var(--blue); }
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.4rem 1.6rem; }
.next > div { display: grid; gap: 0.4rem; align-content: start; min-width: 0; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.next .rank { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.next h3 { font-family: var(--head); font-size: 1.05rem; text-transform: none; letter-spacing: -0.01em; font-weight: 600; }

/* Run narratives and verbatim prompts */
.prompts { display: grid; gap: 0.5rem; }
.fx details { border: 1px solid var(--line); background: var(--panel); }
.fx summary { cursor: pointer; padding: 0.7rem 0.9rem; font-family: var(--mono); font-size: 0.8rem; font-weight: 500; line-height: 1.45; }
.fx summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.fx details[open] > summary { border-bottom: 1px solid var(--line); }
.fx details.run summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; }
.rmeta { color: var(--muted); font-weight: 400; }
.fx ol.steps { margin: 0; padding: 1rem 1.2rem 1.1rem 2.4rem; display: grid; gap: 0.6rem; max-width: 54rem; font-size: 0.95rem; line-height: 1.55; }
.fx ol.steps li::marker { font-family: var(--mono); color: var(--blue); }
.fx pre.prompt {
  margin: 0;
  padding: 1rem;
  max-height: 32rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink);
}
.pre-note { margin: 0.7rem 0.9rem !important; font-size: 0.9rem; }
.fx details > p.pre-note + pre.prompt { border-top: 1px solid var(--line); }

.signoff { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 4rem; }
.signoff .mark { font-family: "Caveat", "Bradley Hand", "Segoe Script", cursive; font-size: 1.6rem; line-height: 1; color: var(--ink); letter-spacing: 0; }

@media (max-width: 38rem) {
  .strip-label { font-size: 0.6rem; }
  .fx th, .fx td { padding: 0.55rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
