/*
 * How this site is built — /platform/.
 *
 * Two new shapes on this page: the stat pair in "The defect", and the record
 * inspector's two-column field list in "The record inspector". Everything
 * else borrows .bay/.shell/.eyebrow/.lede/.prose/.btn/.dentil from theme.css
 * rather than restyling it here.
 *
 * The inspector's two columns reuse the .practical/.also technique already
 * proven elsewhere in this theme: minmax(_, 1fr) on auto-fit, so the second
 * column drops below the first on a narrow screen with no media query and no
 * horizontal scroll.
 *
 * Colour note: the two columns are told apart by their top rule (--blue for
 * WordPress, --accent for Tessitura) and nothing else. An earlier draft tinted
 * the Tessitura column with --paper-raised; --ember as a link colour measures
 * 4.93:1 there, which clears AA but leaves little margin, and this build has
 * already been caught twice by axe on exactly this trap. Both columns stay on
 * plain --paper so every inline link keeps --ember's full 5.35:1.
 */

/* ------------------------------------------------------------- the count -- */

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  margin: 1.75rem 0;
}

.stat__n {
  font-family: var(--display);
  font-size: var(--step-4);
  line-height: 1;
  margin: 0 0 0.3rem;
  color: var(--ink);
}

.stat__label {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  max-width: 18ch;
}

/* ---------------------------------------------------- catalogue overlap -- */

/*
 * Two complete catalogue bars, not an area-proportional Venn diagram. Each
 * bar uses the intake's own percentage and prints the same 64-record overlap,
 * so the shape shows why that overlap is modest in the Wheeler catalogue but
 * nearly two-fifths of Aspen Show Tix. The intersecting arches are the join,
 * drawn in CSS so no generated SVG enters the public build.
 */
.catalog-overlap {
  margin: 2rem 0;
  overflow: hidden;
  border: 1px solid var(--stone-300);
  background: var(--paper);
}

.catalog-overlap figcaption {
  padding: 1.25rem clamp(1.1rem, 0.8rem + 1vw, 1.75rem);
  border-bottom: 1px solid var(--stone-300);
  background: var(--band);
}

.catalog-overlap figcaption h3 {
  margin-bottom: 0.25rem;
  font-size: var(--step-2);
}

.catalog-overlap figcaption p {
  margin: 0;
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: var(--step--1);
  text-wrap: pretty;
}

.catalog-overlap__catalogs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7rem, 0.28fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--stone-300);
}

.catalog-overlap__catalog {
  min-width: 0;
  padding: clamp(1.2rem, 0.9rem + 1vw, 1.75rem);
  background: var(--paper);
}

.catalog-overlap__catalog header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.catalog-overlap__catalog h4 {
  margin: 0;
  font-size: var(--step-0);
}

.catalog-overlap__catalog header strong {
  flex: none;
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.catalog-overlap__meter {
  height: 1.4rem;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--stone-300);
  background: var(--band);
}

.catalog-overlap__meter > span {
  display: block;
  width: var(--overlap-share);
  min-width: 2px;
  height: 100%;
  border-right: 2px solid var(--ink);
  background: var(--accent);
}

.catalog-overlap__catalog:last-child .catalog-overlap__meter > span {
  background: var(--blue);
}

.catalog-overlap__catalog p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: var(--step--1);
  text-wrap: pretty;
}

.catalog-overlap__shared {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 1.2rem 0.75rem;
  background: var(--night);
  color: var(--stone-100);
  text-align: center;
}

.catalog-overlap__shared > strong {
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1;
}

.catalog-overlap__shared > span:last-child {
  margin-top: 0.2rem;
  font-size: var(--step--1);
}

.catalog-overlap__join {
  position: relative;
  display: block;
  width: 3.2rem;
  height: 2.2rem;
  margin-bottom: 0.75rem;
}

.catalog-overlap__join::before,
.catalog-overlap__join::after {
  content: "";
  position: absolute;
  top: 0;
  width: 2rem;
  height: 1.85rem;
  border: 2px solid var(--accent);
  border-radius: 1.2rem 1.2rem 0 0;
}

.catalog-overlap__join::before { left: 0; }
.catalog-overlap__join::after { right: 0; border-color: var(--stone-100); }

/* --------------------------------------------------------- the inspector -- */

.inspector {
  margin-top: 2rem;
  border: 1px solid var(--stone-300);
}

.inspector__head {
  padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem) 0;
}

/*
 * Every other .fanlight in this theme sits inside a flex container, which
 * blockifies the span so width/height apply. This one does not, so it needs
 * its own display: block or the box collapses to a sliver (caught on this
 * page's own screenshot check).
 */
.inspector__mark { --fan: 2.25rem; display: block; margin-bottom: 0.6rem; }

.inspector__head h3 {
  font-size: var(--step-3);
  margin-bottom: 0.25rem;
}

.inspector__meta {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
}

.inspector__note {
  margin: 0;
  padding: 0 clamp(1.25rem, 1rem + 1vw, 2rem) 1.5rem;
  color: var(--ink-soft);
  font-size: var(--step--1);
  max-width: 60ch;
}

.inspector__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.inspector__col {
  padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem);
  border-top: 3px solid var(--stone-300);
}

.inspector__col--wp { border-top-color: var(--blue); }
.inspector__col--tessitura { border-top-color: var(--accent); }

.inspector__col h4 {
  margin: 0 0 1.1rem;
}

.inspector__col dl { margin: 0; }

.inspector__col dl > div + div {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stone-200);
}

.inspector__col dt {
  font-size: var(--step--1);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stone-700);
  margin-bottom: 0.25rem;
}

.inspector__col dd { margin: 0; }

.inspector__col code,
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--band);
  padding: 0.1rem 0.35rem;
}

.inspector__foot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem clamp(1.25rem, 1rem + 1vw, 2rem);
  margin: 0;
  padding: 1.25rem clamp(1.25rem, 1rem + 1vw, 2rem) 1.5rem;
  border-top: 1px solid var(--stone-300);
}

.inspector__foot dt {
  font-size: var(--step--1);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--stone-700);
  margin-bottom: 0.25rem;
}

.inspector__foot dd {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink);
}

@media (max-width: 44rem) {
  .catalog-overlap__catalogs {
    grid-template-columns: minmax(0, 1fr);
  }
}
